Diff
Modified: trunk/Source/WebCore/ChangeLog (181138 => 181139)
--- trunk/Source/WebCore/ChangeLog 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/ChangeLog 2015-03-06 06:19:30 UTC (rev 181139)
@@ -1,3 +1,65 @@
+2015-03-05 Simon Fraser <simon.fra...@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 <bfulg...@apple.com>
[Mac] 'Gliding' phase of scroll snap points is incorrect on desktop
Modified: trunk/Source/WebCore/config.h (181138 => 181139)
--- trunk/Source/WebCore/config.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/config.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -135,3 +135,8 @@
#endif
+#ifdef NDEBUG
+#define ENABLE_TREE_DEBUGGING 0
+#else
+#define ENABLE_TREE_DEBUGGING 1
+#endif
Modified: trunk/Source/WebCore/dom/DocumentMarkerController.cpp (181138 => 181139)
--- trunk/Source/WebCore/dom/DocumentMarkerController.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/dom/DocumentMarkerController.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -724,7 +724,7 @@
}
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void DocumentMarkerController::showMarkers() const
{
fprintf(stderr, "%d nodes have markers:\n", m_markers.size());
@@ -745,7 +745,7 @@
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showDocumentMarkers(const WebCore::DocumentMarkerController* controller)
{
if (controller)
Modified: trunk/Source/WebCore/dom/DocumentMarkerController.h (181138 => 181139)
--- trunk/Source/WebCore/dom/DocumentMarkerController.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/dom/DocumentMarkerController.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -89,7 +89,7 @@
WEBCORE_EXPORT Vector<IntRect> renderedRectsForMarkers(DocumentMarker::MarkerType);
void clearDescriptionOnMarkersIntersectingRange(Range*, DocumentMarker::MarkerTypes);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showMarkers() const;
#endif
@@ -108,7 +108,7 @@
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showDocumentMarkers(const WebCore::DocumentMarkerController*);
#endif
Modified: trunk/Source/WebCore/dom/Element.cpp (181138 => 181139)
--- trunk/Source/WebCore/dom/Element.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/dom/Element.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -1685,7 +1685,7 @@
styleResolver->popParentElement(this);
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void Element::formatForDebugger(char* buffer, unsigned length) const
{
StringBuilder result;
Modified: trunk/Source/WebCore/dom/Element.h (181138 => 181139)
--- trunk/Source/WebCore/dom/Element.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/dom/Element.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -625,7 +625,7 @@
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
Modified: trunk/Source/WebCore/dom/Node.cpp (181138 => 181139)
--- trunk/Source/WebCore/dom/Node.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/dom/Node.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -1486,7 +1486,7 @@
return p;
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
static void appendAttributeDesc(const Node* node, StringBuilder& stringBuilder, const QualifiedName& name, const char* attrDesc)
{
@@ -1654,7 +1654,7 @@
showSubTreeAcrossFrame(rootNode, this, "");
}
-#endif
+#endif // ENABLE(TREE_DEBUGGING)
// --------
@@ -2222,7 +2222,7 @@
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showTree(const WebCore::Node* node)
{
@@ -2236,4 +2236,4 @@
node->showNodePathForThis();
}
-#endif
+#endif // ENABLE(TREE_DEBUGGING)
Modified: trunk/Source/WebCore/dom/Node.h (181138 => 181139)
--- trunk/Source/WebCore/dom/Node.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/dom/Node.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -488,7 +488,7 @@
//
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;
@@ -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
+#endif // ENABLE(TREE_DEBUGGING)
void invalidateNodeListAndCollectionCachesInAncestors(const QualifiedName* attrName = nullptr, Element* attributeOwnerElement = nullptr);
NodeListsNodeData* nodeLists();
@@ -733,7 +733,7 @@
} // 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*);
Modified: trunk/Source/WebCore/dom/Position.cpp (181138 => 181139)
--- trunk/Source/WebCore/dom/Position.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/dom/Position.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -1346,6 +1346,7 @@
return LTR;
}
+#if ENABLE(TREE_DEBUGGING)
void Position::debugPosition(const char* msg) const
{
@@ -1355,8 +1356,6 @@
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;
@@ -1409,11 +1408,9 @@
#endif
-
-
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showTree(const WebCore::Position& pos)
{
Modified: trunk/Source/WebCore/dom/Position.h (181138 => 181139)
--- trunk/Source/WebCore/dom/Position.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/dom/Position.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -202,7 +202,7 @@
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;
@@ -342,7 +342,7 @@
} // 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*);
Modified: trunk/Source/WebCore/dom/Range.cpp (181138 => 181139)
--- trunk/Source/WebCore/dom/Range.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/dom/Range.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -1919,7 +1919,7 @@
}
#endif
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void Range::formatForDebugger(char* buffer, unsigned length) const
{
StringBuilder result;
@@ -2251,7 +2251,7 @@
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showTree(const WebCore::Range* range)
{
Modified: trunk/Source/WebCore/dom/Range.h (181138 => 181139)
--- trunk/Source/WebCore/dom/Range.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/dom/Range.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -151,7 +151,7 @@
Ref<ClientRectList> getClientRects() const;
Ref<ClientRect> getBoundingClientRect() const;
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void formatForDebugger(char* buffer, unsigned length) const;
#endif
@@ -187,7 +187,7 @@
} // namespace
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
// Outside the WebCore namespace for ease of invocation from gdb.
void showTree(const WebCore::Range*);
#endif
Modified: trunk/Source/WebCore/dom/Text.cpp (181138 => 181139)
--- trunk/Source/WebCore/dom/Text.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/dom/Text.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -216,7 +216,7 @@
return result;
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void Text::formatForDebugger(char* buffer, unsigned length) const
{
StringBuilder result;
Modified: trunk/Source/WebCore/dom/Text.h (181138 => 181139)
--- trunk/Source/WebCore/dom/Text.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/dom/Text.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -67,7 +67,7 @@
virtual Ref<Text> virtualCreate(const String&);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
virtual void formatForDebugger(char* buffer, unsigned length) const override;
#endif
};
Modified: trunk/Source/WebCore/rendering/CounterNode.cpp (181138 => 181139)
--- trunk/Source/WebCore/rendering/CounterNode.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/CounterNode.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -350,7 +350,7 @@
next->recount();
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
static void showTreeAndMark(const CounterNode* node)
{
@@ -374,7 +374,7 @@
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showCounterTree(const WebCore::CounterNode* counter)
{
Modified: trunk/Source/WebCore/rendering/CounterNode.h (181138 => 181139)
--- trunk/Source/WebCore/rendering/CounterNode.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/CounterNode.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -93,7 +93,7 @@
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
// Outside the WebCore namespace for ease of invocation from gdb.
void showCounterTree(const WebCore::CounterNode*);
#endif
Modified: trunk/Source/WebCore/rendering/InlineBox.cpp (181138 => 181139)
--- trunk/Source/WebCore/rendering/InlineBox.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/InlineBox.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -30,7 +30,7 @@
#include "RenderLineBreak.h"
#include "RootInlineBox.h"
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
#include <stdio.h>
#endif
@@ -84,7 +84,7 @@
parent()->removeChild(this);
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
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
+#endif // ENABLE(TREE_DEBUGGING)
float InlineBox::logicalHeight() const
{
@@ -328,7 +328,7 @@
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showNodeTree(const WebCore::InlineBox* inlineBox)
{
Modified: trunk/Source/WebCore/rendering/InlineBox.h (181138 => 181139)
--- trunk/Source/WebCore/rendering/InlineBox.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/InlineBox.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -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;
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showNodeTreeForThis() const;
void showLineTreeForThis() const;
@@ -446,7 +446,7 @@
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*);
Modified: trunk/Source/WebCore/rendering/InlineFlowBox.cpp (181138 => 181139)
--- trunk/Source/WebCore/rendering/InlineFlowBox.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -1687,7 +1687,7 @@
}
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
const char* InlineFlowBox::boxName() const
{
@@ -1701,6 +1701,10 @@
box->showLineTreeAndMark(markedBox, depth + 1);
}
+#endif
+
+#ifndef NDEBUG
+
void InlineFlowBox::checkConsistency() const
{
assertNotDeleted();
Modified: trunk/Source/WebCore/rendering/InlineFlowBox.h (181138 => 181139)
--- trunk/Source/WebCore/rendering/InlineFlowBox.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -70,7 +70,7 @@
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
@@ -367,7 +367,7 @@
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
Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (181138 => 181139)
--- trunk/Source/WebCore/rendering/InlineTextBox.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -1393,7 +1393,7 @@
return run;
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
const char* InlineTextBox::boxName() const
{
Modified: trunk/Source/WebCore/rendering/InlineTextBox.h (181138 => 181139)
--- trunk/Source/WebCore/rendering/InlineTextBox.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/InlineTextBox.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -94,7 +94,7 @@
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
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (181138 => 181139)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -3556,7 +3556,7 @@
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())
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.h (181138 => 181139)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -363,7 +363,7 @@
void deleteLineBoxesBeforeSimpleLineLayout();
void ensureLineBoxes();
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showLineTreeAndMark(const InlineBox* markedBox, int depth) const;
#endif
Modified: trunk/Source/WebCore/rendering/RenderCounter.cpp (181138 => 181139)
--- trunk/Source/WebCore/rendering/RenderCounter.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/RenderCounter.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -35,7 +35,7 @@
#include "RenderView.h"
#include <wtf/StdLibExtras.h>
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
#include <stdio.h>
#endif
@@ -600,7 +600,7 @@
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showCounterRendererTree(const WebCore::RenderObject* renderer, const char* counterName)
{
Modified: trunk/Source/WebCore/rendering/RenderCounter.h (181138 => 181139)
--- trunk/Source/WebCore/rendering/RenderCounter.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/RenderCounter.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -63,7 +63,7 @@
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
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (181138 => 181139)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -7047,7 +7047,7 @@
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showLayerTree(const WebCore::RenderLayer* layer)
{
Modified: trunk/Source/WebCore/rendering/RenderLayer.h (181138 => 181139)
--- trunk/Source/WebCore/rendering/RenderLayer.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/RenderLayer.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -1172,7 +1172,7 @@
} // 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*);
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (181138 => 181139)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -169,7 +169,7 @@
std::unique_ptr<GraphicsLayer> graphicsLayer = GraphicsLayer::create(graphicsLayerFactory, *this, layerType);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
graphicsLayer->setName(name);
#else
UNUSED_PARAM(name);
@@ -275,7 +275,7 @@
void RenderLayerBacking::createPrimaryGraphicsLayer()
{
String layerName;
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
layerName = m_owningLayer.name();
#endif
@@ -1366,7 +1366,7 @@
if (needsForegroundLayer) {
if (!m_foregroundLayer) {
String layerName;
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
layerName = m_owningLayer.name() + " (foreground)";
#endif
m_foregroundLayer = createGraphicsLayer(layerName);
@@ -1395,7 +1395,7 @@
if (needsBackgroundLayer) {
if (!m_backgroundLayer) {
String layerName;
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
layerName = m_owningLayer.name() + " (background)";
#endif
m_backgroundLayer = createGraphicsLayer(layerName);
@@ -1407,7 +1407,7 @@
if (!m_contentsContainmentLayer) {
String layerName;
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
layerName = m_owningLayer.name() + " (contents containment)";
#endif
m_contentsContainmentLayer = createGraphicsLayer(layerName);
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (181138 => 181139)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -71,7 +71,7 @@
#include "RenderScrollbar.h"
#endif
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
#include "RenderTreeAsText.h"
#endif
@@ -225,7 +225,7 @@
#if ENABLE(CSS_COMPOSITING)
, m_hasNotIsolatedCompositedBlendingDescendants(false)
#endif
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
, m_depth(0)
#endif
{
@@ -238,7 +238,7 @@
#if ENABLE(CSS_COMPOSITING)
, m_hasNotIsolatedCompositedBlendingDescendants(other.m_hasNotIsolatedCompositedBlendingDescendants)
#endif
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
, m_depth(other.m_depth + 1)
#endif
{
@@ -250,7 +250,7 @@
#if ENABLE(CSS_COMPOSITING)
bool m_hasNotIsolatedCompositedBlendingDescendants;
#endif
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
int m_depth;
#endif
};
@@ -3015,7 +3015,7 @@
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());
@@ -3039,7 +3039,7 @@
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());
@@ -3070,7 +3070,7 @@
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());
@@ -3111,7 +3111,7 @@
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());
@@ -3179,7 +3179,7 @@
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);
@@ -3208,7 +3208,7 @@
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());
@@ -3228,7 +3228,7 @@
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
@@ -3252,7 +3252,7 @@
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)
@@ -3299,7 +3299,7 @@
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());
@@ -3324,19 +3324,19 @@
// 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
Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (181138 => 181139)
--- trunk/Source/WebCore/rendering/RenderObject.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -1351,7 +1351,7 @@
ASSERT_NOT_REACHED();
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
static void showRenderTreeLegend()
{
@@ -2497,7 +2497,7 @@
} // namespace WebCore
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showNodeTree(const WebCore::RenderObject* object)
{
Modified: trunk/Source/WebCore/rendering/RenderObject.h (181138 => 181139)
--- trunk/Source/WebCore/rendering/RenderObject.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/RenderObject.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -136,10 +136,6 @@
};
#endif
-#ifndef NDEBUG
-const int showTreeCharacterOffset = 39;
-#endif
-
// Base class for all rendering tree objects.
class RenderObject : public CachedImageClient {
WTF_MAKE_FAST_ALLOCATED;
@@ -271,7 +267,7 @@
void setLayerNeedsFullRepaintForPositionedMovementLayout();
public:
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showNodeTreeForThis() const;
void showRenderTreeForThis() const;
void showLineTreeForThis() const;
@@ -1111,7 +1107,7 @@
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*);
Modified: trunk/Source/WebCore/rendering/RootInlineBox.cpp (181138 => 181139)
--- trunk/Source/WebCore/rendering/RootInlineBox.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/RootInlineBox.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -1152,7 +1152,7 @@
return 0;
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
const char* RootInlineBox::boxName() const
{
return "RootInlineBox";
Modified: trunk/Source/WebCore/rendering/RootInlineBox.h (181138 => 181139)
--- trunk/Source/WebCore/rendering/RootInlineBox.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/RootInlineBox.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -190,7 +190,7 @@
Node* getLogicalStartBoxWithNode(InlineBox*&) const;
Node* getLogicalEndBoxWithNode(InlineBox*&) const;
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
virtual const char* boxName() const override final;
#endif
private:
Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp (181138 => 181139)
--- trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -179,7 +179,7 @@
return quads;
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
static void printPrefix(int& printedCharacters, int depth)
{
fprintf(stderr, "------- --");
Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.h (181138 => 181139)
--- trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -63,7 +63,7 @@
LayoutUnit lineHeightFromFlow(const RenderBlockFlow&);
LayoutUnit baselineFromFlow(const RenderBlockFlow&);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void showLineLayoutForFlow(const RenderBlockFlow&, const Layout&, int depth);
#endif
Modified: trunk/Source/WebCore/rendering/svg/SVGResources.cpp (181138 => 181139)
--- trunk/Source/WebCore/rendering/svg/SVGResources.cpp 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/svg/SVGResources.cpp 2015-03-06 06:19:30 UTC (rev 181139)
@@ -31,7 +31,7 @@
#include "SVGRenderStyle.h"
#include "SVGURIReference.h"
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
#include <stdio.h>
#endif
@@ -612,7 +612,7 @@
m_linkedResource = 0;
}
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void SVGResources::dump(const RenderObject* object)
{
ASSERT(object);
Modified: trunk/Source/WebCore/rendering/svg/SVGResources.h (181138 => 181139)
--- trunk/Source/WebCore/rendering/svg/SVGResources.h 2015-03-06 06:16:04 UTC (rev 181138)
+++ trunk/Source/WebCore/rendering/svg/SVGResources.h 2015-03-06 06:19:30 UTC (rev 181139)
@@ -71,7 +71,7 @@
void removeClientFromCache(RenderElement&, bool markForInvalidation = true) const;
void resourceDestroyed(RenderSVGResourceContainer&);
-#ifndef NDEBUG
+#if ENABLE(TREE_DEBUGGING)
void dump(const RenderObject*);
#endif