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
Do not parse or scroll to text fragments in iframe URLs.
https://bugs.webkit.org/show_bug.cgi?id=244661 rdar://99202126 Reviewed by Tim Horton. Since we are unsure of all the security implications, do not search of text fragments in iFrame URLs. * LayoutTests/http/wpt/html/dom/scroll-to-text-fragment/no-iframe-match-expected.html: Added. * LayoutTests/http/wpt/html/dom/scroll-to-text-fragment/no-iframe-match.html: Added. * LayoutTests/http/wpt/html/dom/scroll-to-text-fragment/resources/iframe-scroll-to-text-fragment.html: Added. * Source/WebCore/page/FrameView.cpp: (WebCore::FrameView::scrollToFragment): Canonical link: https://commits.webkit.org/254073@main
- Loading branch information
Showing
4 changed files
with
27 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,11 @@ | ||
<!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/"> | ||
<meta name="assert" content="This test checks that a fragment directive with start text is correctly highlighted."> | ||
<link rel="match" href="scroll-to-text-fragment-start-expected.html"> | ||
|
||
<p>The test passes if there is no highlight in the following iframe.</p> | ||
<iframe width="400px" height="100px" src="../resources/iframe-scroll-to-text-fragment.html"></iframe> | ||
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!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/"> | ||
<meta name="assert" content="This test checks that a fragment directive with start text is correctly highlighted."> | ||
<link rel="match" href="scroll-to-text-fragment-start-expected.html"> | ||
|
||
<p>The test passes if there is no highlight in the following iframe.</p> | ||
<iframe width="400px" height="100px" src="../resources/iframe-scroll-to-text-fragment.html#:~:text=Example"></iframe> | ||
|
||
<script> | ||
location.href = "#:~:text=Example"; | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Example |
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