[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
hyatt at apple.com
hyatt at apple.com
Wed Dec 22 15:11:14 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 10a449d88bee89cd71e0eef6bf0c805a5c1a27f4
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 28 21:44:40 2010 +0000
https://bugs.webkit.org/show_bug.cgi?id=48443
Reviewed by Beth Dakin.
Border images don't work right with vertical RenderInlines. Make border/mask/background painting
do the right thing for vertical strips.
WebCore:
Added fast/blockflow/border-image-* tests.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paintBoxDecorations):
(WebCore::InlineFlowBox::paintMask):
LayoutTests:
* fast/blockflow/border-image-horizontal-bt.html: Added.
* fast/blockflow/border-image-vertical-lr.html: Added.
* fast/blockflow/border-image-vertical-rl.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70813 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 82ba778..cc561a2 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-28 David Hyatt <hyatt at apple.com>
+
+ Reviewed by Beth Dakin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=48443
+
+ Border images don't work right with vertical RenderInlines. Make border/mask/background painting
+ do the right thing for vertical strips.
+
+ * fast/blockflow/border-image-horizontal-bt.html: Added.
+ * fast/blockflow/border-image-vertical-lr.html: Added.
+ * fast/blockflow/border-image-vertical-rl.html: Added.
+
2010-10-28 Ryosuke Niwa <rniwa at webkit.org>
Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/blockflow/border-image-horizontal-bt.html b/LayoutTests/fast/blockflow/border-image-horizontal-bt.html
new file mode 100644
index 0000000..ac26122
--- /dev/null
+++ b/LayoutTests/fast/blockflow/border-image-horizontal-bt.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<head>
+<style>
+span {
+ border-width: 21px 30px 30px 21px;
+ font-size:86px;
+ margin: 30px;
+ -webkit-border-image: url("../borders/resources/border-image.png") 21 30 30 21 repeat repeat;
+}
+</style>
+</head>
+<body style="padding:50px; line-height:2; -webkit-writing-mode: horizontal-bt">
+<span><div style="display:inline-block;width:25px"></div><br><div style="display:inline-block;width:50px"></div></span>
diff --git a/LayoutTests/fast/blockflow/border-image-vertical-lr.html b/LayoutTests/fast/blockflow/border-image-vertical-lr.html
new file mode 100644
index 0000000..2b8a3db
--- /dev/null
+++ b/LayoutTests/fast/blockflow/border-image-vertical-lr.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<head>
+<style>
+span {
+ border-width: 21px 30px 30px 21px;
+ font-size:86px;
+ margin: 30px;
+ -webkit-border-image: url("../borders/resources/border-image.png") 21 30 30 21 repeat repeat;
+}
+</style>
+</head>
+<body style="padding:50px; line-height:2; -webkit-writing-mode: vertical-lr">
+<span><div style="display:inline-block;height:25px"></div><br><div style="display:inline-block;height:50px"></div></span>
diff --git a/LayoutTests/fast/blockflow/border-image-vertical-rl.html b/LayoutTests/fast/blockflow/border-image-vertical-rl.html
new file mode 100644
index 0000000..994acd3
--- /dev/null
+++ b/LayoutTests/fast/blockflow/border-image-vertical-rl.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<head>
+<style>
+span {
+ border-width: 21px 30px 30px 21px;
+ font-size:86px;
+ margin: 30px;
+ -webkit-border-image: url("../borders/resources/border-image.png") 21 30 30 21 repeat repeat;
+}
+</style>
+</head>
+<body style="padding:50px; line-height:2; -webkit-writing-mode: vertical-rl">
+<span><div style="display:inline-block;height:25px"></div><br><div style="display:inline-block;height:50px"></div></span>
diff --git a/LayoutTests/platform/mac/fast/blockflow/border-image-horizontal-bt-expected.checksum b/LayoutTests/platform/mac/fast/blockflow/border-image-horizontal-bt-expected.checksum
new file mode 100644
index 0000000..5839847
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/border-image-horizontal-bt-expected.checksum
@@ -0,0 +1 @@
+b13ea572f0e4891b0fe4b3e77c4ad409
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/blockflow/border-image-horizontal-bt-expected.png b/LayoutTests/platform/mac/fast/blockflow/border-image-horizontal-bt-expected.png
new file mode 100644
index 0000000..794bd71
Binary files /dev/null and b/LayoutTests/platform/mac/fast/blockflow/border-image-horizontal-bt-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/blockflow/border-image-horizontal-bt-expected.txt b/LayoutTests/platform/mac/fast/blockflow/border-image-horizontal-bt-expected.txt
new file mode 100644
index 0000000..cfbc49c
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/border-image-horizontal-bt-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,140) size 800x460
+ RenderBlock {HTML} at (0,0) size 800x460
+ RenderBody {BODY} at (8,8) size 784x444
+ RenderInline {SPAN} at (0,0) size 80x323 [border: (21px none #000000) (30px none #000000) (21px none #000000)]
+ RenderBlock {DIV} at (101,102) size 25x0
+ RenderBR {BR} at (126,80) size 0x100
+ RenderBlock {DIV} at (50,274) size 50x0
+ RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-lr-expected.checksum b/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-lr-expected.checksum
new file mode 100644
index 0000000..6f27f9a
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-lr-expected.checksum
@@ -0,0 +1 @@
+3da47156df443000d46b5a18a91bee75
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-lr-expected.png b/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-lr-expected.png
new file mode 100644
index 0000000..c80f8e9
Binary files /dev/null and b/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-lr-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-lr-expected.txt b/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-lr-expected.txt
new file mode 100644
index 0000000..8e06d69
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-lr-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 460x600
+ RenderBlock {HTML} at (0,0) size 460x600
+ RenderBody {BODY} at (8,8) size 444x584
+ RenderInline {SPAN} at (0,0) size 252x121 [border: (21px none #000000) (30px none #000000) (21px none #000000)]
+ RenderBlock {DIV} at (93,101) size 0x25
+ RenderBR {BR} at (71,126) size 0x100
+ RenderBlock {DIV} at (265,50) size 0x50
+ RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-rl-expected.checksum b/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-rl-expected.checksum
new file mode 100644
index 0000000..98c57bf
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-rl-expected.checksum
@@ -0,0 +1 @@
+e16b97a9bf566bb68cc5ec06013859f9
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-rl-expected.png b/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-rl-expected.png
new file mode 100644
index 0000000..deeeb03
Binary files /dev/null and b/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-rl-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-rl-expected.txt b/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-rl-expected.txt
new file mode 100644
index 0000000..638a379
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/border-image-vertical-rl-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (340,0) size 460x600
+ RenderBlock {HTML} at (0,0) size 460x600
+ RenderBody {BODY} at (8,8) size 444x584
+ RenderInline {SPAN} at (0,0) size 252x121 [border: (21px none #000000) (30px none #000000) (21px none #000000)]
+ RenderBlock {DIV} at (164,101) size 0x25
+ RenderBR {BR} at (86,126) size 0x100
+ RenderBlock {DIV} at (336,50) size 0x50
+ RenderText {#text} at (0,0) size 0x0
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 06f0e74..1b0f5a5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-28 David Hyatt <hyatt at apple.com>
+
+ Reviewed by Beth Dakin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=48443
+
+ Border images don't work right with vertical RenderInlines. Make border/mask/background painting
+ do the right thing for vertical strips.
+
+ Added fast/blockflow/border-image-* tests.
+
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::paintBoxDecorations):
+ (WebCore::InlineFlowBox::paintMask):
+
2010-10-28 Patrick Gansterer <paroga at webkit.org>
Reviewed by Adam Roben.
diff --git a/WebCore/rendering/InlineFlowBox.cpp b/WebCore/rendering/InlineFlowBox.cpp
index ae48ab3..1c82b2c 100644
--- a/WebCore/rendering/InlineFlowBox.cpp
+++ b/WebCore/rendering/InlineFlowBox.cpp
@@ -844,23 +844,26 @@ void InlineFlowBox::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
boxModelObject()->paintBorder(context, tx, ty, w, h, renderer()->style(), includeLogicalLeftEdge(), includeLogicalRightEdge());
else {
// We have a border image that spans multiple lines.
- // We need to adjust _tx and _ty by the width of all previous lines.
+ // We need to adjust tx and ty by the width of all previous lines.
// Think of border image painting on inlines as though you had one long line, a single continuous
// strip. Even though that strip has been broken up across multiple lines, you still paint it
// as though you had one single line. This means each line has to pick up the image where
// the previous line left off.
// FIXME: What the heck do we do with RTL here? The math we're using is obviously not right,
// but it isn't even clear how this should work at all.
- int xOffsetOnLine = 0;
+ int logicalOffsetOnLine = 0;
for (InlineFlowBox* curr = prevLineBox(); curr; curr = curr->prevLineBox())
- xOffsetOnLine += curr->logicalWidth();
- int startX = tx - xOffsetOnLine;
- int totalWidth = xOffsetOnLine;
+ logicalOffsetOnLine += curr->logicalWidth();
+ int totalLogicalWidth = logicalOffsetOnLine;
for (InlineFlowBox* curr = this; curr; curr = curr->nextLineBox())
- totalWidth += curr->logicalWidth();
+ totalLogicalWidth += curr->logicalWidth();
+ int stripX = tx - (isVertical() ? 0 : logicalOffsetOnLine);
+ int stripY = ty - (isVertical() ? logicalOffsetOnLine : 0);
+ int stripWidth = isVertical() ? w : totalLogicalWidth;
+ int stripHeight = isVertical() ? totalLogicalWidth : h;
context->save();
context->clip(IntRect(tx, ty, w, h));
- boxModelObject()->paintBorder(context, startX, ty, totalWidth, h, renderer()->style());
+ boxModelObject()->paintBorder(context, stripX, stripY, stripWidth, stripHeight, renderer()->style());
context->restore();
}
}
@@ -926,16 +929,19 @@ void InlineFlowBox::paintMask(PaintInfo& paintInfo, int tx, int ty)
} else {
// We have a mask image that spans multiple lines.
// We need to adjust _tx and _ty by the width of all previous lines.
- int xOffsetOnLine = 0;
+ int logicalOffsetOnLine = 0;
for (InlineFlowBox* curr = prevLineBox(); curr; curr = curr->prevLineBox())
- xOffsetOnLine += curr->logicalWidth();
- int startX = tx - xOffsetOnLine;
- int totalWidth = xOffsetOnLine;
+ logicalOffsetOnLine += curr->logicalWidth();
+ int totalLogicalWidth = logicalOffsetOnLine;
for (InlineFlowBox* curr = this; curr; curr = curr->nextLineBox())
- totalWidth += curr->logicalWidth();
+ totalLogicalWidth += curr->logicalWidth();
+ int stripX = tx - (isVertical() ? 0 : logicalOffsetOnLine);
+ int stripY = ty - (isVertical() ? logicalOffsetOnLine : 0);
+ int stripWidth = isVertical() ? w : totalLogicalWidth;
+ int stripHeight = isVertical() ? totalLogicalWidth : h;
paintInfo.context->save();
paintInfo.context->clip(IntRect(tx, ty, w, h));
- boxModelObject()->paintNinePieceImage(paintInfo.context, startX, ty, totalWidth, h, renderer()->style(), maskNinePieceImage, compositeOp);
+ boxModelObject()->paintNinePieceImage(paintInfo.context, stripX, stripY, stripWidth, stripHeight, renderer()->style(), maskNinePieceImage, compositeOp);
paintInfo.context->restore();
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list