Draw layers that are under sub-displaylists.

Fixes #8325
This commit is contained in:
Michael Howell 2015-11-13 20:17:58 -07:00
parent 4f855dc63a
commit 24c35a2185
4 changed files with 74 additions and 10 deletions

View file

@ -474,15 +474,38 @@ impl<C> PaintTask<C> where C: PaintListener + Send + 'static {
perspective, perspective,
parent_id)); parent_id));
if let PaintLayerContents::StackingContext(ref context) = paint_layer.contents { match paint_layer.contents {
// When there is a new layer, the transforms and origin are handled by the compositor, PaintLayerContents::StackingContext(ref context) => {
// so the new transform and perspective matrices are just the identity. // When there is a new layer, the transforms and origin are handled by the compositor,
continue_walking_stacking_context(properties, // so the new transform and perspective matrices are just the identity.
&context, continue_walking_stacking_context(properties,
&paint_layer.origin_for_child_layers(), &context,
&Matrix4::identity(), &paint_layer.origin_for_child_layers(),
&Matrix4::identity(), &Matrix4::identity(),
Some(paint_layer.id)); &Matrix4::identity(),
Some(paint_layer.id));
},
PaintLayerContents::DisplayList(ref display_list) => {
for kid in display_list.positioned_content.iter() {
if let &DisplayItem::StackingContextClass(ref stacking_context) = kid {
build_from_stacking_context(properties,
&stacking_context,
&parent_origin,
&transform,
&perspective,
parent_id)
}
}
for kid in display_list.layered_children.iter() {
build_from_paint_layer(properties,
&kid,
&parent_origin,
&transform,
&perspective,
parent_id)
}
},
} }
} }

View file

@ -4023,6 +4023,18 @@
"url": "/_mozilla/css/transform_optimization.html" "url": "/_mozilla/css/transform_optimization.html"
} }
], ],
"css/transform_scroll_layer.html": [
{
"path": "css/transform_scroll_layer.html",
"references": [
[
"/_mozilla/css/transform_scroll_layer_ref.html",
"=="
]
],
"url": "/_mozilla/css/transform_scroll_layer.html"
}
],
"css/transform_simple_a.html": [ "css/transform_simple_a.html": [
{ {
"path": "css/transform_simple_a.html", "path": "css/transform_simple_a.html",
@ -9202,6 +9214,18 @@
"url": "/_mozilla/css/transform_optimization.html" "url": "/_mozilla/css/transform_optimization.html"
} }
], ],
"css/transform_scroll_layer.html": [
{
"path": "css/transform_scroll_layer.html",
"references": [
[
"/_mozilla/css/transform_scroll_layer_ref.html",
"=="
]
],
"url": "/_mozilla/css/transform_scroll_layer.html"
}
],
"css/transform_simple_a.html": [ "css/transform_simple_a.html": [
{ {
"path": "css/transform_simple_a.html", "path": "css/transform_simple_a.html",
@ -9772,4 +9796,4 @@
"rev": null, "rev": null,
"url_base": "/_mozilla/", "url_base": "/_mozilla/",
"version": 2 "version": 2
} }

View file

@ -0,0 +1,12 @@
<!doctype html>
<meta charset="utf-8">
<title></title>
<link rel="match" href="transform_scroll_layer_ref.html">
<div style="transform: translateX(0)">
<div style="width:400px;height:400px;background:#f00;overflow:scroll">
</div>
</div>
<div style="transform: translateX(0)">
<div style="width:400px;height:400px;background:#0f0;overflow:scroll">
</div>
</div>

View file

@ -0,0 +1,5 @@
<!DOCTYPE html>
<div style="width:400px;height:400px;background:#f00;overflow:scroll">
</div>
<div style="width:400px;height:400px;background:#0f0;overflow:scroll">
</div>