Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1234)

Issue 10386160: Set deviceScaleFactor on the renderer WebView to enable scaling when not in fixed-layout mode. (Closed)

Created:
8 years, 7 months ago by danakj
Modified:
8 years, 7 months ago
Reviewers:
piman
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, jochen+watch-content_chromium.org, Fady Samuel, aelias_OOO_until_Jul13, rjkroege
Visibility:
Public.

Description

Set deviceScaleFactor on the renderer WebView to enable scaling when not in fixed-layout mode. With https://bugs.webkit.org/show_bug.cgi?id=86051 we have stopped setting the WebView's deviceScaleFactor based on the defaultDeviceScaleFactor in WebSettings. This is because the deviceScaleFactor == defaultDeviceScaleFactor decision is based on if we are in fixed-layout mode. And the decision to enable fixed-layout mode is done in RenderViewImpl. So now, when not in fixed-layout mode, RenderViewImpl will set the deviceScaleFactor and pageScaleFactorLimits directly on the WebView. This allows us to set them once on initialization instead of on each page load etc. If/when we enable viewport on a per-page basis, this will be revisted, together with how we enable fixed-layout mode. BUG=126875 TEST=Should --default-device-scale-factor=2 enable hi-dpi web contents.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -0 lines) Patch
M content/renderer/render_view_impl.cc View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
danakj
Hello! A small change to enable the WebKit side changes, once they land. This should ...
8 years, 7 months ago (2012-05-16 01:52:26 UTC) #1
piman
LGTM
8 years, 7 months ago (2012-05-16 06:40:25 UTC) #2
danakj
8 years, 7 months ago (2012-05-17 23:18:04 UTC) #3
We won't need to do anything on chrome side now to enable this other than pass
in a defualtDeviceScaleFactor. This will trigger our device scaling in the
compositor mode.

It implies not using fixed layout mode, so using --enable-viewport and scaling
something will assert when in this mode.

Powered by Google App Engine
This is Rietveld 408576698