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