[WPE] Some event handlers not working.
authorclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Aug 2017 15:16:23 +0000 (15:16 +0000)
committerclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Aug 2017 15:16:23 +0000 (15:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=175864

Reviewed by Michael Catanzaro.

Source/WebCore:

Share the EventHandler implementation with the GTK port and add ifdefs where needed.

Covered by existing tests.

* PlatformGTK.cmake:
* PlatformWPE.cmake:
* page/wpe/EventHandlerWPE.cpp: Removed.
* platform/glib/EventHandlerGlib.cpp: Renamed from Source/WebCore/page/gtk/EventHandlerGtk.cpp.
(WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal const):

LayoutTests:

Remove expected failures for tests that now pass, add new expectation
for a test that is failing also on GTK+ and rebaseline a test with
the same expected result than on GTK+.

* platform/wpe/TestExpectations:
* platform/wpe/fast/events/focus-label-legend-elements-with-tab-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221075 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/wpe/TestExpectations
LayoutTests/platform/wpe/fast/events/focus-label-legend-elements-with-tab-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/PlatformGTK.cmake
Source/WebCore/PlatformWPE.cmake
Source/WebCore/page/wpe/EventHandlerWPE.cpp [deleted file]
Source/WebCore/platform/glib/EventHandlerGlib.cpp [moved from Source/WebCore/page/gtk/EventHandlerGtk.cpp with 93% similarity]

index 79d4980..284d0d1 100644 (file)
@@ -1,3 +1,17 @@
+2017-08-23  Carlos Alberto Lopez Perez  <clopez@igalia.com>
+
+        [WPE] Some event handlers not working.
+        https://bugs.webkit.org/show_bug.cgi?id=175864
+
+        Reviewed by Michael Catanzaro.
+
+        Remove expected failures for tests that now pass, add new expectation
+        for a test that is failing also on GTK+ and rebaseline a test with
+        the same expected result than on GTK+.
+
+        * platform/wpe/TestExpectations:
+        * platform/wpe/fast/events/focus-label-legend-elements-with-tab-expected.txt: Added.
+
 2017-08-23  Ms2ger  <Ms2ger@igalia.com>
 
         [GTK] Remove some flaky annotations for passing tests.
index 00518a0..0033470 100644 (file)
@@ -461,7 +461,6 @@ fast/events/wheelevent-direction-inverted-from-device.html
 # The tests below need gardening after the EventSenderWPE has been added.
 # Most of them are probably failing because of missing support of event related
 # features in WPE.
-webkit.org/b/173419 fast/events/autoscroll-in-overflow-hidden-html.html [ Failure ]
 webkit.org/b/173419 fast/events/autoscroll-in-textarea.html [ Failure ]
 webkit.org/b/173419 fast/events/autoscroll-in-textfield.html [ Failure ]
 webkit.org/b/173419 fast/events/autoscroll-nonscrollable-iframe-in-scrollable-div.html [ Failure ]
@@ -483,22 +482,15 @@ webkit.org/b/173419 fast/events/input-events-insert-by-drop.html [ Failure ]
 webkit.org/b/173419 fast/events/input-events-paste-data.html [ Failure ]
 webkit.org/b/173419 fast/events/input-events-paste-rich-datatransfer.html [ Failure ]
 webkit.org/b/173419 fast/events/js-keyboard-event-creation.html [ Failure ]
-webkit.org/b/173419 fast/events/keydown-1.html [ Failure ]
 webkit.org/b/173419 fast/events/keydown-numpad-keys.html [ Failure ]
 webkit.org/b/173419 fast/events/mouse-cursor-image-set.html [ Failure ]
-webkit.org/b/173419 fast/events/mouse-drag-from-frame-to-other-frame.html [ Failure ]
-webkit.org/b/173419 fast/events/mouse-drag-from-frame.html [ Failure ]
-webkit.org/b/173419 fast/events/mouseenterleave-on-subframe.html [ Failure ]
 webkit.org/b/173419 fast/events/mouseover-button.html [ Failure ]
-webkit.org/b/173419 fast/events/mouseover-mouseout.html [ Failure ]
-webkit.org/b/173419 fast/events/mouseover-mouseout2.html [ Failure ]
 webkit.org/b/173419 fast/events/mouseup-from-button2.html [ Failure ]
 webkit.org/b/173419 fast/events/no-scroll-on-input-text-selection.html [ Failure ]
 webkit.org/b/173419 fast/events/node-event-anchor-lock.html [ Failure ]
 webkit.org/b/173419 fast/events/offsetX-offsetY.html [ Failure ]
 webkit.org/b/173419 fast/events/onchange-range-slider.html [ Failure ]
 webkit.org/b/173419 fast/events/option-tab.html [ Failure ]
-webkit.org/b/173419 fast/events/page-scaled-mouse-click-iframe.html [ Failure ]
 webkit.org/b/173419 fast/events/platform-wheelevent-in-scrolling-div.html [ Failure ]
 webkit.org/b/173419 fast/events/platform-wheelevent-paging-x-in-non-scrolling-div.html [ Failure ]
 webkit.org/b/173419 fast/events/platform-wheelevent-paging-x-in-non-scrolling-page.html [ Failure ]
@@ -532,32 +524,27 @@ webkit.org/b/173419 fast/events/autoscroll-main-document.html [ Timeout ]
 webkit.org/b/173419 fast/events/autoscroll-should-not-stop-on-keypress.html [ Timeout ]
 webkit.org/b/173419 fast/events/autoscroll-when-zoomed.html [ Timeout ]
 webkit.org/b/173419 fast/events/before-input-prevent-insert-replacement.html [ Timeout ]
-webkit.org/b/173419 fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html [ Timeout ]
 webkit.org/b/173419 fast/events/clipboard-dataTransferItemList.html [ Timeout ]
 webkit.org/b/173419 fast/events/drag-dataTransferItemList.html [ Timeout ]
 webkit.org/b/173419 fast/events/event-view-toString.html [ Timeout ]
-webkit.org/b/173419 fast/events/frame-detached-in-mousedown.html [ Timeout ]
-webkit.org/b/173419 fast/events/iframe-onmousemove.html [ Timeout ]
 webkit.org/b/173419 fast/events/input-event-insert-replacement.html [ Timeout ]
 webkit.org/b/173419 fast/events/mouse-force-changed.html [ Timeout ]
 webkit.org/b/173419 fast/events/mouse-force-down.html [ Timeout ]
 webkit.org/b/173419 fast/events/mouse-force-up.html [ Timeout ]
-webkit.org/b/173419 fast/events/mouse-moved-remove-frame-crash.html [ Timeout ]
 webkit.org/b/173419 fast/events/page-visibility-iframe-delete-test.html [ Timeout ]
 webkit.org/b/173419 fast/events/page-visibility-iframe-move-test.html [ Timeout ]
 webkit.org/b/173419 fast/events/page-visibility-iframe-propagation-test.html [ Timeout ]
 webkit.org/b/173419 fast/events/page-visibility-onvisibilitychange.html [ Timeout ]
 webkit.org/b/173419 fast/events/page-visibility-transition-test.html [ Timeout ]
-webkit.org/b/173419 fast/events/popup-blocking-click-in-iframe.html [ Timeout ]
 webkit.org/b/173419 fast/events/scroll-after-click-on-tab-index.html [ Timeout ]
 webkit.org/b/173419 fast/events/standalone-image-drag-to-editable.html [ Timeout ]
-webkit.org/b/173419 fast/events/touch/emulated-touch-iframe.html [ Timeout ]
 webkit.org/b/173419 fast/events/touch/multi-touch-grouped-targets.html [ Timeout ]
 webkit.org/b/173419 fast/events/touch/multi-touch-inside-nested-iframes.html [ Timeout ]
 webkit.org/b/173419 fast/events/touch/page-scaled-touch-gesture-click.html [ Timeout ]
 webkit.org/b/173419 fast/events/touch/touch-target-limited.html [ Timeout ]
 webkit.org/b/173419 fast/events/touch/touch-target.html [ Timeout ]
-webkit.org/b/173419 fast/events/wheel-event-destroys-frame.html [ Timeout ]
+
+webkit.org/b/173411 fast/events/touch/frame-hover-update.html [ Failure ]
 
 fast/events/ios [ Skip ]
 fast/events/touch/ios [ Skip ]
diff --git a/LayoutTests/platform/wpe/fast/events/focus-label-legend-elements-with-tab-expected.txt b/LayoutTests/platform/wpe/fast/events/focus-label-legend-elements-with-tab-expected.txt
new file mode 100644 (file)
index 0000000..feb365d
--- /dev/null
@@ -0,0 +1,19 @@
+Tests for moving focus by pressing tab key across label and legend elements.
+To manually test, press tab key seven times then shift+tab six times.
+It should traverse focusable elements in the ascending order from 1 to 7 and then in the descending order back to 1.
+
+
+1. An input element inside a non-focusable label element
+2. A label element with an input element
+3. An input elment inside a focusable label element
+4. A label element with just text
+5. A fieldset element with tabindex
+6. A focusable legend element inside a fieldset element
+7. An input element inside a fieldset element
+6. A focusable legend element inside a fieldset element
+5. A fieldset element with tabindex
+4. A label element with just text
+3. An input elment inside a focusable label element
+2. A label element with an input element
+1. An input element inside a non-focusable label element
+
index 3e67db2..d3fa4d7 100644 (file)
@@ -1,3 +1,20 @@
+2017-08-23  Carlos Alberto Lopez Perez  <clopez@igalia.com>
+
+        [WPE] Some event handlers not working.
+        https://bugs.webkit.org/show_bug.cgi?id=175864
+
+        Reviewed by Michael Catanzaro.
+
+        Share the EventHandler implementation with the GTK port and add ifdefs where needed.
+
+        Covered by existing tests.
+
+        * PlatformGTK.cmake:
+        * PlatformWPE.cmake:
+        * page/wpe/EventHandlerWPE.cpp: Removed.
+        * platform/glib/EventHandlerGlib.cpp: Renamed from Source/WebCore/page/gtk/EventHandlerGtk.cpp.
+        (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal const):
+
 2017-08-22  Tim Horton  <timothy_horton@apple.com>
 
         _WKThumbnailView should use the screen color space instead of sRGB
index 12b4506..652ba95 100644 (file)
@@ -145,7 +145,8 @@ list(APPEND WebCorePlatformGTK_SOURCES
     editing/gtk/EditorGtk.cpp
 
     page/gtk/DragControllerGtk.cpp
-    page/gtk/EventHandlerGtk.cpp
+
+    platform/glib/EventHandlerGlib.cpp
 
     platform/graphics/PlatformDisplay.cpp
 
index a6b0567..ed24e20 100644 (file)
@@ -132,7 +132,7 @@ list(APPEND WebCore_SOURCES
 list(APPEND WebCorePlatformWPE_SOURCES
     editing/wpe/EditorWPE.cpp
 
-    page/wpe/EventHandlerWPE.cpp
+    platform/glib/EventHandlerGlib.cpp
 
     platform/graphics/egl/GLContextEGLWPE.cpp
 
diff --git a/Source/WebCore/page/wpe/EventHandlerWPE.cpp b/Source/WebCore/page/wpe/EventHandlerWPE.cpp
deleted file mode 100644 (file)
index e14e0fe..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 2014 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "EventHandler.h"
-
-#include "FocusController.h"
-#include "Frame.h"
-#include "NotImplemented.h"
-#include "Page.h"
-
-namespace WebCore {
-
-bool EventHandler::tabsToAllFormControls(KeyboardEvent&) const
-{
-    notImplemented();
-    return false;
-}
-
-void EventHandler::focusDocumentView()
-{
-    if (Page* page = m_frame.page())
-        page->focusController().setFocusedFrame(&m_frame);
-}
-
-bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults&)
-{
-    notImplemented();
-    return false;
-}
-
-bool EventHandler::passWidgetMouseDownEventToWidget(RenderWidget*)
-{
-    notImplemented();
-    return false;
-}
-
-bool EventHandler::passMouseDownEventToWidget(Widget*)
-{
-    notImplemented();
-    return false;
-}
-
-bool EventHandler::eventActivatedView(const PlatformMouseEvent&) const
-{
-    notImplemented();
-    return false;
-}
-
-bool EventHandler::widgetDidHandleWheelEvent(const PlatformWheelEvent&, Widget&)
-{
-    notImplemented();
-    return false;
-}
-
-bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults&, Frame*)
-{
-    notImplemented();
-    return false;
-}
-
-bool EventHandler::passMouseMoveEventToSubframe(MouseEventWithHitTestResults&, Frame*, HitTestResult*)
-{
-    notImplemented();
-    return false;
-}
-
-bool EventHandler::passMouseReleaseEventToSubframe(MouseEventWithHitTestResults&, Frame*)
-{
-    notImplemented();
-    return false;
-}
-
-OptionSet<PlatformEvent::Modifier> EventHandler::accessKeyModifiers()
-{
-    notImplemented();
-    return PlatformEvent::Modifier::AltKey;
-}
-
-bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&, const PlatformWheelEvent&) const
-{
-    notImplemented();
-    return false;
-}
-
-}
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2006 Zack Rusin <zack@kde.org>
+ * Copyright (C) 2014-2017 Igalia S.L.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,8 +27,6 @@
 #include "config.h"
 #include "EventHandler.h"
 
-#include "DataTransfer.h"
-#include "FloatPoint.h"
 #include "FocusController.h"
 #include "Frame.h"
 #include "FrameView.h"
 #include "PlatformKeyboardEvent.h"
 #include "PlatformWheelEvent.h"
 #include "RenderWidget.h"
+
+#if ENABLE(DRAG_SUPPORT)
+#include "DataTransfer.h"
+#endif
+
+#if PLATFORM(GTK)
 #include "Scrollbar.h"
+#endif
 
 namespace WebCore {
 
@@ -80,8 +86,8 @@ bool EventHandler::passMouseDownEventToWidget(Widget*)
 
 bool EventHandler::eventActivatedView(const PlatformMouseEvent&) const
 {
-    //GTK+ activation is not necessarily tied to mouse events, so it may
-    //not make sense to implement this
+    // GTK+ activation is not necessarily tied to mouse events, so it may
+    // not make sense to implement this
 
     notImplemented();
     return false;
@@ -133,11 +139,18 @@ OptionSet<PlatformEvent::Modifier> EventHandler::accessKeyModifiers()
 // for styled scrollbars.
 bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult& result, const PlatformWheelEvent& event) const
 {
+#if PLATFORM(GTK)
     FrameView* view = m_frame.view();
     Scrollbar* scrollbar = view ? view->scrollbarAtPoint(event.position()) : nullptr;
     if (!scrollbar)
         scrollbar = result.scrollbar();
     return scrollbar && scrollbar->orientation() == HorizontalScrollbar;
+#else
+    UNUSED_PARAM(result);
+    UNUSED_PARAM(event);
+    notImplemented();
+    return false;
+#endif
 }
 
 }