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

Issue 14408004: Fix incorrect evaluation of resolution media queries (Closed)

Created:
7 years, 8 months ago by kenneth.r.christiansen
Modified:
7 years, 7 months ago
CC:
blink-reviews, apavlov+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Enable resolution media queries with fixed implementation The fixes to the original implementation are partly based on a patch by Rune Lillesveen <rune@opera.com>; The implementation used the physical resolution to evaluate the resolution media features. Changed to use the actual CSS resolution, also known as the device-pixel-ratio, instead. Unified the code for evaluating the resolution and device-pixel-ratio media features. Intent to ship thread: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/odQrXmT5vHk BUG=158744, 230393 WKBUG=114029 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=150142

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 1

Patch Set 4 : #

Total comments: 1

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Total comments: 1

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -272 lines) Patch
M LayoutTests/fast/media/mq-resolution.html View 2 chunks +4 lines, -24 lines 0 comments Download
M LayoutTests/fast/media/mq-resolution-expected.txt View 1 chunk +0 lines, -13 lines 0 comments Download
M LayoutTests/fast/media/w3c/test_media_queries-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -7 lines 0 comments Download
M Source/core/css/CSSParser.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/css/CSSParser.cpp View 1 2 3 4 5 6 7 8 9 10 5 chunks +0 lines, -12 lines 0 comments Download
M Source/core/css/CSSPrimitiveValue.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -2 lines 0 comments Download
M Source/core/css/CSSPrimitiveValue.cpp View 1 2 3 4 5 9 chunks +1 line, -18 lines 0 comments Download
M Source/core/css/CSSStyleSheet.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -3 lines 0 comments Download
M Source/core/css/MediaFeatureNames.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/css/MediaList.h View 1 2 3 4 5 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/css/MediaList.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +0 lines, -2 lines 0 comments Download
M Source/core/css/MediaQueryEvaluator.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +32 lines, -117 lines 0 comments Download
M Source/core/css/MediaQueryExp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -4 lines 0 comments Download
M Source/core/css/MediaQueryMatcher.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/css/StyleSheetContents.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -3 lines 0 comments Download
M Source/core/features.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/page/Screen.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/page/Screen.cpp View 1 2 3 1 chunk +0 lines, -29 lines 0 comments Download
M Source/core/page/Settings.h View 1 2 3 4 5 2 chunks +0 lines, -5 lines 0 comments Download
M Source/core/page/Settings.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -9 lines 0 comments Download
M Source/core/testing/InternalSettings.h View 1 2 3 4 5 2 chunks +0 lines, -2 lines 0 comments Download
M Source/core/testing/InternalSettings.cpp View 1 2 3 4 5 3 chunks +0 lines, -9 lines 0 comments Download
M Source/core/testing/InternalSettings.idl View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/testing/Internals.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/testing/Internals.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +12 lines, -0 lines 0 comments Download
M Source/core/testing/Internals.idl View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 42 (0 generated)
kenneth.r.christiansen
7 years, 8 months ago (2013-04-23 15:20:51 UTC) #1
Peter Beverloo
+johnme, rune The RESOLUTION_MEDIA_QUERY flag is still disabled, isn't it? Do you intend to implement ...
7 years, 8 months ago (2013-04-23 16:12:32 UTC) #2
johnme
Nice cleanup! Did you remove the non-square pixels checks on grounds that WebKit/Blink don't support ...
7 years, 8 months ago (2013-04-23 18:16:23 UTC) #3
kenneth.r.christiansen
On 2013/04/23 18:16:23, johnme wrote: > Nice cleanup! Did you remove the non-square pixels checks ...
7 years, 8 months ago (2013-04-23 19:30:23 UTC) #4
kenneth.r.christiansen
On 2013/04/23 16:12:32, Peter Beverloo wrote: > +johnme, rune > > The RESOLUTION_MEDIA_QUERY flag is ...
7 years, 8 months ago (2013-04-23 19:31:39 UTC) #5
rune
On 2013/04/23 19:31:39, kenneth.r.christiansen wrote: > On 2013/04/23 16:12:32, Peter Beverloo wrote: > > +johnme, ...
7 years, 8 months ago (2013-04-23 21:25:29 UTC) #6
rune
On 2013/04/23 19:30:23, kenneth.r.christiansen wrote: > On 2013/04/23 18:16:23, johnme wrote: > > Nice cleanup! ...
7 years, 8 months ago (2013-04-23 21:55:04 UTC) #7
kenneth.r.christiansen
> Are you talking about addResolutionWarningMessageToConsole? I was a bit unsure > if that was ...
7 years, 8 months ago (2013-04-25 10:01:26 UTC) #8
kenneth.r.christiansen
> Could the rounding be limited to dpcm only? Sure thing.
7 years, 8 months ago (2013-04-25 10:01:50 UTC) #9
rune
On 2013/04/25 10:01:26, kenneth.r.christiansen wrote: > > Are you talking about addResolutionWarningMessageToConsole? I was a ...
7 years, 8 months ago (2013-04-25 10:44:32 UTC) #10
johnme
On 2013/04/23 19:30:23, kenneth.r.christiansen wrote: > On 2013/04/23 18:16:23, johnme wrote: > > how does ...
7 years, 8 months ago (2013-04-25 10:46:37 UTC) #11
kenneth.r.christiansen
> One slight downside of the warning, is that some older browsers currently > support ...
7 years, 7 months ago (2013-04-29 11:30:47 UTC) #12
johnme
On 2013/04/29 11:30:47, kenneth.r.christiansen wrote: > I don't get what you mean See: - http://www.w3.org/blog/CSS/2012/06/14/unprefix-webkit-device-pixel-ratio/ ...
7 years, 7 months ago (2013-04-29 11:36:14 UTC) #13
kenneth.r.christiansen
> For example, the only way to write "min-resolution:2dppx" that IE9 understands > is "min-resolution:192dpi" ...
7 years, 7 months ago (2013-04-29 12:01:18 UTC) #14
johnme
On 2013/04/29 12:01:18, kenneth.r.christiansen wrote: > So if someone writes (resolution: 96dpi) you don't want ...
7 years, 7 months ago (2013-04-29 13:06:54 UTC) #15
johnme
Patch lgtm by the way, apart from the comment below. We'll need to get approval ...
7 years, 7 months ago (2013-04-29 13:25:45 UTC) #16
kenneth.r.christiansen
> https://codereview.chromium.org/14408004/diff/19001/Source/core/testing/Internals.cpp#newcode1778 > Source/core/testing/Internals.cpp:1778: page->setDeviceScaleFactor(scaleFactor); > Shouldn't you restore the original device scale factor in ...
7 years, 7 months ago (2013-04-29 14:28:31 UTC) #17
johnme
Ok, that's probably fine for now. Though the page()->setDeviceScaleFactor(1); should probably still go in Internals::resetToConsistentState() ...
7 years, 7 months ago (2013-04-29 14:40:46 UTC) #18
kenneth.r.christiansen
On 2013/04/29 14:40:46, johnme wrote: > Ok, that's probably fine for now. Though the page()->setDeviceScaleFactor(1); ...
7 years, 7 months ago (2013-04-29 16:17:10 UTC) #19
abarth-chromium
Yeah, resetToConsistentState() is the right place. Looking at the details now.
7 years, 7 months ago (2013-04-29 20:13:02 UTC) #20
abarth-chromium
I'm relying on johnme for the CSS details, but the rest LGTM.
7 years, 7 months ago (2013-04-29 20:16:15 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kenneth.r.christiansen@intel.com/14408004/27001
7 years, 7 months ago (2013-04-29 20:16:40 UTC) #22
commit-bot: I haz the power
Retried try job too often on linux_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_layout_rel&number=6153
7 years, 7 months ago (2013-04-29 21:09:06 UTC) #23
kenneth.r.christiansen
Any chance for a new review?
7 years, 7 months ago (2013-05-07 07:11:52 UTC) #24
eseidel
I've read through the patch, but I feel like I don't have quite enough context ...
7 years, 7 months ago (2013-05-07 07:15:36 UTC) #25
rune
On 2013/05/07 07:11:52, kenneth.r.christiansen wrote: > Any chance for a new review? (unauthorized) lgtm
7 years, 7 months ago (2013-05-07 07:28:55 UTC) #26
eseidel
Could you link to the WK bug in the description? (And maybe give a bit ...
7 years, 7 months ago (2013-05-07 07:32:38 UTC) #27
Peter Beverloo
John, could you have another look please? The patch now also enables the resolution media ...
7 years, 7 months ago (2013-05-07 13:08:50 UTC) #28
johnme
Updated patch LGTM. I noticed an interesting comment about the naming of the dppx unit. ...
7 years, 7 months ago (2013-05-07 15:46:29 UTC) #29
kenneth.r.christiansen
> Source/core/css/CSSParser.cpp:9910: // Keep this compile time guard in place > until that is resolved. ...
7 years, 7 months ago (2013-05-07 15:49:49 UTC) #30
kenneth.r.christiansen
7 years, 7 months ago (2013-05-07 19:04:55 UTC) #31
TabAtkins
On 2013/05/07 15:46:29, johnme wrote: > Hmm. Tab, can you comment on the current status ...
7 years, 7 months ago (2013-05-08 19:22:16 UTC) #32
kenneth.r.christiansen
Eric, Adam, could any of you rubberstamp this patch now?
7 years, 7 months ago (2013-05-10 10:29:06 UTC) #33
darktears
On 2013/05/10 10:29:06, kenneth.r.christiansen wrote: > Eric, Adam, could any of you rubberstamp this patch ...
7 years, 7 months ago (2013-05-10 11:44:44 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kenneth.r.christiansen@intel.com/14408004/47001
7 years, 7 months ago (2013-05-10 11:45:22 UTC) #35
commit-bot: I haz the power
Failed to apply patch for Source/core/css/MediaQueryEvaluator.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 7 months ago (2013-05-10 11:45:29 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kenneth.r.christiansen@intel.com/14408004/73004
7 years, 7 months ago (2013-05-10 14:06:50 UTC) #37
commit-bot: I haz the power
Failed to apply patch for Source/core/css/MediaFeatureNames.h: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 7 months ago (2013-05-10 14:06:58 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kenneth.r.christiansen@intel.com/14408004/75023
7 years, 7 months ago (2013-05-10 14:21:27 UTC) #39
commit-bot: I haz the power
Retried try job too often on win_layout for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_layout&number=1805
7 years, 7 months ago (2013-05-10 21:12:15 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kenneth.r.christiansen@intel.com/14408004/75023
7 years, 7 months ago (2013-05-10 22:09:20 UTC) #41
commit-bot: I haz the power
7 years, 7 months ago (2013-05-10 22:09:44 UTC) #42
Message was sent while issue was closed.
Change committed as 150142

Powered by Google App Engine
This is Rietveld 408576698