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. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. |
7 * All rights reserved. | 7 * All rights reserved. |
8 * Copyright (C) 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2009 Google Inc. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 28 matching lines...) Expand all Loading... |
39 #include "core/layout/api/HitTestAction.h" | 39 #include "core/layout/api/HitTestAction.h" |
40 #include "core/layout/api/SelectionState.h" | 40 #include "core/layout/api/SelectionState.h" |
41 #include "core/layout/compositing/CompositingState.h" | 41 #include "core/layout/compositing/CompositingState.h" |
42 #include "core/loader/resource/ImageResourceObserver.h" | 42 #include "core/loader/resource/ImageResourceObserver.h" |
43 #include "core/paint/LayerHitTestRects.h" | 43 #include "core/paint/LayerHitTestRects.h" |
44 #include "core/paint/PaintPhase.h" | 44 #include "core/paint/PaintPhase.h" |
45 #include "core/style/ComputedStyle.h" | 45 #include "core/style/ComputedStyle.h" |
46 #include "platform/geometry/FloatQuad.h" | 46 #include "platform/geometry/FloatQuad.h" |
47 #include "platform/geometry/LayoutRect.h" | 47 #include "platform/geometry/LayoutRect.h" |
48 #include "platform/graphics/CompositingReasons.h" | 48 #include "platform/graphics/CompositingReasons.h" |
| 49 #include "platform/graphics/InvalidationDebugging.h" |
49 #include "platform/graphics/PaintInvalidationReason.h" | 50 #include "platform/graphics/PaintInvalidationReason.h" |
50 #include "platform/graphics/paint/DisplayItemClient.h" | 51 #include "platform/graphics/paint/DisplayItemClient.h" |
51 #include "platform/transforms/TransformationMatrix.h" | 52 #include "platform/transforms/TransformationMatrix.h" |
52 #include "wtf/AutoReset.h" | 53 #include "wtf/AutoReset.h" |
53 | 54 |
54 namespace blink { | 55 namespace blink { |
55 | 56 |
56 class AffineTransform; | 57 class AffineTransform; |
57 class Cursor; | 58 class Cursor; |
58 class HitTestLocation; | 59 class HitTestLocation; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // Because LayoutBlockFlow's intrinsic widths rely on the underlying text | 186 // Because LayoutBlockFlow's intrinsic widths rely on the underlying text |
186 // content, LayoutBlockFlow may call LayoutText::computePreferredLogicalWidths. | 187 // content, LayoutBlockFlow may call LayoutText::computePreferredLogicalWidths. |
187 // | 188 // |
188 // The 2 widths are computed lazily during layout when the getters are called. | 189 // The 2 widths are computed lazily during layout when the getters are called. |
189 // The computation is done by calling computePreferredLogicalWidths() behind the | 190 // The computation is done by calling computePreferredLogicalWidths() behind the |
190 // scene. The boolean used to control the lazy recomputation is | 191 // scene. The boolean used to control the lazy recomputation is |
191 // preferredLogicalWidthsDirty. | 192 // preferredLogicalWidthsDirty. |
192 // | 193 // |
193 // See the individual getters below for more details about what each width is. | 194 // See the individual getters below for more details about what each width is. |
194 class CORE_EXPORT LayoutObject : public ImageResourceObserver, | 195 class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
195 public DisplayItemClient { | 196 public DisplayItemClient, |
| 197 public InvalidationDebugging { |
196 friend class LayoutObjectChildList; | 198 friend class LayoutObjectChildList; |
197 FRIEND_TEST_ALL_PREFIXES(LayoutObjectTest, MutableForPaintingClearPaintFlags); | 199 FRIEND_TEST_ALL_PREFIXES(LayoutObjectTest, MutableForPaintingClearPaintFlags); |
198 friend class VisualRectMappingTest; | 200 friend class VisualRectMappingTest; |
199 WTF_MAKE_NONCOPYABLE(LayoutObject); | 201 WTF_MAKE_NONCOPYABLE(LayoutObject); |
200 | 202 |
201 public: | 203 public: |
202 // Anonymous objects should pass the document as their node, and they will | 204 // Anonymous objects should pass the document as their node, and they will |
203 // then automatically be marked as anonymous in the constructor. | 205 // then automatically be marked as anonymous in the constructor. |
204 explicit LayoutObject(Node*); | 206 explicit LayoutObject(Node*); |
205 ~LayoutObject() override; | 207 ~LayoutObject() override; |
206 | 208 |
207 // Returns the name of the layout object. | 209 // Returns the name of the layout object. |
208 virtual const char* name() const = 0; | 210 virtual const char* name() const = 0; |
209 | 211 |
210 // Returns the decorated name used by run-layout-tests. The name contains the | 212 // Returns the decorated name used by run-layout-tests. The name contains the |
211 // name of the object along with extra information about the layout object | 213 // name of the object along with extra information about the layout object |
212 // state (e.g. positioning). | 214 // state (e.g. positioning). |
213 String decoratedName() const; | 215 String decoratedName() const; |
214 | 216 |
215 // DisplayItemClient methods. | 217 // DisplayItemClient methods. |
216 LayoutRect visualRect() const override; | 218 LayoutRect visualRect() const override; |
217 String debugName() const final; | 219 String debugName() const final; |
218 | 220 |
| 221 // InvalidationDebugging methods. |
| 222 String invalidationName() const final; |
| 223 |
219 LayoutObject* parent() const { return m_parent; } | 224 LayoutObject* parent() const { return m_parent; } |
220 bool isDescendantOf(const LayoutObject*) const; | 225 bool isDescendantOf(const LayoutObject*) const; |
221 | 226 |
222 LayoutObject* previousSibling() const { return m_previous; } | 227 LayoutObject* previousSibling() const { return m_previous; } |
223 LayoutObject* nextSibling() const { return m_next; } | 228 LayoutObject* nextSibling() const { return m_next; } |
224 | 229 |
225 DISABLE_CFI_PERF | 230 DISABLE_CFI_PERF |
226 LayoutObject* slowFirstChild() const { | 231 LayoutObject* slowFirstChild() const { |
227 if (const LayoutObjectChildList* children = virtualChildren()) | 232 if (const LayoutObjectChildList* children = virtualChildren()) |
228 return children->firstChild(); | 233 return children->firstChild(); |
(...skipping 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2772 CORE_EXPORT void showLineTree(const blink::LayoutObject*); | 2777 CORE_EXPORT void showLineTree(const blink::LayoutObject*); |
2773 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); | 2778 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); |
2774 // We don't make object2 an optional parameter so that showLayoutTree | 2779 // We don't make object2 an optional parameter so that showLayoutTree |
2775 // can be called from gdb easily. | 2780 // can be called from gdb easily. |
2776 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, | 2781 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, |
2777 const blink::LayoutObject* object2); | 2782 const blink::LayoutObject* object2); |
2778 | 2783 |
2779 #endif | 2784 #endif |
2780 | 2785 |
2781 #endif // LayoutObject_h | 2786 #endif // LayoutObject_h |
OLD | NEW |