<!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>[172797] trunk</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/172797">172797</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2014-08-20 07:44:56 -0700 (Wed, 20 Aug 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Dashed/dotted borders do not paint.
https://bugs.webkit.org/show_bug.cgi?id=135898

Reviewed by Simon Fraser.

Source/WebCore:

Remove the empty line checks for drawLines. There's no need to protect the graphics
context from empty lines.

Tests: fast/borders/border-painting-dashed-at-all.html
       fast/borders/border-painting-dashed.html
       fast/borders/border-painting-dotted-at-all.html
       fast/borders/border-painting-dotted.html
       fast/borders/border-painting-double-at-all.html
       fast/borders/border-painting-double.html
       fast/borders/border-painting-groove-at-all.html
       fast/borders/border-painting-inset-at-all.html
       fast/borders/border-painting-inset.html
       fast/borders/border-painting-outset-at-all.html
       fast/borders/border-painting-outset.html
       fast/borders/border-painting-ridge-at-all.html
       fast/borders/border-painting-solid-at-all.html
       fast/borders/border-painting-solid.html
       fast/borders/hidpi-border-painting-groove.html
       fast/borders/hidpi-border-painting-ridge.html

* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
(WebCore::drawBorderLineRect): Deleted.
(WebCore::drawBorderLine): Deleted.

LayoutTests:

*-at-all files test that we always paint borders.
The other set of files test that borders are painted properly. They take
advantage of the fact that borders with radius use a different painting code path.

* TestExpectations:
* fast/borders/border-painting-dashed-at-all-expected.html: Added.
* fast/borders/border-painting-dashed-at-all.html: Added.
* fast/borders/border-painting-dashed-expected.html: Added.
* fast/borders/border-painting-dashed.html: Added.
* fast/borders/border-painting-dotted-at-all-expected.html: Added.
* fast/borders/border-painting-dotted-at-all.html: Added.
* fast/borders/border-painting-dotted-expected.html: Added.
* fast/borders/border-painting-dotted.html: Added.
* fast/borders/border-painting-double-at-all-expected.html: Added.
* fast/borders/border-painting-double-at-all.html: Added.
* fast/borders/border-painting-double-expected.html: Added.
* fast/borders/border-painting-double.html: Added.
* fast/borders/border-painting-groove-at-all-expected.html: Added.
* fast/borders/border-painting-groove-at-all.html: Added.
* fast/borders/border-painting-inset-at-all-expected.html: Added.
* fast/borders/border-painting-inset-at-all.html: Added.
* fast/borders/border-painting-inset-expected.html: Added.
* fast/borders/border-painting-inset.html: Added.
* fast/borders/border-painting-outset-at-all-expected.html: Added.
* fast/borders/border-painting-outset-at-all.html: Added.
* fast/borders/border-painting-outset-expected.html: Added.
* fast/borders/border-painting-outset.html: Added.
* fast/borders/border-painting-ridge-at-all-expected.html: Added.
* fast/borders/border-painting-ridge-at-all.html: Added.
* fast/borders/border-painting-solid-at-all-expected.html: Added.
* fast/borders/border-painting-solid-at-all.html: Added.
* fast/borders/border-painting-solid-expected.html: Added.
* fast/borders/border-painting-solid.html: Added.
* fast/borders/hidpi-border-painting-groove-expected.html: Added.
* fast/borders/hidpi-border-painting-groove.html: Added.
* fast/borders/hidpi-border-painting-ridge-expected.html: Added.
* fast/borders/hidpi-border-painting-ridge.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjectcpp">trunk/Source/WebCore/rendering/RenderObject.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingdashedatallexpectedhtml">trunk/LayoutTests/fast/borders/border-painting-dashed-at-all-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingdashedatallhtml">trunk/LayoutTests/fast/borders/border-painting-dashed-at-all.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingdashedexpectedhtml">trunk/LayoutTests/fast/borders/border-painting-dashed-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingdashedhtml">trunk/LayoutTests/fast/borders/border-painting-dashed.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingdottedatallexpectedhtml">trunk/LayoutTests/fast/borders/border-painting-dotted-at-all-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingdottedatallhtml">trunk/LayoutTests/fast/borders/border-painting-dotted-at-all.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingdottedexpectedhtml">trunk/LayoutTests/fast/borders/border-painting-dotted-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingdottedhtml">trunk/LayoutTests/fast/borders/border-painting-dotted.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingdoubleatallexpectedhtml">trunk/LayoutTests/fast/borders/border-painting-double-at-all-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingdoubleatallhtml">trunk/LayoutTests/fast/borders/border-painting-double-at-all.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingdoubleexpectedhtml">trunk/LayoutTests/fast/borders/border-painting-double-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingdoublehtml">trunk/LayoutTests/fast/borders/border-painting-double.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintinggrooveatallexpectedhtml">trunk/LayoutTests/fast/borders/border-painting-groove-at-all-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintinggrooveatallhtml">trunk/LayoutTests/fast/borders/border-painting-groove-at-all.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintinginsetatallexpectedhtml">trunk/LayoutTests/fast/borders/border-painting-inset-at-all-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintinginsetatallhtml">trunk/LayoutTests/fast/borders/border-painting-inset-at-all.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintinginsetexpectedhtml">trunk/LayoutTests/fast/borders/border-painting-inset-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintinginsethtml">trunk/LayoutTests/fast/borders/border-painting-inset.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingoutsetatallexpectedhtml">trunk/LayoutTests/fast/borders/border-painting-outset-at-all-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingoutsetatallhtml">trunk/LayoutTests/fast/borders/border-painting-outset-at-all.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingoutsetexpectedhtml">trunk/LayoutTests/fast/borders/border-painting-outset-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingoutsethtml">trunk/LayoutTests/fast/borders/border-painting-outset.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingridgeatallexpectedhtml">trunk/LayoutTests/fast/borders/border-painting-ridge-at-all-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingridgeatallhtml">trunk/LayoutTests/fast/borders/border-painting-ridge-at-all.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingsolidatallexpectedhtml">trunk/LayoutTests/fast/borders/border-painting-solid-at-all-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingsolidatallhtml">trunk/LayoutTests/fast/borders/border-painting-solid-at-all.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingsolidexpectedhtml">trunk/LayoutTests/fast/borders/border-painting-solid-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordersborderpaintingsolidhtml">trunk/LayoutTests/fast/borders/border-painting-solid.html</a></li>
<li><a href="#trunkLayoutTestsfastbordershidpiborderpaintinggrooveexpectedhtml">trunk/LayoutTests/fast/borders/hidpi-border-painting-groove-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordershidpiborderpaintinggroovehtml">trunk/LayoutTests/fast/borders/hidpi-border-painting-groove.html</a></li>
<li><a href="#trunkLayoutTestsfastbordershidpiborderpaintingridgeexpectedhtml">trunk/LayoutTests/fast/borders/hidpi-border-painting-ridge-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordershidpiborderpaintingridgehtml">trunk/LayoutTests/fast/borders/hidpi-border-painting-ridge.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (172796 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-08-20 04:32:12 UTC (rev 172796)
+++ trunk/LayoutTests/ChangeLog        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -1,3 +1,48 @@
</span><ins>+2014-08-20  Zalan Bujtas  &lt;zalan@apple.com&gt;
+
+        Dashed/dotted borders do not paint.
+        https://bugs.webkit.org/show_bug.cgi?id=135898
+
+        Reviewed by Simon Fraser.
+
+        *-at-all files test that we always paint borders.
+        The other set of files test that borders are painted properly. They take
+        advantage of the fact that borders with radius use a different painting code path.
+
+        * TestExpectations:
+        * fast/borders/border-painting-dashed-at-all-expected.html: Added.
+        * fast/borders/border-painting-dashed-at-all.html: Added.
+        * fast/borders/border-painting-dashed-expected.html: Added.
+        * fast/borders/border-painting-dashed.html: Added.
+        * fast/borders/border-painting-dotted-at-all-expected.html: Added.
+        * fast/borders/border-painting-dotted-at-all.html: Added.
+        * fast/borders/border-painting-dotted-expected.html: Added.
+        * fast/borders/border-painting-dotted.html: Added.
+        * fast/borders/border-painting-double-at-all-expected.html: Added.
+        * fast/borders/border-painting-double-at-all.html: Added.
+        * fast/borders/border-painting-double-expected.html: Added.
+        * fast/borders/border-painting-double.html: Added.
+        * fast/borders/border-painting-groove-at-all-expected.html: Added.
+        * fast/borders/border-painting-groove-at-all.html: Added.
+        * fast/borders/border-painting-inset-at-all-expected.html: Added.
+        * fast/borders/border-painting-inset-at-all.html: Added.
+        * fast/borders/border-painting-inset-expected.html: Added.
+        * fast/borders/border-painting-inset.html: Added.
+        * fast/borders/border-painting-outset-at-all-expected.html: Added.
+        * fast/borders/border-painting-outset-at-all.html: Added.
+        * fast/borders/border-painting-outset-expected.html: Added.
+        * fast/borders/border-painting-outset.html: Added.
+        * fast/borders/border-painting-ridge-at-all-expected.html: Added.
+        * fast/borders/border-painting-ridge-at-all.html: Added.
+        * fast/borders/border-painting-solid-at-all-expected.html: Added.
+        * fast/borders/border-painting-solid-at-all.html: Added.
+        * fast/borders/border-painting-solid-expected.html: Added.
+        * fast/borders/border-painting-solid.html: Added.
+        * fast/borders/hidpi-border-painting-groove-expected.html: Added.
+        * fast/borders/hidpi-border-painting-groove.html: Added.
+        * fast/borders/hidpi-border-painting-ridge-expected.html: Added.
+        * fast/borders/hidpi-border-painting-ridge.html: Added.
+
</ins><span class="cx"> 2014-08-19  Jinwoo Song  &lt;jinwoo7.song@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Ignore usemap attributes without '#' in img element
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (172796 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2014-08-20 04:32:12 UTC (rev 172796)
+++ trunk/LayoutTests/TestExpectations        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -164,3 +164,8 @@
</span><span class="cx"> webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-017.html [ ImageOnlyFailure ]
</span><span class="cx"> webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-018.html [ ImageOnlyFailure ]
</span><span class="cx"> webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-019.html [ ImageOnlyFailure ]
</span><ins>+
+# border painting diff (Path vs. drawLine)
+webkit.org/b/136078 fast/borders/border-painting-dashed.html [ ImageOnlyFailure ]
+webkit.org/b/136078 fast/borders/border-painting-dotted.html [ ImageOnlyFailure ]
+webkit.org/b/136078 fast/borders/border-painting-double.html [ ImageOnlyFailure ]
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingdashedatallexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-dashed-at-all-expected.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-dashed-at-all-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-dashed-at-all-expected.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dashed borders are painted at all.&lt;/title&gt;
+&lt;style&gt;
+  div {
+    position: absolute;
+    top: 0px;
+    width: 1px;
+    background-color: red;
+  }
+  
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  for (var i = 1; i &lt; 10; ++i) {
+      var e = document.createElement(&quot;div&quot;);
+      e.style.left = x + &quot;px&quot;;
+      e.style.height = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      borderWidth += 1;
+      w = 10 * i;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingdashedatallhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-dashed-at-all.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-dashed-at-all.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-dashed-at-all.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dashed borders are painted at all.&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    top: 0px;
+    height: 10px;
+    border-top: dashed red;
+  }
+  
+  .hide {
+    position: fixed;
+    top: 0px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  for (var i = 1; i &lt; 10; ++i) {
+      w = 10 * i;
+
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.borderTopWidth = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hideBox = document.createElement(&quot;div&quot;);
+      hideBox.className = &quot;hide&quot;;
+      hideBox.style.left = x + 1 + &quot;px&quot;;
+      hideBox.style.width = w - 1 + &quot;px&quot;;
+      hideBox.style.height = borderWidth + &quot;px&quot;;
+      document.body.appendChild(hideBox);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingdashedexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-dashed-expected.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-dashed-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-dashed-expected.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dashed borders are painted. It takes advantage of the fact that borders with radius get through a different code path (Path vs. drawLine).&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    border-style: dashed;
+    border-color: red;
+  }
+  
+  .hide {
+    position: fixed;
+    width: 4px;
+    height: 4px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  var y = 0;
+  var cornerBoxSize = 0;
+  for (var i = 0; i &lt; 10; ++i) {
+      w = 20 * i;
+      h = 20 * i;
+      cornerBoxSize = 2 * borderWidth;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.top =  y + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = h + &quot;px&quot;;
+      e.style.borderWidth = borderWidth + &quot;px&quot;;
+      e.style.borderRadius = borderWidth + 1 + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hb1 = document.createElement(&quot;div&quot;);
+      hb1.className = &quot;hide&quot;;
+      hb1.style.top = y + &quot;px&quot;;
+      hb1.style.left = x + &quot;px&quot;;
+      hb1.style.width = cornerBoxSize + &quot;px&quot;;
+      hb1.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb1);
+
+      var hb2 = document.createElement(&quot;div&quot;);
+      hb2.className = &quot;hide&quot;;
+      hb2.style.top = y + &quot;px&quot;;
+      hb2.style.left = x + w + &quot;px&quot;;
+      hb2.style.width = cornerBoxSize + &quot;px&quot;;
+      hb2.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb2);
+
+      var hb3 = document.createElement(&quot;div&quot;);
+      hb3.className = &quot;hide&quot;;
+      hb3.style.top = y + h + &quot;px&quot;;
+      hb3.style.left = x + &quot;px&quot;;
+      hb3.style.width = cornerBoxSize + &quot;px&quot;;
+      hb3.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb3);
+
+      var hb4 = document.createElement(&quot;div&quot;);
+      hb4.className = &quot;hide&quot;;
+      hb4.style.top = y + w + &quot;px&quot;;
+      hb4.style.left = x + h + &quot;px&quot;;
+      hb4.style.width = cornerBoxSize + &quot;px&quot;;
+      hb4.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb4);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingdashedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-dashed.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-dashed.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-dashed.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dashed borders are painted.&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    border-style: dashed;
+    border-color: red;
+  }
+  
+  .hide {
+    position: fixed;
+    width: 4px;
+    height: 4px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  var y = 0;
+  var cornerBoxSize = 0;
+  for (var i = 0; i &lt; 10; ++i) {
+      w = 20 * i;
+      h = 20 * i;
+      cornerBoxSize = 2 * borderWidth;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.top =  y + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = h + &quot;px&quot;;
+      e.style.borderWidth = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hb1 = document.createElement(&quot;div&quot;);
+      hb1.className = &quot;hide&quot;;
+      hb1.style.top = y + &quot;px&quot;;
+      hb1.style.left = x + &quot;px&quot;;
+      hb1.style.width = cornerBoxSize + &quot;px&quot;;
+      hb1.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb1);
+
+      var hb2 = document.createElement(&quot;div&quot;);
+      hb2.className = &quot;hide&quot;;
+      hb2.style.top = y + &quot;px&quot;;
+      hb2.style.left = x + w + &quot;px&quot;;
+      hb2.style.width = cornerBoxSize + &quot;px&quot;;
+      hb2.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb2);
+
+      var hb3 = document.createElement(&quot;div&quot;);
+      hb3.className = &quot;hide&quot;;
+      hb3.style.top = y + h + &quot;px&quot;;
+      hb3.style.left = x + &quot;px&quot;;
+      hb3.style.width = cornerBoxSize + &quot;px&quot;;
+      hb3.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb3);
+
+      var hb4 = document.createElement(&quot;div&quot;);
+      hb4.className = &quot;hide&quot;;
+      hb4.style.top = y + w + &quot;px&quot;;
+      hb4.style.left = x + h + &quot;px&quot;;
+      hb4.style.width = cornerBoxSize + &quot;px&quot;;
+      hb4.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb4);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingdottedatallexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-dotted-at-all-expected.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-dotted-at-all-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-dotted-at-all-expected.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dotted borders are painted at all.&lt;/title&gt;
+&lt;style&gt;
+  div {
+    position: absolute;
+    top: 0px;
+    width: 1px;
+    background-color: red;
+  }
+  
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  for (var i = 1; i &lt; 10; ++i) {
+      var e = document.createElement(&quot;div&quot;);
+      e.style.left = x + &quot;px&quot;;
+      e.style.height = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      borderWidth += 1;
+      w = 10 * i;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingdottedatallhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-dotted-at-all.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-dotted-at-all.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-dotted-at-all.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dashed borders are painted at all.&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    top: 0px;
+    height: 10px;
+    border-top: dotted red;
+  }
+  
+  .hide {
+    position: fixed;
+    top: 0px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  for (var i = 1; i &lt; 10; ++i) {
+      w = 10 * i;
+
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.borderTopWidth = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hideBox = document.createElement(&quot;div&quot;);
+      hideBox.className = &quot;hide&quot;;
+      hideBox.style.left = x + 1 + &quot;px&quot;;
+      hideBox.style.width = w - 1 + &quot;px&quot;;
+      hideBox.style.height = borderWidth + &quot;px&quot;;
+      document.body.appendChild(hideBox);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingdottedexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-dotted-expected.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-dotted-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-dotted-expected.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dotted borders are painted. It takes advantage of the fact that borders with radius get through a different code path (Path vs. drawLine).&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    border-style: dotted;
+    border-color: red;
+  }
+  
+  .hide {
+    position: fixed;
+    width: 4px;
+    height: 4px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  var y = 0;
+  var cornerBoxSize = 0;
+  for (var i = 0; i &lt; 10; ++i) {
+      w = 20 * i;
+      h = 20 * i;
+      cornerBoxSize = 2 * borderWidth;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.top =  y + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = h + &quot;px&quot;;
+      e.style.borderWidth = borderWidth + &quot;px&quot;;
+      e.style.borderRadius = borderWidth + 1 + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hb1 = document.createElement(&quot;div&quot;);
+      hb1.className = &quot;hide&quot;;
+      hb1.style.top = y + &quot;px&quot;;
+      hb1.style.left = x + &quot;px&quot;;
+      hb1.style.width = cornerBoxSize + &quot;px&quot;;
+      hb1.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb1);
+
+      var hb2 = document.createElement(&quot;div&quot;);
+      hb2.className = &quot;hide&quot;;
+      hb2.style.top = y + &quot;px&quot;;
+      hb2.style.left = x + w + &quot;px&quot;;
+      hb2.style.width = cornerBoxSize + &quot;px&quot;;
+      hb2.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb2);
+
+      var hb3 = document.createElement(&quot;div&quot;);
+      hb3.className = &quot;hide&quot;;
+      hb3.style.top = y + h + &quot;px&quot;;
+      hb3.style.left = x + &quot;px&quot;;
+      hb3.style.width = cornerBoxSize + &quot;px&quot;;
+      hb3.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb3);
+
+      var hb4 = document.createElement(&quot;div&quot;);
+      hb4.className = &quot;hide&quot;;
+      hb4.style.top = y + w + &quot;px&quot;;
+      hb4.style.left = x + h + &quot;px&quot;;
+      hb4.style.width = cornerBoxSize + &quot;px&quot;;
+      hb4.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb4);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingdottedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-dotted.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-dotted.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-dotted.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dotted borders are painted.&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    border-style: dotted;
+    border-color: red;
+  }
+  
+  .hide {
+    position: fixed;
+    width: 4px;
+    height: 4px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  var y = 0;
+  var cornerBoxSize = 0;
+  for (var i = 0; i &lt; 10; ++i) {
+      w = 20 * i;
+      h = 20 * i;
+      cornerBoxSize = 2 * borderWidth;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.top =  y + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = h + &quot;px&quot;;
+      e.style.borderWidth = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hb1 = document.createElement(&quot;div&quot;);
+      hb1.className = &quot;hide&quot;;
+      hb1.style.top = y + &quot;px&quot;;
+      hb1.style.left = x + &quot;px&quot;;
+      hb1.style.width = cornerBoxSize + &quot;px&quot;;
+      hb1.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb1);
+
+      var hb2 = document.createElement(&quot;div&quot;);
+      hb2.className = &quot;hide&quot;;
+      hb2.style.top = y + &quot;px&quot;;
+      hb2.style.left = x + w + &quot;px&quot;;
+      hb2.style.width = cornerBoxSize + &quot;px&quot;;
+      hb2.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb2);
+
+      var hb3 = document.createElement(&quot;div&quot;);
+      hb3.className = &quot;hide&quot;;
+      hb3.style.top = y + h + &quot;px&quot;;
+      hb3.style.left = x + &quot;px&quot;;
+      hb3.style.width = cornerBoxSize + &quot;px&quot;;
+      hb3.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb3);
+
+      var hb4 = document.createElement(&quot;div&quot;);
+      hb4.className = &quot;hide&quot;;
+      hb4.style.top = y + w + &quot;px&quot;;
+      hb4.style.left = x + h + &quot;px&quot;;
+      hb4.style.width = cornerBoxSize + &quot;px&quot;;
+      hb4.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb4);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingdoubleatallexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-double-at-all-expected.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-double-at-all-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-double-at-all-expected.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that double borders are painted at all.&lt;/title&gt;
+&lt;style&gt;
+  div {
+    position: absolute;
+    top: 0px;
+    height: 1px;
+    background-color: red;
+  }
+  
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  for (var i = 1; i &lt; 10; ++i) {
+      w = 10 * i;
+
+      var e = document.createElement(&quot;div&quot;);
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingdoubleatallhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-double-at-all.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-double-at-all.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-double-at-all.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dashed borders are painted at all.&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    top: 0px;
+    height: 10px;
+    border-top: double red;
+  }
+  
+  .hide {
+    position: fixed;
+    top: 0px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  for (var i = 1; i &lt; 10; ++i) {
+      w = 10 * i;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.borderTopWidth = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hideBox = document.createElement(&quot;div&quot;);
+      hideBox.className = &quot;hide&quot;;
+      hideBox.style.top = &quot;1px&quot;;
+      hideBox.style.left = x + &quot;px&quot;;
+      hideBox.style.width = w + &quot;px&quot;;
+      hideBox.style.height = borderWidth + &quot;px&quot;;
+      document.body.appendChild(hideBox);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingdoubleexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-double-expected.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-double-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-double-expected.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that double borders are painted. It takes advantage of the fact that borders with radius get through a different code path (Path vs. drawLine).&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    border-style: double;
+    border-color: red;
+  }
+  
+  .hide {
+    position: fixed;
+    width: 4px;
+    height: 4px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 3;
+  var x = 0;
+  var y = 0;
+  var cornerBoxSize = 0;
+  for (var i = 0; i &lt; 10; ++i) {
+      w = 20 * i;
+      h = 20 * i;
+      cornerBoxSize = 2 * borderWidth;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.top =  y + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = h + &quot;px&quot;;
+      e.style.borderWidth = borderWidth + &quot;px&quot;;
+      e.style.borderRadius = borderWidth + 1 + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hb1 = document.createElement(&quot;div&quot;);
+      hb1.className = &quot;hide&quot;;
+      hb1.style.top = y + &quot;px&quot;;
+      hb1.style.left = x + &quot;px&quot;;
+      hb1.style.width = cornerBoxSize + &quot;px&quot;;
+      hb1.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb1);
+
+      var hb2 = document.createElement(&quot;div&quot;);
+      hb2.className = &quot;hide&quot;;
+      hb2.style.top = y + &quot;px&quot;;
+      hb2.style.left = x + w + &quot;px&quot;;
+      hb2.style.width = cornerBoxSize + &quot;px&quot;;
+      hb2.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb2);
+
+      var hb3 = document.createElement(&quot;div&quot;);
+      hb3.className = &quot;hide&quot;;
+      hb3.style.top = y + h + &quot;px&quot;;
+      hb3.style.left = x + &quot;px&quot;;
+      hb3.style.width = cornerBoxSize + &quot;px&quot;;
+      hb3.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb3);
+
+      var hb4 = document.createElement(&quot;div&quot;);
+      hb4.className = &quot;hide&quot;;
+      hb4.style.top = y + w + &quot;px&quot;;
+      hb4.style.left = x + h + &quot;px&quot;;
+      hb4.style.width = cornerBoxSize + &quot;px&quot;;
+      hb4.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb4);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingdoublehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-double.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-double.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-double.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that double borders are painted.&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    border-style: double;
+    border-color: red;
+  }
+  
+  .hide {
+    position: fixed;
+    width: 4px;
+    height: 4px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 3;
+  var x = 0;
+  var y = 0;
+  var cornerBoxSize = 0;
+  for (var i = 0; i &lt; 10; ++i) {
+      w = 20 * i;
+      h = 20 * i;
+      cornerBoxSize = 2 * borderWidth;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.top =  y + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = h + &quot;px&quot;;
+      e.style.borderWidth = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hb1 = document.createElement(&quot;div&quot;);
+      hb1.className = &quot;hide&quot;;
+      hb1.style.top = y + &quot;px&quot;;
+      hb1.style.left = x + &quot;px&quot;;
+      hb1.style.width = cornerBoxSize + &quot;px&quot;;
+      hb1.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb1);
+
+      var hb2 = document.createElement(&quot;div&quot;);
+      hb2.className = &quot;hide&quot;;
+      hb2.style.top = y + &quot;px&quot;;
+      hb2.style.left = x + w + &quot;px&quot;;
+      hb2.style.width = cornerBoxSize + &quot;px&quot;;
+      hb2.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb2);
+
+      var hb3 = document.createElement(&quot;div&quot;);
+      hb3.className = &quot;hide&quot;;
+      hb3.style.top = y + h + &quot;px&quot;;
+      hb3.style.left = x + &quot;px&quot;;
+      hb3.style.width = cornerBoxSize + &quot;px&quot;;
+      hb3.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb3);
+
+      var hb4 = document.createElement(&quot;div&quot;);
+      hb4.className = &quot;hide&quot;;
+      hb4.style.top = y + w + &quot;px&quot;;
+      hb4.style.left = x + h + &quot;px&quot;;
+      hb4.style.width = cornerBoxSize + &quot;px&quot;;
+      hb4.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb4);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintinggrooveatallexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-groove-at-all-expected.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-groove-at-all-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-groove-at-all-expected.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that groove borders are painted at all.&lt;/title&gt;
+&lt;style&gt;
+  div {
+    position: absolute;
+    background-color: red;
+  }
+  
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  for (var i = 1; i &lt; 10; ++i) {
+      w = 10 * i;
+
+      var e = document.createElement(&quot;div&quot;);
+      e.style.top =  borderWidth / 2 + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.height =  borderWidth / 2 + &quot;px&quot;;
+      e.style.width =  w + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintinggrooveatallhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-groove-at-all.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-groove-at-all.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-groove-at-all.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dashed borders are painted at all.&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    top: 0px;
+    height: 10px;
+    border-top: groove red;
+  }
+  
+  .hide {
+    position: fixed;
+    top: 0px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  for (var i = 1; i &lt; 10; ++i) {
+      w = 10 * i;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.borderTopWidth = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hideBox = document.createElement(&quot;div&quot;);
+      hideBox.className = &quot;hide&quot;;
+      hideBox.style.left = x + &quot;px&quot;;
+      hideBox.style.width = w + &quot;px&quot;;
+      hideBox.style.height = borderWidth / 2 + &quot;px&quot;;
+      document.body.appendChild(hideBox);
+
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintinginsetatallexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-inset-at-all-expected.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-inset-at-all-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-inset-at-all-expected.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that inset borders are painted at all.&lt;/title&gt;
+&lt;style&gt;
+  div {
+    position: absolute;
+    top: 10px;
+    background-color: red;
+  }
+  
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  for (var i = 1; i &lt; 10; ++i) {
+      w = 10 * i;
+
+      var e = document.createElement(&quot;div&quot;);
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintinginsetatallhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-inset-at-all.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-inset-at-all.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-inset-at-all.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dashed borders are painted at all.&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    top: 0px;
+    height: 10px;
+    border-bottom: inset red;
+  }
+  
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  for (var i = 1; i &lt; 10; ++i) {
+      w = 10 * i;
+
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.borderBottomWidth = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintinginsetexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-inset-expected.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-inset-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-inset-expected.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that inset borders are painted. It takes advantage of the fact that borders with radius get through a different code path (Path vs. drawLine).&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    border-style: inset;
+    border-color: red;
+  }
+  
+  .hide {
+    position: fixed;
+    width: 4px;
+    height: 4px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  var y = 0;
+  var cornerBoxSize = 0;
+  for (var i = 0; i &lt; 10; ++i) {
+      w = 20 * i;
+      h = 20 * i;
+      cornerBoxSize = 2 * borderWidth;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.top =  y + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = h + &quot;px&quot;;
+      e.style.borderWidth = borderWidth + &quot;px&quot;;
+      e.style.borderRadius = borderWidth + 1 + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hb1 = document.createElement(&quot;div&quot;);
+      hb1.className = &quot;hide&quot;;
+      hb1.style.top = y + &quot;px&quot;;
+      hb1.style.left = x + &quot;px&quot;;
+      hb1.style.width = cornerBoxSize + &quot;px&quot;;
+      hb1.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb1);
+
+      var hb2 = document.createElement(&quot;div&quot;);
+      hb2.className = &quot;hide&quot;;
+      hb2.style.top = y + &quot;px&quot;;
+      hb2.style.left = x + w + &quot;px&quot;;
+      hb2.style.width = cornerBoxSize + &quot;px&quot;;
+      hb2.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb2);
+
+      var hb3 = document.createElement(&quot;div&quot;);
+      hb3.className = &quot;hide&quot;;
+      hb3.style.top = y + h + &quot;px&quot;;
+      hb3.style.left = x + &quot;px&quot;;
+      hb3.style.width = cornerBoxSize + &quot;px&quot;;
+      hb3.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb3);
+
+      var hb4 = document.createElement(&quot;div&quot;);
+      hb4.className = &quot;hide&quot;;
+      hb4.style.top = y + w + &quot;px&quot;;
+      hb4.style.left = x + h + &quot;px&quot;;
+      hb4.style.width = cornerBoxSize + &quot;px&quot;;
+      hb4.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb4);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintinginsethtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-inset.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-inset.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-inset.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that inset borders are painted.&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    border-style: inset;
+    border-color: red;
+  }
+  
+  .hide {
+    position: fixed;
+    width: 4px;
+    height: 4px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  var y = 0;
+  var cornerBoxSize = 0;
+  for (var i = 0; i &lt; 10; ++i) {
+      w = 20 * i;
+      h = 20 * i;
+      cornerBoxSize = 2 * borderWidth;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.top =  y + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = h + &quot;px&quot;;
+      e.style.borderWidth = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hb1 = document.createElement(&quot;div&quot;);
+      hb1.className = &quot;hide&quot;;
+      hb1.style.top = y + &quot;px&quot;;
+      hb1.style.left = x + &quot;px&quot;;
+      hb1.style.width = cornerBoxSize + &quot;px&quot;;
+      hb1.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb1);
+
+      var hb2 = document.createElement(&quot;div&quot;);
+      hb2.className = &quot;hide&quot;;
+      hb2.style.top = y + &quot;px&quot;;
+      hb2.style.left = x + w + &quot;px&quot;;
+      hb2.style.width = cornerBoxSize + &quot;px&quot;;
+      hb2.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb2);
+
+      var hb3 = document.createElement(&quot;div&quot;);
+      hb3.className = &quot;hide&quot;;
+      hb3.style.top = y + h + &quot;px&quot;;
+      hb3.style.left = x + &quot;px&quot;;
+      hb3.style.width = cornerBoxSize + &quot;px&quot;;
+      hb3.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb3);
+
+      var hb4 = document.createElement(&quot;div&quot;);
+      hb4.className = &quot;hide&quot;;
+      hb4.style.top = y + w + &quot;px&quot;;
+      hb4.style.left = x + h + &quot;px&quot;;
+      hb4.style.width = cornerBoxSize + &quot;px&quot;;
+      hb4.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb4);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingoutsetatallexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-outset-at-all-expected.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-outset-at-all-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-outset-at-all-expected.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dashed borders are painted at all.&lt;/title&gt;
+&lt;style&gt;
+  div {
+    position: absolute;
+    top: 0px;
+    width: 1px;
+    background-color: red;
+  }
+  
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  for (var i = 1; i &lt; 10; ++i) {
+      w = 10 * i;
+
+      var e = document.createElement(&quot;div&quot;);
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingoutsetatallhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-outset-at-all.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-outset-at-all.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-outset-at-all.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dashed borders are painted at all.&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    top: 0px;
+    height: 10px;
+    border-top: outset red;
+  }
+  
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  for (var i = 1; i &lt; 10; ++i) {
+      w = 10 * i;
+
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.borderTopWidth = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingoutsetexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-outset-expected.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-outset-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-outset-expected.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that outset borders are painted. It takes advantage of the fact that borders with radius get through a different code path (Path vs. drawLine).&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    border-style: outset;
+    border-color: red;
+  }
+  
+  .hide {
+    position: fixed;
+    width: 4px;
+    height: 4px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  var y = 0;
+  var cornerBoxSize = 0;
+  for (var i = 0; i &lt; 10; ++i) {
+      var e = document.createElement(&quot;div&quot;);
+      w = 20 * i;
+      h = 20 * i;
+      cornerBoxSize = 2 * borderWidth;
+      
+      e.className = &quot;borderBox&quot;;
+      e.style.top =  y + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = h + &quot;px&quot;;
+      e.style.borderWidth = borderWidth + &quot;px&quot;;
+      e.style.borderRadius = borderWidth + 1 + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hb1 = document.createElement(&quot;div&quot;);
+      hb1.className = &quot;hide&quot;;
+      hb1.style.top = y + &quot;px&quot;;
+      hb1.style.left = x + &quot;px&quot;;
+      hb1.style.width = cornerBoxSize + &quot;px&quot;;
+      hb1.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb1);
+
+      var hb2 = document.createElement(&quot;div&quot;);
+      hb2.className = &quot;hide&quot;;
+      hb2.style.top = y + &quot;px&quot;;
+      hb2.style.left = x + w + &quot;px&quot;;
+      hb2.style.width = cornerBoxSize + &quot;px&quot;;
+      hb2.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb2);
+
+      var hb3 = document.createElement(&quot;div&quot;);
+      hb3.className = &quot;hide&quot;;
+      hb3.style.top = y + h + &quot;px&quot;;
+      hb3.style.left = x + &quot;px&quot;;
+      hb3.style.width = cornerBoxSize + &quot;px&quot;;
+      hb3.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb3);
+
+      var hb4 = document.createElement(&quot;div&quot;);
+      hb4.className = &quot;hide&quot;;
+      hb4.style.top = y + w + &quot;px&quot;;
+      hb4.style.left = x + h + &quot;px&quot;;
+      hb4.style.width = cornerBoxSize + &quot;px&quot;;
+      hb4.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb4);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingoutsethtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-outset.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-outset.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-outset.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that outset borders are painted.&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    border-style: outset;
+    border-color: red;
+  }
+  
+  .hide {
+    position: fixed;
+    width: 4px;
+    height: 4px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  var y = 0;
+  var cornerBoxSize = 0;
+  for (var i = 0; i &lt; 10; ++i) {
+      var e = document.createElement(&quot;div&quot;);
+      w = 20 * i;
+      h = 20 * i;
+      cornerBoxSize = 2 * borderWidth;
+      
+      e.className = &quot;borderBox&quot;;
+      e.style.top =  y + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = h + &quot;px&quot;;
+      e.style.borderWidth = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hb1 = document.createElement(&quot;div&quot;);
+      hb1.className = &quot;hide&quot;;
+      hb1.style.top = y + &quot;px&quot;;
+      hb1.style.left = x + &quot;px&quot;;
+      hb1.style.width = cornerBoxSize + &quot;px&quot;;
+      hb1.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb1);
+
+      var hb2 = document.createElement(&quot;div&quot;);
+      hb2.className = &quot;hide&quot;;
+      hb2.style.top = y + &quot;px&quot;;
+      hb2.style.left = x + w + &quot;px&quot;;
+      hb2.style.width = cornerBoxSize + &quot;px&quot;;
+      hb2.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb2);
+
+      var hb3 = document.createElement(&quot;div&quot;);
+      hb3.className = &quot;hide&quot;;
+      hb3.style.top = y + h + &quot;px&quot;;
+      hb3.style.left = x + &quot;px&quot;;
+      hb3.style.width = cornerBoxSize + &quot;px&quot;;
+      hb3.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb3);
+
+      var hb4 = document.createElement(&quot;div&quot;);
+      hb4.className = &quot;hide&quot;;
+      hb4.style.top = y + w + &quot;px&quot;;
+      hb4.style.left = x + h + &quot;px&quot;;
+      hb4.style.width = cornerBoxSize + &quot;px&quot;;
+      hb4.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb4);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingridgeatallexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-ridge-at-all-expected.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-ridge-at-all-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-ridge-at-all-expected.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dashed borders are painted at all.&lt;/title&gt;
+&lt;style&gt;
+  div {
+    position: absolute;
+    top: 0px;
+    background-color: red;
+  }
+  
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  for (var i = 1; i &lt; 10; ++i) {
+      w = 10 * i;
+
+      var e = document.createElement(&quot;div&quot;);
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = borderWidth / 2 + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingridgeatallhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-ridge-at-all.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-ridge-at-all.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-ridge-at-all.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dashed borders are painted at all.&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    top: 0px;
+    height: 10px;
+    border-top: ridge red;
+  }
+  
+  .hide {
+    position: fixed;
+    top: 0px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  for (var i = 1; i &lt; 10; ++i) {
+      w = 10 * i;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.borderTopWidth = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hideBox = document.createElement(&quot;div&quot;);
+      hideBox.className = &quot;hide&quot;;
+      hideBox.style.top =  borderWidth / 2 + &quot;px&quot;;
+      hideBox.style.left = x + &quot;px&quot;;
+      hideBox.style.width = w + &quot;px&quot;;
+      hideBox.style.height = borderWidth / 2 + &quot;px&quot;;
+      document.body.appendChild(hideBox);
+
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingsolidatallexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-solid-at-all-expected.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-solid-at-all-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-solid-at-all-expected.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dashed borders are painted at all.&lt;/title&gt;
+&lt;style&gt;
+  div {
+    position: absolute;
+    top: 0px;
+    background-color: red;
+  }
+  
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  for (var i = 1; i &lt; 10; ++i) {
+      w = 10 * i;
+
+      var e = document.createElement(&quot;div&quot;);
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingsolidatallhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-solid-at-all.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-solid-at-all.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-solid-at-all.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that dashed borders are painted at all.&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    top: 0px;
+    height: 10px;
+    border-top: solid red;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  for (var i = 1; i &lt; 10; ++i) {
+      w = 10 * i;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.borderTopWidth = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingsolidexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-solid-expected.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-solid-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-solid-expected.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that solid borders are painted. It takes advantage of the fact that borders with radius get through a different code path (Path vs. drawLine).&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    border-style: solid;
+    border-color: red;
+  }
+  
+  .hide {
+    position: fixed;
+    width: 4px;
+    height: 4px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  var y = 0;
+  var cornerBoxSize = 0;
+  for (var i = 0; i &lt; 10; ++i) {
+      w = 20 * i;
+      h = 20 * i;
+      cornerBoxSize = 2 * borderWidth;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.top =  y + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = h + &quot;px&quot;;
+      e.style.borderWidth = borderWidth + &quot;px&quot;;
+      e.style.borderRadius = borderWidth + 1 + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hb1 = document.createElement(&quot;div&quot;);
+      hb1.className = &quot;hide&quot;;
+      hb1.style.top = y + &quot;px&quot;;
+      hb1.style.left = x + &quot;px&quot;;
+      hb1.style.width = cornerBoxSize + &quot;px&quot;;
+      hb1.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb1);
+
+      var hb2 = document.createElement(&quot;div&quot;);
+      hb2.className = &quot;hide&quot;;
+      hb2.style.top = y + &quot;px&quot;;
+      hb2.style.left = x + w + &quot;px&quot;;
+      hb2.style.width = cornerBoxSize + &quot;px&quot;;
+      hb2.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb2);
+
+      var hb3 = document.createElement(&quot;div&quot;);
+      hb3.className = &quot;hide&quot;;
+      hb3.style.top = y + h + &quot;px&quot;;
+      hb3.style.left = x + &quot;px&quot;;
+      hb3.style.width = cornerBoxSize + &quot;px&quot;;
+      hb3.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb3);
+
+      var hb4 = document.createElement(&quot;div&quot;);
+      hb4.className = &quot;hide&quot;;
+      hb4.style.top = y + w + &quot;px&quot;;
+      hb4.style.left = x + h + &quot;px&quot;;
+      hb4.style.width = cornerBoxSize + &quot;px&quot;;
+      hb4.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb4);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordersborderpaintingsolidhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/border-painting-solid.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/border-painting-solid.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/border-painting-solid.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that solid borders are painted.&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    border-style: solid;
+    border-color: red;
+  }
+  
+  .hide {
+    position: fixed;
+    width: 4px;
+    height: 4px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  var y = 0;
+  var cornerBoxSize = 0;
+  for (var i = 0; i &lt; 10; ++i) {
+      w = 20 * i;
+      h = 20 * i;
+      cornerBoxSize = 2 * borderWidth;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.top =  y + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = h + &quot;px&quot;;
+      e.style.borderWidth = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hb1 = document.createElement(&quot;div&quot;);
+      hb1.className = &quot;hide&quot;;
+      hb1.style.top = y + &quot;px&quot;;
+      hb1.style.left = x + &quot;px&quot;;
+      hb1.style.width = cornerBoxSize + &quot;px&quot;;
+      hb1.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb1);
+
+      var hb2 = document.createElement(&quot;div&quot;);
+      hb2.className = &quot;hide&quot;;
+      hb2.style.top = y + &quot;px&quot;;
+      hb2.style.left = x + w + &quot;px&quot;;
+      hb2.style.width = cornerBoxSize + &quot;px&quot;;
+      hb2.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb2);
+
+      var hb3 = document.createElement(&quot;div&quot;);
+      hb3.className = &quot;hide&quot;;
+      hb3.style.top = y + h + &quot;px&quot;;
+      hb3.style.left = x + &quot;px&quot;;
+      hb3.style.width = cornerBoxSize + &quot;px&quot;;
+      hb3.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb3);
+
+      var hb4 = document.createElement(&quot;div&quot;);
+      hb4.className = &quot;hide&quot;;
+      hb4.style.top = y + w + &quot;px&quot;;
+      hb4.style.left = x + h + &quot;px&quot;;
+      hb4.style.width = cornerBoxSize + &quot;px&quot;;
+      hb4.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb4);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordershidpiborderpaintinggrooveexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/hidpi-border-painting-groove-expected.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/hidpi-border-painting-groove-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/hidpi-border-painting-groove-expected.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that groove borders are painted. It takes advantage of the fact that borders with radius get through a different code path (Path vs. drawLine).&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    border-style: groove;
+    border-color: red;
+  }
+  
+  .hide {
+    position: fixed;
+    width: 4px;
+    height: 4px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  var y = 0;
+  var cornerBoxSize = 0;
+  for (var i = 0; i &lt; 10; ++i) {
+      w = 20 * i;
+      h = 20 * i;
+      cornerBoxSize = 2 * borderWidth;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.top =  y + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = h + &quot;px&quot;;
+      e.style.borderWidth = borderWidth + &quot;px&quot;;
+      e.style.borderRadius = borderWidth + 1 + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hb1 = document.createElement(&quot;div&quot;);
+      hb1.className = &quot;hide&quot;;
+      hb1.style.top = y + &quot;px&quot;;
+      hb1.style.left = x + &quot;px&quot;;
+      hb1.style.width = cornerBoxSize + &quot;px&quot;;
+      hb1.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb1);
+
+      var hb2 = document.createElement(&quot;div&quot;);
+      hb2.className = &quot;hide&quot;;
+      hb2.style.top = y + &quot;px&quot;;
+      hb2.style.left = x + w + &quot;px&quot;;
+      hb2.style.width = cornerBoxSize + &quot;px&quot;;
+      hb2.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb2);
+
+      var hb3 = document.createElement(&quot;div&quot;);
+      hb3.className = &quot;hide&quot;;
+      hb3.style.top = y + h + &quot;px&quot;;
+      hb3.style.left = x + &quot;px&quot;;
+      hb3.style.width = cornerBoxSize + &quot;px&quot;;
+      hb3.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb3);
+
+      var hb4 = document.createElement(&quot;div&quot;);
+      hb4.className = &quot;hide&quot;;
+      hb4.style.top = y + w + &quot;px&quot;;
+      hb4.style.left = x + h + &quot;px&quot;;
+      hb4.style.width = cornerBoxSize + &quot;px&quot;;
+      hb4.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb4);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordershidpiborderpaintinggroovehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/hidpi-border-painting-groove.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/hidpi-border-painting-groove.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/hidpi-border-painting-groove.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that groove borders are painted.&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    border-style: groove;
+    border-color: red;
+  }
+  
+  .hide {
+    position: fixed;
+    width: 4px;
+    height: 4px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  var y = 0;
+  var cornerBoxSize = 0;
+  for (var i = 0; i &lt; 10; ++i) {
+      w = 20 * i;
+      h = 20 * i;
+      cornerBoxSize = 2 * borderWidth;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.top =  y + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = h + &quot;px&quot;;
+      e.style.borderWidth = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hb1 = document.createElement(&quot;div&quot;);
+      hb1.className = &quot;hide&quot;;
+      hb1.style.top = y + &quot;px&quot;;
+      hb1.style.left = x + &quot;px&quot;;
+      hb1.style.width = cornerBoxSize + &quot;px&quot;;
+      hb1.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb1);
+
+      var hb2 = document.createElement(&quot;div&quot;);
+      hb2.className = &quot;hide&quot;;
+      hb2.style.top = y + &quot;px&quot;;
+      hb2.style.left = x + w + &quot;px&quot;;
+      hb2.style.width = cornerBoxSize + &quot;px&quot;;
+      hb2.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb2);
+
+      var hb3 = document.createElement(&quot;div&quot;);
+      hb3.className = &quot;hide&quot;;
+      hb3.style.top = y + h + &quot;px&quot;;
+      hb3.style.left = x + &quot;px&quot;;
+      hb3.style.width = cornerBoxSize + &quot;px&quot;;
+      hb3.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb3);
+
+      var hb4 = document.createElement(&quot;div&quot;);
+      hb4.className = &quot;hide&quot;;
+      hb4.style.top = y + w + &quot;px&quot;;
+      hb4.style.left = x + h + &quot;px&quot;;
+      hb4.style.width = cornerBoxSize + &quot;px&quot;;
+      hb4.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb4);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordershidpiborderpaintingridgeexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/hidpi-border-painting-ridge-expected.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/hidpi-border-painting-ridge-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/hidpi-border-painting-ridge-expected.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that ridge borders are painted. It takes advantage of the fact that borders with radius get through a different code path (Path vs. drawLine).&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    border-style: ridge;
+    border-color: red;
+  }
+  
+  .hide {
+    position: fixed;
+    width: 4px;
+    height: 4px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  var y = 0;
+  var cornerBoxSize = 0;
+  for (var i = 0; i &lt; 10; ++i) {
+      w = 20 * i;
+      h = 20 * i;
+      cornerBoxSize = 2 * borderWidth;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.top =  y + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = h + &quot;px&quot;;
+      e.style.borderWidth = borderWidth + &quot;px&quot;;
+      e.style.borderRadius = borderWidth + 1 + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hb1 = document.createElement(&quot;div&quot;);
+      hb1.className = &quot;hide&quot;;
+      hb1.style.top = y + &quot;px&quot;;
+      hb1.style.left = x + &quot;px&quot;;
+      hb1.style.width = cornerBoxSize + &quot;px&quot;;
+      hb1.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb1);
+
+      var hb2 = document.createElement(&quot;div&quot;);
+      hb2.className = &quot;hide&quot;;
+      hb2.style.top = y + &quot;px&quot;;
+      hb2.style.left = x + w + &quot;px&quot;;
+      hb2.style.width = cornerBoxSize + &quot;px&quot;;
+      hb2.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb2);
+
+      var hb3 = document.createElement(&quot;div&quot;);
+      hb3.className = &quot;hide&quot;;
+      hb3.style.top = y + h + &quot;px&quot;;
+      hb3.style.left = x + &quot;px&quot;;
+      hb3.style.width = cornerBoxSize + &quot;px&quot;;
+      hb3.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb3);
+
+      var hb4 = document.createElement(&quot;div&quot;);
+      hb4.className = &quot;hide&quot;;
+      hb4.style.top = y + w + &quot;px&quot;;
+      hb4.style.left = x + h + &quot;px&quot;;
+      hb4.style.width = cornerBoxSize + &quot;px&quot;;
+      hb4.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb4);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordershidpiborderpaintingridgehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/hidpi-border-painting-ridge.html (0 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/hidpi-border-painting-ridge.html                                (rev 0)
+++ trunk/LayoutTests/fast/borders/hidpi-border-painting-ridge.html        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This test that ridge borders are painted.&lt;/title&gt;
+&lt;style&gt;
+  .borderBox {
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    border-style: ridge;
+    border-color: red;
+  }
+  
+  .hide {
+    position: fixed;
+    width: 4px;
+    height: 4px;
+    background-color: white;
+  }
+&lt;/style&gt;
+&lt;head&gt;
+&lt;body&gt;
+&lt;script&gt;
+  var borderWidth = 1;
+  var x = 0;
+  var y = 0;
+  var cornerBoxSize = 0;
+  for (var i = 0; i &lt; 10; ++i) {
+      w = 20 * i;
+      h = 20 * i;
+      cornerBoxSize = 2 * borderWidth;
+      
+      var e = document.createElement(&quot;div&quot;);
+      e.className = &quot;borderBox&quot;;
+      e.style.top =  y + &quot;px&quot;;
+      e.style.left = x + &quot;px&quot;;
+      e.style.width = w + &quot;px&quot;;
+      e.style.height = h + &quot;px&quot;;
+      e.style.borderWidth = borderWidth + &quot;px&quot;;
+      document.body.appendChild(e);
+
+      var hb1 = document.createElement(&quot;div&quot;);
+      hb1.className = &quot;hide&quot;;
+      hb1.style.top = y + &quot;px&quot;;
+      hb1.style.left = x + &quot;px&quot;;
+      hb1.style.width = cornerBoxSize + &quot;px&quot;;
+      hb1.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb1);
+
+      var hb2 = document.createElement(&quot;div&quot;);
+      hb2.className = &quot;hide&quot;;
+      hb2.style.top = y + &quot;px&quot;;
+      hb2.style.left = x + w + &quot;px&quot;;
+      hb2.style.width = cornerBoxSize + &quot;px&quot;;
+      hb2.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb2);
+
+      var hb3 = document.createElement(&quot;div&quot;);
+      hb3.className = &quot;hide&quot;;
+      hb3.style.top = y + h + &quot;px&quot;;
+      hb3.style.left = x + &quot;px&quot;;
+      hb3.style.width = cornerBoxSize + &quot;px&quot;;
+      hb3.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb3);
+
+      var hb4 = document.createElement(&quot;div&quot;);
+      hb4.className = &quot;hide&quot;;
+      hb4.style.top = y + w + &quot;px&quot;;
+      hb4.style.left = x + h + &quot;px&quot;;
+      hb4.style.width = cornerBoxSize + &quot;px&quot;;
+      hb4.style.height = cornerBoxSize + &quot;px&quot;;
+      document.body.appendChild(hb4);
+      
+      borderWidth += 1;
+      x += (w + 2 * borderWidth);
+  }
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (172796 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-08-20 04:32:12 UTC (rev 172796)
+++ trunk/Source/WebCore/ChangeLog        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -1,3 +1,35 @@
</span><ins>+2014-08-20  Zalan Bujtas  &lt;zalan@apple.com&gt;
+
+        Dashed/dotted borders do not paint.
+        https://bugs.webkit.org/show_bug.cgi?id=135898
+
+        Reviewed by Simon Fraser.
+
+        Remove the empty line checks for drawLines. There's no need to protect the graphics
+        context from empty lines.
+
+        Tests: fast/borders/border-painting-dashed-at-all.html
+               fast/borders/border-painting-dashed.html
+               fast/borders/border-painting-dotted-at-all.html
+               fast/borders/border-painting-dotted.html
+               fast/borders/border-painting-double-at-all.html
+               fast/borders/border-painting-double.html
+               fast/borders/border-painting-groove-at-all.html
+               fast/borders/border-painting-inset-at-all.html
+               fast/borders/border-painting-inset.html
+               fast/borders/border-painting-outset-at-all.html
+               fast/borders/border-painting-outset.html
+               fast/borders/border-painting-ridge-at-all.html
+               fast/borders/border-painting-solid-at-all.html
+               fast/borders/border-painting-solid.html
+               fast/borders/hidpi-border-painting-groove.html
+               fast/borders/hidpi-border-painting-ridge.html
+
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::drawLineForBoxSide):
+        (WebCore::drawBorderLineRect): Deleted.
+        (WebCore::drawBorderLine): Deleted.
+
</ins><span class="cx"> 2014-08-19  Jinwoo Song  &lt;jinwoo7.song@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Ignore usemap attributes without '#' in img element
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (172796 => 172797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.cpp        2014-08-20 04:32:12 UTC (rev 172796)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp        2014-08-20 14:44:56 UTC (rev 172797)
</span><span class="lines">@@ -737,23 +737,6 @@
</span><span class="cx">     return toRenderBlock(o);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void drawBorderLineRect(GraphicsContext&amp; graphicsContext, const LayoutRect&amp; rect, float deviceScaleFactor)
-{
-    FloatRect pixelSnappedRect = pixelSnappedForPainting(rect, deviceScaleFactor);
-    if (pixelSnappedRect.isEmpty())
-        return;
-    graphicsContext.drawRect(pixelSnappedRect);
-}
-
-static void drawBorderLine(GraphicsContext&amp; graphicsContext, const LayoutPoint&amp; point1, const LayoutPoint&amp; point2, float deviceScaleFactor)
-{
-    FloatPoint p1 = roundedForPainting(point1, deviceScaleFactor);
-    FloatPoint p2 = roundedForPainting(point2, deviceScaleFactor);
-    if (p1.x() == p2.x() || p1.y() == p2.y())
-        return;
-    graphicsContext.drawLine(point1, point2);
-}
-
</del><span class="cx"> void RenderObject::drawLineForBoxSide(GraphicsContext* graphicsContext, float x1, float y1, float x2, float y2,
</span><span class="cx">     BoxSide side, Color color, EBorderStyle borderStyle, float adjacentWidth1, float adjacentWidth2, bool antialias) const
</span><span class="cx"> {
</span><span class="lines">@@ -797,11 +780,11 @@
</span><span class="cx">                 switch (side) {
</span><span class="cx">                     case BSBottom:
</span><span class="cx">                     case BSTop:
</span><del>-                        drawBorderLine(*graphicsContext, LayoutPoint(x1, adjustedY), LayoutPoint(x2, adjustedY), deviceScaleFactor);
</del><ins>+                        graphicsContext-&gt;drawLine(FloatPoint(x1, adjustedY), FloatPoint(x2, adjustedY));
</ins><span class="cx">                         break;
</span><span class="cx">                     case BSRight:
</span><span class="cx">                     case BSLeft:
</span><del>-                        drawBorderLine(*graphicsContext, LayoutPoint(adjustedX, y1), LayoutPoint(adjustedX, y2), deviceScaleFactor);
</del><ins>+                        graphicsContext-&gt;drawLine(FloatPoint(adjustedX, y1), FloatPoint(adjustedX, y2));
</ins><span class="cx">                         break;
</span><span class="cx">                 }
</span><span class="cx">                 graphicsContext-&gt;setShouldAntialias(wasAntialiased);
</span><span class="lines">@@ -824,13 +807,13 @@
</span><span class="cx">                 switch (side) {
</span><span class="cx">                     case BSTop:
</span><span class="cx">                     case BSBottom:
</span><del>-                        drawBorderLineRect(*graphicsContext, LayoutRect(x1, y1, length, thirdOfThickness), deviceScaleFactor);
-                        drawBorderLineRect(*graphicsContext, LayoutRect(x1, y2 - thirdOfThickness, length, thirdOfThickness), deviceScaleFactor);
</del><ins>+                        graphicsContext-&gt;drawRect(pixelSnappedForPainting(x1, y1, length, thirdOfThickness, deviceScaleFactor));
+                        graphicsContext-&gt;drawRect(pixelSnappedForPainting(x1, y2 - thirdOfThickness, length, thirdOfThickness, deviceScaleFactor));
</ins><span class="cx">                         break;
</span><span class="cx">                     case BSLeft:
</span><span class="cx">                     case BSRight:
</span><del>-                        drawBorderLineRect(*graphicsContext, LayoutRect(x1, y1, thirdOfThickness, length), deviceScaleFactor);
-                        drawBorderLineRect(*graphicsContext, LayoutRect(x2 - thirdOfThickness, y1, thirdOfThickness, length), deviceScaleFactor);
</del><ins>+                        graphicsContext-&gt;drawRect(pixelSnappedForPainting(x1, y1, thirdOfThickness, length, deviceScaleFactor));
+                        graphicsContext-&gt;drawRect(pixelSnappedForPainting(x2 - thirdOfThickness, y1, thirdOfThickness, length, deviceScaleFactor));
</ins><span class="cx">                         break;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="lines">@@ -976,7 +959,7 @@
</span><span class="cx">                 graphicsContext-&gt;setFillColor(color, style.colorSpace());
</span><span class="cx">                 bool wasAntialiased = graphicsContext-&gt;shouldAntialias();
</span><span class="cx">                 graphicsContext-&gt;setShouldAntialias(antialias);
</span><del>-                drawBorderLineRect(*graphicsContext, LayoutRect(x1, y1, x2 - x1, y2 - y1), deviceScaleFactor);
</del><ins>+                graphicsContext-&gt;drawRect(pixelSnappedForPainting(x1, y1, x2 - x1, y2 - y1, deviceScaleFactor));
</ins><span class="cx">                 graphicsContext-&gt;setShouldAntialias(wasAntialiased);
</span><span class="cx">                 graphicsContext-&gt;setStrokeStyle(oldStrokeStyle);
</span><span class="cx">                 return;
</span><span class="lines">@@ -987,8 +970,7 @@
</span><span class="cx">             y1 = roundToDevicePixel(y1, deviceScaleFactor);
</span><span class="cx">             x2 = roundToDevicePixel(x2, deviceScaleFactor);
</span><span class="cx">             y2 = roundToDevicePixel(y2, deviceScaleFactor);
</span><del>-            if (x1 == x2 || y1 == y2)
-                return;
</del><ins>+
</ins><span class="cx">             FloatPoint quad[4];
</span><span class="cx">             switch (side) {
</span><span class="cx">                 case BSTop:
</span></span></pre>
</div>
</div>

</body>
</html>