Changeset 218373 in webkit


Ignore:
Timestamp:
Jun 15, 2017, 6:39:31 PM (8 years ago)
Author:
Simon Fraser
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 Tim Horton.

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 all the debug logging in WebCore.

Also WKError () -> WKError() in the old WAK code, to allow for easier searching pending cleanup.

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::~AudioContext):

  • Modules/webaudio/AudioNode.cpp:

(WebCore::AudioNode::~AudioNode):
(WebCore::AudioNode::ref):
(WebCore::AudioNode::finishDeref):
(WebCore::AudioNode::printNodeCounts):

  • bridge/objc/objc_instance.mm:

(ObjcInstance::invokeObjcMethod):

  • bridge/objc/objc_utility.mm:

(JSC::Bindings::convertObjcValueToValue):

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::showStyle):

  • dom/DocumentMarkerController.cpp:

(DocumentMarkerController::showMarkers):

  • dom/Node.cpp:

(WebCore::Node::showNode):
(WebCore::Node::showNodePathForThis):
(WebCore::traverseTreeAndMark):

  • dom/Position.cpp:

(WebCore::Position::debugPosition):
(WebCore::Position::showAnchorTypeAndOffset):

  • dom/Range.cpp:

(showTree):

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::debugRenderer):

  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::debugPosition):

  • editing/VisibleSelection.cpp:

(WebCore::VisibleSelection::debugPosition):

  • history/HistoryItem.cpp:

(WebCore::HistoryItem::showTreeWithIndent):

  • html/parser/HTMLFormattingElementList.cpp:

(WebCore::HTMLFormattingElementList::show):

  • inspector/DOMPatchSupport.cpp:

(WebCore::DOMPatchSupport::dumpMap):

  • page/scrolling/ScrollingStateTree.cpp:

(showScrollingStateTree):

  • platform/audio/ios/AudioDestinationIOS.cpp:

(WebCore::AudioDestinationIOS::frameSizeChangedProc):

  • platform/graphics/GraphicsLayer.cpp:

(showGraphicsLayerTree):

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::dump):

  • platform/ios/wak/WAKView.mm:

(+[WAKView _wrapperForViewRef:]):
(-[WAKView displayRect:]):
(-[WAKView displayRectIgnoringOpacity:inContext:]):

  • platform/ios/wak/WKUtilities.c:

(WKRelease):

  • platform/ios/wak/WKView.mm:

(_WKViewSetViewContext):
(WKViewGetBounds):
(WKViewGetFrame):
(_WKViewRecursivelyInvalidateGState):
(WKViewSetFrameOrigin):
(WKViewSetFrameSize):
(WKViewGetWindow):
(WKViewGetSubviews):
(WKViewAddSubview):
(WKViewRemoveFromSuperview):
(WKViewFirstChild):
(WKViewNextSibling):
(WKViewTraverseNext):
(WKViewGetVisibleRect):
(WKViewConvertRectToSuperview):
(WKViewConvertRectToBase):
(WKViewConvertPointToSuperview):
(WKViewConvertPointFromSuperview):
(WKViewConvertPointToBase):
(_WKViewGetAncestorViewsIncludingView):
(WKViewConvertPointFromBase):
(WKViewConvertRectFromSuperview):
(WKViewConvertRectFromBase):
(WKViewGetAutoresizingMask):
(WKViewSetAutoresizingMask):

  • platform/text/TextEncodingRegistry.cpp:

(WebCore::dumpTextEncodingNameMap):

  • rendering/CounterNode.cpp:

(WebCore::showTreeAndMark):

  • rendering/InlineBox.cpp:

(WebCore::InlineBox::showLineBox):

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::showLineBox):

  • rendering/RenderCounter.cpp:

(showCounterRendererTree):

  • rendering/RenderLayer.cpp:

(WebCore::showLayerTree):

  • rendering/RenderObject.cpp:

(WebCore::showRenderTreeLegend):
(WebCore::RenderObject::showRegionsInformation):
(WebCore::RenderObject::showRenderObject):
(WebCore::printRenderTreeForLiveDocuments):
(WebCore::printLayerTreeForLiveDocuments):

  • rendering/SimpleLineLayoutFunctions.cpp:

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

  • rendering/svg/SVGResources.cpp:

(WebCore::SVGResources::dump):

  • rendering/svg/SVGResourcesCycleSolver.cpp:

(WebCore::SVGResourcesCycleSolver::resolveCycles):

  • rendering/svg/SVGTextLayoutAttributes.cpp:

(WebCore::dumpSVGCharacterDataMapValue):
(WebCore::SVGTextLayoutAttributes::dump):

  • rendering/svg/SVGTextLayoutEngine.cpp:

(WebCore::dumpTextBoxes):
(WebCore::SVGTextLayoutEngine::finishLayout):

Location:
trunk/Source/WebCore
Files:
35 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r218372 r218373  
     12017-06-15  Simon Fraser  <simon.fraser@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 Tim Horton.
     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 all the debug logging in WebCore.
     10       
     11        Also WKError () -> WKError() in the old WAK code, to allow for easier searching pending cleanup.
     12
     13        * Modules/webaudio/AudioContext.cpp:
     14        (WebCore::AudioContext::~AudioContext):
     15        * Modules/webaudio/AudioNode.cpp:
     16        (WebCore::AudioNode::~AudioNode):
     17        (WebCore::AudioNode::ref):
     18        (WebCore::AudioNode::finishDeref):
     19        (WebCore::AudioNode::printNodeCounts):
     20        * bridge/objc/objc_instance.mm:
     21        (ObjcInstance::invokeObjcMethod):
     22        * bridge/objc/objc_utility.mm:
     23        (JSC::Bindings::convertObjcValueToValue):
     24        * css/StyleProperties.cpp:
     25        (WebCore::StyleProperties::showStyle):
     26        * dom/DocumentMarkerController.cpp:
     27        (DocumentMarkerController::showMarkers):
     28        * dom/Node.cpp:
     29        (WebCore::Node::showNode):
     30        (WebCore::Node::showNodePathForThis):
     31        (WebCore::traverseTreeAndMark):
     32        * dom/Position.cpp:
     33        (WebCore::Position::debugPosition):
     34        (WebCore::Position::showAnchorTypeAndOffset):
     35        * dom/Range.cpp:
     36        (showTree):
     37        * editing/FrameSelection.cpp:
     38        (WebCore::FrameSelection::debugRenderer):
     39        * editing/VisiblePosition.cpp:
     40        (WebCore::VisiblePosition::debugPosition):
     41        * editing/VisibleSelection.cpp:
     42        (WebCore::VisibleSelection::debugPosition):
     43        * history/HistoryItem.cpp:
     44        (WebCore::HistoryItem::showTreeWithIndent):
     45        * html/parser/HTMLFormattingElementList.cpp:
     46        (WebCore::HTMLFormattingElementList::show):
     47        * inspector/DOMPatchSupport.cpp:
     48        (WebCore::DOMPatchSupport::dumpMap):
     49        * page/scrolling/ScrollingStateTree.cpp:
     50        (showScrollingStateTree):
     51        * platform/audio/ios/AudioDestinationIOS.cpp:
     52        (WebCore::AudioDestinationIOS::frameSizeChangedProc):
     53        * platform/graphics/GraphicsLayer.cpp:
     54        (showGraphicsLayerTree):
     55        * platform/graphics/displaylists/DisplayList.cpp:
     56        (WebCore::DisplayList::DisplayList::dump):
     57        * platform/ios/wak/WAKView.mm:
     58        (+[WAKView _wrapperForViewRef:]):
     59        (-[WAKView displayRect:]):
     60        (-[WAKView displayRectIgnoringOpacity:inContext:]):
     61        * platform/ios/wak/WKUtilities.c:
     62        (WKRelease):
     63        * platform/ios/wak/WKView.mm:
     64        (_WKViewSetViewContext):
     65        (WKViewGetBounds):
     66        (WKViewGetFrame):
     67        (_WKViewRecursivelyInvalidateGState):
     68        (WKViewSetFrameOrigin):
     69        (WKViewSetFrameSize):
     70        (WKViewGetWindow):
     71        (WKViewGetSubviews):
     72        (WKViewAddSubview):
     73        (WKViewRemoveFromSuperview):
     74        (WKViewFirstChild):
     75        (WKViewNextSibling):
     76        (WKViewTraverseNext):
     77        (WKViewGetVisibleRect):
     78        (WKViewConvertRectToSuperview):
     79        (WKViewConvertRectToBase):
     80        (WKViewConvertPointToSuperview):
     81        (WKViewConvertPointFromSuperview):
     82        (WKViewConvertPointToBase):
     83        (_WKViewGetAncestorViewsIncludingView):
     84        (WKViewConvertPointFromBase):
     85        (WKViewConvertRectFromSuperview):
     86        (WKViewConvertRectFromBase):
     87        (WKViewGetAutoresizingMask):
     88        (WKViewSetAutoresizingMask):
     89        * platform/text/TextEncodingRegistry.cpp:
     90        (WebCore::dumpTextEncodingNameMap):
     91        * rendering/CounterNode.cpp:
     92        (WebCore::showTreeAndMark):
     93        * rendering/InlineBox.cpp:
     94        (WebCore::InlineBox::showLineBox):
     95        * rendering/InlineTextBox.cpp:
     96        (WebCore::InlineTextBox::showLineBox):
     97        * rendering/RenderCounter.cpp:
     98        (showCounterRendererTree):
     99        * rendering/RenderLayer.cpp:
     100        (WebCore::showLayerTree):
     101        * rendering/RenderObject.cpp:
     102        (WebCore::showRenderTreeLegend):
     103        (WebCore::RenderObject::showRegionsInformation):
     104        (WebCore::RenderObject::showRenderObject):
     105        (WebCore::printRenderTreeForLiveDocuments):
     106        (WebCore::printLayerTreeForLiveDocuments):
     107        * rendering/SimpleLineLayoutFunctions.cpp:
     108        (WebCore::SimpleLineLayout::printPrefix):
     109        (WebCore::SimpleLineLayout::showLineLayoutForFlow):
     110        * rendering/svg/SVGResources.cpp:
     111        (WebCore::SVGResources::dump):
     112        * rendering/svg/SVGResourcesCycleSolver.cpp:
     113        (WebCore::SVGResourcesCycleSolver::resolveCycles):
     114        * rendering/svg/SVGTextLayoutAttributes.cpp:
     115        (WebCore::dumpSVGCharacterDataMapValue):
     116        (WebCore::SVGTextLayoutAttributes::dump):
     117        * rendering/svg/SVGTextLayoutEngine.cpp:
     118        (WebCore::dumpTextBoxes):
     119        (WebCore::SVGTextLayoutEngine::finishLayout):
     120
    11212017-06-15  Myles C. Maxfield  <mmaxfield@apple.com>
    2122
  • trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp

    r218016 r218373  
    191191{
    192192#if DEBUG_AUDIONODE_REFERENCES
    193     fprintf(stderr, "%p: AudioContext::~AudioContext()\n", this);
     193    WTFLogAlways("%p: AudioContext::~AudioContext()\n", this);
    194194#endif
    195195    ASSERT(!m_isInitialized);
  • trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp

    r214620 r218373  
    7171#if DEBUG_AUDIONODE_REFERENCES
    7272    --s_nodeCount[nodeType()];
    73     fprintf(stderr, "%p: %d: AudioNode::~AudioNode() %d %d\n", this, nodeType(), m_normalRefCount.load(), m_connectionRefCount);
     73    WTFLogAlways("%p: %d: AudioNode::~AudioNode() %d %d\n", this, nodeType(), m_normalRefCount.load(), m_connectionRefCount);
    7474#endif
    7575}
     
    405405
    406406#if DEBUG_AUDIONODE_REFERENCES
    407     fprintf(stderr, "%p: %d: AudioNode::ref(%d) %d %d\n", this, nodeType(), refType, m_normalRefCount, m_connectionRefCount);
     407    WTFLogAlways("%p: %d: AudioNode::ref(%d) %d %d\n", this, nodeType(), refType, m_normalRefCount, m_connectionRefCount);
    408408#endif
    409409
     
    468468   
    469469#if DEBUG_AUDIONODE_REFERENCES
    470     fprintf(stderr, "%p: %d: AudioNode::deref(%d) %d %d\n", this, nodeType(), refType, m_normalRefCount, m_connectionRefCount);
     470    WTFLogAlways("%p: %d: AudioNode::deref(%d) %d %d\n", this, nodeType(), refType, m_normalRefCount, m_connectionRefCount);
    471471#endif
    472472
     
    494494void AudioNode::printNodeCounts()
    495495{
    496     fprintf(stderr, "\n\n");
    497     fprintf(stderr, "===========================\n");
    498     fprintf(stderr, "AudioNode: reference counts\n");
    499     fprintf(stderr, "===========================\n");
     496    WTFLogAlways("\n\n");
     497    WTFLogAlways("===========================\n");
     498    WTFLogAlways("AudioNode: reference counts\n");
     499    WTFLogAlways("===========================\n");
    500500
    501501    for (unsigned i = 0; i < NodeTypeEnd; ++i)
    502         fprintf(stderr, "%d: %d\n", i, s_nodeCount[i]);
    503 
    504     fprintf(stderr, "===========================\n\n\n");
     502        WTFLogAlways("%d: %d\n", i, s_nodeCount[i]);
     503
     504    WTFLogAlways("===========================\n\n\n");
    505505}
    506506
  • trunk/Source/WebCore/bridge/objc/objc_instance.mm

    r217108 r218373  
    4242#import <wtf/ThreadSpecific.h>
    4343
    44 #ifdef NDEBUG
    45 #define OBJC_LOG(formatAndArgs...) ((void)0)
    46 #else
    47 #define OBJC_LOG(formatAndArgs...) { \
    48     fprintf (stderr, "%s:%d -- %s:  ", __FILE__, __LINE__, __FUNCTION__); \
    49     fprintf(stderr, formatAndArgs); \
    50 }
    51 #endif
    52 
    5344using namespace JSC::Bindings;
    5445using namespace JSC;
     
    303294                    // the assert above should have fired in the impossible case
    304295                    // of an invalid type anyway).
    305                     fprintf(stderr, "%s: invalid type (%d)\n", __PRETTY_FUNCTION__, (int)objcValueType);
     296                    WTFLogAlways("%s: invalid type (%d)\n", __PRETTY_FUNCTION__, (int)objcValueType);
    306297                    ASSERT_NOT_REACHED();
    307298            }
  • trunk/Source/WebCore/bridge/objc/objc_utility.mm

    r205198 r218373  
    230230        default:
    231231            // Should never get here. Argument types are filtered.
    232             fprintf(stderr, "%s: invalid type (%d)\n", __PRETTY_FUNCTION__, (int)type);
     232            WTFLogAlways("%s: invalid type (%d)\n", __PRETTY_FUNCTION__, (int)type);
    233233            ASSERT_NOT_REACHED();
    234234    }
  • trunk/Source/WebCore/css/StyleProperties.cpp

    r216829 r218373  
    13641364void StyleProperties::showStyle()
    13651365{
    1366     fprintf(stderr, "%s\n", asText().ascii().data());
     1366    WTFLogAlways("%s\n", asText().ascii().data());
    13671367}
    13681368#endif
  • trunk/Source/WebCore/dom/DocumentMarkerController.cpp

    r216212 r218373  
    819819void DocumentMarkerController::showMarkers() const
    820820{
    821     fprintf(stderr, "%d nodes have markers:\n", m_markers.size());
     821    WTFLogAlways("%d nodes have markers:\n", m_markers.size());
    822822    for (auto& marker : m_markers) {
    823823        Node* node = marker.key.get();
    824         fprintf(stderr, "%p", node);
     824        WTFLogAlways("%p", node);
    825825        for (auto& documentMarker : *marker.value)
    826             fprintf(stderr, " %d:[%d:%d](%d)", documentMarker.type(), documentMarker.startOffset(), documentMarker.endOffset(), documentMarker.isActiveMatch());
    827 
    828         fprintf(stderr, "\n");
     826            WTFLogAlways(" %d:[%d:%d](%d)", documentMarker.type(), documentMarker.startOffset(), documentMarker.endOffset(), documentMarker.isActiveMatch());
     827
     828        WTFLogAlways("\n");
    829829    }
    830830}
  • trunk/Source/WebCore/dom/Node.cpp

    r218083 r218373  
    17301730        value.replaceWithLiteral('\\', "\\\\");
    17311731        value.replaceWithLiteral('\n', "\\n");
    1732         fprintf(stderr, "%s%s\t%p \"%s\"\n", prefix, nodeName().utf8().data(), this, value.utf8().data());
     1732        WTFLogAlways("%s%s\t%p \"%s\"\n", prefix, nodeName().utf8().data(), this, value.utf8().data());
    17331733    } else {
    17341734        StringBuilder attrs;
    17351735        appendAttributeDesc(this, attrs, classAttr, " CLASS=");
    17361736        appendAttributeDesc(this, attrs, styleAttr, " STYLE=");
    1737         fprintf(stderr, "%s%s\t%p (renderer %p) %s%s%s\n", prefix, nodeName().utf8().data(), this, renderer(), attrs.toString().utf8().data(), needsStyleRecalc() ? " (needs style recalc)" : "", childNeedsStyleRecalc() ? " (child needs style recalc)" : "");
     1737        WTFLogAlways("%s%s\t%p (renderer %p) %s%s%s\n", prefix, nodeName().utf8().data(), this, renderer(), attrs.toString().utf8().data(), needsStyleRecalc() ? " (needs style recalc)" : "", childNeedsStyleRecalc() ? " (child needs style recalc)" : "");
    17381738    }
    17391739}
     
    17581758            for (const ShadowRoot* shadowRoot = downcast<ShadowRoot>(node); shadowRoot && shadowRoot != node; shadowRoot = shadowRoot->shadowRoot())
    17591759                ++count;
    1760             fprintf(stderr, "/#shadow-root[%d]", count);
     1760            WTFLogAlways("/#shadow-root[%d]", count);
    17611761            continue;
    17621762        }
     
    17641764        switch (node->nodeType()) {
    17651765        case ELEMENT_NODE: {
    1766             fprintf(stderr, "/%s", node->nodeName().utf8().data());
     1766            WTFLogAlways("/%s", node->nodeName().utf8().data());
    17671767
    17681768            const Element& element = downcast<Element>(*node);
     
    17751775                        ++count;
    17761776                if (hasIdAttr)
    1777                     fprintf(stderr, "[@id=\"%s\" and position()=%d]", idattr.string().utf8().data(), count);
     1777                    WTFLogAlways("[@id=\"%s\" and position()=%d]", idattr.string().utf8().data(), count);
    17781778                else
    1779                     fprintf(stderr, "[%d]", count);
     1779                    WTFLogAlways("[%d]", count);
    17801780            } else if (hasIdAttr)
    1781                 fprintf(stderr, "[@id=\"%s\"]", idattr.string().utf8().data());
     1781                WTFLogAlways("[@id=\"%s\"]", idattr.string().utf8().data());
    17821782            break;
    17831783        }
    17841784        case TEXT_NODE:
    1785             fprintf(stderr, "/text()");
     1785            WTFLogAlways("/text()");
    17861786            break;
    17871787        case ATTRIBUTE_NODE:
    1788             fprintf(stderr, "/@%s", node->nodeName().utf8().data());
     1788            WTFLogAlways("/@%s", node->nodeName().utf8().data());
    17891789            break;
    17901790        default:
     
    17921792        }
    17931793    }
    1794     fprintf(stderr, "\n");
     1794    WTFLogAlways("\n");
    17951795}
    17961796
     
    17991799    for (const Node* node = rootNode; node; node = NodeTraversal::next(*node)) {
    18001800        if (node == markedNode1)
    1801             fprintf(stderr, "%s", markedLabel1);
     1801            WTFLogAlways("%s", markedLabel1);
    18021802        if (node == markedNode2)
    1803             fprintf(stderr, "%s", markedLabel2);
     1803            WTFLogAlways("%s", markedLabel2);
    18041804
    18051805        StringBuilder indent;
     
    18071807        for (const Node* tmpNode = node; tmpNode && tmpNode != rootNode; tmpNode = tmpNode->parentOrShadowHostNode())
    18081808            indent.append('\t');
    1809         fprintf(stderr, "%s", indent.toString().utf8().data());
     1809        WTFLogAlways("%s", indent.toString().utf8().data());
    18101810        node->showNode();
    18111811        indent.append('\t');
  • trunk/Source/WebCore/dom/Position.cpp

    r215094 r218373  
    13991399{
    14001400    if (isNull())
    1401         fprintf(stderr, "Position [%s]: null\n", msg);
     1401        WTFLogAlways("Position [%s]: null\n", msg);
    14021402    else
    1403         fprintf(stderr, "Position [%s]: %s [%p] at %d\n", msg, deprecatedNode()->nodeName().utf8().data(), deprecatedNode(), m_offset);
     1403        WTFLogAlways("Position [%s]: %s [%p] at %d\n", msg, deprecatedNode()->nodeName().utf8().data(), deprecatedNode(), m_offset);
    14041404}
    14051405
     
    14431443        break;
    14441444    }
    1445     fprintf(stderr, ", offset:%d\n", m_offset);
     1445    WTFLogAlways(", offset:%d\n", m_offset);
    14461446}
    14471447
  • trunk/Source/WebCore/dom/Range.cpp

    r217576 r218373  
    18381838    if (range && range->boundaryPointsValid()) {
    18391839        range->startContainer().showTreeAndMark(&range->startContainer(), "S", &range->endContainer(), "E");
    1840         fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset(), range->endOffset());
     1840        WTFLogAlways("start offset: %d, end offset: %d\n", range->startOffset(), range->endOffset());
    18411841    }
    18421842}
  • trunk/Source/WebCore/editing/FrameSelection.cpp

    r217439 r218373  
    17541754    if (is<Element>(*renderer->node())) {
    17551755        Element& element = downcast<Element>(*renderer->node());
    1756         fprintf(stderr, "%s%s\n", selected ? "==> " : "    ", element.localName().string().utf8().data());
     1756        WTFLogAlways("%s%s\n", selected ? "==> " : "    ", element.localName().string().utf8().data());
    17571757    } else if (is<RenderText>(*renderer)) {
    17581758        RenderText& textRenderer = downcast<RenderText>(*renderer);
    17591759        if (!textRenderer.textLength() || !textRenderer.firstTextBox()) {
    1760             fprintf(stderr, "%s#text (empty)\n", selected ? "==> " : "    ");
     1760            WTFLogAlways("%s#text (empty)\n", selected ? "==> " : "    ");
    17611761            return;
    17621762        }
     
    18001800            show.replace('\n', ' ');
    18011801            show.replace('\r', ' ');
    1802             fprintf(stderr, "==> #text : \"%s\" at offset %d\n", show.utf8().data(), pos);
    1803             fprintf(stderr, "           ");
     1802            WTFLogAlways("==> #text : \"%s\" at offset %d\n", show.utf8().data(), pos);
     1803            WTFLogAlways("           ");
    18041804            for (int i = 0; i < caret; i++)
    1805                 fprintf(stderr, " ");
    1806             fprintf(stderr, "^\n");
     1805                WTFLogAlways(" ");
     1806            WTFLogAlways("^\n");
    18071807        } else {
    18081808            if ((int)text.length() > max)
     
    18101810            else
    18111811                text = text.left(max);
    1812             fprintf(stderr, "    #text : \"%s\"\n", text.utf8().data());
     1812            WTFLogAlways("    #text : \"%s\"\n", text.utf8().data());
    18131813        }
    18141814    }
  • trunk/Source/WebCore/editing/VisiblePosition.cpp

    r213355 r218373  
    690690{
    691691    if (isNull())
    692         fprintf(stderr, "Position [%s]: null\n", msg);
     692        WTFLogAlways("Position [%s]: null\n", msg);
    693693    else {
    694         fprintf(stderr, "Position [%s]: %s, ", msg, m_deepPosition.deprecatedNode()->nodeName().utf8().data());
     694        WTFLogAlways("Position [%s]: %s, ", msg, m_deepPosition.deprecatedNode()->nodeName().utf8().data());
    695695        m_deepPosition.showAnchorTypeAndOffset();
    696696    }
  • trunk/Source/WebCore/editing/VisibleSelection.cpp

    r213355 r218373  
    672672void VisibleSelection::debugPosition() const
    673673{
    674     fprintf(stderr, "VisibleSelection ===============\n");
     674    WTFLogAlways("VisibleSelection ===============\n");
    675675
    676676    if (!m_start.anchorNode())
    677677        fputs("pos:   null", stderr);
    678678    else if (m_start == m_end) {
    679         fprintf(stderr, "pos:   %s ", m_start.anchorNode()->nodeName().utf8().data());
     679        WTFLogAlways("pos:   %s ", m_start.anchorNode()->nodeName().utf8().data());
    680680        m_start.showAnchorTypeAndOffset();
    681681    } else {
    682         fprintf(stderr, "start: %s ", m_start.anchorNode()->nodeName().utf8().data());
     682        WTFLogAlways("start: %s ", m_start.anchorNode()->nodeName().utf8().data());
    683683        m_start.showAnchorTypeAndOffset();
    684         fprintf(stderr, "end:   %s ", m_end.anchorNode()->nodeName().utf8().data());
     684        WTFLogAlways("end:   %s ", m_end.anchorNode()->nodeName().utf8().data());
    685685        m_end.showAnchorTypeAndOffset();
    686686    }
    687687
    688     fprintf(stderr, "================================\n");
     688    WTFLogAlways("================================\n");
    689689}
    690690
  • trunk/Source/WebCore/history/HistoryItem.cpp

    r217867 r218373  
    495495    prefix.append("\0", 1);
    496496
    497     fprintf(stderr, "%s+-%s (%p)\n", prefix.data(), m_urlString.utf8().data(), this);
     497    WTFLogAlways("%s+-%s (%p)\n", prefix.data(), m_urlString.utf8().data(), this);
    498498   
    499499    int totalSubItems = 0;
  • trunk/Source/WebCore/html/parser/HTMLFormattingElementList.cpp

    r200340 r218373  
    203203        const Entry& entry = m_entries[m_entries.size() - i];
    204204        if (entry.isMarker())
    205             fprintf(stderr, "marker\n");
     205            WTFLogAlways("marker\n");
    206206        else
    207207            entry.element().showNode();
  • trunk/Source/WebCore/inspector/DOMPatchSupport.cpp

    r216883 r218373  
    506506void DOMPatchSupport::dumpMap(const ResultMap& map, const String& name)
    507507{
    508     fprintf(stderr, "\n\n");
     508    WTFLogAlways("\n\n");
    509509    for (size_t i = 0; i < map.size(); ++i)
    510         fprintf(stderr, "%s[%lu]: %s (%p) - [%lu]\n", name.utf8().data(), i, map[i].first ? nodeName(map[i].first->m_node).utf8().data() : "", map[i].first, map[i].second);
     510        WTFLogAlways("%s[%lu]: %s (%p) - [%lu]\n", name.utf8().data(), i, map[i].first ? nodeName(map[i].first->m_node).utf8().data() : "", map[i].first, map[i].second);
    511511}
    512512
  • trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp

    r216103 r218373  
    273273    auto rootNode = tree->rootStateNode();
    274274    if (!rootNode) {
    275         fprintf(stderr, "Scrolling state tree %p with no root node\n", tree);
     275        WTFLogAlways("Scrolling state tree %p with no root node\n", tree);
    276276        return;
    277277    }
    278278
    279279    String output = rootNode->scrollingStateTreeAsText(WebCore::ScrollingStateTreeAsTextBehaviorDebug);
    280     fprintf(stderr, "%s\n", output.utf8().data());
     280    WTFLogAlways("%s\n", output.utf8().data());
    281281}
    282282
  • trunk/Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp

    r210697 r218373  
    269269    UInt32 dataSize = sizeof(bufferSize);
    270270    AudioUnitGetProperty(audioOutput->m_outputUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 0, (void*)&bufferSize, &dataSize);
    271     fprintf(stderr, ">>>> frameSizeChanged = %lu\n", static_cast<unsigned long>(bufferSize));
     271    WTFLogAlways(">>>> frameSizeChanged = %lu\n", static_cast<unsigned long>(bufferSize));
    272272}
    273273
  • trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp

    r217696 r218373  
    971971
    972972    String output = layer->layerTreeAsText(WebCore::LayerTreeAsTextDebug | WebCore::LayerTreeAsTextIncludeVisibleRects | WebCore::LayerTreeAsTextIncludeTileCaches | WebCore::LayerTreeAsTextIncludeContentLayers);
    973     fprintf(stderr, "%s\n", output.utf8().data());
    974 }
    975 #endif
     973    WTFLogAlways("%s\n", output.utf8().data());
     974}
     975#endif
  • trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.cpp

    r208466 r218373  
    4545void DisplayList::dump() const
    4646{
    47     fprintf(stderr, "%s", description().data());
     47    WTFLogAlways("%s", description().data());
    4848}
    4949#endif
  • trunk/Source/WebCore/platform/ios/wak/WAKView.mm

    r217296 r218373  
    212212    if (_viewRef->isa.classInfo == &WKViewClassInfo)
    213213        return [[[WAKView alloc] _initWithViewRef:_viewRef] autorelease];
    214     WKError ("unable to create wrapper for %s\n", _viewRef->isa.classInfo->name);
     214    WKError("unable to create wrapper for %s\n", _viewRef->isa.classInfo->name);
    215215    return nil;
    216216}
     
    543543    CGContextRef context = WKGetCurrentGraphicsContext();
    544544    if (!context) {
    545         WKError ("unable to get context for view");
     545        WKError("unable to get context for view");
    546546        return;
    547547    }
     
    558558{
    559559    if (!context) {
    560         WKError ("invalid parameter: context must not be NULL");
     560        WKError("invalid parameter: context must not be NULL");
    561561        return;
    562562    }
  • trunk/Source/WebCore/platform/ios/wak/WKUtilities.c

    r180243 r218373  
    6060
    6161    if (object->referenceCount == 0) {
    62         WKError ("attempt to release invalid object");
     62        WKError("attempt to release invalid object");
    6363        return;
    6464    }
  • trunk/Source/WebCore/platform/ios/wak/WKView.mm

    r185021 r218373  
    118118{
    119119    if (!view) {
    120         WKError ("invalid parameter");
     120        WKError("invalid parameter");
    121121        return;
    122122    }
     
    127127{
    128128    if (!view) {
    129         WKError ("invalid parameter");
     129        WKError("invalid parameter");
    130130        return CGRectZero;
    131131    }
     
    137137{
    138138    if (!view) {
    139         WKError ("invalid parameter");
     139        WKError("invalid parameter");
    140140        return CGRectZero;
    141141    }
     
    157157{
    158158    if (!view) {
    159         WKError ("invalid parameter");
     159        WKError("invalid parameter");
    160160        return;
    161161    }
     
    174174{
    175175    if (!view) {
    176         WKError ("invalid parameter");
     176        WKError("invalid parameter");
    177177        return;
    178178    }
     
    323323{
    324324    if (!view) {
    325         WKError ("invalid parameter");
     325        WKError("invalid parameter");
    326326        return;
    327327    }
     
    387387{
    388388    if (!view) {
    389         WKError ("invalid parameter");
     389        WKError("invalid parameter");
    390390        return 0;
    391391    }
     
    397397{
    398398    if (!view) {
    399         WKError ("invalid parameter");
     399        WKError("invalid parameter");
    400400        return 0;
    401401    }
     
    407407{
    408408    if (!view || !subview) {
    409         WKError ("invalid parameter");
     409        WKError("invalid parameter");
    410410        return;
    411411    }
     
    424424{
    425425    if (!view) {
    426         WKError ("invalid parameter");
     426        WKError("invalid parameter");
    427427        return;
    428428    }
     
    436436    CFMutableArrayRef svs = view->superview->subviews;
    437437    if (!svs) {
    438         WKError ("superview has no subviews");
     438        WKError("superview has no subviews");
    439439        return;
    440440    }
     
    442442    CFIndex index = WKArrayIndexOfValue (svs, view);
    443443    if (index < 0) {
    444         WKError ("view not in superview subviews");
     444        WKError("view not in superview subviews");
    445445        return;
    446446    }
     
    456456{
    457457    if (!view) {
    458         WKError ("invalid parameter");
     458        WKError("invalid parameter");
    459459        return 0;
    460460    }
     
    475475{
    476476    if (!view) {
    477         WKError ("invalid parameter");
     477        WKError("invalid parameter");
    478478        return 0;
    479479    }
     
    488488    CFIndex thisIndex = WKArrayIndexOfValue (svs, view);
    489489    if (thisIndex < 0) {
    490         WKError ("internal error, view is not present in superview subviews");
     490        WKError("internal error, view is not present in superview subviews");
    491491        return 0;
    492492    }
     
    503503{
    504504    if (!view) {
    505         WKError ("invalid parameter");
     505        WKError("invalid parameter");
    506506        return 0;
    507507    }
     
    539539{
    540540    if (!viewRef) {
    541         WKError ("invalid parameter");
     541        WKError("invalid parameter");
    542542        return CGRectZero;
    543543    }
     
    565565{
    566566    if (!view) {
    567         WKError ("invalid parameter");
     567        WKError("invalid parameter");
    568568        return CGRectZero;
    569569    }
     
    575575{
    576576    if (!view) {
    577         WKError ("invalid parameter");
     577        WKError("invalid parameter");
    578578        return CGRectZero;
    579579    }
     
    592592{
    593593    if (!view) {
    594         WKError ("invalid parameter");
     594        WKError("invalid parameter");
    595595        return CGPointZero;
    596596    }
     
    602602{
    603603    if (!view) {
    604         WKError ("invalid parameter");
     604        WKError("invalid parameter");
    605605        return CGPointZero;
    606606    }
     
    613613{
    614614    if (!view) {
    615         WKError ("invalid parameter");
     615        WKError("invalid parameter");
    616616        return CGPointZero;
    617617    }
     
    638638        views[count++] = superview;
    639639        if (count >= maxViews) {
    640             WKError ("Exceeded maxViews, use malloc/realloc");
     640            WKError("Exceeded maxViews, use malloc/realloc");
    641641            *viewCount = 0;
    642642            return;
     
    650650{
    651651    if (!view) {
    652         WKError ("invalid parameter");
     652        WKError("invalid parameter");
    653653        return CGPointZero;
    654654    }
     
    673673{
    674674    if (!view) {
    675         WKError ("invalid parameter");
     675        WKError("invalid parameter");
    676676        return CGRectZero;
    677677    }
     
    684684{
    685685    if (!view) {
    686         WKError ("invalid parameter");
     686        WKError("invalid parameter");
    687687        return CGRectZero;
    688688    }
     
    731731{
    732732    if (!view) {
    733         WKError ("invalid parameter");
     733        WKError("invalid parameter");
    734734        return 0;
    735735    }   
     
    740740{
    741741    if (!view) {
    742         WKError ("invalid parameter");
     742        WKError("invalid parameter");
    743743        return;
    744744    }   
  • trunk/Source/WebCore/platform/text/TextEncodingRegistry.cpp

    r217860 r218373  
    392392{
    393393    unsigned size = textEncodingNameMap->size();
    394     fprintf(stderr, "Dumping %u entries in WebCore::textEncodingNameMap...\n", size);
     394    WTFLogAlways("Dumping %u entries in WebCore::textEncodingNameMap...\n", size);
    395395
    396396    std::lock_guard<StaticLock> lock(encodingRegistryMutex);
     
    399399    TextEncodingNameMap::const_iterator end = textEncodingNameMap->end();
    400400    for (; it != end; ++it)
    401         fprintf(stderr, "'%s' => '%s'\n", it->key, it->value);
     401        WTFLogAlways("'%s' => '%s'\n", it->key, it->value);
    402402}
    403403#endif
  • trunk/Source/WebCore/rendering/CounterNode.cpp

    r214082 r218373  
    337337
    338338    for (const CounterNode* current = root; current; current = current->nextInPreOrder()) {
    339         fprintf(stderr, "%c", (current == node) ? '*' : ' ');
     339        WTFLogAlways("%c", (current == node) ? '*' : ' ');
    340340        for (const CounterNode* parent = current; parent && parent != root; parent = parent->parent())
    341             fprintf(stderr, "    ");
    342         fprintf(stderr, "%p %s: %d %d P:%p PS:%p NS:%p R:%p\n",
     341            WTFLogAlways("    ");
     342        WTFLogAlways("%p %s: %d %d P:%p PS:%p NS:%p R:%p\n",
    343343            current, current->actsAsReset() ? "reset____" : "increment", current->value(),
    344344            current->countInParent(), current->parent(), current->previousSibling(),
  • trunk/Source/WebCore/rendering/InlineBox.cpp

    r217242 r218373  
    108108void InlineBox::showLineBox(bool mark, int depth) const
    109109{
    110     fprintf(stderr, "-------- %c-", isDirty() ? 'D' : '-');
     110    WTFLogAlways("-------- %c-", isDirty() ? 'D' : '-');
    111111    int printedCharacters = 0;
    112112    if (mark) {
    113         fprintf(stderr, "*");
     113        WTFLogAlways("*");
    114114        ++printedCharacters;
    115115    }
    116116    while (++printedCharacters <= depth * 2)
    117117        fputc(' ', stderr);
    118     fprintf(stderr, "%s  (%.2f, %.2f) (%.2f, %.2f) (%p) renderer->(%p)\n", boxName(), x(), y(), width(), height(), this, &renderer());
     118    WTFLogAlways("%s  (%.2f, %.2f) (%.2f, %.2f) (%p) renderer->(%p)\n", boxName(), x(), y(), width(), height(), this, &renderer());
    119119}
    120120
  • trunk/Source/WebCore/rendering/InlineTextBox.cpp

    r216212 r218373  
    11261126void InlineTextBox::showLineBox(bool mark, int depth) const
    11271127{
    1128     fprintf(stderr, "-------- %c-", isDirty() ? 'D' : '-');
     1128    WTFLogAlways("-------- %c-", isDirty() ? 'D' : '-');
    11291129
    11301130    int printedCharacters = 0;
    11311131    if (mark) {
    1132         fprintf(stderr, "*");
     1132        WTFLogAlways("*");
    11331133        ++printedCharacters;
    11341134    }
     
    11401140    value.replaceWithLiteral('\\', "\\\\");
    11411141    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());
     1142    WTFLogAlways("%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());
    11431143}
    11441144
  • trunk/Source/WebCore/rendering/RenderCounter.cpp

    r214173 r218373  
    611611        if (!is<WebCore::RenderElement>(*current))
    612612            continue;
    613         fprintf(stderr, "%c", (current == renderer) ? '*' : ' ');
     613        WTFLogAlways("%c", (current == renderer) ? '*' : ' ');
    614614        for (const WebCore::RenderObject* parent = current; parent && parent != root; parent = parent->parent())
    615             fprintf(stderr, "    ");
    616         fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n",
     615            WTFLogAlways("    ");
     616        WTFLogAlways("%p N:%p P:%p PS:%p NS:%p C:%p\n",
    617617            current, current->node(), current->parent(), current->previousSibling(),
    618618            current->nextSibling(), downcast<WebCore::RenderElement>(*current).hasCounterNodeMap() ?
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r218300 r218373  
    72307230
    72317231    WTF::String output = externalRepresentation(&layer->renderer().frame(), WebCore::RenderAsTextShowAllLayers | WebCore::RenderAsTextShowLayerNesting | WebCore::RenderAsTextShowCompositedLayers | WebCore::RenderAsTextShowAddresses | WebCore::RenderAsTextShowIDAndClass | WebCore::RenderAsTextDontUpdateLayout | WebCore::RenderAsTextShowLayoutState | WebCore::RenderAsTextShowOverflow | WebCore::RenderAsTextShowSVGGeometry | WebCore::RenderAsTextShowLayerFragments);
    7232     fprintf(stderr, "\n%s\n", output.utf8().data());
     7232    WTFLogAlways("\n%s\n", output.utf8().data());
    72337233}
    72347234
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r216902 r218373  
    10101010static void showRenderTreeLegend()
    10111011{
    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");
     1012    WTFLogAlways("\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");
    10131013}
    10141014
     
    10731073    RenderRegion* endRegion = nullptr;
    10741074    ftcb->getRegionRangeForBox(downcast<RenderBox>(this), startRegion, endRegion);
    1075     fprintf(stderr, " [Rs:%p Re:%p]", startRegion, endRegion);
     1075    WTFLogAlways(" [Rs:%p Re:%p]", startRegion, endRegion);
    10761076}
    10771077
     
    11431143    int printedCharacters = 0;
    11441144    if (mark) {
    1145         fprintf(stderr, "*");
     1145        WTFLogAlways("*");
    11461146        ++printedCharacters;
    11471147    }
     
    11511151
    11521152    if (node())
    1153         fprintf(stderr, "%s ", node()->nodeName().utf8().data());
     1153        WTFLogAlways("%s ", node()->nodeName().utf8().data());
    11541154
    11551155    String name = renderName();
     
    11571157    int pos = name.find('(');
    11581158    if (pos > 0)
    1159         fprintf(stderr, "%s", name.left(pos - 1).utf8().data());
     1159        WTFLogAlways("%s", name.left(pos - 1).utf8().data());
    11601160    else
    1161         fprintf(stderr, "%s", name.utf8().data());
     1161        WTFLogAlways("%s", name.utf8().data());
    11621162
    11631163    if (is<RenderBox>(*this)) {
     
    11661166        if (renderBox.isInFlowPositioned())
    11671167            boxRect.move(renderBox.offsetForInFlowPosition());
    1168         fprintf(stderr, "  (%.2f, %.2f) (%.2f, %.2f)", boxRect.x(), boxRect.y(), boxRect.width(), boxRect.height());
     1168        WTFLogAlways("  (%.2f, %.2f) (%.2f, %.2f)", boxRect.x(), boxRect.y(), boxRect.width(), boxRect.height());
    11691169    } else if (is<RenderInline>(*this) && isInFlowPositioned()) {
    11701170        FloatSize inlineOffset = downcast<RenderInline>(*this).offsetForInFlowPosition();
    1171         fprintf(stderr, "  (%.2f, %.2f)", inlineOffset.width(), inlineOffset.height());
    1172     }
    1173 
    1174     fprintf(stderr, " renderer->(%p)", this);
     1171        WTFLogAlways("  (%.2f, %.2f)", inlineOffset.width(), inlineOffset.height());
     1172    }
     1173
     1174    WTFLogAlways(" renderer->(%p)", this);
    11751175    if (node()) {
    1176         fprintf(stderr, " node->(%p)", node());
     1176        WTFLogAlways(" node->(%p)", node());
    11771177        if (node()->isTextNode()) {
    11781178            String value = node()->nodeValue();
    1179             fprintf(stderr, " length->(%u)", value.length());
     1179            WTFLogAlways(" length->(%u)", value.length());
    11801180
    11811181            value.replaceWithLiteral('\\', "\\\\");
     
    11851185            if (value.length() > maxPrintedLength) {
    11861186                String substring = value.substring(0, maxPrintedLength);
    1187                 fprintf(stderr, " \"%s\"...", substring.utf8().data());
     1187                WTFLogAlways(" \"%s\"...", substring.utf8().data());
    11881188            } else
    1189                 fprintf(stderr, " \"%s\"", value.utf8().data());
     1189                WTFLogAlways(" \"%s\"", value.utf8().data());
    11901190        }
    11911191    }
     
    11931193        auto& renderer = downcast<RenderBoxModelObject>(*this);
    11941194        if (renderer.hasContinuation())
    1195             fprintf(stderr, " continuation->(%p)", renderer.continuation());
     1195            WTFLogAlways(" continuation->(%p)", renderer.continuation());
    11961196    }
    11971197    showRegionsInformation();
    11981198    if (needsLayout()) {
    1199         fprintf(stderr, " layout->");
     1199        WTFLogAlways(" layout->");
    12001200        if (selfNeedsLayout())
    1201             fprintf(stderr, "[self]");
     1201            WTFLogAlways("[self]");
    12021202        if (normalChildNeedsLayout())
    1203             fprintf(stderr, "[normal child]");
     1203            WTFLogAlways("[normal child]");
    12041204        if (posChildNeedsLayout())
    1205             fprintf(stderr, "[positioned child]");
     1205            WTFLogAlways("[positioned child]");
    12061206        if (needsSimplifiedNormalFlowLayout())
    1207             fprintf(stderr, "[simplified]");
     1207            WTFLogAlways("[simplified]");
    12081208        if (needsPositionedMovementLayout())
    1209             fprintf(stderr, "[positioned movement]");
    1210     }
    1211     fprintf(stderr, "\n");
     1209            WTFLogAlways("[positioned movement]");
     1210    }
     1211    WTFLogAlways("\n");
    12121212}
    12131213
     
    20182018            continue;
    20192019        if (document->frame() && document->frame()->isMainFrame())
    2020             fprintf(stderr, "----------------------main frame--------------------------\n");
    2021         fprintf(stderr, "%s", document->url().string().utf8().data());
     2020            WTFLogAlways("----------------------main frame--------------------------\n");
     2021        WTFLogAlways("%s", document->url().string().utf8().data());
    20222022        showRenderTree(document->renderView());
    20232023    }
     
    20302030            continue;
    20312031        if (document->frame() && document->frame()->isMainFrame())
    2032             fprintf(stderr, "----------------------main frame--------------------------\n");
    2033         fprintf(stderr, "%s", document->url().string().utf8().data());
     2032            WTFLogAlways("----------------------main frame--------------------------\n");
     2033        WTFLogAlways("%s", document->url().string().utf8().data());
    20342034        showLayerTree(document->renderView());
    20352035    }
  • trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp

    r217019 r218373  
    264264static void printPrefix(int& printedCharacters, int depth)
    265265{
    266     fprintf(stderr, "-------- --");
     266    WTFLogAlways("-------- --");
    267267    printedCharacters = 0;
    268268    while (++printedCharacters <= depth * 2)
     
    275275    printPrefix(printedCharacters, depth);
    276276
    277     fprintf(stderr, "SimpleLineLayout (%u lines, %u runs) (%p)\n", layout.lineCount(), layout.runCount(), &layout);
     277    WTFLogAlways("SimpleLineLayout (%u lines, %u runs) (%p)\n", layout.lineCount(), layout.runCount(), &layout);
    278278    ++depth;
    279279
     
    282282        printPrefix(printedCharacters, depth);
    283283        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(),
     284            WTFLogAlways("line %u run(%u, %u) (%.2f, %.2f) (%.2f, %.2f) \"%s\"\n", run.lineIndex(), run.start(), run.end(),
    285285                rect.x(), rect.y(), rect.width(), rect.height(), run.text().toStringWithoutCopying().utf8().data());
    286286        } else {
    287287            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());
     288            WTFLogAlways("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());
    289289        }
    290290    }
  • trunk/Source/WebCore/rendering/svg/SVGResources.cpp

    r209777 r218373  
    657657    ASSERT(object->node());
    658658
    659     fprintf(stderr, "-> this=%p, SVGResources(renderer=%p, node=%p)\n", this, object, object->node());
    660     fprintf(stderr, " | DOM Tree:\n");
     659    WTFLogAlways("-> this=%p, SVGResources(renderer=%p, node=%p)\n", this, object, object->node());
     660    WTFLogAlways(" | DOM Tree:\n");
    661661    object->node()->showTreeForThis();
    662662
    663     fprintf(stderr, "\n | List of resources:\n");
     663    WTFLogAlways("\n | List of resources:\n");
    664664    if (m_clipperFilterMaskerData) {
    665665        if (RenderSVGResourceClipper* clipper = m_clipperFilterMaskerData->clipper)
    666             fprintf(stderr, " |-> Clipper    : %p (node=%p)\n", clipper, &clipper->clipPathElement());
     666            WTFLogAlways(" |-> Clipper    : %p (node=%p)\n", clipper, &clipper->clipPathElement());
    667667        if (RenderSVGResourceFilter* filter = m_clipperFilterMaskerData->filter)
    668             fprintf(stderr, " |-> Filter     : %p (node=%p)\n", filter, &filter->filterElement());
     668            WTFLogAlways(" |-> Filter     : %p (node=%p)\n", filter, &filter->filterElement());
    669669        if (RenderSVGResourceMasker* masker = m_clipperFilterMaskerData->masker)
    670             fprintf(stderr, " |-> Masker     : %p (node=%p)\n", masker, &masker->maskElement());
     670            WTFLogAlways(" |-> Masker     : %p (node=%p)\n", masker, &masker->maskElement());
    671671    }
    672672
    673673    if (m_markerData) {
    674674        if (RenderSVGResourceMarker* markerStart = m_markerData->markerStart)
    675             fprintf(stderr, " |-> MarkerStart: %p (node=%p)\n", markerStart, &markerStart->markerElement());
     675            WTFLogAlways(" |-> MarkerStart: %p (node=%p)\n", markerStart, &markerStart->markerElement());
    676676        if (RenderSVGResourceMarker* markerMid = m_markerData->markerMid)
    677             fprintf(stderr, " |-> MarkerMid  : %p (node=%p)\n", markerMid, &markerMid->markerElement());
     677            WTFLogAlways(" |-> MarkerMid  : %p (node=%p)\n", markerMid, &markerMid->markerElement());
    678678        if (RenderSVGResourceMarker* markerEnd = m_markerData->markerEnd)
    679             fprintf(stderr, " |-> MarkerEnd  : %p (node=%p)\n", markerEnd, &markerEnd->markerElement());
     679            WTFLogAlways(" |-> MarkerEnd  : %p (node=%p)\n", markerEnd, &markerEnd->markerElement());
    680680    }
    681681
    682682    if (m_fillStrokeData) {
    683683        if (RenderSVGResourceContainer* fill = m_fillStrokeData->fill)
    684             fprintf(stderr, " |-> Fill       : %p (node=%p)\n", fill, &fill->element());
     684            WTFLogAlways(" |-> Fill       : %p (node=%p)\n", fill, &fill->element());
    685685        if (RenderSVGResourceContainer* stroke = m_fillStrokeData->stroke)
    686             fprintf(stderr, " |-> Stroke     : %p (node=%p)\n", stroke, &stroke->element());
     686            WTFLogAlways(" |-> Stroke     : %p (node=%p)\n", stroke, &stroke->element());
    687687    }
    688688
    689689    if (m_linkedResource)
    690         fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, &m_linkedResource->element());
     690        WTFLogAlways(" |-> xlink:href : %p (node=%p)\n", m_linkedResource, &m_linkedResource->element());
    691691}
    692692#endif
  • trunk/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp

    r189954 r218373  
    143143            LOG_DEBUG_CYCLE("|> %s : %p (node %p)\n", resource->renderName(), resource, resource->node());
    144144
    145         fprintf(stderr, "Parent resources:\n");
     145        WTFLogAlways("Parent resources:\n");
    146146        for (RenderObject* resource : ancestorResources)
    147147            LOG_DEBUG_CYCLE("|> %s : %p (node %p)\n", resource->renderName(), resource, resource->node());
  • trunk/Source/WebCore/rendering/svg/SVGTextLayoutAttributes.cpp

    r163440 r218373  
    4646{
    4747    if (value == SVGTextLayoutAttributes::emptyValue()) {
    48         fprintf(stderr, "%s=x", identifier);
     48        WTFLogAlways("%s=x", identifier);
    4949        if (appendSpace)
    50             fprintf(stderr, " ");
     50            WTFLogAlways(" ");
    5151        return;
    5252    }
    53     fprintf(stderr, "%s=%lf", identifier, value);
     53    WTFLogAlways("%s=%lf", identifier, value);
    5454    if (appendSpace)
    55         fprintf(stderr, " ");
     55        WTFLogAlways(" ");
    5656}
    5757
    5858void SVGTextLayoutAttributes::dump() const
    5959{
    60     fprintf(stderr, "context: %p\n", &m_context);
     60    WTFLogAlways("context: %p\n", &m_context);
    6161    const SVGCharacterDataMap::const_iterator end = m_characterDataMap.end();
    6262    for (SVGCharacterDataMap::const_iterator it = m_characterDataMap.begin(); it != end; ++it) {
    6363        const SVGCharacterData& data = it->value;
    64         fprintf(stderr, " ---> pos=%i, data={", it->key);
     64        WTFLogAlways(" ---> pos=%i, data={", it->key);
    6565        dumpSVGCharacterDataMapValue("x", data.x);
    6666        dumpSVGCharacterDataMapValue("y", data.y);
     
    6868        dumpSVGCharacterDataMapValue("dy", data.dy);
    6969        dumpSVGCharacterDataMapValue("rotate", data.rotate, false);
    70         fprintf(stderr, "}\n");
     70        WTFLogAlways("}\n");
    7171    }
    7272}
  • trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp

    r207757 r218373  
    236236{
    237237    unsigned boxCount = boxes.size();
    238     fprintf(stderr, "Dumping all text fragments in text sub tree, %i boxes\n", boxCount);
     238    WTFLogAlways("Dumping all text fragments in text sub tree, %i boxes\n", boxCount);
    239239
    240240    for (unsigned boxPosition = 0; boxPosition < boxCount; ++boxPosition) {
    241241        SVGInlineTextBox* textBox = boxes.at(boxPosition);
    242242        Vector<SVGTextFragment>& fragments = textBox->textFragments();
    243         fprintf(stderr, "-> Box %i: Dumping text fragments for SVGInlineTextBox, textBox=%p, textRenderer=%p\n", boxPosition, textBox, textBox->renderer());
    244         fprintf(stderr, "        textBox properties, start=%i, len=%i, box direction=%i\n", textBox->start(), textBox->len(), textBox->direction());
    245         fprintf(stderr, "   textRenderer properties, textLength=%i\n", textBox->renderer()->textLength());
     243        WTFLogAlways("-> Box %i: Dumping text fragments for SVGInlineTextBox, textBox=%p, textRenderer=%p\n", boxPosition, textBox, textBox->renderer());
     244        WTFLogAlways("        textBox properties, start=%i, len=%i, box direction=%i\n", textBox->start(), textBox->len(), textBox->direction());
     245        WTFLogAlways("   textRenderer properties, textLength=%i\n", textBox->renderer()->textLength());
    246246
    247247        const UChar* characters = textBox->renderer()->characters();
     
    251251            SVGTextFragment& fragment = fragments.at(i);
    252252            String fragmentString(characters + fragment.characterOffset, fragment.length);
    253             fprintf(stderr, "    -> Fragment %i, x=%lf, y=%lf, width=%lf, height=%lf, characterOffset=%i, length=%i, characters='%s'\n"
     253            WTFLogAlways("    -> Fragment %i, x=%lf, y=%lf, width=%lf, height=%lf, characterOffset=%i, length=%i, characters='%s'\n"
    254254                          , i, fragment.x, fragment.y, fragment.width, fragment.height, fragment.characterOffset, fragment.length, fragmentString.utf8().data());
    255255        }
     
    291291    if (!m_lineLayoutBoxes.isEmpty()) {
    292292#if DUMP_TEXT_FRAGMENTS > 0
    293         fprintf(stderr, "Line layout: ");
     293        WTFLogAlways("Line layout: ");
    294294        dumpTextBoxes(m_lineLayoutBoxes);
    295295#endif
     
    300300    if (!m_pathLayoutBoxes.isEmpty()) {
    301301#if DUMP_TEXT_FRAGMENTS > 0
    302         fprintf(stderr, "Path layout: ");
     302        WTFLogAlways("Path layout: ");
    303303        dumpTextBoxes(m_pathLayoutBoxes);
    304304#endif
Note: See TracChangeset for help on using the changeset viewer.