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

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

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: Created 3 years, 11 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 m_includeLogicalLeftEdge(false), 52 m_includeLogicalLeftEdge(false),
53 m_includeLogicalRightEdge(false), 53 m_includeLogicalRightEdge(false),
54 m_descendantsHaveSameLineHeightAndBaseline(true), 54 m_descendantsHaveSameLineHeightAndBaseline(true),
55 m_baselineType(AlphabeticBaseline), 55 m_baselineType(AlphabeticBaseline),
56 m_hasAnnotationsBefore(false), 56 m_hasAnnotationsBefore(false),
57 m_hasAnnotationsAfter(false), 57 m_hasAnnotationsAfter(false),
58 m_lineBreakBidiStatusEor(WTF::Unicode::LeftToRight), 58 m_lineBreakBidiStatusEor(WTF::Unicode::LeftToRight),
59 m_lineBreakBidiStatusLastStrong(WTF::Unicode::LeftToRight), 59 m_lineBreakBidiStatusLastStrong(WTF::Unicode::LeftToRight),
60 m_lineBreakBidiStatusLast(WTF::Unicode::LeftToRight), 60 m_lineBreakBidiStatusLast(WTF::Unicode::LeftToRight),
61 m_isFirstAfterPageBreak(false) 61 m_isFirstAfterPageBreak(false)
62 #if ENABLE(ASSERT) 62 #if DCHECK_IS_ON()
63 , 63 ,
64 m_hasBadChildList(false) 64 m_hasBadChildList(false)
65 #endif 65 #endif
66 { 66 {
67 // Internet Explorer and Firefox always create a marker for list items, even 67 // Internet Explorer and Firefox always create a marker for list items, even
68 // when the list-style-type is none. We do not make a marker in the 68 // when the list-style-type is none. We do not make a marker in the
69 // list-style-type: none case, since it is wasteful to do so. 69 // list-style-type: none case, since it is wasteful to do so.
70 // However, in order to match other browsers we have to pretend like an 70 // However, in order to match other browsers we have to pretend like an
71 // invisible marker exists. The side effect of having an invisible marker 71 // invisible marker exists. The side effect of having an invisible marker
72 // is that the quirks mode behavior of shrinking lines with no text children 72 // is that the quirks mode behavior of shrinking lines with no text children
73 // must not apply. This change also means that gaps will exist between image 73 // must not apply. This change also means that gaps will exist between image
74 // bullet list items. Even when the list bullet is an image, the line is 74 // bullet list items. Even when the list bullet is an image, the line is
75 // still considered to be immune from the quirk. 75 // still considered to be immune from the quirk.
76 m_hasTextChildren = lineLayoutItem.style()->display() == EDisplay::ListItem; 76 m_hasTextChildren = lineLayoutItem.style()->display() == EDisplay::ListItem;
77 m_hasTextDescendants = m_hasTextChildren; 77 m_hasTextDescendants = m_hasTextChildren;
78 } 78 }
79 79
80 #if ENABLE(ASSERT) 80 #if DCHECK_IS_ON()
81 ~InlineFlowBox() override; 81 ~InlineFlowBox() override;
82 #endif 82 #endif
83 83
84 #ifndef NDEBUG 84 #ifndef NDEBUG
85 void showLineTreeAndMark(const InlineBox* = nullptr, 85 void showLineTreeAndMark(const InlineBox* = nullptr,
86 const char* = nullptr, 86 const char* = nullptr,
87 const InlineBox* = nullptr, 87 const InlineBox* = nullptr,
88 const char* = nullptr, 88 const char* = nullptr,
89 const LayoutObject* = nullptr, 89 const LayoutObject* = nullptr,
90 int = 0) const override; 90 int = 0) const override;
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 unsigned m_hasAnnotationsAfter : 1; 467 unsigned m_hasAnnotationsAfter : 1;
468 468
469 unsigned m_lineBreakBidiStatusEor : 5; // WTF::Unicode::Direction 469 unsigned m_lineBreakBidiStatusEor : 5; // WTF::Unicode::Direction
470 unsigned m_lineBreakBidiStatusLastStrong : 5; // WTF::Unicode::Direction 470 unsigned m_lineBreakBidiStatusLastStrong : 5; // WTF::Unicode::Direction
471 unsigned m_lineBreakBidiStatusLast : 5; // WTF::Unicode::Direction 471 unsigned m_lineBreakBidiStatusLast : 5; // WTF::Unicode::Direction
472 472
473 unsigned m_isFirstAfterPageBreak : 1; 473 unsigned m_isFirstAfterPageBreak : 1;
474 474
475 // End of RootInlineBox-specific members. 475 // End of RootInlineBox-specific members.
476 476
477 #if ENABLE(ASSERT) 477 #if DCHECK_IS_ON()
478 private: 478 private:
479 unsigned m_hasBadChildList : 1; 479 unsigned m_hasBadChildList : 1;
480 #endif 480 #endif
481 }; 481 };
482 482
483 DEFINE_INLINE_BOX_TYPE_CASTS(InlineFlowBox); 483 DEFINE_INLINE_BOX_TYPE_CASTS(InlineFlowBox);
484 484
485 #if !ENABLE(ASSERT) 485 #if !DCHECK_IS_ON()
486 inline void InlineFlowBox::checkConsistency() const {} 486 inline void InlineFlowBox::checkConsistency() const {}
487 #endif 487 #endif
488 488
489 inline void InlineFlowBox::setHasBadChildList() { 489 inline void InlineFlowBox::setHasBadChildList() {
490 #if ENABLE(ASSERT) 490 #if DCHECK_IS_ON()
491 m_hasBadChildList = true; 491 m_hasBadChildList = true;
492 #endif 492 #endif
493 } 493 }
494 494
495 } // namespace blink 495 } // namespace blink
496 496
497 #endif // InlineFlowBox_h 497 #endif // InlineFlowBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698