- Revision
- 246429
- Author
- grao...@webkit.org
- Date
- 2019-06-13 23:50:51 -0700 (Thu, 13 Jun 2019)
Log Message
REGRESSION (r246103) [ Mojave+ WK1 ] Layout Test scrollbars/scrollbar-iframe-click-does-not-blur-content.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=198800
<rdar://problem/51679634>
Reviewed by Tim Horton.
Source/WebKitLegacy/mac:
Expose a private method that we need to use from DumpRenderTree.
* WebView/WebHTMLView.mm:
(-[WebHTMLView _hitViewForEvent:]):
* WebView/WebHTMLViewPrivate.h:
Tools:
We didn't detect an NSScroller in a sub-frame due to WebHTMLView's implementation of -[NSView hitTest:]. We now use a private method
which lets us use the default implementation and correctly returns an NSScroller in a sub-frame.
* DumpRenderTree/mac/EventSendingController.mm:
(eventPressedMouseButtonsSwizzlerForViewAndEvent):
(-[EventSendingController mouseDown:withModifiers:]):
(-[EventSendingController mouseUp:withModifiers:]):
(-[EventSendingController mouseMoveToX:Y:]):
LayoutTests:
This test now passes reliably on WK1.
* platform/mac-wk1/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (246428 => 246429)
--- trunk/LayoutTests/ChangeLog 2019-06-14 05:45:43 UTC (rev 246428)
+++ trunk/LayoutTests/ChangeLog 2019-06-14 06:50:51 UTC (rev 246429)
@@ -1,3 +1,15 @@
+2019-06-13 Antoine Quint <grao...@apple.com>
+
+ REGRESSION (r246103) [ Mojave+ WK1 ] Layout Test scrollbars/scrollbar-iframe-click-does-not-blur-content.html is timing out
+ https://bugs.webkit.org/show_bug.cgi?id=198800
+ <rdar://problem/51679634>
+
+ Reviewed by Tim Horton.
+
+ This test now passes reliably on WK1.
+
+ * platform/mac-wk1/TestExpectations:
+
2019-06-12 Myles C. Maxfield <mmaxfi...@apple.com>
[WHLSL] Hook up compute
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (246428 => 246429)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2019-06-14 05:45:43 UTC (rev 246428)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2019-06-14 06:50:51 UTC (rev 246429)
@@ -739,5 +739,3 @@
webkit.org/b/198459 [ HighSierra Debug ] inspector/canvas/recording-webgl-full.html [ Slow ]
webkit.org/b/196508 compositing/repaint/scroller-with-foreground-layer-repaints.html [ Pass Failure ]
-
-webkit.org/b/198800 [ Mojave+ ] scrollbars/scrollbar-iframe-click-does-not-blur-content.html [ Pass Timeout ]
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (246428 => 246429)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2019-06-14 05:45:43 UTC (rev 246428)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2019-06-14 06:50:51 UTC (rev 246429)
@@ -1,3 +1,17 @@
+2019-06-13 Antoine Quint <grao...@apple.com>
+
+ REGRESSION (r246103) [ Mojave+ WK1 ] Layout Test scrollbars/scrollbar-iframe-click-does-not-blur-content.html is timing out
+ https://bugs.webkit.org/show_bug.cgi?id=198800
+ <rdar://problem/51679634>
+
+ Reviewed by Tim Horton.
+
+ Expose a private method that we need to use from DumpRenderTree.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _hitViewForEvent:]):
+ * WebView/WebHTMLViewPrivate.h:
+
2019-06-10 Sam Weinig <wei...@apple.com>
Remove Dashboard support
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm (246428 => 246429)
--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm 2019-06-14 05:45:43 UTC (rev 246428)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm 2019-06-14 06:50:51 UTC (rev 246429)
@@ -846,7 +846,6 @@
- (BOOL)_shouldReplaceSelectionWithText:(NSString *)text givenAction:(WebViewInsertAction)action;
- (DOMRange *)_selectedRange;
#if PLATFORM(MAC)
-- (NSView *)_hitViewForEvent:(NSEvent *)event;
- (void)_writeSelectionWithPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard cachedAttributedString:(NSAttributedString *)attributedString;
#endif
- (DOMRange *)_documentRange;
@@ -1337,16 +1336,6 @@
#if PLATFORM(MAC)
-- (NSView *)_hitViewForEvent:(NSEvent *)event
-{
- // Usually, we hack AK's hitTest method to catch all events at the topmost WebHTMLView.
- // Callers of this method, however, want to query the deepest view instead.
- forceNSViewHitTest = YES;
- NSView *hitView = [(NSView *)[[self window] contentView] hitTest:[event locationInWindow]];
- forceNSViewHitTest = NO;
- return hitView;
-}
-
- (void)_writeSelectionWithPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard cachedAttributedString:(NSAttributedString *)attributedString
{
// Put HTML on the pasteboard.
@@ -2571,6 +2560,20 @@
#endif
+#if PLATFORM(MAC)
+
+- (NSView *)_hitViewForEvent:(NSEvent *)event
+{
+ // Usually, we hack AK's hitTest method to catch all events at the topmost WebHTMLView.
+ // Callers of this method, however, want to query the deepest view instead.
+ forceNSViewHitTest = YES;
+ NSView *hitView = [(NSView *)[[self window] contentView] hitTest:[event locationInWindow]];
+ forceNSViewHitTest = NO;
+ return hitView;
+}
+
+#endif
+
@end
@implementation NSView (WebHTMLViewFileInternal)
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLViewPrivate.h (246428 => 246429)
--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLViewPrivate.h 2019-06-14 05:45:43 UTC (rev 246428)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLViewPrivate.h 2019-06-14 06:50:51 UTC (rev 246429)
@@ -147,4 +147,8 @@
- (id)accessibilityRootElement;
#endif
+#if !TARGET_OS_IPHONE
+- (NSView *)_hitViewForEvent:(NSEvent *)event;
+#endif
+
@end
Modified: trunk/Tools/ChangeLog (246428 => 246429)
--- trunk/Tools/ChangeLog 2019-06-14 05:45:43 UTC (rev 246428)
+++ trunk/Tools/ChangeLog 2019-06-14 06:50:51 UTC (rev 246429)
@@ -1,3 +1,20 @@
+2019-06-13 Antoine Quint <grao...@apple.com>
+
+ REGRESSION (r246103) [ Mojave+ WK1 ] Layout Test scrollbars/scrollbar-iframe-click-does-not-blur-content.html is timing out
+ https://bugs.webkit.org/show_bug.cgi?id=198800
+ <rdar://problem/51679634>
+
+ Reviewed by Tim Horton.
+
+ We didn't detect an NSScroller in a sub-frame due to WebHTMLView's implementation of -[NSView hitTest:]. We now use a private method
+ which lets us use the default implementation and correctly returns an NSScroller in a sub-frame.
+
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (eventPressedMouseButtonsSwizzlerForViewAndEvent):
+ (-[EventSendingController mouseDown:withModifiers:]):
+ (-[EventSendingController mouseUp:withModifiers:]):
+ (-[EventSendingController mouseMoveToX:Y:]):
+
2019-06-13 Fujii Hironori <hironori.fu...@sony.com>
[WinCairo][WebKitTestRunner] pixel image dump outputs blank images
Modified: trunk/Tools/DumpRenderTree/mac/EventSendingController.mm (246428 => 246429)
--- trunk/Tools/DumpRenderTree/mac/EventSendingController.mm 2019-06-14 05:45:43 UTC (rev 246428)
+++ trunk/Tools/DumpRenderTree/mac/EventSendingController.mm 2019-06-14 06:50:51 UTC (rev 246429)
@@ -47,6 +47,7 @@
#if !PLATFORM(IOS_FAMILY)
#import <Carbon/Carbon.h> // for GetCurrentEventTime()
#import <WebKit/WebHTMLView.h>
+#import <WebKit/WebHTMLViewPrivate.h>
#import <objc/runtime.h>
#import <wtf/mac/AppKitCompatibilityDeclarations.h>
#endif
@@ -563,6 +564,13 @@
}
#if !PLATFORM(IOS_FAMILY)
+static std::unique_ptr<ClassMethodSwizzler> eventPressedMouseButtonsSwizzlerForViewAndEvent(NSView* view, NSEvent* event)
+{
+ if ([view isKindOfClass:[WebHTMLView class]])
+ view = [(WebHTMLView *)view _hitViewForEvent:event];
+ return ![view isKindOfClass:[NSScroller class]] ? std::make_unique<ClassMethodSwizzler>([NSEvent class], @selector(pressedMouseButtons), reinterpret_cast<IMP>(swizzledEventPressedMouseButtons)) : NULL;
+}
+
static NSUInteger swizzledEventPressedMouseButtons()
{
return mouseButtonsCurrentlyDown;
@@ -600,7 +608,7 @@
#endif
{
#if !PLATFORM(IOS_FAMILY)
- auto eventPressedMouseButtonsSwizzler = ![subView isKindOfClass:[NSScroller class]] ? std::make_unique<ClassMethodSwizzler>([NSEvent class], @selector(pressedMouseButtons), reinterpret_cast<IMP>(swizzledEventPressedMouseButtons)) : NULL;
+ auto eventPressedMouseButtonsSwizzler = eventPressedMouseButtonsSwizzlerForViewAndEvent(subView, event);
#endif
[subView mouseDown:event];
}
@@ -696,7 +704,7 @@
#endif
{
#if !PLATFORM(IOS_FAMILY)
- auto eventPressedMouseButtonsSwizzler = ![targetView isKindOfClass:[NSScroller class]] ? std::make_unique<ClassMethodSwizzler>([NSEvent class], @selector(pressedMouseButtons), reinterpret_cast<IMP>(swizzledEventPressedMouseButtons)) : NULL;
+ auto eventPressedMouseButtonsSwizzler = eventPressedMouseButtonsSwizzlerForViewAndEvent(targetView, event);
#endif
[targetView mouseUp:event];
}
@@ -786,7 +794,7 @@
[[mainFrame webView] draggingUpdated:draggingInfo];
} else {
#if !PLATFORM(IOS_FAMILY)
- auto eventPressedMouseButtonsSwizzler = ![subView isKindOfClass:[NSScroller class]] ? std::make_unique<ClassMethodSwizzler>([NSEvent class], @selector(pressedMouseButtons), reinterpret_cast<IMP>(swizzledEventPressedMouseButtons)) : NULL;
+ auto eventPressedMouseButtonsSwizzler = eventPressedMouseButtonsSwizzlerForViewAndEvent(subView, event);
#endif
[subView mouseDragged:event];
}
@@ -793,7 +801,7 @@
#endif
} else {
#if !PLATFORM(IOS_FAMILY)
- auto eventPressedMouseButtonsSwizzler = ![subView isKindOfClass:[NSScroller class]] ? std::make_unique<ClassMethodSwizzler>([NSEvent class], @selector(pressedMouseButtons), reinterpret_cast<IMP>(swizzledEventPressedMouseButtons)) : NULL;
+ auto eventPressedMouseButtonsSwizzler = eventPressedMouseButtonsSwizzlerForViewAndEvent(subView, event);
#endif
[subView mouseMoved:event];
}