Skip to content
Permalink
Browse files
[WPE] Implement EventSenderProxy in WTR
https://bugs.webkit.org/show_bug.cgi?id=173419

Reviewed by Žan Doberšek.

Add the implementation of EventSenderProxy to the WTR. This
allows us to extend the coverage of the test suite in WKWPE.

.:

* Source/cmake/FindLibxkbcommon.cmake: Added.

Tools:

* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/PlatformWPE.cmake: Add dependency on
libxkbcommon needed to deal with key events.
* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
(WTR::EventSenderProxy::EventSenderProxy):
(WTR::senderButtonToWPEButton):
(WTR::EventSenderProxy::mouseDown):
(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):
(WTR::EventSenderProxy::mouseScrollBy):
(WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases):
(WTR::EventSenderProxy::leapForward):
(WTR::wkEventModifiersToWPE):
(WTR::getXKBKeySymForKeyRef):
(WTR::EventSenderProxy::keyDown):
(WTR::EventSenderProxy::addTouchPoint):
(WTR::EventSenderProxy::updateTouchPoint):
(WTR::EventSenderProxy::setTouchModifier):
(WTR::EventSenderProxy::setTouchPointRadius):
(WTR::EventSenderProxy::getUpdatedTouchEvents):
(WTR::EventSenderProxy::removeUpdatedTouchEvents):
(WTR::EventSenderProxy::prepareAndDispatchTouchEvent):
(WTR::EventSenderProxy::touchStart):
(WTR::EventSenderProxy::touchMove):
(WTR::EventSenderProxy::touchEnd):
(WTR::EventSenderProxy::touchCancel):
(WTR::EventSenderProxy::clearTouchPoints):
(WTR::EventSenderProxy::releaseTouchPoint):
(WTR::EventSenderProxy::cancelTouchPoint):

LayoutTests:

* platform/wpe/TestExpectations: Unskip fast/events tests, marking failures
that are related to features not yet implemented in WPE. Also remove other
tests that are now passing thanks to having event injection.
* platform/wpe/fast/dom/HTMLTableColElement/resize-table-using-col-width-expected.txt: Update.
* platform/wpe/fast/dynamic/layer-hit-test-crash-expected.txt: Update.
* platform/wpe/fast/events/clientXY-in-zoom-and-scroll-expected.txt: Added.
* platform/wpe/ietestcenter/css3/bordersbackgrounds/background-attachment-local-scrolling-expected.txt: Update.


Canonical link: https://commits.webkit.org/191729@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
csaavedra committed Jul 28, 2017
1 parent 3d32c9e commit 23e62bed0b54ff197067f0dd469c460292993e8f
Showing 12 changed files with 671 additions and 39 deletions.
@@ -1,3 +1,15 @@
2017-07-28 Claudio Saavedra <csaavedra@igalia.com>

[WPE] Implement EventSenderProxy in WTR
https://bugs.webkit.org/show_bug.cgi?id=173419

Reviewed by Žan Doberšek.

Add the implementation of EventSenderProxy to the WTR. This
allows us to extend the coverage of the test suite in WKWPE.

* Source/cmake/FindLibxkbcommon.cmake: Added.

2017-07-28 Zan Dobersek <zdobersek@igalia.com>

Unreviewed. Bumping the patch version for WPEWebKit library to 20170728.
@@ -1,3 +1,21 @@
2017-07-28 Claudio Saavedra <csaavedra@igalia.com>

[WPE] Implement EventSenderProxy in WTR
https://bugs.webkit.org/show_bug.cgi?id=173419

Reviewed by Žan Doberšek.

Add the implementation of EventSenderProxy to the WTR. This
allows us to extend the coverage of the test suite in WKWPE.

* platform/wpe/TestExpectations: Unskip fast/events tests, marking failures
that are related to features not yet implemented in WPE. Also remove other
tests that are now passing thanks to having event injection.
* platform/wpe/fast/dom/HTMLTableColElement/resize-table-using-col-width-expected.txt: Update.
* platform/wpe/fast/dynamic/layer-hit-test-crash-expected.txt: Update.
* platform/wpe/fast/events/clientXY-in-zoom-and-scroll-expected.txt: Added.
* platform/wpe/ietestcenter/css3/bordersbackgrounds/background-attachment-local-scrolling-expected.txt: Update.

2017-07-27 Oleksandr Skachkov <gskachkov@gmail.com>

[ES] Add support finally to Promise

Large diffs are not rendered by default.

@@ -3,30 +3,30 @@ layer 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
RenderTable {TABLE} at (0,0) size 238x50 [border: (1px outset #808080)]
RenderTable {TABLE} at (0,0) size 662x50 [border: (1px outset #808080)]
RenderTableCol {COLGROUP} at (0,0) size 0x0
RenderTableCol {COL} at (0,0) size 0x0
RenderTableCol {COL} at (0,0) size 0x0
RenderTableCol {COL} at (0,0) size 0x0
RenderTableSection {TBODY} at (1,1) size 236x48
RenderTableRow {TR} at (0,2) size 236x21
RenderTableCell {TD} at (2,2) size 76x21 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderTableSection {TBODY} at (1,1) size 660x48
RenderTableRow {TR} at (0,2) size 660x21
RenderTableCell {TD} at (2,2) size 500x21 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderText {#text} at (2,2) size 72x17
text run at (2,2) width 72: "col 1 row 1"
RenderTableCell {TD} at (80,2) size 76x21 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderTableCell {TD} at (504,2) size 76x21 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderText {#text} at (2,2) size 72x17
text run at (2,2) width 72: "col 2 row 1"
RenderTableCell {TD} at (158,2) size 76x21 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
RenderTableCell {TD} at (582,2) size 76x21 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
RenderText {#text} at (2,2) size 72x17
text run at (2,2) width 72: "col 3 row 1"
RenderTableRow {TR} at (0,25) size 236x21
RenderTableCell {TD} at (2,25) size 76x21 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
RenderTableRow {TR} at (0,25) size 660x21
RenderTableCell {TD} at (2,25) size 500x21 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
RenderText {#text} at (2,2) size 72x17
text run at (2,2) width 72: "col 1 row 2"
RenderTableCell {TD} at (80,25) size 76x21 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
RenderTableCell {TD} at (504,25) size 76x21 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
RenderText {#text} at (2,2) size 72x17
text run at (2,2) width 72: "col 2 row 2"
RenderTableCell {TD} at (158,25) size 76x21 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
RenderTableCell {TD} at (582,25) size 76x21 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
RenderText {#text} at (2,2) size 72x17
text run at (2,2) width 72: "col 3 row 3"
RenderBlock (anonymous) at (0,50) size 784x30
@@ -15,3 +15,4 @@ layer at (50,50) size 200x200
RenderBlock (positioned) zI: 1 {DIV} at (50,50) size 200x200 [bgcolor=#FFFF00]
layer at (70,50) size 100x100
RenderBlock (positioned) zI: 5 {DIV} at (20,0) size 100x100 [bgcolor=#FF0000]
caret: position 0 of child 1 {DIV} of child 3 {DIV} of body
@@ -0,0 +1,27 @@
Base
PASS event.clientX is 100
PASS event.clientY is 100
PASS event.pageX is 100
PASS event.pageY is 100

Just zoomed
PASS event.clientX is 83
PASS event.clientY is 83
PASS event.pageX is 83
PASS event.pageY is 83

Just scrolled
PASS event.clientX is 100
PASS event.clientY is 100
PASS event.pageX is 150
PASS event.pageY is 150

Zoomed and scrolled
PASS event.clientX is 83
PASS event.clientY is 83
PASS event.pageX is 133
PASS event.pageY is 133
PASS successfullyParsed is true

TEST COMPLETE

@@ -8,7 +8,7 @@ layer at (0,0) size 800x366
text run at (0,0) width 755: "Test passes if the images of all the cats scroll when the box is scrolled. (Presence of cats behind the double border is UA"
text run at (0,17) width 74: "dependent)."
RenderBlock {DIV} at (0,342) size 784x0
layer at (8,66) size 292x292 clip at (58,116) size 177x177 scrollHeight 272
layer at (8,66) size 292x292 clip at (58,116) size 177x177 scrollY 95 scrollHeight 272
RenderBlock {DIV} at (0,50) size 292x292 [border: (50px double #000000)]
RenderText {#text} at (50,50) size 173x272
text run at (50,50) width 140: "Filler Text Filler Text "
@@ -0,0 +1,35 @@
# - Try to find libxkbcommon.
# Once done, this will define
#
# LIBXKBCOMMON_FOUND - system has libxkbcommon.
# LIBXKBCOMMON_INCLUDE_DIRS - the libxkbcommon include directories
# LIBXKBCOMMON_LIBRARIES - link these to use libxkbcommon.
#
# 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 THE COPYRIGHT HOLDER 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 THE COPYRIGHT HOLDER 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.

find_package(PkgConfig)
pkg_check_modules(LIBXKBCOMMON xkbcommon)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBXKBCOMMON DEFAULT_MSG LIBXKBCOMMON_FOUND)
@@ -1,3 +1,43 @@
2017-07-28 Claudio Saavedra <csaavedra@igalia.com>

[WPE] Implement EventSenderProxy in WTR
https://bugs.webkit.org/show_bug.cgi?id=173419

Reviewed by Žan Doberšek.

Add the implementation of EventSenderProxy to the WTR. This
allows us to extend the coverage of the test suite in WKWPE.

* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/PlatformWPE.cmake: Add dependency on
libxkbcommon needed to deal with key events.
* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
(WTR::EventSenderProxy::EventSenderProxy):
(WTR::senderButtonToWPEButton):
(WTR::EventSenderProxy::mouseDown):
(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):
(WTR::EventSenderProxy::mouseScrollBy):
(WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases):
(WTR::EventSenderProxy::leapForward):
(WTR::wkEventModifiersToWPE):
(WTR::getXKBKeySymForKeyRef):
(WTR::EventSenderProxy::keyDown):
(WTR::EventSenderProxy::addTouchPoint):
(WTR::EventSenderProxy::updateTouchPoint):
(WTR::EventSenderProxy::setTouchModifier):
(WTR::EventSenderProxy::setTouchPointRadius):
(WTR::EventSenderProxy::getUpdatedTouchEvents):
(WTR::EventSenderProxy::removeUpdatedTouchEvents):
(WTR::EventSenderProxy::prepareAndDispatchTouchEvent):
(WTR::EventSenderProxy::touchStart):
(WTR::EventSenderProxy::touchMove):
(WTR::EventSenderProxy::touchEnd):
(WTR::EventSenderProxy::touchCancel):
(WTR::EventSenderProxy::clearTouchPoints):
(WTR::EventSenderProxy::releaseTouchPoint):
(WTR::EventSenderProxy::cancelTouchPoint):

2017-07-27 Brady Eidson <beidson@apple.com>

Part 2 of: Rename DatabaseProcess to StorageProcess.
@@ -38,6 +38,11 @@
#include <wtf/HashSet.h>
#endif

#if PLATFORM(WPE)
#include <wpe/input.h>
#include <wtf/HashSet.h>
#endif

#if PLATFORM(COCOA)
OBJC_CLASS NSEvent;
#endif
@@ -114,6 +119,12 @@ class EventSenderProxy {
void sendUpdatedTouchEvents();
#endif

#if PLATFORM(WPE)
Vector<struct wpe_input_touch_event_raw> getUpdatedTouchEvents();
void removeUpdatedTouchEvents();
void prepareAndDispatchTouchEvent(enum wpe_input_touch_event_type);
#endif

double m_time;
WKPoint m_position;
bool m_leftMouseButtonDown;
@@ -128,6 +139,11 @@ class EventSenderProxy {
unsigned m_mouseButtonCurrentlyDown;
Vector<GUniquePtr<GdkEvent>> m_touchEvents;
HashSet<int> m_updatedTouchEvents;
#elif PLATFORM(WPE)
struct wpe_view_backend* m_viewBackend;
uint32_t m_buttonState;
Vector<struct wpe_input_touch_event_raw> m_touchEvents;
HashSet<unsigned, DefaultHash<unsigned>::Hash, WTF::UnsignedWithZeroKeyHashTraits<unsigned>> m_updatedTouchEvents;
#endif
};

@@ -1,5 +1,6 @@
find_package(LibGBM REQUIRED)
find_package(WPEBackend-mesa REQUIRED)
find_package(Libxkbcommon 0.4.0 REQUIRED)

add_custom_target(WebKitTestRunner-forwarding-headers
COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WEBKIT_TESTRUNNER_DIR} --output ${FORWARDING_HEADERS_DIR} --platform wpe
@@ -23,13 +24,15 @@ list(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
${CAIRO_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
${LIBGBM_INCLUDE_DIRS}
${LIBXKBCOMMON_INCLUDE_DIRS}
${WPE_MESA_INCLUDE_DIRS}
)

list(APPEND WebKitTestRunner_LIBRARIES
${CAIRO_LIBRARIES}
${GLIB_LIBRARIES}
${LIBGBM_LIBRARIES}
${LIBXKBCOMMON_LIBRARIES}
${WPE_MESA_LIBRARIES}
)

0 comments on commit 23e62be

Please sign in to comment.