<!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>[166752] 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/166752">166752</a></dd>
<dt>Author</dt> <dd>bjonesbe@adobe.com</dd>
<dt>Date</dt> <dd>2014-04-03 16:04:49 -0700 (Thu, 03 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge ShapeInfo &amp; ShapeOutsideInfo now that ShapeInsideInfo is no more
https://bugs.webkit.org/show_bug.cgi?id=131180

Reviewed by Andreas Kling.

Now that ShapeInsideInfo is gone, having a class hiearachy and
templates doesn't make any sense. As a first step to cleaning up the
code, this remove ShapeInfo and puts all of its functionality into
ShapeOutsideInfo.

No new tests, no behavior change.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* rendering/shapes/ShapeInfo.cpp: Removed.
* rendering/shapes/ShapeInfo.h: Removed.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computedShapePhysicalBoundingBox):
(WebCore::ShapeOutsideInfo::shapeToRendererPoint):
(WebCore::ShapeOutsideInfo::shapeToRendererSize):
(WebCore::referenceBox):
(WebCore::ShapeOutsideInfo::setReferenceBoxLogicalSize):
(WebCore::checkShapeImageOrigin):
(WebCore::getShapeImageAndRect):
(WebCore::getShapeImageMarginRect):
(WebCore::ShapeOutsideInfo::computedShape):
(WebCore::borderBeforeInWritingMode):
(WebCore::borderAndPaddingBeforeInWritingMode):
(WebCore::ShapeOutsideInfo::logicalTopOffset):
(WebCore::borderStartWithStyleForWritingMode):
(WebCore::borderAndPaddingStartWithStyleForWritingMode):
(WebCore::ShapeOutsideInfo::logicalLeftOffset):
(WebCore::ShapeOutsideInfo::computeSegmentsForLine):
(WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
(WebCore::ShapeOutsideInfo::shapeValue): Deleted.
(WebCore::ShapeOutsideInfo::styleForWritingMode): Deleted.
* rendering/shapes/ShapeOutsideInfo.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="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapeOutsideInfocpp">trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapeOutsideInfoh">trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorerenderingshapesShapeInfocpp">trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapeInfoh">trunk/Source/WebCore/rendering/shapes/ShapeInfo.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (166751 => 166752)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2014-04-03 22:56:47 UTC (rev 166751)
+++ trunk/Source/WebCore/CMakeLists.txt        2014-04-03 23:04:49 UTC (rev 166752)
</span><span class="lines">@@ -2221,7 +2221,6 @@
</span><span class="cx">     rendering/shapes/RasterShape.cpp
</span><span class="cx">     rendering/shapes/RectangleShape.cpp
</span><span class="cx">     rendering/shapes/Shape.cpp
</span><del>-    rendering/shapes/ShapeInfo.cpp
</del><span class="cx">     rendering/shapes/ShapeOutsideInfo.cpp
</span><span class="cx"> 
</span><span class="cx">     rendering/style/BasicShapes.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (166751 => 166752)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-03 22:56:47 UTC (rev 166751)
+++ trunk/Source/WebCore/ChangeLog        2014-04-03 23:04:49 UTC (rev 166752)
</span><span class="lines">@@ -1,3 +1,45 @@
</span><ins>+2014-04-03  Bem Jones-Bey  &lt;bjonesbe@adobe.com&gt;
+
+        Merge ShapeInfo &amp; ShapeOutsideInfo now that ShapeInsideInfo is no more
+        https://bugs.webkit.org/show_bug.cgi?id=131180
+
+        Reviewed by Andreas Kling.
+
+        Now that ShapeInsideInfo is gone, having a class hiearachy and
+        templates doesn't make any sense. As a first step to cleaning up the
+        code, this remove ShapeInfo and puts all of its functionality into
+        ShapeOutsideInfo.
+
+        No new tests, no behavior change.
+
+        * CMakeLists.txt:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * rendering/shapes/ShapeInfo.cpp: Removed.
+        * rendering/shapes/ShapeInfo.h: Removed.
+        * rendering/shapes/ShapeOutsideInfo.cpp:
+        (WebCore::ShapeOutsideInfo::computedShapePhysicalBoundingBox):
+        (WebCore::ShapeOutsideInfo::shapeToRendererPoint):
+        (WebCore::ShapeOutsideInfo::shapeToRendererSize):
+        (WebCore::referenceBox):
+        (WebCore::ShapeOutsideInfo::setReferenceBoxLogicalSize):
+        (WebCore::checkShapeImageOrigin):
+        (WebCore::getShapeImageAndRect):
+        (WebCore::getShapeImageMarginRect):
+        (WebCore::ShapeOutsideInfo::computedShape):
+        (WebCore::borderBeforeInWritingMode):
+        (WebCore::borderAndPaddingBeforeInWritingMode):
+        (WebCore::ShapeOutsideInfo::logicalTopOffset):
+        (WebCore::borderStartWithStyleForWritingMode):
+        (WebCore::borderAndPaddingStartWithStyleForWritingMode):
+        (WebCore::ShapeOutsideInfo::logicalLeftOffset):
+        (WebCore::ShapeOutsideInfo::computeSegmentsForLine):
+        (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
+        (WebCore::ShapeOutsideInfo::shapeValue): Deleted.
+        (WebCore::ShapeOutsideInfo::styleForWritingMode): Deleted.
+        * rendering/shapes/ShapeOutsideInfo.h:
+
</ins><span class="cx"> 2014-04-03  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix over-retain in SharedBufferCF's createCFData().
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (166751 => 166752)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-04-03 22:56:47 UTC (rev 166751)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-04-03 23:04:49 UTC (rev 166752)
</span><span class="lines">@@ -11311,7 +11311,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\rendering\shapes\RasterShape.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\rendering\shapes\RectangleShape.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\rendering\shapes\Shape.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\rendering\shapes\ShapeInfo.cpp&quot; /&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\rendering\shapes\ShapeOutsideInfo.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\rendering\svg\SVGPathData.cpp&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="lines">@@ -20058,7 +20057,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\shapes\RasterShape.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\shapes\RectangleShape.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\shapes\Shape.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\rendering\shapes\ShapeInfo.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\shapes\ShapeInterval.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\shapes\ShapeOutsideInfo.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\svg\RenderSVGBlock.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (166751 => 166752)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-04-03 22:56:47 UTC (rev 166751)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-04-03 23:04:49 UTC (rev 166752)
</span><span class="lines">@@ -6802,9 +6802,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\rendering\shapes\Shape.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;rendering\shapes&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\rendering\shapes\ShapeInfo.cpp&quot;&gt;
-      &lt;Filter&gt;rendering\shapes&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\rendering\shapes\ShapeInsideInfo.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;rendering\shapes&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -14643,9 +14640,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\shapes\Shape.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;rendering\shapes&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\rendering\shapes\ShapeInfo.h&quot;&gt;
-      &lt;Filter&gt;rendering\shapes&lt;/Filter&gt;
-    &lt;/ClInclude&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\shapes\ShapeInsideInfo.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;rendering\shapes&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (166751 => 166752)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-04-03 22:56:47 UTC (rev 166751)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-04-03 23:04:49 UTC (rev 166752)
</span><span class="lines">@@ -6392,10 +6392,8 @@
</span><span class="cx">                 FD35918F138DB22000E1EBEC /* AudioParamTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD35918D138DB22000E1EBEC /* AudioParamTimeline.cpp */; };
</span><span class="cx">                 FD359190138DB22000E1EBEC /* AudioParamTimeline.h in Headers */ = {isa = PBXBuildFile; fileRef = FD35918E138DB22000E1EBEC /* AudioParamTimeline.h */; };
</span><span class="cx">                 FD45A94F175D3F3E00C21EC8 /* Shape.h in Headers */ = {isa = PBXBuildFile; fileRef = FD08A87F175D3926002CD360 /* Shape.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                FD45A950175D3F3E00C21EC8 /* ShapeInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = FD08A881175D3926002CD360 /* ShapeInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 FD45A952175D3F3E00C21EC8 /* ShapeOutsideInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = FD08A887175D3926002CD360 /* ShapeOutsideInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 FD45A953175D3FB800C21EC8 /* Shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD08A87E175D3926002CD360 /* Shape.cpp */; };
</span><del>-                FD45A954175D3FB800C21EC8 /* ShapeInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD08A880175D3926002CD360 /* ShapeInfo.cpp */; };
</del><span class="cx">                 FD45A956175D3FB800C21EC8 /* ShapeOutsideInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD08A886175D3926002CD360 /* ShapeOutsideInfo.cpp */; };
</span><span class="cx">                 FD45A957175D414C00C21EC8 /* PolygonShape.h in Headers */ = {isa = PBXBuildFile; fileRef = FD08A87B175D3926002CD360 /* PolygonShape.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 FD45A958175D414C00C21EC8 /* RectangleShape.h in Headers */ = {isa = PBXBuildFile; fileRef = FD08A87D175D3926002CD360 /* RectangleShape.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -13706,8 +13704,6 @@
</span><span class="cx">                 FD08A87D175D3926002CD360 /* RectangleShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RectangleShape.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FD08A87E175D3926002CD360 /* Shape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Shape.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FD08A87F175D3926002CD360 /* Shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shape.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                FD08A880175D3926002CD360 /* ShapeInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShapeInfo.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                FD08A881175D3926002CD360 /* ShapeInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 FD08A885175D3926002CD360 /* ShapeInterval.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeInterval.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FD08A886175D3926002CD360 /* ShapeOutsideInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShapeOutsideInfo.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FD08A887175D3926002CD360 /* ShapeOutsideInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeOutsideInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -22540,8 +22536,6 @@
</span><span class="cx">                                 FD08A87D175D3926002CD360 /* RectangleShape.h */,
</span><span class="cx">                                 FD08A87E175D3926002CD360 /* Shape.cpp */,
</span><span class="cx">                                 FD08A87F175D3926002CD360 /* Shape.h */,
</span><del>-                                FD08A880175D3926002CD360 /* ShapeInfo.cpp */,
-                                FD08A881175D3926002CD360 /* ShapeInfo.h */,
</del><span class="cx">                                 FD08A885175D3926002CD360 /* ShapeInterval.h */,
</span><span class="cx">                                 FD08A886175D3926002CD360 /* ShapeOutsideInfo.cpp */,
</span><span class="cx">                                 FD08A887175D3926002CD360 /* ShapeOutsideInfo.h */,
</span><span class="lines">@@ -25491,7 +25485,6 @@
</span><span class="cx">                                 BC5EB8C40E82031B00B25965 /* ShadowData.h in Headers */,
</span><span class="cx">                                 A6D169641346B4C1000EB770 /* ShadowRoot.h in Headers */,
</span><span class="cx">                                 FD45A94F175D3F3E00C21EC8 /* Shape.h in Headers */,
</span><del>-                                FD45A950175D3F3E00C21EC8 /* ShapeInfo.h in Headers */,
</del><span class="cx">                                 FD45A95B175D41EE00C21EC8 /* ShapeInterval.h in Headers */,
</span><span class="cx">                                 FD45A952175D3F3E00C21EC8 /* ShapeOutsideInfo.h in Headers */,
</span><span class="cx">                                 FD1AF1501656F15100C6D4F7 /* ShapeValue.h in Headers */,
</span><span class="lines">@@ -28864,7 +28857,6 @@
</span><span class="cx">                                 BC5EB8C30E82031B00B25965 /* ShadowData.cpp in Sources */,
</span><span class="cx">                                 A6D169621346B49B000EB770 /* ShadowRoot.cpp in Sources */,
</span><span class="cx">                                 FD45A953175D3FB800C21EC8 /* Shape.cpp in Sources */,
</span><del>-                                FD45A954175D3FB800C21EC8 /* ShapeInfo.cpp in Sources */,
</del><span class="cx">                                 FD45A956175D3FB800C21EC8 /* ShapeOutsideInfo.cpp in Sources */,
</span><span class="cx">                                 1A4A954D0B4EDCCB002D8C3C /* SharedBuffer.cpp in Sources */,
</span><span class="cx">                                 512DD8E30D91E2B4000F89EE /* SharedBufferCF.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapeInfocpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp (166751 => 166752)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp        2014-04-03 22:56:47 UTC (rev 166751)
+++ trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp        2014-04-03 23:04:49 UTC (rev 166752)
</span><span class="lines">@@ -1,277 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Adobe Systems Incorporated. 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 THE COPYRIGHT HOLDER &quot;AS IS&quot; 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 THE COPYRIGHT HOLDER 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;ShapeInfo.h&quot;
-
-#if ENABLE(CSS_SHAPES)
-
-#include &quot;BoxShape.h&quot;
-#include &quot;LengthFunctions.h&quot;
-#include &quot;RenderBlock.h&quot;
-#include &quot;RenderBox.h&quot;
-#include &quot;RenderImage.h&quot;
-#include &quot;RenderRegion.h&quot;
-#include &quot;RenderStyle.h&quot;
-#include &quot;Shape.h&quot;
-
-namespace WebCore {
-
-template&lt;class RenderType&gt;
-void ShapeInfo&lt;RenderType&gt;::setReferenceBoxLogicalSize(LayoutSize newReferenceBoxLogicalSize)
-{
-    bool isHorizontalWritingMode = this-&gt;styleForWritingMode().isHorizontalWritingMode();
-    switch (referenceBox()) {
-    case MarginBox:
-        if (isHorizontalWritingMode)
-            newReferenceBoxLogicalSize.expand(m_renderer.horizontalMarginExtent(), m_renderer.verticalMarginExtent());
-        else
-            newReferenceBoxLogicalSize.expand(m_renderer.verticalMarginExtent(), m_renderer.horizontalMarginExtent());
-        break;
-    case BorderBox:
-        break;
-    case PaddingBox:
-        if (isHorizontalWritingMode)
-            newReferenceBoxLogicalSize.shrink(m_renderer.horizontalBorderExtent(), m_renderer.verticalBorderExtent());
-        else
-            newReferenceBoxLogicalSize.shrink(m_renderer.verticalBorderExtent(), m_renderer.horizontalBorderExtent());
-        break;
-    case ContentBox:
-        if (isHorizontalWritingMode)
-            newReferenceBoxLogicalSize.shrink(m_renderer.horizontalBorderAndPaddingExtent(), m_renderer.verticalBorderAndPaddingExtent());
-        else
-            newReferenceBoxLogicalSize.shrink(m_renderer.verticalBorderAndPaddingExtent(), m_renderer.horizontalBorderAndPaddingExtent());
-        break;
-    case Fill:
-    case Stroke:
-    case ViewBox:
-    case BoxMissing:
-        ASSERT_NOT_REACHED();
-        break;
-    }
-
-    if (m_referenceBoxLogicalSize == newReferenceBoxLogicalSize)
-        return;
-    markShapeAsDirty();
-    m_referenceBoxLogicalSize = newReferenceBoxLogicalSize;
-}
-
-bool checkShapeImageOrigin(Document&amp; document, CachedImage&amp; cachedImage)
-{
-    if (cachedImage.isOriginClean(document.securityOrigin()))
-        return true;
-
-    const URL&amp; url = cachedImage.url();
-    String urlString = url.isNull() ? &quot;''&quot; : url.stringCenterEllipsizedToLength();
-    document.addConsoleMessage(MessageSource::Security, MessageLevel::Error, &quot;Unsafe attempt to load URL &quot; + urlString + &quot;.&quot;);
-
-    return false;
-}
-
-static void getShapeImageAndRect(const ShapeValue* shapeValue, const RenderBox* renderBox, const LayoutSize&amp; referenceBoxSize, Image*&amp; image, LayoutRect&amp; rect)
-{
-    ASSERT(shapeValue-&gt;isImageValid());
-    StyleImage* styleImage = shapeValue-&gt;image();
-
-    const IntSize&amp; imageSize = renderBox-&gt;calculateImageIntrinsicDimensions(styleImage, roundedIntSize(referenceBoxSize), RenderImage::ScaleByEffectiveZoom);
-    styleImage-&gt;setContainerSizeForRenderer(renderBox, imageSize, renderBox-&gt;style().effectiveZoom());
-
-    image = styleImage-&gt;cachedImage()-&gt;imageForRenderer(renderBox);
-    if (renderBox-&gt;isRenderImage())
-        rect = toRenderImage(renderBox)-&gt;replacedContentRect(renderBox-&gt;intrinsicSize());
-    else
-        rect = LayoutRect(LayoutPoint(), imageSize);
-}
-
-static LayoutRect getShapeImageMarginRect(const RenderBox&amp; renderBox, const LayoutSize&amp; referenceBoxLogicalSize)
-{
-    LayoutPoint marginBoxOrigin(-renderBox.marginLogicalLeft() - renderBox.borderAndPaddingLogicalLeft(), -renderBox.marginBefore() - renderBox.borderBefore() - renderBox.paddingBefore());
-    LayoutSize marginBoxSizeDelta(renderBox.marginLogicalWidth() + renderBox.borderAndPaddingLogicalWidth(), renderBox.marginLogicalHeight() + renderBox.borderAndPaddingLogicalHeight());
-    return LayoutRect(marginBoxOrigin, referenceBoxLogicalSize + marginBoxSizeDelta);
-}
-
-template&lt;class RenderType&gt;
-const Shape&amp; ShapeInfo&lt;RenderType&gt;::computedShape() const
-{
-    if (Shape* shape = m_shape.get())
-        return *shape;
-
-    WritingMode writingMode = this-&gt;styleForWritingMode().writingMode();
-    Length margin = m_renderer.style().shapeMargin();
-    float shapeImageThreshold = m_renderer.style().shapeImageThreshold();
-    const ShapeValue* shapeValue = this-&gt;shapeValue();
-    ASSERT(shapeValue);
-
-    switch (shapeValue-&gt;type()) {
-    case ShapeValue::Shape:
-        ASSERT(shapeValue-&gt;shape());
-        m_shape = Shape::createShape(shapeValue-&gt;shape(), m_referenceBoxLogicalSize, writingMode, margin);
-        break;
-    case ShapeValue::Image: {
-        Image* image;
-        LayoutRect imageRect;
-        getShapeImageAndRect(shapeValue, &amp;m_renderer, m_referenceBoxLogicalSize, image, imageRect);
-        const LayoutRect&amp; marginRect = getShapeImageMarginRect(m_renderer, m_referenceBoxLogicalSize);
-        m_shape = Shape::createRasterShape(image, shapeImageThreshold, imageRect, marginRect, writingMode, margin);
-        break;
-    }
-    case ShapeValue::Box: {
-        RoundedRect shapeRect = computeRoundedRectForBoxShape(referenceBox(), m_renderer);
-        if (!this-&gt;styleForWritingMode().isHorizontalWritingMode())
-            shapeRect = shapeRect.transposedRect();
-        m_shape = Shape::createBoxShape(shapeRect, writingMode, margin);
-        break;
-    }
-    case ShapeValue::Outside:
-        // Outside should have already resolved to a different shape value
-        ASSERT_NOT_REACHED();
-    }
-
-    ASSERT(m_shape);
-    return *m_shape;
-}
-
-template&lt;class RenderType&gt;
-SegmentList ShapeInfo&lt;RenderType&gt;::computeSegmentsForLine(LayoutUnit lineTop, LayoutUnit lineHeight) const
-{
-    ASSERT(lineHeight &gt;= 0);
-    SegmentList segments;
-
-    getIntervals((lineTop - logicalTopOffset()), std::min(lineHeight, shapeLogicalBottom() - lineTop), segments);
-
-    for (size_t i = 0; i &lt; segments.size(); i++) {
-        segments[i].logicalLeft += logicalLeftOffset();
-        segments[i].logicalRight += logicalLeftOffset();
-    }
-
-    return segments;
-}
-
-template&lt;class RenderType&gt;
-inline LayoutUnit borderBeforeInWritingMode(const RenderType&amp; renderer, WritingMode writingMode)
-{
-    switch (writingMode) {
-    case TopToBottomWritingMode: return renderer.borderTop();
-    case BottomToTopWritingMode: return renderer.borderBottom();
-    case LeftToRightWritingMode: return renderer.borderLeft();
-    case RightToLeftWritingMode: return renderer.borderRight();
-    }
-
-    ASSERT_NOT_REACHED();
-    return renderer.borderBefore();
-}
-
-template&lt;class RenderType&gt;
-inline LayoutUnit borderAndPaddingBeforeInWritingMode(const RenderType&amp; renderer, WritingMode writingMode)
-{
-    switch (writingMode) {
-    case TopToBottomWritingMode: return renderer.borderTop() + renderer.paddingTop();
-    case BottomToTopWritingMode: return renderer.borderBottom() + renderer.paddingBottom();
-    case LeftToRightWritingMode: return renderer.borderLeft() + renderer.paddingLeft();
-    case RightToLeftWritingMode: return renderer.borderRight() + renderer.paddingRight();
-    }
-
-    ASSERT_NOT_REACHED();
-    return renderer.borderAndPaddingBefore();
-}
-
-template&lt;class RenderType&gt;
-LayoutUnit ShapeInfo&lt;RenderType&gt;::logicalTopOffset() const
-{
-    switch (referenceBox()) {
-    case MarginBox: return -m_renderer.marginBefore(&amp;styleForWritingMode());
-    case BorderBox: return LayoutUnit();
-    case PaddingBox: return borderBeforeInWritingMode(m_renderer, styleForWritingMode().writingMode());
-    case ContentBox: return borderAndPaddingBeforeInWritingMode(m_renderer, styleForWritingMode().writingMode());
-    case Fill: break;
-    case Stroke: break;
-    case ViewBox: break;
-    case BoxMissing: break;
-    }
-
-    ASSERT_NOT_REACHED();
-    return LayoutUnit();
-}
-
-template&lt;class RenderType&gt;
-inline LayoutUnit borderStartWithStyleForWritingMode(const RenderType&amp; renderer, const RenderStyle&amp; style)
-{
-    if (style.isHorizontalWritingMode()) {
-        if (style.isLeftToRightDirection())
-            return renderer.borderLeft();
-
-        return renderer.borderRight();
-    }
-    if (style.isLeftToRightDirection())
-        return renderer.borderTop();
-
-    return renderer.borderBottom();
-}
-
-template&lt;class RenderType&gt;
-inline LayoutUnit borderAndPaddingStartWithStyleForWritingMode(const RenderType&amp; renderer, const RenderStyle&amp; style)
-{
-    if (style.isHorizontalWritingMode()) {
-        if (style.isLeftToRightDirection())
-            return renderer.borderLeft() + renderer.paddingLeft();
-
-        return renderer.borderRight() + renderer.paddingRight();
-    }
-    if (style.isLeftToRightDirection())
-        return renderer.borderTop() + renderer.paddingTop();
-
-    return renderer.borderBottom() + renderer.paddingBottom();
-}
-
-template&lt;class RenderType&gt;
-LayoutUnit ShapeInfo&lt;RenderType&gt;::logicalLeftOffset() const
-{
-    if (m_renderer.isRenderRegion())
-        return LayoutUnit();
-
-    switch (referenceBox()) {
-    case MarginBox: return -m_renderer.marginStart(&amp;styleForWritingMode());
-    case BorderBox: return LayoutUnit();
-    case PaddingBox: return borderStartWithStyleForWritingMode(m_renderer, styleForWritingMode());
-    case ContentBox: return borderAndPaddingStartWithStyleForWritingMode(m_renderer, styleForWritingMode());
-    case Fill: break;
-    case Stroke: break;
-    case ViewBox: break;
-    case BoxMissing: break;
-    }
-
-    ASSERT_NOT_REACHED();
-    return LayoutUnit();
-}
-
-template class ShapeInfo&lt;RenderBlock&gt;;
-template class ShapeInfo&lt;RenderBox&gt;;
-
-}
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapeInfoh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/rendering/shapes/ShapeInfo.h (166751 => 166752)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/ShapeInfo.h        2014-04-03 22:56:47 UTC (rev 166751)
+++ trunk/Source/WebCore/rendering/shapes/ShapeInfo.h        2014-04-03 23:04:49 UTC (rev 166752)
</span><span class="lines">@@ -1,159 +0,0 @@
</span><del>-/*
-* Copyright (C) 2012 Adobe Systems Incorporated. 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 THE COPYRIGHT HOLDER &quot;AS IS&quot; 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 THE COPYRIGHT HOLDER 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.
-*/
-
-#ifndef ShapeInfo_h
-#define ShapeInfo_h
-
-#if ENABLE(CSS_SHAPES)
-
-#include &quot;FloatRect.h&quot;
-#include &quot;LayoutUnit.h&quot;
-#include &quot;RenderStyle.h&quot;
-#include &quot;Shape.h&quot;
-#include &quot;ShapeValue.h&quot;
-#include &lt;memory&gt;
-#include &lt;wtf/Vector.h&gt;
-
-namespace WebCore {
-
-template&lt;class KeyType, class InfoType&gt;
-class MappedInfo {
-public:
-    static InfoType&amp; ensureInfo(const KeyType&amp; key)
-    {
-        InfoMap&amp; infoMap = MappedInfo&lt;KeyType, InfoType&gt;::infoMap();
-        if (InfoType* info = infoMap.get(&amp;key))
-            return *info;
-        typename InfoMap::AddResult result = infoMap.add(&amp;key, std::make_unique&lt;InfoType&gt;(key));
-        return *result.iterator-&gt;value;
-    }
-    static void removeInfo(const KeyType&amp; key) { infoMap().remove(&amp;key); }
-    static InfoType* info(const KeyType&amp; key) { return infoMap().get(&amp;key); }
-
-private:
-    typedef HashMap&lt;const KeyType*, std::unique_ptr&lt;InfoType&gt;&gt; InfoMap;
-    static InfoMap&amp; infoMap()
-    {
-        DEPRECATED_DEFINE_STATIC_LOCAL(InfoMap, staticInfoMap, ());
-        return staticInfoMap;
-    }
-};
-
-template&lt;class RenderType&gt;
-class ShapeInfo {
-    WTF_MAKE_FAST_ALLOCATED;
-public:
-    virtual ~ShapeInfo() { }
-
-    void setReferenceBoxLogicalSize(LayoutSize);
-
-    SegmentList computeSegmentsForLine(LayoutUnit lineTop, LayoutUnit lineHeight) const;
-
-    LayoutUnit shapeLogicalTop() const { return computedShapeLogicalBoundingBox().y() + logicalTopOffset(); }
-    LayoutUnit shapeLogicalBottom() const { return computedShapeLogicalBoundingBox().maxY() + logicalTopOffset(); }
-    LayoutUnit shapeLogicalLeft() const { return computedShapeLogicalBoundingBox().x() + logicalLeftOffset(); }
-    LayoutUnit shapeLogicalRight() const { return computedShapeLogicalBoundingBox().maxX() + logicalLeftOffset(); }
-    LayoutUnit shapeLogicalWidth() const { return computedShapeLogicalBoundingBox().width(); }
-    LayoutUnit shapeLogicalHeight() const { return computedShapeLogicalBoundingBox().height(); }
-
-    LayoutUnit logicalLineTop() const { return m_referenceBoxLineTop + logicalTopOffset(); }
-    LayoutUnit logicalLineBottom() const { return m_referenceBoxLineTop + m_lineHeight + logicalTopOffset(); }
-    LayoutUnit logicalLineBottom(LayoutUnit lineHeight) const { return m_referenceBoxLineTop + lineHeight + logicalTopOffset(); }
-
-    LayoutUnit shapeContainingBlockLogicalHeight() const { return (m_renderer.style().boxSizing() == CONTENT_BOX) ? (m_referenceBoxLogicalSize.height() + m_renderer.borderAndPaddingLogicalHeight()) : m_referenceBoxLogicalSize.height(); }
-
-    virtual bool lineOverlapsShapeBounds() const = 0;
-
-    void markShapeAsDirty() { m_shape = nullptr; }
-    bool isShapeDirty() { return !m_shape; }
-    const RenderType&amp; owner() const { return m_renderer; }
-    LayoutSize referenceBoxLogicalSize() const { return m_referenceBoxLogicalSize; }
-
-    LayoutRect computedShapePhysicalBoundingBox() const
-    {
-        LayoutRect physicalBoundingBox = computedShapeLogicalBoundingBox();
-        physicalBoundingBox.setX(physicalBoundingBox.x() + logicalLeftOffset());
-        physicalBoundingBox.setY(physicalBoundingBox.y() + logicalTopOffset());
-        if (m_renderer.style().isFlippedBlocksWritingMode())
-            physicalBoundingBox.setY(m_renderer.logicalHeight() - physicalBoundingBox.maxY());
-        if (!m_renderer.style().isHorizontalWritingMode())
-            physicalBoundingBox = physicalBoundingBox.transposedRect();
-        return physicalBoundingBox;
-    }
-
-    FloatPoint shapeToRendererPoint(FloatPoint point) const
-    {
-        FloatPoint result = FloatPoint(point.x() + logicalLeftOffset(), point.y() + logicalTopOffset());
-        if (m_renderer.style().isFlippedBlocksWritingMode())
-            result.setY(m_renderer.logicalHeight() - result.y());
-        if (!m_renderer.style().isHorizontalWritingMode())
-            result = result.transposedPoint();
-        return result;
-    }
-
-    FloatSize shapeToRendererSize(FloatSize size) const
-    {
-        if (!m_renderer.style().isHorizontalWritingMode())
-            return size.transposedSize();
-        return size;
-    }
-
-    const Shape&amp; computedShape() const;
-
-protected:
-    explicit ShapeInfo(const RenderType&amp; renderer)
-        : m_renderer(renderer)
-    {
-    }
-
-    virtual CSSBoxType referenceBox() const = 0;
-    virtual LayoutRect computedShapeLogicalBoundingBox() const = 0;
-    virtual ShapeValue* shapeValue() const = 0;
-    virtual void getIntervals(LayoutUnit, LayoutUnit, SegmentList&amp;) const = 0;
-
-    virtual const RenderStyle&amp; styleForWritingMode() const = 0;
-
-    LayoutUnit logicalTopOffset() const;
-    LayoutUnit logicalLeftOffset() const;
-
-    LayoutUnit m_referenceBoxLineTop;
-    LayoutUnit m_lineHeight;
-
-    const RenderType&amp; m_renderer;
-
-private:
-    mutable std::unique_ptr&lt;Shape&gt; m_shape;
-    LayoutSize m_referenceBoxLogicalSize;
-};
-
-bool checkShapeImageOrigin(Document&amp;, CachedImage&amp;);
-
-}
-#endif
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapeOutsideInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp (166751 => 166752)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp        2014-04-03 22:56:47 UTC (rev 166751)
+++ trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp        2014-04-03 23:04:49 UTC (rev 166752)
</span><span class="lines">@@ -33,12 +33,258 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;ShapeOutsideInfo.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;BoxShape.h&quot;
</ins><span class="cx"> #include &quot;FloatingObjects.h&quot;
</span><ins>+#include &quot;LengthFunctions.h&quot;
</ins><span class="cx"> #include &quot;RenderBlockFlow.h&quot;
</span><span class="cx"> #include &quot;RenderBox.h&quot;
</span><ins>+#include &quot;RenderImage.h&quot;
+#include &quot;RenderRegion.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+LayoutRect ShapeOutsideInfo::computedShapePhysicalBoundingBox() const
+{
+    LayoutRect physicalBoundingBox = computedShape().shapeMarginLogicalBoundingBox();
+    physicalBoundingBox.setX(physicalBoundingBox.x() + logicalLeftOffset());
+    physicalBoundingBox.setY(physicalBoundingBox.y() + logicalTopOffset());
+    if (m_renderer.style().isFlippedBlocksWritingMode())
+        physicalBoundingBox.setY(m_renderer.logicalHeight() - physicalBoundingBox.maxY());
+    if (!m_renderer.style().isHorizontalWritingMode())
+        physicalBoundingBox = physicalBoundingBox.transposedRect();
+    return physicalBoundingBox;
+}
+
+FloatPoint ShapeOutsideInfo::shapeToRendererPoint(FloatPoint point) const
+{
+    FloatPoint result = FloatPoint(point.x() + logicalLeftOffset(), point.y() + logicalTopOffset());
+    if (m_renderer.style().isFlippedBlocksWritingMode())
+        result.setY(m_renderer.logicalHeight() - result.y());
+    if (!m_renderer.style().isHorizontalWritingMode())
+        result = result.transposedPoint();
+    return result;
+}
+
+FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const
+{
+    if (!m_renderer.style().isHorizontalWritingMode())
+        return size.transposedSize();
+    return size;
+}
+
+static inline CSSBoxType referenceBox(ShapeValue* shapeValue)
+{
+    if (shapeValue-&gt;cssBox() == BoxMissing) {
+        if (shapeValue-&gt;type() == ShapeValue::Image)
+            return ContentBox;
+        return MarginBox;
+    }
+    return shapeValue-&gt;cssBox();
+}
+
+void ShapeOutsideInfo::setReferenceBoxLogicalSize(LayoutSize newReferenceBoxLogicalSize)
+{
+    bool isHorizontalWritingMode = m_renderer.containingBlock()-&gt;style().isHorizontalWritingMode();
+    switch (referenceBox(m_renderer.style().shapeOutside())) {
+    case MarginBox:
+        if (isHorizontalWritingMode)
+            newReferenceBoxLogicalSize.expand(m_renderer.horizontalMarginExtent(), m_renderer.verticalMarginExtent());
+        else
+            newReferenceBoxLogicalSize.expand(m_renderer.verticalMarginExtent(), m_renderer.horizontalMarginExtent());
+        break;
+    case BorderBox:
+        break;
+    case PaddingBox:
+        if (isHorizontalWritingMode)
+            newReferenceBoxLogicalSize.shrink(m_renderer.horizontalBorderExtent(), m_renderer.verticalBorderExtent());
+        else
+            newReferenceBoxLogicalSize.shrink(m_renderer.verticalBorderExtent(), m_renderer.horizontalBorderExtent());
+        break;
+    case ContentBox:
+        if (isHorizontalWritingMode)
+            newReferenceBoxLogicalSize.shrink(m_renderer.horizontalBorderAndPaddingExtent(), m_renderer.verticalBorderAndPaddingExtent());
+        else
+            newReferenceBoxLogicalSize.shrink(m_renderer.verticalBorderAndPaddingExtent(), m_renderer.horizontalBorderAndPaddingExtent());
+        break;
+    case Fill:
+    case Stroke:
+    case ViewBox:
+    case BoxMissing:
+        ASSERT_NOT_REACHED();
+        break;
+    }
+
+    if (m_referenceBoxLogicalSize == newReferenceBoxLogicalSize)
+        return;
+    markShapeAsDirty();
+    m_referenceBoxLogicalSize = newReferenceBoxLogicalSize;
+}
+
+static inline bool checkShapeImageOrigin(Document&amp; document, CachedImage&amp; cachedImage)
+{
+    if (cachedImage.isOriginClean(document.securityOrigin()))
+        return true;
+
+    const URL&amp; url = cachedImage.url();
+    String urlString = url.isNull() ? &quot;''&quot; : url.stringCenterEllipsizedToLength();
+    document.addConsoleMessage(MessageSource::Security, MessageLevel::Error, &quot;Unsafe attempt to load URL &quot; + urlString + &quot;.&quot;);
+
+    return false;
+}
+
+static void getShapeImageAndRect(const ShapeValue* shapeValue, const RenderBox* renderBox, const LayoutSize&amp; referenceBoxSize, Image*&amp; image, LayoutRect&amp; rect)
+{
+    ASSERT(shapeValue-&gt;isImageValid());
+    StyleImage* styleImage = shapeValue-&gt;image();
+
+    const IntSize&amp; imageSize = renderBox-&gt;calculateImageIntrinsicDimensions(styleImage, roundedIntSize(referenceBoxSize), RenderImage::ScaleByEffectiveZoom);
+    styleImage-&gt;setContainerSizeForRenderer(renderBox, imageSize, renderBox-&gt;style().effectiveZoom());
+
+    image = styleImage-&gt;cachedImage()-&gt;imageForRenderer(renderBox);
+    if (renderBox-&gt;isRenderImage())
+        rect = toRenderImage(renderBox)-&gt;replacedContentRect(renderBox-&gt;intrinsicSize());
+    else
+        rect = LayoutRect(LayoutPoint(), imageSize);
+}
+
+static LayoutRect getShapeImageMarginRect(const RenderBox&amp; renderBox, const LayoutSize&amp; referenceBoxLogicalSize)
+{
+    LayoutPoint marginBoxOrigin(-renderBox.marginLogicalLeft() - renderBox.borderAndPaddingLogicalLeft(), -renderBox.marginBefore() - renderBox.borderBefore() - renderBox.paddingBefore());
+    LayoutSize marginBoxSizeDelta(renderBox.marginLogicalWidth() + renderBox.borderAndPaddingLogicalWidth(), renderBox.marginLogicalHeight() + renderBox.borderAndPaddingLogicalHeight());
+    return LayoutRect(marginBoxOrigin, referenceBoxLogicalSize + marginBoxSizeDelta);
+}
+
+const Shape&amp; ShapeOutsideInfo::computedShape() const
+{
+    if (Shape* shape = m_shape.get())
+        return *shape;
+
+    WritingMode writingMode = m_renderer.containingBlock()-&gt;style().writingMode();
+    Length margin = m_renderer.style().shapeMargin();
+    float shapeImageThreshold = m_renderer.style().shapeImageThreshold();
+    const ShapeValue* shapeValue = this-&gt;m_renderer.style().shapeOutside();
+    ASSERT(shapeValue);
+
+    switch (shapeValue-&gt;type()) {
+    case ShapeValue::Shape:
+        ASSERT(shapeValue-&gt;shape());
+        m_shape = Shape::createShape(shapeValue-&gt;shape(), m_referenceBoxLogicalSize, writingMode, margin);
+        break;
+    case ShapeValue::Image: {
+        Image* image;
+        LayoutRect imageRect;
+        getShapeImageAndRect(shapeValue, &amp;m_renderer, m_referenceBoxLogicalSize, image, imageRect);
+        const LayoutRect&amp; marginRect = getShapeImageMarginRect(m_renderer, m_referenceBoxLogicalSize);
+        m_shape = Shape::createRasterShape(image, shapeImageThreshold, imageRect, marginRect, writingMode, margin);
+        break;
+    }
+    case ShapeValue::Box: {
+        RoundedRect shapeRect = computeRoundedRectForBoxShape(referenceBox(m_renderer.style().shapeOutside()), m_renderer);
+        if (!m_renderer.containingBlock()-&gt;style().isHorizontalWritingMode())
+            shapeRect = shapeRect.transposedRect();
+        m_shape = Shape::createBoxShape(shapeRect, writingMode, margin);
+        break;
+    }
+    case ShapeValue::Outside:
+        // Outside should have already resolved to a different shape value
+        ASSERT_NOT_REACHED();
+    }
+
+    ASSERT(m_shape);
+    return *m_shape;
+}
+
+static inline LayoutUnit borderBeforeInWritingMode(const RenderBox&amp; renderer, WritingMode writingMode)
+{
+    switch (writingMode) {
+    case TopToBottomWritingMode: return renderer.borderTop();
+    case BottomToTopWritingMode: return renderer.borderBottom();
+    case LeftToRightWritingMode: return renderer.borderLeft();
+    case RightToLeftWritingMode: return renderer.borderRight();
+    }
+
+    ASSERT_NOT_REACHED();
+    return renderer.borderBefore();
+}
+
+static inline LayoutUnit borderAndPaddingBeforeInWritingMode(const RenderBox&amp; renderer, WritingMode writingMode)
+{
+    switch (writingMode) {
+    case TopToBottomWritingMode: return renderer.borderTop() + renderer.paddingTop();
+    case BottomToTopWritingMode: return renderer.borderBottom() + renderer.paddingBottom();
+    case LeftToRightWritingMode: return renderer.borderLeft() + renderer.paddingLeft();
+    case RightToLeftWritingMode: return renderer.borderRight() + renderer.paddingRight();
+    }
+
+    ASSERT_NOT_REACHED();
+    return renderer.borderAndPaddingBefore();
+}
+
+LayoutUnit ShapeOutsideInfo::logicalTopOffset() const
+{
+    switch (referenceBox(m_renderer.style().shapeOutside())) {
+    case MarginBox: return -m_renderer.marginBefore(&amp;m_renderer.containingBlock()-&gt;style());
+    case BorderBox: return LayoutUnit();
+    case PaddingBox: return borderBeforeInWritingMode(m_renderer, m_renderer.containingBlock()-&gt;style().writingMode());
+    case ContentBox: return borderAndPaddingBeforeInWritingMode(m_renderer, m_renderer.containingBlock()-&gt;style().writingMode());
+    case Fill: break;
+    case Stroke: break;
+    case ViewBox: break;
+    case BoxMissing: break;
+    }
+    
+    ASSERT_NOT_REACHED();
+    return LayoutUnit();
+}
+
+static inline LayoutUnit borderStartWithStyleForWritingMode(const RenderBox&amp; renderer, const RenderStyle&amp; style)
+{
+    if (style.isHorizontalWritingMode()) {
+        if (style.isLeftToRightDirection())
+            return renderer.borderLeft();
+        
+        return renderer.borderRight();
+    }
+    if (style.isLeftToRightDirection())
+        return renderer.borderTop();
+    
+    return renderer.borderBottom();
+}
+
+static inline LayoutUnit borderAndPaddingStartWithStyleForWritingMode(const RenderBox&amp; renderer, const RenderStyle&amp; style)
+{
+    if (style.isHorizontalWritingMode()) {
+        if (style.isLeftToRightDirection())
+            return renderer.borderLeft() + renderer.paddingLeft();
+        
+        return renderer.borderRight() + renderer.paddingRight();
+    }
+    if (style.isLeftToRightDirection())
+        return renderer.borderTop() + renderer.paddingTop();
+    
+    return renderer.borderBottom() + renderer.paddingBottom();
+}
+
+LayoutUnit ShapeOutsideInfo::logicalLeftOffset() const
+{
+    if (m_renderer.isRenderRegion())
+        return LayoutUnit();
+    
+    switch (referenceBox(m_renderer.style().shapeOutside())) {
+    case MarginBox: return -m_renderer.marginStart(&amp;m_renderer.containingBlock()-&gt;style());
+    case BorderBox: return LayoutUnit();
+    case PaddingBox: return borderStartWithStyleForWritingMode(m_renderer, m_renderer.containingBlock()-&gt;style());
+    case ContentBox: return borderAndPaddingStartWithStyleForWritingMode(m_renderer, m_renderer.containingBlock()-&gt;style());
+    case Fill: break;
+    case Stroke: break;
+    case ViewBox: break;
+    case BoxMissing: break;
+    }
+    
+    ASSERT_NOT_REACHED();
+    return LayoutUnit();
+}
+
</ins><span class="cx"> bool ShapeOutsideInfo::isEnabledFor(const RenderBox&amp; box)
</span><span class="cx"> {
</span><span class="cx">     ShapeValue* shapeValue = box.style().shapeOutside();
</span><span class="lines">@@ -59,6 +305,21 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+SegmentList ShapeOutsideInfo::computeSegmentsForLine(LayoutUnit lineTop, LayoutUnit lineHeight) const
+{
+    ASSERT(lineHeight &gt;= 0);
+    SegmentList segments;
+
+    computedShape().getExcludedIntervals((lineTop - logicalTopOffset()), std::min(lineHeight, shapeLogicalBottom() - lineTop), segments);
+
+    for (size_t i = 0; i &lt; segments.size(); i++) {
+        segments[i].logicalLeft += logicalLeftOffset();
+        segments[i].logicalRight += logicalLeftOffset();
+    }
+    
+    return segments;
+}
+
</ins><span class="cx"> void ShapeOutsideInfo::updateDeltasForContainingBlockLine(const RenderBlockFlow&amp; containingBlock, const FloatingObject&amp; floatingObject, LayoutUnit lineTop, LayoutUnit lineHeight)
</span><span class="cx"> {
</span><span class="cx">     LayoutUnit borderBoxTop = containingBlock.logicalTopForFloat(&amp;floatingObject) + containingBlock.marginBeforeForChild(m_renderer);
</span><span class="lines">@@ -71,7 +332,7 @@
</span><span class="cx"> 
</span><span class="cx">         LayoutUnit floatMarginBoxWidth = containingBlock.logicalWidthForFloat(&amp;floatingObject);
</span><span class="cx"> 
</span><del>-        if (lineOverlapsShapeBounds()) {
</del><ins>+        if (computedShape().lineOverlapsShapeMarginBounds(m_referenceBoxLineTop, m_lineHeight)) {
</ins><span class="cx">             SegmentList segments = computeSegmentsForLine(borderBoxLineTop, lineHeight);
</span><span class="cx">             if (segments.size()) {
</span><span class="cx">                 LayoutUnit logicalLeftMargin = containingBlock.style().isLeftToRightDirection() ? containingBlock.marginStartForChild(m_renderer) : containingBlock.marginEndForChild(m_renderer);
</span><span class="lines">@@ -95,17 +356,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ShapeValue* ShapeOutsideInfo::shapeValue() const
-{
-    return m_renderer.style().shapeOutside();
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-const RenderStyle&amp; ShapeOutsideInfo::styleForWritingMode() const
-{
-    ASSERT(m_renderer.containingBlock());
-    return m_renderer.containingBlock()-&gt;style();
-}
-
-}
-
</del><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapeOutsideInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.h (166751 => 166752)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.h        2014-04-03 22:56:47 UTC (rev 166751)
+++ trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.h        2014-04-03 23:04:49 UTC (rev 166752)
</span><span class="lines">@@ -32,8 +32,13 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="cx"> 
</span><ins>+#include &quot;FloatRect.h&quot;
</ins><span class="cx"> #include &quot;LayoutSize.h&quot;
</span><del>-#include &quot;ShapeInfo.h&quot;
</del><ins>+#include &quot;LayoutUnit.h&quot;
+#include &quot;RenderStyle.h&quot;
+#include &quot;Shape.h&quot;
+#include &quot;ShapeValue.h&quot;
+#include &lt;memory&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -41,10 +46,11 @@
</span><span class="cx"> class RenderBox;
</span><span class="cx"> class FloatingObject;
</span><span class="cx"> 
</span><del>-class ShapeOutsideInfo final : public ShapeInfo&lt;RenderBox&gt;, public MappedInfo&lt;RenderBox, ShapeOutsideInfo&gt; {
</del><ins>+class ShapeOutsideInfo final {
+    WTF_MAKE_FAST_ALLOCATED;
</ins><span class="cx"> public:
</span><span class="cx">     ShapeOutsideInfo(const RenderBox&amp; renderer)
</span><del>-        : ShapeInfo&lt;RenderBox&gt;(renderer)
</del><ins>+        : m_renderer(renderer)
</ins><span class="cx">         , m_lineOverlapsShape(false)
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="lines">@@ -57,32 +63,59 @@
</span><span class="cx"> 
</span><span class="cx">     void updateDeltasForContainingBlockLine(const RenderBlockFlow&amp;, const FloatingObject&amp;, LayoutUnit lineTop, LayoutUnit lineHeight);
</span><span class="cx"> 
</span><del>-    virtual bool lineOverlapsShapeBounds() const override
-    {
-        return computedShape().lineOverlapsShapeMarginBounds(m_referenceBoxLineTop, m_lineHeight);
-    }
</del><ins>+    void setReferenceBoxLogicalSize(LayoutSize);
</ins><span class="cx"> 
</span><del>-protected:
-    virtual CSSBoxType referenceBox() const override
</del><ins>+    LayoutUnit shapeLogicalTop() const { return computedShape().shapeMarginLogicalBoundingBox().y() + logicalTopOffset(); }
+    LayoutUnit shapeLogicalBottom() const { return computedShape().shapeMarginLogicalBoundingBox().maxY() + logicalTopOffset(); }
+    LayoutUnit shapeLogicalLeft() const { return computedShape().shapeMarginLogicalBoundingBox().x() + logicalLeftOffset(); }
+    LayoutUnit shapeLogicalRight() const { return computedShape().shapeMarginLogicalBoundingBox().maxX() + logicalLeftOffset(); }
+    LayoutUnit shapeLogicalWidth() const { return computedShape().shapeMarginLogicalBoundingBox().width(); }
+    LayoutUnit shapeLogicalHeight() const { return computedShape().shapeMarginLogicalBoundingBox().height(); }
+
+    LayoutUnit logicalLineTop() const { return m_referenceBoxLineTop + logicalTopOffset(); }
+    LayoutUnit logicalLineBottom() const { return m_referenceBoxLineTop + m_lineHeight + logicalTopOffset(); }
+    LayoutUnit logicalLineBottom(LayoutUnit lineHeight) const { return m_referenceBoxLineTop + lineHeight + logicalTopOffset(); }
+
+    void markShapeAsDirty() { m_shape = nullptr; }
+    bool isShapeDirty() { return !m_shape; }
+
+    LayoutRect computedShapePhysicalBoundingBox() const;
+    FloatPoint shapeToRendererPoint(FloatPoint) const;
+    FloatSize shapeToRendererSize(FloatSize) const;
+
+    const Shape&amp; computedShape() const;
+
+    static ShapeOutsideInfo&amp; ensureInfo(const RenderBox&amp; key)
</ins><span class="cx">     {
</span><del>-        if (shapeValue()-&gt;cssBox() == BoxMissing) {
-            if (shapeValue()-&gt;type() == ShapeValue::Image)
-                return ContentBox;
-            return MarginBox;
-        }
-        return shapeValue()-&gt;cssBox();
</del><ins>+        InfoMap&amp; infoMap = ShapeOutsideInfo::infoMap();
+        if (ShapeOutsideInfo* info = infoMap.get(&amp;key))
+            return *info;
+        auto result = infoMap.add(&amp;key, std::make_unique&lt;ShapeOutsideInfo&gt;(key));
+        return *result.iterator-&gt;value;
</ins><span class="cx">     }
</span><ins>+    static void removeInfo(const RenderBox&amp; key) { infoMap().remove(&amp;key); }
+    static ShapeOutsideInfo* info(const RenderBox&amp; key) { return infoMap().get(&amp;key); }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    virtual LayoutRect computedShapeLogicalBoundingBox() const override { return computedShape().shapeMarginLogicalBoundingBox(); }
-    virtual ShapeValue* shapeValue() const override;
-    virtual void getIntervals(LayoutUnit lineTop, LayoutUnit lineHeight, SegmentList&amp; segments) const override
</del><ins>+    SegmentList computeSegmentsForLine(LayoutUnit lineTop, LayoutUnit lineHeight) const;
+
+    LayoutUnit logicalTopOffset() const;
+    LayoutUnit logicalLeftOffset() const;
+
+    typedef HashMap&lt;const RenderBox*, std::unique_ptr&lt;ShapeOutsideInfo&gt;&gt; InfoMap;
+    static InfoMap&amp; infoMap()
</ins><span class="cx">     {
</span><del>-        return computedShape().getExcludedIntervals(lineTop, lineHeight, segments);
</del><ins>+        DEPRECATED_DEFINE_STATIC_LOCAL(InfoMap, staticInfoMap, ());
+        return staticInfoMap;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    virtual const RenderStyle&amp; styleForWritingMode() const override;
</del><ins>+    const RenderBox&amp; m_renderer;
</ins><span class="cx"> 
</span><ins>+    mutable std::unique_ptr&lt;Shape&gt; m_shape;
+    LayoutSize m_referenceBoxLogicalSize;
+    LayoutUnit m_referenceBoxLineTop;
+    LayoutUnit m_lineHeight;
+
</ins><span class="cx">     LayoutUnit m_leftMarginBoxDelta;
</span><span class="cx">     LayoutUnit m_rightMarginBoxDelta;
</span><span class="cx">     LayoutUnit m_borderBoxLineTop;
</span></span></pre>
</div>
</div>

</body>
</html>