Index: Source/core/paint/DeprecatedPaintLayer.cpp |
diff --git a/Source/core/paint/DeprecatedPaintLayer.cpp b/Source/core/paint/DeprecatedPaintLayer.cpp |
index 8e4c167af218d24dba9db17b5e09ded6ba62f9f2..db08bcd8a9d7dc167440201e1d5900a82b15b21b 100644 |
--- a/Source/core/paint/DeprecatedPaintLayer.cpp |
+++ b/Source/core/paint/DeprecatedPaintLayer.cpp |
@@ -936,7 +936,7 @@ FloatPoint DeprecatedPaintLayer::perspectiveOrigin() const |
static inline bool isFixedPositionedContainer(DeprecatedPaintLayer* layer) |
{ |
- return layer->isRootLayer() || layer->hasTransformRelatedProperty(); |
+ return layer->isRootLayer() || layer->transform(); |
chrishtr
2015/04/30 17:34:59
This should be landed first I think, probably with
Xianzhu
2015/04/30 17:54:44
If we want change this, we should also check other
|
} |
DeprecatedPaintLayer* DeprecatedPaintLayer::enclosingPositionedAncestor() const |
@@ -1166,7 +1166,8 @@ LayoutRect DeprecatedPaintLayer::transparencyClipBox(const DeprecatedPaintLayer* |
IntPoint pixelSnappedDelta = roundedIntPoint(delta); |
TransformationMatrix transform; |
transform.translate(pixelSnappedDelta.x(), pixelSnappedDelta.y()); |
- transform = transform * *layer->transform(); |
+ if (layer->transform()) |
+ transform = transform * *layer->transform(); |
// We don't use fragment boxes when collecting a transformed layer's bounding box, since it always |
// paints unfragmented. |
@@ -2481,7 +2482,7 @@ LayoutRect DeprecatedPaintLayer::boundingBoxForCompositing(const DeprecatedPaint |
result.expand(m_layoutObject->style()->filterOutsets()); |
} |
- if (paintsWithTransform(PaintBehaviorNormal) || (options == ApplyBoundsChickenEggHacks && transform())) |
+ if (transform() && (paintsWithTransform(PaintBehaviorNormal) || options == ApplyBoundsChickenEggHacks)) |
result = transform()->mapRect(result); |
if (enclosingPaginationLayer()) { |
@@ -2603,7 +2604,7 @@ bool DeprecatedPaintLayer::hasCompositedClippingMask() const |
bool DeprecatedPaintLayer::paintsWithTransform(PaintBehavior paintBehavior) const |
{ |
- return transform() && ((paintBehavior & PaintBehaviorFlattenCompositingLayers) || compositingState() != PaintsIntoOwnBacking); |
+ return (transform() || layoutObject()->style()->position() == FixedPosition) && ((paintBehavior & PaintBehaviorFlattenCompositingLayers) || compositingState() != PaintsIntoOwnBacking); |
} |
bool DeprecatedPaintLayer::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const |