[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
mitz at apple.com
mitz at apple.com
Sun Feb 20 23:36:25 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 36b07b186c9c2ff3f45181dc0cec23c29429cd91
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Jan 22 01:31:05 2011 +0000
Inconsistent handling of no-break space in justification logic
https://bugs.webkit.org/show_bug.cgi?id=52938
Reviewed by Adele Peterson.
Source/WebCore:
Test: fast/text/justify-nbsp.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Count no-break space as a
space when computing the distribution of space between text boxes on the line.
LayoutTests:
* fast/text/justify-nbsp-expected.checksum: Added.
* fast/text/justify-nbsp-expected.png: Added.
* fast/text/justify-nbsp-expected.txt: Added.
* fast/text/justify-nbsp.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76414 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c631294..1e82df0 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2011-01-21 Dan Bernstein <mitz at apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Inconsistent handling of no-break space in justification logic
+ https://bugs.webkit.org/show_bug.cgi?id=52938
+
+ * fast/text/justify-nbsp-expected.checksum: Added.
+ * fast/text/justify-nbsp-expected.png: Added.
+ * fast/text/justify-nbsp-expected.txt: Added.
+ * fast/text/justify-nbsp.html: Added.
+
2011-01-21 Kenji Imasaki <imasaki at chromium.org>
Reviewed by David Levin.
diff --git a/LayoutTests/fast/text/justify-nbsp-expected.checksum b/LayoutTests/fast/text/justify-nbsp-expected.checksum
new file mode 100644
index 0000000..d9cbf2b
--- /dev/null
+++ b/LayoutTests/fast/text/justify-nbsp-expected.checksum
@@ -0,0 +1 @@
+e4619e5fe9b2a7ed9c527e369d45d956
\ No newline at end of file
diff --git a/LayoutTests/fast/text/justify-nbsp-expected.png b/LayoutTests/fast/text/justify-nbsp-expected.png
new file mode 100644
index 0000000..f7df8f8
Binary files /dev/null and b/LayoutTests/fast/text/justify-nbsp-expected.png differ
diff --git a/LayoutTests/fast/text/justify-nbsp-expected.txt b/LayoutTests/fast/text/justify-nbsp-expected.txt
new file mode 100644
index 0000000..bd87a87
--- /dev/null
+++ b/LayoutTests/fast/text/justify-nbsp-expected.txt
@@ -0,0 +1,19 @@
+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 656x206 [border: (3px solid #0000FF)]
+ RenderInline {SPAN} at (0,0) size 357x25
+ RenderText {#text} at (3,15) size 357x25
+ text run at (3,15) width 357: "a b c d "
+ RenderText {#text} at (360,15) size 650x75
+ text run at (360,15) width 293: "e f g h"
+ text run at (3,65) width 300: "xxxxxxxxxxx "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderInline {SPAN} at (0,0) size 357x25
+ RenderText {#text} at (3,115) size 357x25
+ text run at (3,115) width 357: "a b c d "
+ RenderText {#text} at (360,115) size 650x75
+ text run at (360,115) width 293: "e f g h"
+ text run at (3,165) width 275: "xxxxxxxxxxx"
diff --git a/LayoutTests/fast/text/justify-nbsp.html b/LayoutTests/fast/text/justify-nbsp.html
new file mode 100644
index 0000000..cbe3d45
--- /dev/null
+++ b/LayoutTests/fast/text/justify-nbsp.html
@@ -0,0 +1,5 @@
+<div contenteditable style="border: solid blue; font: 25px ahem; width: 650px; text-align: justify; line-height: 2; -webkit-font-smoothing: none;">
+ <span>a b c d </span>e f g h xxxxxxxxxxx
+ <br>
+ <span>a b c d </span>e f g h xxxxxxxxxxx
+</div>
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index d523cdb..ab35d57 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-21 Dan Bernstein <mitz at apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Inconsistent handling of no-break space in justification logic
+ https://bugs.webkit.org/show_bug.cgi?id=52938
+
+ Test: fast/text/justify-nbsp.html
+
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Count no-break space as a
+ space when computing the distribution of space between text boxes on the line.
+
2011-01-21 Charlie Reis <creis at chromium.org>
Reviewed by Darin Fisher.
diff --git a/Source/WebCore/rendering/RenderBlockLineLayout.cpp b/Source/WebCore/rendering/RenderBlockLineLayout.cpp
index 5dc49e2..108f529 100644
--- a/Source/WebCore/rendering/RenderBlockLineLayout.cpp
+++ b/Source/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -325,7 +325,7 @@ void RenderBlock::computeInlineDirectionPositionsForLine(RootInlineBox* lineBox,
const UChar* characters = rt->characters();
for (int i = r->m_start; i < r->m_stop; i++) {
UChar c = characters[i];
- if (c == ' ' || c == '\n' || c == '\t')
+ if (Font::treatAsSpace(c))
numSpaces++;
}
}
@@ -447,7 +447,7 @@ void RenderBlock::computeInlineDirectionPositionsForLine(RootInlineBox* lineBox,
const UChar* characters = toRenderText(r->m_object)->characters();
for (int i = r->m_start; i < r->m_stop; i++) {
UChar c = characters[i];
- if (c == ' ' || c == '\n' || c == '\t')
+ if (Font::treatAsSpace(c))
spaces++;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list