Title: [132796] trunk
Revision
132796
Author
[email protected]
Date
2012-10-29 07:23:07 -0700 (Mon, 29 Oct 2012)

Log Message

[EFL][WK2] REGRESSION(r132342): fast/events/frame-tab-focus.html fails
https://bugs.webkit.org/show_bug.cgi?id=100646

Reviewed by Kenneth Rohde Christiansen.

Tools: 

* WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
(WTR::PlatformWebView::focus): Improve the check we perform to
decide whether the focus should be taken out of the view before
focusing it again so that we do not unnecessarily unfocus it and
cause blur/focus events to be triggered. Instead of just verifying
if the Evas_Object representing the view has focus, use the WK C
API to check that the currently focused frame is not the main
frame.

LayoutTests: 

* platform/efl-wk2/TestExpectations: Unskip
fast/events/frame-tab-focus.html.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (132795 => 132796)


--- trunk/LayoutTests/ChangeLog	2012-10-29 14:10:05 UTC (rev 132795)
+++ trunk/LayoutTests/ChangeLog	2012-10-29 14:23:07 UTC (rev 132796)
@@ -1,3 +1,13 @@
+2012-10-29  Raphael Kubo da Costa  <[email protected]>
+
+        [EFL][WK2] REGRESSION(r132342): fast/events/frame-tab-focus.html fails
+        https://bugs.webkit.org/show_bug.cgi?id=100646
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * platform/efl-wk2/TestExpectations: Unskip
+        fast/events/frame-tab-focus.html.
+
 2012-10-29  Michelangelo De Simone  <[email protected]>
 
         [CSS Shaders] Implement CustomFilterArrayParameter::blend

Modified: trunk/LayoutTests/platform/efl-wk2/TestExpectations (132795 => 132796)


--- trunk/LayoutTests/platform/efl-wk2/TestExpectations	2012-10-29 14:10:05 UTC (rev 132795)
+++ trunk/LayoutTests/platform/efl-wk2/TestExpectations	2012-10-29 14:23:07 UTC (rev 132796)
@@ -275,6 +275,3 @@
 webkit.org/b/91854 editing/spelling [ Skip ]
 
 webkit.org/b/100248 fast/forms/select-multiple-elements-with-mouse-drag.html [ Failure ]
-
-# Spurious output after fixing flakiness
-webkit.org/b/100010 fast/events/frame-tab-focus.html [ Failure ]

Modified: trunk/Tools/ChangeLog (132795 => 132796)


--- trunk/Tools/ChangeLog	2012-10-29 14:10:05 UTC (rev 132795)
+++ trunk/Tools/ChangeLog	2012-10-29 14:23:07 UTC (rev 132796)
@@ -1,3 +1,19 @@
+2012-10-29  Raphael Kubo da Costa  <[email protected]>
+
+        [EFL][WK2] REGRESSION(r132342): fast/events/frame-tab-focus.html fails
+        https://bugs.webkit.org/show_bug.cgi?id=100646
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+        (WTR::PlatformWebView::focus): Improve the check we perform to
+        decide whether the focus should be taken out of the view before
+        focusing it again so that we do not unnecessarily unfocus it and
+        cause blur/focus events to be triggered. Instead of just verifying
+        if the Evas_Object representing the view has focus, use the WK C
+        API to check that the currently focused frame is not the main
+        frame.
+
 2012-10-29  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r132782.

Modified: trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp (132795 => 132796)


--- trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp	2012-10-29 14:10:05 UTC (rev 132795)
+++ trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp	2012-10-29 14:23:07 UTC (rev 132796)
@@ -69,10 +69,10 @@
 
 void PlatformWebView::focus()
 {
-    // Force the view to receive focus even if Evas considers it to be focused; sometimes an iframe might receive
-    // focused via _javascript_ and the main frame is considered unfocused, but that is not noticed by Evas.
-    // Perhaps WebCoreSupport::focusedFrameChanged() should emit some sort of notification?
-    if (evas_object_focus_get(m_view))
+    // In a few cases, an iframe might receive focus from _javascript_ and Evas is not aware of it at all
+    // (WebCoreSupport::focusedFrameChanged() does not emit any notification). We then manually remove the
+    // focus from the view to make the call give focus to evas_object_focus_set(..., true) to be effectful.
+    if (WKPageGetFocusedFrame(page()) != WKPageGetMainFrame(page()))
         evas_object_focus_set(m_view, false);
     evas_object_focus_set(m_view, true);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to