diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 5c8232ddebd..b453547365f 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -490,7 +490,8 @@ impl IOCompositor { self.ready_to_save_state, ReadyState::WaitingForConstellationReply ); - if is_ready && !self.waiting_on_pending_frame { + if is_ready && !self.waiting_on_pending_frame && !self.waiting_for_results_of_scroll + { self.ready_to_save_state = ReadyState::ReadyToSaveImage; if self.is_running_problem_test { println!("ready to save image!"); @@ -623,8 +624,11 @@ impl IOCompositor { scroll_id, clamping, )) => { + self.waiting_for_results_of_scroll = true; + let mut txn = webrender_api::Transaction::new(); txn.scroll_node_with_id(point, scroll_id, clamping); + txn.generate_frame(); self.webrender_api .send_transaction(self.webrender_document, txn); }, diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 2364c1c7f72..9b60272f6e7 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -1708,13 +1708,18 @@ impl Window { let body = self.Document().GetBody(); let (x, y) = match body { Some(e) => { - let scroll_area = e.upcast::().scroll_area(); + // This doesn't properly take into account the overflow set on + // and the root element, which might affect how much the root can + // scroll. That requires properly handling propagating those values + // according to the rules defined in in the specification at: + // https://w3c.github.io/csswg-drafts/css-overflow/#overflow-propagation + let scroll_area = e.upcast::().bounding_content_box_or_zero(); ( xfinite - .min(scroll_area.width() as f64 - viewport.width as f64) + .min(scroll_area.width().to_f64_px() - viewport.width as f64) .max(0.0f64), yfinite - .min(scroll_area.height() as f64 - viewport.height as f64) + .min(scroll_area.height().to_f64_px() - viewport.height as f64) .max(0.0f64), ) }, diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/long_scroll_composited.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/long_scroll_composited.html.ini deleted file mode 100644 index 78492fe9051..00000000000 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/long_scroll_composited.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[long_scroll_composited.html] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/scrolling-quirks-vs-nonquirks.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/scrolling-quirks-vs-nonquirks.html.ini index 99173dec8cf..993cbe0ae7f 100644 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/scrolling-quirks-vs-nonquirks.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/scrolling-quirks-vs-nonquirks.html.ini @@ -34,3 +34,21 @@ [scrollLeft/scrollTop on the HTML body element in non-quirks mode] expected: FAIL + + [scroll() on the root element in non-quirks mode] + expected: FAIL + + [scrollBy() on the root element in non-quirks mode] + expected: FAIL + + [scrollLeft/scrollTop on the root element in non-quirks mode] + expected: FAIL + + [scroll() on the HTML body element in quirks mode] + expected: FAIL + + [scrollBy() on the HTML body element in quirks mode] + expected: FAIL + + [scrollLeft/scrollTop on the HTML body element in quirks mode] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/filter-effects/backdrop-filter-edge-behavior.html.ini b/tests/wpt/metadata-layout-2020/css/filter-effects/backdrop-filter-edge-behavior.html.ini deleted file mode 100644 index c7127e471f6..00000000000 --- a/tests/wpt/metadata-layout-2020/css/filter-effects/backdrop-filter-edge-behavior.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[backdrop-filter-edge-behavior.html] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/filter-effects/filtered-html-is-not-container.html.ini b/tests/wpt/metadata-layout-2020/css/filter-effects/filtered-html-is-not-container.html.ini new file mode 100644 index 00000000000..b366310b98b --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/filter-effects/filtered-html-is-not-container.html.ini @@ -0,0 +1,2 @@ +[filtered-html-is-not-container.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/filter-effects/filtered-inline-is-container.html.ini b/tests/wpt/metadata-layout-2020/css/filter-effects/filtered-inline-is-container.html.ini new file mode 100644 index 00000000000..b41a8df9ac0 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/filter-effects/filtered-inline-is-container.html.ini @@ -0,0 +1,2 @@ +[filtered-inline-is-container.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-position/sticky/position-sticky-bottom-002.html.ini b/tests/wpt/metadata/css/css-position/sticky/position-sticky-bottom-002.html.ini deleted file mode 100644 index 5364e331a89..00000000000 --- a/tests/wpt/metadata/css/css-position/sticky/position-sticky-bottom-002.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[position-sticky-bottom-002.html] - expected: FAIL diff --git a/tests/wpt/metadata/css/css-position/sticky/position-sticky-flexbox.html.ini b/tests/wpt/metadata/css/css-position/sticky/position-sticky-flexbox.html.ini deleted file mode 100644 index 888c40c46df..00000000000 --- a/tests/wpt/metadata/css/css-position/sticky/position-sticky-flexbox.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[position-sticky-flexbox.html] - expected: FAIL diff --git a/tests/wpt/metadata/css/css-position/sticky/position-sticky-rendering.html.ini b/tests/wpt/metadata/css/css-position/sticky/position-sticky-rendering.html.ini deleted file mode 100644 index 2831b2eabe7..00000000000 --- a/tests/wpt/metadata/css/css-position/sticky/position-sticky-rendering.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[position-sticky-rendering.html] - expected: FAIL diff --git a/tests/wpt/metadata/css/css-position/sticky/position-sticky-top-002.html.ini b/tests/wpt/metadata/css/css-position/sticky/position-sticky-top-002.html.ini deleted file mode 100644 index b9bbb318328..00000000000 --- a/tests/wpt/metadata/css/css-position/sticky/position-sticky-top-002.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[position-sticky-top-002.html] - expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/long_scroll_composited.html.ini b/tests/wpt/metadata/css/cssom-view/long_scroll_composited.html.ini deleted file mode 100644 index 78492fe9051..00000000000 --- a/tests/wpt/metadata/css/cssom-view/long_scroll_composited.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[long_scroll_composited.html] - expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/scrolling-quirks-vs-nonquirks.html.ini b/tests/wpt/metadata/css/cssom-view/scrolling-quirks-vs-nonquirks.html.ini index b63dd7da4f6..791c8776104 100644 --- a/tests/wpt/metadata/css/cssom-view/scrolling-quirks-vs-nonquirks.html.ini +++ b/tests/wpt/metadata/css/cssom-view/scrolling-quirks-vs-nonquirks.html.ini @@ -34,3 +34,21 @@ [scrollLeft/scrollRight of the content in non-quirks mode] expected: FAIL + + [scroll() on the root element in non-quirks mode] + expected: FAIL + + [scrollBy() on the root element in non-quirks mode] + expected: FAIL + + [scrollLeft/scrollTop on the root element in non-quirks mode] + expected: FAIL + + [scroll() on the HTML body element in quirks mode] + expected: FAIL + + [scrollBy() on the HTML body element in quirks mode] + expected: FAIL + + [scrollLeft/scrollTop on the HTML body element in quirks mode] + expected: FAIL diff --git a/tests/wpt/metadata/css/filter-effects/filtered-inline-is-container.html.ini b/tests/wpt/metadata/css/filter-effects/filtered-inline-is-container.html.ini new file mode 100644 index 00000000000..b41a8df9ac0 --- /dev/null +++ b/tests/wpt/metadata/css/filter-effects/filtered-inline-is-container.html.ini @@ -0,0 +1,2 @@ +[filtered-inline-is-container.html] + expected: FAIL diff --git a/tests/wpt/mozilla/meta/mozilla/scroll_root.html.ini b/tests/wpt/mozilla/meta/mozilla/scroll_root.html.ini deleted file mode 100644 index ef9d00edd6e..00000000000 --- a/tests/wpt/mozilla/meta/mozilla/scroll_root.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[scroll_root.html] - expected: FAIL