Changeset 227519 in webkit


Ignore:
Timestamp:
Jan 24, 2018 7:25:14 AM (6 years ago)
Author:
Michael Catanzaro
Message:

[GTK] Use GDK_EVENT_PROPAGATE and GDK_EVENT_STOP in WebKitWebViewBase.cpp
https://bugs.webkit.org/show_bug.cgi?id=182031

Reviewed by Carlos Garcia Campos.

No functional changes, this just replaces TRUE with GDK_EVENT_STOP and FALSE with
GDK_EVENT_PROPAGATE, to improve readability.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseKeyPressEvent):
(webkitWebViewBaseKeyReleaseEvent):
(webkitWebViewBaseButtonPressEvent):
(webkitWebViewBaseButtonReleaseEvent):
(webkitWebViewBaseScrollEvent):
(webkitWebViewBaseMotionNotifyEvent):
(webkitWebViewBaseCrossingNotifyEvent):
(webkitWebViewBaseTouchEvent):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r227457 r227519  
     12018-01-24  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        [GTK] Use GDK_EVENT_PROPAGATE and GDK_EVENT_STOP in WebKitWebViewBase.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=182031
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        No functional changes, this just replaces TRUE with GDK_EVENT_STOP and FALSE with
     9        GDK_EVENT_PROPAGATE, to improve readability.
     10
     11        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
     12        (webkitWebViewBaseKeyPressEvent):
     13        (webkitWebViewBaseKeyReleaseEvent):
     14        (webkitWebViewBaseButtonPressEvent):
     15        (webkitWebViewBaseButtonReleaseEvent):
     16        (webkitWebViewBaseScrollEvent):
     17        (webkitWebViewBaseMotionNotifyEvent):
     18        (webkitWebViewBaseCrossingNotifyEvent):
     19        (webkitWebViewBaseTouchEvent):
     20
    1212018-01-23  Eric Carlson  <eric.carlson@apple.com>
    222
  • trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp

    r225477 r227519  
    682682        preferences.setResourceUsageOverlayVisible(!preferences.resourceUsageOverlayVisible());
    683683        priv->shouldForwardNextKeyEvent = FALSE;
    684         return TRUE;
     684        return GDK_EVENT_STOP;
    685685    }
    686686#endif
     
    696696        case GDK_KEY_F:
    697697            priv->pageProxy->fullScreenManager()->requestExitFullScreen();
    698             return TRUE;
     698            return GDK_EVENT_STOP;
    699699        default:
    700700            break;
     
    719719    });
    720720
    721     return TRUE;
     721    return GDK_EVENT_STOP;
    722722}
    723723
     
    738738    });
    739739
    740     return TRUE;
     740    return GDK_EVENT_STOP;
    741741}
    742742
     
    747747
    748748    if (priv->authenticationDialog)
    749         return TRUE;
     749        return GDK_EVENT_STOP;
    750750
    751751    gtk_widget_grab_focus(widget);
     
    760760    GUniquePtr<GdkEvent> nextEvent(gdk_event_peek());
    761761    if (nextEvent && (nextEvent->any.type == GDK_2BUTTON_PRESS || nextEvent->any.type == GDK_3BUTTON_PRESS))
    762         return TRUE;
     762        return GDK_EVENT_STOP;
    763763
    764764    // If it's a right click event save it as a possible context menu event.
     
    768768    priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(reinterpret_cast<GdkEvent*>(buttonEvent),
    769769        priv->clickCounter.currentClickCountForGdkButtonEvent(buttonEvent)));
    770     return TRUE;
     770    return GDK_EVENT_STOP;
    771771}
    772772
     
    777777
    778778    if (priv->authenticationDialog)
    779         return TRUE;
     779        return GDK_EVENT_STOP;
    780780
    781781    gtk_widget_grab_focus(widget);
    782782    priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(reinterpret_cast<GdkEvent*>(event), 0 /* currentClickCount */));
    783783
    784     return TRUE;
     784    return GDK_EVENT_STOP;
    785785}
    786786
     
    791791
    792792    if (std::exchange(priv->shouldForwardNextWheelEvent, false))
    793         return FALSE;
     793        return GDK_EVENT_PROPAGATE;
    794794
    795795    if (priv->authenticationDialog)
    796         return FALSE;
     796        return GDK_EVENT_PROPAGATE;
    797797
    798798    priv->pageProxy->handleWheelEvent(NativeWebWheelEvent(reinterpret_cast<GdkEvent*>(event)));
    799799
    800     return TRUE;
     800    return GDK_EVENT_STOP;
    801801}
    802802
     
    822822    if (priv->authenticationDialog) {
    823823        auto* widgetClass = GTK_WIDGET_CLASS(webkit_web_view_base_parent_class);
    824         return widgetClass->motion_notify_event ? widgetClass->motion_notify_event(widget, event) : FALSE;
     824        return widgetClass->motion_notify_event ? widgetClass->motion_notify_event(widget, event) : GDK_EVENT_PROPAGATE;
    825825    }
    826826
    827827    priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(reinterpret_cast<GdkEvent*>(event), 0 /* currentClickCount */));
    828828
    829     return FALSE;
     829    return GDK_EVENT_PROPAGATE;
    830830}
    831831
     
    836836
    837837    if (priv->authenticationDialog)
    838         return FALSE;
     838        return GDK_EVENT_PROPAGATE;
    839839
    840840    // In the case of crossing events, it's very important the actual coordinates the WebProcess receives, because once the mouse leaves
     
    868868    priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(copiedEvent ? copiedEvent.get() : event, 0 /* currentClickCount */));
    869869
    870     return FALSE;
     870    return GDK_EVENT_PROPAGATE;
    871871}
    872872
     
    920920
    921921    if (priv->authenticationDialog)
    922         return TRUE;
     922        return GDK_EVENT_STOP;
    923923
    924924    GdkEvent* touchEvent = reinterpret_cast<GdkEvent*>(event);
     
    950950    priv->pageProxy->handleTouchEvent(NativeWebTouchEvent(reinterpret_cast<GdkEvent*>(event), WTFMove(touchPoints)));
    951951
    952     return TRUE;
     952    return GDK_EVENT_STOP;
    953953}
    954954#endif // ENABLE(TOUCH_EVENTS)
Note: See TracChangeset for help on using the changeset viewer.