| 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 16 matching lines...) Expand all Loading... |
| 27 LayoutObjectChildList* children() { return &m_children; } | 27 LayoutObjectChildList* children() { return &m_children; } |
| 28 | 28 |
| 29 LayoutObject* firstChild() const { DCHECK(children() == virtualChildren());
return children()->firstChild(); } | 29 LayoutObject* firstChild() const { DCHECK(children() == virtualChildren());
return children()->firstChild(); } |
| 30 LayoutObject* lastChild() const { DCHECK(children() == virtualChildren()); r
eturn children()->lastChild(); } | 30 LayoutObject* lastChild() const { DCHECK(children() == virtualChildren()); r
eturn children()->lastChild(); } |
| 31 | 31 |
| 32 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override
; | 32 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override
; |
| 33 void imageChanged(WrappedImagePtr, const IntRect* = nullptr) override; | 33 void imageChanged(WrappedImagePtr, const IntRect* = nullptr) override; |
| 34 | 34 |
| 35 void clearPaintInvalidationFlags(const PaintInvalidationState& paintInvalida
tionState) override | 35 void clearPaintInvalidationFlags(const PaintInvalidationState& paintInvalida
tionState) override |
| 36 { | 36 { |
| 37 m_backgroundChangedSinceLastPaintInvalidation = false; |
| 37 LayoutBox::clearPaintInvalidationFlags(paintInvalidationState); | 38 LayoutBox::clearPaintInvalidationFlags(paintInvalidationState); |
| 38 m_backgroundChangedSinceLastPaintInvalidation = false; | |
| 39 } | 39 } |
| 40 | 40 |
| 41 #if ENABLE(ASSERT) | 41 #if ENABLE(ASSERT) |
| 42 bool paintInvalidationStateIsDirty() const override { return m_backgroundCha
ngedSinceLastPaintInvalidation || LayoutBox::paintInvalidationStateIsDirty(); } | 42 bool paintInvalidationFlagsAreDirty() const override { return m_backgroundCh
angedSinceLastPaintInvalidation || LayoutBox::paintInvalidationFlagsAreDirty();
} |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 // If you have a LayoutTableBoxComponent, use firstChild or lastChild instea
d. | 46 // If you have a LayoutTableBoxComponent, use firstChild or lastChild instea
d. |
| 47 void slowFirstChild() const = delete; | 47 void slowFirstChild() const = delete; |
| 48 void slowLastChild() const = delete; | 48 void slowLastChild() const = delete; |
| 49 | 49 |
| 50 LayoutObjectChildList* virtualChildren() override { return children(); } | 50 LayoutObjectChildList* virtualChildren() override { return children(); } |
| 51 const LayoutObjectChildList* virtualChildren() const override { return child
ren(); } | 51 const LayoutObjectChildList* virtualChildren() const override { return child
ren(); } |
| 52 | 52 |
| 53 LayoutObjectChildList m_children; | 53 LayoutObjectChildList m_children; |
| 54 bool m_backgroundChangedSinceLastPaintInvalidation; | 54 bool m_backgroundChangedSinceLastPaintInvalidation; |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 } // namespace blink | 57 } // namespace blink |
| 58 | 58 |
| 59 #endif // LayoutTableBoxComponent_h | 59 #endif // LayoutTableBoxComponent_h |
| OLD | NEW |