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

Issue 18360007: MediaQueryEvaluator should use default style for evaluating "rem".

Created:
7 years, 5 months ago by tasak
Modified:
7 years, 5 months ago
CC:
blink-reviews, kenneth.christiansen, dglazkov+blink, apavlov+blink_chromium.org, eae+blinkwatch, darktears, tkent
Visibility:
Public.

Description

MediaQueryEvaluator should use default style for document for "rem". Since the 'rem' unit is based on the initial font size when used within Media Queries (c.f.http://dev.w3.org/csswg/mediaqueries/#units), we have to use StyleResolver::styleForDocument to obtain default style for document. TEST=fast/css/media-query-basing-rem-unit.html BUG=258200

Patch Set 1 #

Total comments: 2

Patch Set 2 : Added layout test for seamless iframe #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -5 lines) Patch
A LayoutTests/fast/css/media-query-basing-rem-unit.html View 1 chunk +29 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/media-query-basing-rem-unit-expected.txt View 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/fast/frames/seamless/media-query-basing-rem-unit.html View 1 1 chunk +39 lines, -0 lines 0 comments Download
A LayoutTests/fast/frames/seamless/media-query-basing-rem-unit-expected.txt View 1 1 chunk +13 lines, -0 lines 0 comments Download
M Source/core/css/MediaQueryEvaluator.cpp View 6 chunks +13 lines, -5 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
tasak
7 years, 5 months ago (2013-07-11 05:12:48 UTC) #1
eseidel
I don't feel particularly well informed about media queries, you may want to ask Tab ...
7 years, 5 months ago (2013-07-11 05:37:59 UTC) #2
kenneth.r.christiansen
lgtm, but I also don't know about the seamless case
7 years, 5 months ago (2013-07-11 08:36:35 UTC) #3
TabAtkins
On 2013/07/11 05:37:59, eseidel wrote: > I don't feel particularly well informed about media queries, ...
7 years, 5 months ago (2013-07-11 21:13:40 UTC) #4
tasak
7 years, 5 months ago (2013-07-16 10:33:05 UTC) #5
Thank you for reviewing.

https://codereview.chromium.org/18360007/diff/1/Source/core/css/MediaQueryEva...
File Source/core/css/MediaQueryEvaluator.cpp (right):

https://codereview.chromium.org/18360007/diff/1/Source/core/css/MediaQueryEva...
Source/core/css/MediaQueryEvaluator.cpp:352: RefPtr<RenderStyle> defaultStyle =
StyleResolver::styleForDocument(document);
On 2013/07/11 05:38:00, eseidel wrote:
> Is it OK that if this document is seamless it will be inheriting styles from
> it's container in the document above it?

I added one more layout test for seamless iframe.
The test looks ok?

Powered by Google App Engine
This is Rietveld 408576698