Index: third_party/WebKit/Source/core/layout/LayoutObject.h |
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h |
index f9c95f774d671821a9ee5a018ca51feb2dd98288..19df67c3a1d8a6b6cc6ac40a5315fdeaccfb60e8 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h |
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h |
@@ -1128,6 +1128,7 @@ |
// Invalidate the paint of a specific subrectangle within a given object. The rect is in the object's coordinate space. |
void invalidatePaintRectangle(const LayoutRect&) const; |
+ void invalidatePaintRectangleNotInvalidatingDisplayItemClients(const LayoutRect&) const; |
// Walk the tree after layout issuing paint invalidations for layoutObjects that have changed or moved, updating bounds that have changed, and clearing paint invalidation state. |
virtual void invalidateTreeIfNeeded(const PaintInvalidationState&); |
@@ -1375,21 +1376,8 @@ |
virtual LayoutRect viewRect() const; |
- // TODO(wangxianzhu): Change the call sites to use the faster version if possible. |
- void slowSetPaintingLayerNeedsRepaintAndInvalidateDisplayItemClient(const DisplayItemClient& client, PaintInvalidationReason reason) const |
- { |
- slowSetPaintingLayerNeedsRepaint(); |
- invalidateDisplayItemClient(client, reason); |
- } |
- |
- // Sets painting layer needsRepaint, then calls invaldiateDisplayItemClient(). |
- // Should use this version when PaintInvalidationState is available. |
- void setPaintingLayerNeedsRepaintAndInvalidateDisplayItemClient(const PaintInvalidationState&, const DisplayItemClient&, PaintInvalidationReason) const; |
- |
- // The caller should ensure the painting layer has been setNeedsRepaint before calling this function. |
- void invalidateDisplayItemClient(const DisplayItemClient&, PaintInvalidationReason) const; |
- |
- void invalidateDisplayItemClientsIncludingNonCompositingDescendants(PaintInvalidationReason) const; |
+ void invalidateDisplayItemClient(const DisplayItemClient&) const; |
+ void invalidateDisplayItemClientsIncludingNonCompositingDescendants(const LayoutBoxModelObject* paintInvalidationContainer, PaintInvalidationReason) const; |
// Called before anonymousChild.setStyle(). Override to set custom styles for the child. |
virtual void updateAnonymousChildStyle(const LayoutObject& anonymousChild, ComputedStyle& style) const { } |
@@ -1587,15 +1575,14 @@ |
// not including children which will be invalidated normally during invalidateTreeIfNeeded() and |
// parts which are invalidated separately (e.g. scrollbars). |
// The caller should ensure the painting layer has been setNeedsRepaint before calling this function. |
- virtual void invalidateDisplayItemClients(PaintInvalidationReason) const; |
- |
- // This calls paintingLayer() which walks up the tree. |
+ virtual void invalidateDisplayItemClients(const LayoutBoxModelObject& paintInvalidationContainer, PaintInvalidationReason) const; |
+ |
// If possible, use the faster paintInvalidationState.paintingLayer().setNeedsRepaint(). |
- void slowSetPaintingLayerNeedsRepaint() const; |
- |
- // Sets painting layer needsRepaint, then calls invalidateDisplayItemClients(). |
+ void setPaintingLayerNeedsRepaint() const; |
+ |
+ // Sets enclosing layer needsRepaint, then calls invalidateDisplayItemClients(). |
// Should use this version when PaintInvalidationState is available. |
- void invalidateDisplayItemClientsWithPaintInvalidationState(const PaintInvalidationState&, PaintInvalidationReason) const; |
+ void invalidateDisplayItemClientsWithPaintInvalidationState(const LayoutBoxModelObject& paintInvalidationContainer, const PaintInvalidationState&, PaintInvalidationReason) const; |
void setIsBackgroundAttachmentFixedObject(bool); |
@@ -1676,6 +1663,9 @@ |
bool isTextOrSVGChild() const { return isText() || (isSVG() && !isSVGRoot()); } |
static bool isAllowedToModifyLayoutTreeStructure(Document&); |
+ |
+ // The passed rect is mutated into the coordinate space of the paint invalidation container. |
+ const LayoutBoxModelObject* invalidatePaintRectangleInternal(const LayoutRect&) const; |
// Returns the parent for paint invalidation. |
// - For LayoutView, returns the owner layout object in the containing frame if any or nullptr; |