Title: [171458] branches/safari-600.1-branch/Source/WebKit2

Diff

Modified: branches/safari-600.1-branch/Source/WebKit2/ChangeLog (171457 => 171458)


--- branches/safari-600.1-branch/Source/WebKit2/ChangeLog	2014-07-23 07:58:44 UTC (rev 171457)
+++ branches/safari-600.1-branch/Source/WebKit2/ChangeLog	2014-07-23 08:03:02 UTC (rev 171458)
@@ -1,5 +1,36 @@
 2014-07-23  Lucas Forschler  <[email protected]>
 
+        Merge r171352
+
+    2014-07-22  Benjamin Poulain  <[email protected]>
+
+            [iOS][WK2] UI helpers that zoom on an element ignore the viewport's allowsUserScaling
+            https://bugs.webkit.org/show_bug.cgi?id=135140
+            <rdar://problem/17754921>
+
+            Reviewed by Tim Horton.
+
+            UIScrollView makes a difference between min/max zoom and allowUserScaling. To express that,
+            everything is set up on the LayerTransaction.
+
+            For zooming related helpers (find on page, double tap to zoom, etc), the min and max zoom
+            should be the actual min/max for the current page state.
+
+            This patch split the two explicitely.
+            For layer transactions, the values are taken from the viewport configuration directly.
+            For everything else, we should use minimumPageScaleFactor/maximumPageScaleFactor. Those two methods
+            have been updated to take into account allowsUserScaling.
+
+            * WebProcess/WebPage/WebPage.cpp:
+            (WebKit::WebPage::willCommitLayerTree):
+            * WebProcess/WebPage/ios/WebPageIOS.mm:
+            (WebKit::WebPage::minimumPageScaleFactor):
+            (WebKit::WebPage::maximumPageScaleFactor):
+            (WebKit::WebPage::getAssistedNodeInformation):
+
+
+2014-07-23  Lucas Forschler  <[email protected]>
+
         Merge r171345
 
     2014-07-22  Jeremy Jones  <[email protected]>

Modified: branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (171457 => 171458)


--- branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2014-07-23 07:58:44 UTC (rev 171457)
+++ branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2014-07-23 08:03:02 UTC (rev 171458)
@@ -2862,8 +2862,8 @@
     layerTransaction.setPageExtendedBackgroundColor(corePage()->pageExtendedBackgroundColor());
 #if PLATFORM(IOS)
     layerTransaction.setScaleWasSetByUIProcess(scaleWasSetByUIProcess());
-    layerTransaction.setMinimumScaleFactor(minimumPageScaleFactor());
-    layerTransaction.setMaximumScaleFactor(maximumPageScaleFactor());
+    layerTransaction.setMinimumScaleFactor(m_viewportConfiguration.minimumScale());
+    layerTransaction.setMaximumScaleFactor(m_viewportConfiguration.maximumScale());
     layerTransaction.setAllowsUserScaling(allowsUserScaling());
 #endif
 }

Modified: branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (171457 => 171458)


--- branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2014-07-23 07:58:44 UTC (rev 171457)
+++ branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2014-07-23 08:03:02 UTC (rev 171458)
@@ -251,11 +251,15 @@
 
 double WebPage::minimumPageScaleFactor() const
 {
+    if (!m_viewportConfiguration.allowsUserScaling())
+        return m_page->pageScaleFactor();
     return m_viewportConfiguration.minimumScale();
 }
 
 double WebPage::maximumPageScaleFactor() const
 {
+    if (!m_viewportConfiguration.allowsUserScaling())
+        return m_page->pageScaleFactor();
     return m_viewportConfiguration.maximumScale();
 }
 
@@ -2024,8 +2028,8 @@
     } else
         information.elementRect = IntRect();
 
-    information.minimumScaleFactor = m_viewportConfiguration.minimumScale();
-    information.maximumScaleFactor = m_viewportConfiguration.maximumScale();
+    information.minimumScaleFactor = minimumPageScaleFactor();
+    information.maximumScaleFactor = maximumPageScaleFactor();
     information.allowsUserScaling = m_viewportConfiguration.allowsUserScaling();
     information.hasNextNode = hasFocusableElement(m_assistedNode.get(), m_page.get(), true);
     information.hasPreviousNode = hasFocusableElement(m_assistedNode.get(), m_page.get(), false);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to