Title: [135615] trunk/Source/WebKit/blackberry
- Revision
- 135615
- Author
- zhaji...@rim.com
- Date
- 2012-11-23 08:27:30 -0800 (Fri, 23 Nov 2012)
Log Message
[BlackBerry] Meta viewport can't be changed dynamically
https://bugs.webkit.org/show_bug.cgi?id=103098
Patch by Jacky Jiang <zhaji...@rim.com>.
Reviewed by Rob Buis.
Internally reviewed by Arvid Nilsson.
PR: 237072
Reset m_userPerformedManualZoom and enable
m_shouldZoomToInitialScaleAfterLoadFinished so that we can relayout the
page and zoom it to fit the screen when we dynamically change the meta
viewport after the load is finished.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (135614 => 135615)
--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2012-11-23 16:15:51 UTC (rev 135614)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2012-11-23 16:27:30 UTC (rev 135615)
@@ -3467,7 +3467,14 @@
Platform::IntSize virtualViewport = recomputeVirtualViewportFromViewportArguments();
m_webPage->setVirtualViewportSize(virtualViewport);
- if (loadState() == WebKit::WebPagePrivate::Committed)
+ // Reset m_userPerformedManualZoom and enable m_shouldZoomToInitialScaleAfterLoadFinished so that we can relayout
+ // the page and zoom it to fit the screen when we dynamically change the meta viewport after the load is finished.
+ bool isLoadFinished = loadState() == Finished;
+ if (isLoadFinished) {
+ m_userPerformedManualZoom = false;
+ setShouldZoomToInitialScaleAfterLoadFinished(true);
+ }
+ if (loadState() == Committed || isLoadFinished)
zoomToInitialScaleOnLoad();
}
Modified: trunk/Source/WebKit/blackberry/ChangeLog (135614 => 135615)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-11-23 16:15:51 UTC (rev 135614)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-11-23 16:27:30 UTC (rev 135615)
@@ -1,3 +1,20 @@
+2012-11-23 Jacky Jiang <zhaji...@rim.com>
+
+ [BlackBerry] Meta viewport can't be changed dynamically
+ https://bugs.webkit.org/show_bug.cgi?id=103098
+
+ Reviewed by Rob Buis.
+ Internally reviewed by Arvid Nilsson.
+
+ PR: 237072
+ Reset m_userPerformedManualZoom and enable
+ m_shouldZoomToInitialScaleAfterLoadFinished so that we can relayout the
+ page and zoom it to fit the screen when we dynamically change the meta
+ viewport after the load is finished.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
+
2012-11-23 Genevieve Mak <g...@rim.com>
[BlackBerry] Drop Synchronous Mouse Events
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes