Changeset 181139 in webkit


Ignore:
Timestamp:
Mar 5, 2015, 10:19:30 PM (10 years ago)
Author:
Simon Fraser
Message:

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
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:
Location:
trunk/Source/WebCore
Files:
38 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r181137 r181139  
     12015-03-05  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Allow tree dumping functions to be used in release builds by switching a flag
     4        https://bugs.webkit.org/show_bug.cgi?id=142379
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        There are various tree dumping functions that are useful for debugging, and sometimes
     9        you want to be able to use them in release builds. Currently they are surrounded by
     10        #ifndef NDEBUG. Change this to #if ENABLE(TREE_DEBUGGING), which is defined to 0 or 1
     11        in config.h
     12
     13        * config.h:
     14        * dom/DocumentMarkerController.cpp:
     15        * dom/DocumentMarkerController.h:
     16        * dom/Element.cpp:
     17        * dom/Element.h:
     18        * dom/Node.cpp:
     19        * dom/Node.h:
     20        * dom/Position.cpp: Position::debugPosition(const char* msg) was available in release builds, but this changes
     21        is to respect ENABLE_TREE_DEBUGGING, which I think is correct.
     22        * dom/Position.h:
     23        * dom/Range.cpp:
     24        * dom/Range.h:
     25        * dom/Text.cpp:
     26        * dom/Text.h:
     27        * rendering/CounterNode.cpp:
     28        * rendering/CounterNode.h:
     29        * rendering/InlineBox.cpp:
     30        * rendering/InlineBox.h:
     31        * rendering/InlineFlowBox.cpp:
     32        * rendering/InlineFlowBox.h:
     33        * rendering/InlineTextBox.cpp:
     34        * rendering/InlineTextBox.h:
     35        * rendering/RenderBlockFlow.cpp:
     36        * rendering/RenderBlockFlow.h:
     37        * rendering/RenderCounter.cpp:
     38        * rendering/RenderCounter.h:
     39        * rendering/RenderLayer.cpp:
     40        * rendering/RenderLayer.h:
     41        * rendering/RenderLayerBacking.cpp:
     42        (WebCore::RenderLayerBacking::createGraphicsLayer):
     43        (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
     44        (WebCore::RenderLayerBacking::updateForegroundLayer):
     45        (WebCore::RenderLayerBacking::updateBackgroundLayer):
     46        * rendering/RenderLayerCompositor.cpp:
     47        (WebCore::CompositingState::CompositingState):
     48        (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
     49        (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
     50        (WebCore::RenderLayerCompositor::updateLayerForHeader):
     51        (WebCore::RenderLayerCompositor::updateLayerForFooter):
     52        (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
     53        (WebCore::RenderLayerCompositor::ensureRootLayer):
     54        * rendering/RenderObject.cpp:
     55        * rendering/RenderObject.h: showTreeCharacterOffset was unused.
     56        * rendering/RootInlineBox.cpp:
     57        * rendering/RootInlineBox.h:
     58        * rendering/SimpleLineLayoutFunctions.cpp:
     59        * rendering/SimpleLineLayoutFunctions.h:
     60        * rendering/svg/SVGResources.cpp:
     61        * rendering/svg/SVGResources.h:
     62
    1632015-03-05  Brent Fulgham  <bfulgham@apple.com>
    264
  • trunk/Source/WebCore/config.h

    r180765 r181139  
    136136#endif
    137137
     138#ifdef NDEBUG
     139#define ENABLE_TREE_DEBUGGING 0
     140#else
     141#define ENABLE_TREE_DEBUGGING 1
     142#endif
  • trunk/Source/WebCore/dom/DocumentMarkerController.cpp

    r179143 r181139  
    725725}
    726726
    727 #ifndef NDEBUG
     727#if ENABLE(TREE_DEBUGGING)
    728728void DocumentMarkerController::showMarkers() const
    729729{
     
    746746} // namespace WebCore
    747747
    748 #ifndef NDEBUG
     748#if ENABLE(TREE_DEBUGGING)
    749749void showDocumentMarkers(const WebCore::DocumentMarkerController* controller)
    750750{
  • trunk/Source/WebCore/dom/DocumentMarkerController.h

    r174876 r181139  
    9090    void clearDescriptionOnMarkersIntersectingRange(Range*, DocumentMarker::MarkerTypes);
    9191
    92 #ifndef NDEBUG
     92#if ENABLE(TREE_DEBUGGING)
    9393    void showMarkers() const;
    9494#endif
     
    109109} // namespace WebCore
    110110
    111 #ifndef NDEBUG
     111#if ENABLE(TREE_DEBUGGING)
    112112void showDocumentMarkers(const WebCore::DocumentMarkerController*);
    113113#endif
  • trunk/Source/WebCore/dom/Element.cpp

    r180809 r181139  
    16861686}
    16871687
    1688 #ifndef NDEBUG
     1688#if ENABLE(TREE_DEBUGGING)
    16891689void Element::formatForDebugger(char* buffer, unsigned length) const
    16901690{
  • trunk/Source/WebCore/dom/Element.h

    r180966 r181139  
    626626    void removeAttributeInternal(unsigned index, SynchronizationOfLazyAttribute);
    627627
    628 #ifndef NDEBUG
     628#if ENABLE(TREE_DEBUGGING)
    629629    virtual void formatForDebugger(char* buffer, unsigned length) const override;
    630630#endif
  • trunk/Source/WebCore/dom/Node.cpp

    r180867 r181139  
    14871487}
    14881488
    1489 #ifndef NDEBUG
     1489#if ENABLE(TREE_DEBUGGING)
    14901490
    14911491static void appendAttributeDesc(const Node* node, StringBuilder& stringBuilder, const QualifiedName& name, const char* attrDesc)
     
    16551655}
    16561656
    1657 #endif
     1657#endif // ENABLE(TREE_DEBUGGING)
    16581658
    16591659// --------
     
    22232223} // namespace WebCore
    22242224
    2225 #ifndef NDEBUG
     2225#if ENABLE(TREE_DEBUGGING)
    22262226
    22272227void showTree(const WebCore::Node* node)
     
    22372237}
    22382238
    2239 #endif
     2239#endif // ENABLE(TREE_DEBUGGING)
  • trunk/Source/WebCore/dom/Node.h

    r180809 r181139  
    489489    virtual void removedFrom(ContainerNode& insertionPoint);
    490490
    491 #ifndef NDEBUG
     491#if ENABLE(TREE_DEBUGGING)
    492492    virtual void formatForDebugger(char* buffer, unsigned length) const;
    493493
     
    497497    void showTreeAndMark(const Node* markedNode1, const char* markedLabel1, const Node* markedNode2 = nullptr, const char* markedLabel2 = nullptr) const;
    498498    void showTreeForThisAcrossFrame() const;
    499 #endif
     499#endif // ENABLE(TREE_DEBUGGING)
    500500
    501501    void invalidateNodeListAndCollectionCachesInAncestors(const QualifiedName* attrName = nullptr, Element* attributeOwnerElement = nullptr);
     
    734734} // namespace WebCore
    735735
    736 #ifndef NDEBUG
     736#if ENABLE(TREE_DEBUGGING)
    737737// Outside the WebCore namespace for ease of invocation from gdb.
    738738void showTree(const WebCore::Node*);
  • trunk/Source/WebCore/dom/Position.cpp

    r180726 r181139  
    13471347}
    13481348
     1349#if ENABLE(TREE_DEBUGGING)
    13491350
    13501351void Position::debugPosition(const char* msg) const
     
    13551356        fprintf(stderr, "Position [%s]: %s [%p] at %d\n", msg, deprecatedNode()->nodeName().utf8().data(), deprecatedNode(), m_offset);
    13561357}
    1357 
    1358 #ifndef NDEBUG
    13591358
    13601359void Position::formatForDebugger(char* buffer, unsigned length) const
     
    14101409#endif
    14111410
    1412 
    1413 
    14141411} // namespace WebCore
    14151412
    1416 #ifndef NDEBUG
     1413#if ENABLE(TREE_DEBUGGING)
    14171414
    14181415void showTree(const WebCore::Position& pos)
  • trunk/Source/WebCore/dom/Position.h

    r180114 r181139  
    203203    void debugPosition(const char* msg = "") const;
    204204
    205 #ifndef NDEBUG
     205#if ENABLE(TREE_DEBUGGING)
    206206    void formatForDebugger(char* buffer, unsigned length) const;
    207207    void showAnchorTypeAndOffset() const;
     
    343343} // namespace WebCore
    344344
    345 #ifndef NDEBUG
     345#if ENABLE(TREE_DEBUGGING)
    346346// Outside the WebCore namespace for ease of invocation from gdb.
    347347void showTree(const WebCore::Position&);
  • trunk/Source/WebCore/dom/Range.cpp

    r179143 r181139  
    19201920#endif
    19211921
    1922 #ifndef NDEBUG
     1922#if ENABLE(TREE_DEBUGGING)
    19231923void Range::formatForDebugger(char* buffer, unsigned length) const
    19241924{
     
    22522252} // namespace WebCore
    22532253
    2254 #ifndef NDEBUG
     2254#if ENABLE(TREE_DEBUGGING)
    22552255
    22562256void showTree(const WebCore::Range* range)
  • trunk/Source/WebCore/dom/Range.h

    r179974 r181139  
    152152    Ref<ClientRect> getBoundingClientRect() const;
    153153
    154 #ifndef NDEBUG
     154#if ENABLE(TREE_DEBUGGING)
    155155    void formatForDebugger(char* buffer, unsigned length) const;
    156156#endif
     
    188188} // namespace
    189189
    190 #ifndef NDEBUG
     190#if ENABLE(TREE_DEBUGGING)
    191191// Outside the WebCore namespace for ease of invocation from gdb.
    192192void showTree(const WebCore::Range*);
  • trunk/Source/WebCore/dom/Text.cpp

    r179143 r181139  
    217217}
    218218
    219 #ifndef NDEBUG
     219#if ENABLE(TREE_DEBUGGING)
    220220void Text::formatForDebugger(char* buffer, unsigned length) const
    221221{
  • trunk/Source/WebCore/dom/Text.h

    r177864 r181139  
    6868    virtual Ref<Text> virtualCreate(const String&);
    6969
    70 #ifndef NDEBUG
     70#if ENABLE(TREE_DEBUGGING)
    7171    virtual void formatForDebugger(char* buffer, unsigned length) const override;
    7272#endif
  • trunk/Source/WebCore/rendering/CounterNode.cpp

    r177733 r181139  
    351351}
    352352
    353 #ifndef NDEBUG
     353#if ENABLE(TREE_DEBUGGING)
    354354
    355355static void showTreeAndMark(const CounterNode* node)
     
    375375} // namespace WebCore
    376376
    377 #ifndef NDEBUG
     377#if ENABLE(TREE_DEBUGGING)
    378378
    379379void showCounterTree(const WebCore::CounterNode* counter)
  • trunk/Source/WebCore/rendering/CounterNode.h

    r177733 r181139  
    9494} // namespace WebCore
    9595
    96 #ifndef NDEBUG
     96#if ENABLE(TREE_DEBUGGING)
    9797// Outside the WebCore namespace for ease of invocation from gdb.
    9898void showCounterTree(const WebCore::CounterNode*);
  • trunk/Source/WebCore/rendering/InlineBox.cpp

    r176619 r181139  
    3131#include "RootInlineBox.h"
    3232
    33 #ifndef NDEBUG
     33#if ENABLE(TREE_DEBUGGING)
    3434#include <stdio.h>
    3535#endif
     
    8585}
    8686
    87 #ifndef NDEBUG
     87#if ENABLE(TREE_DEBUGGING)
    8888
    8989const char* InlineBox::boxName() const
     
    120120}
    121121
    122 #endif
     122#endif // ENABLE(TREE_DEBUGGING)
    123123
    124124float InlineBox::logicalHeight() const
     
    329329} // namespace WebCore
    330330
    331 #ifndef NDEBUG
     331#if ENABLE(TREE_DEBUGGING)
    332332
    333333void showNodeTree(const WebCore::InlineBox* inlineBox)
  • trunk/Source/WebCore/rendering/InlineBox.h

    r177377 r181139  
    7474    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom) = 0;
    7575
    76 #ifndef NDEBUG
     76#if ENABLE(TREE_DEBUGGING)
    7777    void showNodeTreeForThis() const;
    7878    void showLineTreeForThis() const;
     
    447447SPECIALIZE_TYPE_TRAITS_END()
    448448
    449 #ifndef NDEBUG
     449#if ENABLE(TREE_DEBUGGING)
    450450// Outside the WebCore namespace for ease of invocation from gdb.
    451451void showNodeTree(const WebCore::InlineBox*);
  • trunk/Source/WebCore/rendering/InlineFlowBox.cpp

    r180150 r181139  
    16881688}
    16891689
    1690 #ifndef NDEBUG
     1690#if ENABLE(TREE_DEBUGGING)
    16911691
    16921692const char* InlineFlowBox::boxName() const
     
    17011701        box->showLineTreeAndMark(markedBox, depth + 1);
    17021702}
     1703
     1704#endif
     1705
     1706#ifndef NDEBUG
    17031707
    17041708void InlineFlowBox::checkConsistency() const
  • trunk/Source/WebCore/rendering/InlineFlowBox.h

    r180150 r181139  
    7171#endif
    7272
    73 #ifndef NDEBUG
     73#if ENABLE(TREE_DEBUGGING)
    7474    virtual void showLineTreeAndMark(const InlineBox* markedBox, int depth) const override;
    7575    virtual const char* boxName() const override;
     
    368368SPECIALIZE_TYPE_TRAITS_INLINE_BOX(InlineFlowBox, isInlineFlowBox())
    369369
    370 #ifndef NDEBUG
     370#if ENABLE(TREE_DEBUGGING)
    371371// Outside the WebCore namespace for ease of invocation from gdb.
    372372void showTree(const WebCore::InlineFlowBox*);
  • trunk/Source/WebCore/rendering/InlineTextBox.cpp

    r180273 r181139  
    13941394}
    13951395
    1396 #ifndef NDEBUG
     1396#if ENABLE(TREE_DEBUGGING)
    13971397
    13981398const char* InlineTextBox::boxName() const
  • trunk/Source/WebCore/rendering/InlineTextBox.h

    r180273 r181139  
    9595    virtual void dirtyOwnLineBoxes() { dirtyLineBoxes(); }
    9696
    97 #ifndef NDEBUG
     97#if ENABLE(TREE_DEBUGGING)
    9898    virtual void showLineBox(bool mark, int depth) const override final;
    9999    virtual const char* boxName() const override final;
  • trunk/Source/WebCore/rendering/RenderBlockFlow.cpp

    r180364 r181139  
    35573557}
    35583558
    3559 #ifndef NDEBUG
     3559#if ENABLE(TREE_DEBUGGING)
    35603560void RenderBlockFlow::showLineTreeAndMark(const InlineBox* markedBox, int depth) const
    35613561{
  • trunk/Source/WebCore/rendering/RenderBlockFlow.h

    r180278 r181139  
    364364    void ensureLineBoxes();
    365365
    366 #ifndef NDEBUG
     366#if ENABLE(TREE_DEBUGGING)
    367367    void showLineTreeAndMark(const InlineBox* markedBox, int depth) const;
    368368#endif
  • trunk/Source/WebCore/rendering/RenderCounter.cpp

    r179143 r181139  
    3636#include <wtf/StdLibExtras.h>
    3737
    38 #ifndef NDEBUG
     38#if ENABLE(TREE_DEBUGGING)
    3939#include <stdio.h>
    4040#endif
     
    601601} // namespace WebCore
    602602
    603 #ifndef NDEBUG
     603#if ENABLE(TREE_DEBUGGING)
    604604
    605605void showCounterRendererTree(const WebCore::RenderObject* renderer, const char* counterName)
  • trunk/Source/WebCore/rendering/RenderCounter.h

    r175485 r181139  
    6464SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderCounter, isCounter())
    6565
    66 #ifndef NDEBUG
     66#if ENABLE(TREE_DEBUGGING)
    6767// Outside the WebCore namespace for ease of invocation from gdb.
    6868void showCounterRendererTree(const WebCore::RenderObject*, const char* counterName = 0);
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r180948 r181139  
    70487048} // namespace WebCore
    70497049
    7050 #ifndef NDEBUG
     7050#if ENABLE(TREE_DEBUGGING)
    70517051
    70527052void showLayerTree(const WebCore::RenderLayer* layer)
  • trunk/Source/WebCore/rendering/RenderLayer.h

    r180948 r181139  
    11731173} // namespace WebCore
    11741174
    1175 #ifndef NDEBUG
     1175#if ENABLE(TREE_DEBUGGING)
    11761176// Outside the WebCore namespace for ease of invocation from gdb.
    11771177void showLayerTree(const WebCore::RenderLayer*);
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r180965 r181139  
    170170    std::unique_ptr<GraphicsLayer> graphicsLayer = GraphicsLayer::create(graphicsLayerFactory, *this, layerType);
    171171
    172 #ifndef NDEBUG
     172#if ENABLE(TREE_DEBUGGING)
    173173    graphicsLayer->setName(name);
    174174#else
     
    276276{
    277277    String layerName;
    278 #ifndef NDEBUG
     278#if ENABLE(TREE_DEBUGGING)
    279279    layerName = m_owningLayer.name();
    280280#endif
     
    13671367        if (!m_foregroundLayer) {
    13681368            String layerName;
    1369 #ifndef NDEBUG
     1369#if ENABLE(TREE_DEBUGGING)
    13701370            layerName = m_owningLayer.name() + " (foreground)";
    13711371#endif
     
    13961396        if (!m_backgroundLayer) {
    13971397            String layerName;
    1398 #ifndef NDEBUG
     1398#if ENABLE(TREE_DEBUGGING)
    13991399            layerName = m_owningLayer.name() + " (background)";
    14001400#endif
     
    14081408        if (!m_contentsContainmentLayer) {
    14091409            String layerName;
    1410 #ifndef NDEBUG
     1410#if ENABLE(TREE_DEBUGGING)
    14111411            layerName = m_owningLayer.name() + " (contents containment)";
    14121412#endif
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r179771 r181139  
    7272#endif
    7373
    74 #ifndef NDEBUG
     74#if ENABLE(TREE_DEBUGGING)
    7575#include "RenderTreeAsText.h"
    7676#endif
     
    226226        , m_hasNotIsolatedCompositedBlendingDescendants(false)
    227227#endif
    228 #ifndef NDEBUG
     228#if ENABLE(TREE_DEBUGGING)
    229229        , m_depth(0)
    230230#endif
     
    239239        , m_hasNotIsolatedCompositedBlendingDescendants(other.m_hasNotIsolatedCompositedBlendingDescendants)
    240240#endif
    241 #ifndef NDEBUG
     241#if ENABLE(TREE_DEBUGGING)
    242242        , m_depth(other.m_depth + 1)
    243243#endif
     
    251251    bool m_hasNotIsolatedCompositedBlendingDescendants;
    252252#endif
    253 #ifndef NDEBUG
     253#if ENABLE(TREE_DEBUGGING)
    254254    int m_depth;
    255255#endif
     
    30163016    if (!m_layerForTopOverhangArea) {
    30173017        m_layerForTopOverhangArea = GraphicsLayer::create(graphicsLayerFactory(), *this);
    3018 #ifndef NDEBUG
     3018#if ENABLE(TREE_DEBUGGING)
    30193019        m_layerForTopOverhangArea->setName("top overhang area");
    30203020#endif
     
    30403040    if (!m_layerForBottomOverhangArea) {
    30413041        m_layerForBottomOverhangArea = GraphicsLayer::create(graphicsLayerFactory(), *this);
    3042 #ifndef NDEBUG
     3042#if ENABLE(TREE_DEBUGGING)
    30433043        m_layerForBottomOverhangArea->setName("bottom overhang area");
    30443044#endif
     
    30713071    if (!m_layerForHeader) {
    30723072        m_layerForHeader = GraphicsLayer::create(graphicsLayerFactory(), *this);
    3073 #ifndef NDEBUG
     3073#if ENABLE(TREE_DEBUGGING)
    30743074        m_layerForHeader->setName("header");
    30753075#endif
     
    31123112    if (!m_layerForFooter) {
    31133113        m_layerForFooter = GraphicsLayer::create(graphicsLayerFactory(), *this);
    3114 #ifndef NDEBUG
     3114#if ENABLE(TREE_DEBUGGING)
    31153115        m_layerForFooter->setName("footer");
    31163116#endif
     
    31803180        if (!m_layerForOverhangAreas) {
    31813181            m_layerForOverhangAreas = GraphicsLayer::create(graphicsLayerFactory(), *this);
    3182 #ifndef NDEBUG
     3182#if ENABLE(TREE_DEBUGGING)
    31833183            m_layerForOverhangAreas->setName("overhang areas");
    31843184#endif
     
    32093209        if (!m_contentShadowLayer) {
    32103210            m_contentShadowLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
    3211 #ifndef NDEBUG
     3211#if ENABLE(TREE_DEBUGGING)
    32123212            m_contentShadowLayer->setName("content shadow");
    32133213#endif
     
    32293229            m_layerForHorizontalScrollbar = GraphicsLayer::create(graphicsLayerFactory(), *this);
    32303230            m_layerForHorizontalScrollbar->setShowDebugBorder(m_showDebugBorders);
    3231 #ifndef NDEBUG
     3231#if ENABLE(TREE_DEBUGGING)
    32323232            m_layerForHorizontalScrollbar->setName("horizontal scrollbar container");
    32333233
     
    32533253            m_layerForVerticalScrollbar = GraphicsLayer::create(graphicsLayerFactory(), *this);
    32543254            m_layerForVerticalScrollbar->setShowDebugBorder(m_showDebugBorders);
    3255 #ifndef NDEBUG
     3255#if ENABLE(TREE_DEBUGGING)
    32563256            m_layerForVerticalScrollbar->setName("vertical scrollbar container");
    32573257#endif
     
    33003300    if (!m_rootContentLayer) {
    33013301        m_rootContentLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
    3302 #ifndef NDEBUG
     3302#if ENABLE(TREE_DEBUGGING)
    33033303        m_rootContentLayer->setName("content root");
    33043304#endif
     
    33253325            // Create a layer to host the clipping layer and the overflow controls layers.
    33263326            m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
    3327 #ifndef NDEBUG
     3327#if ENABLE(TREE_DEBUGGING)
    33283328            m_overflowControlsHostLayer->setName("overflow controls host");
    33293329#endif
     
    33313331            // Create a clipping layer if this is an iframe
    33323332            m_clipLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
    3333 #ifndef NDEBUG
     3333#if ENABLE(TREE_DEBUGGING)
    33343334            m_clipLayer->setName("frame clipping");
    33353335#endif
     
    33373337           
    33383338            m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
    3339 #ifndef NDEBUG
     3339#if ENABLE(TREE_DEBUGGING)
    33403340            m_scrollLayer->setName("frame scrolling");
    33413341#endif
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r180767 r181139  
    13521352}
    13531353
    1354 #ifndef NDEBUG
     1354#if ENABLE(TREE_DEBUGGING)
    13551355
    13561356static void showRenderTreeLegend()
     
    24982498} // namespace WebCore
    24992499
    2500 #ifndef NDEBUG
     2500#if ENABLE(TREE_DEBUGGING)
    25012501
    25022502void showNodeTree(const WebCore::RenderObject* object)
  • trunk/Source/WebCore/rendering/RenderObject.h

    r180574 r181139  
    137137#endif
    138138
    139 #ifndef NDEBUG
    140 const int showTreeCharacterOffset = 39;
    141 #endif
    142 
    143139// Base class for all rendering tree objects.
    144140class RenderObject : public CachedImageClient {
     
    272268
    273269public:
    274 #ifndef NDEBUG
     270#if ENABLE(TREE_DEBUGGING)
    275271    void showNodeTreeForThis() const;
    276272    void showRenderTreeForThis() const;
     
    11121108SPECIALIZE_TYPE_TRAITS_END()
    11131109
    1114 #ifndef NDEBUG
     1110#if ENABLE(TREE_DEBUGGING)
    11151111// Outside the WebCore namespace for ease of invocation from gdb.
    11161112void showNodeTree(const WebCore::RenderObject*);
  • trunk/Source/WebCore/rendering/RootInlineBox.cpp

    r180815 r181139  
    11531153}
    11541154
    1155 #ifndef NDEBUG
     1155#if ENABLE(TREE_DEBUGGING)
    11561156const char* RootInlineBox::boxName() const
    11571157{
  • trunk/Source/WebCore/rendering/RootInlineBox.h

    r180150 r181139  
    191191    Node* getLogicalEndBoxWithNode(InlineBox*&) const;
    192192
    193 #ifndef NDEBUG
     193#if ENABLE(TREE_DEBUGGING)
    194194    virtual const char* boxName() const override final;
    195195#endif
  • trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp

    r178510 r181139  
    180180}
    181181
    182 #ifndef NDEBUG
     182#if ENABLE(TREE_DEBUGGING)
    183183static void printPrefix(int& printedCharacters, int depth)
    184184{
  • trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.h

    r174370 r181139  
    6464LayoutUnit baselineFromFlow(const RenderBlockFlow&);
    6565
    66 #ifndef NDEBUG
     66#if ENABLE(TREE_DEBUGGING)
    6767void showLineLayoutForFlow(const RenderBlockFlow&, const Layout&, int depth);
    6868#endif
  • trunk/Source/WebCore/rendering/svg/SVGResources.cpp

    r173970 r181139  
    3232#include "SVGURIReference.h"
    3333
    34 #ifndef NDEBUG
     34#if ENABLE(TREE_DEBUGGING)
    3535#include <stdio.h>
    3636#endif
     
    613613}
    614614
    615 #ifndef NDEBUG
     615#if ENABLE(TREE_DEBUGGING)
    616616void SVGResources::dump(const RenderObject* object)
    617617{
  • trunk/Source/WebCore/rendering/svg/SVGResources.h

    r173397 r181139  
    7272    void resourceDestroyed(RenderSVGResourceContainer&);
    7373
    74 #ifndef NDEBUG
     74#if ENABLE(TREE_DEBUGGING)
    7575    void dump(const RenderObject*);
    7676#endif
Note: See TracChangeset for help on using the changeset viewer.