зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 236d827dc1c5 (bug 1491864) for crashing at builds/worker/workspace/build/src/layout/generic/nsIFrameInlines.h on a CLOSED TREE
This commit is contained in:
Родитель
ae7f88b657
Коммит
2971320d79
|
@ -1604,7 +1604,7 @@ bool
|
|||
nsIFrame::Combines3DTransformWithAncestors(const nsStyleDisplay* aStyleDisplay) const
|
||||
{
|
||||
MOZ_ASSERT(aStyleDisplay == StyleDisplay());
|
||||
nsIFrame* parent = GetClosestFlattenedTreeAncestorPrimaryFrame();
|
||||
nsIFrame* parent = GetInFlowParent();
|
||||
if (!parent || !parent->Extend3DContext()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -2625,9 +2625,9 @@ FrameParticipatesIn3DContext(nsIFrame* aAncestor, nsIFrame* aDescendant) {
|
|||
MOZ_ASSERT(aAncestor != aDescendant);
|
||||
MOZ_ASSERT(aAncestor->Extend3DContext());
|
||||
nsIFrame* frame;
|
||||
for (frame = aDescendant->GetClosestFlattenedTreeAncestorPrimaryFrame();
|
||||
for (frame = aDescendant->GetInFlowParent();
|
||||
frame && aAncestor != frame;
|
||||
frame = frame->GetClosestFlattenedTreeAncestorPrimaryFrame()) {
|
||||
frame = frame->GetInFlowParent()) {
|
||||
if (!frame->Extend3DContext()) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -867,16 +867,13 @@ public:
|
|||
/**
|
||||
* Gets the parent of a frame, using the parent of the placeholder for
|
||||
* out-of-flow frames.
|
||||
*
|
||||
* This is effectively the primary frame (or one of the continuations) of the
|
||||
* closest flattened tree ancestor that has a frame (flattened tree ancestors
|
||||
* may not have frames in presence of display: contents).
|
||||
*/
|
||||
inline nsContainerFrame* GetInFlowParent() const;
|
||||
|
||||
/**
|
||||
* Gets the primary frame of the closest flattened tree ancestor that has a
|
||||
* frame (flattened tree ancestors may not have frames in presence of display:
|
||||
* contents).
|
||||
*/
|
||||
inline nsIFrame* GetClosestFlattenedTreeAncestorPrimaryFrame() const;
|
||||
|
||||
/**
|
||||
* Return the placeholder for this frame (which must be out-of-flow).
|
||||
* @note this will only return non-null if |this| is the first-in-flow
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#ifndef nsIFrameInlines_h___
|
||||
#define nsIFrameInlines_h___
|
||||
|
||||
#include "mozilla/dom/ElementInlines.h"
|
||||
#include "nsContainerFrame.h"
|
||||
#include "nsPlaceholderFrame.h"
|
||||
#include "nsStyleStructInlines.h"
|
||||
|
@ -181,36 +180,4 @@ nsIFrame::GetInFlowParent() const
|
|||
return GetParent();
|
||||
}
|
||||
|
||||
// We generally want to follow the flattened DOM tree for preserve-3d, jumping
|
||||
// through display: contents.
|
||||
//
|
||||
// There are various fun mismatches between the flattened tree and the frame
|
||||
// tree which makes this non-trivial to do looking at the frame tree state:
|
||||
//
|
||||
// - Anon boxes. You'd have to step through them, because you generally want to
|
||||
// ignore them.
|
||||
//
|
||||
// - IB-splits, which produce a frame tree where frames for the block inside
|
||||
// the inline are not children of any frame from the inline.
|
||||
//
|
||||
// - display: contents, which makes DOM ancestors not have frames even when a
|
||||
// descendant does.
|
||||
//
|
||||
nsIFrame*
|
||||
nsIFrame::GetClosestFlattenedTreeAncestorPrimaryFrame() const
|
||||
{
|
||||
if (!mContent) {
|
||||
return nullptr;
|
||||
}
|
||||
Element* parent = mContent->GetFlattenedTreeParentElement();
|
||||
while (parent) {
|
||||
if (nsIFrame* frame = parent->GetPrimaryFrame()) {
|
||||
return frame;
|
||||
}
|
||||
MOZ_ASSERT(parent->IsDisplayContents());
|
||||
parent = parent->GetFlattenedTreeParentElement();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -8377,7 +8377,7 @@ nsDisplayTransform::GetResultingTransformMatrixInternal(
|
|||
if ((aFlags & INCLUDE_PRESERVE3D_ANCESTORS) && frame &&
|
||||
frame->Combines3DTransformWithAncestors()) {
|
||||
// Include the transform set on our parent
|
||||
nsIFrame* parentFrame = frame->GetClosestFlattenedTreeAncestorPrimaryFrame();
|
||||
nsIFrame* parentFrame = frame->GetInFlowParent();
|
||||
NS_ASSERTION(parentFrame && parentFrame->IsTransformed() &&
|
||||
parentFrame->Extend3DContext(),
|
||||
"Preserve3D mismatch!");
|
||||
|
@ -8656,7 +8656,7 @@ nsDisplayTransform::GetAccumulatedPreserved3DTransform(
|
|||
const nsIFrame* establisher; // Establisher of the 3D rendering context.
|
||||
for (establisher = mFrame;
|
||||
establisher && establisher->Combines3DTransformWithAncestors();
|
||||
establisher = establisher->GetClosestFlattenedTreeAncestorPrimaryFrame()) {
|
||||
establisher = establisher->GetInFlowParent()) {
|
||||
}
|
||||
const nsIFrame* establisherReference = aBuilder->FindReferenceFrameFor(
|
||||
nsLayoutUtils::GetCrossDocParentFrame(establisher));
|
||||
|
|
|
@ -143185,18 +143185,6 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-transforms/preserve3d-button.html": [
|
||||
[
|
||||
"/css/css-transforms/preserve3d-button.html",
|
||||
[
|
||||
[
|
||||
"/css/css-transforms/preserve3d-button-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-transforms/rotate/svg-rotate-3args-001.html": [
|
||||
[
|
||||
"/css/css-transforms/rotate/svg-rotate-3args-001.html",
|
||||
|
@ -265214,11 +265202,6 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-transforms/preserve3d-button-ref.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-transforms/reference/backface-visibility-hidden-ref.html": [
|
||||
[
|
||||
{}
|
||||
|
@ -561897,14 +561880,6 @@
|
|||
"752888eaf76630ae9835dd444c4941793ecf53cc",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-transforms/preserve3d-button-ref.html": [
|
||||
"e5e3c1ebfcdd7c832a211d17ac2f1ed6f4116252",
|
||||
"support"
|
||||
],
|
||||
"css/css-transforms/preserve3d-button.html": [
|
||||
"544bb2496638a52915f7c97a238ccb053b4e884e",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-transforms/reference/backface-visibility-hidden-ref.html": [
|
||||
"6a3e305e5c0c7fca6c8d53574b7a09eb21afb6cc",
|
||||
"support"
|
||||
|
@ -578426,7 +578401,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"css/cssom/overflow-serialization.html": [
|
||||
"136b8aba117eb64403700d8c4348db085cede9c8",
|
||||
"2911c8da3e3ae47af4fd764170fd7439cda56685",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom/preferred-stylesheet-order.html": [
|
||||
|
@ -578818,7 +578793,7 @@
|
|||
"reftest"
|
||||
],
|
||||
"css/filter-effects/filter-cb-abspos-inline-001-ref.html": [
|
||||
"b4beae8004155c30dad4f48db3e2087f66c42c4f",
|
||||
"6ebe4635511242cd0f5965a778a5a491cc406436",
|
||||
"support"
|
||||
],
|
||||
"css/filter-effects/filter-cb-abspos-inline-001.html": [
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>CSS Test Reference</title>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="author" title="Mozilla" href="https://mozilla.org">
|
||||
<style>
|
||||
.scene {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
perspective: 5000px;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transform-style: preserve-3d;
|
||||
position: relative;
|
||||
background: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
transform: rotateY(180deg);
|
||||
}
|
||||
|
||||
.face {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
backface-visibility: hidden;
|
||||
background: red;
|
||||
}
|
||||
|
||||
.backface {
|
||||
background: green;
|
||||
transform: rotateY(180deg);
|
||||
}
|
||||
</style>
|
||||
<div class="scene">
|
||||
<div class="card">
|
||||
<div class="face"></div>
|
||||
<div class="face backface"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,44 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>CSS Test: preserve-3d on buttons</title>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="author" title="Mozilla" href="https://mozilla.org">
|
||||
<link rel="match" href="preserve3d-button-ref.html">
|
||||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1491864">
|
||||
<style>
|
||||
.scene {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
perspective: 5000px;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transform-style: preserve-3d;
|
||||
position: relative;
|
||||
background: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
transform: rotateY(180deg);
|
||||
}
|
||||
|
||||
.face {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
backface-visibility: hidden;
|
||||
background: red;
|
||||
}
|
||||
|
||||
.backface {
|
||||
background: green;
|
||||
transform: rotateY(180deg);
|
||||
}
|
||||
</style>
|
||||
<div class="scene">
|
||||
<button class="card">
|
||||
<div class="face"></div>
|
||||
<div class="face backface"></div>
|
||||
</button>
|
||||
</div>
|
Загрузка…
Ссылка в новой задаче