aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-07-27 18:54:32 -0500
committerGitHub <noreply@github.com>2016-07-27 18:54:32 -0500
commitabdf01ed058478ea120137a925a09d918c47cd02 (patch)
treed3b9a5284e2a7a64a0f7e5483316d165f1018ba6
parent944d371b8f0e72f6aa5465be38c0c8daeab66127 (diff)
parentf65864d04d88a857571aa6d359c6fd75985e3672 (diff)
downloadservo-abdf01ed058478ea120137a925a09d918c47cd02.tar.gz
servo-abdf01ed058478ea120137a925a09d918c47cd02.zip
Auto merge of #11850 - splav:box-shadow#11662, r=glennw
Fix PaintContext page_rect due to display list origin Fix PaintContext page_rect due to non zero display list origin. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11662 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11850) <!-- Reviewable:end -->
-rw-r--r--components/gfx/paint_thread.rs2
-rw-r--r--tests/wpt/mozilla/meta/MANIFEST.json24
-rw-r--r--tests/wpt/mozilla/tests/css/box_shadow_blur_fixed.html24
-rw-r--r--tests/wpt/mozilla/tests/css/box_shadow_blur_fixed_ref.html23
4 files changed, 72 insertions, 1 deletions
diff --git a/components/gfx/paint_thread.rs b/components/gfx/paint_thread.rs
index 27a4231f252..a06ef7ee7af 100644
--- a/components/gfx/paint_thread.rs
+++ b/components/gfx/paint_thread.rs
@@ -684,7 +684,7 @@ impl WorkerThread {
let mut paint_context = PaintContext {
draw_target: draw_target.clone(),
font_context: &mut self.font_context,
- page_rect: Rect::from_untyped(&tile.page_rect),
+ page_rect: Rect::from_untyped(&tile.page_rect.translate(&paint_layer.display_list_origin)),
screen_rect: Rect::from_untyped(&tile.screen_rect),
clip_rect: None,
transient_clip: None,
diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json
index db8aa5be87d..0263cda1704 100644
--- a/tests/wpt/mozilla/meta/MANIFEST.json
+++ b/tests/wpt/mozilla/meta/MANIFEST.json
@@ -1032,6 +1032,18 @@
"url": "/_mozilla/css/box_shadow_blur_a.html"
}
],
+ "css/box_shadow_blur_fixed.html": [
+ {
+ "path": "css/box_shadow_blur_fixed.html",
+ "references": [
+ [
+ "/_mozilla/css/box_shadow_blur_fixed_ref.html",
+ "=="
+ ]
+ ],
+ "url": "/_mozilla/css/box_shadow_blur_fixed.html"
+ }
+ ],
"css/box_shadow_border_box_a.html": [
{
"path": "css/box_shadow_border_box_a.html",
@@ -10132,6 +10144,18 @@
"url": "/_mozilla/css/box_shadow_blur_a.html"
}
],
+ "css/box_shadow_blur_fixed.html": [
+ {
+ "path": "css/box_shadow_blur_fixed.html",
+ "references": [
+ [
+ "/_mozilla/css/box_shadow_blur_fixed_ref.html",
+ "=="
+ ]
+ ],
+ "url": "/_mozilla/css/box_shadow_blur_fixed.html"
+ }
+ ],
"css/box_shadow_border_box_a.html": [
{
"path": "css/box_shadow_border_box_a.html",
diff --git a/tests/wpt/mozilla/tests/css/box_shadow_blur_fixed.html b/tests/wpt/mozilla/tests/css/box_shadow_blur_fixed.html
new file mode 100644
index 00000000000..429a18dbc80
--- /dev/null
+++ b/tests/wpt/mozilla/tests/css/box_shadow_blur_fixed.html
@@ -0,0 +1,24 @@
+<head>
+ <link rel='match' href='box_shadow_blur_fixed_ref.html'>
+ <style>
+ #div_outer {
+ width: 100%;
+ position: fixed;
+ top: 100px;
+ left: 0;
+ }
+
+ #div_inner {
+ background: lightgrey;
+ height: 40px;
+ box-shadow: 0 0 30px 30px darkblue;
+ }
+ </style>
+</head>
+
+<body>
+ <div id="div_outer">
+ <div id="div_inner">
+ </div>
+ </div>
+</body> \ No newline at end of file
diff --git a/tests/wpt/mozilla/tests/css/box_shadow_blur_fixed_ref.html b/tests/wpt/mozilla/tests/css/box_shadow_blur_fixed_ref.html
new file mode 100644
index 00000000000..03e79789470
--- /dev/null
+++ b/tests/wpt/mozilla/tests/css/box_shadow_blur_fixed_ref.html
@@ -0,0 +1,23 @@
+<head>
+ <style>
+ #div_outer {
+ width: 100%;
+ position: absolute;
+ top: 100px;
+ left: 0;
+ }
+
+ #div_inner {
+ background: lightgrey;
+ height: 40px;
+ box-shadow: 0 0 30px 30px darkblue;
+ }
+ </style>
+</head>
+
+<body>
+ <div id="div_outer">
+ <div id="div_inner">
+ </div>
+ </div>
+</body> \ No newline at end of file