Auto merge of #8524 - notriddle:paint_task_deep, r=jdm

Draw layers that are under sub-displaylists.

Fixes #8325

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8524)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-11-14 22:26:22 +05:30
commit 8f2a3a64f1
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,
parent_id));
if let PaintLayerContents::StackingContext(ref context) = paint_layer.contents {
// When there is a new layer, the transforms and origin are handled by the compositor,
// so the new transform and perspective matrices are just the identity.
continue_walking_stacking_context(properties,
&context,
&paint_layer.origin_for_child_layers(),
&Matrix4::identity(),
&Matrix4::identity(),
Some(paint_layer.id));
match paint_layer.contents {
PaintLayerContents::StackingContext(ref context) => {
// When there is a new layer, the transforms and origin are handled by the compositor,
// so the new transform and perspective matrices are just the identity.
continue_walking_stacking_context(properties,
&context,
&paint_layer.origin_for_child_layers(),
&Matrix4::identity(),
&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"
}
],
"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": [
{
"path": "css/transform_simple_a.html",
@ -9208,6 +9220,18 @@
"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": [
{
"path": "css/transform_simple_a.html",
@ -9778,4 +9802,4 @@
"rev": null,
"url_base": "/_mozilla/",
"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>