Title: [222837] trunk/Source
- Revision
- 222837
- Author
- [email protected]
- Date
- 2017-10-04 02:49:24 -0700 (Wed, 04 Oct 2017)
Log Message
REGRESSION(r222392): [WPE][GTK] Many forms tests are failing due to broken event timestamps
https://bugs.webkit.org/show_bug.cgi?id=177449
Reviewed by Chris Dumez.
Source/WebCore:
* platform/gtk/GtkUtilities.cpp:
(WebCore::wallTimeForEvent):
* platform/gtk/GtkUtilities.h:
(WebCore::wallTimeForEvent):
Source/WebKit:
* Shared/wpe/WebEventFactory.cpp:
(WebKit::wallTimeForEventTime):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (222836 => 222837)
--- trunk/Source/WebCore/ChangeLog 2017-10-04 09:09:00 UTC (rev 222836)
+++ trunk/Source/WebCore/ChangeLog 2017-10-04 09:49:24 UTC (rev 222837)
@@ -1,3 +1,15 @@
+2017-10-04 Michael Catanzaro <[email protected]>
+
+ REGRESSION(r222392): [WPE][GTK] Many forms tests are failing due to broken event timestamps
+ https://bugs.webkit.org/show_bug.cgi?id=177449
+
+ Reviewed by Chris Dumez.
+
+ * platform/gtk/GtkUtilities.cpp:
+ (WebCore::wallTimeForEvent):
+ * platform/gtk/GtkUtilities.h:
+ (WebCore::wallTimeForEvent):
+
2017-10-04 Miguel Gomez <[email protected]>
[GTK][WPE] Fix playback of GIFs
Modified: trunk/Source/WebCore/platform/gtk/GtkUtilities.cpp (222836 => 222837)
--- trunk/Source/WebCore/platform/gtk/GtkUtilities.cpp 2017-10-04 09:09:00 UTC (rev 222836)
+++ trunk/Source/WebCore/platform/gtk/GtkUtilities.cpp 2017-10-04 09:49:24 UTC (rev 222837)
@@ -61,7 +61,10 @@
// be using CLOCK_MONOTONIC for its monotonic time, and so long as
// g_get_monotonic_time() continues to do so as well, and so long as
// WTF::MonotonicTime continues to use g_get_monotonic_time().
- return MonotonicTime::fromRawSeconds(gdk_event_get_time(event) / 1000.).approximateWallTime();
+ auto time = gdk_event_get_time(event);
+ if (time == GDK_CURRENT_TIME)
+ return WallTime::now();
+ return MonotonicTime::fromRawSeconds(time / 1000.).approximateWallTime();
}
String defaultGtkSystemFont()
Modified: trunk/Source/WebCore/platform/gtk/GtkUtilities.h (222836 => 222837)
--- trunk/Source/WebCore/platform/gtk/GtkUtilities.h 2017-10-04 09:09:00 UTC (rev 222836)
+++ trunk/Source/WebCore/platform/gtk/GtkUtilities.h 2017-10-04 09:49:24 UTC (rev 222837)
@@ -32,7 +32,15 @@
bool widgetIsOnscreenToplevelWindow(GtkWidget*);
template<typename GdkEventType>
-WallTime wallTimeForEvent(const GdkEventType* event) { return MonotonicTime::fromRawSeconds(event->time / 1000.).approximateWallTime(); }
+WallTime wallTimeForEvent(const GdkEventType* event)
+{
+ // FIXME: 0 is GDK_CURRENT_TIME. We should stop including this header from
+ // HyphenationLibHyphen.cpp so that we can include gtk/gtk.h here and use
+ // GDK_CURRENT_TIME.
+ if (event->time == 0)
+ return WallTime::now();
+ return MonotonicTime::fromRawSeconds(event->time / 1000.).approximateWallTime();
+}
template<>
WallTime wallTimeForEvent(const GdkEvent*);
Modified: trunk/Source/WebKit/ChangeLog (222836 => 222837)
--- trunk/Source/WebKit/ChangeLog 2017-10-04 09:09:00 UTC (rev 222836)
+++ trunk/Source/WebKit/ChangeLog 2017-10-04 09:49:24 UTC (rev 222837)
@@ -1,3 +1,13 @@
+2017-10-04 Michael Catanzaro <[email protected]>
+
+ REGRESSION(r222392): [WPE][GTK] Many forms tests are failing due to broken event timestamps
+ https://bugs.webkit.org/show_bug.cgi?id=177449
+
+ Reviewed by Chris Dumez.
+
+ * Shared/wpe/WebEventFactory.cpp:
+ (WebKit::wallTimeForEventTime):
+
2017-10-03 Brent Fulgham <[email protected]>
Correct nullptr dereference during shutdown
Modified: trunk/Source/WebKit/Shared/wpe/WebEventFactory.cpp (222836 => 222837)
--- trunk/Source/WebKit/Shared/wpe/WebEventFactory.cpp 2017-10-04 09:09:00 UTC (rev 222836)
+++ trunk/Source/WebKit/Shared/wpe/WebEventFactory.cpp 2017-10-04 09:49:24 UTC (rev 222837)
@@ -79,7 +79,7 @@
// so as well, and so long as WTF::MonotonicTime continues to use
// g_get_monotonic_time(). It also assumes the event timestamp is in
// milliseconds.
- return MonotonicTime::fromRawSeconds(timestamp / 1000.).approximateWallTime();
+ return timestamp ? MonotonicTime::fromRawSeconds(seconds / 1000.).approximateWallTime() : WallTime::now();
}
WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(struct wpe_input_keyboard_event* event)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes