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

Unified Diff: Source/core/rendering/RenderBoxModelObject.h

Issue 102123013: Fix painting of fixed background images in composited layers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixes per review comments Created 6 years, 9 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
Index: Source/core/rendering/RenderBoxModelObject.h
diff --git a/Source/core/rendering/RenderBoxModelObject.h b/Source/core/rendering/RenderBoxModelObject.h
index 6a94808895184c0077138406f15ed415988e198a..5a7b635c86d64640b9bfefebc3ba9ded4c6930ec 100644
--- a/Source/core/rendering/RenderBoxModelObject.h
+++ b/Source/core/rendering/RenderBoxModelObject.h
@@ -199,6 +199,10 @@ protected:
class BackgroundImageGeometry {
public:
+ BackgroundImageGeometry()
+ : m_hasNonLocalGeometry(false)
+ { }
+
IntPoint destOrigin() const { return m_destOrigin; }
void setDestOrigin(const IntPoint& destOrigin)
{
@@ -243,17 +247,22 @@ protected:
void useFixedAttachment(const IntPoint& attachmentPoint);
void clip(const IntRect&);
+
+ void setHasNonLocalGeometry(bool hasNonLocalGeometry = true) { m_hasNonLocalGeometry = hasNonLocalGeometry; }
+ bool hasNonLocalGeometry() const { return m_hasNonLocalGeometry; }
+
private:
IntRect m_destRect;
IntPoint m_destOrigin;
IntPoint m_phase;
IntSize m_tileSize;
IntSize m_repeatSpacing;
+ bool m_hasNonLocalGeometry; // Has background-attachment: fixed. Implies that we can't always cheaply compute destRect.
};
LayoutPoint adjustedPositionRelativeToOffsetParent(const LayoutPoint&) const;
- void calculateBackgroundImageGeometry(const FillLayer*, const LayoutRect& paintRect, BackgroundImageGeometry&, RenderObject* = 0);
+ void calculateBackgroundImageGeometry(const RenderLayerModelObject* paintContainer, const FillLayer*, const LayoutRect& paintRect, BackgroundImageGeometry&, RenderObject* = 0) const;
void getBorderEdgeInfo(class BorderEdge[], const RenderStyle*, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
bool borderObscuresBackgroundEdge(const FloatSize& contextScale) const;
bool borderObscuresBackground() const;

Powered by Google App Engine
This is Rietveld 408576698