https://bugs.webkit.org/show_bug.cgi?id=142379
Reviewed by Zalan Bujtas.
There are various tree dumping functions that are useful for debugging, and sometimes
you want to be able to use them in release builds. Currently they are surrounded by
in config.h
* config.h:
* dom/DocumentMarkerController.cpp:
* dom/DocumentMarkerController.h:
* dom/Element.cpp:
* dom/Element.h:
* dom/Node.cpp:
* dom/Node.h:
* dom/Position.cpp: Position::debugPosition(const char* msg) was available in release builds, but this changes
is to respect ENABLE_TREE_DEBUGGING, which I think is correct.
* dom/Position.h:
* dom/Range.cpp:
* dom/Range.h:
* dom/Text.cpp:
* dom/Text.h:
* rendering/CounterNode.cpp:
* rendering/CounterNode.h:
* rendering/InlineBox.cpp:
* rendering/InlineBox.h:
* rendering/InlineFlowBox.cpp:
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
* rendering/InlineTextBox.h:
* rendering/RenderBlockFlow.cpp:
* rendering/RenderBlockFlow.h:
* rendering/RenderCounter.cpp:
* rendering/RenderCounter.h:
* rendering/RenderLayer.cpp:
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::updateForegroundLayer):
(WebCore::RenderLayerBacking::updateBackgroundLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::CompositingState::CompositingState):
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
* rendering/RenderObject.cpp:
* rendering/RenderObject.h: showTreeCharacterOffset was unused.
* rendering/RootInlineBox.cpp:
* rendering/RootInlineBox.h:
* rendering/SimpleLineLayoutFunctions.cpp:
* rendering/SimpleLineLayoutFunctions.h:
* rendering/svg/SVGResources.cpp:
* rendering/svg/SVGResources.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181139
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-03-05 Simon Fraser <simon.fraser@apple.com>
+
+ Allow tree dumping functions to be used in release builds by switching a flag
+ https://bugs.webkit.org/show_bug.cgi?id=142379
+
+ Reviewed by Zalan Bujtas.
+
+ There are various tree dumping functions that are useful for debugging, and sometimes
+ you want to be able to use them in release builds. Currently they are surrounded by
+ #ifndef NDEBUG. Change this to #if ENABLE(TREE_DEBUGGING), which is defined to 0 or 1
+ in config.h
+
+ * config.h:
+ * dom/DocumentMarkerController.cpp:
+ * dom/DocumentMarkerController.h:
+ * dom/Element.cpp:
+ * dom/Element.h:
+ * dom/Node.cpp:
+ * dom/Node.h:
+ * dom/Position.cpp: Position::debugPosition(const char* msg) was available in release builds, but this changes
+ is to respect ENABLE_TREE_DEBUGGING, which I think is correct.
+ * dom/Position.h:
+ * dom/Range.cpp:
+ * dom/Range.h:
+ * dom/Text.cpp:
+ * dom/Text.h:
+ * rendering/CounterNode.cpp:
+ * rendering/CounterNode.h:
+ * rendering/InlineBox.cpp:
+ * rendering/InlineBox.h:
+ * rendering/InlineFlowBox.cpp:
+ * rendering/InlineFlowBox.h:
+ * rendering/InlineTextBox.cpp:
+ * rendering/InlineTextBox.h:
+ * rendering/RenderBlockFlow.cpp:
+ * rendering/RenderBlockFlow.h:
+ * rendering/RenderCounter.cpp:
+ * rendering/RenderCounter.h:
+ * rendering/RenderLayer.cpp:
+ * rendering/RenderLayer.h:
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::createGraphicsLayer):
+ (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
+ (WebCore::RenderLayerBacking::updateForegroundLayer):
+ (WebCore::RenderLayerBacking::updateBackgroundLayer):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::CompositingState::CompositingState):
+ (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
+ (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
+ (WebCore::RenderLayerCompositor::updateLayerForHeader):
+ (WebCore::RenderLayerCompositor::updateLayerForFooter):
+ (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
+ (WebCore::RenderLayerCompositor::ensureRootLayer):
+ * rendering/RenderObject.cpp:
+ * rendering/RenderObject.h: showTreeCharacterOffset was unused.
+ * rendering/RootInlineBox.cpp:
+ * rendering/RootInlineBox.h:
+ * rendering/SimpleLineLayoutFunctions.cpp:
+ * rendering/SimpleLineLayoutFunctions.h:
+ * rendering/svg/SVGResources.cpp:
+ * rendering/svg/SVGResources.h:
+
2015-03-05 Brent Fulgham <bfulgham@apple.com>
[Mac] 'Gliding' phase of scroll snap points is incorrect on desktop
#endif
+#ifdef NDEBUG
+#define ENABLE_TREE_DEBUGGING 0
+#else
+#define ENABLE_TREE_DEBUGGING 1
+#endif
}
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void DocumentMarkerController::showMarkers() const
{
fprintf(stderr, "%d nodes have markers:\n", m_markers.size());
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showDocumentMarkers(const WebCore::DocumentMarkerController* controller)
{
if (controller)
WEBCORE_EXPORT Vector<IntRect> renderedRectsForMarkers(DocumentMarker::MarkerType);
void clearDescriptionOnMarkersIntersectingRange(Range*, DocumentMarker::MarkerTypes);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showMarkers() const;
#endif
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showDocumentMarkers(const WebCore::DocumentMarkerController*);
#endif
styleResolver->popParentElement(this);
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void Element::formatForDebugger(char* buffer, unsigned length) const
{
StringBuilder result;
void addAttributeInternal(const QualifiedName&, const AtomicString& value, SynchronizationOfLazyAttribute);
void removeAttributeInternal(unsigned index, SynchronizationOfLazyAttribute);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
virtual void formatForDebugger(char* buffer, unsigned length) const override;
#endif
return p;
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
static void appendAttributeDesc(const Node* node, StringBuilder& stringBuilder, const QualifiedName& name, const char* attrDesc)
{
showSubTreeAcrossFrame(rootNode, this, "");
}
-#endif
+#endif // ENABLE(TREE_DEBUGGING)
// --------
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showTree(const WebCore::Node* node)
{
node->showNodePathForThis();
}
-#endif
+#endif // ENABLE(TREE_DEBUGGING)
//
virtual void removedFrom(ContainerNode& insertionPoint);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
virtual void formatForDebugger(char* buffer, unsigned length) const;
void showNode(const char* prefix = "") const;
void showNodePathForThis() const;
void showTreeAndMark(const Node* markedNode1, const char* markedLabel1, const Node* markedNode2 = nullptr, const char* markedLabel2 = nullptr) const;
void showTreeForThisAcrossFrame() const;
-#endif
+#endif // ENABLE(TREE_DEBUGGING)
void invalidateNodeListAndCollectionCachesInAncestors(const QualifiedName* attrName = nullptr, Element* attributeOwnerElement = nullptr);
NodeListsNodeData* nodeLists();
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
// Outside the WebCore namespace for ease of invocation from gdb.
void showTree(const WebCore::Node*);
void showNodePath(const WebCore::Node*);
return LTR;
}
+#if ENABLE(TREE_DEBUGGING)
void Position::debugPosition(const char* msg) const
{
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;
#endif
-
-
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showTree(const WebCore::Position& pos)
{
void debugPosition(const char* msg = "") const;
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void formatForDebugger(char* buffer, unsigned length) const;
void showAnchorTypeAndOffset() const;
void showTreeForThis() const;
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
// Outside the WebCore namespace for ease of invocation from gdb.
void showTree(const WebCore::Position&);
void showTree(const WebCore::Position*);
}
#endif
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void Range::formatForDebugger(char* buffer, unsigned length) const
{
StringBuilder result;
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showTree(const WebCore::Range* range)
{
Ref<ClientRectList> getClientRects() const;
Ref<ClientRect> getBoundingClientRect() const;
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void formatForDebugger(char* buffer, unsigned length) const;
#endif
} // namespace
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
// Outside the WebCore namespace for ease of invocation from gdb.
void showTree(const WebCore::Range*);
#endif
return result;
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void Text::formatForDebugger(char* buffer, unsigned length) const
{
StringBuilder result;
virtual Ref<Text> virtualCreate(const String&);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
virtual void formatForDebugger(char* buffer, unsigned length) const override;
#endif
};
next->recount();
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
static void showTreeAndMark(const CounterNode* node)
{
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showCounterTree(const WebCore::CounterNode* counter)
{
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
// Outside the WebCore namespace for ease of invocation from gdb.
void showCounterTree(const WebCore::CounterNode*);
#endif
#include "RenderLineBreak.h"
#include "RootInlineBox.h"
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
#include <stdio.h>
#endif
parent()->removeChild(this);
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
const char* InlineBox::boxName() const
{
fprintf(stderr, "%s (%.2f, %.2f) (%.2f, %.2f) (%p)\n", boxName(), x(), y(), width(), height(), this);
}
-#endif
+#endif // ENABLE(TREE_DEBUGGING)
float InlineBox::logicalHeight() const
{
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showNodeTree(const WebCore::InlineBox* inlineBox)
{
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;
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showNodeTreeForThis() const;
void showLineTreeForThis() const;
static bool isType(const WebCore::InlineBox& box) { return box.predicate; } \
SPECIALIZE_TYPE_TRAITS_END()
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
// Outside the WebCore namespace for ease of invocation from gdb.
void showNodeTree(const WebCore::InlineBox*);
void showLineTree(const WebCore::InlineBox*);
}
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
const char* InlineFlowBox::boxName() const
{
box->showLineTreeAndMark(markedBox, depth + 1);
}
+#endif
+
+#ifndef NDEBUG
+
void InlineFlowBox::checkConsistency() const
{
assertNotDeleted();
virtual ~InlineFlowBox();
#endif
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
virtual void showLineTreeAndMark(const InlineBox* markedBox, int depth) const override;
virtual const char* boxName() const override;
#endif
SPECIALIZE_TYPE_TRAITS_INLINE_BOX(InlineFlowBox, isInlineFlowBox())
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
// Outside the WebCore namespace for ease of invocation from gdb.
void showTree(const WebCore::InlineFlowBox*);
#endif
return run;
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
const char* InlineTextBox::boxName() const
{
virtual void dirtyOwnLineBoxes() { dirtyLineBoxes(); }
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
virtual void showLineBox(bool mark, int depth) const override final;
virtual const char* boxName() const override final;
#endif
clearNeedsLayout();
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void RenderBlockFlow::showLineTreeAndMark(const InlineBox* markedBox, int depth) const
{
for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRootBox())
void deleteLineBoxesBeforeSimpleLineLayout();
void ensureLineBoxes();
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showLineTreeAndMark(const InlineBox* markedBox, int depth) const;
#endif
#include "RenderView.h"
#include <wtf/StdLibExtras.h>
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
#include <stdio.h>
#endif
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showCounterRendererTree(const WebCore::RenderObject* renderer, const char* counterName)
{
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderCounter, isCounter())
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
// Outside the WebCore namespace for ease of invocation from gdb.
void showCounterRendererTree(const WebCore::RenderObject*, const char* counterName = 0);
#endif
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showLayerTree(const WebCore::RenderLayer* layer)
{
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
// Outside the WebCore namespace for ease of invocation from gdb.
void showLayerTree(const WebCore::RenderLayer*);
void showLayerTree(const WebCore::RenderObject*);
std::unique_ptr<GraphicsLayer> graphicsLayer = GraphicsLayer::create(graphicsLayerFactory, *this, layerType);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
graphicsLayer->setName(name);
#else
UNUSED_PARAM(name);
void RenderLayerBacking::createPrimaryGraphicsLayer()
{
String layerName;
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
layerName = m_owningLayer.name();
#endif
if (needsForegroundLayer) {
if (!m_foregroundLayer) {
String layerName;
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
layerName = m_owningLayer.name() + " (foreground)";
#endif
m_foregroundLayer = createGraphicsLayer(layerName);
if (needsBackgroundLayer) {
if (!m_backgroundLayer) {
String layerName;
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
layerName = m_owningLayer.name() + " (background)";
#endif
m_backgroundLayer = createGraphicsLayer(layerName);
if (!m_contentsContainmentLayer) {
String layerName;
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
layerName = m_owningLayer.name() + " (contents containment)";
#endif
m_contentsContainmentLayer = createGraphicsLayer(layerName);
#include "RenderScrollbar.h"
#endif
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
#include "RenderTreeAsText.h"
#endif
#if ENABLE(CSS_COMPOSITING)
, m_hasNotIsolatedCompositedBlendingDescendants(false)
#endif
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
, m_depth(0)
#endif
{
#if ENABLE(CSS_COMPOSITING)
, m_hasNotIsolatedCompositedBlendingDescendants(other.m_hasNotIsolatedCompositedBlendingDescendants)
#endif
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
, m_depth(other.m_depth + 1)
#endif
{
#if ENABLE(CSS_COMPOSITING)
bool m_hasNotIsolatedCompositedBlendingDescendants;
#endif
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
int m_depth;
#endif
};
if (!m_layerForTopOverhangArea) {
m_layerForTopOverhangArea = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
m_layerForTopOverhangArea->setName("top overhang area");
#endif
m_scrollLayer->addChildBelow(m_layerForTopOverhangArea.get(), m_rootContentLayer.get());
if (!m_layerForBottomOverhangArea) {
m_layerForBottomOverhangArea = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
m_layerForBottomOverhangArea->setName("bottom overhang area");
#endif
m_scrollLayer->addChildBelow(m_layerForBottomOverhangArea.get(), m_rootContentLayer.get());
if (!m_layerForHeader) {
m_layerForHeader = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
m_layerForHeader->setName("header");
#endif
m_scrollLayer->addChildAbove(m_layerForHeader.get(), m_rootContentLayer.get());
if (!m_layerForFooter) {
m_layerForFooter = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
m_layerForFooter->setName("footer");
#endif
m_scrollLayer->addChildAbove(m_layerForFooter.get(), m_rootContentLayer.get());
if (requiresOverhangAreasLayer()) {
if (!m_layerForOverhangAreas) {
m_layerForOverhangAreas = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
m_layerForOverhangAreas->setName("overhang areas");
#endif
m_layerForOverhangAreas->setDrawsContent(false);
if (requiresContentShadowLayer()) {
if (!m_contentShadowLayer) {
m_contentShadowLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
m_contentShadowLayer->setName("content shadow");
#endif
m_contentShadowLayer->setSize(m_rootContentLayer->size());
if (!m_layerForHorizontalScrollbar) {
m_layerForHorizontalScrollbar = GraphicsLayer::create(graphicsLayerFactory(), *this);
m_layerForHorizontalScrollbar->setShowDebugBorder(m_showDebugBorders);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
m_layerForHorizontalScrollbar->setName("horizontal scrollbar container");
#endif
if (!m_layerForVerticalScrollbar) {
m_layerForVerticalScrollbar = GraphicsLayer::create(graphicsLayerFactory(), *this);
m_layerForVerticalScrollbar->setShowDebugBorder(m_showDebugBorders);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
m_layerForVerticalScrollbar->setName("vertical scrollbar container");
#endif
#if PLATFORM(COCOA) && USE(CA)
if (!m_rootContentLayer) {
m_rootContentLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
m_rootContentLayer->setName("content root");
#endif
IntRect overflowRect = snappedIntRect(m_renderView.layoutOverflowRect());
// Create a layer to host the clipping layer and the overflow controls layers.
m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
m_overflowControlsHostLayer->setName("overflow controls host");
#endif
// Create a clipping layer if this is an iframe
m_clipLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
m_clipLayer->setName("frame clipping");
#endif
m_clipLayer->setMasksToBounds(true);
m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
m_scrollLayer->setName("frame scrolling");
#endif
// Hook them up
ASSERT_NOT_REACHED();
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
static void showRenderTreeLegend()
{
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showNodeTree(const WebCore::RenderObject* object)
{
};
#endif
-#ifndef NDEBUG
-const int showTreeCharacterOffset = 39;
-#endif
-
// Base class for all rendering tree objects.
class RenderObject : public CachedImageClient {
WTF_MAKE_FAST_ALLOCATED;
void setLayerNeedsFullRepaintForPositionedMovementLayout();
public:
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showNodeTreeForThis() const;
void showRenderTreeForThis() const;
void showLineTreeForThis() const;
static bool isType(const WebCore::RenderObject& renderer) { return renderer.predicate; } \
SPECIALIZE_TYPE_TRAITS_END()
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
// Outside the WebCore namespace for ease of invocation from gdb.
void showNodeTree(const WebCore::RenderObject*);
void showLineTree(const WebCore::RenderObject*);
return 0;
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
const char* RootInlineBox::boxName() const
{
return "RootInlineBox";
Node* getLogicalStartBoxWithNode(InlineBox*&) const;
Node* getLogicalEndBoxWithNode(InlineBox*&) const;
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
virtual const char* boxName() const override final;
#endif
private:
return quads;
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
static void printPrefix(int& printedCharacters, int depth)
{
fprintf(stderr, "------- --");
LayoutUnit lineHeightFromFlow(const RenderBlockFlow&);
LayoutUnit baselineFromFlow(const RenderBlockFlow&);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showLineLayoutForFlow(const RenderBlockFlow&, const Layout&, int depth);
#endif
#include "SVGRenderStyle.h"
#include "SVGURIReference.h"
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
#include <stdio.h>
#endif
m_linkedResource = 0;
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void SVGResources::dump(const RenderObject* object)
{
ASSERT(object);
void removeClientFromCache(RenderElement&, bool markForInvalidation = true) const;
void resourceDestroyed(RenderSVGResourceContainer&);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void dump(const RenderObject*);
#endif