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

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

Issue 2871983002: blink: Remove CHECK_CONSISTENCY. (Closed)
Patch Set: . Created 3 years, 7 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 /* 1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 const LayoutObject* = nullptr, 90 const LayoutObject* = nullptr,
91 int = 0) const override; 91 int = 0) const override;
92 #endif 92 #endif
93 const char* BoxName() const override; 93 const char* BoxName() const override;
94 94
95 InlineFlowBox* PrevLineBox() const { return prev_line_box_; } 95 InlineFlowBox* PrevLineBox() const { return prev_line_box_; }
96 InlineFlowBox* NextLineBox() const { return next_line_box_; } 96 InlineFlowBox* NextLineBox() const { return next_line_box_; }
97 void SetNextLineBox(InlineFlowBox* n) { next_line_box_ = n; } 97 void SetNextLineBox(InlineFlowBox* n) { next_line_box_ = n; }
98 void SetPreviousLineBox(InlineFlowBox* p) { prev_line_box_ = p; } 98 void SetPreviousLineBox(InlineFlowBox* p) { prev_line_box_ = p; }
99 99
100 InlineBox* FirstChild() const { 100 InlineBox* FirstChild() const { return first_child_; }
101 CheckConsistency(); 101 InlineBox* LastChild() const { return last_child_; }
102 return first_child_;
103 }
104 InlineBox* LastChild() const {
105 CheckConsistency();
106 return last_child_;
107 }
108 102
109 bool IsLeaf() const final { return false; } 103 bool IsLeaf() const final { return false; }
110 104
111 InlineBox* FirstLeafChild() const; 105 InlineBox* FirstLeafChild() const;
112 InlineBox* LastLeafChild() const; 106 InlineBox* LastLeafChild() const;
113 107
114 typedef void (*CustomInlineBoxRangeReverse)( 108 typedef void (*CustomInlineBoxRangeReverse)(
115 Vector<InlineBox*>::iterator first, 109 Vector<InlineBox*>::iterator first,
116 Vector<InlineBox*>::iterator last); 110 Vector<InlineBox*>::iterator last);
117 void CollectLeafBoxesInLogicalOrder( 111 void CollectLeafBoxesInLogicalOrder(
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 LayoutUnit block_right_edge, 269 LayoutUnit block_right_edge,
276 LayoutUnit ellipsis_width, 270 LayoutUnit ellipsis_width,
277 LayoutUnit& truncated_width, 271 LayoutUnit& truncated_width,
278 bool&, 272 bool&,
279 LayoutUnit logical_left_offset) override; 273 LayoutUnit logical_left_offset) override;
280 274
281 bool HasTextChildren() const { return has_text_children_; } 275 bool HasTextChildren() const { return has_text_children_; }
282 bool HasTextDescendants() const { return has_text_descendants_; } 276 bool HasTextDescendants() const { return has_text_descendants_; }
283 void SetHasTextDescendants() { has_text_descendants_ = true; } 277 void SetHasTextDescendants() { has_text_descendants_ = true; }
284 278
285 void CheckConsistency() const;
286 void SetHasBadChildList(); 279 void SetHasBadChildList();
287 280
288 // Line visual and layout overflow are in the coordinate space of the block. 281 // Line visual and layout overflow are in the coordinate space of the block.
289 // This means that they aren't purely physical directions. For horizontal-tb 282 // This means that they aren't purely physical directions. For horizontal-tb
290 // and vertical-lr they will match physical directions, but for vertical-rl, 283 // and vertical-lr they will match physical directions, but for vertical-rl,
291 // the left/right respectively are flipped when compared to their physical 284 // the left/right respectively are flipped when compared to their physical
292 // counterparts. For example minX is on the left in vertical-lr, but it is on 285 // counterparts. For example minX is on the left in vertical-lr, but it is on
293 // the right in vertical-rl. 286 // the right in vertical-rl.
294 LayoutRect LayoutOverflowRect(LayoutUnit line_top, 287 LayoutRect LayoutOverflowRect(LayoutUnit line_top,
295 LayoutUnit line_bottom) const { 288 LayoutUnit line_bottom) const {
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 // End of RootInlineBox-specific members. 469 // End of RootInlineBox-specific members.
477 470
478 #if DCHECK_IS_ON() 471 #if DCHECK_IS_ON()
479 private: 472 private:
480 unsigned has_bad_child_list_ : 1; 473 unsigned has_bad_child_list_ : 1;
481 #endif 474 #endif
482 }; 475 };
483 476
484 DEFINE_INLINE_BOX_TYPE_CASTS(InlineFlowBox); 477 DEFINE_INLINE_BOX_TYPE_CASTS(InlineFlowBox);
485 478
486 #if !DCHECK_IS_ON()
487 inline void InlineFlowBox::CheckConsistency() const {}
488 #endif
489
490 inline void InlineFlowBox::SetHasBadChildList() { 479 inline void InlineFlowBox::SetHasBadChildList() {
491 #if DCHECK_IS_ON() 480 #if DCHECK_IS_ON()
492 has_bad_child_list_ = true; 481 has_bad_child_list_ = true;
493 #endif 482 #endif
494 } 483 }
495 484
496 } // namespace blink 485 } // namespace blink
497 486
498 #endif // InlineFlowBox_h 487 #endif // InlineFlowBox_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutText.cpp ('k') | third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698