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

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

Issue 1491193003: 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 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 virtual void computeLayerHitTestRects(LayerHitTestRects&) const; 1226 virtual void computeLayerHitTestRects(LayerHitTestRects&) const;
1227 1227
1228 static RespectImageOrientationEnum shouldRespectImageOrientation(const Layou tObject*); 1228 static RespectImageOrientationEnum shouldRespectImageOrientation(const Layou tObject*);
1229 1229
1230 bool isRelayoutBoundaryForInspector() const; 1230 bool isRelayoutBoundaryForInspector() const;
1231 1231
1232 // The previous paint invalidation rect, in the the space of the paint inval idation container (*not* the graphics layer that paints 1232 // The previous paint invalidation rect, in the the space of the paint inval idation container (*not* the graphics layer that paints
1233 // this object). 1233 // this object).
1234 LayoutRect previousPaintInvalidationRectIncludingCompositedScrolling(const L ayoutBoxModelObject& paintInvalidationContainer) const; 1234 LayoutRect previousPaintInvalidationRectIncludingCompositedScrolling(const L ayoutBoxModelObject& paintInvalidationContainer) const;
1235 LayoutSize previousPaintInvalidationRectSize() const { return previousPaintI nvalidationRect().size(); } 1235 LayoutSize previousPaintInvalidationRectSize() const { return previousPaintI nvalidationRect().size(); }
1236 void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPa intInvalidationRect = rect; } 1236
1237 // Called when the previous paint invalidation rect(s) is no longer valid.
1238 virtual void clearPreviousPaintInvalidationRects();
1237 1239
1238 // Only adjusts if the paint invalidation container is not a composited scro ller. 1240 // Only adjusts if the paint invalidation container is not a composited scro ller.
1239 void adjustPreviousPaintInvalidationForScrollIfNeeded(const DoubleSize& scro llDelta); 1241 void adjustPreviousPaintInvalidationForScrollIfNeeded(const DoubleSize& scro llDelta);
1240 1242
1241 // The previous position of the top-left corner of the object in its previou s paint backing. 1243 // The previous position of the top-left corner of the object in its previou s paint backing.
1242 const LayoutPoint& previousPositionFromPaintInvalidationBacking() const 1244 const LayoutPoint& previousPositionFromPaintInvalidationBacking() const
1243 { 1245 {
1244 ASSERT(!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()); 1246 ASSERT(!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled());
1245 return m_previousPositionFromPaintInvalidationBacking; 1247 return m_previousPositionFromPaintInvalidationBacking;
1246 } 1248 }
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 // container, so callers should provide only the offset of the container wit hin it's layer. 1426 // container, so callers should provide only the offset of the container wit hin it's layer.
1425 // containerRect is a rect that has already been added for the currentLayer which is likely to 1427 // containerRect is a rect that has already been added for the currentLayer which is likely to
1426 // be a container for child elements. Any rect wholly contained by container Rect can be 1428 // be a container for child elements. Any rect wholly contained by container Rect can be
1427 // skipped. 1429 // skipped.
1428 virtual void addLayerHitTestRects(LayerHitTestRects&, const PaintLayer* curr entLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const ; 1430 virtual void addLayerHitTestRects(LayerHitTestRects&, const PaintLayer* curr entLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const ;
1429 1431
1430 // Add hit-test rects for this layoutObject only to the provided list. layer Offset is the offset 1432 // Add hit-test rects for this layoutObject only to the provided list. layer Offset is the offset
1431 // of this layoutObject within the current layer that should be used for eac h result. 1433 // of this layoutObject within the current layer that should be used for eac h result.
1432 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const { } 1434 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const { }
1433 1435
1436 void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPa intInvalidationRect = rect; }
1437
1434 virtual PaintInvalidationReason paintInvalidationReason(const LayoutBoxModel Object& paintInvalidationContainer, 1438 virtual PaintInvalidationReason paintInvalidationReason(const LayoutBoxModel Object& paintInvalidationContainer,
1435 const LayoutRect& oldPaintInvalidationRect, const LayoutPoint& oldPositi onFromPaintInvalidationBacking, 1439 const LayoutRect& oldPaintInvalidationRect, const LayoutPoint& oldPositi onFromPaintInvalidationBacking,
1436 const LayoutRect& newPaintInvalidationRect, const LayoutPoint& newPositi onFromPaintInvalidationBacking) const; 1440 const LayoutRect& newPaintInvalidationRect, const LayoutPoint& newPositi onFromPaintInvalidationBacking) const;
1437 virtual void incrementallyInvalidatePaint(const LayoutBoxModelObject& paintI nvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds, const LayoutPoint& positionFromPaintInvalidationBacking); 1441 virtual void incrementallyInvalidatePaint(const LayoutBoxModelObject& paintI nvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds, const LayoutPoint& positionFromPaintInvalidationBacking);
1438 1442
1439 virtual bool hasNonCompositedScrollbars() const { return false; } 1443 virtual bool hasNonCompositedScrollbars() const { return false; }
1440 1444
1441 #if ENABLE(ASSERT) 1445 #if ENABLE(ASSERT)
1442 virtual bool paintInvalidationStateIsDirty() const 1446 virtual bool paintInvalidationStateIsDirty() const
1443 { 1447 {
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
2037 void showTree(const blink::LayoutObject*); 2041 void showTree(const blink::LayoutObject*);
2038 void showLineTree(const blink::LayoutObject*); 2042 void showLineTree(const blink::LayoutObject*);
2039 void showLayoutTree(const blink::LayoutObject* object1); 2043 void showLayoutTree(const blink::LayoutObject* object1);
2040 // We don't make object2 an optional parameter so that showLayoutTree 2044 // We don't make object2 an optional parameter so that showLayoutTree
2041 // can be called from gdb easily. 2045 // can be called from gdb easily.
2042 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2046 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2043 2047
2044 #endif 2048 #endif
2045 2049
2046 #endif // LayoutObject_h 2050 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698