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,7 +474,8 @@ impl<C> PaintTask<C> where C: PaintListener + Send + 'static {
perspective,
parent_id));
if let PaintLayerContents::StackingContext(ref context) = paint_layer.contents {
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,
@ -483,6 +484,28 @@ impl<C> PaintTask<C> where C: PaintListener + Send + 'static {
&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",
@ -9202,6 +9214,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",

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>