mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 976364: Make 'perspective' create a stacking context. r=mattwoodrow
While it seems a little silly since 'perspective' doesn't require atomicity (rather, it adds an additional transformation to any 3-D descendants, which already require atomicity), the spec requires it, and it matches WebKit.
This commit is contained in:
parent
9c9aa42fb5
commit
b38b58369f
@ -2180,6 +2180,9 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||
const nsStylePosition* pos = child->StylePosition();
|
||||
bool isVisuallyAtomic = child->HasOpacity()
|
||||
|| child->IsTransformed()
|
||||
// strictly speaking, 'perspective' doesn't require visual atomicity,
|
||||
// but the spec says it acts like the rest of these
|
||||
|| disp->mChildPerspective.GetUnit() == eStyleUnit_Coord
|
||||
|| disp->mMixBlendMode != NS_STYLE_BLEND_NORMAL
|
||||
|| nsSVGIntegrationUtils::UsingEffectsForFrame(child);
|
||||
|
||||
|
@ -1,2 +1,4 @@
|
||||
== 480053-1.html 480053-1-ref.html
|
||||
== z-index-1.html z-index-1-ref.html
|
||||
!= stacking-context-yes.html stacking-context-no.html
|
||||
== stacking-context-perspective.html stacking-context-yes.html
|
||||
|
26
layout/reftests/z-index/stacking-context-common.css
Normal file
26
layout/reftests/z-index/stacking-context-common.css
Normal file
@ -0,0 +1,26 @@
|
||||
.contain, .maybesc {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
.contain, .maybesc {
|
||||
position: relative;
|
||||
}
|
||||
.inner1, .inner3, .intruder {
|
||||
position: absolute;
|
||||
top: 0; left: 0; bottom: 0; right: 0;
|
||||
}
|
||||
.inner1 {
|
||||
left: 5px; right: 30px;
|
||||
background: rgba(0, 255, 255, 0.5); /* aqua */
|
||||
z-index: 1;
|
||||
}
|
||||
.inner3 {
|
||||
left: 30px; right: 5px;
|
||||
background: rgba(255, 255, 0, 0.5); /* yellow */
|
||||
z-index: 3;
|
||||
}
|
||||
.intruder {
|
||||
top: 20px; bottom: 20px;
|
||||
background: rgba(255, 0, 255, 0.5); /* fuchsia */
|
||||
z-index: 2;
|
||||
}
|
11
layout/reftests/z-index/stacking-context-no.html
Normal file
11
layout/reftests/z-index/stacking-context-no.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE HTML>
|
||||
<meta charset="UTF-8">
|
||||
<title>Reference for things that do not create a stacking context</title>
|
||||
<link rel="stylesheet" href="stacking-context-common.css">
|
||||
<div class="contain">
|
||||
<div class="maybesc">
|
||||
<div class="inner1"></div>
|
||||
<div class="inner3"></div>
|
||||
</div>
|
||||
<div class="intruder"></div>
|
||||
</div>
|
17
layout/reftests/z-index/stacking-context-perspective.html
Normal file
17
layout/reftests/z-index/stacking-context-perspective.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE HTML>
|
||||
<meta charset="UTF-8">
|
||||
<title>Does 'perspective' create a stacking context?</title>
|
||||
<link rel="stylesheet" href="stacking-context-common.css">
|
||||
<style>
|
||||
.perspective {
|
||||
-webkit-perspective: 200px;
|
||||
perspective: 200px;
|
||||
}
|
||||
</style>
|
||||
<div class="contain">
|
||||
<div class="maybesc perspective">
|
||||
<div class="inner1"></div>
|
||||
<div class="inner3"></div>
|
||||
</div>
|
||||
<div class="intruder"></div>
|
||||
</div>
|
16
layout/reftests/z-index/stacking-context-yes.html
Normal file
16
layout/reftests/z-index/stacking-context-yes.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE HTML>
|
||||
<meta charset="UTF-8">
|
||||
<title>Reference for things that create a stacking context</title>
|
||||
<link rel="stylesheet" href="stacking-context-common.css">
|
||||
<style>
|
||||
.sc {
|
||||
z-index: 0;
|
||||
}
|
||||
</style>
|
||||
<div class="contain">
|
||||
<div class="maybesc sc">
|
||||
<div class="inner1"></div>
|
||||
<div class="inner3"></div>
|
||||
</div>
|
||||
<div class="intruder"></div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user