Bug 88121

Summary: [chromium] Support high DPI pixel tests with DumpRenderTree
Product: WebKit Reporter: Terry Anderson <tdanderson>
Component: Tools / TestsAssignee: Terry Anderson <tdanderson>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, danakj, dglazkov, dpranke, fishd, fsamuel, jamesr, ojan, rjkroege, tkent, tkent+wkapi, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 83635, 90190, 90192, 90212, 93647    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch jamesr: review-

Description Terry Anderson 2012-06-01 12:11:30 PDT
Add the flag --compositor-device-scale-factor=n to DRT for Chromium.  This will set the device scale factor to be the integer n and will also have the same effect as using the existing flag --force-compositing-mode.
Comment 1 Dirk Pranke 2012-06-01 12:13:06 PDT
You can already pass arbitrary flags to DRT with --additional-drt-flag "--compositor-device-scale-factor=n"; will that work for this?
Comment 2 Dana Jansens 2012-06-01 12:13:49 PDT
"have the same effect as using the existing flag --force-compositing-mode" -> "also implies the use of --force-compositing-mode" ?
Comment 3 Terry Anderson 2012-06-01 12:44:10 PDT
Created attachment 145359 [details]
Patch
Comment 4 WebKit Review Bot 2012-06-01 12:47:11 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 5 Terry Anderson 2012-06-01 12:48:20 PDT
(In reply to comment #2)
> "have the same effect as using the existing flag --force-compositing-mode" -> "also implies the use of --force-compositing-mode" ?

Yes, that is much better wording. I've updated this in the ChangeLog description.
Comment 6 Dirk Pranke 2012-06-01 12:54:32 PDT
Comment on attachment 145359 [details]
Patch

I probably didn't phrase my previous comment clearly enough. We shouldn't be adding more flags to NRWT unless we have to; there's too many already. Given that I believe you can already get the behavior you want using --additional-drt-flag, I don't think you need this.
Comment 7 Terry Anderson 2012-06-13 13:32:28 PDT
Created attachment 147400 [details]
Patch
Comment 8 Terry Anderson 2012-06-13 13:33:34 PDT
(In reply to comment #7)
> Created an attachment (id=147400) [details]
> Patch

There were some additional changes made in light of https://bugs.webkit.org/show_bug.cgi?id=88375 landing since I uploaded my first patch.
Comment 9 James Robinson 2012-06-13 14:04:08 PDT
Comment on attachment 147400 [details]
Patch

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

> Source/WebKit/chromium/public/WebWidget.h:99
> +    virtual void paint(WebCanvas*, const WebRect& viewPort, const int scaleFactor = 1) { }

this seems misguided.  We already have a deviceScaleFactor and pageScaleFactor setter on WebView, why are they not sufficient?
Comment 10 James Robinson 2012-06-13 14:05:04 PDT
We also need to support non-integer device scales in general.  IMO it's OK to start with only handling integer scales at first, but we're going to have non-integer scales very soon so we need to make sure the design and API are amenable.
Comment 11 Terry Anderson 2012-06-28 10:58:52 PDT
*** Bug 70066 has been marked as a duplicate of this bug. ***