Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1077)

Unified Diff: Source/core/paint/DeprecatedPaintLayer.cpp

Issue 1110653003: [Reland] Correct fixed-position recording for Slimming Paint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/layout/LayoutObject.cpp ('k') | Source/core/paint/DeprecatedPaintLayerPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/layout/LayoutObject.cpp ('k') | Source/core/paint/DeprecatedPaintLayerPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698