mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
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.
This commit is contained in:
parent
3ad49fc689
commit
8640cf5588
11 changed files with 102 additions and 88 deletions
|
@ -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
|
||||
|
|
17
tests/ref/position_relative_inline_block_a.html
Normal file
17
tests/ref/position_relative_inline_block_a.html
Normal file
|
@ -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>
|
||||
|
17
tests/ref/position_relative_inline_block_ref.html
Normal file
17
tests/ref/position_relative_inline_block_ref.html
Normal file
|
@ -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>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
[floats-153.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[margin-collapse-001.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[position-relative-032.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[run-in-relpos-between-001.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[run-in-relpos-between-002.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue