mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
Auto merge of #14367 - mrobinson:scroll-fragment-point, r=pcwalton
Reimplement scrolling to fragments <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #13736, #10753 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> This reimplemntation of the feature uses ScrollRootIds to scroll particular scrollable areas of the page. Fixes #13736. Fixes #10753. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14367) <!-- Reviewable:end -->
This commit is contained in:
commit
a0619688a6
18 changed files with 154 additions and 45 deletions
|
@ -1,6 +0,0 @@
|
|||
[scroll-frag-percent-encoded.html]
|
||||
type: testharness
|
||||
disabled: https://github.com/servo/servo/issues/10753
|
||||
[Fragment Navigation: fragment id should be percent-decoded]
|
||||
expected: FAIL
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[scroll-to-id-top.html]
|
||||
type: testharness
|
||||
disabled: https://github.com/servo/servo/issues/10753
|
||||
[Fragment Navigation: TOP is a valid element id, which overrides navigating to top of the document]
|
||||
expected: FAIL
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[scroll-to-top.html]
|
||||
type: testharness
|
||||
disabled: https://github.com/servo/servo/issues/10753
|
||||
[Fragment Navigation: When fragid is TOP scroll to the top of the document]
|
||||
expected: FAIL
|
||||
|
|
@ -6414,6 +6414,18 @@
|
|||
"url": "/_mozilla/mozilla/iframe/resize_after_load.html"
|
||||
}
|
||||
],
|
||||
"mozilla/simple_scroll_to_fragment.html": [
|
||||
{
|
||||
"path": "mozilla/simple_scroll_to_fragment.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/mozilla/simple_scroll_to_fragment_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/mozilla/simple_scroll_to_fragment.html"
|
||||
}
|
||||
],
|
||||
"mozilla/sslfail.html": [
|
||||
{
|
||||
"path": "mozilla/sslfail.html",
|
||||
|
@ -21432,6 +21444,18 @@
|
|||
"url": "/_mozilla/mozilla/iframe/resize_after_load.html"
|
||||
}
|
||||
],
|
||||
"mozilla/simple_scroll_to_fragment.html": [
|
||||
{
|
||||
"path": "mozilla/simple_scroll_to_fragment.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/mozilla/simple_scroll_to_fragment_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/mozilla/simple_scroll_to_fragment.html"
|
||||
}
|
||||
],
|
||||
"mozilla/sslfail.html": [
|
||||
{
|
||||
"path": "mozilla/sslfail.html",
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="match" href="simple_scroll_to_fragment_ref.html">
|
||||
</head>
|
||||
<body>
|
||||
<div id="scroller" style="height: 100px; width: 100px; overflow: scroll; background: red;">
|
||||
<div style="background: green; margin-top: 100px; width: 100px; height: 100px;"></div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById("scroller").scrollTop = 100;
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,9 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<div style="height: 100px; width: 100px; background: green;">
|
||||
</div>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue