Title: [90338] trunk
Revision
90338
Author
[email protected]
Date
2011-07-03 08:04:28 -0700 (Sun, 03 Jul 2011)

Log Message

2011-06-23  Robert Hogan  <[email protected]>

        Reviewed by Simon Hausmann.

        [Qt] Windowless Plugins : <input> cursor blinks even after transferring focus to plugin
        https://bugs.webkit.org/show_bug.cgi?id=30355

        Unfortunately this has to be a rendertree test, as there is no rendertext way of
        determining if a selection is still highlighted.

        * platform/chromium/plugins/mouse-click-plugin-clears-selection-expected.txt: Added.
        * platform/qt/plugins/mouse-click-plugin-clears-selection-expected.txt: Added.
        * plugins/mouse-click-plugin-clears-selection.html: Added.
2011-06-23  Robert Hogan  <[email protected]>

        Reviewed by Simon Hausmann.

        [Qt] Windowless Plugins : <input> cursor blinks even after transferring focus to plugin
        https://bugs.webkit.org/show_bug.cgi?id=30355

        Test: plugins/mouse-click-plugin-clears-selection.html

        PluginView needs to use page->focusController()->setFocusedNode() when focusing a plugin
        in order to clear the FrameSelection in the currently focused node. In its platform-specific
        code Chromium already does this (WebPluginContainerImpl.cpp).

        * WebCore.exp.in: Add symbol for FocusController::setFocusedNode
        * plugins/PluginView.cpp:
        (WebCore::PluginView::focusPluginElement): Using FocusController::setFocusedNode() makes
                                                   the call to FocusController:setFocusedFrame() and Document::setFocusedNode()
                                                   redundant, since it calls both.
2011-06-23  Robert Hogan  <[email protected]>

        Reviewed by Simon Hausmann.

        [Qt] Windowless Plugins : <input> cursor blinks even after transferring focus to plugin
        https://bugs.webkit.org/show_bug.cgi?id=30355

        PluginView needs to use page->focusController()->setFocusedNode() when focusing a plugin
        in order to clear the FrameSelection in the currently focused node. In its platform-specific
        code Chromium already does this (WebPluginContainerImpl.cpp).

        * WebProcess/Plugins/PluginView.cpp:
        (WebCore::PluginView::focusPluginElement): Using FocusController::setFocusedNode() makes
                                                   the call to FocusController:setFocusedFrame() redundant, since the
                                                   former calls it.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (90337 => 90338)


--- trunk/LayoutTests/ChangeLog	2011-07-03 11:09:22 UTC (rev 90337)
+++ trunk/LayoutTests/ChangeLog	2011-07-03 15:04:28 UTC (rev 90338)
@@ -1,3 +1,17 @@
+2011-06-23  Robert Hogan  <[email protected]>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Windowless Plugins : <input> cursor blinks even after transferring focus to plugin
+        https://bugs.webkit.org/show_bug.cgi?id=30355
+
+        Unfortunately this has to be a rendertree test, as there is no rendertext way of
+        determining if a selection is still highlighted.
+
+        * platform/chromium/plugins/mouse-click-plugin-clears-selection-expected.txt: Added.
+        * platform/qt/plugins/mouse-click-plugin-clears-selection-expected.txt: Added.
+        * plugins/mouse-click-plugin-clears-selection.html: Added.
+
 2011-07-02  Mihai Parparita  <[email protected]>
 
         Remove failing expectation for fast/events/panScroll-click-hyperlink.html

Added: trunk/LayoutTests/platform/chromium/plugins/mouse-click-plugin-clears-selection-expected.txt (0 => 90338)


--- trunk/LayoutTests/platform/chromium/plugins/mouse-click-plugin-clears-selection-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium/plugins/mouse-click-plugin-clears-selection-expected.txt	2011-07-03 15:04:28 UTC (rev 90338)
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock (anonymous) at (0,0) size 784x126
+        RenderEmbeddedObject {EMBED} at (0,0) size 100x100
+        RenderBR {BR} at (100,100) size 0x0
+        RenderTextControl {INPUT} at (2,102) size 155x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,126) size 784x0
+layer at (12,113) size 151x16
+  RenderBlock {DIV} at (2,3) size 151x16
+    RenderText {#text} at (1,0) size 27x16
+      text run at (1,0) width 27: "hello"
Property changes on: trunk/LayoutTests/platform/chromium/plugins/mouse-click-plugin-clears-selection-expected.txt
___________________________________________________________________

Added: svn:eol-style

Added: trunk/LayoutTests/platform/qt/plugins/mouse-click-plugin-clears-selection-expected.txt (0 => 90338)


--- trunk/LayoutTests/platform/qt/plugins/mouse-click-plugin-clears-selection-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/qt/plugins/mouse-click-plugin-clears-selection-expected.txt	2011-07-03 15:04:28 UTC (rev 90338)
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock (anonymous) at (0,0) size 784x130
+        RenderEmbeddedObject {EMBED} at (0,0) size 100x100
+        RenderBR {BR} at (100,100) size 0x0
+        RenderTextControl {INPUT} at (2,102) size 166x26
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,130) size 784x0
+layer at (12,112) size 162x22
+  RenderBlock {DIV} at (2,2) size 162x22
+    RenderText {#text} at (1,0) size 32x22
+      text run at (1,0) width 32: "hello"
Property changes on: trunk/LayoutTests/platform/qt/plugins/mouse-click-plugin-clears-selection-expected.txt
___________________________________________________________________

Added: svn:eol-style

Added: trunk/LayoutTests/plugins/mouse-click-plugin-clears-selection.html (0 => 90338)


--- trunk/LayoutTests/plugins/mouse-click-plugin-clears-selection.html	                        (rev 0)
+++ trunk/LayoutTests/plugins/mouse-click-plugin-clears-selection.html	2011-07-03 15:04:28 UTC (rev 90338)
@@ -0,0 +1,25 @@
+<html>
+<head>
+<script>
+
+function runTest() {
+    inputElement = document.getElementById('frame');
+    inputElement.focus();
+    inputElement.select();
+
+    if (!window.layoutTestController) {
+        output.textContent = "Test that clicking on a plugin clears the selection on the currently focused element. Click on the plugin; the text in the input control should no longer be highlighted. The rendertree for this test should not contain any selection information. See https://bugs.webkit.org/show_bug.cgi?id=30355";
+    } else {
+        eventSender.mouseMoveTo(60, 60);
+        eventSender.mouseDown();
+        eventSender.mouseUp();
+    }
+}
+</script>
+</head>
+<body _onload_="runTest();">
+<embed id="plg" type="application/x-webkit-test-netscape" width="100" height="100" windowedplugin="false"></embed><br>
+<input id="frame" value="hello"/>
+<div id="output"></div>
+</body>
+</html>
Property changes on: trunk/LayoutTests/plugins/mouse-click-plugin-clears-selection.html
___________________________________________________________________

Added: svn:eol-style

Modified: trunk/Source/WebCore/ChangeLog (90337 => 90338)


--- trunk/Source/WebCore/ChangeLog	2011-07-03 11:09:22 UTC (rev 90337)
+++ trunk/Source/WebCore/ChangeLog	2011-07-03 15:04:28 UTC (rev 90338)
@@ -1,3 +1,22 @@
+2011-06-23  Robert Hogan  <[email protected]>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Windowless Plugins : <input> cursor blinks even after transferring focus to plugin
+        https://bugs.webkit.org/show_bug.cgi?id=30355
+
+        Test: plugins/mouse-click-plugin-clears-selection.html
+
+        PluginView needs to use page->focusController()->setFocusedNode() when focusing a plugin
+        in order to clear the FrameSelection in the currently focused node. In its platform-specific
+        code Chromium already does this (WebPluginContainerImpl.cpp).
+
+        * WebCore.exp.in: Add symbol for FocusController::setFocusedNode
+        * plugins/PluginView.cpp:
+        (WebCore::PluginView::focusPluginElement): Using FocusController::setFocusedNode() makes
+                                                   the call to FocusController:setFocusedFrame() and Document::setFocusedNode()
+                                                   redundant, since it calls both.
+
 2011-07-01  Michael Nordman  <[email protected]>
 
         Reviewed by Darin Fisher.

Modified: trunk/Source/WebCore/WebCore.exp.in (90337 => 90338)


--- trunk/Source/WebCore/WebCore.exp.in	2011-07-03 11:09:22 UTC (rev 90337)
+++ trunk/Source/WebCore/WebCore.exp.in	2011-07-03 15:04:28 UTC (rev 90338)
@@ -399,6 +399,7 @@
 __ZN7WebCore15DatabaseTracker9setClientEPNS_21DatabaseTrackerClientE
 __ZN7WebCore15FocusController10setFocusedEb
 __ZN7WebCore15FocusController15setFocusedFrameEN3WTF10PassRefPtrINS_5FrameEEE
+__ZN7WebCore15FocusController14setFocusedNodeEPNS_4NodeEN3WTF10PassRefPtrINS_5FrameEEE
 __ZN7WebCore15FocusController15setInitialFocusENS_14FocusDirectionEPNS_13KeyboardEventE
 __ZN7WebCore15FocusController9setActiveEb
 __ZN7WebCore15GraphicsContext12setFillColorERKNS_5ColorENS_10ColorSpaceE

Modified: trunk/Source/WebCore/plugins/PluginView.cpp (90337 => 90338)


--- trunk/Source/WebCore/plugins/PluginView.cpp	2011-07-03 11:09:22 UTC (rev 90337)
+++ trunk/Source/WebCore/plugins/PluginView.cpp	2011-07-03 15:04:28 UTC (rev 90338)
@@ -909,8 +909,9 @@
 {
     // Focus the plugin
     if (Page* page = m_parentFrame->page())
-        page->focusController()->setFocusedFrame(m_parentFrame);
-    m_parentFrame->document()->setFocusedNode(m_element);
+        page->focusController()->setFocusedNode(m_element, m_parentFrame);
+    else
+        m_parentFrame->document()->setFocusedNode(m_element);
 }
 
 void PluginView::didReceiveResponse(const ResourceResponse& response)

Modified: trunk/Source/WebKit2/ChangeLog (90337 => 90338)


--- trunk/Source/WebKit2/ChangeLog	2011-07-03 11:09:22 UTC (rev 90337)
+++ trunk/Source/WebKit2/ChangeLog	2011-07-03 15:04:28 UTC (rev 90338)
@@ -1,3 +1,19 @@
+2011-06-23  Robert Hogan  <[email protected]>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Windowless Plugins : <input> cursor blinks even after transferring focus to plugin
+        https://bugs.webkit.org/show_bug.cgi?id=30355
+
+        PluginView needs to use page->focusController()->setFocusedNode() when focusing a plugin
+        in order to clear the FrameSelection in the currently focused node. In its platform-specific
+        code Chromium already does this (WebPluginContainerImpl.cpp).
+
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebCore::PluginView::focusPluginElement): Using FocusController::setFocusedNode() makes
+                                                   the call to FocusController:setFocusedFrame() redundant, since the
+                                                   former calls it.
+
 2011-07-02  Anders Carlsson  <[email protected]>
 
         Have another go at fixing the Windows build.

Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (90337 => 90338)


--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2011-07-03 11:09:22 UTC (rev 90337)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2011-07-03 15:04:28 UTC (rev 90338)
@@ -681,8 +681,9 @@
     ASSERT(frame());
     
     if (Page* page = frame()->page())
-        page->focusController()->setFocusedFrame(frame());
-    frame()->document()->setFocusedNode(m_pluginElement);
+       page->focusController()->setFocusedNode(m_pluginElement.get(), frame());
+    else
+       frame()->document()->setFocusedNode(m_pluginElement);
 }
 
 void PluginView::pendingURLRequestsTimerFired()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to