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

Issue 186603002: Length MQs invalidate non zero numbers (Closed)

Created:
6 years, 9 months ago by Yoav Weiss
Modified:
6 years, 9 months ago
CC:
blink-reviews, kenneth.christiansen, ed+blinkwatch_opera.com, dglazkov+blink, apavlov+blink_chromium.org, darktears, rune+blink, rwlbuis, TabAtkins
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Length MQs invalidate non zero numbers According to the specification, certain media queries accept a CSS length as their value (e.g. http://www.w3.org/TR/css3-mediaqueries/#width). A CSS length (http://www.w3.org/TR/css3-values/#lengths) must have a known unit, unless the value is zero. This was not properly represented in the MediaQueryExp code, where any number was accepted. So such media queries (e.g. "(max-width: 1)") were considered valid, but evaluated to false. This CL fixes that, making such MQs invalid. BUG= Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168606

Patch Set 1 #

Patch Set 2 : Added MQ unit tests #

Total comments: 2

Patch Set 3 : Changed name of char conversion. Ignored failing test #

Patch Set 4 : Added full stops to comment #

Total comments: 5

Patch Set 5 : Fixed review nits #

Total comments: 4

Patch Set 6 : Fixed review comments #

Patch Set 7 : Fixed build issue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -3 lines) Patch
M Source/core/core.gypi View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/css/MediaQueryExp.cpp View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
A Source/core/css/MediaQuerySetTest.cpp View 1 2 3 4 5 6 1 chunk +143 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Yoav Weiss
Following a chat with Tab Atkins RE https://codereview.chromium.org/171383002/ we noticed that some MQs are not ...
6 years, 9 months ago (2014-03-04 12:26:55 UTC) #1
kenneth.r.christiansen
On 2014/03/04 12:26:55, Yoav Weiss wrote: > Following a chat with Tab Atkins RE https://codereview.chromium.org/171383002/ ...
6 years, 9 months ago (2014-03-04 12:27:58 UTC) #2
Yoav Weiss
On 2014/03/04 12:27:58, kenneth.r.christiansen wrote: > On 2014/03/04 12:26:55, Yoav Weiss wrote: > > Following ...
6 years, 9 months ago (2014-03-04 15:10:34 UTC) #3
kenneth.r.christiansen
https://codereview.chromium.org/186603002/diff/20001/Source/core/css/MediaQuerySetTest.cpp File Source/core/css/MediaQuerySetTest.cpp (right): https://codereview.chromium.org/186603002/diff/20001/Source/core/css/MediaQuerySetTest.cpp#newcode22 Source/core/css/MediaQuerySetTest.cpp:22: int get8BitString(String str, char* output) you write the same ...
6 years, 9 months ago (2014-03-04 15:59:29 UTC) #4
Yoav Weiss
On 2014/03/04 15:59:29, kenneth.r.christiansen wrote: > https://codereview.chromium.org/186603002/diff/20001/Source/core/css/MediaQuerySetTest.cpp > File Source/core/css/MediaQuerySetTest.cpp (right): > > https://codereview.chromium.org/186603002/diff/20001/Source/core/css/MediaQuerySetTest.cpp#newcode22 > ...
6 years, 9 months ago (2014-03-04 17:40:26 UTC) #5
kenneth.r.christiansen
lgtm with nits... maybe abarth will have a look https://codereview.chromium.org/186603002/diff/60001/Source/core/css/MediaQuerySetTest.cpp File Source/core/css/MediaQuerySetTest.cpp (right): https://codereview.chromium.org/186603002/diff/60001/Source/core/css/MediaQuerySetTest.cpp#newcode24 Source/core/css/MediaQuerySetTest.cpp:24: ...
6 years, 9 months ago (2014-03-04 18:18:45 UTC) #6
Yoav Weiss
On 2014/03/04 18:18:45, kenneth.r.christiansen wrote: > lgtm with nits... maybe abarth will have a look ...
6 years, 9 months ago (2014-03-04 19:07:19 UTC) #7
abarth-chromium
https://codereview.chromium.org/186603002/diff/80001/Source/core/css/MediaQuerySetTest.cpp File Source/core/css/MediaQuerySetTest.cpp (right): https://codereview.chromium.org/186603002/diff/80001/Source/core/css/MediaQuerySetTest.cpp#newcode13 Source/core/css/MediaQuerySetTest.cpp:13: #define OUTPUT_CHAR_ARRAY_LEN 256 Please use a constant instead of ...
6 years, 9 months ago (2014-03-05 18:01:42 UTC) #8
Yoav Weiss
On 2014/03/05 18:01:42, abarth wrote: > https://codereview.chromium.org/186603002/diff/80001/Source/core/css/MediaQuerySetTest.cpp > File Source/core/css/MediaQuerySetTest.cpp (right): > > https://codereview.chromium.org/186603002/diff/80001/Source/core/css/MediaQuerySetTest.cpp#newcode13 > ...
6 years, 9 months ago (2014-03-05 19:56:33 UTC) #9
Yoav Weiss
The CQ bit was checked by yoav@yoav.ws
6 years, 9 months ago (2014-03-05 22:30:04 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoav@yoav.ws/186603002/120001
6 years, 9 months ago (2014-03-05 22:30:16 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-06 03:59:00 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel
6 years, 9 months ago (2014-03-06 03:59:00 UTC) #13
Yoav Weiss
The CQ bit was checked by yoav@yoav.ws
6 years, 9 months ago (2014-03-06 07:51:12 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoav@yoav.ws/186603002/120001
6 years, 9 months ago (2014-03-06 07:52:48 UTC) #15
commit-bot: I haz the power
6 years, 9 months ago (2014-03-06 09:28:45 UTC) #16
Message was sent while issue was closed.
Change committed as 168606

Powered by Google App Engine
This is Rietveld 408576698