Chromium Code Reviews| 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 8478f86e332c7f6041d231b7552db5f38e8c24dc..6f35215464ba7cc4095cc3b2913d9af504de6b4f 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.h |
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.h |
| @@ -96,7 +96,7 @@ struct AnnotatedRegionValue { |
| bool draggable; |
| }; |
| -#ifndef NDEBUG |
| +#if DCHECK_IS_ON() |
| const int showTreeCharacterOffset = 39; |
| #endif |
| @@ -292,7 +292,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| return locateFlowThreadContainingBlock(); |
| } |
| -#if ENABLE(ASSERT) |
| +#if DCHECK_IS_ON() |
| void setHasAXObject(bool flag) { m_hasAXObject = flag; } |
| bool hasAXObject() const { return m_hasAXObject; } |
| @@ -308,10 +308,8 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| }; |
| void assertLaidOut() const { |
| -#ifndef NDEBUG |
| if (needsLayout()) |
| showLayoutTreeForThis(); |
| -#endif |
| SECURITY_DCHECK(!needsLayout()); |
| } |
| @@ -322,12 +320,10 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| } |
| void assertClearedPaintInvalidationFlags() const { |
| -#ifndef NDEBUG |
| if (paintInvalidationStateIsDirty()) { |
| showLayoutTreeForThis(); |
| ASSERT_NOT_REACHED(); |
| } |
| -#endif |
| } |
| void assertSubtreeClearedPaintInvalidationFlags() const { |
| @@ -419,7 +415,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| ////////////////////////////////////////// |
| private: |
| -#if ENABLE(ASSERT) |
| +#if DCHECK_IS_ON() |
| bool isSetNeedsLayoutForbidden() const { return m_setNeedsLayoutForbidden; } |
| void setNeedsLayoutIsForbidden(bool flag) { |
| m_setNeedsLayoutForbidden = flag; |
| @@ -435,7 +431,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| const; |
| public: |
| -#ifndef NDEBUG |
| +#if DCHECK_IS_ON() |
|
mstensho (USE GERRIT)
2016/11/29 12:06:12
I don't think these have anything to do with asser
|
| void showTreeForThis() const; |
| void showLayoutTreeForThis() const; |
| void showLineTreeForThis() const; |
| @@ -2039,7 +2035,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| void removeShapeImageClient(ShapeValue*); |
| void removeCursorImageClient(const CursorList*); |
| -#if ENABLE(ASSERT) |
| +#if DCHECK_IS_ON() |
| void checkBlockPositionedObjectsNeedLayout(); |
| #endif |
| @@ -2065,7 +2061,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| LayoutObject* m_previous; |
| LayoutObject* m_next; |
| -#if ENABLE(ASSERT) |
| +#if DCHECK_IS_ON() |
| unsigned m_hasAXObject : 1; |
| unsigned m_setNeedsLayoutForbidden : 1; |
| #endif |
| @@ -2520,7 +2516,7 @@ inline void LayoutObject::clearNeedsLayout() { |
| setNeedsPositionedMovementLayout(false); |
| setAncestorLineBoxDirty(false); |
| -#if ENABLE(ASSERT) |
| +#if DCHECK_IS_ON() |
| checkBlockPositionedObjectsNeedLayout(); |
| #endif |
| @@ -2639,7 +2635,7 @@ inline double adjustScrollForAbsoluteZoom(double value, |
| } // namespace blink |
| -#ifndef NDEBUG |
| +#if DCHECK_IS_ON() |
| // Outside the blink namespace for ease of invocation from gdb. |
| CORE_EXPORT void showTree(const blink::LayoutObject*); |
| CORE_EXPORT void showLineTree(const blink::LayoutObject*); |