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

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

<h3>Log Message</h3>
<pre>Add TextStream formatters for FillLayer and all it entails
https://bugs.webkit.org/show_bug.cgi?id=150312

Reviewed by Tim Horton.

Add TextStream output formatters for FillLayer, and all the enum
types used by it.

Drive-by fixes for CompositeOperator and BlendMode string conversions.
compositeOperatorNames was missing the &quot;difference&quot; string, and compositeOperatorName()
would do an OOB memory access if blendOp was zero.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/Length.cpp:
(WebCore::operator&lt;&lt;):
* platform/Length.h:
* platform/LengthSize.cpp: Added.
(WebCore::operator&lt;&lt;):
* platform/LengthSize.h:
* platform/text/TextStream.h:
* rendering/style/FillLayer.cpp:
(WebCore::operator&lt;&lt;):
* rendering/style/FillLayer.h:
* rendering/style/RenderStyleConstants.cpp: Added.
(WebCore::operator&lt;&lt;):
* rendering/style/RenderStyleConstants.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformLengthcpp">trunk/Source/WebCore/platform/Length.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformLengthh">trunk/Source/WebCore/platform/Length.h</a></li>
<li><a href="#trunkSourceWebCoreplatformLengthSizeh">trunk/Source/WebCore/platform/LengthSize.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsTypescpp">trunk/Source/WebCore/platform/graphics/GraphicsTypes.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsTypesh">trunk/Source/WebCore/platform/graphics/GraphicsTypes.h</a></li>
<li><a href="#trunkSourceWebCoreplatformtextTextStreamh">trunk/Source/WebCore/platform/text/TextStream.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleFillLayercpp">trunk/Source/WebCore/rendering/style/FillLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleFillLayerh">trunk/Source/WebCore/rendering/style/FillLayer.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleConstantsh">trunk/Source/WebCore/rendering/style/RenderStyleConstants.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformLengthSizecpp">trunk/Source/WebCore/platform/LengthSize.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleConstantscpp">trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (191309 => 191310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-10-19 19:53:45 UTC (rev 191309)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-10-19 20:07:37 UTC (rev 191310)
</span><span class="lines">@@ -2110,6 +2110,7 @@
</span><span class="cx">     platform/KillRingNone.cpp
</span><span class="cx">     platform/Language.cpp
</span><span class="cx">     platform/Length.cpp
</span><ins>+    platform/LengthSize.cpp
</ins><span class="cx">     platform/LinkHash.cpp
</span><span class="cx">     platform/Logging.cpp
</span><span class="cx">     platform/MIMETypeRegistry.cpp
</span><span class="lines">@@ -2534,6 +2535,7 @@
</span><span class="cx">     rendering/style/NinePieceImage.cpp
</span><span class="cx">     rendering/style/QuotesData.cpp
</span><span class="cx">     rendering/style/RenderStyle.cpp
</span><ins>+    rendering/style/RenderStyleConstants.cpp
</ins><span class="cx">     rendering/style/SVGRenderStyle.cpp
</span><span class="cx">     rendering/style/SVGRenderStyleDefs.cpp
</span><span class="cx">     rendering/style/ShadowData.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (191309 => 191310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-19 19:53:45 UTC (rev 191309)
+++ trunk/Source/WebCore/ChangeLog        2015-10-19 20:07:37 UTC (rev 191310)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2015-10-19  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Add TextStream formatters for FillLayer and all it entails
+        https://bugs.webkit.org/show_bug.cgi?id=150312
+
+        Reviewed by Tim Horton.
+
+        Add TextStream output formatters for FillLayer, and all the enum
+        types used by it.
+        
+        Drive-by fixes for CompositeOperator and BlendMode string conversions.
+        compositeOperatorNames was missing the &quot;difference&quot; string, and compositeOperatorName()
+        would do an OOB memory access if blendOp was zero.
+
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/Length.cpp:
+        (WebCore::operator&lt;&lt;):
+        * platform/Length.h:
+        * platform/LengthSize.cpp: Added.
+        (WebCore::operator&lt;&lt;):
+        * platform/LengthSize.h:
+        * platform/text/TextStream.h:
+        * rendering/style/FillLayer.cpp:
+        (WebCore::operator&lt;&lt;):
+        * rendering/style/FillLayer.h:
+        * rendering/style/RenderStyleConstants.cpp: Added.
+        (WebCore::operator&lt;&lt;):
+        * rendering/style/RenderStyleConstants.h:
+
</ins><span class="cx"> 2015-10-19  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         WKView being inside WKWebView leads to weird API issues
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (191309 => 191310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-10-19 19:53:45 UTC (rev 191309)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-10-19 20:07:37 UTC (rev 191310)
</span><span class="lines">@@ -580,6 +580,8 @@
</span><span class="cx">                 0FEA3E84191B31BF000F1B55 /* ScrollingStateOverflowScrollingNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEA3E82191B31BF000F1B55 /* ScrollingStateOverflowScrollingNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0FEA3E87191B3BD7000F1B55 /* ScrollingTreeFrameScrollingNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEA3E85191B3BD7000F1B55 /* ScrollingTreeFrameScrollingNode.cpp */; };
</span><span class="cx">                 0FEA3E88191B3BD7000F1B55 /* ScrollingTreeFrameScrollingNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEA3E86191B3BD7000F1B55 /* ScrollingTreeFrameScrollingNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                0FEF20CE1BD4A24100128E5D /* LengthSize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEF20CD1BD4A24100128E5D /* LengthSize.cpp */; };
+                0FEF20D01BD4A64F00128E5D /* RenderStyleConstants.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEF20CF1BD4A64F00128E5D /* RenderStyleConstants.cpp */; };
</ins><span class="cx">                 0FF5025B102BA9010066F39A /* DOMStyleMedia.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF50259102BA9010066F39A /* DOMStyleMedia.h */; };
</span><span class="cx">                 0FF5025C102BA9010066F39A /* DOMStyleMedia.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FF5025A102BA9010066F39A /* DOMStyleMedia.mm */; };
</span><span class="cx">                 0FF50263102BA92C0066F39A /* DOMStyleMediaInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF50262102BA92B0066F39A /* DOMStyleMediaInternal.h */; };
</span><span class="lines">@@ -7827,6 +7829,8 @@
</span><span class="cx">                 0FEA3E82191B31BF000F1B55 /* ScrollingStateOverflowScrollingNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingStateOverflowScrollingNode.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0FEA3E85191B3BD7000F1B55 /* ScrollingTreeFrameScrollingNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollingTreeFrameScrollingNode.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0FEA3E86191B3BD7000F1B55 /* ScrollingTreeFrameScrollingNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingTreeFrameScrollingNode.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                0FEF20CD1BD4A24100128E5D /* LengthSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LengthSize.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0FEF20CF1BD4A64F00128E5D /* RenderStyleConstants.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderStyleConstants.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 0FF50259102BA9010066F39A /* DOMStyleMedia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMStyleMedia.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0FF5025A102BA9010066F39A /* DOMStyleMedia.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMStyleMedia.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0FF50262102BA92B0066F39A /* DOMStyleMediaInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMStyleMediaInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -22056,6 +22060,7 @@
</span><span class="cx">                                 5A574F27131DB96D00471B88 /* QuotesData.h */,
</span><span class="cx">                                 BC8C8FAB0DDCD31B00B592F4 /* RenderStyle.cpp */,
</span><span class="cx">                                 BC8C8FAC0DDCD31B00B592F4 /* RenderStyle.h */,
</span><ins>+                                0FEF20CF1BD4A64F00128E5D /* RenderStyleConstants.cpp */,
</ins><span class="cx">                                 BC5EB6670E81CB7100B25965 /* RenderStyleConstants.h */,
</span><span class="cx">                                 BC5EB8C10E82031B00B25965 /* ShadowData.cpp */,
</span><span class="cx">                                 BC5EB8C20E82031B00B25965 /* ShadowData.h */,
</span><span class="lines">@@ -22398,6 +22403,7 @@
</span><span class="cx">                                 BCE65BE80EACDF16007E4533 /* Length.cpp */,
</span><span class="cx">                                 BCE65BE90EACDF16007E4533 /* Length.h */,
</span><span class="cx">                                 BCFF648F0EAD15C200C1D6F7 /* LengthBox.h */,
</span><ins>+                                0FEF20CD1BD4A24100128E5D /* LengthSize.cpp */,
</ins><span class="cx">                                 BCFF64900EAD15C200C1D6F7 /* LengthSize.h */,
</span><span class="cx">                                 A7AD2F850EC89D07008AB002 /* LinkHash.cpp */,
</span><span class="cx">                                 A7AD2F860EC89D07008AB002 /* LinkHash.h */,
</span><span class="lines">@@ -29733,6 +29739,7 @@
</span><span class="cx">                                 0705853317FDE6D9005F2BCB /* JSMediaTrackConstraints.cpp in Sources */,
</span><span class="cx">                                 0705853517FDE6D9005F2BCB /* JSMediaTrackConstraintSet.cpp in Sources */,
</span><span class="cx">                                 E107400D0E77BDC00033AF24 /* JSMessageChannel.cpp in Sources */,
</span><ins>+                                0FEF20CE1BD4A24100128E5D /* LengthSize.cpp in Sources */,
</ins><span class="cx">                                 E1A5F99B0E7EAA2500AF85EA /* JSMessageChannelCustom.cpp in Sources */,
</span><span class="cx">                                 75793EC80D0CE72D007FC0AC /* JSMessageEvent.cpp in Sources */,
</span><span class="cx">                                 410B7E721045FAB000D8224F /* JSMessageEventCustom.cpp in Sources */,
</span><span class="lines">@@ -30475,6 +30482,7 @@
</span><span class="cx">                                 D302754912A5FE84004BD828 /* RenderDetailsMarker.cpp in Sources */,
</span><span class="cx">                                 9B32CDAA13DF7FA900F34D13 /* RenderedPosition.cpp in Sources */,
</span><span class="cx">                                 E43A023D17EB3713004CDD25 /* RenderElement.cpp in Sources */,
</span><ins>+                                0FEF20D01BD4A64F00128E5D /* RenderStyleConstants.cpp in Sources */,
</ins><span class="cx">                                 0F5B7A5410F65D7A00376302 /* RenderEmbeddedObject.cpp in Sources */,
</span><span class="cx">                                 A8EA73C30A1900E300A8EF5F /* RenderFieldset.cpp in Sources */,
</span><span class="cx">                                 066C77300AB603FD00238CC4 /* RenderFileUploadControl.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLengthcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Length.cpp (191309 => 191310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Length.cpp        2015-10-19 19:53:45 UTC (rev 191309)
+++ trunk/Source/WebCore/platform/Length.cpp        2015-10-19 20:07:37 UTC (rev 191310)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #include &quot;Length.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CalculationValue.h&quot;
</span><ins>+#include &quot;TextStream.h&quot;
</ins><span class="cx"> #include &lt;wtf/ASCIICType.h&gt;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><span class="lines">@@ -301,4 +302,54 @@
</span><span class="cx"> };
</span><span class="cx"> COMPILE_ASSERT(sizeof(Length) == sizeof(SameSizeAsLength), length_should_stay_small);
</span><span class="cx"> 
</span><ins>+static TextStream&amp; operator&lt;&lt;(TextStream&amp; ts, LengthType type)
+{
+    switch (type) {
+    case Auto: ts &lt;&lt; &quot;auto&quot;; break;
+    case Relative: ts &lt;&lt; &quot;relative&quot;; break;
+    case Percent: ts &lt;&lt; &quot;percent&quot;; break;
+    case Fixed: ts &lt;&lt; &quot;fixed&quot;; break;
+    case Intrinsic: ts &lt;&lt; &quot;intrinsic&quot;; break;
+    case MinIntrinsic: ts &lt;&lt; &quot;min-intrinsic&quot;; break;
+    case MinContent: ts &lt;&lt; &quot;min-content&quot;; break;
+    case MaxContent: ts &lt;&lt; &quot;max-content&quot;; break;
+    case FillAvailable: ts &lt;&lt; &quot;fill-available&quot;; break;
+    case FitContent: ts &lt;&lt; &quot;fit-content&quot;; break;
+    case Calculated: ts &lt;&lt; &quot;calc&quot;; break;
+    case Undefined: ts &lt;&lt; &quot;undefined&quot;; break;
+    }
+    return ts;
+}
+
+TextStream&amp; operator&lt;&lt;(TextStream&amp; ts, Length length)
+{
+    switch (length.type()) {
+    case Auto:
+    case Undefined:
+        ts &lt;&lt; length.type();
+        break;
+    case Relative:
+    case Fixed:
+    case Intrinsic:
+    case MinIntrinsic:
+    case MinContent:
+    case MaxContent:
+    case FillAvailable:
+    case FitContent:
+        ts &lt;&lt; length.type() &lt;&lt; &quot; &quot; &lt;&lt; TextStream::FormatNumberRespectingIntegers(length.value());
+        break;
+    case Percent:
+        ts &lt;&lt; TextStream::FormatNumberRespectingIntegers(length.percent()) &lt;&lt; &quot;%&quot;;
+        break;
+    case Calculated:
+        // FIXME: dump CalculationValue.
+        break;
+    }
+    
+    if (length.hasQuirk())
+        ts &lt;&lt; &quot; has-quirk&quot;;
+
+    return ts;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLengthh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Length.h (191309 => 191310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Length.h        2015-10-19 19:53:45 UTC (rev 191309)
+++ trunk/Source/WebCore/platform/Length.h        2015-10-19 20:07:37 UTC (rev 191310)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class CalculationValue;
</span><ins>+class TextStream;
</ins><span class="cx"> 
</span><span class="cx"> struct Length {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="lines">@@ -74,7 +75,6 @@
</span><span class="cx">     float value() const;
</span><span class="cx">     int intValue() const;
</span><span class="cx">     float percent() const;
</span><del>-    float viewportPercentageLength() const;
</del><span class="cx">     CalculationValue&amp; calculationValue() const;
</span><span class="cx"> 
</span><span class="cx">     LengthType type() const;
</span><span class="lines">@@ -439,6 +439,8 @@
</span><span class="cx">     return Length(WebCore::blend(fromValue, toValue, progress), resultType);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+TextStream&amp; operator&lt;&lt;(TextStream&amp;, Length);
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // Length_h
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLengthSizecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/LengthSize.cpp (0 => 191310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LengthSize.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/LengthSize.cpp        2015-10-19 20:07:37 UTC (rev 191310)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;LengthSize.h&quot;
+
+#include &quot;TextStream.h&quot;
+
+namespace WebCore {
+
+TextStream&amp; operator&lt;&lt;(TextStream&amp; ts, const LengthSize&amp; size)
+{
+    return ts &lt;&lt; size.width() &lt;&lt; &quot; &quot; &lt;&lt; size.height();
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformLengthSizeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LengthSize.h (191309 => 191310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LengthSize.h        2015-10-19 19:53:45 UTC (rev 191309)
+++ trunk/Source/WebCore/platform/LengthSize.h        2015-10-19 20:07:37 UTC (rev 191310)
</span><span class="lines">@@ -58,6 +58,8 @@
</span><span class="cx">     Length m_height;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+TextStream&amp; operator&lt;&lt;(TextStream&amp;, const LengthSize&amp;);
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // LengthSize_h
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsTypescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsTypes.cpp (191309 => 191310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsTypes.cpp        2015-10-19 19:53:45 UTC (rev 191309)
+++ trunk/Source/WebCore/platform/graphics/GraphicsTypes.cpp        2015-10-19 20:07:37 UTC (rev 191310)
</span><span class="lines">@@ -47,7 +47,8 @@
</span><span class="cx">     &quot;destination-atop&quot;,
</span><span class="cx">     &quot;xor&quot;,
</span><span class="cx">     &quot;darker&quot;,
</span><del>-    &quot;lighter&quot;
</del><ins>+    &quot;lighter&quot;,
+    &quot;difference&quot;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> static const char* const blendOperatorNames[] = {
</span><span class="lines">@@ -77,7 +78,7 @@
</span><span class="cx"> {
</span><span class="cx">     for (int i = 0; i &lt; numBlendOperatorNames; i++) {
</span><span class="cx">         if (s == blendOperatorNames[i]) {
</span><del>-            blendMode = static_cast&lt;BlendMode&gt;(i+1);
</del><ins>+            blendMode = static_cast&lt;BlendMode&gt;(i + BlendModeNormal);
</ins><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -110,13 +111,20 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(op &gt;= 0);
</span><span class="cx">     ASSERT(op &lt; numCompositeOperatorNames);
</span><del>-    ASSERT(blendOp &gt;= 0);
-    ASSERT(blendOp &lt;= numBlendOperatorNames);
-    if (blendOp != BlendModeNormal)
-        return blendOperatorNames[blendOp-1];
</del><ins>+    ASSERT(blendOp &gt;= BlendModeNormal);
+    ASSERT(blendOp &lt; numBlendOperatorNames);
+    if (blendOp &gt; BlendModeNormal)
+        return blendOperatorNames[blendOp - BlendModeNormal];
</ins><span class="cx">     return compositeOperatorNames[op];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static String blendModeName(BlendMode blendOp)
+{
+    ASSERT(blendOp &gt;= BlendModeNormal);
+    ASSERT(blendOp &lt;= BlendModePlusLighter);
+    return blendOperatorNames[blendOp - BlendModeNormal];
+}
+
</ins><span class="cx"> bool parseLineCap(const String&amp; s, LineCap&amp; cap)
</span><span class="cx"> {
</span><span class="cx">     if (s == &quot;butt&quot;) {
</span><span class="lines">@@ -237,29 +245,14 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+TextStream&amp; operator&lt;&lt;(TextStream&amp; ts, CompositeOperator op)
+{
+    return ts &lt;&lt; compositeOperatorName(op, BlendModeNormal);
+}
+
</ins><span class="cx"> TextStream&amp; operator&lt;&lt;(TextStream&amp; ts, BlendMode blendMode)
</span><span class="cx"> {
</span><del>-    switch (blendMode) {
-    case BlendModeNormal: ts &lt;&lt; &quot;normal&quot;; break;
-    case BlendModeMultiply: ts &lt;&lt; &quot;multiply&quot;; break;
-    case BlendModeScreen: ts &lt;&lt; &quot;screen&quot;; break;
-    case BlendModeOverlay: ts &lt;&lt; &quot;overlay&quot;; break;
-    case BlendModeDarken: ts &lt;&lt; &quot;darken&quot;; break;
-    case BlendModeLighten: ts &lt;&lt; &quot;lighten&quot;; break;
-    case BlendModeColorDodge: ts &lt;&lt; &quot;color-dodge&quot;; break;
-    case BlendModeColorBurn: ts &lt;&lt; &quot;color-burn&quot;; break;
-    case BlendModeHardLight: ts &lt;&lt; &quot;hard-light&quot;; break;
-    case BlendModeSoftLight: ts &lt;&lt; &quot;soft-light&quot;; break;
-    case BlendModeDifference: ts &lt;&lt; &quot;difference&quot;; break;
-    case BlendModeExclusion: ts &lt;&lt; &quot;exclusion&quot;; break;
-    case BlendModeHue: ts &lt;&lt; &quot;hue&quot;; break;
-    case BlendModeSaturation: ts &lt;&lt; &quot;saturation&quot;; break;
-    case BlendModeColor: ts &lt;&lt; &quot;color&quot;; break;
-    case BlendModeLuminosity: ts &lt;&lt; &quot;luminosity&quot;; break;
-    case BlendModePlusDarker: ts &lt;&lt; &quot;plus-darker&quot;; break;
-    case BlendModePlusLighter: ts &lt;&lt; &quot;plus-lighter&quot;; break;
-    }
-    return ts;
</del><ins>+    return ts &lt;&lt; blendModeName(blendMode);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TextStream&amp; operator&lt;&lt;(TextStream&amp; ts, WindRule rule)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsTypesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsTypes.h (191309 => 191310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsTypes.h        2015-10-19 19:53:45 UTC (rev 191309)
+++ trunk/Source/WebCore/platform/graphics/GraphicsTypes.h        2015-10-19 20:07:37 UTC (rev 191310)
</span><span class="lines">@@ -109,6 +109,7 @@
</span><span class="cx"> 
</span><span class="cx"> class TextStream;
</span><span class="cx"> WEBCORE_EXPORT TextStream&amp; operator&lt;&lt;(TextStream&amp;, BlendMode);
</span><ins>+WEBCORE_EXPORT TextStream&amp; operator&lt;&lt;(TextStream&amp;, CompositeOperator);
</ins><span class="cx"> WEBCORE_EXPORT TextStream&amp; operator&lt;&lt;(TextStream&amp;, WindRule);
</span><span class="cx"> WEBCORE_EXPORT TextStream&amp; operator&lt;&lt;(TextStream&amp;, LineCap);
</span><span class="cx"> WEBCORE_EXPORT TextStream&amp; operator&lt;&lt;(TextStream&amp;, LineJoin);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformtextTextStreamh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/TextStream.h (191309 => 191310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/TextStream.h        2015-10-19 19:53:45 UTC (rev 191309)
+++ trunk/Source/WebCore/platform/text/TextStream.h        2015-10-19 20:07:37 UTC (rev 191310)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> class LayoutRect;
</span><span class="cx"> class LayoutUnit;
</span><span class="cx"> 
</span><ins>+// FIXME: this should move to platform/
</ins><span class="cx"> class TextStream {
</span><span class="cx"> public:
</span><span class="cx">     struct FormatNumberRespectingIntegers {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleFillLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/FillLayer.cpp (191309 => 191310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/FillLayer.cpp        2015-10-19 19:53:45 UTC (rev 191309)
+++ trunk/Source/WebCore/rendering/style/FillLayer.cpp        2015-10-19 20:07:37 UTC (rev 191310)
</span><span class="lines">@@ -22,6 +22,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;FillLayer.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;TextStream.h&quot;
</ins><span class="cx"> #include &lt;wtf/PointerComparison.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -395,4 +396,41 @@
</span><span class="cx">     return !layer1 &amp;&amp; !layer2;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+TextStream&amp; operator&lt;&lt;(TextStream&amp; ts, FillSize fillSize)
+{
+    return ts &lt;&lt; fillSize.type &lt;&lt; &quot; &quot; &lt;&lt; fillSize.size;
+}
+
+TextStream&amp; operator&lt;&lt;(TextStream&amp; ts, const FillLayer&amp; layer)
+{
+    TextStream::GroupScope scope(ts);
+    ts &lt;&lt; &quot;fill-layer&quot;;
+
+    ts.startGroup();
+    ts &lt;&lt; &quot;position &quot; &lt;&lt; layer.xPosition() &lt;&lt; &quot; &quot; &lt;&lt; layer.yPosition();
+    ts.endGroup();
+
+    ts.dumpProperty(&quot;size&quot;, layer.size());
+
+    ts.startGroup();
+    ts &lt;&lt; &quot;background-origin &quot; &lt;&lt; layer.backgroundXOrigin() &lt;&lt; &quot; &quot; &lt;&lt; layer.backgroundYOrigin();
+    ts.endGroup();
+
+    ts.startGroup();
+    ts &lt;&lt; &quot;repeat &quot; &lt;&lt; layer.repeatX() &lt;&lt; &quot; &quot; &lt;&lt; layer.repeatY();
+    ts.endGroup();
+
+    ts.dumpProperty(&quot;clip&quot;, layer.clip());
+    ts.dumpProperty(&quot;origin&quot;, layer.origin());
+
+    ts.dumpProperty(&quot;composite&quot;, layer.composite());
+    ts.dumpProperty(&quot;blend-mode&quot;, layer.blendMode());
+    ts.dumpProperty(&quot;mask-type&quot;, layer.maskSourceType());
+
+    if (layer.next())
+        ts &lt;&lt; *layer.next();
+
+    return ts;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleFillLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/FillLayer.h (191309 => 191310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/FillLayer.h        2015-10-19 19:53:45 UTC (rev 191309)
+++ trunk/Source/WebCore/rendering/style/FillLayer.h        2015-10-19 20:07:37 UTC (rev 191310)
</span><span class="lines">@@ -213,6 +213,9 @@
</span><span class="cx">     mutable unsigned m_clipMax : 2; // EFillBox, maximum m_clip value from this to bottom layer
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+TextStream&amp; operator&lt;&lt;(TextStream&amp;, FillSize);
+TextStream&amp; operator&lt;&lt;(TextStream&amp;, const FillLayer&amp;);
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // FillLayer_h
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleConstantscpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp (0 => 191310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp                                (rev 0)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp        2015-10-19 20:07:37 UTC (rev 191310)
</span><span class="lines">@@ -0,0 +1,99 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;RenderStyleConstants.h&quot;
+
+#include &quot;TextStream.h&quot;
+
+namespace WebCore {
+
+TextStream&amp; operator&lt;&lt;(TextStream&amp; ts, EFillSizeType sizeType)
+{
+    switch (sizeType) {
+    case Contain: ts &lt;&lt; &quot;contain&quot;; break;
+    case Cover: ts &lt;&lt; &quot;cover&quot;; break;
+    case SizeLength: ts &lt;&lt; &quot;size-length&quot;; break;
+    case SizeNone: ts &lt;&lt; &quot;size-none&quot;; break;
+    }
+    
+    return ts;
+}
+
+TextStream&amp; operator&lt;&lt;(TextStream&amp; ts, EFillAttachment attachment)
+{
+    switch (attachment) {
+    case ScrollBackgroundAttachment: ts &lt;&lt; &quot;scroll&quot;; break;
+    case LocalBackgroundAttachment: ts &lt;&lt; &quot;local&quot;; break;
+    case FixedBackgroundAttachment: ts &lt;&lt; &quot;fixed&quot;; break;
+    }
+    return ts;
+}
+
+TextStream&amp; operator&lt;&lt;(TextStream&amp; ts, EFillBox fill)
+{
+    switch (fill) {
+    case BorderFillBox: ts &lt;&lt; &quot;border&quot;; break;
+    case PaddingFillBox: ts &lt;&lt; &quot;padding&quot;; break;
+    case ContentFillBox: ts &lt;&lt; &quot;content&quot;; break;
+    case TextFillBox: ts &lt;&lt; &quot;text&quot;; break;
+    }
+    return ts;
+}
+
+TextStream&amp; operator&lt;&lt;(TextStream&amp; ts, EFillRepeat repeat)
+{
+    switch (repeat) {
+    case RepeatFill: ts &lt;&lt; &quot;repeat&quot;; break;
+    case NoRepeatFill: ts &lt;&lt; &quot;no-repeat&quot;; break;
+    case RoundFill: ts &lt;&lt; &quot;round&quot;; break;
+    case SpaceFill: ts &lt;&lt; &quot;space&quot;; break;
+    }
+
+    return ts;
+}
+
+TextStream&amp; operator&lt;&lt;(TextStream&amp; ts, EMaskSourceType maskSource)
+{
+    switch (maskSource) {
+    case MaskAlpha: ts &lt;&lt; &quot;alpha&quot;; break;
+    case MaskLuminance: ts &lt;&lt; &quot;luminance&quot;; break;
+    }
+
+    return ts;
+}
+
+TextStream&amp; operator&lt;&lt;(TextStream&amp; ts, BackgroundEdgeOrigin edge)
+{
+    switch (edge) {
+    case TopEdge: ts &lt;&lt; &quot;top&quot;; break;
+    case RightEdge: ts &lt;&lt; &quot;right&quot;; break;
+    case BottomEdge: ts &lt;&lt; &quot;bottom&quot;; break;
+    case LeftEdge: ts &lt;&lt; &quot;left&quot;; break;
+    }
+    return ts;
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleConstantsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (191309 => 191310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2015-10-19 19:53:45 UTC (rev 191309)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2015-10-19 20:07:37 UTC (rev 191310)
</span><span class="lines">@@ -30,6 +30,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class TextStream;
+
</ins><span class="cx"> static const size_t PrintColorAdjustBits = 1;
</span><span class="cx"> enum PrintColorAdjust {
</span><span class="cx">     PrintColorAdjustEconomy,
</span><span class="lines">@@ -656,6 +658,13 @@
</span><span class="cx"> };
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+TextStream&amp; operator&lt;&lt;(TextStream&amp;, EFillSizeType);
+TextStream&amp; operator&lt;&lt;(TextStream&amp;, EFillAttachment);
+TextStream&amp; operator&lt;&lt;(TextStream&amp;, EFillBox);
+TextStream&amp; operator&lt;&lt;(TextStream&amp;, EFillRepeat);
+TextStream&amp; operator&lt;&lt;(TextStream&amp;, EMaskSourceType);
+TextStream&amp; operator&lt;&lt;(TextStream&amp;, BackgroundEdgeOrigin);
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // RenderStyleConstants_h
</span></span></pre>
</div>
</div>

</body>
</html>