Chromium Code Reviews| 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..686e5af24e263094b0ef036f3c1cc44fbca61c7c 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" |
|
mstensho (USE GERRIT)
2016/11/30 10:00:13
No need for this. It's quite evident that LayoutOb
Alexander Alekseev
2016/12/01 06:05:14
Done.
|
| #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()); |
| @@ -3376,8 +3377,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); |