aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/script/dom/document.rs24
-rw-r--r--components/script/dom/element.rs40
-rw-r--r--components/script_bindings/codegen/Bindings.conf2
-rw-r--r--components/script_bindings/webidls/Document.webidl10
-rw-r--r--tests/wpt/meta/MANIFEST.json2
-rw-r--r--tests/wpt/meta/css/css-tables/no-overflow-with-table-cell-margins.html.ini3
-rw-r--r--tests/wpt/meta/css/cssom-view/HTMLBody-ScrollArea_quirksmode.html.ini9
-rw-r--r--tests/wpt/meta/css/cssom-view/idlharness.html.ini6
-rw-r--r--tests/wpt/meta/css/cssom-view/scroll-behavior-main-frame-root.html.ini48
-rw-r--r--tests/wpt/meta/css/cssom-view/scroll-behavior-main-frame-window.html.ini42
-rw-r--r--tests/wpt/meta/css/cssom-view/scroll-behavior-subframe-root.html.ini48
-rw-r--r--tests/wpt/meta/css/cssom-view/scroll-behavior-subframe-window.html.ini42
-rw-r--r--tests/wpt/meta/css/cssom-view/scroll-overflow-clip-quirks-001.html.ini4
-rw-r--r--tests/wpt/meta/css/cssom-view/scroll-overflow-clip-quirks-002.html.ini4
-rw-r--r--tests/wpt/meta/css/cssom-view/scrolling-quirks-vs-nonquirks.html.ini12
-rw-r--r--tests/wpt/meta/css/cssom-view/scrollingElement.html.ini28
-rw-r--r--tests/wpt/meta/html/browsers/browsing-the-web/scroll-to-fragid/003.html.ini3
-rw-r--r--tests/wpt/meta/intersection-observer/cross-origin-iframe.sub.html.ini10
-rw-r--r--tests/wpt/meta/intersection-observer/disconnect.html.ini3
-rw-r--r--tests/wpt/meta/intersection-observer/iframe-no-root-with-wrapping-scroller.html.ini6
-rw-r--r--tests/wpt/meta/intersection-observer/iframe-no-root.html.ini6
-rw-r--r--tests/wpt/meta/intersection-observer/multiple-targets.html.ini8
-rw-r--r--tests/wpt/meta/intersection-observer/multiple-thresholds.html.ini20
-rw-r--r--tests/wpt/meta/intersection-observer/observer-without-js-reference.html.ini2
-rw-r--r--tests/wpt/meta/intersection-observer/root-margin-root-element.html.ini12
-rw-r--r--tests/wpt/meta/intersection-observer/root-margin.html.ini8
-rw-r--r--tests/wpt/meta/intersection-observer/same-document-no-root.html.ini5
-rw-r--r--tests/wpt/meta/intersection-observer/same-document-root.html.ini12
-rw-r--r--tests/wpt/meta/intersection-observer/same-document-with-document-root.html.ini2
-rw-r--r--tests/wpt/meta/intersection-observer/same-document-zero-size-target.html.ini5
-rw-r--r--tests/wpt/meta/intersection-observer/svg-clipped-rect-target.html.ini6
-rw-r--r--tests/wpt/meta/intersection-observer/svg-intersection-with-fractional-bounds.html.ini6
-rw-r--r--tests/wpt/meta/intersection-observer/svg-rect-target.html.ini6
-rw-r--r--tests/wpt/meta/intersection-observer/text-target.html.ini5
-rw-r--r--tests/wpt/meta/intersection-observer/timestamp.html.ini2
-rw-r--r--tests/wpt/meta/intersection-observer/visibility-hidden.html.ini2
-rw-r--r--tests/wpt/tests/css/cssom-view/scrollingElement.html12
37 files changed, 194 insertions, 271 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index bb30a84172c..ae48fa1fb2f 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -6369,6 +6369,30 @@ impl DocumentMethods<crate::DomTypeHolder> for Document {
)
}
+ /// <https://drafts.csswg.org/cssom-view/#dom-document-scrollingelement>
+ fn GetScrollingElement(&self, can_gc: CanGc) -> Option<DomRoot<Element>> {
+ // Step 1. If the Document is in quirks mode, follow these steps:
+ if self.quirks_mode() == QuirksMode::Quirks {
+ // Step 1.1. If the body element exists,
+ if let Some(ref body) = self.GetBody() {
+ let e = body.upcast::<Element>();
+ // and it is not potentially scrollable, return the body element and abort these steps.
+ // For this purpose, a value of overflow:clip on the the body element’s parent element
+ // must be treated as overflow:hidden.
+ if !e.is_potentially_scrollable_body_for_scrolling_element(can_gc) {
+ return Some(DomRoot::from_ref(e));
+ }
+ }
+
+ // Step 1.2. Return null and abort these steps.
+ return None;
+ }
+
+ // Step 2. If there is a root element, return the root element and abort these steps.
+ // Step 3. Return null.
+ self.GetDocumentElement()
+ }
+
// https://html.spec.whatwg.org/multipage/#dom-document-open
fn Open(
&self,
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index d92d5c124d1..b2168846fad 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -50,6 +50,7 @@ use style::selector_parser::{
use style::shared_lock::{Locked, SharedRwLock};
use style::stylesheets::layer_rule::LayerOrder;
use style::stylesheets::{CssRuleType, UrlExtraData};
+use style::values::computed::Overflow;
use style::values::generics::NonNegative;
use style::values::generics::position::PreferredRatio;
use style::values::generics::ratio::Ratio;
@@ -455,8 +456,25 @@ impl Element {
.is_some_and(|s| !s.get_box().clone_display().is_none())
}
- // https://drafts.csswg.org/cssom-view/#potentially-scrollable
- fn is_potentially_scrollable_body(&self, can_gc: CanGc) -> bool {
+ /// <https://drafts.csswg.org/cssom-view/#potentially-scrollable>
+ pub(crate) fn is_potentially_scrollable_body(&self, can_gc: CanGc) -> bool {
+ self.is_potentially_scrollable_body_shared_logic(false, can_gc)
+ }
+
+ /// <https://drafts.csswg.org/cssom-view/#potentially-scrollable>
+ pub(crate) fn is_potentially_scrollable_body_for_scrolling_element(
+ &self,
+ can_gc: CanGc,
+ ) -> bool {
+ self.is_potentially_scrollable_body_shared_logic(true, can_gc)
+ }
+
+ /// <https://drafts.csswg.org/cssom-view/#potentially-scrollable>
+ fn is_potentially_scrollable_body_shared_logic(
+ &self,
+ treat_overflow_clip_on_parent_as_hidden: bool,
+ can_gc: CanGc,
+ ) -> bool {
let node = self.upcast::<Node>();
debug_assert!(
node.owner_doc().GetBody().as_deref() == self.downcast::<HTMLElement>(),
@@ -474,9 +492,21 @@ impl Element {
// overflow-y properties is neither visible nor clip."
if let Some(parent) = node.GetParentElement() {
if let Some(style) = parent.style(can_gc) {
- if !style.get_box().clone_overflow_x().is_scrollable() &&
- !style.get_box().clone_overflow_y().is_scrollable()
- {
+ let mut overflow_x = style.get_box().clone_overflow_x();
+ let mut overflow_y = style.get_box().clone_overflow_y();
+
+ // This fulfills the 'treat parent element overflow:clip as overflow:hidden' stipulation
+ // from the document.scrollingElement specification.
+ if treat_overflow_clip_on_parent_as_hidden {
+ if overflow_x == Overflow::Clip {
+ overflow_x = Overflow::Hidden;
+ }
+ if overflow_y == Overflow::Clip {
+ overflow_y = Overflow::Hidden;
+ }
+ }
+
+ if !overflow_x.is_scrollable() && !overflow_y.is_scrollable() {
return false;
}
};
diff --git a/components/script_bindings/codegen/Bindings.conf b/components/script_bindings/codegen/Bindings.conf
index 36bb0c1b9f4..cb33188804f 100644
--- a/components/script_bindings/codegen/Bindings.conf
+++ b/components/script_bindings/codegen/Bindings.conf
@@ -162,7 +162,7 @@ DOMInterfaces = {
'Document': {
'additionalTraits': ["crate::interfaces::DocumentHelpers"],
- 'canGc': ['Close', 'CreateElement', 'CreateElementNS', 'ImportNode', 'SetTitle', 'Write', 'Writeln', 'CreateEvent', 'CreateRange', 'Open', 'Open_', 'CreateComment', 'CreateAttribute', 'CreateAttributeNS', 'CreateDocumentFragment', 'CreateTextNode', 'CreateCDATASection', 'CreateProcessingInstruction', 'Prepend', 'Append', 'ReplaceChildren', 'SetBgColor', 'SetFgColor', 'Fonts', 'ElementFromPoint', 'ElementsFromPoint', 'ExitFullscreen', 'CreateExpression', 'CreateNSResolver', 'Evaluate', 'StyleSheets', 'Implementation', 'GetElementsByTagName', 'GetElementsByTagNameNS', 'GetElementsByClassName', 'AdoptNode', 'CreateNodeIterator', 'SetBody', 'GetElementsByName', 'Images', 'Embeds', 'Plugins', 'Links', 'Forms', 'Scripts', 'Anchors', 'Applets', 'Children', 'GetSelection'],
+ 'canGc': ['Close', 'CreateElement', 'CreateElementNS', 'ImportNode', 'SetTitle', 'Write', 'Writeln', 'CreateEvent', 'CreateRange', 'Open', 'Open_', 'CreateComment', 'CreateAttribute', 'CreateAttributeNS', 'CreateDocumentFragment', 'CreateTextNode', 'CreateCDATASection', 'CreateProcessingInstruction', 'Prepend', 'Append', 'ReplaceChildren', 'SetBgColor', 'SetFgColor', 'Fonts', 'ElementFromPoint', 'ElementsFromPoint', 'GetScrollingElement', 'ExitFullscreen', 'CreateExpression', 'CreateNSResolver', 'Evaluate', 'StyleSheets', 'Implementation', 'GetElementsByTagName', 'GetElementsByTagNameNS', 'GetElementsByClassName', 'AdoptNode', 'CreateNodeIterator', 'SetBody', 'GetElementsByName', 'Images', 'Embeds', 'Plugins', 'Links', 'Forms', 'Scripts', 'Anchors', 'Applets', 'Children', 'GetSelection'],
},
'DissimilarOriginWindow': {
diff --git a/components/script_bindings/webidls/Document.webidl b/components/script_bindings/webidls/Document.webidl
index 4af7dcc2c7a..737e74d3bf2 100644
--- a/components/script_bindings/webidls/Document.webidl
+++ b/components/script_bindings/webidls/Document.webidl
@@ -204,6 +204,16 @@ partial interface Document {
Document includes DocumentOrShadowRoot;
+// https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface
+partial interface Document {
+ // CaretPosition? caretPositionFromPoint(double x, double y, optional CaretPositionFromPointOptions options = {});
+ readonly attribute Element? scrollingElement;
+};
+
+// dictionary CaretPositionFromPointOptions {
+// sequence<ShadowRoot> shadowRoots = [];
+// };
+
// https://w3c.github.io/selection-api/#dom-document
partial interface Document {
Selection? getSelection();
diff --git a/tests/wpt/meta/MANIFEST.json b/tests/wpt/meta/MANIFEST.json
index 7b631710b77..1469a123dd5 100644
--- a/tests/wpt/meta/MANIFEST.json
+++ b/tests/wpt/meta/MANIFEST.json
@@ -617753,7 +617753,7 @@
]
],
"scrollingElement.html": [
- "408fa47be9a3330aff88ef01e9b8be90fd4008ce",
+ "093c016da557ff867f86b13f5dff9c6d118230ff",
[
null,
{}
diff --git a/tests/wpt/meta/css/css-tables/no-overflow-with-table-cell-margins.html.ini b/tests/wpt/meta/css/css-tables/no-overflow-with-table-cell-margins.html.ini
deleted file mode 100644
index bbb1bb66008..00000000000
--- a/tests/wpt/meta/css/css-tables/no-overflow-with-table-cell-margins.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[no-overflow-with-table-cell-margins.html]
- [no-overflow-with-table-cell-margins]
- expected: FAIL
diff --git a/tests/wpt/meta/css/cssom-view/HTMLBody-ScrollArea_quirksmode.html.ini b/tests/wpt/meta/css/cssom-view/HTMLBody-ScrollArea_quirksmode.html.ini
index 4a680249460..0706a804437 100644
--- a/tests/wpt/meta/css/cssom-view/HTMLBody-ScrollArea_quirksmode.html.ini
+++ b/tests/wpt/meta/css/cssom-view/HTMLBody-ScrollArea_quirksmode.html.ini
@@ -1,13 +1,4 @@
[HTMLBody-ScrollArea_quirksmode.html]
- [document.scrollingElement should be body element in quirks.]
- expected: FAIL
-
- [scrollingElement in quirks should be null when body is potentially scrollable.]
- expected: FAIL
-
- [scrollingElement in quirks should be body if any of document and body has a visible overflow.]
- expected: FAIL
-
[When body potentially scrollable, document.body.scrollHeight changes when changing the height of the body content in quirks.]
expected: FAIL
diff --git a/tests/wpt/meta/css/cssom-view/idlharness.html.ini b/tests/wpt/meta/css/cssom-view/idlharness.html.ini
index 24583c6b095..497db91deed 100644
--- a/tests/wpt/meta/css/cssom-view/idlharness.html.ini
+++ b/tests/wpt/meta/css/cssom-view/idlharness.html.ini
@@ -38,9 +38,6 @@
[Window interface: window must inherit property "screenTop" with the proper type]
expected: FAIL
- [Document interface: attribute scrollingElement]
- expected: FAIL
-
[CSSPseudoElement interface: operation convertRectFromNode(DOMRectReadOnly, GeometryNode, ConvertCoordinateOptions)]
expected: FAIL
@@ -107,9 +104,6 @@
[Document interface: document must inherit property "convertRectFromNode(DOMRectReadOnly, GeometryNode, ConvertCoordinateOptions)" with the proper type]
expected: FAIL
- [Document interface: document must inherit property "scrollingElement" with the proper type]
- expected: FAIL
-
[CaretPosition interface object name]
expected: FAIL
diff --git a/tests/wpt/meta/css/cssom-view/scroll-behavior-main-frame-root.html.ini b/tests/wpt/meta/css/cssom-view/scroll-behavior-main-frame-root.html.ini
index cee83d041ad..c1f7e177f65 100644
--- a/tests/wpt/meta/css/cssom-view/scroll-behavior-main-frame-root.html.ini
+++ b/tests/wpt/meta/css/cssom-view/scroll-behavior-main-frame-root.html.ini
@@ -1,13 +1,4 @@
[scroll-behavior-main-frame-root.html]
- [Main frame with auto scroll-behavior ; scroll() with default behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scroll() with auto behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scroll() with instant behavior]
- expected: FAIL
-
[Main frame with auto scroll-behavior ; scroll() with smooth behavior]
expected: FAIL
@@ -17,21 +8,9 @@
[Main frame with smooth scroll-behavior ; scroll() with auto behavior]
expected: FAIL
- [Main frame with smooth scroll-behavior ; scroll() with instant behavior]
- expected: FAIL
-
[Main frame with smooth scroll-behavior ; scroll() with smooth behavior]
expected: FAIL
- [Main frame with auto scroll-behavior ; scrollTo() with default behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scrollTo() with auto behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scrollTo() with instant behavior]
- expected: FAIL
-
[Main frame with auto scroll-behavior ; scrollTo() with smooth behavior]
expected: FAIL
@@ -41,21 +20,9 @@
[Main frame with smooth scroll-behavior ; scrollTo() with auto behavior]
expected: FAIL
- [Main frame with smooth scroll-behavior ; scrollTo() with instant behavior]
- expected: FAIL
-
[Main frame with smooth scroll-behavior ; scrollTo() with smooth behavior]
expected: FAIL
- [Main frame with auto scroll-behavior ; scrollBy() with default behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scrollBy() with auto behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scrollBy() with instant behavior]
- expected: FAIL
-
[Main frame with auto scroll-behavior ; scrollBy() with smooth behavior]
expected: FAIL
@@ -65,9 +32,6 @@
[Main frame with smooth scroll-behavior ; scrollBy() with auto behavior]
expected: FAIL
- [Main frame with smooth scroll-behavior ; scrollBy() with instant behavior]
- expected: FAIL
-
[Main frame with smooth scroll-behavior ; scrollBy() with smooth behavior]
expected: FAIL
@@ -95,23 +59,11 @@
[Main frame with smooth scroll-behavior ; scrollIntoView() with smooth behavior]
expected: FAIL
- [Set scrollLeft to frame with auto scroll-behavior]
- expected: FAIL
-
[Set scrollLeft to frame with smooth scroll-behavior]
expected: FAIL
- [Set scrollTop to frame with auto scroll-behavior]
- expected: FAIL
-
[Set scrollTop to frame with smooth scroll-behavior]
expected: FAIL
- [Aborting an ongoing smooth scrolling on the main frame with another smooth scrolling]
- expected: FAIL
-
- [Aborting an ongoing smooth scrolling on the main frame with an instant scrolling]
- expected: FAIL
-
[Make sure the page is ready for animation.]
expected: FAIL
diff --git a/tests/wpt/meta/css/cssom-view/scroll-behavior-main-frame-window.html.ini b/tests/wpt/meta/css/cssom-view/scroll-behavior-main-frame-window.html.ini
index 3a6f134e005..9924a3618c7 100644
--- a/tests/wpt/meta/css/cssom-view/scroll-behavior-main-frame-window.html.ini
+++ b/tests/wpt/meta/css/cssom-view/scroll-behavior-main-frame-window.html.ini
@@ -1,13 +1,4 @@
[scroll-behavior-main-frame-window.html]
- [Main frame with auto scroll-behavior ; scroll() with default behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scroll() with auto behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scroll() with instant behavior]
- expected: FAIL
-
[Main frame with auto scroll-behavior ; scroll() with smooth behavior]
expected: FAIL
@@ -17,21 +8,9 @@
[Main frame with smooth scroll-behavior ; scroll() with auto behavior]
expected: FAIL
- [Main frame with smooth scroll-behavior ; scroll() with instant behavior]
- expected: FAIL
-
[Main frame with smooth scroll-behavior ; scroll() with smooth behavior]
expected: FAIL
- [Main frame with auto scroll-behavior ; scrollTo() with default behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scrollTo() with auto behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scrollTo() with instant behavior]
- expected: FAIL
-
[Main frame with auto scroll-behavior ; scrollTo() with smooth behavior]
expected: FAIL
@@ -41,21 +20,9 @@
[Main frame with smooth scroll-behavior ; scrollTo() with auto behavior]
expected: FAIL
- [Main frame with smooth scroll-behavior ; scrollTo() with instant behavior]
- expected: FAIL
-
[Main frame with smooth scroll-behavior ; scrollTo() with smooth behavior]
expected: FAIL
- [Main frame with auto scroll-behavior ; scrollBy() with default behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scrollBy() with auto behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scrollBy() with instant behavior]
- expected: FAIL
-
[Main frame with auto scroll-behavior ; scrollBy() with smooth behavior]
expected: FAIL
@@ -65,17 +32,8 @@
[Main frame with smooth scroll-behavior ; scrollBy() with auto behavior]
expected: FAIL
- [Main frame with smooth scroll-behavior ; scrollBy() with instant behavior]
- expected: FAIL
-
[Main frame with smooth scroll-behavior ; scrollBy() with smooth behavior]
expected: FAIL
- [Aborting an ongoing smooth scrolling on the main frame with another smooth scrolling]
- expected: FAIL
-
- [Aborting an ongoing smooth scrolling on the main frame with an instant scrolling]
- expected: FAIL
-
[Make sure the page is ready for animation.]
expected: FAIL
diff --git a/tests/wpt/meta/css/cssom-view/scroll-behavior-subframe-root.html.ini b/tests/wpt/meta/css/cssom-view/scroll-behavior-subframe-root.html.ini
index 16fec73ff53..5e78bd369ba 100644
--- a/tests/wpt/meta/css/cssom-view/scroll-behavior-subframe-root.html.ini
+++ b/tests/wpt/meta/css/cssom-view/scroll-behavior-subframe-root.html.ini
@@ -1,13 +1,4 @@
[scroll-behavior-subframe-root.html]
- [Subframe with auto scroll-behavior ; scroll() with default behavior]
- expected: FAIL
-
- [Subframe with auto scroll-behavior ; scroll() with auto behavior]
- expected: FAIL
-
- [Subframe with auto scroll-behavior ; scroll() with instant behavior]
- expected: FAIL
-
[Subframe with auto scroll-behavior ; scroll() with smooth behavior]
expected: FAIL
@@ -17,21 +8,9 @@
[Subframe with smooth scroll-behavior ; scroll() with auto behavior]
expected: FAIL
- [Subframe with smooth scroll-behavior ; scroll() with instant behavior]
- expected: FAIL
-
[Subframe with smooth scroll-behavior ; scroll() with smooth behavior]
expected: FAIL
- [Subframe with auto scroll-behavior ; scrollTo() with default behavior]
- expected: FAIL
-
- [Subframe with auto scroll-behavior ; scrollTo() with auto behavior]
- expected: FAIL
-
- [Subframe with auto scroll-behavior ; scrollTo() with instant behavior]
- expected: FAIL
-
[Subframe with auto scroll-behavior ; scrollTo() with smooth behavior]
expected: FAIL
@@ -41,21 +20,9 @@
[Subframe with smooth scroll-behavior ; scrollTo() with auto behavior]
expected: FAIL
- [Subframe with smooth scroll-behavior ; scrollTo() with instant behavior]
- expected: FAIL
-
[Subframe with smooth scroll-behavior ; scrollTo() with smooth behavior]
expected: FAIL
- [Subframe with auto scroll-behavior ; scrollBy() with default behavior]
- expected: FAIL
-
- [Subframe with auto scroll-behavior ; scrollBy() with auto behavior]
- expected: FAIL
-
- [Subframe with auto scroll-behavior ; scrollBy() with instant behavior]
- expected: FAIL
-
[Subframe with auto scroll-behavior ; scrollBy() with smooth behavior]
expected: FAIL
@@ -65,9 +32,6 @@
[Subframe with smooth scroll-behavior ; scrollBy() with auto behavior]
expected: FAIL
- [Subframe with smooth scroll-behavior ; scrollBy() with instant behavior]
- expected: FAIL
-
[Subframe with smooth scroll-behavior ; scrollBy() with smooth behavior]
expected: FAIL
@@ -95,23 +59,11 @@
[Subframe with smooth scroll-behavior ; scrollIntoView() with smooth behavior]
expected: FAIL
- [Subframe setting scrollLeft with auto scroll-behavior]
- expected: FAIL
-
[Subframe setting scrollLeft with smooth scroll-behavior]
expected: FAIL
- [Subframe setting scrollTop with auto scroll-behavior]
- expected: FAIL
-
[Subframe setting scrollTop with smooth scroll-behavior]
expected: FAIL
- [Aborting an ongoing smooth scrolling on a subframe with another smooth scrolling]
- expected: FAIL
-
- [Aborting an ongoing smooth scrolling on a subframe with an instant scrolling]
- expected: FAIL
-
[Make sure the page is ready for animation.]
expected: FAIL
diff --git a/tests/wpt/meta/css/cssom-view/scroll-behavior-subframe-window.html.ini b/tests/wpt/meta/css/cssom-view/scroll-behavior-subframe-window.html.ini
index 3ad50289fd8..0b3cc1c39c0 100644
--- a/tests/wpt/meta/css/cssom-view/scroll-behavior-subframe-window.html.ini
+++ b/tests/wpt/meta/css/cssom-view/scroll-behavior-subframe-window.html.ini
@@ -1,13 +1,4 @@
[scroll-behavior-subframe-window.html]
- [Main frame with auto scroll-behavior ; scroll() with default behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scroll() with auto behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scroll() with instant behavior]
- expected: FAIL
-
[Main frame with auto scroll-behavior ; scroll() with smooth behavior]
expected: FAIL
@@ -17,21 +8,9 @@
[Main frame with smooth scroll-behavior ; scroll() with auto behavior]
expected: FAIL
- [Main frame with smooth scroll-behavior ; scroll() with instant behavior]
- expected: FAIL
-
[Main frame with smooth scroll-behavior ; scroll() with smooth behavior]
expected: FAIL
- [Main frame with auto scroll-behavior ; scrollTo() with default behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scrollTo() with auto behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scrollTo() with instant behavior]
- expected: FAIL
-
[Main frame with auto scroll-behavior ; scrollTo() with smooth behavior]
expected: FAIL
@@ -41,21 +20,9 @@
[Main frame with smooth scroll-behavior ; scrollTo() with auto behavior]
expected: FAIL
- [Main frame with smooth scroll-behavior ; scrollTo() with instant behavior]
- expected: FAIL
-
[Main frame with smooth scroll-behavior ; scrollTo() with smooth behavior]
expected: FAIL
- [Main frame with auto scroll-behavior ; scrollBy() with default behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scrollBy() with auto behavior]
- expected: FAIL
-
- [Main frame with auto scroll-behavior ; scrollBy() with instant behavior]
- expected: FAIL
-
[Main frame with auto scroll-behavior ; scrollBy() with smooth behavior]
expected: FAIL
@@ -65,17 +32,8 @@
[Main frame with smooth scroll-behavior ; scrollBy() with auto behavior]
expected: FAIL
- [Main frame with smooth scroll-behavior ; scrollBy() with instant behavior]
- expected: FAIL
-
[Main frame with smooth scroll-behavior ; scrollBy() with smooth behavior]
expected: FAIL
- [Aborting an ongoing smooth scrolling on the main frame with another smooth scrolling]
- expected: FAIL
-
- [Aborting an ongoing smooth scrolling on the main frame with an instant scrolling]
- expected: FAIL
-
[Make sure the page is ready for animation.]
expected: FAIL
diff --git a/tests/wpt/meta/css/cssom-view/scroll-overflow-clip-quirks-001.html.ini b/tests/wpt/meta/css/cssom-view/scroll-overflow-clip-quirks-001.html.ini
deleted file mode 100644
index 74a553beea5..00000000000
--- a/tests/wpt/meta/css/cssom-view/scroll-overflow-clip-quirks-001.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[scroll-overflow-clip-quirks-001.html]
- [CSSOM scrollingElement reflects the propagated scroll to viewport correctly]
- expected: FAIL
-
diff --git a/tests/wpt/meta/css/cssom-view/scroll-overflow-clip-quirks-002.html.ini b/tests/wpt/meta/css/cssom-view/scroll-overflow-clip-quirks-002.html.ini
deleted file mode 100644
index 745bc5a05cc..00000000000
--- a/tests/wpt/meta/css/cssom-view/scroll-overflow-clip-quirks-002.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[scroll-overflow-clip-quirks-002.html]
- [CSSOM scrollingElement reflects the propagated scroll to viewport correctly]
- expected: FAIL
-
diff --git a/tests/wpt/meta/css/cssom-view/scrolling-quirks-vs-nonquirks.html.ini b/tests/wpt/meta/css/cssom-view/scrolling-quirks-vs-nonquirks.html.ini
index ccfa50ad607..c8c740d957e 100644
--- a/tests/wpt/meta/css/cssom-view/scrolling-quirks-vs-nonquirks.html.ini
+++ b/tests/wpt/meta/css/cssom-view/scrolling-quirks-vs-nonquirks.html.ini
@@ -1,22 +1,10 @@
[scrolling-quirks-vs-nonquirks.html]
- [scrollingElement in non-quirks mode]
- expected: FAIL
-
- [scrollLeft/scrollRight of the content in quirks mode]
- expected: FAIL
-
[scrollWidth/scrollHeight on the root element in non-quirks mode]
expected: FAIL
- [scrollingElement in quirks mode]
- expected: FAIL
-
[scrollWidth/scrollHeight on the root element in quirks mode]
expected: FAIL
- [scrollLeft/scrollRight of the content in non-quirks mode]
- expected: FAIL
-
[scrollWidth/scrollHeight on the HTML body element in quirks mode]
expected: FAIL
diff --git a/tests/wpt/meta/css/cssom-view/scrollingElement.html.ini b/tests/wpt/meta/css/cssom-view/scrollingElement.html.ini
deleted file mode 100644
index 2feec30bf75..00000000000
--- a/tests/wpt/meta/css/cssom-view/scrollingElement.html.ini
+++ /dev/null
@@ -1,28 +0,0 @@
-[scrollingElement.html]
- [scrollingElement in quirks mode]
- expected: FAIL
-
- [scrollingElement in no-quirks mode]
- expected: FAIL
-
- [scrollingElement in quirks mode (body table)]
- expected: FAIL
-
- [scrollingElement in no-quirks mode ]
- expected: FAIL
-
- [scrollingElement in no-quirks mode (root table)]
- expected: FAIL
-
- [scrollingElement in no-quirks mode (body table)]
- expected: FAIL
-
- [scrollingElement in quirks mode (root table, body table)]
- expected: FAIL
-
- [scrollingElement in quirks mode (root table)]
- expected: FAIL
-
- [scrollingElement in no-quirks mode (root table, body table)]
- expected: FAIL
-
diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/scroll-to-fragid/003.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/scroll-to-fragid/003.html.ini
deleted file mode 100644
index 1451a483f9d..00000000000
--- a/tests/wpt/meta/html/browsers/browsing-the-web/scroll-to-fragid/003.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[003.html]
- [Fragment Navigation: Updating scroll position]
- expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/cross-origin-iframe.sub.html.ini b/tests/wpt/meta/intersection-observer/cross-origin-iframe.sub.html.ini
index 39e6d266369..1dc79136c28 100644
--- a/tests/wpt/meta/intersection-observer/cross-origin-iframe.sub.html.ini
+++ b/tests/wpt/meta/intersection-observer/cross-origin-iframe.sub.html.ini
@@ -1,6 +1,12 @@
[cross-origin-iframe.sub.html]
- [Intersection observer test with no explicit root and target in a cross-origin iframe.]
+ [First rAF]
expected: FAIL
- [First rAF]
+ [topDocument.scrollingElement.scrollTop = 200]
+ expected: FAIL
+
+ [iframeDocument.scrollingElement.scrollTop = 250]
+ expected: FAIL
+
+ [topDocument.scrollingElement.scrollTop = 100]
expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/disconnect.html.ini b/tests/wpt/meta/intersection-observer/disconnect.html.ini
deleted file mode 100644
index 70b23aa0569..00000000000
--- a/tests/wpt/meta/intersection-observer/disconnect.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[disconnect.html]
- [First rAF.]
- expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/iframe-no-root-with-wrapping-scroller.html.ini b/tests/wpt/meta/intersection-observer/iframe-no-root-with-wrapping-scroller.html.ini
index ba933b6acf4..6487e5369be 100644
--- a/tests/wpt/meta/intersection-observer/iframe-no-root-with-wrapping-scroller.html.ini
+++ b/tests/wpt/meta/intersection-observer/iframe-no-root-with-wrapping-scroller.html.ini
@@ -1,3 +1,9 @@
[iframe-no-root-with-wrapping-scroller.html]
[First rAF.]
expected: FAIL
+
+ [iframe.contentDocument.scrollingElement.scrollTop = 250]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = 100]
+ expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/iframe-no-root.html.ini b/tests/wpt/meta/intersection-observer/iframe-no-root.html.ini
index be9635ba685..ed3bea4c34d 100644
--- a/tests/wpt/meta/intersection-observer/iframe-no-root.html.ini
+++ b/tests/wpt/meta/intersection-observer/iframe-no-root.html.ini
@@ -1,3 +1,9 @@
[iframe-no-root.html]
[First rAF.]
expected: FAIL
+
+ [iframe.contentDocument.scrollingElement.scrollTop = 250]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = 100]
+ expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/multiple-targets.html.ini b/tests/wpt/meta/intersection-observer/multiple-targets.html.ini
index 9d26cd2fde2..bfead81117d 100644
--- a/tests/wpt/meta/intersection-observer/multiple-targets.html.ini
+++ b/tests/wpt/meta/intersection-observer/multiple-targets.html.ini
@@ -1,3 +1,9 @@
[multiple-targets.html]
- [First rAF.]
+ [document.scrollingElement.scrollTop = 150]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = 10000]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = 0]
expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/multiple-thresholds.html.ini b/tests/wpt/meta/intersection-observer/multiple-thresholds.html.ini
index c5d1a5e1a88..89a8f635fa1 100644
--- a/tests/wpt/meta/intersection-observer/multiple-thresholds.html.ini
+++ b/tests/wpt/meta/intersection-observer/multiple-thresholds.html.ini
@@ -1,3 +1,21 @@
[multiple-thresholds.html]
- [First rAF.]
+ [document.scrollingElement.scrollTop = 120]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = 160]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = 200]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = 240]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = window.innerHeight + 140]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = window.innerHeight + 160]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = window.innerHeight + 200]
expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/observer-without-js-reference.html.ini b/tests/wpt/meta/intersection-observer/observer-without-js-reference.html.ini
index 196dea7cff3..5edab7dcccc 100644
--- a/tests/wpt/meta/intersection-observer/observer-without-js-reference.html.ini
+++ b/tests/wpt/meta/intersection-observer/observer-without-js-reference.html.ini
@@ -1,3 +1,3 @@
[observer-without-js-reference.html]
- [First rAF]
+ [document.scrollingElement.scrollTop = 300]
expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/root-margin-root-element.html.ini b/tests/wpt/meta/intersection-observer/root-margin-root-element.html.ini
index 28a499dc515..5c69cfd2345 100644
--- a/tests/wpt/meta/intersection-observer/root-margin-root-element.html.ini
+++ b/tests/wpt/meta/intersection-observer/root-margin-root-element.html.ini
@@ -1,3 +1,15 @@
[root-margin-root-element.html]
[First rAF]
expected: FAIL
+
+ [root.scrollTop = 50, putting target into root margin]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = 0.]
+ expected: FAIL
+
+ [root.scrollTop = 0]
+ expected: FAIL
+
+ [root.scrollTop = 50 with root scrolled out of view.]
+ expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/root-margin.html.ini b/tests/wpt/meta/intersection-observer/root-margin.html.ini
index 6582614d5a2..788b5f1704b 100644
--- a/tests/wpt/meta/intersection-observer/root-margin.html.ini
+++ b/tests/wpt/meta/intersection-observer/root-margin.html.ini
@@ -1,3 +1,9 @@
[root-margin.html]
- [First rAF.]
+ [document.scrollingElement.scrollLeft = 100]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = document.documentElement.clientHeight + 200]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = document.documentElement.clientHeight + 300]
expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/same-document-no-root.html.ini b/tests/wpt/meta/intersection-observer/same-document-no-root.html.ini
index 3d804678295..06e8519b1e8 100644
--- a/tests/wpt/meta/intersection-observer/same-document-no-root.html.ini
+++ b/tests/wpt/meta/intersection-observer/same-document-no-root.html.ini
@@ -1,3 +1,6 @@
[same-document-no-root.html]
- [First rAF.]
+ [document.scrollingElement.scrollTop = 300]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = 100]
expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/same-document-root.html.ini b/tests/wpt/meta/intersection-observer/same-document-root.html.ini
index d5887744fb3..85bac42f7c5 100644
--- a/tests/wpt/meta/intersection-observer/same-document-root.html.ini
+++ b/tests/wpt/meta/intersection-observer/same-document-root.html.ini
@@ -1,3 +1,15 @@
[same-document-root.html]
[First rAF]
expected: FAIL
+
+ [root.scrollTop = 150 with root scrolled into view.]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = 0.]
+ expected: FAIL
+
+ [root.scrollTop = 0]
+ expected: FAIL
+
+ [root.scrollTop = 150 with root scrolled out of view.]
+ expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/same-document-with-document-root.html.ini b/tests/wpt/meta/intersection-observer/same-document-with-document-root.html.ini
index 436759cb8a2..2875cd435bf 100644
--- a/tests/wpt/meta/intersection-observer/same-document-with-document-root.html.ini
+++ b/tests/wpt/meta/intersection-observer/same-document-with-document-root.html.ini
@@ -1,3 +1,3 @@
[same-document-with-document-root.html]
- [First rAF.]
+ [document.scrollingElement.scrollTop = 300]
expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/same-document-zero-size-target.html.ini b/tests/wpt/meta/intersection-observer/same-document-zero-size-target.html.ini
index e178b0184da..6a06e9f9894 100644
--- a/tests/wpt/meta/intersection-observer/same-document-zero-size-target.html.ini
+++ b/tests/wpt/meta/intersection-observer/same-document-zero-size-target.html.ini
@@ -1,3 +1,6 @@
[same-document-zero-size-target.html]
- [First rAF]
+ [document.scrollingElement.scrollTop = 300]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = 100]
expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/svg-clipped-rect-target.html.ini b/tests/wpt/meta/intersection-observer/svg-clipped-rect-target.html.ini
index 96836f858d7..918c4b3c999 100644
--- a/tests/wpt/meta/intersection-observer/svg-clipped-rect-target.html.ini
+++ b/tests/wpt/meta/intersection-observer/svg-clipped-rect-target.html.ini
@@ -1,3 +1,9 @@
[svg-clipped-rect-target.html]
[First rAF.]
expected: FAIL
+
+ [document.scrollingElement.scrollTop = 300]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = 100]
+ expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/svg-intersection-with-fractional-bounds.html.ini b/tests/wpt/meta/intersection-observer/svg-intersection-with-fractional-bounds.html.ini
index e5e86352686..dd78613c564 100644
--- a/tests/wpt/meta/intersection-observer/svg-intersection-with-fractional-bounds.html.ini
+++ b/tests/wpt/meta/intersection-observer/svg-intersection-with-fractional-bounds.html.ini
@@ -1,3 +1,9 @@
[svg-intersection-with-fractional-bounds.html]
[Initial Observation]
expected: FAIL
+
+ [Intersection observation after scrolling 300]
+ expected: FAIL
+
+ [Intersection observation after scrolling 100]
+ expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/svg-rect-target.html.ini b/tests/wpt/meta/intersection-observer/svg-rect-target.html.ini
index 4479d819751..74b0f15ef50 100644
--- a/tests/wpt/meta/intersection-observer/svg-rect-target.html.ini
+++ b/tests/wpt/meta/intersection-observer/svg-rect-target.html.ini
@@ -1,3 +1,9 @@
[svg-rect-target.html]
[First rAF.]
expected: FAIL
+
+ [document.scrollingElement.scrollTop = 300]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = 100]
+ expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/text-target.html.ini b/tests/wpt/meta/intersection-observer/text-target.html.ini
index 6429c79785f..f9386c6734a 100644
--- a/tests/wpt/meta/intersection-observer/text-target.html.ini
+++ b/tests/wpt/meta/intersection-observer/text-target.html.ini
@@ -1,3 +1,6 @@
[text-target.html]
- [First rAF.]
+ [document.scrollingElement.scrollTop = 300]
+ expected: FAIL
+
+ [document.scrollingElement.scrollTop = 100]
expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/timestamp.html.ini b/tests/wpt/meta/intersection-observer/timestamp.html.ini
index 06830463612..505a56aaf94 100644
--- a/tests/wpt/meta/intersection-observer/timestamp.html.ini
+++ b/tests/wpt/meta/intersection-observer/timestamp.html.ini
@@ -1,3 +1,3 @@
[timestamp.html]
- [First rAF after iframe is loaded.]
+ [Generate notifications.]
expected: FAIL
diff --git a/tests/wpt/meta/intersection-observer/visibility-hidden.html.ini b/tests/wpt/meta/intersection-observer/visibility-hidden.html.ini
index 44f86883791..63cf719796e 100644
--- a/tests/wpt/meta/intersection-observer/visibility-hidden.html.ini
+++ b/tests/wpt/meta/intersection-observer/visibility-hidden.html.ini
@@ -1,3 +1,3 @@
[visibility-hidden.html]
- [First rAF.]
+ [document.scrollingElement.scrollTop = 300]
expected: FAIL
diff --git a/tests/wpt/tests/css/cssom-view/scrollingElement.html b/tests/wpt/tests/css/cssom-view/scrollingElement.html
index 408fa47be9a..093c016da55 100644
--- a/tests/wpt/tests/css/cssom-view/scrollingElement.html
+++ b/tests/wpt/tests/css/cssom-view/scrollingElement.html
@@ -35,6 +35,18 @@ function quirksTest(rootDisplay, bodyDisplay) {
assert_equals(quirksDoc.scrollingElement, quirksDoc.body,
"scrollingElement in quirks mode should default to body element.");
+ quirksDoc.documentElement.style.overflow = "clip";
+ quirksDoc.body.style.overflow = "auto";
+ assert_equals(quirksDoc.scrollingElement, null);
+ quirksDoc.body.style.overflow = "hidden";
+ assert_equals(quirksDoc.scrollingElement, null);
+ quirksDoc.body.style.overflow = "scroll";
+ assert_equals(quirksDoc.scrollingElement, null);
+ quirksDoc.body.style.overflow = "visible";
+ assert_equals(quirksDoc.scrollingElement, quirksDoc.body);
+ quirksDoc.body.style.overflow = "clip";
+ assert_equals(quirksDoc.scrollingElement, quirksDoc.body);
+
quirksDoc.documentElement.style.overflow = "scroll";
quirksDoc.body.style.overflow = "scroll";
assert_equals(quirksDoc.scrollingElement, null,