Changeset 219216 in webkit


Ignore:
Timestamp:
Jul 6, 2017 2:13:24 PM (7 years ago)
Author:
Alan Bujtas
Message:

Use WTFLogAlways for debug logging so that it shows up in device system logs
https://bugs.webkit.org/show_bug.cgi?id=173450

Reviewed by Simon Fraser.

If you want to showRenderTree() on-device, the result doesn't show in system log so you can't see it.
Switch to WTFLogAlways to fix this, for showRenderTree and its dependencies.

  • platform/text/TextStream.cpp:

(WebCore::writeIndent):

  • rendering/InlineBox.cpp:

(WebCore::InlineBox::showLineTreeAndMark):
(WebCore::InlineBox::showLineBox):

  • rendering/InlineBox.h:
  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::showLineTreeAndMark):

  • rendering/InlineFlowBox.h:
  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::showLineBox):

  • rendering/InlineTextBox.h:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::showLineTreeAndMark):

  • rendering/RenderBlockFlow.h:
  • rendering/RenderObject.cpp:

(WebCore::showRenderTreeLegend):
(WebCore::RenderObject::showRenderTreeForThis):
(WebCore::RenderObject::showLineTreeForThis):
(WebCore::RenderObject::showRegionsInformation):
(WebCore::RenderObject::showRenderObject):
(WebCore::RenderObject::showRenderSubTreeAndMark):

  • rendering/RenderObject.h:
  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::printPrefix):
(WebCore::SimpleLineLayout::showLineLayoutForFlow):

  • rendering/SimpleLineLayoutFunctions.h:
Location:
trunk/Source/WebCore
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r219215 r219216  
     12017-07-06  Zalan Bujtas  <zalan@apple.com>
     2
     3        Use WTFLogAlways for debug logging so that it shows up in device system logs
     4        https://bugs.webkit.org/show_bug.cgi?id=173450
     5
     6        Reviewed by Simon Fraser.
     7
     8        If you want to showRenderTree() on-device, the result doesn't show in system log so you can't see it.
     9        Switch to WTFLogAlways to fix this, for showRenderTree and its dependencies.
     10       
     11        * platform/text/TextStream.cpp:
     12        (WebCore::writeIndent):
     13        * rendering/InlineBox.cpp:
     14        (WebCore::InlineBox::showLineTreeAndMark):
     15        (WebCore::InlineBox::showLineBox):
     16        * rendering/InlineBox.h:
     17        * rendering/InlineFlowBox.cpp:
     18        (WebCore::InlineFlowBox::showLineTreeAndMark):
     19        * rendering/InlineFlowBox.h:
     20        * rendering/InlineTextBox.cpp:
     21        (WebCore::InlineTextBox::showLineBox):
     22        * rendering/InlineTextBox.h:
     23        * rendering/RenderBlockFlow.cpp:
     24        (WebCore::RenderBlockFlow::showLineTreeAndMark):
     25        * rendering/RenderBlockFlow.h:
     26        * rendering/RenderObject.cpp:
     27        (WebCore::showRenderTreeLegend):
     28        (WebCore::RenderObject::showRenderTreeForThis):
     29        (WebCore::RenderObject::showLineTreeForThis):
     30        (WebCore::RenderObject::showRegionsInformation):
     31        (WebCore::RenderObject::showRenderObject):
     32        (WebCore::RenderObject::showRenderSubTreeAndMark):
     33        * rendering/RenderObject.h:
     34        * rendering/SimpleLineLayoutFunctions.cpp:
     35        (WebCore::SimpleLineLayout::printPrefix):
     36        (WebCore::SimpleLineLayout::showLineLayoutForFlow):
     37        * rendering/SimpleLineLayoutFunctions.h:
     38
    1392017-07-06  Myles C. Maxfield  <mmaxfield@apple.com>
    240
  • trunk/Source/WebCore/platform/text/TextStream.cpp

    r208466 r219216  
    187187void writeIndent(TextStream& ts, int indent)
    188188{
    189     for (int i = 0; i != indent; ++i)
     189    for (int i = 0; i < indent; ++i)
    190190        ts << "  ";
    191191}
  • trunk/Source/WebCore/rendering/InlineBox.cpp

    r218879 r219216  
    2828#include "RenderLineBreak.h"
    2929#include "RootInlineBox.h"
     30#include "TextStream.h"
    3031
    3132#if ENABLE(TREE_DEBUGGING)
     
    101102}
    102103
    103 void InlineBox::showLineTreeAndMark(const InlineBox* markedBox, int depth) const
    104 {
    105     showLineBox(markedBox == this, depth);
    106 }
    107 
    108 void InlineBox::showLineBox(bool mark, int depth) const
    109 {
    110     fprintf(stderr, "-------- %c-", isDirty() ? 'D' : '-');
     104void InlineBox::outputLineTreeAndMark(TextStream& stream, const InlineBox* markedBox, int depth) const
     105{
     106    outputLineBox(stream, markedBox == this, depth);
     107}
     108
     109void InlineBox::outputLineBox(TextStream& stream, bool mark, int depth) const
     110{
     111    stream << "-------- " << (isDirty() ? "D" : "-") << "-";
    111112    int printedCharacters = 0;
    112113    if (mark) {
    113         fprintf(stderr, "*");
     114        stream << "*";
    114115        ++printedCharacters;
    115116    }
    116117    while (++printedCharacters <= depth * 2)
    117         fputc(' ', stderr);
    118     fprintf(stderr, "%s  (%.2f, %.2f) (%.2f, %.2f) (%p) renderer->(%p)\n", boxName(), x(), y(), width(), height(), this, &renderer());
     118        stream << " ";
     119    stream << boxName() << " " << FloatRect(x(), y(), width(), height()) << " (" << this << ") renderer->(" << &renderer() << ")";
     120    stream.nextLine();
    119121}
    120122
  • trunk/Source/WebCore/rendering/InlineBox.h

    r218950 r219216  
    7777    void showLineTreeForThis() const;
    7878   
    79     virtual void showLineTreeAndMark(const InlineBox* markedBox, int depth) const;
    80     virtual void showLineBox(bool mark, int depth) const;
     79    virtual void outputLineTreeAndMark(TextStream&, const InlineBox* markedBox, int depth) const;
     80    virtual void outputLineBox(TextStream&, bool mark, int depth) const;
    8181    virtual const char* boxName() const;
    8282#endif
  • trunk/Source/WebCore/rendering/InlineFlowBox.cpp

    r213634 r219216  
    17361736}
    17371737
    1738 void InlineFlowBox::showLineTreeAndMark(const InlineBox* markedBox, int depth) const
    1739 {
    1740     InlineBox::showLineTreeAndMark(markedBox, depth);
     1738void InlineFlowBox::outputLineTreeAndMark(TextStream& stream, const InlineBox* markedBox, int depth) const
     1739{
     1740    InlineBox::outputLineTreeAndMark(stream, markedBox, depth);
    17411741    for (const InlineBox* box = firstChild(); box; box = box->nextOnLine())
    1742         box->showLineTreeAndMark(markedBox, depth + 1);
     1742        box->outputLineTreeAndMark(stream, markedBox, depth + 1);
    17431743}
    17441744
  • trunk/Source/WebCore/rendering/InlineFlowBox.h

    r210758 r219216  
    7272
    7373#if ENABLE(TREE_DEBUGGING)
    74     void showLineTreeAndMark(const InlineBox* markedBox, int depth) const override;
     74    void outputLineTreeAndMark(TextStream&, const InlineBox* markedBox, int depth) const override;
    7575    const char* boxName() const override;
    7676#endif
  • trunk/Source/WebCore/rendering/InlineTextBox.cpp

    r219199 r219216  
    4949#include "TextPaintStyle.h"
    5050#include "TextPainter.h"
     51#include "TextStream.h"
    5152#include <stdio.h>
    5253#include <wtf/text/CString.h>
     
    11241125}
    11251126
    1126 void InlineTextBox::showLineBox(bool mark, int depth) const
    1127 {
    1128     fprintf(stderr, "-------- %c-", isDirty() ? 'D' : '-');
     1127void InlineTextBox::outputLineBox(TextStream& stream, bool mark, int depth) const
     1128{
     1129    stream << "-------- " << (isDirty() ? "D" : "-") << "-";
    11291130
    11301131    int printedCharacters = 0;
    11311132    if (mark) {
    1132         fprintf(stderr, "*");
     1133        stream << "*";
    11331134        ++printedCharacters;
    11341135    }
    11351136    while (++printedCharacters <= depth * 2)
    1136         fputc(' ', stderr);
     1137        stream << " ";
    11371138
    11381139    String value = renderer().text();
     
    11401141    value.replaceWithLiteral('\\', "\\\\");
    11411142    value.replaceWithLiteral('\n', "\\n");
    1142     fprintf(stderr, "%s  (%.2f, %.2f) (%.2f, %.2f) (%p) renderer->(%p) run(%d, %d) \"%s\"\n", boxName(), x(), y(), width(), height(), this, &renderer(), start(), start() + len(), value.utf8().data());
     1143    stream << boxName() << " " << FloatRect(x(), y(), width(), height()) << " (" << this << ") renderer->(" << &renderer() << ") run(" << start() << ", " << start() + len() << ") \"" << value.utf8().data() << "\"";
     1144    stream.nextLine();
    11431145}
    11441146
  • trunk/Source/WebCore/rendering/InlineTextBox.h

    r213614 r219216  
    9898
    9999#if ENABLE(TREE_DEBUGGING)
    100     void showLineBox(bool mark, int depth) const final;
     100    void outputLineBox(TextStream&, bool mark, int depth) const final;
    101101    const char* boxName() const final;
    102102#endif
  • trunk/Source/WebCore/rendering/RenderBlockFlow.cpp

    r217848 r219216  
    37703770
    37713771#if ENABLE(TREE_DEBUGGING)
    3772 void RenderBlockFlow::showLineTreeAndMark(const InlineBox* markedBox, int depth) const
     3772void RenderBlockFlow::outputLineTreeAndMark(TextStream& stream, const InlineBox* markedBox, int depth) const
    37733773{
    37743774    for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRootBox())
    3775         root->showLineTreeAndMark(markedBox, depth);
     3775        root->outputLineTreeAndMark(stream, markedBox, depth);
    37763776
    37773777    if (auto simpleLineLayout = this->simpleLineLayout())
    3778         SimpleLineLayout::showLineLayoutForFlow(*this, *simpleLineLayout, depth);
     3778        SimpleLineLayout::outputLineLayoutForFlow(stream, *this, *simpleLineLayout, depth);
    37793779}
    37803780#endif
  • trunk/Source/WebCore/rendering/RenderBlockFlow.h

    r214110 r219216  
    373373
    374374#if ENABLE(TREE_DEBUGGING)
    375     void showLineTreeAndMark(const InlineBox* markedBox, int depth) const;
     375    void outputLineTreeAndMark(TextStream&, const InlineBox* markedBox, int depth) const;
    376376#endif
    377377
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r218879 r219216  
    7070#include "SVGRenderSupport.h"
    7171#include "StyleResolver.h"
     72#include "TextStream.h"
    7273#include "TransformState.h"
    7374#include <algorithm>
     
    10081009#if ENABLE(TREE_DEBUGGING)
    10091010
    1010 static void showRenderTreeLegend()
    1011 {
    1012     fprintf(stderr, "\n(B)lock/(I)nline/I(N)line-block, (A)bsolute/Fi(X)ed/(R)elative/Stic(K)y, (F)loating, (O)verflow clip, Anon(Y)mous, (G)enerated, has(L)ayer, (C)omposited, (+)Dirty style, (+)Dirty layout\n");
     1011static void outputRenderTreeLegend(TextStream& stream)
     1012{
     1013    stream.nextLine();
     1014    stream << "(B)lock/(I)nline/I(N)line-block, (A)bsolute/Fi(X)ed/(R)elative/Stic(K)y, (F)loating, (O)verflow clip, Anon(Y)mous, (G)enerated, has(L)ayer, (C)omposited, (+)Dirty style, (+)Dirty layout";
     1015    stream.nextLine();
    10131016}
    10141017
     
    10251028    while (root->parent())
    10261029        root = root->parent();
    1027     showRenderTreeLegend();
    1028     root->showRenderSubTreeAndMark(this, 1);
     1030    TextStream stream(TextStream::LineMode::MultipleLine, TextStream::Formatting::SVGStyleRect);
     1031    outputRenderTreeLegend(stream);
     1032    root->outputRenderSubTreeAndMark(stream, this, 1);
     1033    WTFLogAlways("%s", stream.release().utf8().data());
    10291034}
    10301035
     
    10331038    if (!is<RenderBlockFlow>(*this))
    10341039        return;
    1035     showRenderTreeLegend();
    1036     showRenderObject(false, 1);
    1037     downcast<RenderBlockFlow>(*this).showLineTreeAndMark(nullptr, 2);
     1040    TextStream stream(TextStream::LineMode::MultipleLine, TextStream::Formatting::SVGStyleRect);
     1041    outputRenderTreeLegend(stream);
     1042    outputRenderObject(stream, false, 1);
     1043    downcast<RenderBlockFlow>(*this).outputLineTreeAndMark(stream, nullptr, 2);
     1044    WTFLogAlways("%s", stream.release().utf8().data());
    10381045}
    10391046
     
    10551062}
    10561063
    1057 void RenderObject::showRegionsInformation() const
     1064void RenderObject::outputRegionsInformation(TextStream& stream) const
    10581065{
    10591066    const RenderFlowThread* ftcb = flowThreadContainingBlockFromRenderer(this);
     
    10731080    RenderRegion* endRegion = nullptr;
    10741081    ftcb->getRegionRangeForBox(downcast<RenderBox>(this), startRegion, endRegion);
    1075     fprintf(stderr, " [Rs:%p Re:%p]", startRegion, endRegion);
    1076 }
    1077 
    1078 void RenderObject::showRenderObject(bool mark, int depth) const
     1082    stream << " [Rs:" << startRegion << " Re:" << endRegion << "]";
     1083}
     1084
     1085void RenderObject::outputRenderObject(TextStream& stream, bool mark, int depth) const
    10791086{
    10801087    if (isInlineBlockOrInlineTable())
    1081         fputc('N', stderr);
     1088        stream << "N";
    10821089    else if (isInline())
    1083         fputc('I', stderr);
     1090        stream << "I";
    10841091    else
    1085         fputc('B', stderr);
    1086    
     1092        stream << "B";
     1093
    10871094    if (isPositioned()) {
    10881095        if (isRelPositioned())
    1089             fputc('R', stderr);
     1096            stream << "R";
    10901097        else if (isStickyPositioned())
    1091             fputc('K', stderr);
     1098            stream << "K";
    10921099        else if (isOutOfFlowPositioned()) {
    10931100            if (style().position() == AbsolutePosition)
    1094                 fputc('A', stderr);
     1101                stream << "A";
    10951102            else
    1096                 fputc('X', stderr);
     1103                stream << "X";
    10971104        }
    10981105    } else
    1099         fputc('-', stderr);
     1106        stream << "-";
    11001107
    11011108    if (isFloating())
    1102         fputc('F', stderr);
     1109        stream << "F";
    11031110    else
    1104         fputc('-', stderr);
     1111        stream << "-";
    11051112
    11061113    if (hasOverflowClip())
    1107         fputc('O', stderr);
     1114        stream << "O";
    11081115    else
    1109         fputc('-', stderr);
     1116        stream << "-";
    11101117
    11111118    if (isAnonymous())
    1112         fputc('Y', stderr);
     1119        stream << "Y";
    11131120    else
    1114         fputc('-', stderr);
     1121        stream << "-";
    11151122
    11161123    if (isPseudoElement() || isAnonymous())
    1117         fputc('G', stderr);
     1124        stream << "G";
    11181125    else
    1119         fputc('-', stderr);
     1126        stream << "-";
    11201127
    11211128    if (hasLayer())
    1122         fputc('L', stderr);
     1129        stream << "L";
    11231130    else
    1124         fputc('-', stderr);
     1131        stream << "-";
    11251132
    11261133    if (isComposited())
    1127         fputc('C', stderr);
     1134        stream << "C";
    11281135    else
    1129         fputc('-', stderr);
    1130 
    1131     fputc(' ', stderr);
     1136        stream << "-";
     1137
     1138    stream << " ";
    11321139
    11331140    if (node() && node()->needsStyleRecalc())
    1134         fputc('+', stderr);
     1141        stream << "+";
    11351142    else
    1136         fputc('-', stderr);
     1143        stream << "-";
    11371144
    11381145    if (needsLayout())
    1139         fputc('+', stderr);
     1146        stream << "+";
    11401147    else
    1141         fputc('-', stderr);
     1148        stream << "-";
    11421149
    11431150    int printedCharacters = 0;
    11441151    if (mark) {
    1145         fprintf(stderr, "*");
     1152        stream << "*";
    11461153        ++printedCharacters;
    11471154    }
    11481155
    11491156    while (++printedCharacters <= depth * 2)
    1150         fputc(' ', stderr);
     1157        stream << " ";
    11511158
    11521159    if (node())
    1153         fprintf(stderr, "%s ", node()->nodeName().utf8().data());
     1160        stream << node()->nodeName().utf8().data() << " ";
    11541161
    11551162    String name = renderName();
     
    11571164    int pos = name.find('(');
    11581165    if (pos > 0)
    1159         fprintf(stderr, "%s", name.left(pos - 1).utf8().data());
     1166        stream << name.left(pos - 1).utf8().data();
    11601167    else
    1161         fprintf(stderr, "%s", name.utf8().data());
     1168        stream << name.utf8().data();
    11621169
    11631170    if (is<RenderBox>(*this)) {
     
    11661173        if (renderBox.isInFlowPositioned())
    11671174            boxRect.move(renderBox.offsetForInFlowPosition());
    1168         fprintf(stderr, "  (%.2f, %.2f) (%.2f, %.2f)", boxRect.x(), boxRect.y(), boxRect.width(), boxRect.height());
     1175        stream << " " << boxRect;
    11691176    } else if (is<RenderInline>(*this) && isInFlowPositioned()) {
    11701177        FloatSize inlineOffset = downcast<RenderInline>(*this).offsetForInFlowPosition();
    1171         fprintf(stderr, "  (%.2f, %.2f)", inlineOffset.width(), inlineOffset.height());
    1172     }
    1173 
    1174     fprintf(stderr, " renderer->(%p)", this);
     1178        stream << "  (" << inlineOffset.width() << ", " << inlineOffset.height() << ")";
     1179    }
     1180
     1181    stream << " renderer->(" << this << ")";
    11751182    if (node()) {
    1176         fprintf(stderr, " node->(%p)", node());
     1183        stream << " node->(" << node() << ")";
    11771184        if (node()->isTextNode()) {
    11781185            String value = node()->nodeValue();
    1179             fprintf(stderr, " length->(%u)", value.length());
     1186            stream << " length->(" << value.length() << ")";
    11801187
    11811188            value.replaceWithLiteral('\\', "\\\\");
     
    11851192            if (value.length() > maxPrintedLength) {
    11861193                String substring = value.substring(0, maxPrintedLength);
    1187                 fprintf(stderr, " \"%s\"...", substring.utf8().data());
     1194                stream << " \"" << substring.utf8().data() << "\"...";
    11881195            } else
    1189                 fprintf(stderr, " \"%s\"", value.utf8().data());
     1196                stream << " \"" << value.utf8().data() << "\"";
    11901197        }
    11911198    }
     
    11931200        auto& renderer = downcast<RenderBoxModelObject>(*this);
    11941201        if (renderer.hasContinuation())
    1195             fprintf(stderr, " continuation->(%p)", renderer.continuation());
    1196     }
    1197     showRegionsInformation();
     1202            stream << " continuation->(" << renderer.continuation() << ")";
     1203    }
     1204    outputRegionsInformation(stream);
    11981205    if (needsLayout()) {
    1199         fprintf(stderr, " layout->");
     1206        stream << " layout->";
    12001207        if (selfNeedsLayout())
    1201             fprintf(stderr, "[self]");
     1208            stream << "[self]";
    12021209        if (normalChildNeedsLayout())
    1203             fprintf(stderr, "[normal child]");
     1210            stream << "[normal child]";
    12041211        if (posChildNeedsLayout())
    1205             fprintf(stderr, "[positioned child]");
     1212            stream << "[positioned child]";
    12061213        if (needsSimplifiedNormalFlowLayout())
    1207             fprintf(stderr, "[simplified]");
     1214            stream << "[simplified]";
    12081215        if (needsPositionedMovementLayout())
    1209             fprintf(stderr, "[positioned movement]");
    1210     }
    1211     fprintf(stderr, "\n");
    1212 }
    1213 
    1214 void RenderObject::showRenderSubTreeAndMark(const RenderObject* markedObject, int depth) const
    1215 {
    1216     showRenderObject(markedObject == this, depth);
     1216            stream << "[positioned movement]";
     1217    }
     1218    stream.nextLine();
     1219}
     1220
     1221void RenderObject::outputRenderSubTreeAndMark(TextStream& stream, const RenderObject* markedObject, int depth) const
     1222{
     1223    outputRenderObject(stream, markedObject == this, depth);
    12171224    if (is<RenderBlockFlow>(*this))
    1218         downcast<RenderBlockFlow>(*this).showLineTreeAndMark(nullptr, depth + 1);
    1219 
    1220     for (const RenderObject* child = firstChildSlow(); child; child = child->nextSibling())
    1221         child->showRenderSubTreeAndMark(markedObject, depth + 1);
     1225        downcast<RenderBlockFlow>(*this).outputLineTreeAndMark(stream, nullptr, depth + 1);
     1226
     1227    for (auto* child = firstChildSlow(); child; child = child->nextSibling())
     1228        child->outputRenderSubTreeAndMark(stream, markedObject, depth + 1);
    12221229}
    12231230
  • trunk/Source/WebCore/rendering/RenderObject.h

    r218793 r219216  
    206206    void showLineTreeForThis() const;
    207207
    208     void showRenderObject(bool mark, int depth) const;
    209     void showRenderSubTreeAndMark(const RenderObject* markedObject, int depth) const;
    210     void showRegionsInformation() const;
     208    void outputRenderObject(TextStream&, bool mark, int depth) const;
     209    void outputRenderSubTreeAndMark(TextStream&, const RenderObject* markedObject, int depth) const;
     210    void outputRegionsInformation(TextStream&) const;
    211211#endif
    212212
  • trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp

    r218879 r219216  
    4747#include "TextPaintStyle.h"
    4848#include "TextPainter.h"
     49#include "TextStream.h"
    4950
    5051#if ENABLE(TREE_DEBUGGING)
     
    262263
    263264#if ENABLE(TREE_DEBUGGING)
    264 static void printPrefix(int& printedCharacters, int depth)
    265 {
    266     fprintf(stderr, "-------- --");
     265static void printPrefix(TextStream& stream, int& printedCharacters, int depth)
     266{
     267    stream << "-------- --";
    267268    printedCharacters = 0;
    268269    while (++printedCharacters <= depth * 2)
    269         fputc(' ', stderr);
    270 }
    271 
    272 void showLineLayoutForFlow(const RenderBlockFlow& flow, const Layout& layout, int depth)
     270        stream << " ";
     271}
     272
     273void outputLineLayoutForFlow(TextStream& stream, const RenderBlockFlow& flow, const Layout& layout, int depth)
    273274{
    274275    int printedCharacters = 0;
    275     printPrefix(printedCharacters, depth);
    276 
    277     fprintf(stderr, "SimpleLineLayout (%u lines, %u runs) (%p)\n", layout.lineCount(), layout.runCount(), &layout);
     276    printPrefix(stream, printedCharacters, depth);
     277
     278    stream << "SimpleLineLayout (" << layout.lineCount() << " lines, " << layout.runCount() << " runs) (" << &layout << ")";
     279    stream.nextLine();
    278280    ++depth;
    279281
    280282    for (auto run : runResolver(flow, layout)) {
    281283        FloatRect rect = run.rect();
    282         printPrefix(printedCharacters, depth);
     284        printPrefix(stream, printedCharacters, depth);
    283285        if (run.start() < run.end()) {
    284             fprintf(stderr, "line %u run(%u, %u) (%.2f, %.2f) (%.2f, %.2f) \"%s\"\n", run.lineIndex(), run.start(), run.end(),
    285                 rect.x(), rect.y(), rect.width(), rect.height(), run.text().toStringWithoutCopying().utf8().data());
     286            stream << "line " << run.lineIndex() << " run(" << run.start() << ", " << run.end() << ") " << rect << " \"" << run.text().toStringWithoutCopying().utf8().data() << "\"";
    286287        } else {
    287288            ASSERT(run.start() == run.end());
    288             fprintf(stderr, "line break %u run(%u, %u) (%.2f, %.2f) (%.2f, %.2f)\n", run.lineIndex(), run.start(), run.end(), rect.x(), rect.y(), rect.width(), rect.height());
    289         }
    290     }
     289            stream << "line break " << run.lineIndex() << " run(" << run.start() << ", " << run.end() << ") " << rect;
     290        }
     291    }
     292    stream.nextLine();
    291293}
    292294#endif
  • trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.h

    r218793 r219216  
    6868
    6969#if ENABLE(TREE_DEBUGGING)
    70 void showLineLayoutForFlow(const RenderBlockFlow&, const Layout&, int depth);
     70void outputLineLayoutForFlow(TextStream&, const RenderBlockFlow&, const Layout&, int depth);
    7171#endif
    7272
Note: See TracChangeset for help on using the changeset viewer.