<!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 <zalan@apple.com>
+
+ 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 <mrobinson@igalia.com>
</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"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="..\rendering\BorderEdge.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ </ClCompile>
</ins><span class="cx"> <ClCompile Include="..\rendering\break_lines.cpp">
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</span><span class="lines">@@ -19667,6 +19681,7 @@
</span><span class="cx"> <ClInclude Include="..\cssjit\StackAllocator.h" />
</span><span class="cx"> <ClInclude Include="..\rendering\AutoTableLayout.h" />
</span><span class="cx"> <ClInclude Include="..\rendering\BidiRun.h" />
</span><ins>+ <ClInclude Include="..\rendering\BorderEdge.h" />
</ins><span class="cx"> <ClInclude Include="..\rendering\break_lines.h" />
</span><span class="cx"> <ClInclude Include="..\rendering\CounterNode.h" />
</span><span class="cx"> <ClInclude Include="..\rendering\EllipsisBox.h" />
</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"> <ClCompile Include="..\rendering\BidiRun.cpp">
</span><span class="cx"> <Filter>rendering</Filter>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="..\rendering\BorderEdge.cpp">
+ <Filter>rendering</Filter>
+ </ClCompile>
</ins><span class="cx"> <ClCompile Include="..\rendering\break_lines.cpp">
</span><span class="cx"> <Filter>rendering</Filter>
</span><span class="cx"> </ClCompile>
</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 = "<group>"; };
</span><span class="cx">                 57CF497214EE36D700ECFF14 /* InsertionPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InsertionPoint.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 57CF497314EE36D700ECFF14 /* InsertionPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InsertionPoint.h; sourceTree = "<group>"; };
</span><ins>+                589556EC18D4A44000764B03 /* BorderEdge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BorderEdge.h; sourceTree = "<group>"; };
+                58AEE2F318D4BCCF0022E7FE /* BorderEdge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BorderEdge.cpp; sourceTree = "<group>"; };
</ins><span class="cx">                 5905ADBD1302F3CE00F116DF /* XMLTreeViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLTreeViewer.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 5905ADBE1302F3CE00F116DF /* XMLTreeViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLTreeViewer.h; sourceTree = "<group>"; };
</span><span class="cx">                 590E1B4811E4EF4B0069F784 /* DeviceOrientationData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceOrientationData.h; sourceTree = "<group>"; };
</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 "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE 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 "config.h"
+#include "BorderEdge.h"
+
+#include "Color.h"
+#include "LayoutUnit.h"
+#include "RenderObject.h"
+#include "RenderStyle.h"
+
+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 && edgeWidth < 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& 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) < 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 >= scale * borderWidthInDevicePixel(5); // The outer band needs to be >= 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 "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE 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 "RenderObject.h"
+
+namespace WebCore {
+
+typedef unsigned BorderEdgeFlags;
+
+class RenderStyle;
+class LayoutUnit;
+
+class BorderEdge {
+public:
+ enum BorderEdgeFlag {
+ TopBorderEdge = 1 << BSTop,
+ RightBorderEdge = 1 << BSRight,
+ BottomBorderEdge = 1 << BSBottom,
+ LeftBorderEdge = 1 << 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&, 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 > BHIDDEN && !m_isTransparent; }
+ inline bool shouldRender() const { return m_isPresent && widthForPainting() && hasVisibleColorAndStyle(); }
+ inline bool presentButInvisible() const { return widthForPainting() && !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& firstEdge, const BorderEdge& secondEdge) { return firstEdge.color() == secondEdge.color(); }
+inline BorderEdge::BorderEdgeFlag edgeFlagForSide(BoxSide side) { return static_cast<BorderEdge::BorderEdgeFlag>(1 << side); }
+inline bool includesEdge(BorderEdgeFlags flags, BoxSide side) { return flags & edgeFlagForSide(side); }
+inline bool includesAdjacentEdges(BorderEdgeFlags flags)
+{
+ return (flags & (BorderEdge::TopBorderEdge | BorderEdge::RightBorderEdge)) == (BorderEdge::TopBorderEdge | BorderEdge::RightBorderEdge)
+ || (flags & (BorderEdge::RightBorderEdge | BorderEdge::BottomBorderEdge)) == (BorderEdge::RightBorderEdge | BorderEdge::BottomBorderEdge)
+ || (flags & (BorderEdge::BottomBorderEdge | BorderEdge::LeftBorderEdge)) == (BorderEdge::BottomBorderEdge | BorderEdge::LeftBorderEdge)
+ || (flags & (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 "config.h"
</span><span class="cx"> #include "RenderBoxModelObject.h"
</span><span class="cx">
</span><ins>+#include "BorderEdge.h"
</ins><span class="cx"> #include "FloatRoundedRect.h"
</span><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "FrameView.h"
</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& edgeColor, EBorderStyle edgeStyle, bool edgeIsTransparent, bool edgeIsPresent, float devicePixelRatio)
- : width(edgeWidth)
- , color(edgeColor)
- , style(edgeStyle)
- , isTransparent(edgeIsTransparent)
- , isPresent(edgeIsPresent)
- , devicePixelRatio(devicePixelRatio)
- {
- if (style == DOUBLE && width < 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 > BHIDDEN && !isTransparent; }
- bool shouldRender() const { return isPresent && widthForPainting() && hasVisibleColorAndStyle(); }
- bool presentButInvisible() const { return widthForPainting() && !hasVisibleColorAndStyle(); }
- bool obscuresBackgroundEdge(float scale) const
- {
- if (!isPresent || isTransparent || (width * scale) < borderWidthInDevicePixel(2) || color.hasAlpha() || style == BHIDDEN)
- return false;
-
- if (style == DOTTED || style == DASHED)
- return false;
-
- if (style == DOUBLE)
- return width >= scale * borderWidthInDevicePixel(5); // The outer band needs to be >= 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& outerWidth, LayoutUnit& 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& border, const LayoutRect& 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 << BSTop,
- RightBorderEdge = 1 << BSRight,
- BottomBorderEdge = 1 << BSBottom,
- LeftBorderEdge = 1 << BSLeft,
- AllBorderEdges = TopBorderEdge | BottomBorderEdge | LeftBorderEdge | RightBorderEdge
-};
-
-static inline BorderEdgeFlag edgeFlagForSide(BoxSide side)
-{
- return static_cast<BorderEdgeFlag>(1 << side);
-}
-
-static inline bool includesEdge(BorderEdgeFlags flags, BoxSide side)
-{
- return flags & edgeFlagForSide(side);
-}
-
-static inline bool includesAdjacentEdges(BorderEdgeFlags flags)
-{
- return (flags & (TopBorderEdge | RightBorderEdge)) == (TopBorderEdge | RightBorderEdge)
- || (flags & (RightBorderEdge | BottomBorderEdge)) == (RightBorderEdge | BottomBorderEdge)
- || (flags & (BottomBorderEdge | LeftBorderEdge)) == (BottomBorderEdge | LeftBorderEdge)
- || (flags & (LeftBorderEdge | TopBorderEdge)) == (LeftBorderEdge | TopBorderEdge);
-}
-
-inline bool edgesShareColor(const BorderEdge& firstEdge, const BorderEdge& 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]) && edges[adjacentSide].color.hasAlpha())
</del><ins>+ if (!edgesShareColor(edges[side], edges[adjacentSide]) && 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 && edges[adjacentSide].isTransparent) || !edges[adjacentSide].isPresent)
</del><ins>+ if ((edges[side].isTransparent() && edges[adjacentSide].isTransparent()) || !edges[adjacentSide].isPresent())
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> if (allowOverdraw && 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& colorToPaint = overrideColor ? *overrideColor : edgeToRender.color;
</del><ins>+ const Color& 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) && (mitreAdjacentSide1 || mitreAdjacentSide2);
</del><ins>+ bool clipForStyle = styleRequiresClipPolygon(edgeToRender.style()) && (mitreAdjacentSide1 || mitreAdjacentSide2);
</ins><span class="cx"> bool clipAdjacentSide1 = colorNeedsAntiAliasAtCorner(side, adjacentSide1, edges) && mitreAdjacentSide1;
</span><span class="cx"> bool clipAdjacentSide2 = colorNeedsAntiAliasAtCorner(side, adjacentSide2, edges) && 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 && (borderStyleHasInnerDetail(edges[BSTop].style) || borderWillArcInnerEdge(innerBorder.radii().topLeft(), innerBorder.radii().topRight()));
</del><ins>+ bool usePath = renderRadii && (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 ? &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 && (borderStyleHasInnerDetail(edges[BSBottom].style) || borderWillArcInnerEdge(innerBorder.radii().bottomLeft(), innerBorder.radii().bottomRight()));
</del><ins>+ bool usePath = renderRadii && (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 ? &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 && (borderStyleHasInnerDetail(edges[BSLeft].style) || borderWillArcInnerEdge(innerBorder.radii().bottomLeft(), innerBorder.radii().topLeft()));
</del><ins>+ bool usePath = renderRadii && (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 ? &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 && (borderStyleHasInnerDetail(edges[BSRight].style) || borderWillArcInnerEdge(innerBorder.radii().bottomRight(), innerBorder.radii().topRight()));
</del><ins>+ bool usePath = renderRadii && (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 ? &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, &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->setFillRule(RULE_EVENODD);
</span><del>- graphicsContext->setFillColor(edges[firstVisibleEdge].color, style.colorSpace());
</del><ins>+ graphicsContext->setFillColor(edges[firstVisibleEdge].color(), style.colorSpace());
</ins><span class="cx"> graphicsContext->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->setFillRule(RULE_NONZERO);
</span><del>- graphicsContext->setFillColor(edges[firstVisibleEdge].color, style.colorSpace());
</del><ins>+ graphicsContext->setFillColor(edges[firstVisibleEdge].color(), style.colorSpace());
</ins><span class="cx"> graphicsContext->fillPath(path);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -2363,44 +2259,10 @@
</span><span class="cx"> graphicsContext->clipOutRoundedRect(FloatRoundedRect(calculateAdjustedInnerBorder(innerBorder, side)));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RenderBoxModelObject::getBorderEdgeInfo(BorderEdge edges[], const RenderStyle& 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& 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 <= BSLeft; ++i) {
</span><span class="cx"> const BorderEdge& 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 <= BSLeft; ++i) {
</span><span class="cx"> const BorderEdge& 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&) const;
</span><span class="cx">
</span><span class="cx"> void calculateBackgroundImageGeometry(const RenderLayerModelObject* paintContainer, const FillLayer*, const LayoutRect& paintRect, BackgroundImageGeometry&, RenderElement* = 0) const;
</span><del>- void getBorderEdgeInfo(class BorderEdge[], const RenderStyle&, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
</del><span class="cx"> bool borderObscuresBackgroundEdge(const FloatSize& contextScale) const;
</span><span class="cx"> bool borderObscuresBackground() const;
</span><span class="cx"> RoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(const GraphicsContext&, const LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox*, const LayoutSize&, 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& outerBorder, const RoundedRect& innerBorder,
</span><span class="cx"> BoxSide, bool firstEdgeMatches, bool secondEdgeMatches);
</span><del>- void clipBorderSideForComplexInnerPath(GraphicsContext*, const RoundedRect&, const RoundedRect&, BoxSide, const class BorderEdge[]);
</del><ins>+ void clipBorderSideForComplexInnerPath(GraphicsContext*, const RoundedRect&, const RoundedRect&, BoxSide, const BorderEdge[]);
</ins><span class="cx"> void paintOneBorderSide(GraphicsContext*, const RenderStyle&, const RoundedRect& outerBorder, const RoundedRect& innerBorder,
</span><del>- const LayoutRect& sideRect, BoxSide, BoxSide adjacentSide1, BoxSide adjacentSide2, const class BorderEdge[],
</del><ins>+ const LayoutRect& 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&, const RoundedRect& outerBorder, const RoundedRect& innerBorder, const IntPoint& 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&, const RoundedRect& outerBorder, const RoundedRect& innerBorder,
</span><del>- const IntPoint& innerBorderAdjustment, const class BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance,
</del><ins>+ const IntPoint& 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&, const Path&, const class BorderEdge[],
</del><ins>+ void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&, const Path&, const BorderEdge[],
</ins><span class="cx"> float thickness, float drawThickness, BoxSide, const RenderStyle&,
</span><span class="cx"> Color, EBorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge);
</span><span class="cx"> void paintMaskForTextFillBox(ImageBuffer*, const IntRect&, InlineFlowBox*, const LayoutRect&, 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 "AutoTableLayout.cpp"
</span><span class="cx"> #include "BidiRun.cpp"
</span><ins>+#include "BorderEdge.cpp"
</ins><span class="cx"> #include "CounterNode.cpp"
</span><span class="cx"> #include "EllipsisBox.cpp"
</span><span class="cx"> #include "FilterEffectRenderer.cpp"
</span></span></pre>
</div>
</div>
</body>
</html>