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

Issue 23710067: :-webkit-any pseudo with escaped '(' should not crash. (Closed)

Created:
7 years, 3 months ago by rune
Modified:
7 years, 3 months ago
Reviewers:
ojan
CC:
blink-reviews, dglazkov+blink, apavlov+blink_chromium.org, darktears
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

:-webkit-any pseudo with escaped '(' should not crash. Pseudo classes or elements which had an escaped '(' character were recognized as functions after it had been unescaped. That caused for instance ":-webkit-any\(" to be correctly tokenized as ':' IDENT, but incorrectly recognized as the -webkit-any _function_. Since mandatory arguments were not present in the internal representation, the code crashed. Fixed by making sure IDENTs are recognized as invalid pseudo classes, before any token matching is done, if the unescaped IDENT ends with a '('. Also, removed workaround code for a similar crasher for :not() now that the parsing issue is fixed for :not() as well. BUG=294023 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=157980

Patch Set 1 #

Patch Set 2 : Removed workaround code for :not() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -16 lines) Patch
A LayoutTests/fast/css/crash-on-incomplete-webkit-any.html View 1 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/crash-on-incomplete-webkit-any-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/fast/css/pseudo-escaped-parenthesis.html View 1 chunk +35 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/pseudo-escaped-parenthesis-expected.txt View 1 chunk +14 lines, -0 lines 0 comments Download
M Source/core/css/CSSGrammar.y.in View 3 chunks +6 lines, -0 lines 0 comments Download
M Source/core/css/CSSParserValues.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/css/CSSSelector.cpp View 1 2 chunks +6 lines, -4 lines 0 comments Download
M Source/core/css/SelectorChecker.cpp View 1 3 chunks +5 lines, -12 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
rune
7 years, 3 months ago (2013-09-18 13:26:45 UTC) #1
ojan
lgtm
7 years, 3 months ago (2013-09-18 19:28:49 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rune@opera.com/23710067/3001
7 years, 3 months ago (2013-09-18 19:29:00 UTC) #3
commit-bot: I haz the power
7 years, 3 months ago (2013-09-18 20:43:43 UTC) #4
Message was sent while issue was closed.
Change committed as 157980

Powered by Google App Engine
This is Rietveld 408576698