Bug 133681

Summary: REGRESSION (r167937): Do not use effective zoom factor while resolving media query's min-, max-(device)width/height values.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bjonesbe, buildbot, commit-queue, eric.carlson, esprehn+autocc, glenn, gyuyoung.kim, jer.noble, kling, macpherson, menard, philipj, rniwa, sergio, simon.fraser
Priority: P2 Keywords: InRadar, Regression
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion
none
Patch
none
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion
none
Patch none

Description zalan 2014-06-10 09:44:46 PDT
Using effective zoom factor give false result for width/height values.
Comment 1 zalan 2014-06-10 09:45:04 PDT
<rdar://problem/17233577>
Comment 2 zalan 2014-06-10 09:59:46 PDT
Created attachment 232792 [details]
Patch
Comment 3 Simon Fraser (smfr) 2014-06-10 10:11:55 PDT
Comment on attachment 232792 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232792&action=review

> Source/WebCore/css/CSSToLengthConversionData.cpp:52
> +        return 0.0;

0

> Source/WebCore/css/CSSToLengthConversionData.cpp:63
>          return 0.0;

0

> Source/WebCore/css/MediaQueryEvaluator.cpp:730
> +            m_frame->document()->renderView(), 1, false);

So mysterious.

Why doesn't the second constructor just initialize m_zoom to 1? It seems to leave it uninitialized.
Comment 4 Simon Fraser (smfr) 2014-06-10 10:19:59 PDT
Comment on attachment 232792 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232792&action=review

> LayoutTests/fast/media/media-query-with-scaled-content.html:27
> +    setTimeout(function() { window.internals.setPageZoomFactor(1); testRunner.notifyDone(); }, 100);

No timeout!
Comment 5 Bem Jones-Bey 2014-06-10 10:29:20 PDT
Comment on attachment 232792 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232792&action=review

>> Source/WebCore/css/MediaQueryEvaluator.cpp:730
>> +            m_frame->document()->renderView(), 1, false);
> 
> So mysterious.
> 
> Why doesn't the second constructor just initialize m_zoom to 1? It seems to leave it uninitialized.

If an explicit zoom isn't provided, m_useEffectiveZoom is set to true, and it uses the zoom on the style instead of m_zoom.
Comment 6 zalan 2014-06-10 11:39:15 PDT
Created attachment 232800 [details]
Patch
Comment 7 zalan 2014-06-10 11:39:27 PDT
Comment on attachment 232800 [details]
Patch

EWS
Comment 8 Build Bot 2014-06-10 12:21:46 PDT
Comment on attachment 232800 [details]
Patch

Attachment 232800 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5543294557749248

New failing tests:
fast/media/media-query-with-scaled-content.html
Comment 9 Build Bot 2014-06-10 12:21:51 PDT
Created attachment 232803 [details]
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-05  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 10 zalan 2014-06-10 12:51:01 PDT
Created attachment 232806 [details]
Patch
Comment 11 zalan 2014-06-10 12:51:25 PDT
Comment on attachment 232806 [details]
Patch

fixed win build. ews testing.
Comment 12 Build Bot 2014-06-10 14:30:55 PDT
Comment on attachment 232806 [details]
Patch

Attachment 232806 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/6288843502256128

New failing tests:
fast/media/media-query-with-scaled-content.html
Comment 13 Build Bot 2014-06-10 14:31:01 PDT
Created attachment 232819 [details]
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-01  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 14 zalan 2014-06-10 14:38:48 PDT
Created attachment 232820 [details]
Patch
Comment 15 zalan 2014-06-10 14:39:32 PDT
Comment on attachment 232820 [details]
Patch

Try EWS again now with the fix included. :)
Comment 16 WebKit Commit Bot 2014-06-10 16:13:54 PDT
Comment on attachment 232820 [details]
Patch

Clearing flags on attachment: 232820

Committed r169779: <http://trac.webkit.org/changeset/169779>
Comment 17 WebKit Commit Bot 2014-06-10 16:14:04 PDT
All reviewed patches have been landed.  Closing bug.