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

Issue 320783002: CSSGrammer.y should not allow missing closing bracket when it parses querySelector's selector text. (Closed)

Created:
6 years, 6 months ago by tasak
Modified:
6 years, 6 months ago
CC:
blink-reviews, blink-reviews-css, ed+blinkwatch_opera.com, dglazkov+blink, apavlov+blink_chromium.org, darktears, rune+blink, rwlbuis
Visibility:
Public.

Description

CSSGrammer.y should not allow missing closing bracket when it parses querySelector's selector text. Spec: http://www.w3.org/TR/selectors-api/#processing-selectors If result is invalid ([SELECT], section 12), raise a SYNTAX_ERR exception ([DOM-LEVEL-3-CORE], section 1.4) and abort this algorithm. BUG=380033 TEST=fast/css/parsing-unexpected-eof.html

Patch Set 1 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -7 lines) Patch
M LayoutTests/fast/css/parsing-unexpected-eof.html View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/css/CSSGrammar.y View 11 chunks +38 lines, -4 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
tasak
Would you review this CL?
6 years, 6 months ago (2014-06-09 09:06:14 UTC) #1
dglazkov
On 2014/06/09 at 09:06:14, tasak wrote: > Would you review this CL? LGTM. "CSSGrammar.y" is ...
6 years, 6 months ago (2014-06-09 16:43:27 UTC) #2
rune
Unless there are real world incompatibilities here, I don't think this is the right thing ...
6 years, 6 months ago (2014-06-09 20:37:24 UTC) #3
Tab Atkins
On 2014/06/09 20:37:24, rune wrote: > Unless there are real world incompatibilities here, I don't ...
6 years, 6 months ago (2014-06-09 22:09:53 UTC) #4
rune
not lgtm
6 years, 6 months ago (2014-06-09 22:18:11 UTC) #5
tasak
6 years, 6 months ago (2014-06-10 00:47:42 UTC) #6
Thank you for reviewing.

On 2014/06/09 22:09:53, Tab Atkins wrote:
> On 2014/06/09 20:37:24, rune wrote:
> > Unless there are real world incompatibilities here, I don't think this is
the
> > right thing to do. I have added Tab.
> > 
> > The CSS3 Syntax spec has end-of-simple-block handling as part of the
> > tokenization handling this at the block level:
> > http://www.w3.org/TR/2014/CR-css-syntax-3-20140220/#consume-a-simple-block0
> that
> > would generate a valid simple-block token out of this:
> > 
> >   [attr="x"
> > 
> > I found this thread (which I havent' read in detail yet):
> > 
> > http://lists.w3.org/Archives/Public/www-style/2012Oct/0832.html
> > 
> > and in particular this post:
> > 
> > http://lists.w3.org/Archives/Public/www-style/2012Oct/0838.html
> > 
> > which indicates we shouldn't tokenize differently in Selectors API,
including
> > EOF handling.
> 
> Yes, "[attr='x'" should be valid - the [] block gets auto-closed by the CSS
> parser, per spec, so it's undetectable whether the "]" is present or not.
> 
> Sorry that Selector parsing isn't well-defined yet.  I plan to fix this soon,
> rebasing it over the Syntax spec rather than the 2.1 grammar.

I see.
I should not fix crbug.com/380033 because the bug depends on selector spec bug.

I will close this CL and comment on crbug.com/380033.

Powered by Google App Engine
This is Rietveld 408576698