Title: [141134] trunk/Source/WebKit/chromium
- Revision
- 141134
- Author
- [email protected]
- Date
- 2013-01-29 11:01:36 -0800 (Tue, 29 Jan 2013)
Log Message
[chromium] Fix contents size calculation for page scale initialization
https://bugs.webkit.org/show_bug.cgi?id=108204
Reviewed by enne.
My previous patch http://webk.it/107424 had a few issues that are
blocking WebKit roll.
- We still need the layout in resize() given that
http://webk.it/107922 was reverted.
- I deleted code used only for the old page-scale mode in
contentsSize(), but this needs to wait until WebKit roll since it's
making bots fail in this short term.
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::resize):
(WebKit::WebViewImpl::contentsSize):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (141133 => 141134)
--- trunk/Source/WebKit/chromium/ChangeLog 2013-01-29 18:22:13 UTC (rev 141133)
+++ trunk/Source/WebKit/chromium/ChangeLog 2013-01-29 19:01:36 UTC (rev 141134)
@@ -1,3 +1,24 @@
+2013-01-29 Alexandre Elias <[email protected]>
+
+ [chromium] Fix contents size calculation for page scale initialization
+ https://bugs.webkit.org/show_bug.cgi?id=108204
+
+ Reviewed by enne.
+
+ My previous patch http://webk.it/107424 had a few issues that are
+ blocking WebKit roll.
+
+ - We still need the layout in resize() given that
+ http://webk.it/107922 was reverted.
+
+ - I deleted code used only for the old page-scale mode in
+ contentsSize(), but this needs to wait until WebKit roll since it's
+ making bots fail in this short term.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::resize):
+ (WebKit::WebViewImpl::contentsSize):
+
2013-01-29 Alpha Lam <[email protected]>
[chromium] Unreviewed DEPS roll.
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (141133 => 141134)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2013-01-29 18:22:13 UTC (rev 141133)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2013-01-29 19:01:36 UTC (rev 141134)
@@ -1670,11 +1670,9 @@
#if ENABLE(VIEWPORT)
if (settings()->viewportEnabled()) {
- if (!settingsImpl()->applyPageScaleFactorInCompositor()) {
- // Relayout immediately to obtain the new content width, which is needed
- // to calculate the minimum scale limit.
- view->layout();
- }
+ // Relayout immediately to obtain the new content width, which is needed
+ // to calculate the minimum scale limit.
+ view->layout();
computePageScaleFactorLimits();
// When the device rotates:
@@ -3080,6 +3078,12 @@
if (!root)
return IntSize();
+ // If page scale is not applied by compositor, then the CSS transform will
+ // scale by an arbitrary amount. Return the unscaled contents size in this
+ // case.
+ if (!m_page->settings()->applyPageScaleFactorInCompositor())
+ return root->unscaledDocumentRect().size();
+
return root->documentRect().size();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes