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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 1511143002: Reland of Fix several corner case issues of scrollbar paint invalidation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 virtual void computeLayerHitTestRects(LayerHitTestRects&) const; 1230 virtual void computeLayerHitTestRects(LayerHitTestRects&) const;
1231 1231
1232 static RespectImageOrientationEnum shouldRespectImageOrientation(const Layou tObject*); 1232 static RespectImageOrientationEnum shouldRespectImageOrientation(const Layou tObject*);
1233 1233
1234 bool isRelayoutBoundaryForInspector() const; 1234 bool isRelayoutBoundaryForInspector() const;
1235 1235
1236 // The previous paint invalidation rect, in the the space of the paint inval idation container (*not* the graphics layer that paints 1236 // The previous paint invalidation rect, in the the space of the paint inval idation container (*not* the graphics layer that paints
1237 // this object). 1237 // this object).
1238 LayoutRect previousPaintInvalidationRectIncludingCompositedScrolling(const L ayoutBoxModelObject& paintInvalidationContainer) const; 1238 LayoutRect previousPaintInvalidationRectIncludingCompositedScrolling(const L ayoutBoxModelObject& paintInvalidationContainer) const;
1239 LayoutSize previousPaintInvalidationRectSize() const { return previousPaintI nvalidationRect().size(); } 1239 LayoutSize previousPaintInvalidationRectSize() const { return previousPaintI nvalidationRect().size(); }
1240 void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPa intInvalidationRect = rect; } 1240
1241 // Called when the previous paint invalidation rect(s) is no longer valid.
1242 virtual void clearPreviousPaintInvalidationRects();
1241 1243
1242 // Only adjusts if the paint invalidation container is not a composited scro ller. 1244 // Only adjusts if the paint invalidation container is not a composited scro ller.
1243 void adjustPreviousPaintInvalidationForScrollIfNeeded(const DoubleSize& scro llDelta); 1245 void adjustPreviousPaintInvalidationForScrollIfNeeded(const DoubleSize& scro llDelta);
1244 1246
1245 // The previous position of the top-left corner of the object in its previou s paint backing. 1247 // The previous position of the top-left corner of the object in its previou s paint backing.
1246 const LayoutPoint& previousPositionFromPaintInvalidationBacking() const 1248 const LayoutPoint& previousPositionFromPaintInvalidationBacking() const
1247 { 1249 {
1248 ASSERT(!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()); 1250 ASSERT(!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled());
1249 return m_previousPositionFromPaintInvalidationBacking; 1251 return m_previousPositionFromPaintInvalidationBacking;
1250 } 1252 }
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 // container, so callers should provide only the offset of the container wit hin it's layer. 1428 // container, so callers should provide only the offset of the container wit hin it's layer.
1427 // containerRect is a rect that has already been added for the currentLayer which is likely to 1429 // containerRect is a rect that has already been added for the currentLayer which is likely to
1428 // be a container for child elements. Any rect wholly contained by container Rect can be 1430 // be a container for child elements. Any rect wholly contained by container Rect can be
1429 // skipped. 1431 // skipped.
1430 virtual void addLayerHitTestRects(LayerHitTestRects&, const PaintLayer* curr entLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const ; 1432 virtual void addLayerHitTestRects(LayerHitTestRects&, const PaintLayer* curr entLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const ;
1431 1433
1432 // Add hit-test rects for this layoutObject only to the provided list. layer Offset is the offset 1434 // Add hit-test rects for this layoutObject only to the provided list. layer Offset is the offset
1433 // of this layoutObject within the current layer that should be used for eac h result. 1435 // of this layoutObject within the current layer that should be used for eac h result.
1434 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const { } 1436 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const { }
1435 1437
1438 void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPa intInvalidationRect = rect; }
1439
1436 virtual PaintInvalidationReason paintInvalidationReason(const LayoutBoxModel Object& paintInvalidationContainer, 1440 virtual PaintInvalidationReason paintInvalidationReason(const LayoutBoxModel Object& paintInvalidationContainer,
1437 const LayoutRect& oldPaintInvalidationRect, const LayoutPoint& oldPositi onFromPaintInvalidationBacking, 1441 const LayoutRect& oldPaintInvalidationRect, const LayoutPoint& oldPositi onFromPaintInvalidationBacking,
1438 const LayoutRect& newPaintInvalidationRect, const LayoutPoint& newPositi onFromPaintInvalidationBacking) const; 1442 const LayoutRect& newPaintInvalidationRect, const LayoutPoint& newPositi onFromPaintInvalidationBacking) const;
1439 virtual void incrementallyInvalidatePaint(const LayoutBoxModelObject& paintI nvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds, const LayoutPoint& positionFromPaintInvalidationBacking); 1443 virtual void incrementallyInvalidatePaint(const LayoutBoxModelObject& paintI nvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds, const LayoutPoint& positionFromPaintInvalidationBacking);
1440 1444
1441 virtual bool hasNonCompositedScrollbars() const { return false; } 1445 virtual bool hasNonCompositedScrollbars() const { return false; }
1442 1446
1443 #if ENABLE(ASSERT) 1447 #if ENABLE(ASSERT)
1444 virtual bool paintInvalidationStateIsDirty() const 1448 virtual bool paintInvalidationStateIsDirty() const
1445 { 1449 {
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
2039 void showTree(const blink::LayoutObject*); 2043 void showTree(const blink::LayoutObject*);
2040 void showLineTree(const blink::LayoutObject*); 2044 void showLineTree(const blink::LayoutObject*);
2041 void showLayoutTree(const blink::LayoutObject* object1); 2045 void showLayoutTree(const blink::LayoutObject* object1);
2042 // We don't make object2 an optional parameter so that showLayoutTree 2046 // We don't make object2 an optional parameter so that showLayoutTree
2043 // can be called from gdb easily. 2047 // can be called from gdb easily.
2044 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2048 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2045 2049
2046 #endif 2050 #endif
2047 2051
2048 #endif // LayoutObject_h 2052 #endif // LayoutObject_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698