Title: [168781] branches/safari-538.34-branch/Source

Diff

Modified: branches/safari-538.34-branch/Source/WebCore/ChangeLog (168780 => 168781)


--- branches/safari-538.34-branch/Source/WebCore/ChangeLog	2014-05-14 04:29:21 UTC (rev 168780)
+++ branches/safari-538.34-branch/Source/WebCore/ChangeLog	2014-05-14 05:50:43 UTC (rev 168781)
@@ -1,3 +1,30 @@
+2014-04-17  Lucas Forschler  <[email protected]>
+
+        Merge r168447
+
+    2014-05-07  Enrica Casucci  <[email protected]>
+
+            WK2: Programatic scroll requests during scroll or zoom animation to reveal focused element are ignored.
+            https://bugs.webkit.org/show_bug.cgi?id=132657
+            <rdar://problem/16468462>
+
+            Reviewed by Benjamin Poulain.
+
+            With the scrolling model we use on iOS, a programatic scroll
+            request can be received while we are still animating to reveal
+            the focused input element. The WebProcess is unaware that the
+            scroll position is being changed in the UIProcess, and does not
+            honor the scroll request from _javascript_.
+            This is patch changes the behavior for clients using scroll delegates
+            to always send the scroll request to the UIProcess without checking
+            the current scroll position.
+
+            * page/FrameView.h:
+            * platform/ScrollView.cpp:
+            (WebCore::ScrollView::setScrollPosition):
+            * platform/ScrollView.h:
+            (WebCore::ScrollView::inProgrammaticScroll):
+
 2014-05-13  Babak Shafiei  <[email protected]>
 
         Merge r168742

Modified: branches/safari-538.34-branch/Source/WebCore/page/FrameView.h (168780 => 168781)


--- branches/safari-538.34-branch/Source/WebCore/page/FrameView.h	2014-05-14 04:29:21 UTC (rev 168780)
+++ branches/safari-538.34-branch/Source/WebCore/page/FrameView.h	2014-05-14 05:50:43 UTC (rev 168781)
@@ -442,7 +442,7 @@
     const Pagination& pagination() const;
     void setPagination(const Pagination&);
     
-    bool inProgrammaticScroll() const { return m_inProgrammaticScroll; }
+    bool inProgrammaticScroll() const override { return m_inProgrammaticScroll; }
     void setInProgrammaticScroll(bool programmaticScroll) { m_inProgrammaticScroll = programmaticScroll; }
 
 #if ENABLE(CSS_DEVICE_ADAPTATION)

Modified: branches/safari-538.34-branch/Source/WebCore/platform/ScrollView.cpp (168780 => 168781)


--- branches/safari-538.34-branch/Source/WebCore/platform/ScrollView.cpp	2014-05-14 04:29:21 UTC (rev 168780)
+++ branches/safari-538.34-branch/Source/WebCore/platform/ScrollView.cpp	2014-05-14 05:50:43 UTC (rev 168781)
@@ -506,7 +506,7 @@
 
     IntPoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint);
 
-    if (newScrollPosition == scrollPosition())
+    if ((!delegatesScrolling() || !inProgrammaticScroll()) && newScrollPosition == scrollPosition())
         return;
 
     if (requestScrollPositionUpdate(newScrollPosition))

Modified: branches/safari-538.34-branch/Source/WebCore/platform/ScrollView.h (168780 => 168781)


--- branches/safari-538.34-branch/Source/WebCore/platform/ScrollView.h	2014-05-14 04:29:21 UTC (rev 168780)
+++ branches/safari-538.34-branch/Source/WebCore/platform/ScrollView.h	2014-05-14 05:50:43 UTC (rev 168781)
@@ -192,6 +192,8 @@
     LegacyTileCache* legacyTileCache();
 #endif
 
+    virtual bool inProgrammaticScroll() const { return false; }
+
     // visibleContentRect().size() is computed from unscaledUnobscuredVisibleContentSize() divided by the value of visibleContentScaleFactor.
     // visibleContentScaleFactor is usually 1, except when the setting delegatesPageScaling is true and the
     // ScrollView is the main frame; in that case, visibleContentScaleFactor is equal to the page's pageScaleFactor.

Modified: branches/safari-538.34-branch/Source/WebKit2/ChangeLog (168780 => 168781)


--- branches/safari-538.34-branch/Source/WebKit2/ChangeLog	2014-05-14 04:29:21 UTC (rev 168780)
+++ branches/safari-538.34-branch/Source/WebKit2/ChangeLog	2014-05-14 05:50:43 UTC (rev 168781)
@@ -1,3 +1,26 @@
+2014-04-17  Lucas Forschler  <[email protected]>
+
+        Merge r168447
+
+    2014-05-07  Enrica Casucci  <[email protected]>
+
+            WK2: Programatic scroll requests during scroll or zoom animation to reveal focused element are ignored.
+            https://bugs.webkit.org/show_bug.cgi?id=132657
+            <rdar://problem/16468462>
+
+            Reviewed by Benjamin Poulain.
+
+            With the scrolling model we use on iOS, a programatic scroll
+            request can be received while we are still animating to reveal
+            the focused input element. Changing the scroll offset while animating
+            leads to unpredictable results. We now cancel the animation if
+            a programatic scroll request is received.
+
+            * UIProcess/API/Cocoa/WKWebView.mm:
+            (-[WKWebView _scrollToContentOffset:WebCore::]):
+            * WebProcess/WebPage/ios/WebPageIOS.mm:
+            (WebKit::WebPage::getAssistedNodeInformation):
+
 2014-05-13  Lucas Forschler  <[email protected]>
 
         Merge r168445

Modified: branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (168780 => 168781)


--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2014-05-14 04:29:21 UTC (rev 168780)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2014-05-14 05:50:43 UTC (rev 168781)
@@ -561,6 +561,8 @@
     if (_isAnimatingResize)
         return;
 
+    [_scrollView _stopScrollingAndZoomingAnimations];
+
     WebCore::FloatPoint scaledOffset = contentOffset;
     CGFloat zoomScale = contentZoomScale(self);
     scaledOffset.scale(zoomScale, zoomScale);

Modified: branches/safari-538.34-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (168780 => 168781)


--- branches/safari-538.34-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2014-05-14 04:29:21 UTC (rev 168780)
+++ branches/safari-538.34-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2014-05-14 05:50:43 UTC (rev 168781)
@@ -1738,6 +1738,8 @@
 
 void WebPage::getAssistedNodeInformation(AssistedNodeInformation& information)
 {
+    layoutIfNeeded();
+
     if (RenderObject* renderer = m_assistedNode->renderer())
         information.elementRect = m_page->focusController().focusedOrMainFrame().view()->contentsToRootView(renderer->absoluteBoundingBoxRect());
     else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to