Title: [167835] trunk/Source/WebKit2
Revision
167835
Author
[email protected]
Date
2014-04-25 17:06:15 -0700 (Fri, 25 Apr 2014)

Log Message

REGRESSION (iOS WebKit2): Selection is not being repainted during live resize.
https://bugs.webkit.org/show_bug.cgi?id=132216
<rdar://problem/16628819>

Reviewed by Benjamin Poulain.

Since the selection is drawn in the UIProcess on iOS,
we need to update the selection rects and force a repaint
during a live resize.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateSelectionAppearance):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (167834 => 167835)


--- trunk/Source/WebKit2/ChangeLog	2014-04-25 23:48:10 UTC (rev 167834)
+++ trunk/Source/WebKit2/ChangeLog	2014-04-26 00:06:15 UTC (rev 167835)
@@ -1,3 +1,21 @@
+2014-04-25  Enrica Casucci  <[email protected]>
+
+        REGRESSION (iOS WebKit2): Selection is not being repainted during live resize.
+        https://bugs.webkit.org/show_bug.cgi?id=132216
+        <rdar://problem/16628819>
+
+        Reviewed by Benjamin Poulain.
+
+        Since the selection is drawn in the UIProcess on iOS,
+        we need to update the selection rects and force a repaint
+        during a live resize.
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::dispatchDidLayout):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::updateSelectionAppearance):
+
 2014-04-25  Brady Eidson  <[email protected]>
 
         Add a selection overlay.

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (167834 => 167835)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2014-04-25 23:48:10 UTC (rev 167834)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2014-04-26 00:06:15 UTC (rev 167835)
@@ -597,6 +597,10 @@
 
     webPage->recomputeShortCircuitHorizontalWheelEventsState();
 
+#if PLATFORM(IOS)
+    webPage->updateSelectionAppearance();
+#endif
+
     // NOTE: Unlike the other layout notifications, this does not notify the
     // the UIProcess for every call.
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (167834 => 167835)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2014-04-25 23:48:10 UTC (rev 167834)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2014-04-26 00:06:15 UTC (rev 167835)
@@ -478,6 +478,7 @@
     void setAssistedNodeValueAsNumber(double);
     void setAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection);
     WebCore::IntRect rectForElementAtInteractionLocation();
+    void updateSelectionAppearance();
 
     void dispatchAsynchronousTouchEvents(const Vector<WebTouchEvent, 1>& queue);
 #if ENABLE(INSPECTOR)

Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (167834 => 167835)


--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2014-04-25 23:48:10 UTC (rev 167834)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2014-04-26 00:06:15 UTC (rev 167835)
@@ -298,6 +298,13 @@
     return result.innerNodeFrame()->view()->contentsToRootView(hitNode->renderer()->absoluteBoundingBoxRect(true));
 }
 
+void WebPage::updateSelectionAppearance()
+{
+    Frame& frame = m_page->focusController().focusedOrMainFrame();
+    if (!frame.editor().ignoreCompositionSelectionChange() && (frame.editor().hasComposition() || !frame.selection().selection().isNone()))
+        didChangeSelection();
+}
+
 void WebPage::handleTap(const IntPoint& point)
 {
     Frame& mainframe = m_page->mainFrame();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to