| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 LayoutObject* nextInPreOrder() const; | 262 LayoutObject* nextInPreOrder() const; |
| 263 LayoutObject* nextInPreOrder(const LayoutObject* stayWithin) const; | 263 LayoutObject* nextInPreOrder(const LayoutObject* stayWithin) const; |
| 264 LayoutObject* nextInPreOrderAfterChildren() const; | 264 LayoutObject* nextInPreOrderAfterChildren() const; |
| 265 LayoutObject* nextInPreOrderAfterChildren(const LayoutObject* stayWithin) co
nst; | 265 LayoutObject* nextInPreOrderAfterChildren(const LayoutObject* stayWithin) co
nst; |
| 266 LayoutObject* previousInPreOrder() const; | 266 LayoutObject* previousInPreOrder() const; |
| 267 LayoutObject* previousInPreOrder(const LayoutObject* stayWithin) const; | 267 LayoutObject* previousInPreOrder(const LayoutObject* stayWithin) const; |
| 268 LayoutObject* childAt(unsigned) const; | 268 LayoutObject* childAt(unsigned) const; |
| 269 | 269 |
| 270 LayoutObject* lastLeafChild() const; | 270 LayoutObject* lastLeafChild() const; |
| 271 | 271 |
| 272 // The following six functions are used when the layout tree hierarchy chang
es to make sure layers get | 272 // The following functions are used when the layout tree hierarchy changes t
o make sure layers get |
| 273 // properly added and removed. Since containership can be implemented by an
y subclass, and since a hierarchy | 273 // properly added and removed. Since containership can be implemented by an
y subclass, and since a hierarchy |
| 274 // can contain a mixture of boxes and other object types, these functions ne
ed to be in the base class. | 274 // can contain a mixture of boxes and other object types, these functions ne
ed to be in the base class. |
| 275 PaintLayer* enclosingLayer() const; | 275 PaintLayer* enclosingLayer() const; |
| 276 void addLayers(PaintLayer* parentLayer); | 276 void addLayers(PaintLayer* parentLayer); |
| 277 void removeLayers(PaintLayer* parentLayer); | 277 void removeLayers(PaintLayer* parentLayer); |
| 278 void moveLayers(PaintLayer* oldParent, PaintLayer* newParent); | 278 void moveLayers(PaintLayer* oldParent, PaintLayer* newParent); |
| 279 PaintLayer* findNextLayer(PaintLayer* parentLayer, LayoutObject* startPoint,
bool checkParent = true); | 279 PaintLayer* findNextLayer(PaintLayer* parentLayer, LayoutObject* startPoint,
bool checkParent = true); |
| 280 | 280 |
| 281 // Returns the layer that will paint this object. |
| 282 // If possible, use the faster PaintInvalidationState::paintingLayer() inste
ad. |
| 283 PaintLayer* paintingLayer() const; |
| 284 |
| 281 // Scrolling is a LayoutBox concept, however some code just cares about recu
rsively scrolling our enclosing ScrollableArea(s). | 285 // Scrolling is a LayoutBox concept, however some code just cares about recu
rsively scrolling our enclosing ScrollableArea(s). |
| 282 bool scrollRectToVisible( | 286 bool scrollRectToVisible( |
| 283 const LayoutRect&, | 287 const LayoutRect&, |
| 284 const ScrollAlignment& alignX = ScrollAlignment::alignCenterIfNeeded, | 288 const ScrollAlignment& alignX = ScrollAlignment::alignCenterIfNeeded, |
| 285 const ScrollAlignment& alignY = ScrollAlignment::alignCenterIfNeeded, | 289 const ScrollAlignment& alignY = ScrollAlignment::alignCenterIfNeeded, |
| 286 ScrollType = ProgrammaticScroll, | 290 ScrollType = ProgrammaticScroll, |
| 287 bool makeVisibleInVisualViewport = true); | 291 bool makeVisibleInVisualViewport = true); |
| 288 | 292 |
| 289 // Convenience function for getting to the nearest enclosing box of a Layout
Object. | 293 // Convenience function for getting to the nearest enclosing box of a Layout
Object. |
| 290 LayoutBox* enclosingBox() const; | 294 LayoutBox* enclosingBox() const; |
| (...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1550 | 1554 |
| 1551 // This function generates the invalidation for this object only. | 1555 // This function generates the invalidation for this object only. |
| 1552 // It doesn't recurse into other object, as this is handled | 1556 // It doesn't recurse into other object, as this is handled |
| 1553 // by invalidatePaintOfSubtreesIfNeeded. | 1557 // by invalidatePaintOfSubtreesIfNeeded. |
| 1554 virtual PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidat
ionState&); | 1558 virtual PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidat
ionState&); |
| 1555 | 1559 |
| 1556 // When this object is invalidated for paint, this method is called to inval
idate any DisplayItemClients | 1560 // When this object is invalidated for paint, this method is called to inval
idate any DisplayItemClients |
| 1557 // owned by this object, including the object itself, LayoutText/LayoutInlin
e line boxes, etc., | 1561 // owned by this object, including the object itself, LayoutText/LayoutInlin
e line boxes, etc., |
| 1558 // not including children which will be invalidated normally during invalida
teTreeIfNeeded() and | 1562 // not including children which will be invalidated normally during invalida
teTreeIfNeeded() and |
| 1559 // parts which are invalidated separately (e.g. scrollbars). | 1563 // parts which are invalidated separately (e.g. scrollbars). |
| 1560 // The caller should ensure the enclosing layer has been setNeedsRepaint bef
ore calling this function. | 1564 // The caller should ensure the painting layer has been setNeedsRepaint befo
re calling this function. |
| 1561 virtual void invalidateDisplayItemClients(const LayoutBoxModelObject& paintI
nvalidationContainer, PaintInvalidationReason) const; | 1565 virtual void invalidateDisplayItemClients(const LayoutBoxModelObject& paintI
nvalidationContainer, PaintInvalidationReason) const; |
| 1562 | 1566 |
| 1567 // If possible, use the faster paintInvalidationState.paintingLayer().setNee
dsRepaint(). |
| 1568 void setPaintingLayerNeedsRepaint() const; |
| 1569 |
| 1563 // Sets enclosing layer needsRepaint, then calls invalidateDisplayItemClient
s(). | 1570 // Sets enclosing layer needsRepaint, then calls invalidateDisplayItemClient
s(). |
| 1564 // Should use this version when PaintInvalidationState is available. | 1571 // Should use this version when PaintInvalidationState is available. |
| 1565 void invalidateDisplayItemClientsWithPaintInvalidationState(const LayoutBoxM
odelObject& paintInvalidationContainer, const PaintInvalidationState&, PaintInva
lidationReason) const; | 1572 void invalidateDisplayItemClientsWithPaintInvalidationState(const LayoutBoxM
odelObject& paintInvalidationContainer, const PaintInvalidationState&, PaintInva
lidationReason) const; |
| 1566 | 1573 |
| 1567 void setIsBackgroundAttachmentFixedObject(bool); | 1574 void setIsBackgroundAttachmentFixedObject(bool); |
| 1568 | 1575 |
| 1569 void clearSelfNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setSelfNee
dsOverflowRecalcAfterStyleChange(false); } | 1576 void clearSelfNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setSelfNee
dsOverflowRecalcAfterStyleChange(false); } |
| 1570 void setShouldInvalidateOverflowForPaint() { m_bitfields.setShouldInvalidate
OverflowForPaint(true); } | 1577 void setShouldInvalidateOverflowForPaint() { m_bitfields.setShouldInvalidate
OverflowForPaint(true); } |
| 1571 void setEverHadLayout() { m_bitfields.setEverHadLayout(true); } | 1578 void setEverHadLayout() { m_bitfields.setEverHadLayout(true); } |
| 1572 | 1579 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1609 inline void markAncestorsForOverflowRecalcIfNeeded(); | 1616 inline void markAncestorsForOverflowRecalcIfNeeded(); |
| 1610 | 1617 |
| 1611 inline void markAncestorsForPaintInvalidation(); | 1618 inline void markAncestorsForPaintInvalidation(); |
| 1612 | 1619 |
| 1613 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject& paintInv
alidationContainer, const PaintInvalidationState&, PaintInvalidationReason); | 1620 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject& paintInv
alidationContainer, const PaintInvalidationState&, PaintInvalidationReason); |
| 1614 | 1621 |
| 1615 inline void invalidateContainerPreferredLogicalWidths(); | 1622 inline void invalidateContainerPreferredLogicalWidths(); |
| 1616 | 1623 |
| 1617 void invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal(const L
ayoutBoxModelObject& paintInvalidationContainer); | 1624 void invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal(const L
ayoutBoxModelObject& paintInvalidationContainer); |
| 1618 | 1625 |
| 1619 // The caller should ensure the enclosing layer has been setNeedsRepaint bef
ore calling this function. | 1626 // The caller should ensure the painting layer has been setNeedsRepaint befo
re calling this function. |
| 1620 void invalidatePaintOfPreviousPaintInvalidationRect(const LayoutBoxModelObje
ct& paintInvalidationContainer, PaintInvalidationReason); | 1627 void invalidatePaintOfPreviousPaintInvalidationRect(const LayoutBoxModelObje
ct& paintInvalidationContainer, PaintInvalidationReason); |
| 1621 | 1628 |
| 1622 LayoutRect previousSelectionRectForPaintInvalidation() const; | 1629 LayoutRect previousSelectionRectForPaintInvalidation() const; |
| 1623 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&); | 1630 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&); |
| 1624 | 1631 |
| 1625 LayoutObject* containerForAbsolutePosition(const LayoutBoxModelObject* ances
tor = nullptr, bool* ancestorSkipped = nullptr, bool* filterOrReflectionSkipped
= nullptr) const; | 1632 LayoutObject* containerForAbsolutePosition(const LayoutBoxModelObject* ances
tor = nullptr, bool* ancestorSkipped = nullptr, bool* filterOrReflectionSkipped
= nullptr) const; |
| 1626 | 1633 |
| 1627 const LayoutBoxModelObject* enclosingCompositedContainer() const; | 1634 const LayoutBoxModelObject* enclosingCompositedContainer() const; |
| 1628 | 1635 |
| 1629 LayoutFlowThread* locateFlowThreadContainingBlock() const; | 1636 LayoutFlowThread* locateFlowThreadContainingBlock() const; |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2172 void showTree(const blink::LayoutObject*); | 2179 void showTree(const blink::LayoutObject*); |
| 2173 void showLineTree(const blink::LayoutObject*); | 2180 void showLineTree(const blink::LayoutObject*); |
| 2174 void showLayoutTree(const blink::LayoutObject* object1); | 2181 void showLayoutTree(const blink::LayoutObject* object1); |
| 2175 // We don't make object2 an optional parameter so that showLayoutTree | 2182 // We don't make object2 an optional parameter so that showLayoutTree |
| 2176 // can be called from gdb easily. | 2183 // can be called from gdb easily. |
| 2177 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); | 2184 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); |
| 2178 | 2185 |
| 2179 #endif | 2186 #endif |
| 2180 | 2187 |
| 2181 #endif // LayoutObject_h | 2188 #endif // LayoutObject_h |
| OLD | NEW |