Title: [181154] trunk/Source/WebCore
Revision
181154
Author
commit-qu...@webkit.org
Date
2015-03-06 06:34:51 -0800 (Fri, 06 Mar 2015)

Log Message

Unreviewed, rolling out r181139.
https://bugs.webkit.org/show_bug.cgi?id=142394

"Caused many crashes in API tests and layout tests in Debug
builds on bots." (Requested by ddkilzer on #webkit).

Reverted changeset:

"Allow tree dumping functions to be used in release builds by
switching a flag"
https://bugs.webkit.org/show_bug.cgi?id=142379
http://trac.webkit.org/changeset/181139

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (181153 => 181154)


--- trunk/Source/WebCore/ChangeLog	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/ChangeLog	2015-03-06 14:34:51 UTC (rev 181154)
@@ -1,3 +1,18 @@
+2015-03-06  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r181139.
+        https://bugs.webkit.org/show_bug.cgi?id=142394
+
+        "Caused many crashes in API tests and layout tests in Debug
+        builds on bots." (Requested by ddkilzer on #webkit).
+
+        Reverted changeset:
+
+        "Allow tree dumping functions to be used in release builds by
+        switching a flag"
+        https://bugs.webkit.org/show_bug.cgi?id=142379
+        http://trac.webkit.org/changeset/181139
+
 2015-03-05  Philippe Normand  <pnorm...@igalia.com>
 
         [MediaStream] new load method for MediaStreamPrivate objects

Modified: trunk/Source/WebCore/config.h (181153 => 181154)


--- trunk/Source/WebCore/config.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/config.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -135,8 +135,3 @@
 
 #endif
 
-#ifdef NDEBUG
-#define ENABLE_TREE_DEBUGGING 0
-#else
-#define ENABLE_TREE_DEBUGGING 1
-#endif

Modified: trunk/Source/WebCore/dom/DocumentMarkerController.cpp (181153 => 181154)


--- trunk/Source/WebCore/dom/DocumentMarkerController.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/dom/DocumentMarkerController.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -724,7 +724,7 @@
     }
 }
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 void DocumentMarkerController::showMarkers() const
 {
     fprintf(stderr, "%d nodes have markers:\n", m_markers.size());
@@ -745,7 +745,7 @@
 
 } // namespace WebCore
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 void showDocumentMarkers(const WebCore::DocumentMarkerController* controller)
 {
     if (controller)

Modified: trunk/Source/WebCore/dom/DocumentMarkerController.h (181153 => 181154)


--- trunk/Source/WebCore/dom/DocumentMarkerController.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/dom/DocumentMarkerController.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -89,7 +89,7 @@
     WEBCORE_EXPORT Vector<IntRect> renderedRectsForMarkers(DocumentMarker::MarkerType);
     void clearDescriptionOnMarkersIntersectingRange(Range*, DocumentMarker::MarkerTypes);
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
     void showMarkers() const;
 #endif
 
@@ -108,7 +108,7 @@
 
 } // namespace WebCore
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 void showDocumentMarkers(const WebCore::DocumentMarkerController*);
 #endif
 

Modified: trunk/Source/WebCore/dom/Element.cpp (181153 => 181154)


--- trunk/Source/WebCore/dom/Element.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/dom/Element.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -1685,7 +1685,7 @@
         styleResolver->popParentElement(this);
 }
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 void Element::formatForDebugger(char* buffer, unsigned length) const
 {
     StringBuilder result;

Modified: trunk/Source/WebCore/dom/Element.h (181153 => 181154)


--- trunk/Source/WebCore/dom/Element.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/dom/Element.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -625,7 +625,7 @@
     void addAttributeInternal(const QualifiedName&, const AtomicString& value, SynchronizationOfLazyAttribute);
     void removeAttributeInternal(unsigned index, SynchronizationOfLazyAttribute);
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
     virtual void formatForDebugger(char* buffer, unsigned length) const override;
 #endif
 

Modified: trunk/Source/WebCore/dom/Node.cpp (181153 => 181154)


--- trunk/Source/WebCore/dom/Node.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/dom/Node.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -1486,7 +1486,7 @@
     return p;
 }
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 
 static void appendAttributeDesc(const Node* node, StringBuilder& stringBuilder, const QualifiedName& name, const char* attrDesc)
 {
@@ -1654,7 +1654,7 @@
     showSubTreeAcrossFrame(rootNode, this, "");
 }
 
-#endif // ENABLE(TREE_DEBUGGING)
+#endif
 
 // --------
 
@@ -2222,7 +2222,7 @@
 
 } // namespace WebCore
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 
 void showTree(const WebCore::Node* node)
 {
@@ -2236,4 +2236,4 @@
         node->showNodePathForThis();
 }
 
-#endif // ENABLE(TREE_DEBUGGING)
+#endif

Modified: trunk/Source/WebCore/dom/Node.h (181153 => 181154)


--- trunk/Source/WebCore/dom/Node.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/dom/Node.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -488,7 +488,7 @@
     //
     virtual void removedFrom(ContainerNode& insertionPoint);
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
     virtual void formatForDebugger(char* buffer, unsigned length) const;
 
     void showNode(const char* prefix = "") const;
@@ -496,7 +496,7 @@
     void showNodePathForThis() const;
     void showTreeAndMark(const Node* markedNode1, const char* markedLabel1, const Node* markedNode2 = nullptr, const char* markedLabel2 = nullptr) const;
     void showTreeForThisAcrossFrame() const;
-#endif // ENABLE(TREE_DEBUGGING)
+#endif
 
     void invalidateNodeListAndCollectionCachesInAncestors(const QualifiedName* attrName = nullptr, Element* attributeOwnerElement = nullptr);
     NodeListsNodeData* nodeLists();
@@ -733,7 +733,7 @@
 
 } // namespace WebCore
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 // Outside the WebCore namespace for ease of invocation from gdb.
 void showTree(const WebCore::Node*);
 void showNodePath(const WebCore::Node*);

Modified: trunk/Source/WebCore/dom/Position.cpp (181153 => 181154)


--- trunk/Source/WebCore/dom/Position.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/dom/Position.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -1346,7 +1346,6 @@
     return LTR;
 }
 
-#if ENABLE(TREE_DEBUGGING)
 
 void Position::debugPosition(const char* msg) const
 {
@@ -1356,6 +1355,8 @@
         fprintf(stderr, "Position [%s]: %s [%p] at %d\n", msg, deprecatedNode()->nodeName().utf8().data(), deprecatedNode(), m_offset);
 }
 
+#ifndef NDEBUG
+
 void Position::formatForDebugger(char* buffer, unsigned length) const
 {
     StringBuilder result;
@@ -1408,9 +1409,11 @@
 
 #endif
 
+
+
 } // namespace WebCore
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 
 void showTree(const WebCore::Position& pos)
 {

Modified: trunk/Source/WebCore/dom/Position.h (181153 => 181154)


--- trunk/Source/WebCore/dom/Position.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/dom/Position.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -202,7 +202,7 @@
     
     void debugPosition(const char* msg = "") const;
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
     void formatForDebugger(char* buffer, unsigned length) const;
     void showAnchorTypeAndOffset() const;
     void showTreeForThis() const;
@@ -342,7 +342,7 @@
 
 } // namespace WebCore
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 // Outside the WebCore namespace for ease of invocation from gdb.
 void showTree(const WebCore::Position&);
 void showTree(const WebCore::Position*);

Modified: trunk/Source/WebCore/dom/Range.cpp (181153 => 181154)


--- trunk/Source/WebCore/dom/Range.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/dom/Range.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -1919,7 +1919,7 @@
 }
 #endif
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 void Range::formatForDebugger(char* buffer, unsigned length) const
 {
     StringBuilder result;
@@ -2251,7 +2251,7 @@
 
 } // namespace WebCore
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 
 void showTree(const WebCore::Range* range)
 {

Modified: trunk/Source/WebCore/dom/Range.h (181153 => 181154)


--- trunk/Source/WebCore/dom/Range.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/dom/Range.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -151,7 +151,7 @@
     Ref<ClientRectList> getClientRects() const;
     Ref<ClientRect> getBoundingClientRect() const;
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
     void formatForDebugger(char* buffer, unsigned length) const;
 #endif
 
@@ -187,7 +187,7 @@
 
 } // namespace
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 // Outside the WebCore namespace for ease of invocation from gdb.
 void showTree(const WebCore::Range*);
 #endif

Modified: trunk/Source/WebCore/dom/Text.cpp (181153 => 181154)


--- trunk/Source/WebCore/dom/Text.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/dom/Text.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -216,7 +216,7 @@
     return result;
 }
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 void Text::formatForDebugger(char* buffer, unsigned length) const
 {
     StringBuilder result;

Modified: trunk/Source/WebCore/dom/Text.h (181153 => 181154)


--- trunk/Source/WebCore/dom/Text.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/dom/Text.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -67,7 +67,7 @@
 
     virtual Ref<Text> virtualCreate(const String&);
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
     virtual void formatForDebugger(char* buffer, unsigned length) const override;
 #endif
 };

Modified: trunk/Source/WebCore/rendering/CounterNode.cpp (181153 => 181154)


--- trunk/Source/WebCore/rendering/CounterNode.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/CounterNode.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -350,7 +350,7 @@
         next->recount();
 }
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 
 static void showTreeAndMark(const CounterNode* node)
 {
@@ -374,7 +374,7 @@
 
 } // namespace WebCore
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 
 void showCounterTree(const WebCore::CounterNode* counter)
 {

Modified: trunk/Source/WebCore/rendering/CounterNode.h (181153 => 181154)


--- trunk/Source/WebCore/rendering/CounterNode.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/CounterNode.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -93,7 +93,7 @@
 
 } // namespace WebCore
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 // Outside the WebCore namespace for ease of invocation from gdb.
 void showCounterTree(const WebCore::CounterNode*);
 #endif

Modified: trunk/Source/WebCore/rendering/InlineBox.cpp (181153 => 181154)


--- trunk/Source/WebCore/rendering/InlineBox.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/InlineBox.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -30,7 +30,7 @@
 #include "RenderLineBreak.h"
 #include "RootInlineBox.h"
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 #include <stdio.h>
 #endif
 
@@ -84,7 +84,7 @@
         parent()->removeChild(this);
 }
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 
 const char* InlineBox::boxName() const
 {
@@ -119,7 +119,7 @@
     fprintf(stderr, "%s  (%.2f, %.2f) (%.2f, %.2f) (%p)\n", boxName(), x(), y(), width(), height(), this);
 }
 
-#endif // ENABLE(TREE_DEBUGGING)
+#endif
 
 float InlineBox::logicalHeight() const
 {
@@ -328,7 +328,7 @@
 
 } // namespace WebCore
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 
 void showNodeTree(const WebCore::InlineBox* inlineBox)
 {

Modified: trunk/Source/WebCore/rendering/InlineBox.h (181153 => 181154)


--- trunk/Source/WebCore/rendering/InlineBox.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/InlineBox.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -73,7 +73,7 @@
     virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) = 0;
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom) = 0;
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
     void showNodeTreeForThis() const;
     void showLineTreeForThis() const;
     
@@ -446,7 +446,7 @@
     static bool isType(const WebCore::InlineBox& box) { return box.predicate; } \
 SPECIALIZE_TYPE_TRAITS_END()
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 // Outside the WebCore namespace for ease of invocation from gdb.
 void showNodeTree(const WebCore::InlineBox*);
 void showLineTree(const WebCore::InlineBox*);

Modified: trunk/Source/WebCore/rendering/InlineFlowBox.cpp (181153 => 181154)


--- trunk/Source/WebCore/rendering/InlineFlowBox.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -1687,7 +1687,7 @@
     }
 }
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 
 const char* InlineFlowBox::boxName() const
 {
@@ -1701,10 +1701,6 @@
         box->showLineTreeAndMark(markedBox, depth + 1);
 }
 
-#endif
-
-#ifndef NDEBUG
-
 void InlineFlowBox::checkConsistency() const
 {
     assertNotDeleted();

Modified: trunk/Source/WebCore/rendering/InlineFlowBox.h (181153 => 181154)


--- trunk/Source/WebCore/rendering/InlineFlowBox.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -70,7 +70,7 @@
     virtual ~InlineFlowBox();
 #endif
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
     virtual void showLineTreeAndMark(const InlineBox* markedBox, int depth) const override;
     virtual const char* boxName() const override;
 #endif
@@ -367,7 +367,7 @@
 
 SPECIALIZE_TYPE_TRAITS_INLINE_BOX(InlineFlowBox, isInlineFlowBox())
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 // Outside the WebCore namespace for ease of invocation from gdb.
 void showTree(const WebCore::InlineFlowBox*);
 #endif

Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (181153 => 181154)


--- trunk/Source/WebCore/rendering/InlineTextBox.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -1393,7 +1393,7 @@
     return run;
 }
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 
 const char* InlineTextBox::boxName() const
 {

Modified: trunk/Source/WebCore/rendering/InlineTextBox.h (181153 => 181154)


--- trunk/Source/WebCore/rendering/InlineTextBox.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/InlineTextBox.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -94,7 +94,7 @@
 
     virtual void dirtyOwnLineBoxes() { dirtyLineBoxes(); }
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
     virtual void showLineBox(bool mark, int depth) const override final;
     virtual const char* boxName() const override final;
 #endif

Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (181153 => 181154)


--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -3556,7 +3556,7 @@
         clearNeedsLayout();
 }
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 void RenderBlockFlow::showLineTreeAndMark(const InlineBox* markedBox, int depth) const
 {
     for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRootBox())

Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.h (181153 => 181154)


--- trunk/Source/WebCore/rendering/RenderBlockFlow.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -363,7 +363,7 @@
     void deleteLineBoxesBeforeSimpleLineLayout();
     void ensureLineBoxes();
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
     void showLineTreeAndMark(const InlineBox* markedBox, int depth) const;
 #endif
 

Modified: trunk/Source/WebCore/rendering/RenderCounter.cpp (181153 => 181154)


--- trunk/Source/WebCore/rendering/RenderCounter.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/RenderCounter.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -35,7 +35,7 @@
 #include "RenderView.h"
 #include <wtf/StdLibExtras.h>
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 #include <stdio.h>
 #endif
 
@@ -600,7 +600,7 @@
 
 } // namespace WebCore
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 
 void showCounterRendererTree(const WebCore::RenderObject* renderer, const char* counterName)
 {

Modified: trunk/Source/WebCore/rendering/RenderCounter.h (181153 => 181154)


--- trunk/Source/WebCore/rendering/RenderCounter.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/RenderCounter.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -63,7 +63,7 @@
 
 SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderCounter, isCounter())
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 // Outside the WebCore namespace for ease of invocation from gdb.
 void showCounterRendererTree(const WebCore::RenderObject*, const char* counterName = 0);
 #endif

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (181153 => 181154)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -7047,7 +7047,7 @@
 
 } // namespace WebCore
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 
 void showLayerTree(const WebCore::RenderLayer* layer)
 {

Modified: trunk/Source/WebCore/rendering/RenderLayer.h (181153 => 181154)


--- trunk/Source/WebCore/rendering/RenderLayer.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/RenderLayer.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -1172,7 +1172,7 @@
 
 } // namespace WebCore
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 // Outside the WebCore namespace for ease of invocation from gdb.
 void showLayerTree(const WebCore::RenderLayer*);
 void showLayerTree(const WebCore::RenderObject*);

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (181153 => 181154)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -169,7 +169,7 @@
 
     std::unique_ptr<GraphicsLayer> graphicsLayer = GraphicsLayer::create(graphicsLayerFactory, *this, layerType);
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
     graphicsLayer->setName(name);
 #else
     UNUSED_PARAM(name);
@@ -275,7 +275,7 @@
 void RenderLayerBacking::createPrimaryGraphicsLayer()
 {
     String layerName;
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
     layerName = m_owningLayer.name();
 #endif
     
@@ -1366,7 +1366,7 @@
     if (needsForegroundLayer) {
         if (!m_foregroundLayer) {
             String layerName;
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
             layerName = m_owningLayer.name() + " (foreground)";
 #endif
             m_foregroundLayer = createGraphicsLayer(layerName);
@@ -1395,7 +1395,7 @@
     if (needsBackgroundLayer) {
         if (!m_backgroundLayer) {
             String layerName;
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
             layerName = m_owningLayer.name() + " (background)";
 #endif
             m_backgroundLayer = createGraphicsLayer(layerName);
@@ -1407,7 +1407,7 @@
         
         if (!m_contentsContainmentLayer) {
             String layerName;
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
             layerName = m_owningLayer.name() + " (contents containment)";
 #endif
             m_contentsContainmentLayer = createGraphicsLayer(layerName);

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (181153 => 181154)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -71,7 +71,7 @@
 #include "RenderScrollbar.h"
 #endif
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 #include "RenderTreeAsText.h"
 #endif
 
@@ -225,7 +225,7 @@
 #if ENABLE(CSS_COMPOSITING)
         , m_hasNotIsolatedCompositedBlendingDescendants(false)
 #endif
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
         , m_depth(0)
 #endif
     {
@@ -238,7 +238,7 @@
 #if ENABLE(CSS_COMPOSITING)
         , m_hasNotIsolatedCompositedBlendingDescendants(other.m_hasNotIsolatedCompositedBlendingDescendants)
 #endif
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
         , m_depth(other.m_depth + 1)
 #endif
     {
@@ -250,7 +250,7 @@
 #if ENABLE(CSS_COMPOSITING)
     bool m_hasNotIsolatedCompositedBlendingDescendants;
 #endif
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
     int m_depth;
 #endif
 };
@@ -3015,7 +3015,7 @@
 
     if (!m_layerForTopOverhangArea) {
         m_layerForTopOverhangArea = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
         m_layerForTopOverhangArea->setName("top overhang area");
 #endif
         m_scrollLayer->addChildBelow(m_layerForTopOverhangArea.get(), m_rootContentLayer.get());
@@ -3039,7 +3039,7 @@
 
     if (!m_layerForBottomOverhangArea) {
         m_layerForBottomOverhangArea = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
         m_layerForBottomOverhangArea->setName("bottom overhang area");
 #endif
         m_scrollLayer->addChildBelow(m_layerForBottomOverhangArea.get(), m_rootContentLayer.get());
@@ -3070,7 +3070,7 @@
 
     if (!m_layerForHeader) {
         m_layerForHeader = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
         m_layerForHeader->setName("header");
 #endif
         m_scrollLayer->addChildAbove(m_layerForHeader.get(), m_rootContentLayer.get());
@@ -3111,7 +3111,7 @@
 
     if (!m_layerForFooter) {
         m_layerForFooter = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
         m_layerForFooter->setName("footer");
 #endif
         m_scrollLayer->addChildAbove(m_layerForFooter.get(), m_rootContentLayer.get());
@@ -3179,7 +3179,7 @@
     if (requiresOverhangAreasLayer()) {
         if (!m_layerForOverhangAreas) {
             m_layerForOverhangAreas = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
             m_layerForOverhangAreas->setName("overhang areas");
 #endif
             m_layerForOverhangAreas->setDrawsContent(false);
@@ -3208,7 +3208,7 @@
     if (requiresContentShadowLayer()) {
         if (!m_contentShadowLayer) {
             m_contentShadowLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
             m_contentShadowLayer->setName("content shadow");
 #endif
             m_contentShadowLayer->setSize(m_rootContentLayer->size());
@@ -3228,7 +3228,7 @@
         if (!m_layerForHorizontalScrollbar) {
             m_layerForHorizontalScrollbar = GraphicsLayer::create(graphicsLayerFactory(), *this);
             m_layerForHorizontalScrollbar->setShowDebugBorder(m_showDebugBorders);
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
             m_layerForHorizontalScrollbar->setName("horizontal scrollbar container");
 
 #endif
@@ -3252,7 +3252,7 @@
         if (!m_layerForVerticalScrollbar) {
             m_layerForVerticalScrollbar = GraphicsLayer::create(graphicsLayerFactory(), *this);
             m_layerForVerticalScrollbar->setShowDebugBorder(m_showDebugBorders);
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
             m_layerForVerticalScrollbar->setName("vertical scrollbar container");
 #endif
 #if PLATFORM(COCOA) && USE(CA)
@@ -3299,7 +3299,7 @@
 
     if (!m_rootContentLayer) {
         m_rootContentLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
         m_rootContentLayer->setName("content root");
 #endif
         IntRect overflowRect = snappedIntRect(m_renderView.layoutOverflowRect());
@@ -3324,19 +3324,19 @@
 
             // Create a layer to host the clipping layer and the overflow controls layers.
             m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
             m_overflowControlsHostLayer->setName("overflow controls host");
 #endif
 
             // Create a clipping layer if this is an iframe
             m_clipLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
             m_clipLayer->setName("frame clipping");
 #endif
             m_clipLayer->setMasksToBounds(true);
             
             m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
             m_scrollLayer->setName("frame scrolling");
 #endif
             // Hook them up

Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (181153 => 181154)


--- trunk/Source/WebCore/rendering/RenderObject.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -1351,7 +1351,7 @@
     ASSERT_NOT_REACHED();
 }
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 
 static void showRenderTreeLegend()
 {
@@ -2497,7 +2497,7 @@
 
 } // namespace WebCore
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 
 void showNodeTree(const WebCore::RenderObject* object)
 {

Modified: trunk/Source/WebCore/rendering/RenderObject.h (181153 => 181154)


--- trunk/Source/WebCore/rendering/RenderObject.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/RenderObject.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -136,6 +136,10 @@
 };
 #endif
 
+#ifndef NDEBUG
+const int showTreeCharacterOffset = 39;
+#endif
+
 // Base class for all rendering tree objects.
 class RenderObject : public CachedImageClient {
     WTF_MAKE_FAST_ALLOCATED;
@@ -267,7 +271,7 @@
     void setLayerNeedsFullRepaintForPositionedMovementLayout();
 
 public:
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
     void showNodeTreeForThis() const;
     void showRenderTreeForThis() const;
     void showLineTreeForThis() const;
@@ -1107,7 +1111,7 @@
     static bool isType(const WebCore::RenderObject& renderer) { return renderer.predicate; } \
 SPECIALIZE_TYPE_TRAITS_END()
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 // Outside the WebCore namespace for ease of invocation from gdb.
 void showNodeTree(const WebCore::RenderObject*);
 void showLineTree(const WebCore::RenderObject*);

Modified: trunk/Source/WebCore/rendering/RootInlineBox.cpp (181153 => 181154)


--- trunk/Source/WebCore/rendering/RootInlineBox.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/RootInlineBox.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -1152,7 +1152,7 @@
     return 0;
 }
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 const char* RootInlineBox::boxName() const
 {
     return "RootInlineBox";

Modified: trunk/Source/WebCore/rendering/RootInlineBox.h (181153 => 181154)


--- trunk/Source/WebCore/rendering/RootInlineBox.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/RootInlineBox.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -190,7 +190,7 @@
     Node* getLogicalStartBoxWithNode(InlineBox*&) const;
     Node* getLogicalEndBoxWithNode(InlineBox*&) const;
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
     virtual const char* boxName() const override final;
 #endif
 private:

Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp (181153 => 181154)


--- trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -179,7 +179,7 @@
     return quads;
 }
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 static void printPrefix(int& printedCharacters, int depth)
 {
     fprintf(stderr, "------- --");

Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.h (181153 => 181154)


--- trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -63,7 +63,7 @@
 LayoutUnit lineHeightFromFlow(const RenderBlockFlow&);
 LayoutUnit baselineFromFlow(const RenderBlockFlow&);
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 void showLineLayoutForFlow(const RenderBlockFlow&, const Layout&, int depth);
 #endif
 

Modified: trunk/Source/WebCore/rendering/svg/SVGResources.cpp (181153 => 181154)


--- trunk/Source/WebCore/rendering/svg/SVGResources.cpp	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/svg/SVGResources.cpp	2015-03-06 14:34:51 UTC (rev 181154)
@@ -31,7 +31,7 @@
 #include "SVGRenderStyle.h"
 #include "SVGURIReference.h"
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 #include <stdio.h>
 #endif
 
@@ -612,7 +612,7 @@
     m_linkedResource = 0;
 }
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
 void SVGResources::dump(const RenderObject* object)
 {
     ASSERT(object);

Modified: trunk/Source/WebCore/rendering/svg/SVGResources.h (181153 => 181154)


--- trunk/Source/WebCore/rendering/svg/SVGResources.h	2015-03-06 14:10:11 UTC (rev 181153)
+++ trunk/Source/WebCore/rendering/svg/SVGResources.h	2015-03-06 14:34:51 UTC (rev 181154)
@@ -71,7 +71,7 @@
     void removeClientFromCache(RenderElement&, bool markForInvalidation = true) const;
     void resourceDestroyed(RenderSVGResourceContainer&);
 
-#if ENABLE(TREE_DEBUGGING)
+#ifndef NDEBUG
     void dump(const RenderObject*);
 #endif
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to