OLD | NEW |
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 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1358 virtual void clearPaintInvalidationFlags(const PaintInvalidationState&); | 1358 virtual void clearPaintInvalidationFlags(const PaintInvalidationState&); |
1359 | 1359 |
1360 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval
idation(); } | 1360 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval
idation(); } |
1361 void setMayNeedPaintInvalidation(); | 1361 void setMayNeedPaintInvalidation(); |
1362 | 1362 |
1363 bool shouldInvalidateSelection() const { return m_bitfields.shouldInvalidate
Selection(); } | 1363 bool shouldInvalidateSelection() const { return m_bitfields.shouldInvalidate
Selection(); } |
1364 void setShouldInvalidateSelection(); | 1364 void setShouldInvalidateSelection(); |
1365 | 1365 |
1366 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva
lidationState) const | 1366 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva
lidationState) const |
1367 { | 1367 { |
1368 // Should check for paint invalidation if some ancestor changed location
, because this object | 1368 return paintInvalidationState.hasForcedSubtreeInvalidationFlags() |
1369 // may also change paint offset or location in paint invalidation contai
ner, even if there is | |
1370 // no paint invalidation flag set. | |
1371 return paintInvalidationState.forcedSubtreeInvalidationWithinContainer() | |
1372 || paintInvalidationState.forcedSubtreeInvalidationRectUpdateWithinC
ontainer() | |
1373 || shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState
(); | 1369 || shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState
(); |
1374 } | 1370 } |
1375 | 1371 |
1376 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con
st | 1372 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con
st |
1377 { | 1373 { |
1378 return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() ||
shouldInvalidateSelection() || m_bitfields.childShouldCheckForPaintInvalidation(
); | 1374 return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() ||
shouldInvalidateSelection() || m_bitfields.childShouldCheckForPaintInvalidation(
); |
1379 } | 1375 } |
1380 | 1376 |
1381 virtual LayoutRect viewRect() const; | 1377 virtual LayoutRect viewRect() const; |
1382 | 1378 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1514 // be a container for child elements. Any rect wholly contained by container
Rect can be | 1510 // be a container for child elements. Any rect wholly contained by container
Rect can be |
1515 // skipped. | 1511 // skipped. |
1516 virtual void addLayerHitTestRects(LayerHitTestRects&, const PaintLayer* curr
entLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const
; | 1512 virtual void addLayerHitTestRects(LayerHitTestRects&, const PaintLayer* curr
entLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const
; |
1517 | 1513 |
1518 // Add hit-test rects for this layoutObject only to the provided list. layer
Offset is the offset | 1514 // Add hit-test rects for this layoutObject only to the provided list. layer
Offset is the offset |
1519 // of this layoutObject within the current layer that should be used for eac
h result. | 1515 // of this layoutObject within the current layer that should be used for eac
h result. |
1520 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const { } | 1516 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const { } |
1521 | 1517 |
1522 void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPa
intInvalidationRect = rect; } | 1518 void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPa
intInvalidationRect = rect; } |
1523 | 1519 |
1524 virtual PaintInvalidationReason getPaintInvalidationReason(const LayoutBoxMo
delObject& paintInvalidationContainer, | 1520 virtual PaintInvalidationReason getPaintInvalidationReason(const PaintInvali
dationState&, |
1525 const LayoutRect& oldPaintInvalidationRect, const LayoutPoint& oldPositi
onFromPaintInvalidationBacking, | 1521 const LayoutRect& oldPaintInvalidationRect, const LayoutPoint& oldPositi
onFromPaintInvalidationBacking, |
1526 const LayoutRect& newPaintInvalidationRect, const LayoutPoint& newPositi
onFromPaintInvalidationBacking) const; | 1522 const LayoutRect& newPaintInvalidationRect, const LayoutPoint& newPositi
onFromPaintInvalidationBacking) const; |
1527 | 1523 |
1528 // This function tries to minimize the amount of invalidation | 1524 // This function tries to minimize the amount of invalidation |
1529 // generated by invalidating the "difference" between |oldBounds| | 1525 // generated by invalidating the "difference" between |oldBounds| |
1530 // and |newBounds|. This means invalidating the union of the | 1526 // and |newBounds|. This means invalidating the union of the |
1531 // previous rectangles but not their intersection. | 1527 // previous rectangles but not their intersection. |
1532 // | 1528 // |
1533 // The use case is when an element only requires a paint | 1529 // The use case is when an element only requires a paint |
1534 // invalidation (which means that its content didn't change) | 1530 // invalidation (which means that its content didn't change) |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2185 void showTree(const blink::LayoutObject*); | 2181 void showTree(const blink::LayoutObject*); |
2186 void showLineTree(const blink::LayoutObject*); | 2182 void showLineTree(const blink::LayoutObject*); |
2187 void showLayoutTree(const blink::LayoutObject* object1); | 2183 void showLayoutTree(const blink::LayoutObject* object1); |
2188 // We don't make object2 an optional parameter so that showLayoutTree | 2184 // We don't make object2 an optional parameter so that showLayoutTree |
2189 // can be called from gdb easily. | 2185 // can be called from gdb easily. |
2190 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); | 2186 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); |
2191 | 2187 |
2192 #endif | 2188 #endif |
2193 | 2189 |
2194 #endif // LayoutObject_h | 2190 #endif // LayoutObject_h |
OLD | NEW |