Diff
Modified: branches/safari-600.5-branch/LayoutTests/ChangeLog (178902 => 178903)
--- branches/safari-600.5-branch/LayoutTests/ChangeLog 2015-01-22 09:31:49 UTC (rev 178902)
+++ branches/safari-600.5-branch/LayoutTests/ChangeLog 2015-01-22 09:31:59 UTC (rev 178903)
@@ -1,5 +1,54 @@
2015-01-22 Matthew Hanson <matthew_han...@apple.com>
+ Merge r172797. rdar://problem/19451324
+
+ 2014-08-20 Zalan Bujtas <za...@apple.com>
+
+ 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.
+
+2015-01-22 Matthew Hanson <matthew_han...@apple.com>
+
Merge r172504. rdar://problem/19451367
2014-08-12 Myles C. Maxfield <mmaxfi...@apple.com>
Modified: branches/safari-600.5-branch/LayoutTests/TestExpectations (178902 => 178903)
--- branches/safari-600.5-branch/LayoutTests/TestExpectations 2015-01-22 09:31:49 UTC (rev 178902)
+++ branches/safari-600.5-branch/LayoutTests/TestExpectations 2015-01-22 09:31:59 UTC (rev 178903)
@@ -137,3 +137,8 @@
fast/inline/hidpi-selection-gap-overlaps-inline-selection.html [ Skip ]
fast/multicol/mixed-opacity-fixed-test.html [ Skip ]
fast/inline/hidpi-selection-gap-overlaps-inline-selection.html [ Skip ]
+
+# 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 ]
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dashed-at-all-expected.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dashed-at-all-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dashed-at-all-expected.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that dashed borders are painted at all.</title>
+<style>
+ div {
+ position: absolute;
+ top: 0px;
+ width: 1px;
+ background-color: red;
+ }
+
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ for (var i = 1; i < 10; ++i) {
+ var e = document.createElement("div");
+ e.style.left = x + "px";
+ e.style.height = borderWidth + "px";
+ document.body.appendChild(e);
+
+ borderWidth += 1;
+ w = 10 * i;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dashed-at-all.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dashed-at-all.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dashed-at-all.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that dashed borders are painted at all.</title>
+<style>
+ .borderBox {
+ position: absolute;
+ top: 0px;
+ height: 10px;
+ border-top: dashed red;
+ }
+
+ .hide {
+ position: fixed;
+ top: 0px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ for (var i = 1; i < 10; ++i) {
+ w = 10 * i;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.borderTopWidth = borderWidth + "px";
+ document.body.appendChild(e);
+
+ var hideBox = document.createElement("div");
+ hideBox.className = "hide";
+ hideBox.style.left = x + 1 + "px";
+ hideBox.style.width = w - 1 + "px";
+ hideBox.style.height = borderWidth + "px";
+ document.body.appendChild(hideBox);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dashed-expected.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dashed-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dashed-expected.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>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).</title>
+<style>
+ .borderBox {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ border-style: dashed;
+ border-color: red;
+ }
+
+ .hide {
+ position: fixed;
+ width: 4px;
+ height: 4px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ var y = 0;
+ var cornerBoxSize = 0;
+ for (var i = 0; i < 10; ++i) {
+ w = 20 * i;
+ h = 20 * i;
+ cornerBoxSize = 2 * borderWidth;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.top = y + "px";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.style.borderWidth = borderWidth + "px";
+ e.style.borderRadius = borderWidth + 1 + "px";
+ document.body.appendChild(e);
+
+ var hb1 = document.createElement("div");
+ hb1.className = "hide";
+ hb1.style.top = y + "px";
+ hb1.style.left = x + "px";
+ hb1.style.width = cornerBoxSize + "px";
+ hb1.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb1);
+
+ var hb2 = document.createElement("div");
+ hb2.className = "hide";
+ hb2.style.top = y + "px";
+ hb2.style.left = x + w + "px";
+ hb2.style.width = cornerBoxSize + "px";
+ hb2.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb2);
+
+ var hb3 = document.createElement("div");
+ hb3.className = "hide";
+ hb3.style.top = y + h + "px";
+ hb3.style.left = x + "px";
+ hb3.style.width = cornerBoxSize + "px";
+ hb3.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb3);
+
+ var hb4 = document.createElement("div");
+ hb4.className = "hide";
+ hb4.style.top = y + w + "px";
+ hb4.style.left = x + h + "px";
+ hb4.style.width = cornerBoxSize + "px";
+ hb4.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb4);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dashed.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dashed.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dashed.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that dashed borders are painted.</title>
+<style>
+ .borderBox {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ border-style: dashed;
+ border-color: red;
+ }
+
+ .hide {
+ position: fixed;
+ width: 4px;
+ height: 4px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ var y = 0;
+ var cornerBoxSize = 0;
+ for (var i = 0; i < 10; ++i) {
+ w = 20 * i;
+ h = 20 * i;
+ cornerBoxSize = 2 * borderWidth;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.top = y + "px";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.style.borderWidth = borderWidth + "px";
+ document.body.appendChild(e);
+
+ var hb1 = document.createElement("div");
+ hb1.className = "hide";
+ hb1.style.top = y + "px";
+ hb1.style.left = x + "px";
+ hb1.style.width = cornerBoxSize + "px";
+ hb1.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb1);
+
+ var hb2 = document.createElement("div");
+ hb2.className = "hide";
+ hb2.style.top = y + "px";
+ hb2.style.left = x + w + "px";
+ hb2.style.width = cornerBoxSize + "px";
+ hb2.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb2);
+
+ var hb3 = document.createElement("div");
+ hb3.className = "hide";
+ hb3.style.top = y + h + "px";
+ hb3.style.left = x + "px";
+ hb3.style.width = cornerBoxSize + "px";
+ hb3.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb3);
+
+ var hb4 = document.createElement("div");
+ hb4.className = "hide";
+ hb4.style.top = y + w + "px";
+ hb4.style.left = x + h + "px";
+ hb4.style.width = cornerBoxSize + "px";
+ hb4.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb4);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dotted-at-all-expected.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dotted-at-all-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dotted-at-all-expected.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that dotted borders are painted at all.</title>
+<style>
+ div {
+ position: absolute;
+ top: 0px;
+ width: 1px;
+ background-color: red;
+ }
+
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ for (var i = 1; i < 10; ++i) {
+ var e = document.createElement("div");
+ e.style.left = x + "px";
+ e.style.height = borderWidth + "px";
+ document.body.appendChild(e);
+
+ borderWidth += 1;
+ w = 10 * i;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dotted-at-all.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dotted-at-all.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dotted-at-all.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that dashed borders are painted at all.</title>
+<style>
+ .borderBox {
+ position: absolute;
+ top: 0px;
+ height: 10px;
+ border-top: dotted red;
+ }
+
+ .hide {
+ position: fixed;
+ top: 0px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ for (var i = 1; i < 10; ++i) {
+ w = 10 * i;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.borderTopWidth = borderWidth + "px";
+ document.body.appendChild(e);
+
+ var hideBox = document.createElement("div");
+ hideBox.className = "hide";
+ hideBox.style.left = x + 1 + "px";
+ hideBox.style.width = w - 1 + "px";
+ hideBox.style.height = borderWidth + "px";
+ document.body.appendChild(hideBox);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dotted-expected.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dotted-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dotted-expected.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>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).</title>
+<style>
+ .borderBox {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ border-style: dotted;
+ border-color: red;
+ }
+
+ .hide {
+ position: fixed;
+ width: 4px;
+ height: 4px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ var y = 0;
+ var cornerBoxSize = 0;
+ for (var i = 0; i < 10; ++i) {
+ w = 20 * i;
+ h = 20 * i;
+ cornerBoxSize = 2 * borderWidth;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.top = y + "px";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.style.borderWidth = borderWidth + "px";
+ e.style.borderRadius = borderWidth + 1 + "px";
+ document.body.appendChild(e);
+
+ var hb1 = document.createElement("div");
+ hb1.className = "hide";
+ hb1.style.top = y + "px";
+ hb1.style.left = x + "px";
+ hb1.style.width = cornerBoxSize + "px";
+ hb1.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb1);
+
+ var hb2 = document.createElement("div");
+ hb2.className = "hide";
+ hb2.style.top = y + "px";
+ hb2.style.left = x + w + "px";
+ hb2.style.width = cornerBoxSize + "px";
+ hb2.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb2);
+
+ var hb3 = document.createElement("div");
+ hb3.className = "hide";
+ hb3.style.top = y + h + "px";
+ hb3.style.left = x + "px";
+ hb3.style.width = cornerBoxSize + "px";
+ hb3.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb3);
+
+ var hb4 = document.createElement("div");
+ hb4.className = "hide";
+ hb4.style.top = y + w + "px";
+ hb4.style.left = x + h + "px";
+ hb4.style.width = cornerBoxSize + "px";
+ hb4.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb4);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dotted.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dotted.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-dotted.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that dotted borders are painted.</title>
+<style>
+ .borderBox {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ border-style: dotted;
+ border-color: red;
+ }
+
+ .hide {
+ position: fixed;
+ width: 4px;
+ height: 4px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ var y = 0;
+ var cornerBoxSize = 0;
+ for (var i = 0; i < 10; ++i) {
+ w = 20 * i;
+ h = 20 * i;
+ cornerBoxSize = 2 * borderWidth;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.top = y + "px";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.style.borderWidth = borderWidth + "px";
+ document.body.appendChild(e);
+
+ var hb1 = document.createElement("div");
+ hb1.className = "hide";
+ hb1.style.top = y + "px";
+ hb1.style.left = x + "px";
+ hb1.style.width = cornerBoxSize + "px";
+ hb1.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb1);
+
+ var hb2 = document.createElement("div");
+ hb2.className = "hide";
+ hb2.style.top = y + "px";
+ hb2.style.left = x + w + "px";
+ hb2.style.width = cornerBoxSize + "px";
+ hb2.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb2);
+
+ var hb3 = document.createElement("div");
+ hb3.className = "hide";
+ hb3.style.top = y + h + "px";
+ hb3.style.left = x + "px";
+ hb3.style.width = cornerBoxSize + "px";
+ hb3.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb3);
+
+ var hb4 = document.createElement("div");
+ hb4.className = "hide";
+ hb4.style.top = y + w + "px";
+ hb4.style.left = x + h + "px";
+ hb4.style.width = cornerBoxSize + "px";
+ hb4.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb4);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-double-at-all-expected.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-double-at-all-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-double-at-all-expected.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that double borders are painted at all.</title>
+<style>
+ div {
+ position: absolute;
+ top: 0px;
+ height: 1px;
+ background-color: red;
+ }
+
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ for (var i = 1; i < 10; ++i) {
+ w = 10 * i;
+
+ var e = document.createElement("div");
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ document.body.appendChild(e);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-double-at-all.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-double-at-all.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-double-at-all.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that dashed borders are painted at all.</title>
+<style>
+ .borderBox {
+ position: absolute;
+ top: 0px;
+ height: 10px;
+ border-top: double red;
+ }
+
+ .hide {
+ position: fixed;
+ top: 0px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ for (var i = 1; i < 10; ++i) {
+ w = 10 * i;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.borderTopWidth = borderWidth + "px";
+ document.body.appendChild(e);
+
+ var hideBox = document.createElement("div");
+ hideBox.className = "hide";
+ hideBox.style.top = "1px";
+ hideBox.style.left = x + "px";
+ hideBox.style.width = w + "px";
+ hideBox.style.height = borderWidth + "px";
+ document.body.appendChild(hideBox);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-double-expected.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-double-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-double-expected.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>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).</title>
+<style>
+ .borderBox {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ border-style: double;
+ border-color: red;
+ }
+
+ .hide {
+ position: fixed;
+ width: 4px;
+ height: 4px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 3;
+ var x = 0;
+ var y = 0;
+ var cornerBoxSize = 0;
+ for (var i = 0; i < 10; ++i) {
+ w = 20 * i;
+ h = 20 * i;
+ cornerBoxSize = 2 * borderWidth;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.top = y + "px";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.style.borderWidth = borderWidth + "px";
+ e.style.borderRadius = borderWidth + 1 + "px";
+ document.body.appendChild(e);
+
+ var hb1 = document.createElement("div");
+ hb1.className = "hide";
+ hb1.style.top = y + "px";
+ hb1.style.left = x + "px";
+ hb1.style.width = cornerBoxSize + "px";
+ hb1.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb1);
+
+ var hb2 = document.createElement("div");
+ hb2.className = "hide";
+ hb2.style.top = y + "px";
+ hb2.style.left = x + w + "px";
+ hb2.style.width = cornerBoxSize + "px";
+ hb2.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb2);
+
+ var hb3 = document.createElement("div");
+ hb3.className = "hide";
+ hb3.style.top = y + h + "px";
+ hb3.style.left = x + "px";
+ hb3.style.width = cornerBoxSize + "px";
+ hb3.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb3);
+
+ var hb4 = document.createElement("div");
+ hb4.className = "hide";
+ hb4.style.top = y + w + "px";
+ hb4.style.left = x + h + "px";
+ hb4.style.width = cornerBoxSize + "px";
+ hb4.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb4);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
\ No newline at end of file
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-double.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-double.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-double.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that double borders are painted.</title>
+<style>
+ .borderBox {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ border-style: double;
+ border-color: red;
+ }
+
+ .hide {
+ position: fixed;
+ width: 4px;
+ height: 4px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 3;
+ var x = 0;
+ var y = 0;
+ var cornerBoxSize = 0;
+ for (var i = 0; i < 10; ++i) {
+ w = 20 * i;
+ h = 20 * i;
+ cornerBoxSize = 2 * borderWidth;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.top = y + "px";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.style.borderWidth = borderWidth + "px";
+ document.body.appendChild(e);
+
+ var hb1 = document.createElement("div");
+ hb1.className = "hide";
+ hb1.style.top = y + "px";
+ hb1.style.left = x + "px";
+ hb1.style.width = cornerBoxSize + "px";
+ hb1.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb1);
+
+ var hb2 = document.createElement("div");
+ hb2.className = "hide";
+ hb2.style.top = y + "px";
+ hb2.style.left = x + w + "px";
+ hb2.style.width = cornerBoxSize + "px";
+ hb2.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb2);
+
+ var hb3 = document.createElement("div");
+ hb3.className = "hide";
+ hb3.style.top = y + h + "px";
+ hb3.style.left = x + "px";
+ hb3.style.width = cornerBoxSize + "px";
+ hb3.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb3);
+
+ var hb4 = document.createElement("div");
+ hb4.className = "hide";
+ hb4.style.top = y + w + "px";
+ hb4.style.left = x + h + "px";
+ hb4.style.width = cornerBoxSize + "px";
+ hb4.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb4);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-groove-at-all-expected.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-groove-at-all-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-groove-at-all-expected.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that groove borders are painted at all.</title>
+<style>
+ div {
+ position: absolute;
+ background-color: red;
+ }
+
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ for (var i = 1; i < 10; ++i) {
+ w = 10 * i;
+
+ var e = document.createElement("div");
+ e.style.top = borderWidth / 2 + "px";
+ e.style.left = x + "px";
+ e.style.height = borderWidth / 2 + "px";
+ e.style.width = w + "px";
+ document.body.appendChild(e);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-groove-at-all.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-groove-at-all.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-groove-at-all.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that dashed borders are painted at all.</title>
+<style>
+ .borderBox {
+ position: absolute;
+ top: 0px;
+ height: 10px;
+ border-top: groove red;
+ }
+
+ .hide {
+ position: fixed;
+ top: 0px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ for (var i = 1; i < 10; ++i) {
+ w = 10 * i;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.borderTopWidth = borderWidth + "px";
+ document.body.appendChild(e);
+
+ var hideBox = document.createElement("div");
+ hideBox.className = "hide";
+ hideBox.style.left = x + "px";
+ hideBox.style.width = w + "px";
+ hideBox.style.height = borderWidth / 2 + "px";
+ document.body.appendChild(hideBox);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-inset-at-all-expected.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-inset-at-all-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-inset-at-all-expected.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that inset borders are painted at all.</title>
+<style>
+ div {
+ position: absolute;
+ top: 10px;
+ background-color: red;
+ }
+
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ for (var i = 1; i < 10; ++i) {
+ w = 10 * i;
+
+ var e = document.createElement("div");
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = borderWidth + "px";
+ document.body.appendChild(e);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-inset-at-all.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-inset-at-all.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-inset-at-all.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that dashed borders are painted at all.</title>
+<style>
+ .borderBox {
+ position: absolute;
+ top: 0px;
+ height: 10px;
+ border-bottom: inset red;
+ }
+
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ for (var i = 1; i < 10; ++i) {
+ w = 10 * i;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.borderBottomWidth = borderWidth + "px";
+ document.body.appendChild(e);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-inset-expected.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-inset-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-inset-expected.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>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).</title>
+<style>
+ .borderBox {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ border-style: inset;
+ border-color: red;
+ }
+
+ .hide {
+ position: fixed;
+ width: 4px;
+ height: 4px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ var y = 0;
+ var cornerBoxSize = 0;
+ for (var i = 0; i < 10; ++i) {
+ w = 20 * i;
+ h = 20 * i;
+ cornerBoxSize = 2 * borderWidth;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.top = y + "px";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.style.borderWidth = borderWidth + "px";
+ e.style.borderRadius = borderWidth + 1 + "px";
+ document.body.appendChild(e);
+
+ var hb1 = document.createElement("div");
+ hb1.className = "hide";
+ hb1.style.top = y + "px";
+ hb1.style.left = x + "px";
+ hb1.style.width = cornerBoxSize + "px";
+ hb1.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb1);
+
+ var hb2 = document.createElement("div");
+ hb2.className = "hide";
+ hb2.style.top = y + "px";
+ hb2.style.left = x + w + "px";
+ hb2.style.width = cornerBoxSize + "px";
+ hb2.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb2);
+
+ var hb3 = document.createElement("div");
+ hb3.className = "hide";
+ hb3.style.top = y + h + "px";
+ hb3.style.left = x + "px";
+ hb3.style.width = cornerBoxSize + "px";
+ hb3.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb3);
+
+ var hb4 = document.createElement("div");
+ hb4.className = "hide";
+ hb4.style.top = y + w + "px";
+ hb4.style.left = x + h + "px";
+ hb4.style.width = cornerBoxSize + "px";
+ hb4.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb4);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-inset.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-inset.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-inset.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that inset borders are painted.</title>
+<style>
+ .borderBox {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ border-style: inset;
+ border-color: red;
+ }
+
+ .hide {
+ position: fixed;
+ width: 4px;
+ height: 4px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ var y = 0;
+ var cornerBoxSize = 0;
+ for (var i = 0; i < 10; ++i) {
+ w = 20 * i;
+ h = 20 * i;
+ cornerBoxSize = 2 * borderWidth;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.top = y + "px";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.style.borderWidth = borderWidth + "px";
+ document.body.appendChild(e);
+
+ var hb1 = document.createElement("div");
+ hb1.className = "hide";
+ hb1.style.top = y + "px";
+ hb1.style.left = x + "px";
+ hb1.style.width = cornerBoxSize + "px";
+ hb1.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb1);
+
+ var hb2 = document.createElement("div");
+ hb2.className = "hide";
+ hb2.style.top = y + "px";
+ hb2.style.left = x + w + "px";
+ hb2.style.width = cornerBoxSize + "px";
+ hb2.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb2);
+
+ var hb3 = document.createElement("div");
+ hb3.className = "hide";
+ hb3.style.top = y + h + "px";
+ hb3.style.left = x + "px";
+ hb3.style.width = cornerBoxSize + "px";
+ hb3.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb3);
+
+ var hb4 = document.createElement("div");
+ hb4.className = "hide";
+ hb4.style.top = y + w + "px";
+ hb4.style.left = x + h + "px";
+ hb4.style.width = cornerBoxSize + "px";
+ hb4.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb4);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-outset-at-all-expected.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-outset-at-all-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-outset-at-all-expected.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that dashed borders are painted at all.</title>
+<style>
+ div {
+ position: absolute;
+ top: 0px;
+ width: 1px;
+ background-color: red;
+ }
+
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ for (var i = 1; i < 10; ++i) {
+ w = 10 * i;
+
+ var e = document.createElement("div");
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = borderWidth + "px";
+ document.body.appendChild(e);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-outset-at-all.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-outset-at-all.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-outset-at-all.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that dashed borders are painted at all.</title>
+<style>
+ .borderBox {
+ position: absolute;
+ top: 0px;
+ height: 10px;
+ border-top: outset red;
+ }
+
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ for (var i = 1; i < 10; ++i) {
+ w = 10 * i;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.borderTopWidth = borderWidth + "px";
+ document.body.appendChild(e);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-outset-expected.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-outset-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-outset-expected.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>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).</title>
+<style>
+ .borderBox {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ border-style: outset;
+ border-color: red;
+ }
+
+ .hide {
+ position: fixed;
+ width: 4px;
+ height: 4px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ var y = 0;
+ var cornerBoxSize = 0;
+ for (var i = 0; i < 10; ++i) {
+ var e = document.createElement("div");
+ w = 20 * i;
+ h = 20 * i;
+ cornerBoxSize = 2 * borderWidth;
+
+ e.className = "borderBox";
+ e.style.top = y + "px";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.style.borderWidth = borderWidth + "px";
+ e.style.borderRadius = borderWidth + 1 + "px";
+ document.body.appendChild(e);
+
+ var hb1 = document.createElement("div");
+ hb1.className = "hide";
+ hb1.style.top = y + "px";
+ hb1.style.left = x + "px";
+ hb1.style.width = cornerBoxSize + "px";
+ hb1.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb1);
+
+ var hb2 = document.createElement("div");
+ hb2.className = "hide";
+ hb2.style.top = y + "px";
+ hb2.style.left = x + w + "px";
+ hb2.style.width = cornerBoxSize + "px";
+ hb2.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb2);
+
+ var hb3 = document.createElement("div");
+ hb3.className = "hide";
+ hb3.style.top = y + h + "px";
+ hb3.style.left = x + "px";
+ hb3.style.width = cornerBoxSize + "px";
+ hb3.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb3);
+
+ var hb4 = document.createElement("div");
+ hb4.className = "hide";
+ hb4.style.top = y + w + "px";
+ hb4.style.left = x + h + "px";
+ hb4.style.width = cornerBoxSize + "px";
+ hb4.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb4);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-outset.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-outset.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-outset.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that outset borders are painted.</title>
+<style>
+ .borderBox {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ border-style: outset;
+ border-color: red;
+ }
+
+ .hide {
+ position: fixed;
+ width: 4px;
+ height: 4px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ var y = 0;
+ var cornerBoxSize = 0;
+ for (var i = 0; i < 10; ++i) {
+ var e = document.createElement("div");
+ w = 20 * i;
+ h = 20 * i;
+ cornerBoxSize = 2 * borderWidth;
+
+ e.className = "borderBox";
+ e.style.top = y + "px";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.style.borderWidth = borderWidth + "px";
+ document.body.appendChild(e);
+
+ var hb1 = document.createElement("div");
+ hb1.className = "hide";
+ hb1.style.top = y + "px";
+ hb1.style.left = x + "px";
+ hb1.style.width = cornerBoxSize + "px";
+ hb1.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb1);
+
+ var hb2 = document.createElement("div");
+ hb2.className = "hide";
+ hb2.style.top = y + "px";
+ hb2.style.left = x + w + "px";
+ hb2.style.width = cornerBoxSize + "px";
+ hb2.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb2);
+
+ var hb3 = document.createElement("div");
+ hb3.className = "hide";
+ hb3.style.top = y + h + "px";
+ hb3.style.left = x + "px";
+ hb3.style.width = cornerBoxSize + "px";
+ hb3.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb3);
+
+ var hb4 = document.createElement("div");
+ hb4.className = "hide";
+ hb4.style.top = y + w + "px";
+ hb4.style.left = x + h + "px";
+ hb4.style.width = cornerBoxSize + "px";
+ hb4.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb4);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-ridge-at-all-expected.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-ridge-at-all-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-ridge-at-all-expected.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that dashed borders are painted at all.</title>
+<style>
+ div {
+ position: absolute;
+ top: 0px;
+ background-color: red;
+ }
+
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ for (var i = 1; i < 10; ++i) {
+ w = 10 * i;
+
+ var e = document.createElement("div");
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = borderWidth / 2 + "px";
+ document.body.appendChild(e);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-ridge-at-all.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-ridge-at-all.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-ridge-at-all.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that dashed borders are painted at all.</title>
+<style>
+ .borderBox {
+ position: absolute;
+ top: 0px;
+ height: 10px;
+ border-top: ridge red;
+ }
+
+ .hide {
+ position: fixed;
+ top: 0px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ for (var i = 1; i < 10; ++i) {
+ w = 10 * i;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.borderTopWidth = borderWidth + "px";
+ document.body.appendChild(e);
+
+ var hideBox = document.createElement("div");
+ hideBox.className = "hide";
+ hideBox.style.top = borderWidth / 2 + "px";
+ hideBox.style.left = x + "px";
+ hideBox.style.width = w + "px";
+ hideBox.style.height = borderWidth / 2 + "px";
+ document.body.appendChild(hideBox);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-solid-at-all-expected.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-solid-at-all-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-solid-at-all-expected.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that dashed borders are painted at all.</title>
+<style>
+ div {
+ position: absolute;
+ top: 0px;
+ background-color: red;
+ }
+
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ for (var i = 1; i < 10; ++i) {
+ w = 10 * i;
+
+ var e = document.createElement("div");
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = borderWidth + "px";
+ document.body.appendChild(e);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-solid-at-all.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-solid-at-all.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-solid-at-all.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that dashed borders are painted at all.</title>
+<style>
+ .borderBox {
+ position: absolute;
+ top: 0px;
+ height: 10px;
+ border-top: solid red;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ for (var i = 1; i < 10; ++i) {
+ w = 10 * i;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.borderTopWidth = borderWidth + "px";
+ document.body.appendChild(e);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-solid-expected.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-solid-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-solid-expected.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>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).</title>
+<style>
+ .borderBox {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ border-style: solid;
+ border-color: red;
+ }
+
+ .hide {
+ position: fixed;
+ width: 4px;
+ height: 4px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ var y = 0;
+ var cornerBoxSize = 0;
+ for (var i = 0; i < 10; ++i) {
+ w = 20 * i;
+ h = 20 * i;
+ cornerBoxSize = 2 * borderWidth;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.top = y + "px";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.style.borderWidth = borderWidth + "px";
+ e.style.borderRadius = borderWidth + 1 + "px";
+ document.body.appendChild(e);
+
+ var hb1 = document.createElement("div");
+ hb1.className = "hide";
+ hb1.style.top = y + "px";
+ hb1.style.left = x + "px";
+ hb1.style.width = cornerBoxSize + "px";
+ hb1.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb1);
+
+ var hb2 = document.createElement("div");
+ hb2.className = "hide";
+ hb2.style.top = y + "px";
+ hb2.style.left = x + w + "px";
+ hb2.style.width = cornerBoxSize + "px";
+ hb2.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb2);
+
+ var hb3 = document.createElement("div");
+ hb3.className = "hide";
+ hb3.style.top = y + h + "px";
+ hb3.style.left = x + "px";
+ hb3.style.width = cornerBoxSize + "px";
+ hb3.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb3);
+
+ var hb4 = document.createElement("div");
+ hb4.className = "hide";
+ hb4.style.top = y + w + "px";
+ hb4.style.left = x + h + "px";
+ hb4.style.width = cornerBoxSize + "px";
+ hb4.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb4);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-solid.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-solid.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/border-painting-solid.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that solid borders are painted.</title>
+<style>
+ .borderBox {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ border-style: solid;
+ border-color: red;
+ }
+
+ .hide {
+ position: fixed;
+ width: 4px;
+ height: 4px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ var y = 0;
+ var cornerBoxSize = 0;
+ for (var i = 0; i < 10; ++i) {
+ w = 20 * i;
+ h = 20 * i;
+ cornerBoxSize = 2 * borderWidth;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.top = y + "px";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.style.borderWidth = borderWidth + "px";
+ document.body.appendChild(e);
+
+ var hb1 = document.createElement("div");
+ hb1.className = "hide";
+ hb1.style.top = y + "px";
+ hb1.style.left = x + "px";
+ hb1.style.width = cornerBoxSize + "px";
+ hb1.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb1);
+
+ var hb2 = document.createElement("div");
+ hb2.className = "hide";
+ hb2.style.top = y + "px";
+ hb2.style.left = x + w + "px";
+ hb2.style.width = cornerBoxSize + "px";
+ hb2.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb2);
+
+ var hb3 = document.createElement("div");
+ hb3.className = "hide";
+ hb3.style.top = y + h + "px";
+ hb3.style.left = x + "px";
+ hb3.style.width = cornerBoxSize + "px";
+ hb3.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb3);
+
+ var hb4 = document.createElement("div");
+ hb4.className = "hide";
+ hb4.style.top = y + w + "px";
+ hb4.style.left = x + h + "px";
+ hb4.style.width = cornerBoxSize + "px";
+ hb4.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb4);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/hidpi-border-painting-groove-expected.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/hidpi-border-painting-groove-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/hidpi-border-painting-groove-expected.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>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).</title>
+<style>
+ .borderBox {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ border-style: groove;
+ border-color: red;
+ }
+
+ .hide {
+ position: fixed;
+ width: 4px;
+ height: 4px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ var y = 0;
+ var cornerBoxSize = 0;
+ for (var i = 0; i < 10; ++i) {
+ w = 20 * i;
+ h = 20 * i;
+ cornerBoxSize = 2 * borderWidth;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.top = y + "px";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.style.borderWidth = borderWidth + "px";
+ e.style.borderRadius = borderWidth + 1 + "px";
+ document.body.appendChild(e);
+
+ var hb1 = document.createElement("div");
+ hb1.className = "hide";
+ hb1.style.top = y + "px";
+ hb1.style.left = x + "px";
+ hb1.style.width = cornerBoxSize + "px";
+ hb1.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb1);
+
+ var hb2 = document.createElement("div");
+ hb2.className = "hide";
+ hb2.style.top = y + "px";
+ hb2.style.left = x + w + "px";
+ hb2.style.width = cornerBoxSize + "px";
+ hb2.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb2);
+
+ var hb3 = document.createElement("div");
+ hb3.className = "hide";
+ hb3.style.top = y + h + "px";
+ hb3.style.left = x + "px";
+ hb3.style.width = cornerBoxSize + "px";
+ hb3.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb3);
+
+ var hb4 = document.createElement("div");
+ hb4.className = "hide";
+ hb4.style.top = y + w + "px";
+ hb4.style.left = x + h + "px";
+ hb4.style.width = cornerBoxSize + "px";
+ hb4.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb4);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/hidpi-border-painting-groove.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/hidpi-border-painting-groove.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/hidpi-border-painting-groove.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that groove borders are painted.</title>
+<style>
+ .borderBox {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ border-style: groove;
+ border-color: red;
+ }
+
+ .hide {
+ position: fixed;
+ width: 4px;
+ height: 4px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ var y = 0;
+ var cornerBoxSize = 0;
+ for (var i = 0; i < 10; ++i) {
+ w = 20 * i;
+ h = 20 * i;
+ cornerBoxSize = 2 * borderWidth;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.top = y + "px";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.style.borderWidth = borderWidth + "px";
+ document.body.appendChild(e);
+
+ var hb1 = document.createElement("div");
+ hb1.className = "hide";
+ hb1.style.top = y + "px";
+ hb1.style.left = x + "px";
+ hb1.style.width = cornerBoxSize + "px";
+ hb1.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb1);
+
+ var hb2 = document.createElement("div");
+ hb2.className = "hide";
+ hb2.style.top = y + "px";
+ hb2.style.left = x + w + "px";
+ hb2.style.width = cornerBoxSize + "px";
+ hb2.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb2);
+
+ var hb3 = document.createElement("div");
+ hb3.className = "hide";
+ hb3.style.top = y + h + "px";
+ hb3.style.left = x + "px";
+ hb3.style.width = cornerBoxSize + "px";
+ hb3.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb3);
+
+ var hb4 = document.createElement("div");
+ hb4.className = "hide";
+ hb4.style.top = y + w + "px";
+ hb4.style.left = x + h + "px";
+ hb4.style.width = cornerBoxSize + "px";
+ hb4.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb4);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/hidpi-border-painting-ridge-expected.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/hidpi-border-painting-ridge-expected.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/hidpi-border-painting-ridge-expected.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>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).</title>
+<style>
+ .borderBox {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ border-style: ridge;
+ border-color: red;
+ }
+
+ .hide {
+ position: fixed;
+ width: 4px;
+ height: 4px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ var y = 0;
+ var cornerBoxSize = 0;
+ for (var i = 0; i < 10; ++i) {
+ w = 20 * i;
+ h = 20 * i;
+ cornerBoxSize = 2 * borderWidth;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.top = y + "px";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.style.borderWidth = borderWidth + "px";
+ e.style.borderRadius = borderWidth + 1 + "px";
+ document.body.appendChild(e);
+
+ var hb1 = document.createElement("div");
+ hb1.className = "hide";
+ hb1.style.top = y + "px";
+ hb1.style.left = x + "px";
+ hb1.style.width = cornerBoxSize + "px";
+ hb1.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb1);
+
+ var hb2 = document.createElement("div");
+ hb2.className = "hide";
+ hb2.style.top = y + "px";
+ hb2.style.left = x + w + "px";
+ hb2.style.width = cornerBoxSize + "px";
+ hb2.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb2);
+
+ var hb3 = document.createElement("div");
+ hb3.className = "hide";
+ hb3.style.top = y + h + "px";
+ hb3.style.left = x + "px";
+ hb3.style.width = cornerBoxSize + "px";
+ hb3.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb3);
+
+ var hb4 = document.createElement("div");
+ hb4.className = "hide";
+ hb4.style.top = y + w + "px";
+ hb4.style.left = x + h + "px";
+ hb4.style.width = cornerBoxSize + "px";
+ hb4.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb4);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Added: branches/safari-600.5-branch/LayoutTests/fast/borders/hidpi-border-painting-ridge.html (0 => 178903)
--- branches/safari-600.5-branch/LayoutTests/fast/borders/hidpi-border-painting-ridge.html (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/fast/borders/hidpi-border-painting-ridge.html 2015-01-22 09:31:59 UTC (rev 178903)
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test that ridge borders are painted.</title>
+<style>
+ .borderBox {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ border-style: ridge;
+ border-color: red;
+ }
+
+ .hide {
+ position: fixed;
+ width: 4px;
+ height: 4px;
+ background-color: white;
+ }
+</style>
+<head>
+<body>
+<script>
+ var borderWidth = 1;
+ var x = 0;
+ var y = 0;
+ var cornerBoxSize = 0;
+ for (var i = 0; i < 10; ++i) {
+ w = 20 * i;
+ h = 20 * i;
+ cornerBoxSize = 2 * borderWidth;
+
+ var e = document.createElement("div");
+ e.className = "borderBox";
+ e.style.top = y + "px";
+ e.style.left = x + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.style.borderWidth = borderWidth + "px";
+ document.body.appendChild(e);
+
+ var hb1 = document.createElement("div");
+ hb1.className = "hide";
+ hb1.style.top = y + "px";
+ hb1.style.left = x + "px";
+ hb1.style.width = cornerBoxSize + "px";
+ hb1.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb1);
+
+ var hb2 = document.createElement("div");
+ hb2.className = "hide";
+ hb2.style.top = y + "px";
+ hb2.style.left = x + w + "px";
+ hb2.style.width = cornerBoxSize + "px";
+ hb2.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb2);
+
+ var hb3 = document.createElement("div");
+ hb3.className = "hide";
+ hb3.style.top = y + h + "px";
+ hb3.style.left = x + "px";
+ hb3.style.width = cornerBoxSize + "px";
+ hb3.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb3);
+
+ var hb4 = document.createElement("div");
+ hb4.className = "hide";
+ hb4.style.top = y + w + "px";
+ hb4.style.left = x + h + "px";
+ hb4.style.width = cornerBoxSize + "px";
+ hb4.style.height = cornerBoxSize + "px";
+ document.body.appendChild(hb4);
+
+ borderWidth += 1;
+ x += (w + 2 * borderWidth);
+ }
+</script>
+</body>
+</html>
Modified: branches/safari-600.5-branch/Source/WebCore/ChangeLog (178902 => 178903)
--- branches/safari-600.5-branch/Source/WebCore/ChangeLog 2015-01-22 09:31:49 UTC (rev 178902)
+++ branches/safari-600.5-branch/Source/WebCore/ChangeLog 2015-01-22 09:31:59 UTC (rev 178903)
@@ -1,5 +1,41 @@
2015-01-22 Matthew Hanson <matthew_han...@apple.com>
+ Merge r172797. rdar://problem/19451324
+
+ 2014-08-20 Zalan Bujtas <za...@apple.com>
+
+ 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.
+
+2015-01-22 Matthew Hanson <matthew_han...@apple.com>
+
Merge r172504. rdar://problem/19451367
2014-08-12 Myles C. Maxfield <mmaxfi...@apple.com>
Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderObject.cpp (178902 => 178903)
--- branches/safari-600.5-branch/Source/WebCore/rendering/RenderObject.cpp 2015-01-22 09:31:49 UTC (rev 178902)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/RenderObject.cpp 2015-01-22 09:31:59 UTC (rev 178903)
@@ -737,23 +737,6 @@
return toRenderBlock(o);
}
-static void drawBorderLineRect(GraphicsContext& graphicsContext, const LayoutRect& rect, float deviceScaleFactor)
-{
- FloatRect pixelSnappedRect = pixelSnappedForPainting(rect, deviceScaleFactor);
- if (pixelSnappedRect.isEmpty())
- return;
- graphicsContext.drawRect(pixelSnappedRect);
-}
-
-static void drawBorderLine(GraphicsContext& graphicsContext, const LayoutPoint& point1, const LayoutPoint& 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);
-}
-
void RenderObject::drawLineForBoxSide(GraphicsContext* graphicsContext, float x1, float y1, float x2, float y2,
BoxSide side, Color color, EBorderStyle borderStyle, float adjacentWidth1, float adjacentWidth2, bool antialias) const
{
@@ -797,11 +780,11 @@
switch (side) {
case BSBottom:
case BSTop:
- drawBorderLine(*graphicsContext, LayoutPoint(x1, adjustedY), LayoutPoint(x2, adjustedY), deviceScaleFactor);
+ graphicsContext->drawLine(FloatPoint(x1, adjustedY), FloatPoint(x2, adjustedY));
break;
case BSRight:
case BSLeft:
- drawBorderLine(*graphicsContext, LayoutPoint(adjustedX, y1), LayoutPoint(adjustedX, y2), deviceScaleFactor);
+ graphicsContext->drawLine(FloatPoint(adjustedX, y1), FloatPoint(adjustedX, y2));
break;
}
graphicsContext->setShouldAntialias(wasAntialiased);
@@ -824,13 +807,13 @@
switch (side) {
case BSTop:
case BSBottom:
- drawBorderLineRect(*graphicsContext, LayoutRect(x1, y1, length, thirdOfThickness), deviceScaleFactor);
- drawBorderLineRect(*graphicsContext, LayoutRect(x1, y2 - thirdOfThickness, length, thirdOfThickness), deviceScaleFactor);
+ graphicsContext->drawRect(pixelSnappedForPainting(x1, y1, length, thirdOfThickness, deviceScaleFactor));
+ graphicsContext->drawRect(pixelSnappedForPainting(x1, y2 - thirdOfThickness, length, thirdOfThickness, deviceScaleFactor));
break;
case BSLeft:
case BSRight:
- drawBorderLineRect(*graphicsContext, LayoutRect(x1, y1, thirdOfThickness, length), deviceScaleFactor);
- drawBorderLineRect(*graphicsContext, LayoutRect(x2 - thirdOfThickness, y1, thirdOfThickness, length), deviceScaleFactor);
+ graphicsContext->drawRect(pixelSnappedForPainting(x1, y1, thirdOfThickness, length, deviceScaleFactor));
+ graphicsContext->drawRect(pixelSnappedForPainting(x2 - thirdOfThickness, y1, thirdOfThickness, length, deviceScaleFactor));
break;
}
@@ -976,7 +959,7 @@
graphicsContext->setFillColor(color, style.colorSpace());
bool wasAntialiased = graphicsContext->shouldAntialias();
graphicsContext->setShouldAntialias(antialias);
- drawBorderLineRect(*graphicsContext, LayoutRect(x1, y1, x2 - x1, y2 - y1), deviceScaleFactor);
+ graphicsContext->drawRect(pixelSnappedForPainting(x1, y1, x2 - x1, y2 - y1, deviceScaleFactor));
graphicsContext->setShouldAntialias(wasAntialiased);
graphicsContext->setStrokeStyle(oldStrokeStyle);
return;
@@ -987,8 +970,7 @@
y1 = roundToDevicePixel(y1, deviceScaleFactor);
x2 = roundToDevicePixel(x2, deviceScaleFactor);
y2 = roundToDevicePixel(y2, deviceScaleFactor);
- if (x1 == x2 || y1 == y2)
- return;
+
FloatPoint quad[4];
switch (side) {
case BSTop: