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

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

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.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index a52f630f527cbe30330d866bb3b87fc76394b830..e961ee91b5ae15c8523e96e803eb168baa780a5b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -2502,7 +2502,9 @@ inline void LayoutObject::setNeedsLayout(
LayoutInvalidationReasonForTracing reason,
MarkingBehavior markParents,
SubtreeLayoutScope* layouter) {
- ASSERT(!isSetNeedsLayoutForbidden());
+#if DCHECK_IS_ON()
+ DCHECK(!isSetNeedsLayoutForbidden());
+#endif
bool alreadyNeededLayout = m_bitfields.selfNeedsLayout();
setSelfNeedsLayout(true);
if (!alreadyNeededLayout) {
@@ -2546,7 +2548,9 @@ inline void LayoutObject::clearNeedsLayout() {
inline void LayoutObject::setChildNeedsLayout(MarkingBehavior markParents,
SubtreeLayoutScope* layouter) {
- ASSERT(!isSetNeedsLayoutForbidden());
+#if DCHECK_IS_ON()
+ DCHECK(!isSetNeedsLayoutForbidden());
+#endif
bool alreadyNeededLayout = normalChildNeedsLayout();
setNormalChildNeedsLayout(true);
// FIXME: Replace MarkOnlyThis with the SubtreeLayoutScope code path and
@@ -2559,7 +2563,9 @@ inline void LayoutObject::setChildNeedsLayout(MarkingBehavior markParents,
inline void LayoutObject::setNeedsPositionedMovementLayout() {
bool alreadyNeededLayout = needsPositionedMovementLayout();
setNeedsPositionedMovementLayout(true);
+#if DCHECK_IS_ON()
ASSERT(!isSetNeedsLayoutForbidden());
mstensho (USE GERRIT) 2016/12/06 09:58:46 DCHECK
Alexander Alekseev 2016/12/06 10:13:30 Done.
+#endif
if (!alreadyNeededLayout)
markContainerChainForLayout();
}

Powered by Google App Engine
This is Rietveld 408576698