[Webkit-unassigned] [Bug 17411] Ideographic comma and full stop should be treated as line-breakable characters
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Feb 17 09:39:09 PST 2008
http://bugs.webkit.org/show_bug.cgi?id=17411
------- Comment #2 from artension at gmail.com 2008-02-17 09:39 PDT -------
(From update of attachment 19178)
Index: WebCore/ChangeLog
===================================================================
--- WebCore/ChangeLog (revision 30355)
+++ WebCore/ChangeLog (working copy)
@@ -1,3 +1,17 @@
+2008-02-17 Satoshi Nakagawa <artension at gmail.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ Bug 17411: Ideographic comma and full stop should be treated as
line-breakable characters
+ http://bugs.webkit.org/show_bug.cgi?id=17411
+
+ Test: fast/text/line-breaks-after-ideographic-comma-or-full-stop.html
+
+ * ChangeLog:
+ * platform/text/CharacterNames.h:
+ * rendering/break_lines.cpp:
+ (WebCore::shouldBreakAfter):
+
2008-02-17 Bin Chen <binary.chen at gmail.com>
Reviewed by Alp Toker.
Index: WebCore/platform/text/CharacterNames.h
===================================================================
--- WebCore/platform/text/CharacterNames.h (revision 30353)
+++ WebCore/platform/text/CharacterNames.h (working copy)
@@ -39,6 +39,8 @@ namespace WebCore {
const UChar bullet = 0x2022;
const UChar horizontalEllipsis = 0x2026;
const UChar ideographicSpace = 0x3000;
+ const UChar ideographicComma = 0x3001;
+ const UChar ideographicFullStop = 0x3002;
const UChar leftToRightMark = 0x200E;
const UChar leftToRightEmbed = 0x202A;
const UChar leftToRightOverride = 0x202D;
Index: WebCore/rendering/break_lines.cpp
===================================================================
--- WebCore/rendering/break_lines.cpp (revision 30353)
+++ WebCore/rendering/break_lines.cpp (working copy)
@@ -51,6 +51,8 @@ static inline bool shouldBreakAfter(UCha
case '-':
case '?':
case softHyphen:
+ case ideographicComma:
+ case ideographicFullStop:
return true;
default:
return false;
Index: LayoutTests/ChangeLog
===================================================================
--- LayoutTests/ChangeLog (revision 30355)
+++ LayoutTests/ChangeLog (working copy)
@@ -1,3 +1,11 @@
+2008-02-17 Satoshi Nakagawa <artension at gmail.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ - test for http://bugs.webkit.org/show_bug.cgi?id=17411
+
+ * fast/text/line-breaks-after-ideographic-comma-or-full-stop.html:
Added.
+
2008-02-17 Dan Bernstein <mitz at apple.com>
Reviewed by Darin Adler.
Index:
LayoutTests/fast/text/line-breaks-after-ideographic-comma-or-full-stop.html
===================================================================
--- LayoutTests/fast/text/line-breaks-after-ideographic-comma-or-full-stop.html
(revision 0)
+++ LayoutTests/fast/text/line-breaks-after-ideographic-comma-or-full-stop.html
(revision 0)
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <title>Line breaks after ideographic comma or full stop</title>
+ </head>
+ <body>
+ These are good:
+ <div style="font-family:'Lucida Grande'; font-size:16pt;
text-decoration:underline; width:5em;">
+ <p style="border:solid green 1px;">
+ あいう、<br/>abc
+ </p>
+ <p style="border:solid green 1px;">
+ あいう。<br/>abc
+ </p>
+ </div>
+ The following two should look like “good”:
+ <div style="font-family:'Lucida Grande'; font-size:16pt;
text-decoration:underline; width:5em;">
+ <p style="border:solid blue 1px;">
+ あいう、abc
+ </p>
+ <p style="border:solid blue 1px;">
+ あいう。abc
+ </p>
+ </div>
+ These are bad:
+ <div style="font-family:'Lucida Grande'; font-size:16pt;
text-decoration:underline; width:5em;">
+ <p style="border:solid red 1px;">
+ あい<br/>う、abc
+ </p>
+ <p style="border:solid red 1px;">
+ あい<br/>う。abc
+ </p>
+ </div>
+ </body>
+</html>
Index:
LayoutTests/platform/mac/fast/text/line-breaks-after-ideographic-comma-or-full-stop-expected.txt
===================================================================
---
LayoutTests/platform/mac/fast/text/line-breaks-after-ideographic-comma-or-full-stop-expected.txt
(revision 0)
+++
LayoutTests/platform/mac/fast/text/line-breaks-after-ideographic-comma-or-full-stop-expected.txt
(revision 0)
@@ -0,0 +1,49 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x551
+ RenderBlock {HTML} at (0,0) size 800x551
+ RenderBody {BODY} at (8,8) size 784x522
+ RenderBlock (anonymous) at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 101x18
+ text run at (0,0) width 101: "These are good:"
+ RenderBlock {DIV} at (0,39) size 100x121
+ RenderBlock {P} at (0,0) size 100x50 [border: (1px solid #008000)]
+ RenderText {#text} at (1,1) size 84x24
+ text run at (1,1) width 84: "\x{3042}\x{3044}\x{3046}\x{3001}"
+ RenderBR {BR} at (85,21) size 0x0
+ RenderText {#text} at (1,25) size 36x24
+ text run at (1,25) width 36: "abc"
+ RenderBlock {P} at (0,71) size 100x50 [border: (1px solid #008000)]
+ RenderText {#text} at (1,1) size 84x24
+ text run at (1,1) width 84: "\x{3042}\x{3044}\x{3046}\x{3002}"
+ RenderBR {BR} at (85,21) size 0x0
+ RenderText {#text} at (1,25) size 36x24
+ text run at (1,25) width 36: "abc"
+ RenderBlock (anonymous) at (0,181) size 784x18
+ RenderText {#text} at (0,0) size 277x18
+ text run at (0,0) width 277: "The following two should look like
\x{201C}good\x{201D}:"
+ RenderBlock {DIV} at (0,220) size 100x121
+ RenderBlock {P} at (0,0) size 100x50 [border: (1px solid #0000FF)]
+ RenderText {#text} at (1,1) size 84x48
+ text run at (1,1) width 84: "\x{3042}\x{3044}\x{3046}\x{3001}"
+ text run at (1,25) width 36: "abc"
+ RenderBlock {P} at (0,71) size 100x50 [border: (1px solid #0000FF)]
+ RenderText {#text} at (1,1) size 84x48
+ text run at (1,1) width 84: "\x{3042}\x{3044}\x{3046}\x{3002}"
+ text run at (1,25) width 36: "abc"
+ RenderBlock (anonymous) at (0,362) size 784x18
+ RenderText {#text} at (0,0) size 92x18
+ text run at (0,0) width 92: "These are bad:"
+ RenderBlock {DIV} at (0,401) size 100x121
+ RenderBlock {P} at (0,0) size 100x50 [border: (1px solid #FF0000)]
+ RenderText {#text} at (1,1) size 42x24
+ text run at (1,1) width 42: "\x{3042}\x{3044}"
+ RenderBR {BR} at (43,21) size 0x0
+ RenderText {#text} at (1,25) size 78x24
+ text run at (1,25) width 78: "\x{3046}\x{3001}abc"
+ RenderBlock {P} at (0,71) size 100x50 [border: (1px solid #FF0000)]
+ RenderText {#text} at (1,1) size 42x24
+ text run at (1,1) width 42: "\x{3042}\x{3044}"
+ RenderBR {BR} at (43,21) size 0x0
+ RenderText {#text} at (1,25) size 78x24
+ text run at (1,25) width 78: "\x{3046}\x{3002}abc"
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list