Title: [274696] trunk/Tools
- Revision
- 274696
- Author
- wenson_hs...@apple.com
- Date
- 2021-03-18 19:23:14 -0700 (Thu, 18 Mar 2021)
Log Message
Add a test to exercise the crash in webkit.org/b/223417
https://bugs.webkit.org/show_bug.cgi?id=223485
Reviewed by Tim Horton.
Add an API test that performs a hit-test just outside of the bounds of the WKWebView that contains a full-page
clickable element. This finds the element as the click target, but the hit-tested node is null.
* TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm:
(TestWebKitAPI::TEST):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (274695 => 274696)
--- trunk/Tools/ChangeLog 2021-03-19 01:27:38 UTC (rev 274695)
+++ trunk/Tools/ChangeLog 2021-03-19 02:23:14 UTC (rev 274696)
@@ -1,5 +1,18 @@
2021-03-18 Wenson Hsieh <wenson_hs...@apple.com>
+ Add a test to exercise the crash in webkit.org/b/223417
+ https://bugs.webkit.org/show_bug.cgi?id=223485
+
+ Reviewed by Tim Horton.
+
+ Add an API test that performs a hit-test just outside of the bounds of the WKWebView that contains a full-page
+ clickable element. This finds the element as the click target, but the hit-tested node is null.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm:
+ (TestWebKitAPI::TEST):
+
+2021-03-18 Wenson Hsieh <wenson_hs...@apple.com>
+
Avoid copying item data when iterating in-process display lists
https://bugs.webkit.org/show_bug.cgi?id=223471
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm (274695 => 274696)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm 2021-03-19 01:27:38 UTC (rev 274695)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm 2021-03-19 02:23:14 UTC (rev 274696)
@@ -312,6 +312,40 @@
TestWebKitAPI::Util::run(&finishedWithInner);
}
+TEST(_WKActivatedElementInfo, HitTestPointOutsideView)
+{
+ auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]);
+ [webView synchronouslyLoadHTMLString:@R"(
+ <!DOCTYPE html>
+ <html>
+ <meta name='viewport' content='width = device-width, initial-scale = 1'>
+ <head>
+ <style>
+ html, body {
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ }
+ div {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100px;
+ height: 100px;
+ border: 1px solid tomato;
+ box-sizing: border-box;
+ }
+ </style>
+ </head>
+ <body><div _onclick_='return true;'></body>
+ </html>
+ )"];
+
+ auto elementRect = [webView activatedElementAtPosition:CGPointMake(101, 101)].boundingRect;
+ EXPECT_TRUE(CGPointEqualToPoint(elementRect.origin, CGPointZero));
+ EXPECT_TRUE(CGSizeEqualToSize(elementRect.size, CGSizeMake(100, 100)));
}
+}
+
#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes