Chromium Issue
https://issues.chromium.org/issues/41089999
Description
Fixed a long-standing spec compliance bug where Blink applied ASCII case-insensitive attribute value matching to SVG (and other empty-namespace) elements when it should only apply to HTML elements. Selectors like [color="RED"] were incorrectly matching <circle color="red"> in SVG.
CLs involved
- https://chromium-review.googlesource.com/c/chromium/src/+/7956604
Match SVG attribute values case-sensitively when applying style. Legacy ASCII case-insensitive attribute value matching now requires the element to be an HTML element, not just in an HTML document, so SVG and empty-namespace elements compare attribute values case-sensitively.
- https://chromium-review.googlesource.com/c/chromium/src/+/8010611
Reland of the above with a hot-path fix: attr_case_insensitive is precomputed once in FillMissingData() and stored on the query, avoiding a per-element RuntimeEnabledFeatures lookup and restoring blink_perf.parser/query-selector-all-class performance.
Demo
https://static.januschka.com/i-41089999/
Status
Both CLs merged.

Chromium Issue
https://issues.chromium.org/issues/41089999
Description
Fixed a long-standing spec compliance bug where Blink applied ASCII case-insensitive attribute value matching to SVG (and other empty-namespace) elements when it should only apply to HTML elements. Selectors like
[color="RED"]were incorrectly matching<circle color="red">in SVG.CLs involved
Match SVG attribute values case-sensitively when applying style. Legacy ASCII case-insensitive attribute value matching now requires the element to be an HTML element, not just in an HTML document, so SVG and empty-namespace elements compare attribute values case-sensitively.
Reland of the above with a hot-path fix: attr_case_insensitive is precomputed once in
FillMissingData()and stored on the query, avoiding a per-elementRuntimeEnabledFeatureslookup and restoringblink_perf.parser/query-selector-all-classperformance.Demo
https://static.januschka.com/i-41089999/
Status
Both CLs merged.