Auto merge of #12839 - notriddle:11818_sequential_layout_bug, r=emilio

Fix a cached style cascade bug that only manifested in sequential mode

When copying cached styles, keep the `writing_mode` up to date.

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11818 (github issue number if applicable).
- [X] There are tests for these changes

EDIT: The test is now working. I ran it with the first commit (the actual fix) reverted and it failed.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12839)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-08-14 02:27:19 -05:00 committed by GitHub
commit 700bb911fc
9 changed files with 98 additions and 18 deletions

View file

@ -211,8 +211,8 @@ class ServoRefTestExecutor(ProcessTestExecutor):
for stylesheet in self.browser.user_stylesheets:
command += ["--user-stylesheet", stylesheet]
for pref in test.environment.get('prefs', {}):
command += ["--pref", pref]
for pref, value in test.environment.get('prefs', {}).iteritems():
command += ["--pref", "%s=%s" % (pref, value)]
if viewport_size:
command += ["--resolution", viewport_size]

View file

@ -1344,6 +1344,18 @@
"url": "/_mozilla/css/data_img_a.html"
}
],
"css/direction_style_caching.html": [
{
"path": "css/direction_style_caching.html",
"references": [
[
"/_mozilla/css/direction_style_caching_ref.html",
"=="
]
],
"url": "/_mozilla/css/direction_style_caching.html"
}
],
"css/empty_cells_a.html": [
{
"path": "css/empty_cells_a.html",
@ -10552,6 +10564,18 @@
"url": "/_mozilla/css/data_img_a.html"
}
],
"css/direction_style_caching.html": [
{
"path": "css/direction_style_caching.html",
"references": [
[
"/_mozilla/css/direction_style_caching_ref.html",
"=="
]
],
"url": "/_mozilla/css/direction_style_caching.html"
}
],
"css/empty_cells_a.html": [
{
"path": "css/empty_cells_a.html",

View file

@ -0,0 +1,3 @@
prefs: [layout.threads:1]
[direction_style_caching.html]
type: reftest

View file

@ -0,0 +1,28 @@
<!doctype html>
<meta charset="utf-8">
<title>Style caching with directions</title>
<link rel="match" href="direction_style_caching_ref.html">
<style>
.wrapper {
width: 200px;
}
p { margin: 0 }
.a p, .b p {
width: 100px;
height: 1px;
background: red;
}
.b {
direction: rtl;
}
</style>
<div class=wrapper>
<div class=a><p></p></div>
<div class=a><p></p></div>
<div class=a><p></p></div>
<div class=a><p></p></div>
<div class=b><p></p></div>
<div class=b><p></p></div>
<div class=b><p></p></div>
<div class=b><p></p></div>
</div>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<style>
.wrapper {
width: 200px;
}
p { margin: 0 }
.a p, .b p {
width: 100px;
height: 4px;
background: red;
}
.b p {
margin-left: 100px;
}
</style>
<div class=wrapper>
<div class=a><p></p></div>
<div class=b><p></p></div>
</div>