Changeset 196256 in webkit


Ignore:
Timestamp:
Feb 8, 2016 10:28:39 AM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r196253.
https://bugs.webkit.org/show_bug.cgi?id=153990

Caused several crashes in GTK+ bots (Requested by KaL on
#webkit).

Reverted changeset:

"[GTK] WebKitWebView should send crossing events to the
WebProcess"
https://bugs.webkit.org/show_bug.cgi?id=153740
http://trac.webkit.org/changeset/196253

Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r196254 r196256  
     12016-02-08  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r196253.
     4        https://bugs.webkit.org/show_bug.cgi?id=153990
     5
     6        Caused several crashes in GTK+ bots (Requested by KaL on
     7        #webkit).
     8
     9        Reverted changeset:
     10
     11        "[GTK] WebKitWebView should send crossing events to the
     12        WebProcess"
     13        https://bugs.webkit.org/show_bug.cgi?id=153740
     14        http://trac.webkit.org/changeset/196253
     15
    1162016-02-08  Jeremy Jones  <jeremyj@apple.com>
    217
  • trunk/Source/WebCore/page/EventHandler.cpp

    r196253 r196256  
    18831883            scrollbar->mouseMoved(platformMouseEvent); // Handle hover effects on platforms that support visual feedback on scrollbar hovering.
    18841884#endif
    1885         if (onlyUpdateScrollbars) {
    1886             updateMouseEventTargetNode(mouseEvent.targetNode(), platformMouseEvent, true);
     1885        if (onlyUpdateScrollbars)
    18871886            return true;
    1888         }
    18891887    }
    18901888
  • trunk/Source/WebKit2/ChangeLog

    r196253 r196256  
     12016-02-08  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r196253.
     4        https://bugs.webkit.org/show_bug.cgi?id=153990
     5
     6        Caused several crashes in GTK+ bots (Requested by KaL on
     7        #webkit).
     8
     9        Reverted changeset:
     10
     11        "[GTK] WebKitWebView should send crossing events to the
     12        WebProcess"
     13        https://bugs.webkit.org/show_bug.cgi?id=153740
     14        http://trac.webkit.org/changeset/196253
     15
    1162016-02-08  Carlos Garcia Campos  <cgarcia@igalia.com>
    217
  • trunk/Source/WebKit2/Shared/gtk/WebEventFactory.cpp

    r196253 r196256  
    7373
    7474    switch (event->type) {
    75     case GDK_ENTER_NOTIFY:
    76     case GDK_LEAVE_NOTIFY:
    77     case GDK_MOTION_NOTIFY: {
     75    case GDK_MOTION_NOTIFY:
    7876        button = WebMouseEvent::NoButton;
    79         GdkModifierType state;
    80         gdk_event_get_state(event, &state);
    81         if (state & GDK_BUTTON1_MASK)
     77        if (event->motion.state & GDK_BUTTON1_MASK)
    8278            button = WebMouseEvent::LeftButton;
    83         else if (state & GDK_BUTTON2_MASK)
     79        else if (event->motion.state & GDK_BUTTON2_MASK)
    8480            button = WebMouseEvent::MiddleButton;
    85         else if (state & GDK_BUTTON3_MASK)
     81        else if (event->motion.state & GDK_BUTTON3_MASK)
    8682            button = WebMouseEvent::RightButton;
    8783        break;
    88     }
    8984    case GDK_BUTTON_PRESS:
    9085    case GDK_2BUTTON_PRESS:
     
    114109    switch (event->type) {
    115110    case GDK_MOTION_NOTIFY:
    116     case GDK_ENTER_NOTIFY:
    117     case GDK_LEAVE_NOTIFY:
    118111        type = WebEvent::MouseMove;
    119112        break;
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp

    r196253 r196256  
    359359        | GDK_SMOOTH_SCROLL_MASK
    360360        | GDK_POINTER_MOTION_MASK
    361         | GDK_ENTER_NOTIFY_MASK
    362         | GDK_LEAVE_NOTIFY_MASK
    363361        | GDK_KEY_PRESS_MASK
    364362        | GDK_KEY_RELEASE_MASK
     
    833831
    834832    priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(reinterpret_cast<GdkEvent*>(event), 0 /* currentClickCount */));
    835 
    836     return FALSE;
    837 }
    838 
    839 static gboolean webkitWebViewBaseCrossingNotifyEvent(GtkWidget* widget, GdkEventCrossing* crosssingEvent)
    840 {
    841     WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
    842     WebKitWebViewBasePrivate* priv = webViewBase->priv;
    843 
    844     if (priv->authenticationDialog)
    845         return FALSE;
    846 
    847     // In the case of crossing events, it's very important the actual coordinates the WebProcess receives, because once the mouse leaves
    848     // the web view, the WebProcess won't receive more events until the mouse enters again in the web view. So, if the coordinates of the leave
    849     // event are not accurate, the WebProcess might not know the mouse left the view. This can happen because of double to integer conversion,
    850     // if the coordinates of the leave event are for example (25.2, -0.9), the WebProcess will receive (25, 0) and any hit test will succeed
    851     // because those coordinates are inside the web view.
    852     GtkAllocation allocation;
    853     gtk_widget_get_allocation(widget, &allocation);
    854     double width = allocation.width;
    855     double height = allocation.height;
    856     double x = crosssingEvent->x;
    857     double y = crosssingEvent->y;
    858     if (x < 0 && x > -1)
    859         x = -1;
    860     else if (x >= width && x < width + 1)
    861         x = width + 1;
    862     if (y < 0 && y > -1)
    863         y = -1;
    864     else if (y >= height && y < height + 1)
    865         y = height + 1;
    866 
    867     GdkEvent* event = reinterpret_cast<GdkEvent*>(crosssingEvent);
    868     GUniquePtr<GdkEvent> copiedEvent;
    869     if (x != crosssingEvent->x || y != crosssingEvent->y) {
    870         copiedEvent.reset(gdk_event_copy(event));
    871         copiedEvent->crossing.x = x;
    872         copiedEvent->crossing.y = y;
    873     }
    874 
    875     priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(copiedEvent ? copiedEvent.get() : event, 0 /* currentClickCount */));
    876833
    877834    return FALSE;
     
    11221079    widgetClass->scroll_event = webkitWebViewBaseScrollEvent;
    11231080    widgetClass->motion_notify_event = webkitWebViewBaseMotionNotifyEvent;
    1124     widgetClass->enter_notify_event = webkitWebViewBaseCrossingNotifyEvent;
    1125     widgetClass->leave_notify_event = webkitWebViewBaseCrossingNotifyEvent;
    11261081#if ENABLE(TOUCH_EVENTS)
    11271082    widgetClass->touch_event = webkitWebViewBaseTouchEvent;
Note: See TracChangeset for help on using the changeset viewer.