diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2015-08-10 18:05:29 -0700 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2015-08-12 08:28:35 -0700 |
commit | 8640cf55889c44b0d252eedab3da5f6153cd217b (patch) | |
tree | 8c704b9f545d0941c1ecb8cafe572aeecb9f0a1f /tests | |
parent | 3ad49fc689ceb6067cd6dea1aa0d004321704b8e (diff) | |
download | servo-8640cf55889c44b0d252eedab3da5f6153cd217b.tar.gz servo-8640cf55889c44b0d252eedab3da5f6153cd217b.zip |
layout: Take relative position offsets for inlines and inline-blocks
into account only once.
There were two bugs here: (1) relative position applied to
scanned/unscanned text fragments independently of the container element
that applied that relative position, causing double-counting; (2)
relative position applied to inline block fragments independently of the
wrapped block itself, causing double-counting.
This commit also removes the `cascade_anonymous` function and the
related `Fragment` constructor. They were unused, and their
functionality has been replaced by the `modify_style_for_*` series of
functions.
Closes #7067.
Diffstat (limited to 'tests')
8 files changed, 35 insertions, 15 deletions
diff --git a/tests/ref/basic.list b/tests/ref/basic.list index 2442cbb26ba..6d5bba85d1e 100644 --- a/tests/ref/basic.list +++ b/tests/ref/basic.list @@ -272,6 +272,7 @@ flaky_cpu == linebreak_simple_a.html linebreak_simple_b.html == position_fixed_tile_edge_2.html position_fixed_tile_edge_ref.html == position_fixed_tile_edge_3.html position_fixed_tile_edge_ref.html == position_relative_a.html position_relative_b.html +== position_relative_inline_block_a.html position_relative_inline_block_ref.html == position_relative_painting_order_a.html position_relative_painting_order_ref.html == position_relative_top_percentage_a.html position_relative_top_percentage_b.html == pre_ignorable_whitespace_a.html pre_ignorable_whitespace_ref.html diff --git a/tests/ref/position_relative_inline_block_a.html b/tests/ref/position_relative_inline_block_a.html new file mode 100644 index 00000000000..cddeceef9f5 --- /dev/null +++ b/tests/ref/position_relative_inline_block_a.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<style> +body, html { + margin: 0; + padding: 0; +} +div { + display: inline-block; + position: relative; + top: 20px; + width: 20px; + height: 20px; + background: red; +} +</style> +<div></div> + diff --git a/tests/ref/position_relative_inline_block_ref.html b/tests/ref/position_relative_inline_block_ref.html new file mode 100644 index 00000000000..49bc6cad631 --- /dev/null +++ b/tests/ref/position_relative_inline_block_ref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<style> +body, html { + margin: 0; + padding: 0; +} +div { + display: block; + position: absolute; + top: 20px; + width: 20px; + height: 20px; + background: red; +} +</style> +<div></div> + diff --git a/tests/wpt/metadata-css/css21_dev/html4/floats-153.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/floats-153.htm.ini deleted file mode 100644 index 28ff68c3845..00000000000 --- a/tests/wpt/metadata-css/css21_dev/html4/floats-153.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[floats-153.htm] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata-css/css21_dev/html4/margin-collapse-001.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/margin-collapse-001.htm.ini deleted file mode 100644 index 50450150f83..00000000000 --- a/tests/wpt/metadata-css/css21_dev/html4/margin-collapse-001.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[margin-collapse-001.htm] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata-css/css21_dev/html4/position-relative-032.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/position-relative-032.htm.ini deleted file mode 100644 index 45604a15527..00000000000 --- a/tests/wpt/metadata-css/css21_dev/html4/position-relative-032.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[position-relative-032.htm] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata-css/css21_dev/html4/run-in-relpos-between-001.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/run-in-relpos-between-001.htm.ini deleted file mode 100644 index 22f5320ed02..00000000000 --- a/tests/wpt/metadata-css/css21_dev/html4/run-in-relpos-between-001.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[run-in-relpos-between-001.htm] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata-css/css21_dev/html4/run-in-relpos-between-002.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/run-in-relpos-between-002.htm.ini deleted file mode 100644 index 81d078b5356..00000000000 --- a/tests/wpt/metadata-css/css21_dev/html4/run-in-relpos-between-002.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[run-in-relpos-between-002.htm] - type: reftest - expected: FAIL |