Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Issue 2490393002: Match camelCased SVG attributes selectors in html documents. (Closed)

Created:
4 years, 1 month ago by rune
Modified:
4 years, 1 month ago
Reviewers:
sashab, esprehn
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Match camelCased SVG attributes selectors in html documents. Attribute names are stored lower-case in stylesheets in HTML documents. SVG attribute names are normalized to the camelCase form in HTML documents. That meant SVG attributes with camelCase like viewBox never matched in HTML documents. We had the same issue for camelCased element names in [1]. In that CL we decided to allow insensitive matching for non-html elements in order to avoid having to store the tag names twice in CSSSelector, even if that is wrong according to the HTML spec. This CL does exactly the same for attribute selectors. [1] https://crrev.com/bab4aa7b9 R=sashab@chromium.org,esprehn@chromium.org BUG=663798 Committed: https://crrev.com/b946c5d62ca51dff877a5a1947c62e78756bb38e Cr-Commit-Position: refs/heads/master@{#431544}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Rebased and fixed return statement #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -2 lines) Patch
A third_party/WebKit/LayoutTests/svg/css/attribute-selector.svg View 1 chunk +17 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/css/attribute-selector-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/svg/css/viewBox-attribute-selector.html View 1 chunk +42 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/SelectorChecker.cpp View 1 chunk +11 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Attribute.h View 1 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (10 generated)
rune
ptal Added esprehn@ as you suggested/approved the mentioned spec violation for type selectors.
4 years, 1 month ago (2016-11-11 00:11:25 UTC) #1
sashab
Great comment in SelectorChecker.cpp :) https://codereview.chromium.org/2490393002/diff/1/third_party/WebKit/LayoutTests/svg/css/attribute-selector-expected.txt File third_party/WebKit/LayoutTests/svg/css/attribute-selector-expected.txt (right): https://codereview.chromium.org/2490393002/diff/1/third_party/WebKit/LayoutTests/svg/css/attribute-selector-expected.txt#newcode2 third_party/WebKit/LayoutTests/svg/css/attribute-selector-expected.txt:2: PASS You shouldn't need ...
4 years, 1 month ago (2016-11-11 00:16:52 UTC) #4
rune
https://codereview.chromium.org/2490393002/diff/1/third_party/WebKit/LayoutTests/svg/css/attribute-selector-expected.txt File third_party/WebKit/LayoutTests/svg/css/attribute-selector-expected.txt (right): https://codereview.chromium.org/2490393002/diff/1/third_party/WebKit/LayoutTests/svg/css/attribute-selector-expected.txt#newcode2 third_party/WebKit/LayoutTests/svg/css/attribute-selector-expected.txt:2: PASS On 2016/11/11 00:16:52, sashab wrote: > You shouldn't ...
4 years, 1 month ago (2016-11-11 09:49:23 UTC) #7
sashab
lgtm https://codereview.chromium.org/2490393002/diff/1/third_party/WebKit/LayoutTests/svg/css/attribute-selector-expected.txt File third_party/WebKit/LayoutTests/svg/css/attribute-selector-expected.txt (right): https://codereview.chromium.org/2490393002/diff/1/third_party/WebKit/LayoutTests/svg/css/attribute-selector-expected.txt#newcode2 third_party/WebKit/LayoutTests/svg/css/attribute-selector-expected.txt:2: PASS On 2016/11/11 at 09:49:23, rune wrote: > ...
4 years, 1 month ago (2016-11-11 10:15:20 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2490393002/20001
4 years, 1 month ago (2016-11-11 11:51:07 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-11-11 11:55:27 UTC) #15
rune
On 2016/11/11 10:15:20, sashab wrote: > Hm :( That's no good. Maybe file a bug ...
4 years, 1 month ago (2016-11-11 11:56:59 UTC) #16
commit-bot: I haz the power
4 years, 1 month ago (2016-11-11 12:00:27 UTC) #18
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/b946c5d62ca51dff877a5a1947c62e78756bb38e
Cr-Commit-Position: refs/heads/master@{#431544}

Powered by Google App Engine
This is Rietveld 408576698