| 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 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1348 virtual void clearPaintInvalidationFlags(const PaintInvalidationState&); | 1348 virtual void clearPaintInvalidationFlags(const PaintInvalidationState&); |
| 1349 | 1349 |
| 1350 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval
idation(); } | 1350 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval
idation(); } |
| 1351 void setMayNeedPaintInvalidation(); | 1351 void setMayNeedPaintInvalidation(); |
| 1352 | 1352 |
| 1353 bool shouldInvalidateSelection() const { return m_bitfields.shouldInvalidate
Selection(); } | 1353 bool shouldInvalidateSelection() const { return m_bitfields.shouldInvalidate
Selection(); } |
| 1354 void setShouldInvalidateSelection(); | 1354 void setShouldInvalidateSelection(); |
| 1355 | 1355 |
| 1356 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva
lidationState) const | 1356 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva
lidationState) const |
| 1357 { | 1357 { |
| 1358 // Should check for paint invalidation if some ancestor changed location
, because this object | 1358 return paintInvalidationState.hasForcedSubtreeInvalidationFlags() |
| 1359 // may also change paint offset or location in paint invalidation contai
ner, even if there is | |
| 1360 // no paint invalidation flag set. | |
| 1361 return paintInvalidationState.forcedSubtreeInvalidationWithinContainer() | |
| 1362 || paintInvalidationState.forcedSubtreeInvalidationRectUpdateWithinC
ontainer() | |
| 1363 || shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState
(); | 1359 || shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState
(); |
| 1364 } | 1360 } |
| 1365 | 1361 |
| 1366 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con
st | 1362 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con
st |
| 1367 { | 1363 { |
| 1368 return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() ||
shouldInvalidateSelection() || m_bitfields.childShouldCheckForPaintInvalidation(
); | 1364 return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() ||
shouldInvalidateSelection() || m_bitfields.childShouldCheckForPaintInvalidation(
); |
| 1369 } | 1365 } |
| 1370 | 1366 |
| 1371 virtual LayoutRect viewRect() const; | 1367 virtual LayoutRect viewRect() const; |
| 1372 | 1368 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1504 // be a container for child elements. Any rect wholly contained by container
Rect can be | 1500 // be a container for child elements. Any rect wholly contained by container
Rect can be |
| 1505 // skipped. | 1501 // skipped. |
| 1506 virtual void addLayerHitTestRects(LayerHitTestRects&, const PaintLayer* curr
entLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const
; | 1502 virtual void addLayerHitTestRects(LayerHitTestRects&, const PaintLayer* curr
entLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const
; |
| 1507 | 1503 |
| 1508 // Add hit-test rects for this layoutObject only to the provided list. layer
Offset is the offset | 1504 // Add hit-test rects for this layoutObject only to the provided list. layer
Offset is the offset |
| 1509 // of this layoutObject within the current layer that should be used for eac
h result. | 1505 // of this layoutObject within the current layer that should be used for eac
h result. |
| 1510 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const { } | 1506 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const { } |
| 1511 | 1507 |
| 1512 void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPa
intInvalidationRect = rect; } | 1508 void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPa
intInvalidationRect = rect; } |
| 1513 | 1509 |
| 1514 virtual PaintInvalidationReason getPaintInvalidationReason(const LayoutBoxMo
delObject& paintInvalidationContainer, | 1510 virtual PaintInvalidationReason getPaintInvalidationReason(const PaintInvali
dationState&, |
| 1515 const LayoutRect& oldPaintInvalidationRect, const LayoutPoint& oldPositi
onFromPaintInvalidationBacking, | 1511 const LayoutRect& oldPaintInvalidationRect, const LayoutPoint& oldPositi
onFromPaintInvalidationBacking, |
| 1516 const LayoutRect& newPaintInvalidationRect, const LayoutPoint& newPositi
onFromPaintInvalidationBacking) const; | 1512 const LayoutRect& newPaintInvalidationRect, const LayoutPoint& newPositi
onFromPaintInvalidationBacking) const; |
| 1517 | 1513 |
| 1518 // This function tries to minimize the amount of invalidation | 1514 // This function tries to minimize the amount of invalidation |
| 1519 // generated by invalidating the "difference" between |oldBounds| | 1515 // generated by invalidating the "difference" between |oldBounds| |
| 1520 // and |newBounds|. This means invalidating the union of the | 1516 // and |newBounds|. This means invalidating the union of the |
| 1521 // previous rectangles but not their intersection. | 1517 // previous rectangles but not their intersection. |
| 1522 // | 1518 // |
| 1523 // The use case is when an element only requires a paint | 1519 // The use case is when an element only requires a paint |
| 1524 // invalidation (which means that its content didn't change) | 1520 // invalidation (which means that its content didn't change) |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2172 void showTree(const blink::LayoutObject*); | 2168 void showTree(const blink::LayoutObject*); |
| 2173 void showLineTree(const blink::LayoutObject*); | 2169 void showLineTree(const blink::LayoutObject*); |
| 2174 void showLayoutTree(const blink::LayoutObject* object1); | 2170 void showLayoutTree(const blink::LayoutObject* object1); |
| 2175 // We don't make object2 an optional parameter so that showLayoutTree | 2171 // We don't make object2 an optional parameter so that showLayoutTree |
| 2176 // can be called from gdb easily. | 2172 // can be called from gdb easily. |
| 2177 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); | 2173 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); |
| 2178 | 2174 |
| 2179 #endif | 2175 #endif |
| 2180 | 2176 |
| 2181 #endif // LayoutObject_h | 2177 #endif // LayoutObject_h |
| OLD | NEW |