Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.h

Issue 2770203002: Replace DCHECK with DCHECK_op and split some DCHECKs wherever necessary (Closed)
Patch Set: Add few more Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "core/paint/PaintResult.h" 10 #include "core/paint/PaintResult.h"
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 37
38 protected: 38 protected:
39 explicit LayoutTableBoxComponent(Element* element) 39 explicit LayoutTableBoxComponent(Element* element)
40 : LayoutBox(element), m_lastPaintResult(FullyPainted) {} 40 : LayoutBox(element), m_lastPaintResult(FullyPainted) {}
41 41
42 const LayoutObjectChildList* children() const { return &m_children; } 42 const LayoutObjectChildList* children() const { return &m_children; }
43 LayoutObjectChildList* children() { return &m_children; } 43 LayoutObjectChildList* children() { return &m_children; }
44 44
45 LayoutObject* firstChild() const { 45 LayoutObject* firstChild() const {
46 DCHECK(children() == virtualChildren()); 46 DCHECK_EQ(children(), virtualChildren());
47 return children()->firstChild(); 47 return children()->firstChild();
48 } 48 }
49 LayoutObject* lastChild() const { 49 LayoutObject* lastChild() const {
50 DCHECK(children() == virtualChildren()); 50 DCHECK_EQ(children(), virtualChildren());
51 return children()->lastChild(); 51 return children()->lastChild();
52 } 52 }
53 53
54 private: 54 private:
55 // If you have a LayoutTableBoxComponent, use firstChild or lastChild instead. 55 // If you have a LayoutTableBoxComponent, use firstChild or lastChild instead.
56 void slowFirstChild() const = delete; 56 void slowFirstChild() const = delete;
57 void slowLastChild() const = delete; 57 void slowLastChild() const = delete;
58 58
59 LayoutObjectChildList* virtualChildren() override { return children(); } 59 LayoutObjectChildList* virtualChildren() override { return children(); }
60 const LayoutObjectChildList* virtualChildren() const override { 60 const LayoutObjectChildList* virtualChildren() const override {
61 return children(); 61 return children();
62 } 62 }
63 63
64 LayoutObjectChildList m_children; 64 LayoutObjectChildList m_children;
65 65
66 friend class MutableForPainting; 66 friend class MutableForPainting;
67 PaintResult m_lastPaintResult; 67 PaintResult m_lastPaintResult;
68 CullRect m_lastPaintRect; 68 CullRect m_lastPaintRect;
69 }; 69 };
70 70
71 } // namespace blink 71 } // namespace blink
72 72
73 #endif // LayoutTableBoxComponent_h 73 #endif // LayoutTableBoxComponent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698