Changeset 227519 in webkit
- Timestamp:
- Jan 24, 2018 7:25:14 AM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r227457 r227519 1 2018-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 1 21 2018-01-23 Eric Carlson <eric.carlson@apple.com> 2 22 -
trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
r225477 r227519 682 682 preferences.setResourceUsageOverlayVisible(!preferences.resourceUsageOverlayVisible()); 683 683 priv->shouldForwardNextKeyEvent = FALSE; 684 return TRUE;684 return GDK_EVENT_STOP; 685 685 } 686 686 #endif … … 696 696 case GDK_KEY_F: 697 697 priv->pageProxy->fullScreenManager()->requestExitFullScreen(); 698 return TRUE;698 return GDK_EVENT_STOP; 699 699 default: 700 700 break; … … 719 719 }); 720 720 721 return TRUE;721 return GDK_EVENT_STOP; 722 722 } 723 723 … … 738 738 }); 739 739 740 return TRUE;740 return GDK_EVENT_STOP; 741 741 } 742 742 … … 747 747 748 748 if (priv->authenticationDialog) 749 return TRUE;749 return GDK_EVENT_STOP; 750 750 751 751 gtk_widget_grab_focus(widget); … … 760 760 GUniquePtr<GdkEvent> nextEvent(gdk_event_peek()); 761 761 if (nextEvent && (nextEvent->any.type == GDK_2BUTTON_PRESS || nextEvent->any.type == GDK_3BUTTON_PRESS)) 762 return TRUE;762 return GDK_EVENT_STOP; 763 763 764 764 // If it's a right click event save it as a possible context menu event. … … 768 768 priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(reinterpret_cast<GdkEvent*>(buttonEvent), 769 769 priv->clickCounter.currentClickCountForGdkButtonEvent(buttonEvent))); 770 return TRUE;770 return GDK_EVENT_STOP; 771 771 } 772 772 … … 777 777 778 778 if (priv->authenticationDialog) 779 return TRUE;779 return GDK_EVENT_STOP; 780 780 781 781 gtk_widget_grab_focus(widget); 782 782 priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(reinterpret_cast<GdkEvent*>(event), 0 /* currentClickCount */)); 783 783 784 return TRUE;784 return GDK_EVENT_STOP; 785 785 } 786 786 … … 791 791 792 792 if (std::exchange(priv->shouldForwardNextWheelEvent, false)) 793 return FALSE;793 return GDK_EVENT_PROPAGATE; 794 794 795 795 if (priv->authenticationDialog) 796 return FALSE;796 return GDK_EVENT_PROPAGATE; 797 797 798 798 priv->pageProxy->handleWheelEvent(NativeWebWheelEvent(reinterpret_cast<GdkEvent*>(event))); 799 799 800 return TRUE;800 return GDK_EVENT_STOP; 801 801 } 802 802 … … 822 822 if (priv->authenticationDialog) { 823 823 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; 825 825 } 826 826 827 827 priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(reinterpret_cast<GdkEvent*>(event), 0 /* currentClickCount */)); 828 828 829 return FALSE;829 return GDK_EVENT_PROPAGATE; 830 830 } 831 831 … … 836 836 837 837 if (priv->authenticationDialog) 838 return FALSE;838 return GDK_EVENT_PROPAGATE; 839 839 840 840 // In the case of crossing events, it's very important the actual coordinates the WebProcess receives, because once the mouse leaves … … 868 868 priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(copiedEvent ? copiedEvent.get() : event, 0 /* currentClickCount */)); 869 869 870 return FALSE;870 return GDK_EVENT_PROPAGATE; 871 871 } 872 872 … … 920 920 921 921 if (priv->authenticationDialog) 922 return TRUE;922 return GDK_EVENT_STOP; 923 923 924 924 GdkEvent* touchEvent = reinterpret_cast<GdkEvent*>(event); … … 950 950 priv->pageProxy->handleTouchEvent(NativeWebTouchEvent(reinterpret_cast<GdkEvent*>(event), WTFMove(touchPoints))); 951 951 952 return TRUE;952 return GDK_EVENT_STOP; 953 953 } 954 954 #endif // ENABLE(TOUCH_EVENTS)
Note: See TracChangeset
for help on using the changeset viewer.