<!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>[165689] 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/165689">165689</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2014-03-15 21:57:03 -0700 (Sat, 15 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Move BorderEdge class to its own file.
https://bugs.webkit.org/show_bug.cgi?id=130294

Reviewed by Sam Weinig.

This is in preparation to have better encapsulation for border box decoration painting.

No change in functionality.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* rendering/BorderEdge.cpp: Added.
(WebCore::BorderEdge::BorderEdge):
(WebCore::BorderEdge::getBorderEdgeInfo):
(WebCore::BorderEdge::includesAdjacentEdges):
(WebCore::BorderEdge::obscuresBackgroundEdge):
(WebCore::BorderEdge::obscuresBackground):
(WebCore::BorderEdge::getDoubleBorderStripeWidths):
* rendering/BorderEdge.h: Added.
(WebCore::BorderEdge::edgeFlagForSide):
(WebCore::BorderEdge::includesEdge):
(WebCore::BorderEdge::edgesShareColor):
(WebCore::BorderEdge::hasVisibleColorAndStyle):
(WebCore::BorderEdge::shouldRender):
(WebCore::BorderEdge::presentButInvisible):
(WebCore::BorderEdge::widthForPainting):
(WebCore::BorderEdge::borderWidthInDevicePixel):
* rendering/RenderBoxModelObject.cpp:
(WebCore::borderStyleHasUnmatchedColorsAtCorner):
(WebCore::colorsMatchAtCorner):
(WebCore::colorNeedsAntiAliasAtCorner):
(WebCore::willBeOverdrawn):
(WebCore::joinRequiresMitre):
(WebCore::RenderBoxModelObject::paintBorderSides):
(WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
(WebCore::RenderBoxModelObject::paintBorder):
(WebCore::RenderBoxModelObject::borderObscuresBackgroundEdge):
(WebCore::RenderBoxModelObject::borderObscuresBackground):
* rendering/RenderBoxModelObject.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="#trunkSourceWebCoreGNUmakefilelistam">trunk/Source/WebCore/GNUmakefile.list.am</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="#trunkSourceWebCorerenderingRenderBoxModelObjectcpp">trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxModelObjecth">trunk/Source/WebCore/rendering/RenderBoxModelObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderingAllInOnecpp">trunk/Source/WebCore/rendering/RenderingAllInOne.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorerenderingBorderEdgecpp">trunk/Source/WebCore/rendering/BorderEdge.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingBorderEdgeh">trunk/Source/WebCore/rendering/BorderEdge.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 (165688 => 165689)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2014-03-16 01:27:51 UTC (rev 165688)
+++ trunk/Source/WebCore/CMakeLists.txt        2014-03-16 04:57:03 UTC (rev 165689)
</span><span class="lines">@@ -2082,6 +2082,7 @@
</span><span class="cx"> 
</span><span class="cx">     rendering/AutoTableLayout.cpp
</span><span class="cx">     rendering/BidiRun.cpp
</span><ins>+    rendering/BorderEdge.cpp
</ins><span class="cx">     rendering/CounterNode.cpp
</span><span class="cx">     rendering/EllipsisBox.cpp
</span><span class="cx">     rendering/FilterEffectRenderer.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (165688 => 165689)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-16 01:27:51 UTC (rev 165688)
+++ trunk/Source/WebCore/ChangeLog        2014-03-16 04:57:03 UTC (rev 165689)
</span><span class="lines">@@ -1,3 +1,48 @@
</span><ins>+2014-03-15  Zalan Bujtas  &lt;zalan@apple.com&gt;
+
+        Move BorderEdge class to its own file.
+        https://bugs.webkit.org/show_bug.cgi?id=130294
+
+        Reviewed by Sam Weinig.
+
+        This is in preparation to have better encapsulation for border box decoration painting.
+
+        No change in functionality.
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * rendering/BorderEdge.cpp: Added.
+        (WebCore::BorderEdge::BorderEdge):
+        (WebCore::BorderEdge::getBorderEdgeInfo):
+        (WebCore::BorderEdge::includesAdjacentEdges):
+        (WebCore::BorderEdge::obscuresBackgroundEdge):
+        (WebCore::BorderEdge::obscuresBackground):
+        (WebCore::BorderEdge::getDoubleBorderStripeWidths):
+        * rendering/BorderEdge.h: Added.
+        (WebCore::BorderEdge::edgeFlagForSide):
+        (WebCore::BorderEdge::includesEdge):
+        (WebCore::BorderEdge::edgesShareColor):
+        (WebCore::BorderEdge::hasVisibleColorAndStyle):
+        (WebCore::BorderEdge::shouldRender):
+        (WebCore::BorderEdge::presentButInvisible):
+        (WebCore::BorderEdge::widthForPainting):
+        (WebCore::BorderEdge::borderWidthInDevicePixel):
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::borderStyleHasUnmatchedColorsAtCorner):
+        (WebCore::colorsMatchAtCorner):
+        (WebCore::colorNeedsAntiAliasAtCorner):
+        (WebCore::willBeOverdrawn):
+        (WebCore::joinRequiresMitre):
+        (WebCore::RenderBoxModelObject::paintBorderSides):
+        (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
+        (WebCore::RenderBoxModelObject::paintBorder):
+        (WebCore::RenderBoxModelObject::borderObscuresBackgroundEdge):
+        (WebCore::RenderBoxModelObject::borderObscuresBackground):
+        * rendering/RenderBoxModelObject.h:
+
</ins><span class="cx"> 2014-03-15  Martin Robinson  &lt;mrobinson@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix WebCore unused parameter warnings for WebKitGTK+ CMake build
</span></span></pre></div>
<a id="trunkSourceWebCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/GNUmakefile.list.am (165688 => 165689)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/GNUmakefile.list.am        2014-03-16 01:27:51 UTC (rev 165688)
+++ trunk/Source/WebCore/GNUmakefile.list.am        2014-03-16 04:57:03 UTC (rev 165689)
</span><span class="lines">@@ -4260,6 +4260,8 @@
</span><span class="cx">         Source/WebCore/rendering/AutoTableLayout.h \
</span><span class="cx">         Source/WebCore/rendering/BidiRun.cpp \
</span><span class="cx">         Source/WebCore/rendering/BidiRun.h \
</span><ins>+        Source/WebCore/rendering/BorderEdge.cpp \
+        Source/WebCore/rendering/BorderEdge.h \
</ins><span class="cx">         Source/WebCore/rendering/break_lines.cpp \
</span><span class="cx">         Source/WebCore/rendering/break_lines.h \
</span><span class="cx">         Source/WebCore/rendering/ClipPathOperation.h \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (165688 => 165689)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-03-16 01:27:51 UTC (rev 165688)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-03-16 04:57:03 UTC (rev 165689)
</span><span class="lines">@@ -9533,6 +9533,20 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\rendering\BorderEdge.cpp&quot;&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\rendering\break_lines.cpp&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="lines">@@ -19667,6 +19681,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\cssjit\StackAllocator.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\AutoTableLayout.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\BidiRun.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\rendering\BorderEdge.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\break_lines.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\CounterNode.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\rendering\EllipsisBox.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (165688 => 165689)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-03-16 01:27:51 UTC (rev 165688)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-03-16 04:57:03 UTC (rev 165689)
</span><span class="lines">@@ -2328,6 +2328,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\rendering\BidiRun.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;rendering&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\rendering\BorderEdge.cpp&quot;&gt;
+      &lt;Filter&gt;rendering&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\rendering\break_lines.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;rendering&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (165688 => 165689)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-03-16 01:27:51 UTC (rev 165688)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-03-16 04:57:03 UTC (rev 165689)
</span><span class="lines">@@ -1990,6 +1990,8 @@
</span><span class="cx">                 57B791A414C6A62900F202D1 /* ContentDistributor.h in Headers */ = {isa = PBXBuildFile; fileRef = 57B791A014C6A62900F202D1 /* ContentDistributor.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 57CF497414EE36D700ECFF14 /* InsertionPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57CF497214EE36D700ECFF14 /* InsertionPoint.cpp */; };
</span><span class="cx">                 57CF497514EE36D700ECFF14 /* InsertionPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 57CF497314EE36D700ECFF14 /* InsertionPoint.h */; };
</span><ins>+                589556ED18D4A44000764B03 /* BorderEdge.h in Headers */ = {isa = PBXBuildFile; fileRef = 589556EC18D4A44000764B03 /* BorderEdge.h */; };
+                58AEE2F418D4BCCF0022E7FE /* BorderEdge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 58AEE2F318D4BCCF0022E7FE /* BorderEdge.cpp */; };
</ins><span class="cx">                 5905ADBF1302F3CE00F116DF /* XMLTreeViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5905ADBD1302F3CE00F116DF /* XMLTreeViewer.cpp */; };
</span><span class="cx">                 5905ADC01302F3CE00F116DF /* XMLTreeViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5905ADBE1302F3CE00F116DF /* XMLTreeViewer.h */; };
</span><span class="cx">                 590E1B4911E4EF4B0069F784 /* DeviceOrientationData.h in Headers */ = {isa = PBXBuildFile; fileRef = 590E1B4811E4EF4B0069F784 /* DeviceOrientationData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -8947,6 +8949,8 @@
</span><span class="cx">                 57B791A014C6A62900F202D1 /* ContentDistributor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentDistributor.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 57CF497214EE36D700ECFF14 /* InsertionPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InsertionPoint.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 57CF497314EE36D700ECFF14 /* InsertionPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InsertionPoint.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                589556EC18D4A44000764B03 /* BorderEdge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BorderEdge.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                58AEE2F318D4BCCF0022E7FE /* BorderEdge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BorderEdge.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 5905ADBD1302F3CE00F116DF /* XMLTreeViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLTreeViewer.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5905ADBE1302F3CE00F116DF /* XMLTreeViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLTreeViewer.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 590E1B4811E4EF4B0069F784 /* DeviceOrientationData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceOrientationData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -21727,6 +21731,8 @@
</span><span class="cx">                                 A8CFF0490A154F09000A4234 /* AutoTableLayout.h */,
</span><span class="cx">                                 BCE7898A1120E8020060ECE5 /* BidiRun.cpp */,
</span><span class="cx">                                 BCE789851120E7A60060ECE5 /* BidiRun.h */,
</span><ins>+                                58AEE2F318D4BCCF0022E7FE /* BorderEdge.cpp */,
+                                589556EC18D4A44000764B03 /* BorderEdge.h */,
</ins><span class="cx">                                 BCEA4815097D93020094C9E4 /* break_lines.cpp */,
</span><span class="cx">                                 BCEA4816097D93020094C9E4 /* break_lines.h */,
</span><span class="cx">                                 BCDD454D1236C95C009A7985 /* ColumnInfo.h */,
</span><span class="lines">@@ -24478,6 +24484,7 @@
</span><span class="cx">                                 B2FA3D590AB75A6F000E5AC4 /* JSSVGCircleElement.h in Headers */,
</span><span class="cx">                                 B2FA3D5B0AB75A6F000E5AC4 /* JSSVGClipPathElement.h in Headers */,
</span><span class="cx">                                 B2FA3D5D0AB75A6F000E5AC4 /* JSSVGColor.h in Headers */,
</span><ins>+                                589556ED18D4A44000764B03 /* BorderEdge.h in Headers */,
</ins><span class="cx">                                 B2FA3D5F0AB75A6F000E5AC4 /* JSSVGComponentTransferFunctionElement.h in Headers */,
</span><span class="cx">                                 B2FA3D610AB75A6F000E5AC4 /* JSSVGCursorElement.h in Headers */,
</span><span class="cx">                                 B2FA3D630AB75A6F000E5AC4 /* JSSVGDefsElement.h in Headers */,
</span><span class="lines">@@ -29325,6 +29332,7 @@
</span><span class="cx">                                 93F19B0308245E59001E9ABC /* XSLStyleSheetLibxslt.cpp in Sources */,
</span><span class="cx">                                 E1F1E82F0C3C2BB9006DB391 /* XSLTExtensions.cpp in Sources */,
</span><span class="cx">                                 93F19B0408245E59001E9ABC /* XSLTProcessor.cpp in Sources */,
</span><ins>+                                58AEE2F418D4BCCF0022E7FE /* BorderEdge.cpp in Sources */,
</ins><span class="cx">                                 93F19B0508245E59001E9ABC /* XSLTProcessorLibxslt.cpp in Sources */,
</span><span class="cx">                                 E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
</span><span class="cx">                                 977E2E0E12F0FC9C00C13379 /* XSSAuditor.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingBorderEdgecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/rendering/BorderEdge.cpp (0 => 165689)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/BorderEdge.cpp                                (rev 0)
+++ trunk/Source/WebCore/rendering/BorderEdge.cpp        2014-03-16 04:57:03 UTC (rev 165689)
</span><span class="lines">@@ -0,0 +1,105 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 AND ITS CONTRIBUTORS &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 APPLE OR ITS 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;BorderEdge.h&quot;
+
+#include &quot;Color.h&quot;
+#include &quot;LayoutUnit.h&quot;
+#include &quot;RenderObject.h&quot;
+#include &quot;RenderStyle.h&quot;
+
+namespace WebCore {
+
+BorderEdge::BorderEdge(LayoutUnit edgeWidth, Color edgeColor, EBorderStyle edgeStyle, bool edgeIsTransparent, bool edgeIsPresent, float devicePixelRatio)
+    : m_width(edgeWidth)
+    , m_color(edgeColor)
+    , m_style(edgeStyle)
+    , m_isTransparent(edgeIsTransparent)
+    , m_isPresent(edgeIsPresent)
+    , m_devicePixelRatio(devicePixelRatio)
+{
+    if (edgeStyle == DOUBLE &amp;&amp; edgeWidth  &lt; borderWidthInDevicePixel(3))
+        m_style = SOLID;
+    m_flooredToDevicePixelWidth = floorToDevicePixel(edgeWidth, devicePixelRatio);
+}
+
+BorderEdge::BorderEdge()
+    : m_width(LayoutUnit::fromPixel(0))
+    , m_style(BHIDDEN)
+    , m_isTransparent(false)
+    , m_isPresent(false)
+    , m_flooredToDevicePixelWidth(0)
+    , m_devicePixelRatio(1)
+{
+}
+
+void BorderEdge::getBorderEdgeInfo(BorderEdge edges[], const RenderStyle&amp; style, float deviceScaleFactor, bool includeLogicalLeftEdge, bool includeLogicalRightEdge)
+{
+    bool horizontal = style.isHorizontalWritingMode();
+
+    edges[BSTop] = BorderEdge(style.borderTopWidth(), style.visitedDependentColor(CSSPropertyBorderTopColor), style.borderTopStyle(), style.borderTopIsTransparent(),
+        horizontal || includeLogicalLeftEdge, deviceScaleFactor);
+    edges[BSRight] = BorderEdge(style.borderRightWidth(), style.visitedDependentColor(CSSPropertyBorderRightColor), style.borderRightStyle(), style.borderRightIsTransparent(),
+        !horizontal || includeLogicalRightEdge, deviceScaleFactor);
+    edges[BSBottom] = BorderEdge(style.borderBottomWidth(), style.visitedDependentColor(CSSPropertyBorderBottomColor), style.borderBottomStyle(), style.borderBottomIsTransparent(),
+        horizontal || includeLogicalRightEdge, deviceScaleFactor);
+    edges[BSLeft] = BorderEdge(style.borderLeftWidth(), style.visitedDependentColor(CSSPropertyBorderLeftColor), style.borderLeftStyle(), style.borderLeftIsTransparent(),
+        !horizontal || includeLogicalLeftEdge, deviceScaleFactor);
+    }
+
+bool BorderEdge::obscuresBackgroundEdge(float scale) const
+{
+    if (!m_isPresent || m_isTransparent || (m_width * scale) &lt; borderWidthInDevicePixel(2) || m_color.hasAlpha() || m_style == BHIDDEN)
+        return false;
+
+    if (m_style == DOTTED || m_style == DASHED)
+        return false;
+
+    if (m_style == DOUBLE)
+        return m_width &gt;= scale * borderWidthInDevicePixel(5); // The outer band needs to be &gt;= 2px wide at unit scale.
+
+    return true;
+}
+
+bool BorderEdge::obscuresBackground() const
+{
+    if (!m_isPresent || m_isTransparent || m_color.hasAlpha() || m_style == BHIDDEN)
+        return false;
+
+    if (m_style == DOTTED || m_style == DASHED || m_style == DOUBLE)
+        return false;
+
+    return true;
+}
+
+void BorderEdge::getDoubleBorderStripeWidths(LayoutUnit outerWidth, LayoutUnit innerWidth) const
+{
+    LayoutUnit fullWidth = widthForPainting();
+    innerWidth = ceilToDevicePixel(fullWidth * 2 / 3, m_devicePixelRatio);
+    outerWidth = floorToDevicePixel(fullWidth / 3, m_devicePixelRatio);
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingBorderEdgeh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/rendering/BorderEdge.h (0 => 165689)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/BorderEdge.h                                (rev 0)
+++ trunk/Source/WebCore/rendering/BorderEdge.h        2014-03-16 04:57:03 UTC (rev 165689)
</span><span class="lines">@@ -0,0 +1,91 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 AND ITS CONTRIBUTORS &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 APPLE OR ITS 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.
+ */
+
+#ifndef BorderEdge_h
+#define BorderEdge_h
+
+#include &quot;RenderObject.h&quot;
+
+namespace WebCore {
+
+typedef unsigned BorderEdgeFlags;
+
+class RenderStyle;
+class LayoutUnit;
+
+class BorderEdge {
+public:
+    enum BorderEdgeFlag {
+        TopBorderEdge = 1 &lt;&lt; BSTop,
+        RightBorderEdge = 1 &lt;&lt; BSRight,
+        BottomBorderEdge = 1 &lt;&lt; BSBottom,
+        LeftBorderEdge = 1 &lt;&lt; BSLeft,
+        AllBorderEdges = TopBorderEdge | BottomBorderEdge | LeftBorderEdge | RightBorderEdge
+    };
+
+    BorderEdge();
+    BorderEdge(LayoutUnit edgeWidth, Color edgeColor, EBorderStyle edgeStyle, bool edgeIsTransparent, bool edgeIsPresent, float devicePixelRatio);
+
+    static void getBorderEdgeInfo(BorderEdge edges[], const RenderStyle&amp;, float deviceScaleFactor, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true);
+
+    EBorderStyle style() const { return m_style; }
+    Color color() const { return m_color; }
+    bool isTransparent() const { return m_isTransparent; }
+    bool isPresent() const { return m_isPresent; }
+
+    inline bool hasVisibleColorAndStyle() const { return m_style &gt; BHIDDEN &amp;&amp; !m_isTransparent; }
+    inline bool shouldRender() const { return m_isPresent &amp;&amp; widthForPainting() &amp;&amp; hasVisibleColorAndStyle(); }
+    inline bool presentButInvisible() const { return widthForPainting() &amp;&amp; !hasVisibleColorAndStyle(); }
+    inline float widthForPainting() const { return m_isPresent ?  m_flooredToDevicePixelWidth : 0; }
+    void getDoubleBorderStripeWidths(LayoutUnit outerWidth, LayoutUnit innerWidth) const;
+    bool obscuresBackgroundEdge(float scale) const;
+    bool obscuresBackground() const;
+
+private:
+    inline float borderWidthInDevicePixel(int logicalPixels) const { return LayoutUnit(logicalPixels / m_devicePixelRatio).toFloat(); }
+
+    LayoutUnit m_width;
+    Color m_color;
+    EBorderStyle m_style;
+    bool m_isTransparent;
+    bool m_isPresent;
+    float m_flooredToDevicePixelWidth;
+    float m_devicePixelRatio;
+};
+
+inline bool edgesShareColor(const BorderEdge&amp; firstEdge, const BorderEdge&amp; secondEdge) { return firstEdge.color() == secondEdge.color(); }
+inline BorderEdge::BorderEdgeFlag edgeFlagForSide(BoxSide side) { return static_cast&lt;BorderEdge::BorderEdgeFlag&gt;(1 &lt;&lt; side); }
+inline bool includesEdge(BorderEdgeFlags flags, BoxSide side) { return flags &amp; edgeFlagForSide(side); }
+inline bool includesAdjacentEdges(BorderEdgeFlags flags)
+{
+    return (flags &amp; (BorderEdge::TopBorderEdge | BorderEdge::RightBorderEdge)) == (BorderEdge::TopBorderEdge | BorderEdge::RightBorderEdge)
+        || (flags &amp; (BorderEdge::RightBorderEdge | BorderEdge::BottomBorderEdge)) == (BorderEdge::RightBorderEdge | BorderEdge::BottomBorderEdge)
+        || (flags &amp; (BorderEdge::BottomBorderEdge | BorderEdge::LeftBorderEdge)) == (BorderEdge::BottomBorderEdge | BorderEdge::LeftBorderEdge)
+        || (flags &amp; (BorderEdge::LeftBorderEdge | BorderEdge::TopBorderEdge)) == (BorderEdge::LeftBorderEdge | BorderEdge::TopBorderEdge);
+}
+
+} // namespace WebCore
+
+#endif // BorderEdge_h
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (165688 => 165689)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2014-03-16 01:27:51 UTC (rev 165688)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2014-03-16 04:57:03 UTC (rev 165689)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;RenderBoxModelObject.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;BorderEdge.h&quot;
</ins><span class="cx"> #include &quot;FloatRoundedRect.h&quot;
</span><span class="cx"> #include &quot;Frame.h&quot;
</span><span class="cx"> #include &quot;FrameView.h&quot;
</span><span class="lines">@@ -1401,80 +1402,6 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-class BorderEdge {
-public:
-    BorderEdge(LayoutUnit edgeWidth, const Color&amp; edgeColor, EBorderStyle edgeStyle, bool edgeIsTransparent, bool edgeIsPresent, float devicePixelRatio)
-        : width(edgeWidth)
-        , color(edgeColor)
-        , style(edgeStyle)
-        , isTransparent(edgeIsTransparent)
-        , isPresent(edgeIsPresent)
-        , devicePixelRatio(devicePixelRatio)
-    {
-        if (style == DOUBLE &amp;&amp; width  &lt; borderWidthInDevicePixel(3))
-            style = SOLID;
-        flooredToDevicePixelWidth = floorToDevicePixel(width, devicePixelRatio);
-    }
-    
-    BorderEdge()
-        : width(LayoutUnit::fromPixel(0))
-        , style(BHIDDEN)
-        , isTransparent(false)
-        , isPresent(false)
-        , flooredToDevicePixelWidth(0)
-        , devicePixelRatio(1)
-    {
-    }
-    
-    bool hasVisibleColorAndStyle() const { return style &gt; BHIDDEN &amp;&amp; !isTransparent; }
-    bool shouldRender() const { return isPresent &amp;&amp; widthForPainting() &amp;&amp; hasVisibleColorAndStyle(); }
-    bool presentButInvisible() const { return widthForPainting() &amp;&amp; !hasVisibleColorAndStyle(); }
-    bool obscuresBackgroundEdge(float scale) const
-    {
-        if (!isPresent || isTransparent || (width * scale) &lt; borderWidthInDevicePixel(2) || color.hasAlpha() || style == BHIDDEN)
-            return false;
-
-        if (style == DOTTED || style == DASHED)
-            return false;
-
-        if (style == DOUBLE)
-            return width &gt;= scale * borderWidthInDevicePixel(5); // The outer band needs to be &gt;= 2px wide at unit scale.
-
-        return true;
-    }
-    bool obscuresBackground() const
-    {
-        if (!isPresent || isTransparent || color.hasAlpha() || style == BHIDDEN)
-            return false;
-
-        if (style == DOTTED || style == DASHED || style == DOUBLE)
-            return false;
-
-        return true;
-    }
-
-    float widthForPainting() const { return isPresent ?  flooredToDevicePixelWidth : 0; }
-    
-    void getDoubleBorderStripeWidths(LayoutUnit&amp; outerWidth, LayoutUnit&amp; innerWidth) const
-    {
-        LayoutUnit fullWidth = widthForPainting();
-        innerWidth = ceilToDevicePixel(fullWidth * 2 / 3, devicePixelRatio);
-        outerWidth = floorToDevicePixel(fullWidth / 3, devicePixelRatio);
-    }
-    
-    LayoutUnit width;
-    Color color;
-    EBorderStyle style;
-    bool isTransparent;
-    bool isPresent;
-
-private:
-    float borderWidthInDevicePixel(int logicalPixels) const { return LayoutUnit(logicalPixels / devicePixelRatio).toFloat(); }
-
-    float flooredToDevicePixelWidth;
-    float devicePixelRatio;
-};
-
</del><span class="cx"> static bool allCornersClippedOut(const RoundedRect&amp; border, const LayoutRect&amp; clipRect)
</span><span class="cx"> {
</span><span class="cx">     LayoutRect boundingRect = border.rect();
</span><span class="lines">@@ -1511,37 +1438,6 @@
</span><span class="cx">     return !firstRadius.isZero() || !secondRadius.isZero();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-enum BorderEdgeFlag {
-    TopBorderEdge = 1 &lt;&lt; BSTop,
-    RightBorderEdge = 1 &lt;&lt; BSRight,
-    BottomBorderEdge = 1 &lt;&lt; BSBottom,
-    LeftBorderEdge = 1 &lt;&lt; BSLeft,
-    AllBorderEdges = TopBorderEdge | BottomBorderEdge | LeftBorderEdge | RightBorderEdge
-};
-
-static inline BorderEdgeFlag edgeFlagForSide(BoxSide side)
-{
-    return static_cast&lt;BorderEdgeFlag&gt;(1 &lt;&lt; side);
-}
-
-static inline bool includesEdge(BorderEdgeFlags flags, BoxSide side)
-{
-    return flags &amp; edgeFlagForSide(side);
-}
-
-static inline bool includesAdjacentEdges(BorderEdgeFlags flags)
-{
-    return (flags &amp; (TopBorderEdge | RightBorderEdge)) == (TopBorderEdge | RightBorderEdge)
-        || (flags &amp; (RightBorderEdge | BottomBorderEdge)) == (RightBorderEdge | BottomBorderEdge)
-        || (flags &amp; (BottomBorderEdge | LeftBorderEdge)) == (BottomBorderEdge | LeftBorderEdge)
-        || (flags &amp; (LeftBorderEdge | TopBorderEdge)) == (LeftBorderEdge | TopBorderEdge);
-}
-
-inline bool edgesShareColor(const BorderEdge&amp; firstEdge, const BorderEdge&amp; secondEdge)
-{
-    return firstEdge.color == secondEdge.color;
-}
-
</del><span class="cx"> inline bool styleRequiresClipPolygon(EBorderStyle style)
</span><span class="cx"> {
</span><span class="cx">     return style == DOTTED || style == DASHED; // These are drawn with a stroke, so we have to clip to get corner miters.
</span><span class="lines">@@ -1585,13 +1481,13 @@
</span><span class="cx">     if (!edgesShareColor(edges[side], edges[adjacentSide]))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    return !borderStyleHasUnmatchedColorsAtCorner(edges[side].style, side, adjacentSide);
</del><ins>+    return !borderStyleHasUnmatchedColorsAtCorner(edges[side].style(), side, adjacentSide);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> static inline bool colorNeedsAntiAliasAtCorner(BoxSide side, BoxSide adjacentSide, const BorderEdge edges[])
</span><span class="cx"> {
</span><del>-    if (!edges[side].color.hasAlpha())
</del><ins>+    if (!edges[side].color().hasAlpha())
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (edges[side].shouldRender() != edges[adjacentSide].shouldRender())
</span><span class="lines">@@ -1600,7 +1496,7 @@
</span><span class="cx">     if (!edgesShareColor(edges[side], edges[adjacentSide]))
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><del>-    return borderStyleHasUnmatchedColorsAtCorner(edges[side].style, side, adjacentSide);
</del><ins>+    return borderStyleHasUnmatchedColorsAtCorner(edges[side].style(), side, adjacentSide);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // This assumes that we draw in order: top, bottom, left, right.
</span><span class="lines">@@ -1612,10 +1508,10 @@
</span><span class="cx">         if (edges[adjacentSide].presentButInvisible())
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><del>-        if (!edgesShareColor(edges[side], edges[adjacentSide]) &amp;&amp; edges[adjacentSide].color.hasAlpha())
</del><ins>+        if (!edgesShareColor(edges[side], edges[adjacentSide]) &amp;&amp; edges[adjacentSide].color().hasAlpha())
</ins><span class="cx">             return false;
</span><span class="cx">         
</span><del>-        if (!borderStyleFillsBorderArea(edges[adjacentSide].style))
</del><ins>+        if (!borderStyleFillsBorderArea(edges[adjacentSide].style()))
</ins><span class="cx">             return false;
</span><span class="cx"> 
</span><span class="cx">         return true;
</span><span class="lines">@@ -1644,7 +1540,7 @@
</span><span class="cx"> 
</span><span class="cx"> static bool joinRequiresMitre(BoxSide side, BoxSide adjacentSide, const BorderEdge edges[], bool allowOverdraw)
</span><span class="cx"> {
</span><del>-    if ((edges[side].isTransparent &amp;&amp; edges[adjacentSide].isTransparent) || !edges[adjacentSide].isPresent)
</del><ins>+    if ((edges[side].isTransparent() &amp;&amp; edges[adjacentSide].isTransparent()) || !edges[adjacentSide].isPresent())
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (allowOverdraw &amp;&amp; willBeOverdrawn(side, adjacentSide, edges))
</span><span class="lines">@@ -1653,7 +1549,7 @@
</span><span class="cx">     if (!edgesShareColor(edges[side], edges[adjacentSide]))
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><del>-    if (borderStylesRequireMitre(side, adjacentSide, edges[side].style, edges[adjacentSide].style))
</del><ins>+    if (borderStylesRequireMitre(side, adjacentSide, edges[side].style(), edges[adjacentSide].style()))
</ins><span class="cx">         return true;
</span><span class="cx">     
</span><span class="cx">     return false;
</span><span class="lines">@@ -1674,7 +1570,7 @@
</span><span class="cx">     bool adjacentSide1StylesMatch = colorsMatchAtCorner(side, adjacentSide1, edges);
</span><span class="cx">     bool adjacentSide2StylesMatch = colorsMatchAtCorner(side, adjacentSide2, edges);
</span><span class="cx"> 
</span><del>-    const Color&amp; colorToPaint = overrideColor ? *overrideColor : edgeToRender.color;
</del><ins>+    const Color&amp; colorToPaint = overrideColor ? *overrideColor : edgeToRender.color();
</ins><span class="cx"> 
</span><span class="cx">     if (path) {
</span><span class="cx">         GraphicsContextStateSaver stateSaver(*graphicsContext);
</span><span class="lines">@@ -1684,9 +1580,9 @@
</span><span class="cx">             clipBorderSideForComplexInnerPath(graphicsContext, outerBorder, innerBorder, side, edges);
</span><span class="cx">         float thickness = std::max(std::max(edgeToRender.widthForPainting(), adjacentEdge1.widthForPainting()), adjacentEdge2.widthForPainting());
</span><span class="cx">         drawBoxSideFromPath(graphicsContext, outerBorder.rect(), *path, edges, edgeToRender.widthForPainting(), thickness, side, style,
</span><del>-            colorToPaint, edgeToRender.style, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge);
</del><ins>+            colorToPaint, edgeToRender.style(), bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge);
</ins><span class="cx">     } else {
</span><del>-        bool clipForStyle = styleRequiresClipPolygon(edgeToRender.style) &amp;&amp; (mitreAdjacentSide1 || mitreAdjacentSide2);
</del><ins>+        bool clipForStyle = styleRequiresClipPolygon(edgeToRender.style()) &amp;&amp; (mitreAdjacentSide1 || mitreAdjacentSide2);
</ins><span class="cx">         bool clipAdjacentSide1 = colorNeedsAntiAliasAtCorner(side, adjacentSide1, edges) &amp;&amp; mitreAdjacentSide1;
</span><span class="cx">         bool clipAdjacentSide2 = colorNeedsAntiAliasAtCorner(side, adjacentSide2, edges) &amp;&amp; mitreAdjacentSide2;
</span><span class="cx">         bool shouldClip = clipForStyle || clipAdjacentSide1 || clipAdjacentSide2;
</span><span class="lines">@@ -1701,7 +1597,7 @@
</span><span class="cx">             mitreAdjacentSide2 = false;
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        drawLineForBoxSide(graphicsContext, sideRect.x(), sideRect.y(), sideRect.maxX(), sideRect.maxY(), side, colorToPaint, edgeToRender.style,
</del><ins>+        drawLineForBoxSide(graphicsContext, sideRect.x(), sideRect.y(), sideRect.maxX(), sideRect.maxY(), side, colorToPaint, edgeToRender.style(),
</ins><span class="cx">             mitreAdjacentSide1 ? adjacentEdge1.widthForPainting() : 0, mitreAdjacentSide2 ? adjacentEdge2.widthForPainting() : 0, antialias);
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -1742,7 +1638,7 @@
</span><span class="cx">         LayoutRect sideRect = outerBorder.rect();
</span><span class="cx">         sideRect.setHeight(edges[BSTop].widthForPainting() + innerBorderAdjustment.y());
</span><span class="cx"> 
</span><del>-        bool usePath = renderRadii &amp;&amp; (borderStyleHasInnerDetail(edges[BSTop].style) || borderWillArcInnerEdge(innerBorder.radii().topLeft(), innerBorder.radii().topRight()));
</del><ins>+        bool usePath = renderRadii &amp;&amp; (borderStyleHasInnerDetail(edges[BSTop].style()) || borderWillArcInnerEdge(innerBorder.radii().topLeft(), innerBorder.radii().topRight()));
</ins><span class="cx">         paintOneBorderSide(graphicsContext, style, outerBorder, innerBorder, sideRect, BSTop, BSLeft, BSRight, edges, usePath ? &amp;roundedPath : 0, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge, antialias, overrideColor);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1750,7 +1646,7 @@
</span><span class="cx">         LayoutRect sideRect = outerBorder.rect();
</span><span class="cx">         sideRect.shiftYEdgeTo(sideRect.maxY() - edges[BSBottom].widthForPainting() - innerBorderAdjustment.y());
</span><span class="cx"> 
</span><del>-        bool usePath = renderRadii &amp;&amp; (borderStyleHasInnerDetail(edges[BSBottom].style) || borderWillArcInnerEdge(innerBorder.radii().bottomLeft(), innerBorder.radii().bottomRight()));
</del><ins>+        bool usePath = renderRadii &amp;&amp; (borderStyleHasInnerDetail(edges[BSBottom].style()) || borderWillArcInnerEdge(innerBorder.radii().bottomLeft(), innerBorder.radii().bottomRight()));
</ins><span class="cx">         paintOneBorderSide(graphicsContext, style, outerBorder, innerBorder, sideRect, BSBottom, BSLeft, BSRight, edges, usePath ? &amp;roundedPath : 0, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge, antialias, overrideColor);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1758,7 +1654,7 @@
</span><span class="cx">         LayoutRect sideRect = outerBorder.rect();
</span><span class="cx">         sideRect.setWidth(edges[BSLeft].widthForPainting() + innerBorderAdjustment.x());
</span><span class="cx"> 
</span><del>-        bool usePath = renderRadii &amp;&amp; (borderStyleHasInnerDetail(edges[BSLeft].style) || borderWillArcInnerEdge(innerBorder.radii().bottomLeft(), innerBorder.radii().topLeft()));
</del><ins>+        bool usePath = renderRadii &amp;&amp; (borderStyleHasInnerDetail(edges[BSLeft].style()) || borderWillArcInnerEdge(innerBorder.radii().bottomLeft(), innerBorder.radii().topLeft()));
</ins><span class="cx">         paintOneBorderSide(graphicsContext, style, outerBorder, innerBorder, sideRect, BSLeft, BSTop, BSBottom, edges, usePath ? &amp;roundedPath : 0, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge, antialias, overrideColor);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1766,7 +1662,7 @@
</span><span class="cx">         LayoutRect sideRect = outerBorder.rect();
</span><span class="cx">         sideRect.shiftXEdgeTo(sideRect.maxX() - edges[BSRight].widthForPainting() - innerBorderAdjustment.x());
</span><span class="cx"> 
</span><del>-        bool usePath = renderRadii &amp;&amp; (borderStyleHasInnerDetail(edges[BSRight].style) || borderWillArcInnerEdge(innerBorder.radii().bottomRight(), innerBorder.radii().topRight()));
</del><ins>+        bool usePath = renderRadii &amp;&amp; (borderStyleHasInnerDetail(edges[BSRight].style()) || borderWillArcInnerEdge(innerBorder.radii().bottomRight(), innerBorder.radii().topRight()));
</ins><span class="cx">         paintOneBorderSide(graphicsContext, style, outerBorder, innerBorder, sideRect, BSRight, BSTop, BSBottom, edges, usePath ? &amp;roundedPath : 0, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge, antialias, overrideColor);
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -1790,10 +1686,10 @@
</span><span class="cx"> 
</span><span class="cx">             bool includeEdge;
</span><span class="cx">             if (!commonColorEdgeSet) {
</span><del>-                commonColor = edges[currSide].color;
</del><ins>+                commonColor = edges[currSide].color();
</ins><span class="cx">                 includeEdge = true;
</span><span class="cx">             } else
</span><del>-                includeEdge = edges[currSide].color == commonColor;
</del><ins>+                includeEdge = edges[currSide].color() == commonColor;
</ins><span class="cx"> 
</span><span class="cx">             if (includeEdge)
</span><span class="cx">                 commonColorEdgeSet |= edgeFlagForSide(currSide);
</span><span class="lines">@@ -1826,7 +1722,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     BorderEdge edges[4];
</span><del>-    getBorderEdgeInfo(edges, style, includeLogicalLeftEdge, includeLogicalRightEdge);
</del><ins>+    BorderEdge::getBorderEdgeInfo(edges, style, document().deviceScaleFactor(), includeLogicalLeftEdge, includeLogicalRightEdge);
</ins><span class="cx">     RoundedRect outerBorder = style.getRoundedBorderFor(rect, &amp;view(), includeLogicalLeftEdge, includeLogicalRightEdge);
</span><span class="cx">     RoundedRect innerBorder = style.getRoundedInnerBorderFor(borderInnerRectAdjustedForBleedAvoidance(*graphicsContext, rect, bleedAvoidance), includeLogicalLeftEdge, includeLogicalRightEdge);
</span><span class="cx"> 
</span><span class="lines">@@ -1857,16 +1753,16 @@
</span><span class="cx"> 
</span><span class="cx">         if (firstVisibleEdge == -1)
</span><span class="cx">             firstVisibleEdge = i;
</span><del>-        else if (currEdge.color != edges[firstVisibleEdge].color)
</del><ins>+        else if (currEdge.color() != edges[firstVisibleEdge].color())
</ins><span class="cx">             allEdgesShareColor = false;
</span><span class="cx"> 
</span><del>-        if (currEdge.color.hasAlpha())
</del><ins>+        if (currEdge.color().hasAlpha())
</ins><span class="cx">             haveAlphaColor = true;
</span><span class="cx">         
</span><del>-        if (currEdge.style != SOLID)
</del><ins>+        if (currEdge.style() != SOLID)
</ins><span class="cx">             haveAllSolidEdges = false;
</span><span class="cx"> 
</span><del>-        if (currEdge.style != DOUBLE)
</del><ins>+        if (currEdge.style() != DOUBLE)
</ins><span class="cx">             haveAllDoubleEdges = false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1935,7 +1831,7 @@
</span><span class="cx">                 path.addRect(pixelSnappedInnerBorder.rect());
</span><span class="cx">             
</span><span class="cx">             graphicsContext-&gt;setFillRule(RULE_EVENODD);
</span><del>-            graphicsContext-&gt;setFillColor(edges[firstVisibleEdge].color, style.colorSpace());
</del><ins>+            graphicsContext-&gt;setFillColor(edges[firstVisibleEdge].color(), style.colorSpace());
</ins><span class="cx">             graphicsContext-&gt;fillPath(path);
</span><span class="cx">             return;
</span><span class="cx">         } 
</span><span class="lines">@@ -1952,7 +1848,7 @@
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             graphicsContext-&gt;setFillRule(RULE_NONZERO);
</span><del>-            graphicsContext-&gt;setFillColor(edges[firstVisibleEdge].color, style.colorSpace());
</del><ins>+            graphicsContext-&gt;setFillColor(edges[firstVisibleEdge].color(), style.colorSpace());
</ins><span class="cx">             graphicsContext-&gt;fillPath(path);
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="lines">@@ -2363,44 +2259,10 @@
</span><span class="cx">     graphicsContext-&gt;clipOutRoundedRect(FloatRoundedRect(calculateAdjustedInnerBorder(innerBorder, side)));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderBoxModelObject::getBorderEdgeInfo(BorderEdge edges[], const RenderStyle&amp; style, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
-{
-    bool horizontal = style.isHorizontalWritingMode();
-    float deviceScaleFactor = document().deviceScaleFactor();
-
-    edges[BSTop] = BorderEdge(style.borderTopWidth(),
-        style.visitedDependentColor(CSSPropertyBorderTopColor),
-        style.borderTopStyle(),
-        style.borderTopIsTransparent(),
-        horizontal || includeLogicalLeftEdge,
-        deviceScaleFactor);
-
-    edges[BSRight] = BorderEdge(style.borderRightWidth(),
-        style.visitedDependentColor(CSSPropertyBorderRightColor),
-        style.borderRightStyle(),
-        style.borderRightIsTransparent(),
-        !horizontal || includeLogicalRightEdge,
-        deviceScaleFactor);
-
-    edges[BSBottom] = BorderEdge(style.borderBottomWidth(),
-        style.visitedDependentColor(CSSPropertyBorderBottomColor),
-        style.borderBottomStyle(),
-        style.borderBottomIsTransparent(),
-        horizontal || includeLogicalRightEdge,
-        deviceScaleFactor);
-
-    edges[BSLeft] = BorderEdge(style.borderLeftWidth(),
-        style.visitedDependentColor(CSSPropertyBorderLeftColor),
-        style.borderLeftStyle(),
-        style.borderLeftIsTransparent(),
-        !horizontal || includeLogicalLeftEdge,
-        deviceScaleFactor);
-}
-
</del><span class="cx"> bool RenderBoxModelObject::borderObscuresBackgroundEdge(const FloatSize&amp; contextScale) const
</span><span class="cx"> {
</span><span class="cx">     BorderEdge edges[4];
</span><del>-    getBorderEdgeInfo(edges, style());
</del><ins>+    BorderEdge::getBorderEdgeInfo(edges, style(), document().deviceScaleFactor());
</ins><span class="cx"> 
</span><span class="cx">     for (int i = BSTop; i &lt;= BSLeft; ++i) {
</span><span class="cx">         const BorderEdge&amp; currEdge = edges[i];
</span><span class="lines">@@ -2423,7 +2285,7 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     BorderEdge edges[4];
</span><del>-    getBorderEdgeInfo(edges, style());
</del><ins>+    BorderEdge::getBorderEdgeInfo(edges, style(), document().deviceScaleFactor());
</ins><span class="cx"> 
</span><span class="cx">     for (int i = BSTop; i &lt;= BSLeft; ++i) {
</span><span class="cx">         const BorderEdge&amp; currEdge = edges[i];
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.h (165688 => 165689)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.h        2014-03-16 01:27:51 UTC (rev 165688)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.h        2014-03-16 04:57:03 UTC (rev 165689)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx">     FullScreenChanged
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+class BorderEdge;
</ins><span class="cx"> class ImageBuffer;
</span><span class="cx"> class InlineFlowBox;
</span><span class="cx"> class KeyframeList;
</span><span class="lines">@@ -264,7 +265,6 @@
</span><span class="cx">     LayoutPoint adjustedPositionRelativeToOffsetParent(const LayoutPoint&amp;) const;
</span><span class="cx"> 
</span><span class="cx">     void calculateBackgroundImageGeometry(const RenderLayerModelObject* paintContainer, const FillLayer*, const LayoutRect&amp; paintRect, BackgroundImageGeometry&amp;, RenderElement* = 0) const;
</span><del>-    void getBorderEdgeInfo(class BorderEdge[], const RenderStyle&amp;, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
</del><span class="cx">     bool borderObscuresBackgroundEdge(const FloatSize&amp; contextScale) const;
</span><span class="cx">     bool borderObscuresBackground() const;
</span><span class="cx">     RoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(const GraphicsContext&amp;, const LayoutRect&amp;, BackgroundBleedAvoidance, InlineFlowBox*, const LayoutSize&amp;, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const;
</span><span class="lines">@@ -329,16 +329,16 @@
</span><span class="cx"> 
</span><span class="cx">     void clipBorderSidePolygon(GraphicsContext*, const RoundedRect&amp; outerBorder, const RoundedRect&amp; innerBorder,
</span><span class="cx">                                BoxSide, bool firstEdgeMatches, bool secondEdgeMatches);
</span><del>-    void clipBorderSideForComplexInnerPath(GraphicsContext*, const RoundedRect&amp;, const RoundedRect&amp;, BoxSide, const class BorderEdge[]);
</del><ins>+    void clipBorderSideForComplexInnerPath(GraphicsContext*, const RoundedRect&amp;, const RoundedRect&amp;, BoxSide, const BorderEdge[]);
</ins><span class="cx">     void paintOneBorderSide(GraphicsContext*, const RenderStyle&amp;, const RoundedRect&amp; outerBorder, const RoundedRect&amp; innerBorder,
</span><del>-        const LayoutRect&amp; sideRect, BoxSide, BoxSide adjacentSide1, BoxSide adjacentSide2, const class BorderEdge[],
</del><ins>+        const LayoutRect&amp; sideRect, BoxSide, BoxSide adjacentSide1, BoxSide adjacentSide2, const BorderEdge[],
</ins><span class="cx">         const Path*, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias, const Color* overrideColor = 0);
</span><span class="cx">     void paintTranslucentBorderSides(GraphicsContext*, const RenderStyle&amp;, const RoundedRect&amp; outerBorder, const RoundedRect&amp; innerBorder, const IntPoint&amp; innerBorderAdjustment,
</span><del>-        const class BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias = false);
</del><ins>+        const BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias = false);
</ins><span class="cx">     void paintBorderSides(GraphicsContext*, const RenderStyle&amp;, const RoundedRect&amp; outerBorder, const RoundedRect&amp; innerBorder,
</span><del>-        const IntPoint&amp; innerBorderAdjustment, const class BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance,
</del><ins>+        const IntPoint&amp; innerBorderAdjustment, const BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance,
</ins><span class="cx">         bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias = false, const Color* overrideColor = 0);
</span><del>-    void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&amp;, const Path&amp;, const class BorderEdge[],
</del><ins>+    void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&amp;, const Path&amp;, const BorderEdge[],
</ins><span class="cx">         float thickness, float drawThickness, BoxSide, const RenderStyle&amp;,
</span><span class="cx">         Color, EBorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge);
</span><span class="cx">     void paintMaskForTextFillBox(ImageBuffer*, const IntRect&amp;, InlineFlowBox*, const LayoutRect&amp;, RenderNamedFlowFragment*);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderingAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderingAllInOne.cpp (165688 => 165689)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderingAllInOne.cpp        2014-03-16 01:27:51 UTC (rev 165688)
+++ trunk/Source/WebCore/rendering/RenderingAllInOne.cpp        2014-03-16 04:57:03 UTC (rev 165689)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;AutoTableLayout.cpp&quot;
</span><span class="cx"> #include &quot;BidiRun.cpp&quot;
</span><ins>+#include &quot;BorderEdge.cpp&quot;
</ins><span class="cx"> #include &quot;CounterNode.cpp&quot;
</span><span class="cx"> #include &quot;EllipsisBox.cpp&quot;
</span><span class="cx"> #include &quot;FilterEffectRenderer.cpp&quot;
</span></span></pre>
</div>
</div>

</body>
</html>