Changeset 61288 in webkit
- Timestamp:
- Jun 16, 2010 3:26:35 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r61286 r61288 1 2010-06-16 Martin Robinson <mrobinson@igalia.com> 2 3 Reviewed by Gustavo Noronha Silva. 4 5 [GTK] Remove the abuse of GDK_CURRENT_TIME in the DRT 6 https://bugs.webkit.org/show_bug.cgi?id=40600 7 8 * platform/gtk/Skipped: This change exposed some failures which were previously not reported. Skip them. 9 1 10 2010-06-16 Adam Barth <abarth@webkit.org> 2 11 -
trunk/LayoutTests/platform/gtk/Skipped
r61260 r61288 5932 5932 # https://bugs.webkit.org/show_bug.cgi?id=40664 5933 5933 inspector/timeline-script-tag-1.html 5934 5935 # Tests failing because the context menu is grabbing mouse events. 5936 # https://bugs.webkit.org/show_bug.cgi?id=40601 5937 fast/events/mouse-click-events.html 5938 fast/events/right-click-focus.html 5939 editing/selection/5354455-1.html 5940 editing/selection/5354455-2.html -
trunk/WebKit/gtk/ChangeLog
r61224 r61288 1 2010-06-16 Martin Robinson <mrobinson@igalia.com> 2 3 Reviewed by Gustavo Noronha Silva. 4 5 [GTK] Remove the abuse of GDK_CURRENT_TIME in the DRT 6 https://bugs.webkit.org/show_bug.cgi?id=40600 7 8 * WebCoreSupport/DragClientGtk.cpp: 9 (WebKit::DragClient::startDrag): Reset the click count after a drag starts. 10 * WebCoreSupport/FrameLoaderClientGtk.cpp: 11 (WebKit::postCommitFrameViewSetup): Reset the click count after a load is committed. 12 * webkit/webkitprivate.h: Move static click counting variables to be per-view. 13 * webkit/webkitwebview.cpp: 14 (getEventTime): Added. 15 (webkit_web_view_button_press_event): If the event time is zero, use the current time. 16 (webkit_web_view_finalize): Clean up click counting member. 17 (webkit_web_view_init): Initialize click counting member. 18 1 19 2010-06-15 Xan Lopez <xlopez@igalia.com> 2 20 -
trunk/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
r60785 r61288 80 80 webView->priv->draggingDataObjects.set(context, dataObject); 81 81 82 // A drag starting should prevent a double-click from happening. This might 83 // happen if a drag is followed very quickly by another click (like in the DRT). 84 webView->priv->previousClickTime = 0; 85 82 86 if (image) 83 87 gtk_drag_set_icon_pixbuf(context, image, eventPos.x() - dragImageOrigin.x(), eventPos.y() - dragImageOrigin.y()); -
trunk/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
r60498 r61288 1146 1146 g_object_unref(menu); 1147 1147 } 1148 1149 // Do not allow click counting between main frame loads. 1150 priv->previousClickTime = 0; 1148 1151 } 1149 1152 -
trunk/WebKit/gtk/webkit/webkitprivate.h
r60841 r61288 57 57 #include "Frame.h" 58 58 #include "InspectorClientGtk.h" 59 #include "IntPoint.h" 59 60 #include "FrameLoaderClient.h" 60 61 #include "ResourceHandle.h" … … 153 154 char* tooltipText; 154 155 156 int currentClickCount; 157 WebCore::IntPoint* previousClickPoint; 158 guint previousClickButton; 159 guint32 previousClickTime; 160 155 161 HashMap<GdkDragContext*, RefPtr<WebCore::DataObjectGtk> > draggingDataObjects; 156 162 }; -
trunk/WebKit/gtk/webkit/webkitwebview.cpp
r61206 r61288 588 588 } 589 589 590 static guint32 getEventTime(GdkEvent* event) 591 { 592 guint32 time = gdk_event_get_time(event); 593 if (time) 594 return time; 595 596 // Real events always have a non-zero time, but events synthesized 597 // by the DRT do not and we must calculate a time manually. This time 598 // is not calculated in the DRT, because GTK+ does not work well with 599 // anything other than GDK_CURRENT_TIME on synthesized events. 600 GTimeVal timeValue; 601 g_get_current_time(&timeValue); 602 return (timeValue.tv_sec * 1000) + (timeValue.tv_usec / 1000); 603 } 604 590 605 static gboolean webkit_web_view_button_press_event(GtkWidget* widget, GdkEventButton* event) 591 606 { 592 // Eventually it may make sense for these to be per-view and per-device,593 // but at this time the implementation matches the Windows port.594 static int currentClickCount = 1;595 static IntPoint previousPoint;596 static guint previousButton;597 static guint32 previousTime;598 599 607 WebKitWebView* webView = WEBKIT_WEB_VIEW(widget); 608 WebKitWebViewPrivate* priv = webView->priv; 600 609 601 610 // FIXME: need to keep track of subframe focus for key events … … 621 630 // quadruple clicks, quintuple clicks, ad infinitum. Here, we replicate the 622 631 // GDK logic for counting clicks. 632 guint32 eventTime = getEventTime(reinterpret_cast<GdkEvent*>(event)); 623 633 if ((event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS) 624 || ((abs(event->x - pr eviousPoint.x()) < doubleClickDistance)625 && (abs(event->y - pr eviousPoint.y()) < doubleClickDistance)626 && (event ->time - previousTime < static_cast<guint>(doubleClickTime))627 && (event->button == pr eviousButton)))628 currentClickCount++;634 || ((abs(event->x - priv->previousClickPoint->x()) < doubleClickDistance) 635 && (abs(event->y - priv->previousClickPoint->y()) < doubleClickDistance) 636 && (eventTime - priv->previousClickTime < static_cast<guint>(doubleClickTime)) 637 && (event->button == priv->previousClickButton))) 638 priv->currentClickCount++; 629 639 else 630 currentClickCount = 1;640 priv->currentClickCount = 1; 631 641 632 642 PlatformMouseEvent platformEvent(event); 633 platformEvent.setClickCount( currentClickCount);634 previousPoint = platformEvent.pos();635 pr eviousButton = event->button;636 pr eviousTime = event->time;643 platformEvent.setClickCount(priv->currentClickCount); 644 *priv->previousClickPoint = platformEvent.pos(); 645 priv->previousClickButton = event->button; 646 priv->previousClickTime = eventTime; 637 647 638 648 if (event->button == 3) … … 1196 1206 g_free(priv->customEncoding); 1197 1207 g_free(priv->iconURI); 1208 1209 delete priv->previousClickPoint; 1198 1210 1199 1211 G_OBJECT_CLASS(webkit_web_view_parent_class)->finalize(object); … … 2913 2925 2914 2926 priv->tooltipText = 0; 2927 priv->currentClickCount = 0; 2928 priv->previousClickPoint = new IntPoint(0, 0); 2929 priv->previousClickButton = 0; 2930 priv->previousClickTime = 0; 2915 2931 } 2916 2932 -
trunk/WebKitTools/ChangeLog
r61287 r61288 1 2010-06-16 Martin Robinson <mrobinson@igalia.com> 2 3 Reviewed by Gustavo Noronha Silva. 4 5 [GTK] Remove the abuse of GDK_CURRENT_TIME in the DRT 6 https://bugs.webkit.org/show_bug.cgi?id=40600 7 8 * DumpRenderTree/gtk/EventSender.cpp: 9 (prepareMouseButtonEvent): Remove logic adding an offset to GDK_CURRENT_TIME. 10 1 11 2010-06-16 Adam Barth <abarth@webkit.org> 2 12 -
trunk/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
r61153 r61288 149 149 event->button.device = gdk_device_get_core_pointer(); 150 150 event->button.state = getStateFlags(); 151 152 // Mouse up & down events dispatched via g_signal_emit_by_name must offset 153 // their time value, so that WebKit can detect where sequences of mouse 154 // clicks begin and end. This should not interfere with GDK or GTK+ event 155 // processing, because the event is only seen by the widget. 156 event->button.time = GDK_CURRENT_TIME + timeOffset; 151 event->button.time = GDK_CURRENT_TIME; 157 152 158 153 int xRoot, yRoot;
Note: See TracChangeset
for help on using the changeset viewer.