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

Side by Side Diff: third_party/WebKit/Source/core/layout/FloatingObjects.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 void setHeight(LayoutUnit height) { 101 void setHeight(LayoutUnit height) {
102 ASSERT(!isInPlacedTree()); 102 ASSERT(!isInPlacedTree());
103 m_frameRect.setHeight(height); 103 m_frameRect.setHeight(height);
104 } 104 }
105 105
106 const LayoutRect& frameRect() const { 106 const LayoutRect& frameRect() const {
107 ASSERT(isPlaced()); 107 ASSERT(isPlaced());
108 return m_frameRect; 108 return m_frameRect;
109 } 109 }
110 110
111 #if ENABLE(ASSERT) 111 #if DCHECK_IS_ON()
112 bool isInPlacedTree() const { return m_isInPlacedTree; } 112 bool isInPlacedTree() const { return m_isInPlacedTree; }
113 void setIsInPlacedTree(bool value) { m_isInPlacedTree = value; } 113 void setIsInPlacedTree(bool value) { m_isInPlacedTree = value; }
114 #endif 114 #endif
115 115
116 bool shouldPaint() const; 116 bool shouldPaint() const;
117 void setShouldPaint(bool shouldPaint) { m_shouldPaint = shouldPaint; } 117 void setShouldPaint(bool shouldPaint) { m_shouldPaint = shouldPaint; }
118 bool isDescendant() const { return m_isDescendant; } 118 bool isDescendant() const { return m_isDescendant; }
119 void setIsDescendant(bool isDescendant) { m_isDescendant = isDescendant; } 119 void setIsDescendant(bool isDescendant) { m_isDescendant = isDescendant; }
120 bool isLowestNonOverhangingFloatInChild() const { 120 bool isLowestNonOverhangingFloatInChild() const {
121 return m_isLowestNonOverhangingFloatInChild; 121 return m_isLowestNonOverhangingFloatInChild;
(...skipping 21 matching lines...) Expand all
143 143
144 LayoutBox* m_layoutObject; 144 LayoutBox* m_layoutObject;
145 RootInlineBox* m_originatingLine; 145 RootInlineBox* m_originatingLine;
146 LayoutRect m_frameRect; 146 LayoutRect m_frameRect;
147 147
148 unsigned m_type : 2; // Type (left or right aligned) 148 unsigned m_type : 2; // Type (left or right aligned)
149 unsigned m_shouldPaint : 1; 149 unsigned m_shouldPaint : 1;
150 unsigned m_isDescendant : 1; 150 unsigned m_isDescendant : 1;
151 unsigned m_isPlaced : 1; 151 unsigned m_isPlaced : 1;
152 unsigned m_isLowestNonOverhangingFloatInChild : 1; 152 unsigned m_isLowestNonOverhangingFloatInChild : 1;
153 #if ENABLE(ASSERT) 153 #if DCHECK_IS_ON()
154 unsigned m_isInPlacedTree : 1; 154 unsigned m_isInPlacedTree : 1;
155 #endif 155 #endif
156 }; 156 };
157 157
158 struct FloatingObjectHashFunctions { 158 struct FloatingObjectHashFunctions {
159 STATIC_ONLY(FloatingObjectHashFunctions); 159 STATIC_ONLY(FloatingObjectHashFunctions);
160 static unsigned hash(FloatingObject* key) { 160 static unsigned hash(FloatingObject* key) {
161 return DefaultHash<LayoutBox*>::Hash::hash(key->layoutObject()); 161 return DefaultHash<LayoutBox*>::Hash::hash(key->layoutObject());
162 } 162 }
163 static unsigned hash(const std::unique_ptr<FloatingObject>& key) { 163 static unsigned hash(const std::unique_ptr<FloatingObject>& key) {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 }; 282 };
283 template <> 283 template <>
284 struct ValueToString<FloatingObject*> { 284 struct ValueToString<FloatingObject*> {
285 static String toString(const FloatingObject*); 285 static String toString(const FloatingObject*);
286 }; 286 };
287 #endif 287 #endif
288 288
289 } // namespace blink 289 } // namespace blink
290 290
291 #endif // FloatingObjects_h 291 #endif // FloatingObjects_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698