Fix positioning of RTL blocks with margins.

`BaseFlow::position` is relative to the parent flow's margin box in the inline
direction.  We need to use the parent's `position` as the container size when
translating it to physical coordinates, or we get incorrect results for
non-LTR content.
This commit is contained in:
Matt Brubeck 2015-05-13 07:13:33 -07:00
parent 8979d77e77
commit dc19806b15
4 changed files with 73 additions and 11 deletions

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>RTL margin test</title>
<style>
body {
margin: 8px;
}
#a {
direction: rtl;
}
#b {
border: 1px solid red;
width: 100px;
height: 100px;
}
#c {
border: 1px solid blue;
margin: 10px;
width: 50px;
height: 50px;
}
</style>
</head>
<body>
<div id="a">
<div id="b">
<div id="c">
</div>
</div>
</div>
</body>
</html>