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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2553653003: Make ifdefs consistent in WebKit/Source/core/layout/ . (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 6f2be648af1c9c31e1949941a6ffbec4a62d1e49..b512386db1b30d23c31255b55fa112b92561de41 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -236,7 +236,9 @@ LayoutObject::LayoutObject(Node* node)
}
LayoutObject::~LayoutObject() {
- ASSERT(!m_hasAXObject);
+#if DCHECK_IS_ON()
+ DCHECK(!m_hasAXObject);
+#endif
InstanceCounters::decrementCounter(InstanceCounters::LayoutObjectCounter);
}
@@ -737,7 +739,9 @@ static inline bool objectIsRelayoutBoundary(const LayoutObject* object) {
void LayoutObject::markContainerChainForLayout(bool scheduleRelayout,
SubtreeLayoutScope* layouter) {
- ASSERT(!isSetNeedsLayoutForbidden());
+#if DCHECK_IS_ON()
+ DCHECK(!isSetNeedsLayoutForbidden());
+#endif
ASSERT(!layouter || this != layouter->root());
// When we're in layout, we're marking a descendant as needing layout with
// the intention of visiting it during this layout. We shouldn't be
@@ -768,17 +772,23 @@ void LayoutObject::markContainerChainForLayout(bool scheduleRelayout,
container = object->container();
object->setPosChildNeedsLayout(true);
simplifiedNormalFlowLayout = true;
- ASSERT(!object->isSetNeedsLayoutForbidden());
+#if DCHECK_IS_ON()
+ DCHECK(!object->isSetNeedsLayoutForbidden());
+#endif
} else if (simplifiedNormalFlowLayout) {
if (object->needsSimplifiedNormalFlowLayout())
return;
object->setNeedsSimplifiedNormalFlowLayout(true);
- ASSERT(!object->isSetNeedsLayoutForbidden());
+#if DCHECK_IS_ON()
+ DCHECK(!object->isSetNeedsLayoutForbidden());
+#endif
} else {
if (object->normalChildNeedsLayout())
return;
object->setNormalChildNeedsLayout(true);
+#if DCHECK_IS_ON()
ASSERT(!object->isSetNeedsLayoutForbidden());
mstensho (USE GERRIT) 2016/12/06 09:58:46 DCHECK. Looks like this would look prettier if yo
Alexander Alekseev 2016/12/06 10:13:30 Done.
+#endif
}
if (layouter) {

Powered by Google App Engine
This is Rietveld 408576698