Diff
Modified: trunk/Source/WebCore/ChangeLog (225226 => 225227)
--- trunk/Source/WebCore/ChangeLog 2017-11-28 18:50:59 UTC (rev 225226)
+++ trunk/Source/WebCore/ChangeLog 2017-11-28 18:54:05 UTC (rev 225227)
@@ -1,3 +1,23 @@
+2017-11-28 Simon Fraser <[email protected]>
+
+ Use the TextStream indent manipulator in more places
+ https://bugs.webkit.org/show_bug.cgi?id=180065
+
+ Reviewed by Sam Weinig.
+
+ Replace writeIndent() with << indent, and use an IndentScope in a few places.
+
+ * dom/ViewportArguments.cpp:
+ (WebCore::operator<<):
+ * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
+ (WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):
+ * page/scrolling/ScrollingStateNode.cpp:
+ (WebCore::ScrollingStateNode::dump const):
+ * platform/graphics/FloatRoundedRect.cpp:
+ (WebCore::operator<<):
+ * platform/graphics/transforms/TransformationMatrix.cpp:
+ (WebCore::operator<<):
+
2017-11-28 Noah Chase <[email protected]>
Web Audio's AnalyserNode.fftSize cannot be greater than 2048 in Safari; spec says it can be up to 32768
Modified: trunk/Source/WebCore/dom/ViewportArguments.cpp (225226 => 225227)
--- trunk/Source/WebCore/dom/ViewportArguments.cpp 2017-11-28 18:50:59 UTC (rev 225226)
+++ trunk/Source/WebCore/dom/ViewportArguments.cpp 2017-11-28 18:54:05 UTC (rev 225227)
@@ -473,21 +473,12 @@
TextStream& operator<<(TextStream& ts, const ViewportArguments& viewportArguments)
{
- ts.increaseIndent();
+ TextStream::IndentScope indentScope(ts);
- ts << "\n";
- ts.writeIndent();
- ts << "(width " << viewportArguments.width << ", minWidth " << viewportArguments.minWidth << ", maxWidth " << viewportArguments.maxWidth << ")";
+ ts << "\n" << indent << "(width " << viewportArguments.width << ", minWidth " << viewportArguments.minWidth << ", maxWidth " << viewportArguments.maxWidth << ")";
+ ts << "\n" << indent << "(height " << viewportArguments.height << ", minHeight " << viewportArguments.minHeight << ", maxHeight " << viewportArguments.maxHeight << ")";
+ ts << "\n" << indent << "(zoom " << viewportArguments.zoom << ", minZoom " << viewportArguments.minZoom << ", maxZoom " << viewportArguments.maxZoom << ")";
- ts << "\n";
- ts.writeIndent();
- ts << "(height " << viewportArguments.height << ", minHeight " << viewportArguments.minHeight << ", maxHeight " << viewportArguments.maxHeight << ")";
-
- ts << "\n";
- ts.writeIndent();
- ts << "(zoom " << viewportArguments.zoom << ", minZoom " << viewportArguments.minZoom << ", maxZoom " << viewportArguments.maxZoom << ")";
- ts.decreaseIndent();
-
return ts;
}
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp (225226 => 225227)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp 2017-11-28 18:50:59 UTC (rev 225226)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp 2017-11-28 18:54:05 UTC (rev 225227)
@@ -286,8 +286,7 @@
ts << "asynchronous event dispatch region";
for (auto rect : m_eventTrackingRegions.asynchronousDispatchRegion.rects()) {
ts << "\n";
- ts.writeIndent();
- ts << rect;
+ ts << indent << rect;
}
}
@@ -297,8 +296,7 @@
ts << "synchronous event dispatch region for event " << synchronousEventRegion.key;
for (auto rect : synchronousEventRegion.value.rects()) {
ts << "\n";
- ts.writeIndent();
- ts << rect;
+ ts << indent << rect;
}
}
}
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp (225226 => 225227)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp 2017-11-28 18:50:59 UTC (rev 225226)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp 2017-11-28 18:54:05 UTC (rev 225227)
@@ -122,28 +122,25 @@
void ScrollingStateNode::dump(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const
{
ts << "\n";
- ts.writeIndent();
- ts << "(";
+ ts << indent << "(";
ts.increaseIndent();
dumpProperties(ts, behavior);
if (m_children) {
ts << "\n";
- ts.writeIndent();
- ts << "(";
- ts.increaseIndent();
- ts << "children " << children()->size();
- for (auto& child : *m_children)
- child->dump(ts, behavior);
- ts << "\n";
- ts.decreaseIndent();
- ts.writeIndent();
- ts << ")";
+ ts << indent <<"(";
+ {
+ TextStream::IndentScope indentScope(ts);
+ ts << "children " << children()->size();
+ for (auto& child : *m_children)
+ child->dump(ts, behavior);
+ ts << "\n";
+ }
+ ts << indent << ")";
}
ts << "\n";
ts.decreaseIndent();
- ts.writeIndent();
- ts << ")";
+ ts << indent << ")";
}
String ScrollingStateNode::scrollingStateTreeAsText(ScrollingStateTreeAsTextBehavior behavior) const
Modified: trunk/Source/WebCore/platform/graphics/FloatRoundedRect.cpp (225226 => 225227)
--- trunk/Source/WebCore/platform/graphics/FloatRoundedRect.cpp 2017-11-28 18:50:59 UTC (rev 225226)
+++ trunk/Source/WebCore/platform/graphics/FloatRoundedRect.cpp 2017-11-28 18:54:05 UTC (rev 225227)
@@ -207,17 +207,11 @@
{
ts << roundedRect.rect().x() << " " << roundedRect.rect().y() << " " << roundedRect.rect().width() << " " << roundedRect.rect().height() << "\n";
- ts.increaseIndent();
- ts.writeIndent();
- ts << "topLeft=" << roundedRect.topLeftCorner().width() << " " << roundedRect.topLeftCorner().height() << "\n";
- ts.writeIndent();
- ts << "topRight=" << roundedRect.topRightCorner().width() << " " << roundedRect.topRightCorner().height() << "\n";
- ts.writeIndent();
- ts << "bottomLeft=" << roundedRect.bottomLeftCorner().width() << " " << roundedRect.bottomLeftCorner().height() << "\n";
- ts.writeIndent();
- ts << "bottomRight=" << roundedRect.bottomRightCorner().width() << " " << roundedRect.bottomRightCorner().height();
- ts.decreaseIndent();
-
+ TextStream::IndentScope indentScope(ts);
+ ts << indent << "topLeft=" << roundedRect.topLeftCorner().width() << " " << roundedRect.topLeftCorner().height() << "\n";
+ ts << indent << "topRight=" << roundedRect.topRightCorner().width() << " " << roundedRect.topRightCorner().height() << "\n";
+ ts << indent << "bottomLeft=" << roundedRect.bottomLeftCorner().width() << " " << roundedRect.bottomLeftCorner().height() << "\n";
+ ts << indent << "bottomRight=" << roundedRect.bottomRightCorner().width() << " " << roundedRect.bottomRightCorner().height();
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp (225226 => 225227)
--- trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp 2017-11-28 18:50:59 UTC (rev 225226)
+++ trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp 2017-11-28 18:54:05 UTC (rev 225227)
@@ -1772,17 +1772,12 @@
TextStream& operator<<(TextStream& ts, const TransformationMatrix& transform)
{
+ TextStream::IndentScope indentScope(ts);
ts << "\n";
- ts.increaseIndent();
- ts.writeIndent();
- ts << "[" << transform.m11() << " " << transform.m12() << " " << transform.m13() << " " << transform.m14() << "]\n";
- ts.writeIndent();
- ts << "[" << transform.m21() << " " << transform.m22() << " " << transform.m23() << " " << transform.m24() << "]\n";
- ts.writeIndent();
- ts << "[" << transform.m31() << " " << transform.m32() << " " << transform.m33() << " " << transform.m34() << "]\n";
- ts.writeIndent();
- ts << "[" << transform.m41() << " " << transform.m42() << " " << transform.m43() << " " << transform.m44() << "]";
- ts.decreaseIndent();
+ ts << indent << "[" << transform.m11() << " " << transform.m12() << " " << transform.m13() << " " << transform.m14() << "]\n";
+ ts << indent << "[" << transform.m21() << " " << transform.m22() << " " << transform.m23() << " " << transform.m24() << "]\n";
+ ts << indent << "[" << transform.m31() << " " << transform.m32() << " " << transform.m33() << " " << transform.m34() << "]\n";
+ ts << indent << "[" << transform.m41() << " " << transform.m42() << " " << transform.m43() << " " << transform.m44() << "]";
return ts;
}