Bug 100061 - [chromium] Device scale factor should be no-op when applyDeviceScaleFactorInCompositor == 0
Summary: [chromium] Device scale factor should be no-op when applyDeviceScaleFactorInC...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 102462
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-22 19:25 PDT by Tien-Ren Chen
Modified: 2012-11-21 17:07 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.17 KB, patch)
2012-10-22 19:26 PDT, Tien-Ren Chen
no flags Details | Formatted Diff | Diff
Patch (2.39 KB, patch)
2012-10-22 19:42 PDT, Tien-Ren Chen
no flags Details | Formatted Diff | Diff
Patch (2.96 KB, patch)
2012-10-23 13:41 PDT, Tien-Ren Chen
no flags Details | Formatted Diff | Diff
Patch (7.61 KB, patch)
2012-10-25 17:29 PDT, Tien-Ren Chen
no flags Details | Formatted Diff | Diff
Patch (6.31 KB, patch)
2012-11-15 21:49 PST, Tien-Ren Chen
no flags Details | Formatted Diff | Diff
Patch (6.33 KB, patch)
2012-11-16 15:34 PST, Tien-Ren Chen
no flags Details | Formatted Diff | Diff
Patch (8.33 KB, patch)
2012-11-16 19:31 PST, Tien-Ren Chen
no flags Details | Formatted Diff | Diff
Patch (8.56 KB, patch)
2012-11-19 17:39 PST, Tien-Ren Chen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tien-Ren Chen 2012-10-22 19:25:03 PDT
[chromium] Device scale factor should be no-op when applyPageScaleFactorInCompositor == 0
Comment 1 Tien-Ren Chen 2012-10-22 19:26:17 PDT
Created attachment 170045 [details]
Patch
Comment 2 Tien-Ren Chen 2012-10-22 19:28:03 PDT
FYI this patch will not affect platforms other than Android, and Android only uses software rendering path for generating disambiguation popups.
Comment 3 Peter Beverloo (cr-android ews) 2012-10-22 19:39:25 PDT
Comment on attachment 170045 [details]
Patch

Attachment 170045 [details] did not pass cr-android-ews (chromium-android):
Output: http://queues.webkit.org/results/14483745
Comment 4 Tien-Ren Chen 2012-10-22 19:42:20 PDT
Created attachment 170048 [details]
Patch
Comment 5 Alexandre Elias 2012-10-22 19:55:31 PDT
LGTM.  Adam, could you r+?
Comment 6 WebKit Review Bot 2012-10-23 00:38:51 PDT
Comment on attachment 170048 [details]
Patch

Rejecting attachment 170048 [details] from commit-queue.

New failing tests:
fast/hidpi/image-set-out-of-order.html
fast/hidpi/image-set-as-background.html
fast/hidpi/image-set-background-dynamic.html
fast/hidpi/image-set-in-content-dynamic.html
fast/hidpi/device-scale-factor-paint.html
fast/hidpi/resize-corner-hidpi.html
fast/hidpi/image-set-border-image-comparison.html
fast/hidpi/video-controls-in-hidpi.html
fast/hidpi/image-set-border-image-simple.html
fast/hidpi/image-set-background-repeat-without-size.html
fast/hidpi/image-set-simple.html
fast/hidpi/image-set-border-image-dynamic.html
fast/hidpi/image-set-without-specified-width.html
fast/hidpi/focus-rings.html
fast/hidpi/gradient-with-scaled-ancestor.html
editing/spelling/inline-spelling-markers-hidpi.html
fast/hidpi/clip-text-in-hidpi.html
editing/spelling/grammar-markers-hidpi.html
fast/hidpi/image-set-background-repeat.html
Full output: http://queues.webkit.org/results/14505339
Comment 7 Tien-Ren Chen 2012-10-23 13:41:02 PDT
Created attachment 170223 [details]
Patch
Comment 8 Adam Barth 2012-10-25 14:50:09 PDT
Comment on attachment 170223 [details]
Patch

Seems to be causing many test failures.
Comment 9 Tien-Ren Chen 2012-10-25 17:29:33 PDT
Created attachment 170770 [details]
Patch
Comment 10 Adam Barth 2012-10-26 15:48:57 PDT
Comment on attachment 170770 [details]
Patch

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

Why do we need to teach WebCore about this setting if it is only ever used in the WebKit layer?  It seems instead that we should teach PageWidgetDelegate.cpp how to find the WebSettings.

> Source/WebCore/page/Settings.h:644
> +        void setApplyDefaultDeviceScaleFactorInCompositor(bool enabled) { m_applyDefaultDeviceScaleFactorInCompositor = enabled; }
> +        bool applyDefaultDeviceScaleFactorInCompositor() const { return m_applyDefaultDeviceScaleFactorInCompositor; }

There is no such thing as a "default" device scale factor.  There is only a "device scale factor" and a "page scale factor".  There used to be a "default" device scale factor, but we deleted that notion.  Can you rename this setting?
Comment 11 Tien-Ren Chen 2012-11-15 21:49:33 PST
Created attachment 174606 [details]
Patch
Comment 12 WebKit Review Bot 2012-11-15 21:52:48 PST
Comment on attachment 174606 [details]
Patch

Attachment 174606 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14859223
Comment 13 Peter Beverloo (cr-android ews) 2012-11-16 04:21:43 PST
Comment on attachment 174606 [details]
Patch

Attachment 174606 [details] did not pass cr-android-ews (chromium-android):
Output: http://queues.webkit.org/results/14843979
Comment 14 Adam Barth 2012-11-16 09:26:00 PST
Comment on attachment 174606 [details]
Patch

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

> Source/WebKit/chromium/src/WebViewImpl.h:590
> +    bool applyDeviceScaleFactorInCompositor() const;

This looks more like a command than a state query...
Comment 15 Tien-Ren Chen 2012-11-16 13:59:46 PST
(In reply to comment #14)
> (From update of attachment 174606 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=174606&action=review
> 
> > Source/WebKit/chromium/src/WebViewImpl.h:590
> > +    bool applyDeviceScaleFactorInCompositor() const;
> 
> This looks more like a command than a state query...

Do you think shouldApplyDeviceScaleFactorInCompositor sounds better?
Comment 16 Tien-Ren Chen 2012-11-16 15:34:55 PST
Created attachment 174772 [details]
Patch
Comment 17 WebKit Review Bot 2012-11-16 18:00:28 PST
Comment on attachment 174772 [details]
Patch

Attachment 174772 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14877092

New failing tests:
fast/hidpi/image-set-out-of-order.html
fast/hidpi/image-set-as-background.html
fast/hidpi/image-set-background-dynamic.html
fast/hidpi/image-set-in-content-dynamic.html
fast/hidpi/device-scale-factor-paint.html
fast/hidpi/resize-corner-hidpi.html
fast/hidpi/image-set-border-image-comparison.html
fast/hidpi/video-controls-in-hidpi.html
fast/hidpi/image-set-border-image-simple.html
fast/hidpi/image-set-background-repeat-without-size.html
fast/hidpi/image-set-simple.html
fast/hidpi/image-set-border-image-dynamic.html
fast/hidpi/image-set-without-specified-width.html
fast/hidpi/focus-rings.html
fast/hidpi/gradient-with-scaled-ancestor.html
editing/spelling/inline-spelling-markers-hidpi.html
fast/hidpi/clip-text-in-hidpi.html
editing/spelling/grammar-markers-hidpi.html
fast/hidpi/image-set-background-repeat.html
Comment 18 Tien-Ren Chen 2012-11-16 19:31:05 PST
Created attachment 174796 [details]
Patch
Comment 19 Adam Barth 2012-11-17 10:04:11 PST
> Do you think shouldApplyDeviceScaleFactorInCompositor sounds better?

Yeah.
Comment 20 Adam Barth 2012-11-17 10:06:16 PST
Comment on attachment 174796 [details]
Patch

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

> Source/WebKit/chromium/src/WebViewImpl.cpp:4349
> +bool WebViewImpl::shouldApplyDeviceScaleFactorInCompositor() const
> +{
> +    return m_webSettings->applyDeviceScaleFactorInCompositor();
> +}

I don't really understand the point of this function.  Why don't callers just get the information from the settings themselves?  We don't want to create these sorts of accessors for every setting...
Comment 21 Tien-Ren Chen 2012-11-19 15:53:23 PST
(In reply to comment #20)
> (From update of attachment 174796 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=174796&action=review
> 
> > Source/WebKit/chromium/src/WebViewImpl.cpp:4349
> > +bool WebViewImpl::shouldApplyDeviceScaleFactorInCompositor() const
> > +{
> > +    return m_webSettings->applyDeviceScaleFactorInCompositor();
> > +}
> 
> I don't really understand the point of this function.  Why don't callers just get the information from the settings themselves?  We don't want to create these sorts of accessors for every setting...

I can only get WebSettings but not WebSettingsImpl from the outside of WebViewImpl. :(

The options are:
1. Create an accessor on WebViewImpl.
2. Make WebViewImpl::settingsImpl() public.
3. Add virtual getters on WebSettings.
4. Passing it as an argument to WebPagePopupImpl::create

Which solution you think is the best?
Comment 22 Adam Barth 2012-11-19 16:09:27 PST
> The options are:
> 1. Create an accessor on WebViewImpl.
> 2. Make WebViewImpl::settingsImpl() public.
> 3. Add virtual getters on WebSettings.
> 4. Passing it as an argument to WebPagePopupImpl::create
> 
> Which solution you think is the best?

I'd got with option (2).  That's going to generalize best for the future and won't pollute the API with implementation concerns.
Comment 23 Tien-Ren Chen 2012-11-19 17:39:42 PST
Created attachment 175097 [details]
Patch
Comment 24 WebKit Review Bot 2012-11-21 17:07:08 PST
Comment on attachment 175097 [details]
Patch

Clearing flags on attachment: 175097

Committed r135459: <http://trac.webkit.org/changeset/135459>
Comment 25 WebKit Review Bot 2012-11-21 17:07:14 PST
All reviewed patches have been landed.  Closing bug.