WebKit Bugzilla
Attachment 372136 Details for
Bug 194934
: Spurious find results on many apple.com pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194934-20190614130030.patch (text/plain), 3.03 KB, created by
Tim Horton
on 2019-06-14 13:00:31 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Tim Horton
Created:
2019-06-14 13:00:31 PDT
Size:
3.03 KB
patch
obsolete
>Subversion Revision: 246439 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 0aa6d087c2688334bc7ea2a4639804faf5527e9f..2687aebd2ab41a0df44c6d00fb03f452c311da39 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-06-14 Tim Horton <timothy_horton@apple.com> >+ >+ Spurious find results on many apple.com pages >+ https://bugs.webkit.org/show_bug.cgi?id=194934 >+ <rdar://problem/51739857> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ New API test: WebKit.DoNotFindMostlyClippedOutText. >+ >+ * editing/TextIterator.cpp: >+ (WebCore::fullyClipsContents): >+ Have TextIterator consider a 1x1 clip as "fully clipped out" text. >+ > 2019-06-14 Saam Barati <sbarati@apple.com> > > Unreviewed. Follow up to r246438. This removes a debug assert until >diff --git a/Source/WebCore/editing/TextIterator.cpp b/Source/WebCore/editing/TextIterator.cpp >index 23414a29564400e847c4515ba29a969ee8db2a81..7a98339a53771b9b37134f8ad540a3dd5343e4ab 100644 >--- a/Source/WebCore/editing/TextIterator.cpp >+++ b/Source/WebCore/editing/TextIterator.cpp >@@ -220,7 +220,7 @@ static inline bool fullyClipsContents(Node& node) > if (is<HTMLTextAreaElement>(node)) > return box.size().isEmpty(); > >- return box.contentSize().isEmpty(); >+ return FloatSize(box.contentSize()).area() <= 1; > } > > static inline bool ignoresContainerClip(Node& node) >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index e3aa4e9379b70b74b726ca9930cf354aaef9b7ce..3165a43492e71fccd540e5257522d9d037b30d59 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,14 @@ >+2019-06-14 Tim Horton <timothy_horton@apple.com> >+ >+ Spurious find results on many apple.com pages >+ https://bugs.webkit.org/show_bug.cgi?id=194934 >+ <rdar://problem/51739857> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm: >+ (TEST): >+ > 2019-06-14 Youenn Fablet <youenn@apple.com> > > import-w3c-tests should respect WEBKIT_OUTPUTDIR >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm >index 42d076c45381c57711d7c51f78012f649aef875f..bcd1e73e8fb6cea256bd6f11396e03918b07e269 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm >@@ -248,4 +248,15 @@ TEST(WebKit, FindAndReplace) > EXPECT_WK_STREQ("hi hi", [webView stringByEvaluatingJavaScript:@"document.body.textContent"]); > } > >+TEST(WebKit, DoNotFindMostlyClippedOutText) >+{ >+ RetainPtr<TestWKWebView> webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 200, 200)]); >+ >+ [webView synchronouslyLoadHTMLString:@"<div style='width: 1px; height: 1px; overflow: hidden;'>Birthday</div><div>Birthday</div>"]; >+ >+ // Should only find one match; the first one is clipped out enough that it doesn't count. >+ auto result = findMatches(webView.get(), @"Birthday"); >+ EXPECT_EQ((NSUInteger)1, [result.matches count]); >+} >+ > #endif // !PLATFORM(IOS_FAMILY)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
simon.fraser
:
review-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194934
: 372136