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
: WebKit
Layout and Rendering
: 528+ (Nightly build)
: Macintosh Mac OS X 10.7
: P2 Normal
Assigned To:
:
:
:
: 66412
  Show dependency treegraph
 
Reported: 2011-08-17 14:25 PST by
Modified: 2011-08-18 06:26 PST (History)


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


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2011-08-17 14:25:54 PST
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 From 2011-08-17 14:34:34 PST -------
Created an attachment (id=104246) [details]
Make WebCore keep track of the current device scale factor
------- Comment #2 From 2011-08-17 14:38:00 PST -------
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 From 2011-08-17 19:54:50 PST -------
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 From 2011-08-18 00:59:48 PST -------
(From update of attachment 104246 [details])
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 From 2011-08-18 04:37:33 PST -------
(From update of attachment 104246 [details])
LGTM.
------- Comment #6 From 2011-08-18 06:20:01 PST -------
Thanks!
------- Comment #7 From 2011-08-18 06:26:54 PST -------
Committed r93303: <http://trac.webkit.org/changeset/93303>