Title: [218373] trunk/Source/WebCore
Revision
218373
Author
simon.fra...@apple.com
Date
2017-06-15 18:39:31 -0700 (Thu, 15 Jun 2017)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (218372 => 218373)


--- trunk/Source/WebCore/ChangeLog	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/ChangeLog	2017-06-16 01:39:31 UTC (rev 218373)
@@ -1,3 +1,123 @@
+2017-06-15  Simon Fraser  <simon.fra...@apple.com>
+
+        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):
+
 2017-06-15  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         Removing stray whitespace after r218371

Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp (218372 => 218373)


--- trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -190,7 +190,7 @@
 AudioContext::~AudioContext()
 {
 #if DEBUG_AUDIONODE_REFERENCES
-    fprintf(stderr, "%p: AudioContext::~AudioContext()\n", this);
+    WTFLogAlways("%p: AudioContext::~AudioContext()\n", this);
 #endif
     ASSERT(!m_isInitialized);
     ASSERT(m_isStopScheduled);

Modified: trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp (218372 => 218373)


--- trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -70,7 +70,7 @@
     ASSERT(isMainThread());
 #if DEBUG_AUDIONODE_REFERENCES
     --s_nodeCount[nodeType()];
-    fprintf(stderr, "%p: %d: AudioNode::~AudioNode() %d %d\n", this, nodeType(), m_normalRefCount.load(), m_connectionRefCount);
+    WTFLogAlways("%p: %d: AudioNode::~AudioNode() %d %d\n", this, nodeType(), m_normalRefCount.load(), m_connectionRefCount);
 #endif
 }
 
@@ -404,7 +404,7 @@
     }
 
 #if DEBUG_AUDIONODE_REFERENCES
-    fprintf(stderr, "%p: %d: AudioNode::ref(%d) %d %d\n", this, nodeType(), refType, m_normalRefCount, m_connectionRefCount);
+    WTFLogAlways("%p: %d: AudioNode::ref(%d) %d %d\n", this, nodeType(), refType, m_normalRefCount, m_connectionRefCount);
 #endif
 
     // See the disabling code in finishDeref() below. This handles the case where a node
@@ -467,7 +467,7 @@
     }
     
 #if DEBUG_AUDIONODE_REFERENCES
-    fprintf(stderr, "%p: %d: AudioNode::deref(%d) %d %d\n", this, nodeType(), refType, m_normalRefCount, m_connectionRefCount);
+    WTFLogAlways("%p: %d: AudioNode::deref(%d) %d %d\n", this, nodeType(), refType, m_normalRefCount, m_connectionRefCount);
 #endif
 
     if (!m_connectionRefCount) {
@@ -493,15 +493,15 @@
 
 void AudioNode::printNodeCounts()
 {
-    fprintf(stderr, "\n\n");
-    fprintf(stderr, "===========================\n");
-    fprintf(stderr, "AudioNode: reference counts\n");
-    fprintf(stderr, "===========================\n");
+    WTFLogAlways("\n\n");
+    WTFLogAlways("===========================\n");
+    WTFLogAlways("AudioNode: reference counts\n");
+    WTFLogAlways("===========================\n");
 
     for (unsigned i = 0; i < NodeTypeEnd; ++i)
-        fprintf(stderr, "%d: %d\n", i, s_nodeCount[i]);
+        WTFLogAlways("%d: %d\n", i, s_nodeCount[i]);
 
-    fprintf(stderr, "===========================\n\n\n");
+    WTFLogAlways("===========================\n\n\n");
 }
 
 #endif // DEBUG_AUDIONODE_REFERENCES

Modified: trunk/Source/WebCore/bridge/objc/objc_instance.mm (218372 => 218373)


--- trunk/Source/WebCore/bridge/objc/objc_instance.mm	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/bridge/objc/objc_instance.mm	2017-06-16 01:39:31 UTC (rev 218373)
@@ -41,15 +41,6 @@
 #import <wtf/NeverDestroyed.h>
 #import <wtf/ThreadSpecific.h>
 
-#ifdef NDEBUG
-#define OBJC_LOG(formatAndArgs...) ((void)0)
-#else
-#define OBJC_LOG(formatAndArgs...) { \
-    fprintf (stderr, "%s:%d -- %s:  ", __FILE__, __LINE__, __FUNCTION__); \
-    fprintf(stderr, formatAndArgs); \
-}
-#endif
-
 using namespace JSC::Bindings;
 using namespace JSC;
 
@@ -302,7 +293,7 @@
                     // Should never get here.  Argument types are filtered (and
                     // the assert above should have fired in the impossible case
                     // of an invalid type anyway).
-                    fprintf(stderr, "%s: invalid type (%d)\n", __PRETTY_FUNCTION__, (int)objcValueType);
+                    WTFLogAlways("%s: invalid type (%d)\n", __PRETTY_FUNCTION__, (int)objcValueType);
                     ASSERT_NOT_REACHED();
             }
         }

Modified: trunk/Source/WebCore/bridge/objc/objc_utility.mm (218372 => 218373)


--- trunk/Source/WebCore/bridge/objc/objc_utility.mm	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/bridge/objc/objc_utility.mm	2017-06-16 01:39:31 UTC (rev 218373)
@@ -229,7 +229,7 @@
             return jsNumber(*(double*)buffer);
         default:
             // Should never get here. Argument types are filtered.
-            fprintf(stderr, "%s: invalid type (%d)\n", __PRETTY_FUNCTION__, (int)type);
+            WTFLogAlways("%s: invalid type (%d)\n", __PRETTY_FUNCTION__, (int)type);
             ASSERT_NOT_REACHED();
     }
     

Modified: trunk/Source/WebCore/css/StyleProperties.cpp (218372 => 218373)


--- trunk/Source/WebCore/css/StyleProperties.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/css/StyleProperties.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -1363,7 +1363,7 @@
 #ifndef NDEBUG
 void StyleProperties::showStyle()
 {
-    fprintf(stderr, "%s\n", asText().ascii().data());
+    WTFLogAlways("%s\n", asText().ascii().data());
 }
 #endif
 

Modified: trunk/Source/WebCore/dom/DocumentMarkerController.cpp (218372 => 218373)


--- trunk/Source/WebCore/dom/DocumentMarkerController.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/dom/DocumentMarkerController.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -818,14 +818,14 @@
 #if ENABLE(TREE_DEBUGGING)
 void DocumentMarkerController::showMarkers() const
 {
-    fprintf(stderr, "%d nodes have markers:\n", m_markers.size());
+    WTFLogAlways("%d nodes have markers:\n", m_markers.size());
     for (auto& marker : m_markers) {
         Node* node = marker.key.get();
-        fprintf(stderr, "%p", node);
+        WTFLogAlways("%p", node);
         for (auto& documentMarker : *marker.value)
-            fprintf(stderr, " %d:[%d:%d](%d)", documentMarker.type(), documentMarker.startOffset(), documentMarker.endOffset(), documentMarker.isActiveMatch());
+            WTFLogAlways(" %d:[%d:%d](%d)", documentMarker.type(), documentMarker.startOffset(), documentMarker.endOffset(), documentMarker.isActiveMatch());
 
-        fprintf(stderr, "\n");
+        WTFLogAlways("\n");
     }
 }
 #endif

Modified: trunk/Source/WebCore/dom/Node.cpp (218372 => 218373)


--- trunk/Source/WebCore/dom/Node.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/dom/Node.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -1729,12 +1729,12 @@
         String value = nodeValue();
         value.replaceWithLiteral('\\', "\\\\");
         value.replaceWithLiteral('\n', "\\n");
-        fprintf(stderr, "%s%s\t%p \"%s\"\n", prefix, nodeName().utf8().data(), this, value.utf8().data());
+        WTFLogAlways("%s%s\t%p \"%s\"\n", prefix, nodeName().utf8().data(), this, value.utf8().data());
     } else {
         StringBuilder attrs;
         appendAttributeDesc(this, attrs, classAttr, " CLASS=");
         appendAttributeDesc(this, attrs, styleAttr, " STYLE=");
-        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)" : "");
+        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)" : "");
     }
 }
 
@@ -1757,13 +1757,13 @@
             int count = 0;
             for (const ShadowRoot* shadowRoot = downcast<ShadowRoot>(node); shadowRoot && shadowRoot != node; shadowRoot = shadowRoot->shadowRoot())
                 ++count;
-            fprintf(stderr, "/#shadow-root[%d]", count);
+            WTFLogAlways("/#shadow-root[%d]", count);
             continue;
         }
 
         switch (node->nodeType()) {
         case ELEMENT_NODE: {
-            fprintf(stderr, "/%s", node->nodeName().utf8().data());
+            WTFLogAlways("/%s", node->nodeName().utf8().data());
 
             const Element& element = downcast<Element>(*node);
             const AtomicString& idattr = element.getIdAttribute();
@@ -1774,24 +1774,24 @@
                     if (previous->nodeName() == node->nodeName())
                         ++count;
                 if (hasIdAttr)
-                    fprintf(stderr, "[@id=\"%s\" and position()=%d]", idattr.string().utf8().data(), count);
+                    WTFLogAlways("[@id=\"%s\" and position()=%d]", idattr.string().utf8().data(), count);
                 else
-                    fprintf(stderr, "[%d]", count);
+                    WTFLogAlways("[%d]", count);
             } else if (hasIdAttr)
-                fprintf(stderr, "[@id=\"%s\"]", idattr.string().utf8().data());
+                WTFLogAlways("[@id=\"%s\"]", idattr.string().utf8().data());
             break;
         }
         case TEXT_NODE:
-            fprintf(stderr, "/text()");
+            WTFLogAlways("/text()");
             break;
         case ATTRIBUTE_NODE:
-            fprintf(stderr, "/@%s", node->nodeName().utf8().data());
+            WTFLogAlways("/@%s", node->nodeName().utf8().data());
             break;
         default:
             break;
         }
     }
-    fprintf(stderr, "\n");
+    WTFLogAlways("\n");
 }
 
 static void traverseTreeAndMark(const String& baseIndent, const Node* rootNode, const Node* markedNode1, const char* markedLabel1, const Node* markedNode2, const char* markedLabel2)
@@ -1798,15 +1798,15 @@
 {
     for (const Node* node = rootNode; node; node = NodeTraversal::next(*node)) {
         if (node == markedNode1)
-            fprintf(stderr, "%s", markedLabel1);
+            WTFLogAlways("%s", markedLabel1);
         if (node == markedNode2)
-            fprintf(stderr, "%s", markedLabel2);
+            WTFLogAlways("%s", markedLabel2);
 
         StringBuilder indent;
         indent.append(baseIndent);
         for (const Node* tmpNode = node; tmpNode && tmpNode != rootNode; tmpNode = tmpNode->parentOrShadowHostNode())
             indent.append('\t');
-        fprintf(stderr, "%s", indent.toString().utf8().data());
+        WTFLogAlways("%s", indent.toString().utf8().data());
         node->showNode();
         indent.append('\t');
         if (!node->isShadowRoot()) {

Modified: trunk/Source/WebCore/dom/Position.cpp (218372 => 218373)


--- trunk/Source/WebCore/dom/Position.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/dom/Position.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -1398,9 +1398,9 @@
 void Position::debugPosition(const char* msg) const
 {
     if (isNull())
-        fprintf(stderr, "Position [%s]: null\n", msg);
+        WTFLogAlways("Position [%s]: null\n", msg);
     else
-        fprintf(stderr, "Position [%s]: %s [%p] at %d\n", msg, deprecatedNode()->nodeName().utf8().data(), deprecatedNode(), m_offset);
+        WTFLogAlways("Position [%s]: %s [%p] at %d\n", msg, deprecatedNode()->nodeName().utf8().data(), deprecatedNode(), m_offset);
 }
 
 void Position::formatForDebugger(char* buffer, unsigned length) const
@@ -1442,7 +1442,7 @@
         fputs("after", stderr);
         break;
     }
-    fprintf(stderr, ", offset:%d\n", m_offset);
+    WTFLogAlways(", offset:%d\n", m_offset);
 }
 
 void Position::showTreeForThis() const

Modified: trunk/Source/WebCore/dom/Range.cpp (218372 => 218373)


--- trunk/Source/WebCore/dom/Range.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/dom/Range.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -1837,7 +1837,7 @@
 {
     if (range && range->boundaryPointsValid()) {
         range->startContainer().showTreeAndMark(&range->startContainer(), "S", &range->endContainer(), "E");
-        fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset(), range->endOffset());
+        WTFLogAlways("start offset: %d, end offset: %d\n", range->startOffset(), range->endOffset());
     }
 }
 

Modified: trunk/Source/WebCore/editing/FrameSelection.cpp (218372 => 218373)


--- trunk/Source/WebCore/editing/FrameSelection.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/editing/FrameSelection.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -1753,11 +1753,11 @@
 {
     if (is<Element>(*renderer->node())) {
         Element& element = downcast<Element>(*renderer->node());
-        fprintf(stderr, "%s%s\n", selected ? "==> " : "    ", element.localName().string().utf8().data());
+        WTFLogAlways("%s%s\n", selected ? "==> " : "    ", element.localName().string().utf8().data());
     } else if (is<RenderText>(*renderer)) {
         RenderText& textRenderer = downcast<RenderText>(*renderer);
         if (!textRenderer.textLength() || !textRenderer.firstTextBox()) {
-            fprintf(stderr, "%s#text (empty)\n", selected ? "==> " : "    ");
+            WTFLogAlways("%s#text (empty)\n", selected ? "==> " : "    ");
             return;
         }
         
@@ -1799,17 +1799,17 @@
             
             show.replace('\n', ' ');
             show.replace('\r', ' ');
-            fprintf(stderr, "==> #text : \"%s\" at offset %d\n", show.utf8().data(), pos);
-            fprintf(stderr, "           ");
+            WTFLogAlways("==> #text : \"%s\" at offset %d\n", show.utf8().data(), pos);
+            WTFLogAlways("           ");
             for (int i = 0; i < caret; i++)
-                fprintf(stderr, " ");
-            fprintf(stderr, "^\n");
+                WTFLogAlways(" ");
+            WTFLogAlways("^\n");
         } else {
             if ((int)text.length() > max)
                 text = text.left(max - 3) + "...";
             else
                 text = text.left(max);
-            fprintf(stderr, "    #text : \"%s\"\n", text.utf8().data());
+            WTFLogAlways("    #text : \"%s\"\n", text.utf8().data());
         }
     }
 }

Modified: trunk/Source/WebCore/editing/VisiblePosition.cpp (218372 => 218373)


--- trunk/Source/WebCore/editing/VisiblePosition.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/editing/VisiblePosition.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -689,9 +689,9 @@
 void VisiblePosition::debugPosition(const char* msg) const
 {
     if (isNull())
-        fprintf(stderr, "Position [%s]: null\n", msg);
+        WTFLogAlways("Position [%s]: null\n", msg);
     else {
-        fprintf(stderr, "Position [%s]: %s, ", msg, m_deepPosition.deprecatedNode()->nodeName().utf8().data());
+        WTFLogAlways("Position [%s]: %s, ", msg, m_deepPosition.deprecatedNode()->nodeName().utf8().data());
         m_deepPosition.showAnchorTypeAndOffset();
     }
 }

Modified: trunk/Source/WebCore/editing/VisibleSelection.cpp (218372 => 218373)


--- trunk/Source/WebCore/editing/VisibleSelection.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/editing/VisibleSelection.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -671,21 +671,21 @@
 
 void VisibleSelection::debugPosition() const
 {
-    fprintf(stderr, "VisibleSelection ===============\n");
+    WTFLogAlways("VisibleSelection ===============\n");
 
     if (!m_start.anchorNode())
         fputs("pos:   null", stderr);
     else if (m_start == m_end) {
-        fprintf(stderr, "pos:   %s ", m_start.anchorNode()->nodeName().utf8().data());
+        WTFLogAlways("pos:   %s ", m_start.anchorNode()->nodeName().utf8().data());
         m_start.showAnchorTypeAndOffset();
     } else {
-        fprintf(stderr, "start: %s ", m_start.anchorNode()->nodeName().utf8().data());
+        WTFLogAlways("start: %s ", m_start.anchorNode()->nodeName().utf8().data());
         m_start.showAnchorTypeAndOffset();
-        fprintf(stderr, "end:   %s ", m_end.anchorNode()->nodeName().utf8().data());
+        WTFLogAlways("end:   %s ", m_end.anchorNode()->nodeName().utf8().data());
         m_end.showAnchorTypeAndOffset();
     }
 
-    fprintf(stderr, "================================\n");
+    WTFLogAlways("================================\n");
 }
 
 void VisibleSelection::formatForDebugger(char* buffer, unsigned length) const

Modified: trunk/Source/WebCore/history/HistoryItem.cpp (218372 => 218373)


--- trunk/Source/WebCore/history/HistoryItem.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/history/HistoryItem.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -494,7 +494,7 @@
         prefix.append("  ", 2);
     prefix.append("\0", 1);
 
-    fprintf(stderr, "%s+-%s (%p)\n", prefix.data(), m_urlString.utf8().data(), this);
+    WTFLogAlways("%s+-%s (%p)\n", prefix.data(), m_urlString.utf8().data(), this);
     
     int totalSubItems = 0;
     for (unsigned i = 0; i < m_children.size(); ++i)

Modified: trunk/Source/WebCore/html/parser/HTMLFormattingElementList.cpp (218372 => 218373)


--- trunk/Source/WebCore/html/parser/HTMLFormattingElementList.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/html/parser/HTMLFormattingElementList.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -202,7 +202,7 @@
     for (unsigned i = 1; i <= m_entries.size(); ++i) {
         const Entry& entry = m_entries[m_entries.size() - i];
         if (entry.isMarker())
-            fprintf(stderr, "marker\n");
+            WTFLogAlways("marker\n");
         else
             entry.element().showNode();
     }

Modified: trunk/Source/WebCore/inspector/DOMPatchSupport.cpp (218372 => 218373)


--- trunk/Source/WebCore/inspector/DOMPatchSupport.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/inspector/DOMPatchSupport.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -505,9 +505,9 @@
 
 void DOMPatchSupport::dumpMap(const ResultMap& map, const String& name)
 {
-    fprintf(stderr, "\n\n");
+    WTFLogAlways("\n\n");
     for (size_t i = 0; i < map.size(); ++i)
-        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);
+        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);
 }
 
 #endif

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp (218372 => 218373)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -272,12 +272,12 @@
 
     auto rootNode = tree->rootStateNode();
     if (!rootNode) {
-        fprintf(stderr, "Scrolling state tree %p with no root node\n", tree);
+        WTFLogAlways("Scrolling state tree %p with no root node\n", tree);
         return;
     }
 
     String output = rootNode->scrollingStateTreeAsText(WebCore::ScrollingStateTreeAsTextBehaviorDebug);
-    fprintf(stderr, "%s\n", output.utf8().data());
+    WTFLogAlways("%s\n", output.utf8().data());
 }
 
 void showScrollingStateTree(const WebCore::ScrollingStateNode* node)

Modified: trunk/Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp (218372 => 218373)


--- trunk/Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -268,7 +268,7 @@
     UInt32 bufferSize = 0;
     UInt32 dataSize = sizeof(bufferSize);
     AudioUnitGetProperty(audioOutput->m_outputUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 0, (void*)&bufferSize, &dataSize);
-    fprintf(stderr, ">>>> frameSizeChanged = %lu\n", static_cast<unsigned long>(bufferSize));
+    WTFLogAlways(">>>> frameSizeChanged = %lu\n", static_cast<unsigned long>(bufferSize));
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp (218372 => 218373)


--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -970,6 +970,6 @@
         return;
 
     String output = layer->layerTreeAsText(WebCore::LayerTreeAsTextDebug | WebCore::LayerTreeAsTextIncludeVisibleRects | WebCore::LayerTreeAsTextIncludeTileCaches | WebCore::LayerTreeAsTextIncludeContentLayers);
-    fprintf(stderr, "%s\n", output.utf8().data());
+    WTFLogAlways("%s\n", output.utf8().data());
 }
 #endif

Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.cpp (218372 => 218373)


--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -44,7 +44,7 @@
 
 void DisplayList::dump() const
 {
-    fprintf(stderr, "%s", description().data());
+    WTFLogAlways("%s", description().data());
 }
 #endif
 

Modified: trunk/Source/WebCore/platform/ios/wak/WAKView.mm (218372 => 218373)


--- trunk/Source/WebCore/platform/ios/wak/WAKView.mm	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/platform/ios/wak/WAKView.mm	2017-06-16 01:39:31 UTC (rev 218373)
@@ -211,7 +211,7 @@
     ASSERT(_viewRef);
     if (_viewRef->isa.classInfo == &WKViewClassInfo)
         return [[[WAKView alloc] _initWithViewRef:_viewRef] autorelease];
-    WKError ("unable to create wrapper for %s\n", _viewRef->isa.classInfo->name);
+    WKError("unable to create wrapper for %s\n", _viewRef->isa.classInfo->name);
     return nil;
 }
 
@@ -542,7 +542,7 @@
 {
     CGContextRef context = WKGetCurrentGraphicsContext();
     if (!context) {
-        WKError ("unable to get context for view");
+        WKError("unable to get context for view");
         return;
     }
 
@@ -557,7 +557,7 @@
 - (void)displayRectIgnoringOpacity:(NSRect)rect inContext:(CGContextRef)context
 {
     if (!context) {
-        WKError ("invalid parameter: context must not be NULL");
+        WKError("invalid parameter: context must not be NULL");
         return;
     }
 

Modified: trunk/Source/WebCore/platform/ios/wak/WKUtilities.c (218372 => 218373)


--- trunk/Source/WebCore/platform/ios/wak/WKUtilities.c	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/platform/ios/wak/WKUtilities.c	2017-06-16 01:39:31 UTC (rev 218373)
@@ -59,7 +59,7 @@
     WKObjectRef object = (WKObjectRef)(uintptr_t)o;
 
     if (object->referenceCount == 0) {
-        WKError ("attempt to release invalid object");
+        WKError("attempt to release invalid object");
         return;
     }
     

Modified: trunk/Source/WebCore/platform/ios/wak/WKView.mm (218372 => 218373)


--- trunk/Source/WebCore/platform/ios/wak/WKView.mm	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/platform/ios/wak/WKView.mm	2017-06-16 01:39:31 UTC (rev 218373)
@@ -117,7 +117,7 @@
 void _WKViewSetViewContext (WKViewRef view, WKViewContext *context)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return;
     }
     view->context = context;
@@ -126,7 +126,7 @@
 CGRect WKViewGetBounds (WKViewRef view)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return CGRectZero;
     }
     
@@ -136,7 +136,7 @@
 CGRect WKViewGetFrame (WKViewRef view)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return CGRectZero;
     }
     
@@ -156,7 +156,7 @@
 static void _WKViewRecursivelyInvalidateGState(WKViewRef view)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return;
     }
 
@@ -173,7 +173,7 @@
 void WKViewSetFrameOrigin (WKViewRef view, CGPoint newOrigin)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return;
     }
     
@@ -322,7 +322,7 @@
 void WKViewSetFrameSize (WKViewRef view, CGSize newSize)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return;
     }
     
@@ -386,7 +386,7 @@
 WAKWindow *WKViewGetWindow (WKViewRef view)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return 0;
     }
     
@@ -396,7 +396,7 @@
 CFArrayRef WKViewGetSubviews (WKViewRef view)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return 0;
     }
     
@@ -406,7 +406,7 @@
 void WKViewAddSubview (WKViewRef view, WKViewRef subview)
 {
     if (!view || !subview) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return;
     }
     
@@ -423,7 +423,7 @@
 void WKViewRemoveFromSuperview (WKViewRef view)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return;
     }
 
@@ -435,13 +435,13 @@
     
     CFMutableArrayRef svs = view->superview->subviews;
     if (!svs) {
-        WKError ("superview has no subviews");
+        WKError("superview has no subviews");
         return;
     }
 
     CFIndex index = WKArrayIndexOfValue (svs, view);
     if (index < 0) {
-        WKError ("view not in superview subviews");
+        WKError("view not in superview subviews");
         return;
     }
 
@@ -455,7 +455,7 @@
 WKViewRef WKViewFirstChild (WKViewRef view)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return 0;
     }
 
@@ -474,7 +474,7 @@
 WKViewRef WKViewNextSibling (WKViewRef view)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return 0;
     }
 
@@ -487,7 +487,7 @@
         
     CFIndex thisIndex = WKArrayIndexOfValue (svs, view);
     if (thisIndex < 0) {
-        WKError ("internal error, view is not present in superview subviews");
+        WKError("internal error, view is not present in superview subviews");
         return 0;
     }
     
@@ -502,7 +502,7 @@
 WKViewRef WKViewTraverseNext(WKViewRef view)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return 0;
     }
 
@@ -538,7 +538,7 @@
 CGRect WKViewGetVisibleRect(WKViewRef viewRef)
 {
     if (!viewRef) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return CGRectZero;
     }
 
@@ -564,7 +564,7 @@
 CGRect WKViewConvertRectToSuperview(WKViewRef view, CGRect r)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return CGRectZero;
     }
     
@@ -574,7 +574,7 @@
 CGRect WKViewConvertRectToBase(WKViewRef view, CGRect r)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return CGRectZero;
     }
 
@@ -591,7 +591,7 @@
 CGPoint WKViewConvertPointToSuperview(WKViewRef view, CGPoint p)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return CGPointZero;
     }
 
@@ -601,7 +601,7 @@
 CGPoint WKViewConvertPointFromSuperview(WKViewRef view, CGPoint p)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return CGPointZero;
     }
     
@@ -612,7 +612,7 @@
 CGPoint WKViewConvertPointToBase(WKViewRef view, CGPoint p)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return CGPointZero;
     }
 
@@ -637,7 +637,7 @@
     while (superview) {
         views[count++] = superview;
         if (count >= maxViews) {
-            WKError ("Exceeded maxViews, use malloc/realloc");
+            WKError("Exceeded maxViews, use malloc/realloc");
             *viewCount = 0;
             return;
         }
@@ -649,7 +649,7 @@
 CGPoint WKViewConvertPointFromBase(WKViewRef view, CGPoint p)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return CGPointZero;
     }
 
@@ -672,7 +672,7 @@
 CGRect WKViewConvertRectFromSuperview(WKViewRef view, CGRect r)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return CGRectZero;
     }
     
@@ -683,7 +683,7 @@
 CGRect WKViewConvertRectFromBase(WKViewRef view, CGRect r)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return CGRectZero;
     }
 
@@ -730,7 +730,7 @@
 unsigned int WKViewGetAutoresizingMask(WKViewRef view)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return 0;
     }    
     return view->autoresizingMask;
@@ -739,7 +739,7 @@
 void WKViewSetAutoresizingMask (WKViewRef view, unsigned int mask)
 {
     if (!view) {
-        WKError ("invalid parameter");
+        WKError("invalid parameter");
         return;
     }    
     view->autoresizingMask = mask;

Modified: trunk/Source/WebCore/platform/text/TextEncodingRegistry.cpp (218372 => 218373)


--- trunk/Source/WebCore/platform/text/TextEncodingRegistry.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/platform/text/TextEncodingRegistry.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -391,7 +391,7 @@
 void dumpTextEncodingNameMap()
 {
     unsigned size = textEncodingNameMap->size();
-    fprintf(stderr, "Dumping %u entries in WebCore::textEncodingNameMap...\n", size);
+    WTFLogAlways("Dumping %u entries in WebCore::textEncodingNameMap...\n", size);
 
     std::lock_guard<StaticLock> lock(encodingRegistryMutex);
 
@@ -398,7 +398,7 @@
     TextEncodingNameMap::const_iterator it = textEncodingNameMap->begin();
     TextEncodingNameMap::const_iterator end = textEncodingNameMap->end();
     for (; it != end; ++it)
-        fprintf(stderr, "'%s' => '%s'\n", it->key, it->value);
+        WTFLogAlways("'%s' => '%s'\n", it->key, it->value);
 }
 #endif
 

Modified: trunk/Source/WebCore/rendering/CounterNode.cpp (218372 => 218373)


--- trunk/Source/WebCore/rendering/CounterNode.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/rendering/CounterNode.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -336,10 +336,10 @@
         root = root->parent();
 
     for (const CounterNode* current = root; current; current = current->nextInPreOrder()) {
-        fprintf(stderr, "%c", (current == node) ? '*' : ' ');
+        WTFLogAlways("%c", (current == node) ? '*' : ' ');
         for (const CounterNode* parent = current; parent && parent != root; parent = parent->parent())
-            fprintf(stderr, "    ");
-        fprintf(stderr, "%p %s: %d %d P:%p PS:%p NS:%p R:%p\n",
+            WTFLogAlways("    ");
+        WTFLogAlways("%p %s: %d %d P:%p PS:%p NS:%p R:%p\n",
             current, current->actsAsReset() ? "reset____" : "increment", current->value(),
             current->countInParent(), current->parent(), current->previousSibling(),
             current->nextSibling(), &current->owner());

Modified: trunk/Source/WebCore/rendering/InlineBox.cpp (218372 => 218373)


--- trunk/Source/WebCore/rendering/InlineBox.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/rendering/InlineBox.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -107,15 +107,15 @@
 
 void InlineBox::showLineBox(bool mark, int depth) const
 {
-    fprintf(stderr, "-------- %c-", isDirty() ? 'D' : '-');
+    WTFLogAlways("-------- %c-", isDirty() ? 'D' : '-');
     int printedCharacters = 0;
     if (mark) {
-        fprintf(stderr, "*");
+        WTFLogAlways("*");
         ++printedCharacters;
     }
     while (++printedCharacters <= depth * 2)
         fputc(' ', stderr);
-    fprintf(stderr, "%s  (%.2f, %.2f) (%.2f, %.2f) (%p) renderer->(%p)\n", boxName(), x(), y(), width(), height(), this, &renderer());
+    WTFLogAlways("%s  (%.2f, %.2f) (%.2f, %.2f) (%p) renderer->(%p)\n", boxName(), x(), y(), width(), height(), this, &renderer());
 }
 
 #endif // ENABLE(TREE_DEBUGGING)

Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (218372 => 218373)


--- trunk/Source/WebCore/rendering/InlineTextBox.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -1125,11 +1125,11 @@
 
 void InlineTextBox::showLineBox(bool mark, int depth) const
 {
-    fprintf(stderr, "-------- %c-", isDirty() ? 'D' : '-');
+    WTFLogAlways("-------- %c-", isDirty() ? 'D' : '-');
 
     int printedCharacters = 0;
     if (mark) {
-        fprintf(stderr, "*");
+        WTFLogAlways("*");
         ++printedCharacters;
     }
     while (++printedCharacters <= depth * 2)
@@ -1139,7 +1139,7 @@
     value = value.substring(start(), len());
     value.replaceWithLiteral('\\', "\\\\");
     value.replaceWithLiteral('\n', "\\n");
-    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());
+    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());
 }
 
 #endif

Modified: trunk/Source/WebCore/rendering/RenderCounter.cpp (218372 => 218373)


--- trunk/Source/WebCore/rendering/RenderCounter.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/rendering/RenderCounter.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -610,10 +610,10 @@
     for (const WebCore::RenderObject* current = root; current; current = current->nextInPreOrder()) {
         if (!is<WebCore::RenderElement>(*current))
             continue;
-        fprintf(stderr, "%c", (current == renderer) ? '*' : ' ');
+        WTFLogAlways("%c", (current == renderer) ? '*' : ' ');
         for (const WebCore::RenderObject* parent = current; parent && parent != root; parent = parent->parent())
-            fprintf(stderr, "    ");
-        fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n",
+            WTFLogAlways("    ");
+        WTFLogAlways("%p N:%p P:%p PS:%p NS:%p C:%p\n",
             current, current->node(), current->parent(), current->previousSibling(),
             current->nextSibling(), downcast<WebCore::RenderElement>(*current).hasCounterNodeMap() ?
             counterName ? WebCore::counterMaps().get(downcast<WebCore::RenderElement>(current))->get(identifier) : (WebCore::CounterNode*)1 : (WebCore::CounterNode*)0);

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (218372 => 218373)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -7229,7 +7229,7 @@
         return;
 
     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);
-    fprintf(stderr, "\n%s\n", output.utf8().data());
+    WTFLogAlways("\n%s\n", output.utf8().data());
 }
 
 void showLayerTree(const WebCore::RenderObject* renderer)

Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (218372 => 218373)


--- trunk/Source/WebCore/rendering/RenderObject.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -1009,7 +1009,7 @@
 
 static void showRenderTreeLegend()
 {
-    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");
+    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");
 }
 
 void RenderObject::showNodeTreeForThis() const
@@ -1072,7 +1072,7 @@
     RenderRegion* startRegion = nullptr;
     RenderRegion* endRegion = nullptr;
     ftcb->getRegionRangeForBox(downcast<RenderBox>(this), startRegion, endRegion);
-    fprintf(stderr, " [Rs:%p Re:%p]", startRegion, endRegion);
+    WTFLogAlways(" [Rs:%p Re:%p]", startRegion, endRegion);
 }
 
 void RenderObject::showRenderObject(bool mark, int depth) const
@@ -1142,7 +1142,7 @@
 
     int printedCharacters = 0;
     if (mark) {
-        fprintf(stderr, "*");
+        WTFLogAlways("*");
         ++printedCharacters;
     }
 
@@ -1150,15 +1150,15 @@
         fputc(' ', stderr);
 
     if (node())
-        fprintf(stderr, "%s ", node()->nodeName().utf8().data());
+        WTFLogAlways("%s ", node()->nodeName().utf8().data());
 
     String name = renderName();
     // FIXME: Renderer's name should not include property value listing.
     int pos = name.find('(');
     if (pos > 0)
-        fprintf(stderr, "%s", name.left(pos - 1).utf8().data());
+        WTFLogAlways("%s", name.left(pos - 1).utf8().data());
     else
-        fprintf(stderr, "%s", name.utf8().data());
+        WTFLogAlways("%s", name.utf8().data());
 
     if (is<RenderBox>(*this)) {
         auto& renderBox = downcast<RenderBox>(*this);
@@ -1165,18 +1165,18 @@
         FloatRect boxRect = renderBox.frameRect();
         if (renderBox.isInFlowPositioned())
             boxRect.move(renderBox.offsetForInFlowPosition());
-        fprintf(stderr, "  (%.2f, %.2f) (%.2f, %.2f)", boxRect.x(), boxRect.y(), boxRect.width(), boxRect.height());
+        WTFLogAlways("  (%.2f, %.2f) (%.2f, %.2f)", boxRect.x(), boxRect.y(), boxRect.width(), boxRect.height());
     } else if (is<RenderInline>(*this) && isInFlowPositioned()) {
         FloatSize inlineOffset = downcast<RenderInline>(*this).offsetForInFlowPosition();
-        fprintf(stderr, "  (%.2f, %.2f)", inlineOffset.width(), inlineOffset.height());
+        WTFLogAlways("  (%.2f, %.2f)", inlineOffset.width(), inlineOffset.height());
     }
 
-    fprintf(stderr, " renderer->(%p)", this);
+    WTFLogAlways(" renderer->(%p)", this);
     if (node()) {
-        fprintf(stderr, " node->(%p)", node());
+        WTFLogAlways(" node->(%p)", node());
         if (node()->isTextNode()) {
             String value = node()->nodeValue();
-            fprintf(stderr, " length->(%u)", value.length());
+            WTFLogAlways(" length->(%u)", value.length());
 
             value.replaceWithLiteral('\\', "\\\\");
             value.replaceWithLiteral('\n', "\\n");
@@ -1184,31 +1184,31 @@
             const int maxPrintedLength = 80;
             if (value.length() > maxPrintedLength) {
                 String substring = value.substring(0, maxPrintedLength);
-                fprintf(stderr, " \"%s\"...", substring.utf8().data());
+                WTFLogAlways(" \"%s\"...", substring.utf8().data());
             } else
-                fprintf(stderr, " \"%s\"", value.utf8().data());
+                WTFLogAlways(" \"%s\"", value.utf8().data());
         }
     }
     if (is<RenderBoxModelObject>(*this)) {
         auto& renderer = downcast<RenderBoxModelObject>(*this);
         if (renderer.hasContinuation())
-            fprintf(stderr, " continuation->(%p)", renderer.continuation());
+            WTFLogAlways(" continuation->(%p)", renderer.continuation());
     }
     showRegionsInformation();
     if (needsLayout()) {
-        fprintf(stderr, " layout->");
+        WTFLogAlways(" layout->");
         if (selfNeedsLayout())
-            fprintf(stderr, "[self]");
+            WTFLogAlways("[self]");
         if (normalChildNeedsLayout())
-            fprintf(stderr, "[normal child]");
+            WTFLogAlways("[normal child]");
         if (posChildNeedsLayout())
-            fprintf(stderr, "[positioned child]");
+            WTFLogAlways("[positioned child]");
         if (needsSimplifiedNormalFlowLayout())
-            fprintf(stderr, "[simplified]");
+            WTFLogAlways("[simplified]");
         if (needsPositionedMovementLayout())
-            fprintf(stderr, "[positioned movement]");
+            WTFLogAlways("[positioned movement]");
     }
-    fprintf(stderr, "\n");
+    WTFLogAlways("\n");
 }
 
 void RenderObject::showRenderSubTreeAndMark(const RenderObject* markedObject, int depth) const
@@ -2017,8 +2017,8 @@
         if (!document->renderView())
             continue;
         if (document->frame() && document->frame()->isMainFrame())
-            fprintf(stderr, "----------------------main frame--------------------------\n");
-        fprintf(stderr, "%s", document->url().string().utf8().data());
+            WTFLogAlways("----------------------main frame--------------------------\n");
+        WTFLogAlways("%s", document->url().string().utf8().data());
         showRenderTree(document->renderView());
     }
 }
@@ -2029,8 +2029,8 @@
         if (!document->renderView())
             continue;
         if (document->frame() && document->frame()->isMainFrame())
-            fprintf(stderr, "----------------------main frame--------------------------\n");
-        fprintf(stderr, "%s", document->url().string().utf8().data());
+            WTFLogAlways("----------------------main frame--------------------------\n");
+        WTFLogAlways("%s", document->url().string().utf8().data());
         showLayerTree(document->renderView());
     }
 }

Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp (218372 => 218373)


--- trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -263,7 +263,7 @@
 #if ENABLE(TREE_DEBUGGING)
 static void printPrefix(int& printedCharacters, int depth)
 {
-    fprintf(stderr, "-------- --");
+    WTFLogAlways("-------- --");
     printedCharacters = 0;
     while (++printedCharacters <= depth * 2)
         fputc(' ', stderr);
@@ -274,7 +274,7 @@
     int printedCharacters = 0;
     printPrefix(printedCharacters, depth);
 
-    fprintf(stderr, "SimpleLineLayout (%u lines, %u runs) (%p)\n", layout.lineCount(), layout.runCount(), &layout);
+    WTFLogAlways("SimpleLineLayout (%u lines, %u runs) (%p)\n", layout.lineCount(), layout.runCount(), &layout);
     ++depth;
 
     for (auto run : runResolver(flow, layout)) {
@@ -281,11 +281,11 @@
         FloatRect rect = run.rect();
         printPrefix(printedCharacters, depth);
         if (run.start() < run.end()) {
-            fprintf(stderr, "line %u run(%u, %u) (%.2f, %.2f) (%.2f, %.2f) \"%s\"\n", run.lineIndex(), run.start(), run.end(),
+            WTFLogAlways("line %u run(%u, %u) (%.2f, %.2f) (%.2f, %.2f) \"%s\"\n", run.lineIndex(), run.start(), run.end(),
                 rect.x(), rect.y(), rect.width(), rect.height(), run.text().toStringWithoutCopying().utf8().data());
         } else {
             ASSERT(run.start() == run.end());
-            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());
+            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());
         }
     }
 }

Modified: trunk/Source/WebCore/rendering/svg/SVGResources.cpp (218372 => 218373)


--- trunk/Source/WebCore/rendering/svg/SVGResources.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/rendering/svg/SVGResources.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -656,38 +656,38 @@
     ASSERT(object);
     ASSERT(object->node());
 
-    fprintf(stderr, "-> this=%p, SVGResources(renderer=%p, node=%p)\n", this, object, object->node());
-    fprintf(stderr, " | DOM Tree:\n");
+    WTFLogAlways("-> this=%p, SVGResources(renderer=%p, node=%p)\n", this, object, object->node());
+    WTFLogAlways(" | DOM Tree:\n");
     object->node()->showTreeForThis();
 
-    fprintf(stderr, "\n | List of resources:\n");
+    WTFLogAlways("\n | List of resources:\n");
     if (m_clipperFilterMaskerData) {
         if (RenderSVGResourceClipper* clipper = m_clipperFilterMaskerData->clipper)
-            fprintf(stderr, " |-> Clipper    : %p (node=%p)\n", clipper, &clipper->clipPathElement());
+            WTFLogAlways(" |-> Clipper    : %p (node=%p)\n", clipper, &clipper->clipPathElement());
         if (RenderSVGResourceFilter* filter = m_clipperFilterMaskerData->filter)
-            fprintf(stderr, " |-> Filter     : %p (node=%p)\n", filter, &filter->filterElement());
+            WTFLogAlways(" |-> Filter     : %p (node=%p)\n", filter, &filter->filterElement());
         if (RenderSVGResourceMasker* masker = m_clipperFilterMaskerData->masker)
-            fprintf(stderr, " |-> Masker     : %p (node=%p)\n", masker, &masker->maskElement());
+            WTFLogAlways(" |-> Masker     : %p (node=%p)\n", masker, &masker->maskElement());
     }
 
     if (m_markerData) {
         if (RenderSVGResourceMarker* markerStart = m_markerData->markerStart)
-            fprintf(stderr, " |-> MarkerStart: %p (node=%p)\n", markerStart, &markerStart->markerElement());
+            WTFLogAlways(" |-> MarkerStart: %p (node=%p)\n", markerStart, &markerStart->markerElement());
         if (RenderSVGResourceMarker* markerMid = m_markerData->markerMid)
-            fprintf(stderr, " |-> MarkerMid  : %p (node=%p)\n", markerMid, &markerMid->markerElement());
+            WTFLogAlways(" |-> MarkerMid  : %p (node=%p)\n", markerMid, &markerMid->markerElement());
         if (RenderSVGResourceMarker* markerEnd = m_markerData->markerEnd)
-            fprintf(stderr, " |-> MarkerEnd  : %p (node=%p)\n", markerEnd, &markerEnd->markerElement());
+            WTFLogAlways(" |-> MarkerEnd  : %p (node=%p)\n", markerEnd, &markerEnd->markerElement());
     }
 
     if (m_fillStrokeData) {
         if (RenderSVGResourceContainer* fill = m_fillStrokeData->fill)
-            fprintf(stderr, " |-> Fill       : %p (node=%p)\n", fill, &fill->element());
+            WTFLogAlways(" |-> Fill       : %p (node=%p)\n", fill, &fill->element());
         if (RenderSVGResourceContainer* stroke = m_fillStrokeData->stroke)
-            fprintf(stderr, " |-> Stroke     : %p (node=%p)\n", stroke, &stroke->element());
+            WTFLogAlways(" |-> Stroke     : %p (node=%p)\n", stroke, &stroke->element());
     }
 
     if (m_linkedResource)
-        fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, &m_linkedResource->element());
+        WTFLogAlways(" |-> xlink:href : %p (node=%p)\n", m_linkedResource, &m_linkedResource->element());
 }
 #endif
 

Modified: trunk/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp (218372 => 218373)


--- trunk/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -142,7 +142,7 @@
         for (RenderObject* resource : localResources)
             LOG_DEBUG_CYCLE("|> %s : %p (node %p)\n", resource->renderName(), resource, resource->node());
 
-        fprintf(stderr, "Parent resources:\n");
+        WTFLogAlways("Parent resources:\n");
         for (RenderObject* resource : ancestorResources)
             LOG_DEBUG_CYCLE("|> %s : %p (node %p)\n", resource->renderName(), resource, resource->node());
     }

Modified: trunk/Source/WebCore/rendering/svg/SVGTextLayoutAttributes.cpp (218372 => 218373)


--- trunk/Source/WebCore/rendering/svg/SVGTextLayoutAttributes.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/rendering/svg/SVGTextLayoutAttributes.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -45,29 +45,29 @@
 static inline void dumpSVGCharacterDataMapValue(const char* identifier, float value, bool appendSpace = true)
 {
     if (value == SVGTextLayoutAttributes::emptyValue()) {
-        fprintf(stderr, "%s=x", identifier);
+        WTFLogAlways("%s=x", identifier);
         if (appendSpace)
-            fprintf(stderr, " ");
+            WTFLogAlways(" ");
         return;
     }
-    fprintf(stderr, "%s=%lf", identifier, value);
+    WTFLogAlways("%s=%lf", identifier, value);
     if (appendSpace)
-        fprintf(stderr, " ");
+        WTFLogAlways(" ");
 }
 
 void SVGTextLayoutAttributes::dump() const
 {
-    fprintf(stderr, "context: %p\n", &m_context);
+    WTFLogAlways("context: %p\n", &m_context);
     const SVGCharacterDataMap::const_iterator end = m_characterDataMap.end();
     for (SVGCharacterDataMap::const_iterator it = m_characterDataMap.begin(); it != end; ++it) {
         const SVGCharacterData& data = ""
-        fprintf(stderr, " ---> pos=%i, data="" it->key);
+        WTFLogAlways(" ---> pos=%i, data="" it->key);
         dumpSVGCharacterDataMapValue("x", data.x);
         dumpSVGCharacterDataMapValue("y", data.y);
         dumpSVGCharacterDataMapValue("dx", data.dx);
         dumpSVGCharacterDataMapValue("dy", data.dy);
         dumpSVGCharacterDataMapValue("rotate", data.rotate, false);
-        fprintf(stderr, "}\n");
+        WTFLogAlways("}\n");
     }
 }
 

Modified: trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp (218372 => 218373)


--- trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp	2017-06-16 01:07:59 UTC (rev 218372)
+++ trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp	2017-06-16 01:39:31 UTC (rev 218373)
@@ -235,14 +235,14 @@
 static inline void dumpTextBoxes(Vector<SVGInlineTextBox*>& boxes)
 {
     unsigned boxCount = boxes.size();
-    fprintf(stderr, "Dumping all text fragments in text sub tree, %i boxes\n", boxCount);
+    WTFLogAlways("Dumping all text fragments in text sub tree, %i boxes\n", boxCount);
 
     for (unsigned boxPosition = 0; boxPosition < boxCount; ++boxPosition) {
         SVGInlineTextBox* textBox = boxes.at(boxPosition);
         Vector<SVGTextFragment>& fragments = textBox->textFragments();
-        fprintf(stderr, "-> Box %i: Dumping text fragments for SVGInlineTextBox, textBox=%p, textRenderer=%p\n", boxPosition, textBox, textBox->renderer());
-        fprintf(stderr, "        textBox properties, start=%i, len=%i, box direction=%i\n", textBox->start(), textBox->len(), textBox->direction());
-        fprintf(stderr, "   textRenderer properties, textLength=%i\n", textBox->renderer()->textLength());
+        WTFLogAlways("-> Box %i: Dumping text fragments for SVGInlineTextBox, textBox=%p, textRenderer=%p\n", boxPosition, textBox, textBox->renderer());
+        WTFLogAlways("        textBox properties, start=%i, len=%i, box direction=%i\n", textBox->start(), textBox->len(), textBox->direction());
+        WTFLogAlways("   textRenderer properties, textLength=%i\n", textBox->renderer()->textLength());
 
         const UChar* characters = textBox->renderer()->characters();
 
@@ -250,7 +250,7 @@
         for (unsigned i = 0; i < fragmentCount; ++i) {
             SVGTextFragment& fragment = fragments.at(i);
             String fragmentString(characters + fragment.characterOffset, fragment.length);
-            fprintf(stderr, "    -> Fragment %i, x=%lf, y=%lf, width=%lf, height=%lf, characterOffset=%i, length=%i, characters='%s'\n"
+            WTFLogAlways("    -> Fragment %i, x=%lf, y=%lf, width=%lf, height=%lf, characterOffset=%i, length=%i, characters='%s'\n"
                           , i, fragment.x, fragment.y, fragment.width, fragment.height, fragment.characterOffset, fragment.length, fragmentString.utf8().data());
         }
     }
@@ -290,7 +290,7 @@
     // Finalize transform matrices, after the chunk layout corrections have been applied, and all fragment x/y positions are finalized.
     if (!m_lineLayoutBoxes.isEmpty()) {
 #if DUMP_TEXT_FRAGMENTS > 0
-        fprintf(stderr, "Line layout: ");
+        WTFLogAlways("Line layout: ");
         dumpTextBoxes(m_lineLayoutBoxes);
 #endif
 
@@ -299,7 +299,7 @@
 
     if (!m_pathLayoutBoxes.isEmpty()) {
 #if DUMP_TEXT_FRAGMENTS > 0
-        fprintf(stderr, "Path layout: ");
+        WTFLogAlways("Path layout: ");
         dumpTextBoxes(m_pathLayoutBoxes);
 #endif
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to