<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[173114] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/173114">173114</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2014-08-29 10:55:34 -0700 (Fri, 29 Aug 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Improve showRenderTree() output.
https://bugs.webkit.org/show_bug.cgi?id=136244

Reviewed by Darin Adler.

Add more debugging information to showRenderTree().

Not testable.

* rendering/InlineBox.cpp:
(WebCore::InlineBox::showLineTreeForThis):
(WebCore::InlineBox::showLineTreeAndMark):
(WebCore::InlineBox::showLineBox):
(showNodeTree):
(showLineTree):
(WebCore::InlineBox::showBox): Deleted.
* rendering/InlineBox.h:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::showLineTreeAndMark):
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::showLineBox):
(WebCore::InlineTextBox::showBox): Deleted.
* rendering/InlineTextBox.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::showLineTreeAndMark): Deleted.
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::showLineTreeAndMark):
* rendering/RenderBlockFlow.h:
* rendering/RenderObject.cpp:
(WebCore::showRenderTreeLegend):
(WebCore::RenderObject::showNodeTreeForThis):
(WebCore::RenderObject::showRenderTreeForThis):
(WebCore::RenderObject::showLineTreeForThis):
(WebCore::RenderObject::showRegionsInformation):
(WebCore::RenderObject::showRenderObject):
(WebCore::RenderObject::showRenderSubTreeAndMark):
(showNodeTree):
(showLineTree):
(showRenderTree):
(WebCore::RenderObject::showRenderTreeAndMark): Deleted.
* rendering/RenderObject.h:
* rendering/RootInlineBox.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineBoxcpp">trunk/Source/WebCore/rendering/InlineBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineBoxh">trunk/Source/WebCore/rendering/InlineBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineFlowBoxcpp">trunk/Source/WebCore/rendering/InlineFlowBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineFlowBoxh">trunk/Source/WebCore/rendering/InlineFlowBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineTextBoxcpp">trunk/Source/WebCore/rendering/InlineTextBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineTextBoxh">trunk/Source/WebCore/rendering/InlineTextBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockh">trunk/Source/WebCore/rendering/RenderBlock.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowcpp">trunk/Source/WebCore/rendering/RenderBlockFlow.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowh">trunk/Source/WebCore/rendering/RenderBlockFlow.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjectcpp">trunk/Source/WebCore/rendering/RenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjecth">trunk/Source/WebCore/rendering/RenderObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRootInlineBoxh">trunk/Source/WebCore/rendering/RootInlineBox.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (173113 => 173114)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-08-29 15:55:54 UTC (rev 173113)
+++ trunk/Source/WebCore/ChangeLog        2014-08-29 17:55:34 UTC (rev 173114)
</span><span class="lines">@@ -1,3 +1,50 @@
</span><ins>+2014-08-29  Zalan Bujtas  &lt;zalan@apple.com&gt;
+
+        Improve showRenderTree() output.
+        https://bugs.webkit.org/show_bug.cgi?id=136244
+
+        Reviewed by Darin Adler.
+
+        Add more debugging information to showRenderTree().
+
+        Not testable.
+
+        * rendering/InlineBox.cpp:
+        (WebCore::InlineBox::showLineTreeForThis):
+        (WebCore::InlineBox::showLineTreeAndMark):
+        (WebCore::InlineBox::showLineBox):
+        (showNodeTree):
+        (showLineTree):
+        (WebCore::InlineBox::showBox): Deleted.
+        * rendering/InlineBox.h:
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::showLineTreeAndMark):
+        * rendering/InlineFlowBox.h:
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::showLineBox):
+        (WebCore::InlineTextBox::showBox): Deleted.
+        * rendering/InlineTextBox.h:
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::showLineTreeAndMark): Deleted.
+        * rendering/RenderBlock.h:
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::showLineTreeAndMark):
+        * rendering/RenderBlockFlow.h:
+        * rendering/RenderObject.cpp:
+        (WebCore::showRenderTreeLegend):
+        (WebCore::RenderObject::showNodeTreeForThis):
+        (WebCore::RenderObject::showRenderTreeForThis):
+        (WebCore::RenderObject::showLineTreeForThis):
+        (WebCore::RenderObject::showRegionsInformation):
+        (WebCore::RenderObject::showRenderObject):
+        (WebCore::RenderObject::showRenderSubTreeAndMark):
+        (showNodeTree):
+        (showLineTree):
+        (showRenderTree):
+        (WebCore::RenderObject::showRenderTreeAndMark): Deleted.
+        * rendering/RenderObject.h:
+        * rendering/RootInlineBox.h:
+
</ins><span class="cx"> 2014-08-29  Csaba Osztrogonác  &lt;ossy@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviwed, remove empty directories.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineBox.cpp (173113 => 173114)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineBox.cpp        2014-08-29 15:55:54 UTC (rev 173113)
+++ trunk/Source/WebCore/rendering/InlineBox.cpp        2014-08-29 17:55:34 UTC (rev 173114)
</span><span class="lines">@@ -98,30 +98,25 @@
</span><span class="cx"> 
</span><span class="cx"> void InlineBox::showLineTreeForThis() const
</span><span class="cx"> {
</span><del>-    m_renderer.containingBlock()-&gt;showLineTreeAndMark(this, &quot;*&quot;);
</del><ins>+    m_renderer.containingBlock()-&gt;showLineTreeForThis();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InlineBox::showLineTreeAndMark(const InlineBox* markedBox1, const char* markedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const RenderObject* obj, int depth) const
</del><ins>+void InlineBox::showLineTreeAndMark(const InlineBox* markedBox, int depth) const
</ins><span class="cx"> {
</span><del>-    int printedCharacters = 0;
-    if (this == markedBox1)
-        printedCharacters += fprintf(stderr, &quot;%s&quot;, markedLabel1);
-    if (this == markedBox2)
-        printedCharacters += fprintf(stderr, &quot;%s&quot;, markedLabel2);
-    if (&amp;m_renderer == obj)
-        printedCharacters += fprintf(stderr, &quot;*&quot;);
-    for (; printedCharacters &lt; depth * 2; printedCharacters++)
-        fputc(' ', stderr);
-
-    showBox(printedCharacters);
</del><ins>+    showLineBox(markedBox == this, depth);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InlineBox::showBox(int printedCharacters) const
</del><ins>+void InlineBox::showLineBox(bool mark, int depth) const
</ins><span class="cx"> {
</span><del>-    printedCharacters += fprintf(stderr, &quot;%s\t%p&quot;, boxName(), this);
-    for (; printedCharacters &lt; showTreeCharacterOffset; printedCharacters++)
</del><ins>+    fprintf(stderr, &quot;------- --&quot;);
+    int printedCharacters = 0;
+    if (mark) {
+        fprintf(stderr, &quot;*&quot;);
+        ++printedCharacters;
+    }
+    while (++printedCharacters &lt;= depth * 2)
</ins><span class="cx">         fputc(' ', stderr);
</span><del>-    fprintf(stderr, &quot;\t%s %p\n&quot;, renderer().renderName(), &amp;renderer());
</del><ins>+    fprintf(stderr, &quot;%s  (%.2f, %.2f) (%.2f, %.2f) (%p)\n&quot;, boxName(), x(), y(), width(), height(), this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="lines">@@ -334,16 +329,18 @@
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> 
</span><del>-void showNodeTree(const WebCore::InlineBox* b)
</del><ins>+void showNodeTree(const WebCore::InlineBox* inlineBox)
</ins><span class="cx"> {
</span><del>-    if (b)
-        b-&gt;showNodeTreeForThis();
</del><ins>+    if (!inlineBox)
+        return;
+    inlineBox-&gt;showNodeTreeForThis();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void showLineTree(const WebCore::InlineBox* b)
</del><ins>+void showLineTree(const WebCore::InlineBox* inlineBox)
</ins><span class="cx"> {
</span><del>-    if (b)
-        b-&gt;showLineTreeForThis();
</del><ins>+    if (!inlineBox)
+        return;
+    inlineBox-&gt;showLineTreeForThis();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineBox.h (173113 => 173114)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineBox.h        2014-08-29 15:55:54 UTC (rev 173113)
+++ trunk/Source/WebCore/rendering/InlineBox.h        2014-08-29 17:55:34 UTC (rev 173114)
</span><span class="lines">@@ -75,8 +75,8 @@
</span><span class="cx">     void showNodeTreeForThis() const;
</span><span class="cx">     void showLineTreeForThis() const;
</span><span class="cx">     
</span><del>-    virtual void showBox(int = 0) const;
-    virtual void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const InlineBox* = 0, const char* = 0, const RenderObject* = 0, int = 0) const;
</del><ins>+    virtual void showLineTreeAndMark(const InlineBox* markedBox, int depth) const;
+    virtual void showLineBox(bool mark, int depth) const;
</ins><span class="cx">     virtual const char* boxName() const;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineFlowBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineFlowBox.cpp (173113 => 173114)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineFlowBox.cpp        2014-08-29 15:55:54 UTC (rev 173113)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.cpp        2014-08-29 17:55:34 UTC (rev 173114)
</span><span class="lines">@@ -1645,11 +1645,11 @@
</span><span class="cx">     return &quot;InlineFlowBox&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InlineFlowBox::showLineTreeAndMark(const InlineBox* markedBox1, const char* markedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const RenderObject* obj, int depth) const
</del><ins>+void InlineFlowBox::showLineTreeAndMark(const InlineBox* markedBox, int depth) const
</ins><span class="cx"> {
</span><del>-    InlineBox::showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLabel2, obj, depth);
</del><ins>+    InlineBox::showLineTreeAndMark(markedBox, depth);
</ins><span class="cx">     for (const InlineBox* box = firstChild(); box; box = box-&gt;nextOnLine())
</span><del>-        box-&gt;showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLabel2, obj, depth + 1);
</del><ins>+        box-&gt;showLineTreeAndMark(markedBox, depth + 1);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InlineFlowBox::checkConsistency() const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineFlowBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineFlowBox.h (173113 => 173114)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineFlowBox.h        2014-08-29 15:55:54 UTC (rev 173113)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.h        2014-08-29 17:55:34 UTC (rev 173114)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><del>-    virtual void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const InlineBox* = 0, const char* = 0, const RenderObject* = 0, int = 0) const override;
</del><ins>+    virtual void showLineTreeAndMark(const InlineBox* markedBox, int depth) const override;
</ins><span class="cx">     virtual const char* boxName() const override;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (173113 => 173114)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.cpp        2014-08-29 15:55:54 UTC (rev 173113)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp        2014-08-29 17:55:34 UTC (rev 173114)
</span><span class="lines">@@ -1438,20 +1438,23 @@
</span><span class="cx">     return &quot;InlineTextBox&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InlineTextBox::showBox(int printedCharacters) const
</del><ins>+void InlineTextBox::showLineBox(bool mark, int depth) const
</ins><span class="cx"> {
</span><ins>+    fprintf(stderr, &quot;------- --&quot;);
+
+    int printedCharacters = 0;
+    if (mark) {
+        fprintf(stderr, &quot;*&quot;);
+        ++printedCharacters;
+    }
+    while (++printedCharacters &lt;= depth * 2)
+        fputc(' ', stderr);
+
</ins><span class="cx">     String value = renderer().text();
</span><span class="cx">     value = value.substring(start(), len());
</span><span class="cx">     value.replaceWithLiteral('\\', &quot;\\\\&quot;);
</span><span class="cx">     value.replaceWithLiteral('\n', &quot;\\n&quot;);
</span><del>-    printedCharacters += fprintf(stderr, &quot;%s\t%p&quot;, boxName(), this);
-    for (; printedCharacters &lt; showTreeCharacterOffset; printedCharacters++)
-        fputc(' ', stderr);
-    printedCharacters = fprintf(stderr, &quot;\t%s %p&quot;, renderer().renderName(), &amp;renderer());
-    const int rendererCharacterOffset = 24;
-    for (; printedCharacters &lt; rendererCharacterOffset; printedCharacters++)
-        fputc(' ', stderr);
-    fprintf(stderr, &quot;(%d,%d) \&quot;%s\&quot;\n&quot;, start(), start() + len(), value.utf8().data());
</del><ins>+    fprintf(stderr, &quot;%s  (%.2f, %.2f) (%.2f, %.2f) (%p) run(%d, %d) \&quot;%s\&quot;\n&quot;, boxName(), x(), y(), width(), height(), this, start(), start() + len(), value.utf8().data());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineTextBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineTextBox.h (173113 => 173114)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.h        2014-08-29 15:55:54 UTC (rev 173113)
+++ trunk/Source/WebCore/rendering/InlineTextBox.h        2014-08-29 17:55:34 UTC (rev 173114)
</span><span class="lines">@@ -95,8 +95,8 @@
</span><span class="cx">     virtual void dirtyOwnLineBoxes() { dirtyLineBoxes(); }
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><del>-    virtual void showBox(int = 0) const;
-    virtual const char* boxName() const;
</del><ins>+    virtual void showLineBox(bool mark, int depth) const override final;
+    virtual const char* boxName() const override final;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (173113 => 173114)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-08-29 15:55:54 UTC (rev 173113)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-08-29 17:55:34 UTC (rev 173114)
</span><span class="lines">@@ -4188,11 +4188,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderBlock::showLineTreeAndMark(const InlineBox*, const char*, const InlineBox*, const char*, const RenderObject*) const
-{
-    showRenderObject();
-}
-
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.h (173113 => 173114)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.h        2014-08-29 15:55:54 UTC (rev 173113)
+++ trunk/Source/WebCore/rendering/RenderBlock.h        2014-08-29 17:55:34 UTC (rev 173114)
</span><span class="lines">@@ -300,7 +300,6 @@
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">     void checkPositionedObjectsNeedLayout();
</span><del>-    virtual void showLineTreeAndMark(const InlineBox* = nullptr, const char* = nullptr, const InlineBox* = nullptr, const char* = nullptr, const RenderObject* = nullptr) const;
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (173113 => 173114)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2014-08-29 15:55:54 UTC (rev 173113)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2014-08-29 17:55:34 UTC (rev 173114)
</span><span class="lines">@@ -3475,11 +3475,10 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><del>-void RenderBlockFlow::showLineTreeAndMark(const InlineBox* markedBox1, const char* markedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const RenderObject* obj) const
</del><ins>+void RenderBlockFlow::showLineTreeAndMark(const InlineBox* markedBox, int depth) const
</ins><span class="cx"> {
</span><del>-    RenderBlock::showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLabel2, obj);
</del><span class="cx">     for (const RootInlineBox* root = firstRootBox(); root; root = root-&gt;nextRootBox())
</span><del>-        root-&gt;showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLabel2, obj, 1);
</del><ins>+        root-&gt;showLineTreeAndMark(markedBox, depth);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.h (173113 => 173114)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.h        2014-08-29 15:55:54 UTC (rev 173113)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.h        2014-08-29 17:55:34 UTC (rev 173114)
</span><span class="lines">@@ -360,7 +360,7 @@
</span><span class="cx">     void ensureLineBoxes();
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><del>-    virtual void showLineTreeAndMark(const InlineBox* = nullptr, const char* = nullptr, const InlineBox* = nullptr, const char* = nullptr, const RenderObject* = nullptr) const override;
</del><ins>+    void showLineTreeAndMark(const InlineBox* markedBox, int depth) const;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // Returns the logicalOffset at the top of the next page. If the offset passed in is already at the top of the current page,
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (173113 => 173114)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.cpp        2014-08-29 15:55:54 UTC (rev 173113)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp        2014-08-29 17:55:34 UTC (rev 173114)
</span><span class="lines">@@ -1410,30 +1410,38 @@
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> 
</span><ins>+static void showRenderTreeLegend()
+{
+    fprintf(stderr, &quot;\n(R)elative/A(B)solute/Fi(X)ed/Stick(Y) positioned, (O)verflow clipping, (A)nonymous, (G)enerated, (F)loating, has(L)ayer, (C)omposited, (D)irty layout, Dirty (S)tyle\n&quot;);
+}
+
</ins><span class="cx"> void RenderObject::showNodeTreeForThis() const
</span><span class="cx"> {
</span><del>-    if (node())
-        node()-&gt;showTreeForThis();
</del><ins>+    if (!node())
+        return;
+    node()-&gt;showTreeForThis();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderObject::showRenderTreeForThis() const
</span><span class="cx"> {
</span><del>-    showRenderTree(this, 0);
</del><ins>+    const WebCore::RenderObject* root = this;
+    while (root-&gt;parent())
+        root = root-&gt;parent();
+    showRenderTreeLegend();
+    root-&gt;showRenderSubTreeAndMark(this, 1);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderObject::showLineTreeForThis() const
</span><span class="cx"> {
</span><del>-    if (containingBlock())
-        containingBlock()-&gt;showLineTreeAndMark(0, 0, 0, 0, this);
</del><ins>+    if (!isRenderBlockFlow())
+        return;
+    showRenderTreeLegend();
+    showRenderObject(false, 1);
+    toRenderBlockFlow(this)-&gt;showLineTreeAndMark(nullptr, 2);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderObject::showRenderObject() const
</del><ins>+void RenderObject::showRegionsInformation() const
</ins><span class="cx"> {
</span><del>-    showRenderObject(0);
-}
-
-void RenderObject::showRegionsInformation(int&amp; printedCharacters) const
-{
</del><span class="cx">     CurrentRenderFlowThreadDisabler flowThreadDisabler(&amp;view());
</span><span class="cx"> 
</span><span class="cx">     if (RenderFlowThread* flowThread = flowThreadContainingBlock()) {
</span><span class="lines">@@ -1442,49 +1450,126 @@
</span><span class="cx">             RenderRegion* startRegion = nullptr;
</span><span class="cx">             RenderRegion* endRegion = nullptr;
</span><span class="cx">             flowThread-&gt;getRegionRangeForBox(box, startRegion, endRegion);
</span><del>-            printedCharacters += fprintf(stderr, &quot; [Rs:%p Re:%p]&quot;, startRegion, endRegion);
</del><ins>+            fprintf(stderr, &quot; [Rs:%p Re:%p]&quot;, startRegion, endRegion);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderObject::showRenderObject(int printedCharacters) const
</del><ins>+void RenderObject::showRenderObject(bool mark, int depth) const
</ins><span class="cx"> {
</span><del>-    // As this function is intended to be used when debugging, the
-    // this pointer may be 0.
</del><ins>+    // As this function is intended to be used when debugging, the this pointer may be 0.
</ins><span class="cx">     if (!this) {
</span><del>-        fputs(&quot;(null)\n&quot;, stderr);
</del><ins>+        fprintf(stderr, &quot;(null)\n&quot;);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    printedCharacters += fprintf(stderr, &quot;%s %p&quot;, renderName(), this);
-    showRegionsInformation(printedCharacters);
</del><ins>+    if (isPositioned()) {
+        if (isRelPositioned())
+            fputc('R', stderr);
+        else if (isStickyPositioned())
+            fputc('Y', stderr);
+        else if (isOutOfFlowPositioned()) {
+            if (style().position() == AbsolutePosition)
+                fputc('B', stderr);
+            else
+                fputc('X', stderr);
+        }
+    } else
+        fputc('-', stderr);
</ins><span class="cx"> 
</span><ins>+    if (hasOverflowClip())
+        fputc('O', stderr);
+    else
+        fputc('-', stderr);
+
+    if (isAnonymousBlock())
+        fputc('A', stderr);
+    else
+        fputc('-', stderr);
+
+    if (isPseudoElement() || isAnonymous())
+        fputc('G', stderr);
+    else
+        fputc('-', stderr);
+
+    if (isFloating())
+        fputc('F', stderr);
+    else
+        fputc('-', stderr);
+
+    if (hasLayer())
+        fputc('L', stderr);
+    else
+        fputc('-', stderr);
+
+    if (isComposited())
+        fputc('C', stderr);
+    else
+        fputc('-', stderr);
+
+    fputc(' ', stderr);
+
+    if (needsLayout())
+        fputc('D', stderr);
+    else
+        fputc('-', stderr);
+
+    if (node() &amp;&amp; node()-&gt;needsStyleRecalc())
+        fputc('S', stderr);
+    else
+        fputc('-', stderr);
+
+    int printedCharacters = 0;
+    if (mark) {
+        fprintf(stderr, &quot;*&quot;);
+        ++printedCharacters;
+    }
+
+    while (++printedCharacters &lt;= depth * 2)
+        fputc(' ', stderr);
+
+    if (node())
+        fprintf(stderr, &quot;%s &quot;, node()-&gt;nodeName().utf8().data());
+
+    String name = renderName();
+    // FIXME: Renderer's name should not include property value listing.
+    int pos = name.find('(');
+    if (pos &gt; 0)
+        fprintf(stderr, &quot;%s&quot;, name.left(pos - 1).utf8().data());
+    else
+        fprintf(stderr, &quot;%s&quot;, name.utf8().data());
+
+    if (isBox()) {
+        const RenderBox* box = toRenderBox(this);
+        fprintf(stderr, &quot;  (%.2f, %.2f) (%.2f, %.2f)&quot;, box-&gt;x().toFloat(), box-&gt;y().toFloat(), box-&gt;width().toFloat(), box-&gt;height().toFloat());
+    }
+
+    fprintf(stderr, &quot; renderer-&gt;(%p)&quot;, this);
</ins><span class="cx">     if (node()) {
</span><del>-        if (printedCharacters)
-            for (; printedCharacters &lt; showTreeCharacterOffset; printedCharacters++)
-                fputc(' ', stderr);
-        fputc('\t', stderr);
-        node()-&gt;showNode();
-    } else
-        fputc('\n', stderr);
</del><ins>+        fprintf(stderr, &quot; node-&gt;(%p)&quot;, node());
+        if (node()-&gt;isTextNode()) {
+            String value = node()-&gt;nodeValue();
+            value.replaceWithLiteral('\\', &quot;\\\\&quot;);
+            value.replaceWithLiteral('\n', &quot;\\n&quot;);
+            fprintf(stderr, &quot; \&quot;%s\&quot;&quot;, value.utf8().data());
+        }
+    }
+
+    showRegionsInformation();
+    fprintf(stderr, &quot;\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderObject::showRenderTreeAndMark(const RenderObject* markedObject1, const char* markedLabel1, const RenderObject* markedObject2, const char* markedLabel2, int depth) const
</del><ins>+void RenderObject::showRenderSubTreeAndMark(const RenderObject* markedObject, int depth) const
</ins><span class="cx"> {
</span><del>-    int printedCharacters = 0;
-    if (markedObject1 == this &amp;&amp; markedLabel1)
-        printedCharacters += fprintf(stderr, &quot;%s&quot;, markedLabel1);
-    if (markedObject2 == this &amp;&amp; markedLabel2)
-        printedCharacters += fprintf(stderr, &quot;%s&quot;, markedLabel2);
-    for (; printedCharacters &lt; depth * 2; printedCharacters++)
-        fputc(' ', stderr);
-
-    showRenderObject(printedCharacters);
</del><span class="cx">     if (!this)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    showRenderObject(markedObject == this, depth);
+    if (isRenderBlockFlow())
+        toRenderBlockFlow(this)-&gt;showLineTreeAndMark(nullptr, depth + 1);
+
</ins><span class="cx">     for (const RenderObject* child = firstChildSlow(); child; child = child-&gt;nextSibling())
</span><del>-        child-&gt;showRenderTreeAndMark(markedObject1, markedLabel1, markedObject2, markedLabel2, depth + 1);
</del><ins>+        child-&gt;showRenderSubTreeAndMark(markedObject, depth + 1);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // NDEBUG
</span><span class="lines">@@ -2516,29 +2601,23 @@
</span><span class="cx"> 
</span><span class="cx"> void showNodeTree(const WebCore::RenderObject* object)
</span><span class="cx"> {
</span><del>-    if (object)
-        object-&gt;showNodeTreeForThis();
</del><ins>+    if (!object)
+        return;
+    object-&gt;showNodeTreeForThis();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void showLineTree(const WebCore::RenderObject* object)
</span><span class="cx"> {
</span><del>-    if (object)
-        object-&gt;showLineTreeForThis();
</del><ins>+    if (!object)
+        return;
+    object-&gt;showLineTreeForThis();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void showRenderTree(const WebCore::RenderObject* object1)
</del><ins>+void showRenderTree(const WebCore::RenderObject* object)
</ins><span class="cx"> {
</span><del>-    showRenderTree(object1, 0);
</del><ins>+    if (!object)
+        return;
+    object-&gt;showRenderTreeForThis();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderObject* object2)
-{
-    if (object1) {
-        const WebCore::RenderObject* root = object1;
-        while (root-&gt;parent())
-            root = root-&gt;parent();
-        root-&gt;showRenderTreeAndMark(object1, &quot;*&quot;, object2, &quot;-&quot;, 0);
-    }
-}
-
</del><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.h (173113 => 173114)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.h        2014-08-29 15:55:54 UTC (rev 173113)
+++ trunk/Source/WebCore/rendering/RenderObject.h        2014-08-29 17:55:34 UTC (rev 173114)
</span><span class="lines">@@ -285,12 +285,9 @@
</span><span class="cx">     void showRenderTreeForThis() const;
</span><span class="cx">     void showLineTreeForThis() const;
</span><span class="cx"> 
</span><del>-    void showRenderObject() const;
-    // We don't make printedCharacters an optional parameter so that
-    // showRenderObject can be called from gdb easily.
-    void showRenderObject(int) const;
-    void showRenderTreeAndMark(const RenderObject* = 0, const char* = 0, const RenderObject* = 0, const char* = 0, int = 0) const;
-    void showRegionsInformation(int&amp;) const;
</del><ins>+    void showRenderObject(bool mark, int depth) const;
+    void showRenderSubTreeAndMark(const RenderObject* markedObject, int depth) const;
+    void showRegionsInformation() const;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> public:
</span><span class="lines">@@ -1141,10 +1138,7 @@
</span><span class="cx"> // Outside the WebCore namespace for ease of invocation from gdb.
</span><span class="cx"> void showNodeTree(const WebCore::RenderObject*);
</span><span class="cx"> void showLineTree(const WebCore::RenderObject*);
</span><del>-void showRenderTree(const WebCore::RenderObject* object1);
-// We don't make object2 an optional parameter so that showRenderTree
-// can be called from gdb easily.
-void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderObject* object2);
</del><ins>+void showRenderTree(const WebCore::RenderObject*);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #endif // RenderObject_h
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRootInlineBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RootInlineBox.h (173113 => 173114)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RootInlineBox.h        2014-08-29 15:55:54 UTC (rev 173113)
+++ trunk/Source/WebCore/rendering/RootInlineBox.h        2014-08-29 17:55:34 UTC (rev 173114)
</span><span class="lines">@@ -187,7 +187,7 @@
</span><span class="cx">     Node* getLogicalEndBoxWithNode(InlineBox*&amp;) const;
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><del>-    virtual const char* boxName() const override;
</del><ins>+    virtual const char* boxName() const override final;
</ins><span class="cx"> #endif
</span><span class="cx"> private:
</span><span class="cx">     virtual bool isRootInlineBox() const override final { return true; }
</span></span></pre>
</div>
</div>

</body>
</html>