Title: [140289] trunk/Source/WebKit/blackberry
- Revision
- 140289
- Author
- [email protected]
- Date
- 2013-01-20 18:31:15 -0800 (Sun, 20 Jan 2013)
Log Message
[BlackBerry] some websites only takes half of the screen after rotating from landscape to portrait mode.
https://bugs.webkit.org/show_bug.cgi?id=107103
Reviewed by George Staikos.
Internally reviewed by Jacky Jiang.
When the document size changes (by some _javascript_) which makes it too small to fit the viewport, we should
automatically zoom it to fit the viewport.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::layoutFinished):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (140288 => 140289)
--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2013-01-21 02:29:56 UTC (rev 140288)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2013-01-21 02:31:15 UTC (rev 140289)
@@ -1608,6 +1608,12 @@
setScrollPosition(newScrollPosition);
notifyTransformedScrollChanged();
}
+
+ // If the content size is too small, zoom it to fit the viewport.
+ if ((loadState() == Finished || loadState() == Committed)
+ && (transformedContentsSize().width() < transformedActualVisibleSize().width() || transformedContentsSize().height() < transformedActualVisibleSize().height()))
+ zoomAboutPoint(initialScale(), newScrollPosition);
+
}
}
}
Modified: trunk/Source/WebKit/blackberry/ChangeLog (140288 => 140289)
--- trunk/Source/WebKit/blackberry/ChangeLog 2013-01-21 02:29:56 UTC (rev 140288)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2013-01-21 02:31:15 UTC (rev 140289)
@@ -1,3 +1,17 @@
+2013-01-20 Charles Wei <[email protected]>
+
+ [BlackBerry] some websites only takes half of the screen after rotating from landscape to portrait mode.
+ https://bugs.webkit.org/show_bug.cgi?id=107103
+
+ Reviewed by George Staikos.
+ Internally reviewed by Jacky Jiang.
+
+ When the document size changes (by some _javascript_) which makes it too small to fit the viewport, we should
+ automatically zoom it to fit the viewport.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::layoutFinished):
+
2013-01-20 Tiancheng Jiang <[email protected]>
[BlackBerry] Improve Fatfinger phase.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes