Title: [121015] trunk/Source/WebKit2
Revision
121015
Author
ser...@webkit.org
Date
2012-06-22 02:54:28 -0700 (Fri, 22 Jun 2012)

Log Message

[WK2] FindController::hideFindUI should unmark highlighted text matches
https://bugs.webkit.org/show_bug.cgi?id=77747

Reviewed by Carlos Garcia Campos.

Unmark all text matches whenever FindController::hideFindUI is
called to allow callers using the ShowHighlight find option to
remove highlighting.

This patch enables a unit test for the WebKitFindController
previously guarded by a #if(0) after r109222.

* UIProcess/API/gtk/tests/TestWebKitFindController.cpp:
(testFindControllerHide):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::hideFindUI):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (121014 => 121015)


--- trunk/Source/WebKit2/ChangeLog	2012-06-22 09:39:54 UTC (rev 121014)
+++ trunk/Source/WebKit2/ChangeLog	2012-06-22 09:54:28 UTC (rev 121015)
@@ -1,3 +1,22 @@
+2012-06-22  Sergio Villar Senin  <svil...@igalia.com>
+
+        [WK2] FindController::hideFindUI should unmark highlighted text matches
+        https://bugs.webkit.org/show_bug.cgi?id=77747
+
+        Reviewed by Carlos Garcia Campos.
+
+        Unmark all text matches whenever FindController::hideFindUI is
+        called to allow callers using the ShowHighlight find option to
+        remove highlighting.
+
+        This patch enables a unit test for the WebKitFindController
+        previously guarded by a #if(0) after r109222.
+
+        * UIProcess/API/gtk/tests/TestWebKitFindController.cpp:
+        (testFindControllerHide):
+        * WebProcess/WebPage/FindController.cpp:
+        (WebKit::FindController::hideFindUI):
+
 2012-06-21  Christophe Dumez  <christophe.du...@intel.com>
 
         [WK2] Add C API to inspect a Web Intent

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp (121014 => 121015)


--- trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp	2012-06-22 09:39:54 UTC (rev 121014)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp	2012-06-22 09:54:28 UTC (rev 121015)
@@ -324,8 +324,6 @@
     g_assert(highlightPixbuf);
     g_assert(!gdkPixbufEqual(originalPixbuf.get(), highlightPixbuf.get()));
 
-#if (0)
-    // Requires http://webkit.org/b/77747 to be fixed
     WebKitFindController* findController = webkit_web_view_get_find_controller(test->m_webView);
     webkit_find_controller_search_finish(findController);
     webkit_web_view_execute_editing_command(test->m_webView, "Unselect");
@@ -334,7 +332,6 @@
     GRefPtr<GdkPixbuf> unhighlightPixbuf = gdk_pixbuf_get_from_window(webViewGdkWindow, 0, 0, allocatedHeight, allocatedWidth);
     g_assert(unhighlightPixbuf);
     g_assert(gdkPixbufEqual(originalPixbuf.get(), unhighlightPixbuf.get()));
-#endif
 }
 
 static void testFindControllerInstance(FindControllerTest* test, gconstpointer)

Modified: trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp (121014 => 121015)


--- trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp	2012-06-22 09:39:54 UTC (rev 121014)
+++ trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp	2012-06-22 09:54:28 UTC (rev 121015)
@@ -164,6 +164,7 @@
     if (m_findPageOverlay)
         m_webPage->uninstallPageOverlay(m_findPageOverlay, false);
 
+    m_webPage->corePage()->unmarkAllTextMatches();
     hideFindIndicator();
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to