Skip to content
Permalink
Browse files
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.


Canonical link: https://commits.webkit.org/153939@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
alanbujtas committed Aug 20, 2014
1 parent b8e7f08 commit 4f3f30ffda64ba499dc955738f0e4152e750d354
Showing with 1,950 additions and 26 deletions.
  1. +45 −0 LayoutTests/ChangeLog
  2. +5 −0 LayoutTests/TestExpectations
  3. +31 −0 LayoutTests/fast/borders/border-painting-dashed-at-all-expected.html
  4. +46 −0 LayoutTests/fast/borders/border-painting-dashed-at-all.html
  5. +80 −0 LayoutTests/fast/borders/border-painting-dashed-expected.html
  6. +79 −0 LayoutTests/fast/borders/border-painting-dashed.html
  7. +31 −0 LayoutTests/fast/borders/border-painting-dotted-at-all-expected.html
  8. +46 −0 LayoutTests/fast/borders/border-painting-dotted-at-all.html
  9. +80 −0 LayoutTests/fast/borders/border-painting-dotted-expected.html
  10. +79 −0 LayoutTests/fast/borders/border-painting-dotted.html
  11. +32 −0 LayoutTests/fast/borders/border-painting-double-at-all-expected.html
  12. +47 −0 LayoutTests/fast/borders/border-painting-double-at-all.html
  13. +80 −0 LayoutTests/fast/borders/border-painting-double-expected.html
  14. +79 −0 LayoutTests/fast/borders/border-painting-double.html
  15. +32 −0 LayoutTests/fast/borders/border-painting-groove-at-all-expected.html
  16. +46 −0 LayoutTests/fast/borders/border-painting-groove-at-all.html
  17. +32 −0 LayoutTests/fast/borders/border-painting-inset-at-all-expected.html
  18. +34 −0 LayoutTests/fast/borders/border-painting-inset-at-all.html
  19. +80 −0 LayoutTests/fast/borders/border-painting-inset-expected.html
  20. +79 −0 LayoutTests/fast/borders/border-painting-inset.html
  21. +33 −0 LayoutTests/fast/borders/border-painting-outset-at-all-expected.html
  22. +34 −0 LayoutTests/fast/borders/border-painting-outset-at-all.html
  23. +80 −0 LayoutTests/fast/borders/border-painting-outset-expected.html
  24. +79 −0 LayoutTests/fast/borders/border-painting-outset.html
  25. +32 −0 LayoutTests/fast/borders/border-painting-ridge-at-all-expected.html
  26. +47 −0 LayoutTests/fast/borders/border-painting-ridge-at-all.html
  27. +32 −0 LayoutTests/fast/borders/border-painting-solid-at-all-expected.html
  28. +33 −0 LayoutTests/fast/borders/border-painting-solid-at-all.html
  29. +80 −0 LayoutTests/fast/borders/border-painting-solid-expected.html
  30. +79 −0 LayoutTests/fast/borders/border-painting-solid.html
  31. +80 −0 LayoutTests/fast/borders/hidpi-border-painting-groove-expected.html
  32. +79 −0 LayoutTests/fast/borders/hidpi-border-painting-groove.html
  33. +80 −0 LayoutTests/fast/borders/hidpi-border-painting-ridge-expected.html
  34. +79 −0 LayoutTests/fast/borders/hidpi-border-painting-ridge.html
  35. +32 −0 Source/WebCore/ChangeLog
  36. +8 −26 Source/WebCore/rendering/RenderObject.cpp
@@ -1,3 +1,48 @@
2014-08-20 Zalan Bujtas <zalan@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.

2014-08-19 Jinwoo Song <jinwoo7.song@samsung.com>

Ignore usemap attributes without '#' in img element
@@ -164,3 +164,8 @@ webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-016.html [ ImageOnly
webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-017.html [ ImageOnlyFailure ]
webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-018.html [ ImageOnlyFailure ]
webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-019.html [ ImageOnlyFailure ]

# 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 ]
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>

0 comments on commit 4f3f30f

Please sign in to comment.