| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. |
| 5 * All rights reserved. | 5 * All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // TODO(jchaffraix): Find out why we made the decision to always insert the | 109 // TODO(jchaffraix): Find out why we made the decision to always insert the |
| 110 // anonymous LayoutBlockFlows. | 110 // anonymous LayoutBlockFlows. |
| 111 // | 111 // |
| 112 // This section was inspired by an older article by Dave Hyatt: | 112 // This section was inspired by an older article by Dave Hyatt: |
| 113 // https://www.webkit.org/blog/115/webcore-rendering-ii-blocks-and-inlines/ | 113 // https://www.webkit.org/blog/115/webcore-rendering-ii-blocks-and-inlines/ |
| 114 class CORE_EXPORT LayoutInline : public LayoutBoxModelObject { | 114 class CORE_EXPORT LayoutInline : public LayoutBoxModelObject { |
| 115 public: | 115 public: |
| 116 explicit LayoutInline(Element*); | 116 explicit LayoutInline(Element*); |
| 117 | 117 |
| 118 LayoutObject* firstChild() const { | 118 LayoutObject* firstChild() const { |
| 119 ASSERT(children() == virtualChildren()); | 119 DCHECK_EQ(children(), virtualChildren()); |
| 120 return children()->firstChild(); | 120 return children()->firstChild(); |
| 121 } | 121 } |
| 122 LayoutObject* lastChild() const { | 122 LayoutObject* lastChild() const { |
| 123 ASSERT(children() == virtualChildren()); | 123 DCHECK_EQ(children(), virtualChildren()); |
| 124 return children()->lastChild(); | 124 return children()->lastChild(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 // If you have a LayoutInline, use firstChild or lastChild instead. | 127 // If you have a LayoutInline, use firstChild or lastChild instead. |
| 128 void slowFirstChild() const = delete; | 128 void slowFirstChild() const = delete; |
| 129 void slowLastChild() const = delete; | 129 void slowLastChild() const = delete; |
| 130 | 130 |
| 131 void addChild(LayoutObject* newChild, | 131 void addChild(LayoutObject* newChild, |
| 132 LayoutObject* beforeChild = nullptr) override; | 132 LayoutObject* beforeChild = nullptr) override; |
| 133 | 133 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 // All of the line boxes created for this inline flow. For example, | 346 // All of the line boxes created for this inline flow. For example, |
| 347 // <i>Hello<br>world.</i> will have two <i> line boxes. | 347 // <i>Hello<br>world.</i> will have two <i> line boxes. |
| 348 LineBoxList m_lineBoxes; | 348 LineBoxList m_lineBoxes; |
| 349 }; | 349 }; |
| 350 | 350 |
| 351 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutInline, isLayoutInline()); | 351 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutInline, isLayoutInline()); |
| 352 | 352 |
| 353 } // namespace blink | 353 } // namespace blink |
| 354 | 354 |
| 355 #endif // LayoutInline_h | 355 #endif // LayoutInline_h |
| OLD | NEW |