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

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

Issue 2553653003: Make ifdefs consistent in WebKit/Source/core/layout/ . (Closed)
Patch Set: Update after review. 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..9841f580447dce3272a4486aa77bec8cbf499519 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);
- ASSERT(!isSetNeedsLayoutForbidden());
+#if DCHECK_IS_ON()
+ DCHECK(!isSetNeedsLayoutForbidden());
+#endif
if (!alreadyNeededLayout)
markContainerChainForLayout();
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698