| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // because only boxes implementing the full box model have a need for them. | 197 // because only boxes implementing the full box model have a need for them. |
| 198 // Because LayoutBlockFlow's intrinsic widths rely on the underlying text | 198 // Because LayoutBlockFlow's intrinsic widths rely on the underlying text |
| 199 // content, LayoutBlockFlow may call LayoutText::computePreferredLogicalWidths. | 199 // content, LayoutBlockFlow may call LayoutText::computePreferredLogicalWidths. |
| 200 // | 200 // |
| 201 // The 2 widths are computed lazily during layout when the getters are called. | 201 // The 2 widths are computed lazily during layout when the getters are called. |
| 202 // The computation is done by calling computePreferredLogicalWidths() behind the | 202 // The computation is done by calling computePreferredLogicalWidths() behind the |
| 203 // scene. The boolean used to control the lazy recomputation is | 203 // scene. The boolean used to control the lazy recomputation is |
| 204 // preferredLogicalWidthsDirty. | 204 // preferredLogicalWidthsDirty. |
| 205 // | 205 // |
| 206 // See the individual getters below for more details about what each width is. | 206 // See the individual getters below for more details about what each width is. |
| 207 class CORE_EXPORT LayoutObject : public ImageResourceClient { | 207 class CORE_EXPORT LayoutObject : public ImageResourceClient, public DisplayItemC
lient { |
| 208 friend class LayoutObjectChildList; | 208 friend class LayoutObjectChildList; |
| 209 WTF_MAKE_NONCOPYABLE(LayoutObject); | 209 WTF_MAKE_NONCOPYABLE(LayoutObject); |
| 210 public: | 210 public: |
| 211 // Anonymous objects should pass the document as their node, and they will t
hen automatically be | 211 // Anonymous objects should pass the document as their node, and they will t
hen automatically be |
| 212 // marked as anonymous in the constructor. | 212 // marked as anonymous in the constructor. |
| 213 explicit LayoutObject(Node*); | 213 explicit LayoutObject(Node*); |
| 214 ~LayoutObject() override; | 214 ~LayoutObject() override; |
| 215 | 215 |
| 216 // Returns the name of the layout object. | 216 // Returns the name of the layout object. |
| 217 virtual const char* name() const = 0; | 217 virtual const char* name() const = 0; |
| (...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1288 | 1288 |
| 1289 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con
st | 1289 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con
st |
| 1290 { | 1290 { |
| 1291 return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() ||
shouldInvalidateSelection() || m_bitfields.childShouldCheckForPaintInvalidation(
); | 1291 return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() ||
shouldInvalidateSelection() || m_bitfields.childShouldCheckForPaintInvalidation(
); |
| 1292 } | 1292 } |
| 1293 | 1293 |
| 1294 virtual bool supportsPaintInvalidationStateCachedOffsets() const { return !h
asTransformRelatedProperty() && !hasReflection() && !style()->isFlippedBlocksWri
tingMode(); } | 1294 virtual bool supportsPaintInvalidationStateCachedOffsets() const { return !h
asTransformRelatedProperty() && !hasReflection() && !style()->isFlippedBlocksWri
tingMode(); } |
| 1295 | 1295 |
| 1296 virtual LayoutRect viewRect() const; | 1296 virtual LayoutRect viewRect() const; |
| 1297 | 1297 |
| 1298 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi
s); } | 1298 void invalidateDisplayItemClient(const DisplayItemClient&) const; |
| 1299 | |
| 1300 void invalidateDisplayItemClient(const DisplayItemClientWrapper&) const; | |
| 1301 void invalidateDisplayItemClientsIncludingNonCompositingDescendants(const La
youtBoxModelObject* paintInvalidationContainer, PaintInvalidationReason, const L
ayoutRect* paintInvalidationRect) const; | 1299 void invalidateDisplayItemClientsIncludingNonCompositingDescendants(const La
youtBoxModelObject* paintInvalidationContainer, PaintInvalidationReason, const L
ayoutRect* paintInvalidationRect) const; |
| 1302 | 1300 |
| 1303 // Called before anonymousChild.setStyle(). Override to set custom styles fo
r the child. | 1301 // Called before anonymousChild.setStyle(). Override to set custom styles fo
r the child. |
| 1304 virtual void updateAnonymousChildStyle(const LayoutObject& anonymousChild, C
omputedStyle& style) const { } | 1302 virtual void updateAnonymousChildStyle(const LayoutObject& anonymousChild, C
omputedStyle& style) const { } |
| 1305 | 1303 |
| 1306 // Painters can use const methods only, except for these explicitly declared
methods. | 1304 // Painters can use const methods only, except for these explicitly declared
methods. |
| 1307 class MutableForPainting { | 1305 class MutableForPainting { |
| 1308 public: | 1306 public: |
| 1309 void setPreviousPaintOffset(const LayoutPoint& paintOffset) { m_layoutOb
ject.setPreviousPaintOffset(paintOffset); } | 1307 void setPreviousPaintOffset(const LayoutPoint& paintOffset) { m_layoutOb
ject.setPreviousPaintOffset(paintOffset); } |
| 1310 | 1308 |
| (...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2037 void showTree(const blink::LayoutObject*); | 2035 void showTree(const blink::LayoutObject*); |
| 2038 void showLineTree(const blink::LayoutObject*); | 2036 void showLineTree(const blink::LayoutObject*); |
| 2039 void showLayoutTree(const blink::LayoutObject* object1); | 2037 void showLayoutTree(const blink::LayoutObject* object1); |
| 2040 // We don't make object2 an optional parameter so that showLayoutTree | 2038 // We don't make object2 an optional parameter so that showLayoutTree |
| 2041 // can be called from gdb easily. | 2039 // can be called from gdb easily. |
| 2042 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); | 2040 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); |
| 2043 | 2041 |
| 2044 #endif | 2042 #endif |
| 2045 | 2043 |
| 2046 #endif // LayoutObject_h | 2044 #endif // LayoutObject_h |
| OLD | NEW |