Title: [141626] trunk/Source/WebKit/blackberry
- Revision
- 141626
- Author
- [email protected]
- Date
- 2013-02-01 12:21:02 -0800 (Fri, 01 Feb 2013)
Log Message
[BlackBerry] Zooming in during page load of non-scalable webpage results in fixed magnification
https://bugs.webkit.org/show_bug.cgi?id=108252
Patch by Jacky Jiang <[email protected]>.
Reviewed by Yong Li.
Internally reviewed by Konrad Piascik.
PR: 284828
We got float layoutSize(342.284122, 521.448467) and
m_maximumScale(2.243750) after computing viewport meta based on the
device pixel ratio and laid out the contents at IntSize(342, 521).
Therefore, zoomToFitScale(2.245681) would be a bit larger than
m_maximumScale based on that contents size and resulted in
maximumScale()!=minimumScale(), which made the non-scalable page
scalable.
Return zoomToFitScale for maximumScale() in such kind of case.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::maximumScale):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (141625 => 141626)
--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2013-02-01 20:13:45 UTC (rev 141625)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2013-02-01 20:21:02 UTC (rev 141626)
@@ -1763,10 +1763,11 @@
double WebPagePrivate::maximumScale() const
{
- if (m_maximumScale >= zoomToFitScale() && m_maximumScale >= m_minimumScale && respectViewport())
- return m_maximumScale;
+ double zoomToFitScale = this->zoomToFitScale();
+ if (m_maximumScale >= m_minimumScale && respectViewport())
+ return std::max(zoomToFitScale, m_maximumScale);
- return hasVirtualViewport() ? std::max<double>(zoomToFitScale(), 4.0) : 4.0;
+ return hasVirtualViewport() ? std::max<double>(zoomToFitScale, 4.0) : 4.0;
}
double WebPage::maximumScale() const
Modified: trunk/Source/WebKit/blackberry/ChangeLog (141625 => 141626)
--- trunk/Source/WebKit/blackberry/ChangeLog 2013-02-01 20:13:45 UTC (rev 141625)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2013-02-01 20:21:02 UTC (rev 141626)
@@ -1,3 +1,24 @@
+2013-02-01 Jacky Jiang <[email protected]>
+
+ [BlackBerry] Zooming in during page load of non-scalable webpage results in fixed magnification
+ https://bugs.webkit.org/show_bug.cgi?id=108252
+
+ Reviewed by Yong Li.
+ Internally reviewed by Konrad Piascik.
+
+ PR: 284828
+ We got float layoutSize(342.284122, 521.448467) and
+ m_maximumScale(2.243750) after computing viewport meta based on the
+ device pixel ratio and laid out the contents at IntSize(342, 521).
+ Therefore, zoomToFitScale(2.245681) would be a bit larger than
+ m_maximumScale based on that contents size and resulted in
+ maximumScale()!=minimumScale(), which made the non-scalable page
+ scalable.
+ Return zoomToFitScale for maximumScale() in such kind of case.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::maximumScale):
+
2013-02-01 Sean Wang <[email protected]>
[BlackBerry] InputHandler status is not restored when page history goes back
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes