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

Unified Diff: Source/core/layout/LayoutView.h

Issue 1145993002: Refactor root element background painting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix DocumentLifecycle error Created 5 years, 6 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/layout/LayoutView.h
diff --git a/Source/core/layout/LayoutView.h b/Source/core/layout/LayoutView.h
index 82fb7698f4085283687d89f2fd2e68f7ca1d4236..4dac05126b8593ab1c463773926ace02f0dc5030 100644
--- a/Source/core/layout/LayoutView.h
+++ b/Source/core/layout/LayoutView.h
@@ -173,7 +173,21 @@ public:
void popLayoutState() { ASSERT(m_layoutState); m_layoutState = m_layoutState->next(); }
virtual void invalidateTreeIfNeeded(PaintInvalidationState&) override final;
+protected:
+ virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override;
+ virtual PaintInvalidationReason paintInvalidationReason(const LayoutBoxModelObject& paintInvalidationContainer,
+ const LayoutRect& oldBounds, const LayoutPoint& oldLocation,
+ const LayoutRect& newBounds, const LayoutPoint& newLocation) const override;
+ virtual PaintInvalidationReason invalidatePaintIfNeeded(PaintInvalidationState&, const LayoutBoxModelObject& newPaintInvalidationContainer) override;
+
private:
+ struct BackgroundPositioning {
+ TransformationMatrix transform;
+ LayoutSize borderBoxSize;
+ LayoutRect paddingBoxRect;
+ LayoutRect contentBoxRect;
+ };
+
virtual void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0, const PaintInvalidationState* = 0) const override;
virtual const LayoutObject* pushMappingToContainer(const LayoutBoxModelObject* ancestorToStopAt, LayoutGeometryMap&) const override;
virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const override;
@@ -188,11 +202,11 @@ private:
bool shouldUsePrintingLayout() const;
- LayoutObject* backgroundLayoutObject() const;
-
int viewLogicalWidthForBoxSizing() const;
int viewLogicalHeightForBoxSizing() const;
+ void getBackgroundPositioningFromDocumentElement(BackgroundPositioning&) const;
+
FrameView* m_frameView;
LayoutObject* m_selectionStart;
@@ -212,6 +226,8 @@ private:
unsigned m_hitTestCount;
+ BackgroundPositioning m_previousRootBackgroundPositioning;
+
OwnPtrWillBePersistent<PendingSelection> m_pendingSelection;
};

Powered by Google App Engine
This is Rietveld 408576698