| 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 22c9acdecad7fc9b01f776650e8885a8d5bcc3b9..da30a8461f7d345582d13ae20a03f7cc64c408ac 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
|
| @@ -32,6 +32,7 @@
|
| #include "core/css/resolver/StyleResolver.h"
|
| #include "core/dom/AXObjectCache.h"
|
| #include "core/dom/ElementTraversal.h"
|
| +#include "core/dom/Node.h"
|
| #include "core/dom/StyleChangeReason.h"
|
| #include "core/dom/StyleEngine.h"
|
| #include "core/dom/shadow/ShadowRoot.h"
|
| @@ -103,7 +104,7 @@ const LayoutUnit& caretWidth() {
|
| return gCaretWidth;
|
| }
|
|
|
| -#if ENABLE(ASSERT)
|
| +#if DCHECK_IS_ON()
|
|
|
| LayoutObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope(
|
| LayoutObject& layoutObject)
|
| @@ -121,7 +122,7 @@ struct SameSizeAsLayoutObject : DisplayItemClient {
|
| virtual ~SameSizeAsLayoutObject() {} // Allocate vtable pointer.
|
| void* pointers[5];
|
| Member<void*> members[1];
|
| -#if ENABLE(ASSERT)
|
| +#if DCHECK_IS_ON()
|
| unsigned m_debugBitfields : 2;
|
| #endif
|
| unsigned m_bitfields;
|
| @@ -225,7 +226,7 @@ LayoutObject::LayoutObject(Node* node)
|
| m_parent(nullptr),
|
| m_previous(nullptr),
|
| m_next(nullptr),
|
| -#if ENABLE(ASSERT)
|
| +#if DCHECK_IS_ON()
|
| m_hasAXObject(false),
|
| m_setNeedsLayoutForbidden(false),
|
| #endif
|
| @@ -796,7 +797,7 @@ void LayoutObject::markContainerChainForLayout(bool scheduleRelayout,
|
| last->scheduleRelayout();
|
| }
|
|
|
| -#if ENABLE(ASSERT)
|
| +#if DCHECK_IS_ON()
|
| void LayoutObject::checkBlockPositionedObjectsNeedLayout() {
|
| ASSERT(!needsLayout());
|
|
|
| @@ -1305,8 +1306,7 @@ bool LayoutObject::mapToVisualRectInAncestorSpace(
|
|
|
| void LayoutObject::dirtyLinesFromChangedChild(LayoutObject*, MarkingBehavior) {}
|
|
|
| -#ifndef NDEBUG
|
| -
|
| +#if DCHECK_IS_ON()
|
| void LayoutObject::showTreeForThis() const {
|
| if (node())
|
| ::showTree(node());
|
| @@ -1373,7 +1373,7 @@ void LayoutObject::showLayoutTreeAndMark(const LayoutObject* markedObject1,
|
| markedLabel2, depth + 1);
|
| }
|
|
|
| -#endif // NDEBUG
|
| +#endif // DCHECK_IS_ON
|
|
|
| bool LayoutObject::isSelectable() const {
|
| return !isInert() &&
|
| @@ -3376,8 +3376,10 @@ void LayoutObject::setMayNeedPaintInvalidationAnimatedBackgroundImage() {
|
| void LayoutObject::clearPaintInvalidationFlags() {
|
| // paintInvalidationStateIsDirty should be kept in sync with the
|
| // booleans that are cleared below.
|
| - ASSERT(!shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() ||
|
| +#if DCHECK_IS_ON()
|
| + DCHECK(!shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() ||
|
| paintInvalidationStateIsDirty());
|
| +#endif
|
| clearShouldDoFullPaintInvalidation();
|
| m_bitfields.setChildShouldCheckForPaintInvalidation(false);
|
| m_bitfields.setMayNeedPaintInvalidation(false);
|
| @@ -3447,7 +3449,7 @@ LayoutRect LayoutObject::debugRect() const {
|
|
|
| } // namespace blink
|
|
|
| -#ifndef NDEBUG
|
| +#if DCHECK_IS_ON()
|
|
|
| void showTree(const blink::LayoutObject* object) {
|
| if (object)
|
|
|