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

Issue 836373002: Make media query feature values more strict (Closed)

Created:
5 years, 11 months ago by rwlbuis
Modified:
5 years, 11 months ago
Reviewers:
Timothy Loh, Yoav Weiss
CC:
blink-reviews, kenneth.christiansen, blink-reviews-css, ed+blinkwatch_opera.com, dglazkov+blink, apavlov+blink_chromium.org, darktears
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Make media query feature values more strict Before this patch MediaQueryData::addParserValue would accept any kind of css token, including url() and '#' types. With this patch addParserValue becomes more restrictive and only allows number, percentage, dimension, delimiter and ident token types. To detect when some other token type is used, make it return a bool and reflect this by renaming to tryAddParserValue. Behavior matches Firefox. BUG=446393 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=188154

Patch Set 1 #

Patch Set 2 : Add tests #

Total comments: 1

Patch Set 3 : Skip on unexpected token types #

Patch Set 4 : Add two more tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -6 lines) Patch
M Source/core/css/MediaQueryEvaluatorTest.cpp View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M Source/core/css/parser/MediaQueryParser.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/parser/MediaQueryParser.cpp View 1 2 4 chunks +10 lines, -5 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
rwlbuis
PTAL
5 years, 11 months ago (2015-01-07 22:15:49 UTC) #2
Timothy Loh
https://codereview.chromium.org/836373002/diff/20001/Source/core/css/parser/MediaQueryParser.cpp File Source/core/css/parser/MediaQueryParser.cpp (right): https://codereview.chromium.org/836373002/diff/20001/Source/core/css/parser/MediaQueryParser.cpp#newcode143 Source/core/css/parser/MediaQueryParser.cpp:143: m_state = ReadFeatureEnd; I'm not sure this works; doesn't ...
5 years, 11 months ago (2015-01-07 23:05:27 UTC) #4
rwlbuis
On 2015/01/07 23:05:27, Timothy Loh wrote: > https://codereview.chromium.org/836373002/diff/20001/Source/core/css/parser/MediaQueryParser.cpp > File Source/core/css/parser/MediaQueryParser.cpp (right): > > https://codereview.chromium.org/836373002/diff/20001/Source/core/css/parser/MediaQueryParser.cpp#newcode143 ...
5 years, 11 months ago (2015-01-08 01:03:08 UTC) #5
Yoav Weiss
On 2015/01/08 01:03:08, rwlbuis wrote: > On 2015/01/07 23:05:27, Timothy Loh wrote: > > > ...
5 years, 11 months ago (2015-01-08 08:06:20 UTC) #6
rwlbuis
On 2015/01/08 08:06:20, Yoav Weiss wrote: > On 2015/01/08 01:03:08, rwlbuis wrote: > > On ...
5 years, 11 months ago (2015-01-08 16:32:51 UTC) #7
Timothy Loh
lgtm, this looks correct to me
5 years, 11 months ago (2015-01-08 22:16:29 UTC) #8
Yoav Weiss
On 2015/01/08 22:16:29, Timothy Loh wrote: > lgtm, this looks correct to me LGTM2 :)
5 years, 11 months ago (2015-01-09 08:48:34 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/836373002/60001
5 years, 11 months ago (2015-01-09 13:51:23 UTC) #11
commit-bot: I haz the power
5 years, 11 months ago (2015-01-09 15:45:42 UTC) #12
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=188154

Powered by Google App Engine
This is Rietveld 408576698