From 9c7b9fa32d43c51acadd7bb408ba94161aadb4e6 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 22 Jan 2016 18:02:19 -0800 Subject: [PATCH] layout: Remove some bogus code that tried to handle absolutely-positioned flows separately when storing overflow. This code dates back to the time when absolutely positioned flows were ignored by all of their ancestors up to the containing block. This hasn't been true for at least a year. Closes #9306. Closes #9309. Is a partial fix for #9308. --- components/layout/flow.rs | 7 ----- tests/html/overflow-bug-0.html | 18 ++++++++++++ tests/html/overflow-bug-1.html | 29 +++++++++++++++++++ tests/html/overflow-bug-2.html | 28 ++++++++++++++++++ .../css21_dev/html4/numbers-units-018.htm.ini | 3 -- 5 files changed, 75 insertions(+), 10 deletions(-) create mode 100644 tests/html/overflow-bug-0.html create mode 100644 tests/html/overflow-bug-1.html create mode 100644 tests/html/overflow-bug-2.html delete mode 100644 tests/wpt/metadata-css/css21_dev/html4/numbers-units-018.htm.ini diff --git a/components/layout/flow.rs b/components/layout/flow.rs index bfb0c407d95..2df03d43233 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -251,13 +251,6 @@ pub trait Flow: fmt::Debug + Sync + Send + 'static { container_size); overflow = overflow.union(&kid_overflow.translate(&kid_position.origin)) } - - for kid in mut_base(self).abs_descendants.iter() { - let kid_overflow = base(kid).overflow; - let kid_position = base(kid).position.to_physical(base(kid).writing_mode, - container_size); - overflow = overflow.union(&kid_overflow.translate(&kid_position.origin)) - } } _ => {} } diff --git a/tests/html/overflow-bug-0.html b/tests/html/overflow-bug-0.html new file mode 100644 index 00000000000..10e2207ca56 --- /dev/null +++ b/tests/html/overflow-bug-0.html @@ -0,0 +1,18 @@ + + + + +
+
+ diff --git a/tests/html/overflow-bug-1.html b/tests/html/overflow-bug-1.html new file mode 100644 index 00000000000..1a11bf1320f --- /dev/null +++ b/tests/html/overflow-bug-1.html @@ -0,0 +1,29 @@ + + + + +
+ x +
diff --git a/tests/html/overflow-bug-2.html b/tests/html/overflow-bug-2.html new file mode 100644 index 00000000000..1251b6de34c --- /dev/null +++ b/tests/html/overflow-bug-2.html @@ -0,0 +1,28 @@ + + + + +
+
+
diff --git a/tests/wpt/metadata-css/css21_dev/html4/numbers-units-018.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/numbers-units-018.htm.ini deleted file mode 100644 index 232a3f71a50..00000000000 --- a/tests/wpt/metadata-css/css21_dev/html4/numbers-units-018.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[numbers-units-018.htm] - type: reftest - expected: FAIL