Source/WebKit/blackberry/ChangeLog

 12013-01-30 Jacky Jiang <zhajiang@rim.com>
 2
 3 [BlackBerry] Zooming in during page load of non-scalable webpage results in fixed magnification
 4 https://bugs.webkit.org/show_bug.cgi?id=108252
 5
 6 Reviewed by NOBODY (OOPS!).
 7 Internally reviewed by Jakob Petsovits.
 8
 9 PR: 284828
 10 We got float layoutSize(342.284122, 521.448467) and
 11 m_maximumScale(2.243750) after computing viewport meta based on the
 12 device pixel ratio and laid out the contents at IntSize(342, 521).
 13 Therefore, zoomToFitScale(2.245681) would be a bit larger than
 14 m_maximumScale based on that contents size and resulted in
 15 maximumScale()!=minimumScale(), which made the non-scalable page
 16 scalable.
 17 The patch basically ignores the rounding error and returns
 18 zoomToFitScale instead.
 19
 20 * Api/WebPage.cpp:
 21 (BlackBerry::WebKit::WebPagePrivate::maximumScale):
 22
1232013-01-30 Ed Baker <edbaker@rim.com>
224
325 [BlackBerry] Screenshot is clipped when content is smaller than the desintation size

Source/WebKit/blackberry/Api/WebPage.cpp

@@void WebPage::setMaximumScale(double maximumScale)
17631763
17641764double WebPagePrivate::maximumScale() const
17651765{
1766  if (m_maximumScale >= zoomToFitScale() && m_maximumScale >= m_minimumScale && respectViewport())
1767  return m_maximumScale;
1768 
1769  return hasVirtualViewport() ? std::max<double>(zoomToFitScale(), 4.0) : 4.0;
 1766 double zoomToFitScale = this->zoomToFitScale();
 1767 if (m_maximumScale >= m_minimumScale && respectViewport()) {
 1768 if (m_maximumScale >= zoomToFitScale)
 1769 return m_maximumScale;
 1770
 1771 // We can get float layoutSize(342.284122, 521.448467) and m_maximumScale(2.243750)
 1772 // after computing viewport meta and lay out the contents at IntSize(342, 521).
 1773 // Therefore, zoomToFitScale(2.245681) could be a bit larger than m_maximumScale
 1774 // based on that contents size and results in maximumScale()!=minimumScale(), which
 1775 // can make non-scalable page scalable. So ignore the rounding error here and pick up
 1776 // zoomToFitScale instead.
 1777 if (zoomToFitScale - m_maximumScale < 0.01)
 1778 return zoomToFitScale;
 1779 }
 1780
 1781 return hasVirtualViewport() ? std::max<double>(zoomToFitScale, 4.0) : 4.0;
17701782}
17711783
17721784double WebPage::maximumScale() const