Bug 66413 - WebCore requires every WebKit port to keep track of the device scale factor
: WebCore requires every WebKit port to keep track of the device scale factor
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering
: 528+ (Nightly build)
: Macintosh Mac OS X 10.7
: P2 Normal
Assigned To: Nobody
:
Depends on:
Blocks: 66412
  Show dependency treegraph
 
Reported: 2011-08-17 14:25 PDT by Adam Roben (:aroben)
Modified: 2011-08-18 06:26 PDT (History)
10 users (show)

See Also:


Attachments
Make WebCore keep track of the current device scale factor (43.61 KB, patch)
2011-08-17 14:34 PDT, Adam Roben (:aroben)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2011-08-17 14:25:54 PDT
WebCore currently requires every WebKit port to keep track of the device scale factor, and to only call down into WebCore when the device scale factor has actually changed. It would be much easier if WebCore kept track of the device scale factor itself so that WebKit could call down whenever it thinks the scale factor *might* have changed.
Comment 1 Adam Roben (:aroben) 2011-08-17 14:34:34 PDT
Created attachment 104246 [details]
Make WebCore keep track of the current device scale factor
Comment 2 WebKit Review Bot 2011-08-17 14:38:00 PDT
Attachment 104246 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/css/MediaQueryEvaluator.cpp:296:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
Total errors found: 1 in 27 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Adam Roben (:aroben) 2011-08-17 19:54:50 PDT
It would be great if some Qt folks could take a look at the changes to QWebPage just to make sure I'm not changing your API headers in a bad way. Thanks!
Comment 4 Kenneth Rohde Christiansen 2011-08-18 00:59:48 PDT
Comment on attachment 104246 [details]
Make WebCore keep track of the current device scale factor

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

> Source/WebKit/qt/Api/qwebpage.cpp:2571
> -    d->pixelRatio = conf.devicePixelRatio;
> +    d->page->setDeviceScaleFactor(conf.devicePixelRatio);

This is OK for now. We are doing this slightly different for WebKit2 anyway.
Comment 5 Alexis Menard (darktears) 2011-08-18 04:37:33 PDT
Comment on attachment 104246 [details]
Make WebCore keep track of the current device scale factor

LGTM.
Comment 6 Adam Roben (:aroben) 2011-08-18 06:20:01 PDT
Thanks!
Comment 7 Adam Roben (:aroben) 2011-08-18 06:26:54 PDT
Committed r93303: <http://trac.webkit.org/changeset/93303>