Title: [185013] trunk/Source/WebKit2
Revision
185013
Author
[email protected]
Date
2015-05-29 16:02:56 -0700 (Fri, 29 May 2015)

Log Message

[iOS] Cursor hidden in text area once it scrolls.
https://bugs.webkit.org/show_bug.cgi?id=145451
rdar://problem/20356413

Reviewed by Simon Fraser.

This patch fixes both the touch scrolling inside the
overflow area as well as the programmatic scroll that
occurs when inserting a new line. The first issue is fixed by
implementing the chrome client methods didLayout,
didStartOverflowScroll and didEndOverflowScroll. The second
required changing the implementation of notifyRevealedSelectionByScrollingFrame.
We not only need to notify the client to redraw the selection,
but we also need to recompute the editorState, because scrolling
might have occurred.
I've removed the NotifyRevealedSelection message that was not needed
any longer, since EditorStateChanged will do exactly what we want.

* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::editorStateChanged):
(WebKit::WebPageProxy::notifyRevealedSelection): Deleted.
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::notifyRevealedSelectionByScrollingFrame):
(WebKit::WebChromeClient::didLayout):
(WebKit::WebChromeClient::didStartOverflowScroll):
(WebKit::WebChromeClient::didEndOverflowScroll):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (185012 => 185013)


--- trunk/Source/WebKit2/ChangeLog	2015-05-29 23:02:36 UTC (rev 185012)
+++ trunk/Source/WebKit2/ChangeLog	2015-05-29 23:02:56 UTC (rev 185013)
@@ -1,3 +1,34 @@
+2015-05-29  Enrica Casucci  <[email protected]>
+
+        [iOS] Cursor hidden in text area once it scrolls.
+        https://bugs.webkit.org/show_bug.cgi?id=145451
+        rdar://problem/20356413
+
+        Reviewed by Simon Fraser.
+
+        This patch fixes both the touch scrolling inside the
+        overflow area as well as the programmatic scroll that
+        occurs when inserting a new line. The first issue is fixed by
+        implementing the chrome client methods didLayout,
+        didStartOverflowScroll and didEndOverflowScroll. The second
+        required changing the implementation of notifyRevealedSelectionByScrollingFrame.
+        We not only need to notify the client to redraw the selection,
+        but we also need to recompute the editorState, because scrolling
+        might have occurred.
+        I've removed the NotifyRevealedSelection message that was not needed
+        any longer, since EditorStateChanged will do exactly what we want.
+
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::WebPageProxy::editorStateChanged):
+        (WebKit::WebPageProxy::notifyRevealedSelection): Deleted.
+        * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
+        (WebKit::WebChromeClient::notifyRevealedSelectionByScrollingFrame):
+        (WebKit::WebChromeClient::didLayout):
+        (WebKit::WebChromeClient::didStartOverflowScroll):
+        (WebKit::WebChromeClient::didEndOverflowScroll):
+
 2015-05-29  Chris Dumez  <[email protected]>
 
         [iOS] Update WebContent process sandbox profile for AWD logging

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (185012 => 185013)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2015-05-29 23:02:36 UTC (rev 185012)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2015-05-29 23:02:56 UTC (rev 185013)
@@ -1390,8 +1390,6 @@
 
     void enableInspectorNodeSearch();
     void disableInspectorNodeSearch();
-
-    void notifyRevealedSelection();
 #endif // PLATFORM(IOS)
 
     void clearLoadDependentCallbacks();

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (185012 => 185013)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2015-05-29 23:02:36 UTC (rev 185012)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2015-05-29 23:02:56 UTC (rev 185013)
@@ -369,8 +369,8 @@
 
     StartAssistingNode(struct WebKit::AssistedNodeInformation information, bool userIsInteracting, bool blurPreviousNode, WebKit::UserData userData)
     StopAssistingNode()
-    NotifyRevealedSelection()
-
+    OverflowScrollWillStartScroll()
+    OverflowScrollDidEndScroll()
     ShowInspectorHighlight(struct WebCore::Highlight highlight)
     HideInspectorHighlight()
 

Modified: trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (185012 => 185013)


--- trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm	2015-05-29 23:02:36 UTC (rev 185012)
+++ trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm	2015-05-29 23:02:56 UTC (rev 185013)
@@ -608,11 +608,6 @@
     m_process->send(Messages::WebPage::ApplicationDidBecomeActive(), m_pageID);
 }
 
-void WebPageProxy::notifyRevealedSelection()
-{
-    m_pageClient.selectionDidChange();
-}
-
 void WebPageProxy::extendSelection(WebCore::TextGranularity granularity)
 {
     m_process->send(Messages::WebPage::ExtendSelection(static_cast<uint32_t>(granularity)), m_pageID);
@@ -924,7 +919,7 @@
     
     // We always need to notify the client on iOS to make sure the selection is redrawn,
     // even during composition to support phrase boundary gesture.
-    notifyRevealedSelection();
+    m_pageClient.selectionDidChange();
 }
 
 #if USE(QUICK_LOOK)

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm (185012 => 185013)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm	2015-05-29 23:02:36 UTC (rev 185012)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm	2015-05-29 23:02:56 UTC (rev 185013)
@@ -76,7 +76,7 @@
 
 void WebChromeClient::notifyRevealedSelectionByScrollingFrame(WebCore::Frame*)
 {
-    m_page->send(Messages::WebPageProxy::NotifyRevealedSelection());
+    m_page->didChangeSelection();
 }
 
 bool WebChromeClient::isStopping()
@@ -85,19 +85,20 @@
     return false;
 }
 
-void WebChromeClient::didLayout(LayoutType)
+void WebChromeClient::didLayout(LayoutType type)
 {
-    notImplemented();
+    if (type == Scroll)
+        m_page->didChangeSelection();
 }
 
 void WebChromeClient::didStartOverflowScroll()
 {
-    notImplemented();
+    m_page->send(Messages::WebPageProxy::OverflowScrollWillStartScroll());
 }
 
 void WebChromeClient::didEndOverflowScroll()
 {
-    notImplemented();
+    m_page->send(Messages::WebPageProxy::OverflowScrollDidEndScroll());
 }
 
 bool WebChromeClient::hasStablePageScaleFactor() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to