| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef LayoutTableBoxComponent_h | 5 #ifndef LayoutTableBoxComponent_h |
| 6 #define LayoutTableBoxComponent_h | 6 #define LayoutTableBoxComponent_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/layout/LayoutBox.h" | 9 #include "core/layout/LayoutBox.h" |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 LayoutObject* firstChild() const { | 29 LayoutObject* firstChild() const { |
| 30 DCHECK(children() == virtualChildren()); | 30 DCHECK(children() == virtualChildren()); |
| 31 return children()->firstChild(); | 31 return children()->firstChild(); |
| 32 } | 32 } |
| 33 LayoutObject* lastChild() const { | 33 LayoutObject* lastChild() const { |
| 34 DCHECK(children() == virtualChildren()); | 34 DCHECK(children() == virtualChildren()); |
| 35 return children()->lastChild(); | 35 return children()->lastChild(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 char objectSize() const override { return sizeof(this); } |
| 39 |
| 38 private: | 40 private: |
| 39 // If you have a LayoutTableBoxComponent, use firstChild or lastChild instead. | 41 // If you have a LayoutTableBoxComponent, use firstChild or lastChild instead. |
| 40 void slowFirstChild() const = delete; | 42 void slowFirstChild() const = delete; |
| 41 void slowLastChild() const = delete; | 43 void slowLastChild() const = delete; |
| 42 | 44 |
| 43 LayoutObjectChildList* virtualChildren() override { return children(); } | 45 LayoutObjectChildList* virtualChildren() override { return children(); } |
| 44 const LayoutObjectChildList* virtualChildren() const override { | 46 const LayoutObjectChildList* virtualChildren() const override { |
| 45 return children(); | 47 return children(); |
| 46 } | 48 } |
| 47 | 49 |
| 48 LayoutObjectChildList m_children; | 50 LayoutObjectChildList m_children; |
| 49 }; | 51 }; |
| 50 | 52 |
| 51 } // namespace blink | 53 } // namespace blink |
| 52 | 54 |
| 53 #endif // LayoutTableBoxComponent_h | 55 #endif // LayoutTableBoxComponent_h |
| OLD | NEW |