[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:13:47 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit d25a76a10a3605473fccf12014c48e2b96247d8d
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 29 06:30:10 2010 +0000
https://bugs.webkit.org/show_bug.cgi?id=48569
Reviewed by Dan Bernstein.
Box shadows on vertical inlines don't paint properly. Fix the paintBoxShadow method to treat the edges to include as
logical (so that top/bottom are used instead of left/right for vertical lines). In order to make my box-shadow tests
work I had to fix a bug in the transform code of InlineTextBox that was causing the baselines of vertical lines to
be wrong.
Added fast/blockflow/box-shadow-* tests
WebCore:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintBoxShadow):
* rendering/RenderBoxModelObject.h:
LayoutTests:
* fast/blockflow/box-shadow-horizontal-bt.html: Added.
* fast/blockflow/box-shadow-vertical-lr.html: Added.
* fast/blockflow/box-shadow-vertical-rl.html: Added.
* platform/mac/fast/blockflow/border-vertical-lr-expected.checksum:
* platform/mac/fast/blockflow/border-vertical-lr-expected.png:
* platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.checksum: Added.
* platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.png: Added.
* platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.txt: Added.
* platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.checksum: Added.
* platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.png: Added.
* platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.txt: Added.
* platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.checksum: Added.
* platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.png: Added.
* platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.txt: Added.
* platform/mac/fast/blockflow/english-lr-text-expected.checksum:
* platform/mac/fast/blockflow/english-lr-text-expected.png:
* platform/mac/fast/blockflow/english-rl-text-expected.checksum:
* platform/mac/fast/blockflow/english-rl-text-expected.png:
* platform/mac/fast/blockflow/japanese-lr-text-expected.checksum:
* platform/mac/fast/blockflow/japanese-lr-text-expected.png:
* platform/mac/fast/blockflow/japanese-rl-text-expected.checksum:
* platform/mac/fast/blockflow/japanese-rl-text-expected.png:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index ac316a6..0cd9c37 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,39 @@
+2010-10-28 David Hyatt <hyatt at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=48569
+
+ Box shadows on vertical inlines don't paint properly. Fix the paintBoxShadow method to treat the edges to include as
+ logical (so that top/bottom are used instead of left/right for vertical lines). In order to make my box-shadow tests
+ work I had to fix a bug in the transform code of InlineTextBox that was causing the baselines of vertical lines to
+ be wrong.
+
+ Added fast/blockflow/box-shadow-* tests
+
+ * fast/blockflow/box-shadow-horizontal-bt.html: Added.
+ * fast/blockflow/box-shadow-vertical-lr.html: Added.
+ * fast/blockflow/box-shadow-vertical-rl.html: Added.
+ * platform/mac/fast/blockflow/border-vertical-lr-expected.checksum:
+ * platform/mac/fast/blockflow/border-vertical-lr-expected.png:
+ * platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.checksum: Added.
+ * platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.png: Added.
+ * platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.txt: Added.
+ * platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.checksum: Added.
+ * platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.png: Added.
+ * platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.txt: Added.
+ * platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.checksum: Added.
+ * platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.png: Added.
+ * platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.txt: Added.
+ * platform/mac/fast/blockflow/english-lr-text-expected.checksum:
+ * platform/mac/fast/blockflow/english-lr-text-expected.png:
+ * platform/mac/fast/blockflow/english-rl-text-expected.checksum:
+ * platform/mac/fast/blockflow/english-rl-text-expected.png:
+ * platform/mac/fast/blockflow/japanese-lr-text-expected.checksum:
+ * platform/mac/fast/blockflow/japanese-lr-text-expected.png:
+ * platform/mac/fast/blockflow/japanese-rl-text-expected.checksum:
+ * platform/mac/fast/blockflow/japanese-rl-text-expected.png:
+
2010-10-28 Dmitry Titov <dimich at chromium.org>
[Chromium] Unreviewed, test expectations update.
diff --git a/LayoutTests/fast/blockflow/box-shadow-horizontal-bt.html b/LayoutTests/fast/blockflow/box-shadow-horizontal-bt.html
new file mode 100644
index 0000000..f3fcdad
--- /dev/null
+++ b/LayoutTests/fast/blockflow/box-shadow-horizontal-bt.html
@@ -0,0 +1,28 @@
+<body style="-webkit-writing-mode: horizontal-bt">
+<div style="width: 600px; text-align: center;margin-top:50px">
+ <span style="
+ padding: 0 15px;
+ font-size: 48px;
+ background-color: lightyellow;
+ -webkit-border-radius: 10px;
+ border: 5px solid green;
+ line-height: 1.5;
+ -webkit-box-shadow: 15px 30px 5px rgba(0, 0, 0, 0.2) inset;
+ ">
+ This sentence is too long to fit on a single line.
+ </span>
+</div>
+
+<div style="width: 600px; text-align: center;">
+ <span style="
+ padding: 0 15px;
+ font-size: 48px;
+ background-color: lightyellow;
+ -webkit-border-radius: 10px;
+ border: 5px solid green;
+ line-height: 1.5;
+ -webkit-box-shadow: 15px 30px 5px rgba(0, 0, 0, 0.2);
+ ">
+ This sentence is too long to fit on a single line.
+ </span>
+</div>
diff --git a/LayoutTests/fast/blockflow/box-shadow-vertical-lr.html b/LayoutTests/fast/blockflow/box-shadow-vertical-lr.html
new file mode 100644
index 0000000..a6cce36
--- /dev/null
+++ b/LayoutTests/fast/blockflow/box-shadow-vertical-lr.html
@@ -0,0 +1,28 @@
+<body style="-webkit-writing-mode: vertical-lr">
+<div style="height: 600px; text-align: center;margin-right:50px">
+ <span style="
+ padding: 15px 0;
+ font-size: 48px;
+ background-color: lightyellow;
+ -webkit-border-radius: 10px;
+ border: 5px solid green;
+ line-height: 1.5;
+ -webkit-box-shadow: -30px 15px 5px rgba(0, 0, 0, 0.2) inset;
+ ">
+ This sentence is too long to fit on a single line.
+ </span>
+</div>
+
+<div style="height: 600px; text-align: center;">
+ <span style="
+ padding: 15px 0;
+ font-size: 48px;
+ background-color: lightyellow;
+ -webkit-border-radius: 10px;
+ border: 5px solid green;
+ line-height: 1.5;
+ -webkit-box-shadow: -30px 15px 5px rgba(0, 0, 0, 0.2);
+ ">
+ This sentence is too long to fit on a single line.
+ </span>
+</div>
diff --git a/LayoutTests/fast/blockflow/box-shadow-vertical-rl.html b/LayoutTests/fast/blockflow/box-shadow-vertical-rl.html
new file mode 100644
index 0000000..002f880
--- /dev/null
+++ b/LayoutTests/fast/blockflow/box-shadow-vertical-rl.html
@@ -0,0 +1,28 @@
+<body style="-webkit-writing-mode: vertical-rl">
+<div style="height: 600px; text-align: center;margin-left:50px">
+ <span style="
+ padding: 15px 0;
+ font-size: 48px;
+ background-color: lightyellow;
+ -webkit-border-radius: 10px;
+ border: 5px solid green;
+ line-height: 1.5;
+ -webkit-box-shadow: -30px 15px 5px rgba(0, 0, 0, 0.2) inset;
+ ">
+ This sentence is too long to fit on a single line.
+ </span>
+</div>
+
+<div style="height: 600px; text-align: center;">
+ <span style="
+ padding: 15px 0;
+ font-size: 48px;
+ background-color: lightyellow;
+ -webkit-border-radius: 10px;
+ border: 5px solid green;
+ line-height: 1.5;
+ -webkit-box-shadow: -30px 15px 5px rgba(0, 0, 0, 0.2);
+ ">
+ This sentence is too long to fit on a single line.
+ </span>
+</div>
diff --git a/LayoutTests/platform/mac/fast/blockflow/border-vertical-lr-expected.checksum b/LayoutTests/platform/mac/fast/blockflow/border-vertical-lr-expected.checksum
index 3b63bfa..8307b9c 100644
--- a/LayoutTests/platform/mac/fast/blockflow/border-vertical-lr-expected.checksum
+++ b/LayoutTests/platform/mac/fast/blockflow/border-vertical-lr-expected.checksum
@@ -1 +1 @@
-385aa084edea5cff12b522e2d0505fdf
\ No newline at end of file
+30657bb8adbb3c333bf2920cae041ad0
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/blockflow/border-vertical-lr-expected.png b/LayoutTests/platform/mac/fast/blockflow/border-vertical-lr-expected.png
index 744070e..4276b39 100644
Binary files a/LayoutTests/platform/mac/fast/blockflow/border-vertical-lr-expected.png and b/LayoutTests/platform/mac/fast/blockflow/border-vertical-lr-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.checksum b/LayoutTests/platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.checksum
new file mode 100644
index 0000000..6b8523f
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.checksum
@@ -0,0 +1 @@
+75af7ae6474cbcd71e2abecc349489f7
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.png b/LayoutTests/platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.png
new file mode 100644
index 0000000..c4ff566
Binary files /dev/null and b/LayoutTests/platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.txt b/LayoutTests/platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.txt
new file mode 100644
index 0000000..78ad9f4
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 600x144
+ RenderInline {SPAN} at (0,0) size 598x137 [bgcolor=#FFFFE0] [border: (5px solid #008000)]
+ RenderText {#text} at (21,5) size 578x127
+ text run at (21,5) width 578: "This sentence is too long to fit"
+ text run at (139,77) width 302: "on a single line."
+ RenderText {#text} at (0,0) size 0x0
+ RenderBlock {DIV} at (0,194) size 600x144
+ RenderInline {SPAN} at (0,0) size 598x137 [bgcolor=#FFFFE0] [border: (5px solid #008000)]
+ RenderText {#text} at (21,5) size 578x127
+ text run at (21,5) width 578: "This sentence is too long to fit"
+ text run at (139,77) width 302: "on a single line."
+ RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.checksum b/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.checksum
new file mode 100644
index 0000000..2cf7dfc
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.checksum
@@ -0,0 +1 @@
+6976f653292eba5d38412e5136ab8c88
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.png b/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.png
new file mode 100644
index 0000000..bd2f954
Binary files /dev/null and b/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.txt b/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.txt
new file mode 100644
index 0000000..aaf2bc6
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 785x608
+ RenderView at (0,0) size 785x600
+layer at (0,0) size 785x608
+ RenderBlock {HTML} at (0,0) size 785x600
+ RenderBody {BODY} at (8,8) size 769x584
+ RenderBlock {DIV} at (0,0) size 144x600
+ RenderInline {SPAN} at (0,0) size 598x203 [bgcolor=#FFFFE0] [border: (5px solid #008000)]
+ RenderText {#text} at (5,21) size 578x173
+ text run at (5,21) width 578: "This sentence is too long to fit"
+ text run at (77,139) width 302: "on a single line."
+ RenderText {#text} at (0,0) size 0x0
+ RenderBlock {DIV} at (194,0) size 144x600
+ RenderInline {SPAN} at (0,0) size 598x203 [bgcolor=#FFFFE0] [border: (5px solid #008000)]
+ RenderText {#text} at (5,21) size 578x173
+ text run at (5,21) width 578: "This sentence is too long to fit"
+ text run at (77,139) width 302: "on a single line."
+ RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.checksum b/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.checksum
new file mode 100644
index 0000000..e4b6a6a
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.checksum
@@ -0,0 +1 @@
+3e228f24508acdef7f1ab0e0549e1751
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.png b/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.png
new file mode 100644
index 0000000..1dd0fbc
Binary files /dev/null and b/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.txt b/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.txt
new file mode 100644
index 0000000..a44c1cf
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/blockflow/box-shadow-vertical-rl-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 785x608
+ RenderView at (0,0) size 785x600
+layer at (0,0) size 785x608
+ RenderBlock {HTML} at (0,0) size 785x600
+ RenderBody {BODY} at (8,8) size 769x584
+ RenderBlock {DIV} at (0,0) size 144x600
+ RenderInline {SPAN} at (0,0) size 598x203 [bgcolor=#FFFFE0] [border: (5px solid #008000)]
+ RenderText {#text} at (8,21) size 578x173
+ text run at (8,21) width 578: "This sentence is too long to fit"
+ text run at (80,139) width 302: "on a single line."
+ RenderText {#text} at (0,0) size 0x0
+ RenderBlock {DIV} at (194,0) size 144x600
+ RenderInline {SPAN} at (0,0) size 598x203 [bgcolor=#FFFFE0] [border: (5px solid #008000)]
+ RenderText {#text} at (8,21) size 578x173
+ text run at (8,21) width 578: "This sentence is too long to fit"
+ text run at (80,139) width 302: "on a single line."
+ RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/blockflow/english-lr-text-expected.checksum b/LayoutTests/platform/mac/fast/blockflow/english-lr-text-expected.checksum
index bd9a5d5..ddcb771 100644
--- a/LayoutTests/platform/mac/fast/blockflow/english-lr-text-expected.checksum
+++ b/LayoutTests/platform/mac/fast/blockflow/english-lr-text-expected.checksum
@@ -1 +1 @@
-f877c89d5f5032abe0650a578dc81375
\ No newline at end of file
+b0e78b32fc8bc34ada1184030208fca1
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/blockflow/english-lr-text-expected.png b/LayoutTests/platform/mac/fast/blockflow/english-lr-text-expected.png
index d4a31c2..4522aba 100644
Binary files a/LayoutTests/platform/mac/fast/blockflow/english-lr-text-expected.png and b/LayoutTests/platform/mac/fast/blockflow/english-lr-text-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/blockflow/english-rl-text-expected.checksum b/LayoutTests/platform/mac/fast/blockflow/english-rl-text-expected.checksum
index 5c1c195..cf40568 100644
--- a/LayoutTests/platform/mac/fast/blockflow/english-rl-text-expected.checksum
+++ b/LayoutTests/platform/mac/fast/blockflow/english-rl-text-expected.checksum
@@ -1 +1 @@
-86bce170b6e5c4eac8bb00675512383d
\ No newline at end of file
+fcb5e2cdfa12dbbf85a930fd837d79df
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/blockflow/english-rl-text-expected.png b/LayoutTests/platform/mac/fast/blockflow/english-rl-text-expected.png
index a118716..f5c12c2 100644
Binary files a/LayoutTests/platform/mac/fast/blockflow/english-rl-text-expected.png and b/LayoutTests/platform/mac/fast/blockflow/english-rl-text-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/blockflow/japanese-lr-text-expected.checksum b/LayoutTests/platform/mac/fast/blockflow/japanese-lr-text-expected.checksum
index 28d264e..4f4e6e5 100644
--- a/LayoutTests/platform/mac/fast/blockflow/japanese-lr-text-expected.checksum
+++ b/LayoutTests/platform/mac/fast/blockflow/japanese-lr-text-expected.checksum
@@ -1 +1 @@
-59f6a2f8f0c1748ebd9150c1d882903f
\ No newline at end of file
+ad4edd689eb8f38dd93885d113c5b1cf
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/blockflow/japanese-lr-text-expected.png b/LayoutTests/platform/mac/fast/blockflow/japanese-lr-text-expected.png
index 615151b..add74db 100644
Binary files a/LayoutTests/platform/mac/fast/blockflow/japanese-lr-text-expected.png and b/LayoutTests/platform/mac/fast/blockflow/japanese-lr-text-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/blockflow/japanese-rl-text-expected.checksum b/LayoutTests/platform/mac/fast/blockflow/japanese-rl-text-expected.checksum
index 664de75..d846d89 100644
--- a/LayoutTests/platform/mac/fast/blockflow/japanese-rl-text-expected.checksum
+++ b/LayoutTests/platform/mac/fast/blockflow/japanese-rl-text-expected.checksum
@@ -1 +1 @@
-56bf656a9df7dbf28ba244a7eb238492
\ No newline at end of file
+17872b58914af8fd56481e900f10f014
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/blockflow/japanese-rl-text-expected.png b/LayoutTests/platform/mac/fast/blockflow/japanese-rl-text-expected.png
index a5eddfe..aa5b91e 100644
Binary files a/LayoutTests/platform/mac/fast/blockflow/japanese-rl-text-expected.png and b/LayoutTests/platform/mac/fast/blockflow/japanese-rl-text-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.checksum b/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.checksum
index ce642bc..12d4950 100644
--- a/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.checksum
+++ b/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.checksum
@@ -1 +1 @@
-97299ec70f0a6a19601d0cfd36516b65
\ No newline at end of file
+065bc1b76b69b3d27cf8f1020c5de08a
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.png b/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.png
index d427525..dc04814 100644
Binary files a/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.png and b/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.png differ
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1cd3503..db2a9ca 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-10-28 David Hyatt <hyatt at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=48569
+
+ Box shadows on vertical inlines don't paint properly. Fix the paintBoxShadow method to treat the edges to include as
+ logical (so that top/bottom are used instead of left/right for vertical lines). In order to make my box-shadow tests
+ work I had to fix a bug in the transform code of InlineTextBox that was causing the baselines of vertical lines to
+ be wrong.
+
+ Added fast/blockflow/box-shadow-* tests
+
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::paint):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paintBoxShadow):
+ * rendering/RenderBoxModelObject.h:
+
2010-10-28 James Robinson <jamesr at chromium.org>
Reviewed by Simon Fraser.
diff --git a/WebCore/rendering/InlineTextBox.cpp b/WebCore/rendering/InlineTextBox.cpp
index 10d2f0c..909e491 100644
--- a/WebCore/rendering/InlineTextBox.cpp
+++ b/WebCore/rendering/InlineTextBox.cpp
@@ -430,23 +430,24 @@ void InlineTextBox::paint(PaintInfo& paintInfo, int tx, int ty)
GraphicsContext* context = paintInfo.context;
RenderStyle* styleToUse = renderer()->style(m_firstLine);
- int baseline = styleToUse->font().ascent();
- ty -= styleToUse->isHorizontalWritingMode() ? 0 : baseline;
+ ty -= styleToUse->isHorizontalWritingMode() ? 0 : logicalHeight();
+
IntPoint boxOrigin(m_x, m_y);
adjustForFlippedBlocksWritingMode(boxOrigin);
boxOrigin.move(tx, ty);
- IntPoint textOrigin = IntPoint(boxOrigin.x(), boxOrigin.y() + baseline);
+ IntPoint textOrigin = IntPoint(boxOrigin.x(), boxOrigin.y() + styleToUse->font().ascent());
IntRect boxRect(boxOrigin, IntSize(logicalWidth(), logicalHeight()));
if (m_isVertical) {
context->save();
- context->translate(textOrigin.x(), textOrigin.y());
+ context->translate(boxRect.x(), boxRect.bottom());
context->rotate(static_cast<float>(deg2rad(90.)));
- context->translate(-textOrigin.x(), -textOrigin.y());
+ context->translate(-boxRect.x(), -boxRect.bottom());
}
+
// Determine whether or not we have composition underlines to draw.
bool containsComposition = renderer()->node() && renderer()->frame()->editor()->compositionNode() == renderer()->node();
bool useCustomUnderlines = containsComposition && renderer()->frame()->editor()->compositionUsesCustomUnderlines();
diff --git a/WebCore/rendering/RenderBoxModelObject.cpp b/WebCore/rendering/RenderBoxModelObject.cpp
index e26e9f8..ad969b8 100644
--- a/WebCore/rendering/RenderBoxModelObject.cpp
+++ b/WebCore/rendering/RenderBoxModelObject.cpp
@@ -1634,7 +1634,7 @@ static inline void uniformlyExpandBorderRadii(int delta, IntSize& topLeft, IntSi
bottomRight.clampNegativeToZero();
}
-void RenderBoxModelObject::paintBoxShadow(GraphicsContext* context, int tx, int ty, int w, int h, const RenderStyle* s, ShadowStyle shadowStyle, bool begin, bool end)
+void RenderBoxModelObject::paintBoxShadow(GraphicsContext* context, int tx, int ty, int w, int h, const RenderStyle* s, ShadowStyle shadowStyle, bool includeLogicalLeftEdge, bool includeLogicalRightEdge)
{
// FIXME: Deal with border-image. Would be great to use border-image as a mask.
@@ -1648,36 +1648,53 @@ void RenderBoxModelObject::paintBoxShadow(GraphicsContext* context, int tx, int
IntSize bottomRight;
bool hasBorderRadius = s->hasBorderRadius();
- if (hasBorderRadius && (begin || end)) {
+ bool isHorizontal = s->isHorizontalWritingMode();
+ if (hasBorderRadius && (includeLogicalLeftEdge || includeLogicalRightEdge)) {
IntSize topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius;
s->getBorderRadiiForRect(rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
- if (begin) {
+ if (includeLogicalLeftEdge) {
if (shadowStyle == Inset) {
topLeftRadius.expand(-borderLeft(), -borderTop());
topLeftRadius.clampNegativeToZero();
- bottomLeftRadius.expand(-borderLeft(), -borderBottom());
- bottomLeftRadius.clampNegativeToZero();
+ if (isHorizontal) {
+ bottomLeftRadius.expand(-borderLeft(), -borderBottom());
+ bottomLeftRadius.clampNegativeToZero();
+ } else {
+ topRightRadius.expand(-borderRight(), -borderTop());
+ topRightRadius.clampNegativeToZero();
+ }
}
topLeft = topLeftRadius;
- bottomLeft = bottomLeftRadius;
+ if (isHorizontal)
+ bottomLeft = bottomLeftRadius;
+ else
+ topRight = topRightRadius;
}
- if (end) {
+ if (includeLogicalRightEdge) {
if (shadowStyle == Inset) {
- topRightRadius.expand(-borderRight(), -borderTop());
- topRightRadius.clampNegativeToZero();
+ if (isHorizontal) {
+ topRightRadius.expand(-borderRight(), -borderTop());
+ topRightRadius.clampNegativeToZero();
+ } else {
+ bottomLeftRadius.expand(-borderLeft(), -borderBottom());
+ bottomLeftRadius.clampNegativeToZero();
+ }
bottomRightRadius.expand(-borderRight(), -borderBottom());
bottomRightRadius.clampNegativeToZero();
}
- topRight = topRightRadius;
+ if (isHorizontal)
+ topRight = topRightRadius;
+ else
+ bottomLeft = bottomLeftRadius;
bottomRight = bottomRightRadius;
}
}
if (shadowStyle == Inset) {
- rect.move(begin ? borderLeft() : 0, borderTop());
- rect.setWidth(rect.width() - (begin ? borderLeft() : 0) - (end ? borderRight() : 0));
- rect.setHeight(rect.height() - borderTop() - borderBottom());
+ rect.move(includeLogicalLeftEdge || !isHorizontal ? borderLeft() : 0, includeLogicalLeftEdge || isHorizontal ? borderTop() : 0);
+ rect.setWidth(rect.width() - ((includeLogicalLeftEdge || !isHorizontal) ? borderLeft() : 0) - ((includeLogicalRightEdge || !isHorizontal) ? borderRight() : 0));
+ rect.setHeight(rect.height() - ((includeLogicalLeftEdge || isHorizontal) ? borderTop() : 0) - ((includeLogicalRightEdge || isHorizontal) ? borderBottom() : 0));
}
bool hasOpaqueBackground = s->visitedDependentColor(CSSPropertyBackgroundColor).isValid() && s->visitedDependentColor(CSSPropertyBackgroundColor).alpha() == 255;
@@ -1763,12 +1780,22 @@ void RenderBoxModelObject::paintBoxShadow(GraphicsContext* context, int tx, int
context->fillRect(rect, shadowColor, s->colorSpace());
continue;
}
- if (!begin) {
- holeRect.move(-max(shadowOffset.width(), 0) - shadowBlur, 0);
- holeRect.setWidth(holeRect.width() + max(shadowOffset.width(), 0) + shadowBlur);
+
+ if (!includeLogicalLeftEdge) {
+ if (isHorizontal) {
+ holeRect.move(-max(shadowOffset.width(), 0) - shadowBlur, 0);
+ holeRect.setWidth(holeRect.width() + max(shadowOffset.width(), 0) + shadowBlur);
+ } else {
+ holeRect.move(0, -max(shadowOffset.height(), 0) - shadowBlur);
+ holeRect.setHeight(holeRect.height() + max(shadowOffset.height(), 0) + shadowBlur);
+ }
+ }
+ if (!includeLogicalRightEdge) {
+ if (isHorizontal)
+ holeRect.setWidth(holeRect.width() - min(shadowOffset.width(), 0) + shadowBlur);
+ else
+ holeRect.setHeight(holeRect.height() - min(shadowOffset.height(), 0) + shadowBlur);
}
- if (!end)
- holeRect.setWidth(holeRect.width() - min(shadowOffset.width(), 0) + shadowBlur);
Color fillColor(shadowColor.red(), shadowColor.green(), shadowColor.blue(), 255);
diff --git a/WebCore/rendering/RenderBoxModelObject.h b/WebCore/rendering/RenderBoxModelObject.h
index f7f79d9..121601f 100644
--- a/WebCore/rendering/RenderBoxModelObject.h
+++ b/WebCore/rendering/RenderBoxModelObject.h
@@ -111,7 +111,7 @@ public:
void paintBorder(GraphicsContext*, int tx, int ty, int w, int h, const RenderStyle*, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true);
bool paintNinePieceImage(GraphicsContext*, int tx, int ty, int w, int h, const RenderStyle*, const NinePieceImage&, CompositeOperator = CompositeSourceOver);
- void paintBoxShadow(GraphicsContext*, int tx, int ty, int w, int h, const RenderStyle*, ShadowStyle, bool begin = true, bool end = true);
+ void paintBoxShadow(GraphicsContext*, int tx, int ty, int w, int h, const RenderStyle*, ShadowStyle, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true);
void paintFillLayerExtended(const PaintInfo&, const Color&, const FillLayer*, int tx, int ty, int width, int height, InlineFlowBox* = 0, CompositeOperator = CompositeSourceOver, RenderObject* backgroundObject = 0);
// The difference between this inline's baseline position and the line's baseline position.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list