| Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| index 6b443a587a2ce3eacddf7d97d75734b7ee46f0d8..2e3fc8252abf0146aa9b84aae1a373b54bc7bc1e 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| @@ -1722,10 +1722,10 @@ LayoutUnit LayoutBox::perpendicularContainingBlockLogicalHeight() const
|
| void LayoutBox::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, TransformState& transformState, MapCoordinatesFlags mode) const
|
| {
|
| bool isFixedPos = style()->position() == FixedPosition;
|
| - bool hasTransform = hasLayer() && layer()->transform();
|
| - // If this box has a transform, it acts as a fixed position container for fixed descendants,
|
| +
|
| + // If this box has a transform or contains paint, it acts as a fixed position container for fixed descendants,
|
| // and may itself also be fixed position. So propagate 'fixed' up only if this box is fixed position.
|
| - if (hasTransform && !isFixedPos)
|
| + if (style()->canContainFixedPositionObjects() && !isFixedPos)
|
| mode &= ~IsFixed;
|
| else if (isFixedPos)
|
| mode |= IsFixed;
|
| @@ -1739,9 +1739,9 @@ void LayoutBox::mapAncestorToLocal(const LayoutBoxModelObject* ancestor, Transfo
|
| return;
|
|
|
| bool isFixedPos = style()->position() == FixedPosition;
|
| - bool hasTransform = hasLayer() && layer()->transform();
|
| - if (hasTransform && !isFixedPos) {
|
| - // If this box has a transform, it acts as a fixed position container for fixed descendants,
|
| +
|
| + if (style()->canContainFixedPositionObjects() && !isFixedPos) {
|
| + // If this box has a transform or contains paint, it acts as a fixed position container for fixed descendants,
|
| // and may itself also be fixed position. So propagate 'fixed' up only if this box is fixed position.
|
| mode &= ~IsFixed;
|
| } else if (isFixedPos) {
|
|
|