Added: trunk/LayoutTests/platform/mac/fast/borders/border-antialiasing-expected.txt (0 => 87387)
--- trunk/LayoutTests/platform/mac/fast/borders/border-antialiasing-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/borders/border-antialiasing-expected.txt 2011-05-26 15:34:48 UTC (rev 87387)
@@ -0,0 +1,226 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x461
+ RenderBlock {HTML} at (0,0) size 800x461
+ RenderBody {BODY} at (8,20) size 784x431
+layer at (18,20) size 764x431
+ RenderBlock {DIV} at (10,0) size 764x431
+ RenderTable {TABLE} at (20,0) size 131x53 [border: none]
+ RenderTableSection {TBODY} at (0,0) size 130x52
+ RenderTableRow {TR} at (0,0) size 130x13
+ RenderTableCell {TD} at (0,5) size 13x3 [border: (1px solid #000000)] [r=0 c=0 rs=1 cs=1]
+ RenderTableCell {TD} at (13,5) size 13x3 [border: (1px solid #000000)] [r=0 c=1 rs=1 cs=1]
+ RenderTableCell {TD} at (26,5) size 13x3 [border: (1px solid #000000)] [r=0 c=2 rs=1 cs=1]
+ RenderTableCell {TD} at (39,5) size 13x3 [border: (1px solid #000000)] [r=0 c=3 rs=1 cs=1]
+ RenderTableCell {TD} at (52,5) size 13x3 [border: (1px solid #000000)] [r=0 c=4 rs=1 cs=1]
+ RenderTableCell {TD} at (65,5) size 13x3 [border: (1px solid #000000)] [r=0 c=5 rs=1 cs=1]
+ RenderTableCell {TD} at (78,5) size 13x3 [border: (1px solid #000000)] [r=0 c=6 rs=1 cs=1]
+ RenderTableCell {TD} at (91,5) size 13x3 [border: (1px solid #000000)] [r=0 c=7 rs=1 cs=1]
+ RenderTableCell {TD} at (104,5) size 13x3 [border: (1px solid #000000)] [r=0 c=8 rs=1 cs=1]
+ RenderTableCell {TD} at (117,5) size 13x3 [border: (1px solid #000000)] [r=0 c=9 rs=1 cs=1]
+ RenderTableRow {TR} at (0,13) size 130x13
+ RenderTableCell {TD} at (0,18) size 13x3 [border: (1px solid #000000)] [r=1 c=0 rs=1 cs=1]
+ RenderTableCell {TD} at (13,18) size 13x3 [border: (1px solid #000000)] [r=1 c=1 rs=1 cs=1]
+ RenderTableCell {TD} at (26,18) size 13x3 [border: (1px solid #000000)] [r=1 c=2 rs=1 cs=1]
+ RenderTableCell {TD} at (39,18) size 13x3 [border: (1px solid #000000)] [r=1 c=3 rs=1 cs=1]
+ RenderTableCell {TD} at (52,18) size 13x3 [border: (1px solid #000000)] [r=1 c=4 rs=1 cs=1]
+ RenderTableCell {TD} at (65,18) size 13x3 [border: (1px solid #000000)] [r=1 c=5 rs=1 cs=1]
+ RenderTableCell {TD} at (78,18) size 13x3 [border: (1px solid #000000)] [r=1 c=6 rs=1 cs=1]
+ RenderTableCell {TD} at (91,18) size 13x3 [border: (1px solid #000000)] [r=1 c=7 rs=1 cs=1]
+ RenderTableCell {TD} at (104,18) size 13x3 [border: (1px solid #000000)] [r=1 c=8 rs=1 cs=1]
+ RenderTableCell {TD} at (117,18) size 13x3 [border: (1px solid #000000)] [r=1 c=9 rs=1 cs=1]
+ RenderTableRow {TR} at (0,26) size 130x13
+ RenderTableCell {TD} at (0,31) size 13x3 [border: (1px solid #000000)] [r=2 c=0 rs=1 cs=1]
+ RenderTableCell {TD} at (13,31) size 13x3 [border: (1px solid #000000)] [r=2 c=1 rs=1 cs=1]
+ RenderTableCell {TD} at (26,31) size 13x3 [border: (1px solid #000000)] [r=2 c=2 rs=1 cs=1]
+ RenderTableCell {TD} at (39,31) size 13x3 [border: (1px solid #000000)] [r=2 c=3 rs=1 cs=1]
+ RenderTableCell {TD} at (52,31) size 13x3 [border: (1px solid #000000)] [r=2 c=4 rs=1 cs=1]
+ RenderTableCell {TD} at (65,31) size 13x3 [border: (1px solid #000000)] [r=2 c=5 rs=1 cs=1]
+ RenderTableCell {TD} at (78,31) size 13x3 [border: (1px solid #000000)] [r=2 c=6 rs=1 cs=1]
+ RenderTableCell {TD} at (91,31) size 13x3 [border: (1px solid #000000)] [r=2 c=7 rs=1 cs=1]
+ RenderTableCell {TD} at (104,31) size 13x3 [border: (1px solid #000000)] [r=2 c=8 rs=1 cs=1]
+ RenderTableCell {TD} at (117,31) size 13x3 [border: (1px solid #000000)] [r=2 c=9 rs=1 cs=1]
+ RenderTableRow {TR} at (0,39) size 130x13
+ RenderTableCell {TD} at (0,44) size 13x3 [border: (1px solid #000000)] [r=3 c=0 rs=1 cs=1]
+ RenderTableCell {TD} at (13,44) size 13x3 [border: (1px solid #000000)] [r=3 c=1 rs=1 cs=1]
+ RenderTableCell {TD} at (26,44) size 13x3 [border: (1px solid #000000)] [r=3 c=2 rs=1 cs=1]
+ RenderTableCell {TD} at (39,44) size 13x3 [border: (1px solid #000000)] [r=3 c=3 rs=1 cs=1]
+ RenderTableCell {TD} at (52,44) size 13x3 [border: (1px solid #000000)] [r=3 c=4 rs=1 cs=1]
+ RenderTableCell {TD} at (65,44) size 13x3 [border: (1px solid #000000)] [r=3 c=5 rs=1 cs=1]
+ RenderTableCell {TD} at (78,44) size 13x3 [border: (1px solid #000000)] [r=3 c=6 rs=1 cs=1]
+ RenderTableCell {TD} at (91,44) size 13x3 [border: (1px solid #000000)] [r=3 c=7 rs=1 cs=1]
+ RenderTableCell {TD} at (104,44) size 13x3 [border: (1px solid #000000)] [r=3 c=8 rs=1 cs=1]
+ RenderTableCell {TD} at (117,44) size 13x3 [border: (1px solid #000000)] [r=3 c=9 rs=1 cs=1]
+ RenderTable {TABLE} at (20,73) size 162x66
+ RenderTableSection {TBODY} at (0,0) size 162x66
+ RenderTableRow {TR} at (0,2) size 162x14
+ RenderTableCell {TD} at (2,7) size 14x4 [border: (1px solid #000000)] [r=0 c=0 rs=1 cs=1]
+ RenderTableCell {TD} at (18,7) size 14x4 [border: (1px solid #000000)] [r=0 c=1 rs=1 cs=1]
+ RenderTableCell {TD} at (34,7) size 14x4 [border: (1px solid #000000)] [r=0 c=2 rs=1 cs=1]
+ RenderTableCell {TD} at (50,7) size 14x4 [border: (1px solid #000000)] [r=0 c=3 rs=1 cs=1]
+ RenderTableCell {TD} at (66,7) size 14x4 [border: (1px solid #000000)] [r=0 c=4 rs=1 cs=1]
+ RenderTableCell {TD} at (82,7) size 14x4 [border: (1px solid #000000)] [r=0 c=5 rs=1 cs=1]
+ RenderTableCell {TD} at (98,7) size 14x4 [border: (1px solid #000000)] [r=0 c=6 rs=1 cs=1]
+ RenderTableCell {TD} at (114,7) size 14x4 [border: (1px solid #000000)] [r=0 c=7 rs=1 cs=1]
+ RenderTableCell {TD} at (130,7) size 14x4 [border: (1px solid #000000)] [r=0 c=8 rs=1 cs=1]
+ RenderTableCell {TD} at (146,7) size 14x4 [border: (1px solid #000000)] [r=0 c=9 rs=1 cs=1]
+ RenderTableRow {TR} at (0,18) size 162x14
+ RenderTableCell {TD} at (2,23) size 14x4 [border: (1px solid #000000)] [r=1 c=0 rs=1 cs=1]
+ RenderTableCell {TD} at (18,23) size 14x4 [border: (1px solid #000000)] [r=1 c=1 rs=1 cs=1]
+ RenderTableCell {TD} at (34,23) size 14x4 [border: (1px solid #000000)] [r=1 c=2 rs=1 cs=1]
+ RenderTableCell {TD} at (50,23) size 14x4 [border: (1px solid #000000)] [r=1 c=3 rs=1 cs=1]
+ RenderTableCell {TD} at (66,23) size 14x4 [border: (1px solid #000000)] [r=1 c=4 rs=1 cs=1]
+ RenderTableCell {TD} at (82,23) size 14x4 [border: (1px solid #000000)] [r=1 c=5 rs=1 cs=1]
+ RenderTableCell {TD} at (98,23) size 14x4 [border: (1px solid #000000)] [r=1 c=6 rs=1 cs=1]
+ RenderTableCell {TD} at (114,23) size 14x4 [border: (1px solid #000000)] [r=1 c=7 rs=1 cs=1]
+ RenderTableCell {TD} at (130,23) size 14x4 [border: (1px solid #000000)] [r=1 c=8 rs=1 cs=1]
+ RenderTableCell {TD} at (146,23) size 14x4 [border: (1px solid #000000)] [r=1 c=9 rs=1 cs=1]
+ RenderTableRow {TR} at (0,34) size 162x14
+ RenderTableCell {TD} at (2,39) size 14x4 [border: (1px solid #000000)] [r=2 c=0 rs=1 cs=1]
+ RenderTableCell {TD} at (18,39) size 14x4 [border: (1px solid #000000)] [r=2 c=1 rs=1 cs=1]
+ RenderTableCell {TD} at (34,39) size 14x4 [border: (1px solid #000000)] [r=2 c=2 rs=1 cs=1]
+ RenderTableCell {TD} at (50,39) size 14x4 [border: (1px solid #000000)] [r=2 c=3 rs=1 cs=1]
+ RenderTableCell {TD} at (66,39) size 14x4 [border: (1px solid #000000)] [r=2 c=4 rs=1 cs=1]
+ RenderTableCell {TD} at (82,39) size 14x4 [border: (1px solid #000000)] [r=2 c=5 rs=1 cs=1]
+ RenderTableCell {TD} at (98,39) size 14x4 [border: (1px solid #000000)] [r=2 c=6 rs=1 cs=1]
+ RenderTableCell {TD} at (114,39) size 14x4 [border: (1px solid #000000)] [r=2 c=7 rs=1 cs=1]
+ RenderTableCell {TD} at (130,39) size 14x4 [border: (1px solid #000000)] [r=2 c=8 rs=1 cs=1]
+ RenderTableCell {TD} at (146,39) size 14x4 [border: (1px solid #000000)] [r=2 c=9 rs=1 cs=1]
+ RenderTableRow {TR} at (0,50) size 162x14
+ RenderTableCell {TD} at (2,55) size 14x4 [border: (1px solid #000000)] [r=3 c=0 rs=1 cs=1]
+ RenderTableCell {TD} at (18,55) size 14x4 [border: (1px solid #000000)] [r=3 c=1 rs=1 cs=1]
+ RenderTableCell {TD} at (34,55) size 14x4 [border: (1px solid #000000)] [r=3 c=2 rs=1 cs=1]
+ RenderTableCell {TD} at (50,55) size 14x4 [border: (1px solid #000000)] [r=3 c=3 rs=1 cs=1]
+ RenderTableCell {TD} at (66,55) size 14x4 [border: (1px solid #000000)] [r=3 c=4 rs=1 cs=1]
+ RenderTableCell {TD} at (82,55) size 14x4 [border: (1px solid #000000)] [r=3 c=5 rs=1 cs=1]
+ RenderTableCell {TD} at (98,55) size 14x4 [border: (1px solid #000000)] [r=3 c=6 rs=1 cs=1]
+ RenderTableCell {TD} at (114,55) size 14x4 [border: (1px solid #000000)] [r=3 c=7 rs=1 cs=1]
+ RenderTableCell {TD} at (130,55) size 14x4 [border: (1px solid #000000)] [r=3 c=8 rs=1 cs=1]
+ RenderTableCell {TD} at (146,55) size 14x4 [border: (1px solid #000000)] [r=3 c=9 rs=1 cs=1]
+ RenderBlock {DIV} at (10,269) size 744x162
+ RenderInline {SPAN} at (0,0) size 78x40
+ RenderText {#text} at (6,0) size 72x18
+ text run at (6,0) width 72: "I am a span"
+ RenderBR {BR} at (78,0) size 0x18
+ RenderText {#text} at (0,18) size 28x18
+ text run at (0,18) width 28: "I am"
+ RenderText {#text} at (34,18) size 4x18
+ text run at (34,18) width 4: " "
+ RenderInline {SPAN} at (0,0) size 74x40
+ RenderText {#text} at (44,18) size 28x18
+ text run at (44,18) width 28: "I am"
+ RenderBR {BR} at (72,18) size 0x18
+ RenderText {#text} at (0,36) size 72x18
+ text run at (0,36) width 72: "a span I am"
+ RenderText {#text} at (78,36) size 4x18
+ text run at (78,36) width 4: " "
+ RenderInline {SPAN} at (0,0) size 160x40
+ RenderText {#text} at (88,36) size 72x18
+ text run at (88,36) width 72: "I am a span"
+ RenderBR {BR} at (160,36) size 0x18
+ RenderText {#text} at (0,54) size 28x18
+ text run at (0,54) width 28: "I am"
+ RenderText {#text} at (34,54) size 4x18
+ text run at (34,54) width 4: " "
+ RenderInline {SPAN} at (0,0) size 74x40
+ RenderText {#text} at (44,54) size 28x18
+ text run at (44,54) width 28: "I am"
+ RenderBR {BR} at (72,54) size 0x18
+ RenderText {#text} at (0,72) size 72x18
+ text run at (0,72) width 72: "a span I am"
+ RenderText {#text} at (78,72) size 4x18
+ text run at (78,72) width 4: " "
+ RenderInline {SPAN} at (0,0) size 160x40
+ RenderText {#text} at (88,72) size 72x18
+ text run at (88,72) width 72: "I am a span"
+ RenderBR {BR} at (160,72) size 0x18
+ RenderText {#text} at (0,90) size 28x18
+ text run at (0,90) width 28: "I am"
+ RenderText {#text} at (34,90) size 4x18
+ text run at (34,90) width 4: " "
+ RenderInline {SPAN} at (0,0) size 74x40
+ RenderText {#text} at (44,90) size 28x18
+ text run at (44,90) width 28: "I am"
+ RenderBR {BR} at (72,90) size 0x18
+ RenderText {#text} at (0,108) size 72x18
+ text run at (0,108) width 72: "a span I am"
+ RenderText {#text} at (78,108) size 4x18
+ text run at (78,108) width 4: " "
+ RenderInline {SPAN} at (0,0) size 160x40
+ RenderText {#text} at (88,108) size 72x18
+ text run at (88,108) width 72: "I am a span"
+ RenderBR {BR} at (160,108) size 0x18
+ RenderText {#text} at (0,126) size 28x18
+ text run at (0,126) width 28: "I am"
+ RenderText {#text} at (34,126) size 4x18
+ text run at (34,126) width 4: " "
+ RenderInline {SPAN} at (0,0) size 74x40
+ RenderText {#text} at (44,126) size 28x18
+ text run at (44,126) width 28: "I am"
+ RenderBR {BR} at (72,126) size 0x18
+ RenderText {#text} at (0,144) size 72x18
+ text run at (0,144) width 72: "a span I am"
+ RenderText {#text} at (0,0) size 0x0
+layer at (28,179) size 600x100
+ RenderBlock {DIV} at (10,159) size 600x100
+ RenderText {#text} at (0,0) size 8x1190
+ text run at (0,0) width 8: "_"
+ text run at (0,18) width 8: "_"
+ text run at (0,36) width 8: "_"
+ text run at (0,54) width 8: "_"
+ text run at (0,72) width 8: "_"
+ text run at (0,100) width 8: "_"
+ text run at (0,118) width 8: "_"
+ text run at (0,136) width 8: "_"
+ text run at (0,154) width 8: "_"
+ text run at (0,172) width 8: "_"
+ text run at (0,200) width 8: "_"
+ text run at (0,218) width 8: "_"
+ text run at (0,236) width 8: "_"
+ text run at (0,254) width 8: "_"
+ text run at (0,272) width 8: "_"
+ text run at (0,300) width 8: "_"
+ text run at (0,318) width 8: "_"
+ text run at (0,336) width 8: "_"
+ text run at (0,354) width 8: "_"
+ text run at (0,372) width 8: "_"
+ text run at (0,400) width 8: "_"
+ text run at (0,418) width 8: "_"
+ text run at (0,436) width 8: "_"
+ text run at (0,454) width 8: "_"
+ text run at (0,472) width 8: "_"
+ text run at (0,500) width 8: "_"
+ text run at (0,518) width 8: "_"
+ text run at (0,536) width 8: "_"
+ text run at (0,554) width 8: "_"
+ text run at (0,572) width 8: "_"
+ text run at (0,600) width 8: "_"
+ text run at (0,618) width 8: "_"
+ text run at (0,636) width 8: "_"
+ text run at (0,654) width 8: "_"
+ text run at (0,672) width 8: "_"
+ text run at (0,700) width 8: "_"
+ text run at (0,718) width 8: "_"
+ text run at (0,736) width 8: "_"
+ text run at (0,754) width 8: "_"
+ text run at (0,772) width 8: "_"
+ text run at (0,800) width 8: "_"
+ text run at (0,818) width 8: "_"
+ text run at (0,836) width 8: "_"
+ text run at (0,854) width 8: "_"
+ text run at (0,872) width 8: "_"
+ text run at (0,900) width 8: "_"
+ text run at (0,918) width 8: "_"
+ text run at (0,936) width 8: "_"
+ text run at (0,954) width 8: "_"
+ text run at (0,972) width 8: "_"
+ text run at (0,1000) width 8: "_"
+ text run at (0,1018) width 8: "_"
+ text run at (0,1036) width 8: "_"
+ text run at (0,1054) width 8: "_"
+ text run at (0,1072) width 8: "_"
+ text run at (0,1100) width 8: "_"
+ text run at (0,1118) width 8: "_"
+ text run at (0,1136) width 8: "_"
+ text run at (0,1154) width 8: "_"
+ text run at (0,1172) width 8: "_"
Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (87386 => 87387)
--- trunk/Source/WebCore/rendering/RenderInline.cpp 2011-05-26 15:01:44 UTC (rev 87386)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp 2011-05-26 15:34:48 UTC (rev 87387)
@@ -1379,6 +1379,9 @@
}
}
+ if (graphicsContext->paintingDisabled())
+ return;
+
if (styleToUse->outlineStyleIsAuto() || styleToUse->outlineStyle() == BNONE)
return;
@@ -1423,6 +1426,9 @@
int ow = styleToUse->outlineWidth();
EBorderStyle os = styleToUse->outlineStyle();
+ const AffineTransform& currentCTM = graphicsContext->getCTM();
+ bool antialias = !currentCTM.isIdentityOrTranslationOrFlipped();
+
int offset = style()->outlineOffset();
int t = ty + thisline.y() - offset;
@@ -1439,7 +1445,8 @@
BSLeft,
outlineColor, os,
(lastline.isEmpty() || thisline.x() < lastline.x() || (lastline.maxX() - 1) <= thisline.x() ? ow : -ow),
- (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.maxX() - 1) <= thisline.x() ? ow : -ow));
+ (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.maxX() - 1) <= thisline.x() ? ow : -ow),
+ antialias);
// right edge
drawLineForBoxSide(graphicsContext,
@@ -1450,27 +1457,29 @@
BSRight,
outlineColor, os,
(lastline.isEmpty() || lastline.maxX() < thisline.maxX() || (thisline.maxX() - 1) <= lastline.x() ? ow : -ow),
- (nextline.isEmpty() || nextline.maxX() <= thisline.maxX() || (thisline.maxX() - 1) <= nextline.x() ? ow : -ow));
+ (nextline.isEmpty() || nextline.maxX() <= thisline.maxX() || (thisline.maxX() - 1) <= nextline.x() ? ow : -ow),
+ antialias);
// upper edge
if (thisline.x() < lastline.x())
drawLineForBoxSide(graphicsContext,
l - ow,
t - ow,
min(r+ow, (lastline.isEmpty() ? 1000000 : tx + lastline.x())),
- t ,
+ t,
BSTop, outlineColor, os,
ow,
- (!lastline.isEmpty() && tx + lastline.x() + 1 < r + ow) ? -ow : ow);
+ (!lastline.isEmpty() && tx + lastline.x() + 1 < r + ow) ? -ow : ow,
+ antialias);
if (lastline.maxX() < thisline.maxX())
drawLineForBoxSide(graphicsContext,
max(lastline.isEmpty() ? -1000000 : tx + lastline.maxX(), l - ow),
t - ow,
r + ow,
- t ,
+ t,
BSTop, outlineColor, os,
(!lastline.isEmpty() && l - ow < tx + lastline.maxX()) ? -ow : ow,
- ow);
+ ow, antialias);
// lower edge
if (thisline.x() < nextline.x())
@@ -1481,7 +1490,8 @@
b + ow,
BSBottom, outlineColor, os,
ow,
- (!nextline.isEmpty() && tx + nextline.x() + 1 < r + ow) ? -ow : ow);
+ (!nextline.isEmpty() && tx + nextline.x() + 1 < r + ow) ? -ow : ow,
+ antialias);
if (nextline.maxX() < thisline.maxX())
drawLineForBoxSide(graphicsContext,
@@ -1491,7 +1501,7 @@
b + ow,
BSBottom, outlineColor, os,
(!nextline.isEmpty() && l - ow < tx + nextline.maxX()) ? -ow : ow,
- ow);
+ ow, antialias);
}
#if ENABLE(DASHBOARD_SUPPORT)
Modified: trunk/Source/WebCore/rendering/RenderTableCell.cpp (87386 => 87387)
--- trunk/Source/WebCore/rendering/RenderTableCell.cpp 2011-05-26 15:01:44 UTC (rev 87386)
+++ trunk/Source/WebCore/rendering/RenderTableCell.cpp 2011-05-26 15:34:48 UTC (rev 87387)
@@ -914,7 +914,7 @@
void RenderTableCell::paintCollapsedBorder(GraphicsContext* graphicsContext, const IntRect& paintRect)
{
- if (!table()->currentBorderStyle())
+ if (!table()->currentBorderStyle() || graphicsContext->paintingDisabled())
return;
CollapsedBorderValue leftVal = collapsedLeftBorder();
@@ -950,11 +950,14 @@
borders.addBorder(bottomVal, BSBottom, renderBottom, x, y + h - bottomWidth, x + w, y + h, bottomStyle);
borders.addBorder(leftVal, BSLeft, renderLeft, x, y, x + leftWidth, y + h, leftStyle);
borders.addBorder(rightVal, BSRight, renderRight, x + w - rightWidth, y, x + w, y + h, rightStyle);
+
+ const AffineTransform& currentCTM = graphicsContext->getCTM();
+ bool antialias = !currentCTM.isIdentityOrTranslationOrFlipped();
for (CollapsedBorder* border = borders.nextBorder(); border; border = borders.nextBorder()) {
if (border->borderValue == *table()->currentBorderStyle())
drawLineForBoxSide(graphicsContext, border->x1, border->y1, border->x2, border->y2, border->side,
- border->borderValue.color(), border->style, 0, 0);
+ border->borderValue.color(), border->style, 0, 0, antialias);
}
}