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

Issue 23659002: Add a public Blink function to canonicalize and restrict the type of CSS selectors. (Closed)

Created:
7 years, 3 months ago by Jeffrey Yasskin
Modified:
7 years, 3 months ago
Reviewers:
abarth-chromium
CC:
blink-reviews, jamesr, dglazkov+blink, eae+blinkwatch, esprehn
Base URL:
https://chromium.googlesource.com/chromium/blink.git@pinned
Visibility:
Public.

Description

Add a public Blink function to canonicalize CSS selectors and restrict their type. This adds the ability for Blink embedders to check that a selector is appropriate in the <content select> attribute or the planned WebDocument::watchSelectors() API, which is currently impossible in Javascript. This also adds a C++ equivalent of writing a rule into a stylesheet and then retrieving its selector from CSSStyleRule.selectorText, which is also useful for the WebDocument::watchSelectors() API, which reports results using the selectorText string. BUG=172011 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=156880

Patch Set 1 : Initial #

Total comments: 10

Patch Set 2 : Fix Adam's comments #

Total comments: 2

Patch Set 3 : Add "Web" #

Unified diffs Side-by-side diffs Delta from patch set Stats (+175 lines, -0 lines) Patch
A Source/web/WebSelector.cpp View 1 2 1 chunk +58 lines, -0 lines 0 comments Download
A Source/web/tests/WebSelectorTest.cpp View 1 2 1 chunk +60 lines, -0 lines 0 comments Download
M Source/web/web.gypi View 2 chunks +2 lines, -0 lines 0 comments Download
A public/web/WebSelector.h View 1 2 1 chunk +55 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Jeffrey Yasskin
Please forward to whoever's best to look at the API expansion. I'm hoping to use ...
7 years, 3 months ago (2013-08-28 01:18:33 UTC) #1
abarth-chromium
Seems fine. LGTM but I think we should go one more round on the API. ...
7 years, 3 months ago (2013-08-28 06:29:37 UTC) #2
Jeffrey Yasskin
Thanks! https://codereview.chromium.org/23659002/diff/7001/public/web/WebSelector.h File public/web/WebSelector.h (right): https://codereview.chromium.org/23659002/diff/7001/public/web/WebSelector.h#newcode38 public/web/WebSelector.h:38: struct WebSelectorRestriction { On 2013/08/28 06:29:37, abarth wrote: ...
7 years, 3 months ago (2013-08-28 17:55:14 UTC) #3
abarth-chromium
On 2013/08/28 17:55:14, Jeffrey Yasskin wrote: > Should the enum's name be WebKit::SelectorType or WebKit::WebSelectorType? ...
7 years, 3 months ago (2013-08-28 19:11:47 UTC) #4
abarth-chromium
lgtm https://codereview.chromium.org/23659002/diff/9001/public/web/WebSelector.h File public/web/WebSelector.h (right): https://codereview.chromium.org/23659002/diff/9001/public/web/WebSelector.h#newcode41 public/web/WebSelector.h:41: enum SelectorType { Now that this is in ...
7 years, 3 months ago (2013-08-28 19:12:41 UTC) #5
Jeffrey Yasskin
Thanks again. https://codereview.chromium.org/23659002/diff/9001/public/web/WebSelector.h File public/web/WebSelector.h (right): https://codereview.chromium.org/23659002/diff/9001/public/web/WebSelector.h#newcode41 public/web/WebSelector.h:41: enum SelectorType { On 2013/08/28 19:12:41, abarth ...
7 years, 3 months ago (2013-08-28 19:19:26 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jyasskin@chromium.org/23659002/20001
7 years, 3 months ago (2013-08-28 19:28:22 UTC) #7
commit-bot: I haz the power
7 years, 3 months ago (2013-08-28 21:33:57 UTC) #8
Message was sent while issue was closed.
Change committed as 156880

Powered by Google App Engine
This is Rietveld 408576698