Source/WebCore/ChangeLog

 12017-09-26 Chris Dumez <cdumez@apple.com>
 2
 3 REGRESSION(r222392): [GTK] Many forms tests are failing
 4 https://bugs.webkit.org/show_bug.cgi?id=177449
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Make sure events' timestamp are properly initialized for the GTK port.
 9 GDKEvent's time is actually in milliseconds, not seconds and we need
 10 to deal with the GDK_CURRENT_TIME special value to avoid ending up
 11 with a 0-value WallTime.
 12
 13 * platform/gtk/PlatformKeyboardEventGtk.cpp:
 14 (WebCore::eventTime):
 15 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
 16 * platform/gtk/PlatformMouseEventGtk.cpp:
 17 (WebCore::eventTime):
 18 (WebCore::PlatformMouseEvent::PlatformMouseEvent):
 19 * platform/gtk/PlatformWheelEventGtk.cpp:
 20 (WebCore::eventTime):
 21 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
 22
1232017-09-25 Per Arne Vollan <pvollan@apple.com>
224
325 Crash in WebCore::TreeScope::documentScope

Source/WebKit/ChangeLog

 12017-09-26 Chris Dumez <cdumez@apple.com>
 2
 3 REGRESSION(r222392): [GTK] Many forms tests are failing
 4 https://bugs.webkit.org/show_bug.cgi?id=177449
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Make sure events' timestamp are properly initialized for the GTK port.
 9 GDKEvent's time is actually in milliseconds, not seconds and we need
 10 to deal with the GDK_CURRENT_TIME special value to avoid ending up
 11 with a 0-value WallTime.
 12
 13 * Shared/gtk/WebEventFactory.cpp:
 14 (WebKit::eventTime):
 15 (WebKit::WebEventFactory::createWebMouseEvent):
 16 (WebKit::WebEventFactory::createWebWheelEvent):
 17 (WebKit::WebEventFactory::createWebKeyboardEvent):
 18 (WebKit::WebEventFactory::createWebTouchEvent):
 19
1202017-09-25 Alex Christensen <achristensen@webkit.org>
221
322 Make Attribute an enum class

Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp

@@static OptionSet<PlatformEvent::Modifier> modifiersForGdkKeyEvent(GdkEventKey* e
12571257 return modifiers;
12581258}
12591259
 1260static inline WallTime eventTime(const GdkEventKey* event)
 1261{
 1262 auto timeInMilliseconds = event->time;
 1263 if (timeInMilliseconds == GDK_CURRENT_TIME)
 1264 return WallTime::now();
 1265 return WallTime::fromRawSeconds(timeInMilliseconds / 1000.);
 1266}
 1267
12601268// Keep this in sync with the other platform event constructors
12611269PlatformKeyboardEvent::PlatformKeyboardEvent(GdkEventKey* event, const CompositionResults& compositionResults)
1262  : PlatformEvent(eventTypeForGdkKeyEvent(event), modifiersForGdkKeyEvent(event), WallTime::now())
 1270 : PlatformEvent(eventTypeForGdkKeyEvent(event), modifiersForGdkKeyEvent(event), eventTime(event))
12631271 , m_text(compositionResults.simpleString.length() ? compositionResults.simpleString : singleCharacterString(event->keyval))
12641272 , m_unmodifiedText(m_text)
12651273 , m_key(keyValueForGdkKeyCode(event->keyval))

Source/WebCore/platform/gtk/PlatformMouseEventGtk.cpp

3333
3434namespace WebCore {
3535
 36static inline WallTime eventTime(const GdkEventButton* event)
 37{
 38 auto timeInMilliseconds = event->time;
 39 if (timeInMilliseconds == GDK_CURRENT_TIME)
 40 return WallTime::now();
 41 return WallTime::fromRawSeconds(timeInMilliseconds / 1000.);
 42}
 43
3644// FIXME: Would be even better to figure out which modifier is Alt instead of always using GDK_MOD1_MASK.
3745
3846// Keep this in sync with the other platform event constructors
3947PlatformMouseEvent::PlatformMouseEvent(GdkEventButton* event)
4048{
41  m_timestamp = WallTime::fromRawSeconds(event->time);
 49 m_timestamp = eventTime(event);
4250 m_position = IntPoint((int)event->x, (int)event->y);
4351 m_globalPosition = IntPoint((int)event->x_root, (int)event->y_root);
4452 m_button = NoButton;

Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp

3737
3838namespace WebCore {
3939
 40static inline WallTime eventTime(const GdkEventScroll* event)
 41{
 42 auto timeInMilliseconds = event->time;
 43 if (timeInMilliseconds == GDK_CURRENT_TIME)
 44 return WallTime::now();
 45 return WallTime::fromRawSeconds(timeInMilliseconds / 1000.);
 46}
 47
4048// Keep this in sync with the other platform event constructors
4149PlatformWheelEvent::PlatformWheelEvent(GdkEventScroll* event)
4250{
4351 static const float delta = 1;
4452
4553 m_type = PlatformEvent::Wheel;
46  m_timestamp = WallTime::now();
 54 m_timestamp = eventTime(event);
4755
4856 if (event->state & GDK_SHIFT_MASK)
4957 m_modifiers |= Modifier::ShiftKey;

Source/WebKit/Shared/gtk/WebEventFactory.cpp

@@static inline bool isGdkKeyCodeFromKeyPad(unsigned keyval)
4646 return keyval >= GDK_KP_Space && keyval <= GDK_KP_9;
4747}
4848
 49static inline WallTime eventTime(const GdkEvent* event)
 50{
 51 auto timeInMilliseconds = gdk_event_get_time(event);
 52 if (timeInMilliseconds == GDK_CURRENT_TIME)
 53 return WallTime::now();
 54 return WallTime::fromRawSeconds(timeInMilliseconds / 1000.);
 55}
 56
4957static inline WebEvent::Modifiers modifiersForEvent(const GdkEvent* event)
5058{
5159 unsigned modifiers = 0;

@@WebMouseEvent WebEventFactory::createWebMouseEvent(const GdkEvent* event, int cu
140148 0 /* deltaZ */,
141149 currentClickCount,
142150 modifiersForEvent(event),
143  WallTime::fromRawSeconds(gdk_event_get_time(event)));
 151 eventTime(event));
144152}
145153
146154WebWheelEvent WebEventFactory::createWebWheelEvent(const GdkEvent* event)

@@WebWheelEvent WebEventFactory::createWebWheelEvent(const GdkEvent* event, WebWhe
210218 momentumPhase,
211219 WebWheelEvent::ScrollByPixelWheelEvent,
212220 modifiersForEvent(event),
213  WallTime::fromRawSeconds(gdk_event_get_time(event)));
 221 eventTime(event));
214222}
215223
216224WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(const GdkEvent* event, const WebCore::CompositionResults& compositionResults, Vector<String>&& commands)

@@WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(const GdkEvent* event,
227235 WTFMove(commands),
228236 isGdkKeyCodeFromKeyPad(event->key.keyval),
229237 modifiersForEvent(event),
230  WallTime::fromRawSeconds(gdk_event_get_time(event)));
 238 eventTime(event));
231239}
232240
233241#if ENABLE(TOUCH_EVENTS)

@@WebTouchEvent WebEventFactory::createWebTouchEvent(const GdkEvent* event, Vector
249257 ASSERT_NOT_REACHED();
250258 }
251259
252  return WebTouchEvent(type, WTFMove(touchPoints), modifiersForEvent(event), WallTime::fromRawSeconds(gdk_event_get_time(event)));
 260 return WebTouchEvent(type, WTFMove(touchPoints), modifiersForEvent(event), eventTime(event));
253261#else
254262 return WebTouchEvent();
255263#endif // GTK_API_VERSION_2

LayoutTests/ChangeLog

 12017-09-26 Chris Dumez <cdumez@apple.com>
 2
 3 REGRESSION(r222392): [GTK] Many forms tests are failing
 4 https://bugs.webkit.org/show_bug.cgi?id=177449
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Unskip tests that were failing.
 9
 10 * platform/gtk/TestExpectations:
 11
1122017-09-25 Per Arne Vollan <pvollan@apple.com>
213
314 Crash in WebCore::TreeScope::documentScope

LayoutTests/platform/gtk/TestExpectations

@@webkit.org/b/175661 inspector/worker/resources-in-worker.html [ Failure ]
34303430
34313431webkit.org/b/175662 inspector/canvas/recording-2d.html [ Failure ]
34323432
3433 webkit.org/b/177449 fast/forms/ValidityState-valueMissing-002.html [ Failure ]
3434 webkit.org/b/177449 fast/forms/listbox-selection-after-typeahead.html [ Failure ]
3435 webkit.org/b/177449 fast/forms/listbox-typeahead-scroll.html [ Failure ]
3436 webkit.org/b/177449 fast/forms/onchange-select-check-validity.html [ Failure ]
3437 webkit.org/b/177449 fast/forms/select-double-onchange.html [ Failure ]
3438 webkit.org/b/177449 fast/forms/select-script-onchange.html [ Failure ]
3439 webkit.org/b/177449 fast/forms/select/menulist-oninput-fired.html [ Failure ]
3440 webkit.org/b/177449 fast/forms/select/select-disabled.html [ Failure ]
3441 webkit.org/b/177449 fast/events/popup-when-select-change.html [ Timeout Crash ]
3442 
34433433#////////////////////////////////////////////////////////////////////////////////////////
34443434# End of non-crashing, non-flaky tests failing
34453435#////////////////////////////////////////////////////////////////////////////////////////