mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Fixes for positioning of RTL blocks.
This fixes a bug in finding the top left corner of an RTL block in physical coordinates. (The old code used the `start` point of the `position` rect, which is not always the top left.) It also fixes the setting of `position.start.i` in certain mixed LTR/RTL cases. There is still a bug related to `position.size` for RTL blocks with margins. See the FIXME comments for details.
This commit is contained in:
parent
7bd6cb0091
commit
531bcb12ae
9 changed files with 80 additions and 7 deletions
|
@ -236,6 +236,7 @@ experimental != overconstrained_block.html overconstrained_block_ref.html
|
|||
== root_height_a.html root_height_b.html
|
||||
== root_margin_collapse_a.html root_margin_collapse_b.html
|
||||
== root_pseudo_a.html root_pseudo_b.html
|
||||
experimental == rtl_body.html rtl_body_ref.html
|
||||
experimental == rtl_simple.html rtl_simple_ref.html
|
||||
== setattribute_id_restyle_a.html setattribute_id_restyle_b.html
|
||||
== stacking_context_overflow_a.html stacking_context_overflow_ref.html
|
||||
|
|
17
tests/ref/rtl_body.html
Normal file
17
tests/ref/rtl_body.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<head>
|
||||
<style>
|
||||
body {
|
||||
direction: rtl;
|
||||
margin: 0;
|
||||
}
|
||||
#outer {
|
||||
background: green;
|
||||
|
||||
width: 300px;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="outer"></div>
|
||||
</body>
|
20
tests/ref/rtl_body_ref.html
Normal file
20
tests/ref/rtl_body_ref.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<head>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
#outer {
|
||||
background: green;
|
||||
|
||||
width: 300px;
|
||||
height: 100px;
|
||||
|
||||
position:absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="outer"></div>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue