Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Nodes with display::none should be considered search invisible.
https://bugs.webkit.org/show_bug.cgi?id=245170 <rdar://99905766> Reviewed by Devin Rousso. Address a FIXME from the spec implementation, nodes with display::none should be considered search-invisible and not considered valid for a fragment. * LayoutTests/http/tests/scroll-to-text-fragment/word-display-none-expected.html: Added. * LayoutTests/http/tests/scroll-to-text-fragment/word-display-none.html: Added. * Source/WebCore/dom/FragmentDirectiveRangeFinder.cpp: (WebCore::FragmentDirectiveRangeFinder::isSearchInvisible): Canonical link: https://commits.webkit.org/254498@main
- Loading branch information
1 parent
6691152
commit 66ee16990695ad226e81dc8571801e9741031fa7
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<meta charset="utf-8" /> | ||
<title>Scroll to text fragment - highlight simple start reference</title> | ||
<style> | ||
span { | ||
display: none; | ||
} | ||
</style> | ||
|
||
<p>The test passes if the following word does not have a yellow background.</p> | ||
<div>This <span>word</span> should not be highlighted</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html><!-- webkit-test-runner [ ScrollToTextFragmentIndicatorEnabled=false ] --> | ||
<meta charset="utf-8" /> | ||
<title>Scroll to text fragment - highlight simple start text</title> | ||
<link rel="help" href="https://wicg.github.io/scroll-to-text-fragment/"> | ||
<style> | ||
span { | ||
display: none; | ||
} | ||
</style> | ||
|
||
<p>The test passes if the following word does not have a yellow background.</p> | ||
<div>This <span>word</span> should not be highlighted</div> | ||
|
||
<script> | ||
location.href = "#:~:text=This-,word,-should"; | ||
</script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters