Last Comment Bug 156369 - A return code between CJK character and html tag or spaces convert an extra space
: A return code between CJK character and html tag or spaces convert an extra s...
Status: NEW
: intl
Product: Core
Classification: Components
Component: Layout: Misc Code (show other bugs)
: Trunk
: All All
: -- normal with 6 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 295483
Blocks: css-text-3 289130
  Show dependency treegraph
 
Reported: 2002-07-08 17:33 PDT by Yuying Long
Modified: 2015-08-09 08:41 PDT (History)
19 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (466 bytes, text/html)
2003-02-01 06:55 PST, Hideo Saito
no flags Details
patch (13.92 KB, patch)
2003-02-01 06:57 PST, Hideo Saito
no flags Details | Diff | Splinter Review
screen shot (4.06 KB, image/x-png)
2003-02-01 06:59 PST, Hideo Saito
no flags Details
patch (21.76 KB, patch)
2003-02-08 10:46 PST, Hideo Saito
no flags Details | Diff | Splinter Review
patch for mozilla-1.3b (21.17 KB, patch)
2003-02-15 08:35 PST, Hideo Saito
no flags Details | Diff | Splinter Review
testcase3 (658 bytes, text/html)
2003-03-15 14:43 PST, Hideo Saito
no flags Details
screen shot of testcase3 (26.18 KB, image/x-png)
2003-03-15 14:45 PST, Hideo Saito
no flags Details
patch (22.72 KB, patch)
2003-03-15 14:47 PST, Hideo Saito
no flags Details | Diff | Splinter Review

Description Yuying Long 2002-07-08 17:33:33 PDT
Build: 07-08 1.0.1 branch build

This is for left over problems in bug 135323.
After fix for bug 135323, there are still two problems:
1. When there is a return code HTML tag mixed together with character(s),
there still like "an extra space" shows in browser window.
http://www.asahi-net.or.jp/~wq6k-yn/para.html

Please see the screen shot for detail:
http://bugzilla.mozilla.org/attachment.cgi?id=89971&action=view
Notice when copy/paste the string from Broswer window to Composer, seems won't
see the extra space.

2. When the HTML source has space(s) between return code, like page:
http://www.php.net/manual/ja/function.setcookie.php or:
http://www.vinelinux.org/
There is a single byte space between 2 characters. 
On Netscape I can highlight the space between characters while on IE I can not.
Comment 1 Roy Yokoyama 2002-07-08 17:41:59 PDT
giving to shanjian
Comment 2 nhottanscp 2002-07-08 17:43:53 PDT
cc to smontagu.
Comment 3 Shanjian Li 2002-12-02 14:50:53 PST
accepting
Comment 4 Hideo Saito 2003-02-01 06:55:41 PST
Created attachment 113290 [details]
testcase
Comment 5 Hideo Saito 2003-02-01 06:57:52 PST
Created attachment 113291 [details] [diff] [review]
patch

A return code with the CJK character is skipped. It does not skip, when if
follows a space code. It does not correspond to a string search yet.
The effect of a patch was checked by mozilla-1.2.1.
Comment 6 Hideo Saito 2003-02-01 06:59:15 PST
Created attachment 113292 [details]
screen shot
Comment 7 Hideo Saito 2003-02-08 10:46:11 PST
Created attachment 113902 [details] [diff] [review]
patch

The patch for searching a string mixed CJK characters with a '\n' was added.
Related bug report is shown below.

Bug-org 166127
Search string in Japanese doesn't match exactly
Comment 8 Hideo Saito 2003-02-08 10:53:24 PST
> Bug-org 166127
Bug 166127
Search string in Japanese doesn't match exactly
Comment 9 Hideo Saito 2003-02-10 00:15:28 PST
ylong-san said:
1. When there is a return code HTML tag mixed together with character(s),
there still like "an extra space" shows in browser window.
2. When the HTML source has space(s) between return code,
there is a single byte space between 2 characters. 

This patch is related only to the first problem. We may not desire to skip a
space that is inserted explicitly between an English character and a CJK
character although we may desire to skip space(s) for the indent after a
new-line. I wish to examine the second problem after the first problem fixes.
Comment 10 Hideo Saito 2003-02-15 08:35:35 PST
Created attachment 114546 [details] [diff] [review]
patch for mozilla-1.3b
Comment 11 Hideo Saito 2003-03-15 14:43:15 PST
Created attachment 117344 [details]
testcase3
Comment 12 Hideo Saito 2003-03-15 14:45:48 PST
Created attachment 117345 [details]
screen shot of testcase3
Comment 13 Hideo Saito 2003-03-15 14:47:49 PST
Created attachment 117346 [details] [diff] [review]
patch
Comment 14 Hideo Saito 2003-03-15 15:00:26 PST
The space following a new-line is also deleted.
It is a patch for release version 1.3b.
I will rewrite for 1.3.
Comment 15 Jungshik Shin 2003-10-28 10:28:32 PST
It's not just layout (patches here also deal with 'find'), but layout takes a
significant portion of patches here. so, I'm changing the component (not sure
exactly which component of layout)..
Comment 16 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-05-23 01:43:01 PDT
Taking this.

I think that this should be fixed as:

{
  linefeed-treatment: auto;
  white-space-treatment: ignore-if-surrounding-linefeed;
}

See http://www.w3.org/TR/css3-text/#white-space-props
Comment 17 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-08-12 21:45:41 PDT
Jungshik:

Currently, we always remove the line-feed if its each sides are Kanji or Kana.
I.e.,

ab<-
cd

In this case, if 'b' and 'c' are IS_CJ_CHAR, we remove the line-feed character.

I think this behavior is wrong for Korean. Do you think it?
Comment 18 Jungshik Shin 2005-08-13 01:57:04 PDT
(In reply to comment #17)
> Jungshik:
> 
> Currently, we always remove the line-feed if its each sides are Kanji or Kana.
> I.e.,
> 
> ab<-
> cd
> 
> In this case, if 'b' and 'c' are IS_CJ_CHAR, we remove the line-feed character.
> 
> I think this behavior is wrong for Korean. Do you think it?


It depends. If lines are broken (by the author of a document by inserting
'linefeed' character)  within a single word, the current behavior is correct. If
lines are broken between two adjacent words, the current behavior is wrong. It's
far from trivial to distinguish between two cases automatically. However, it's
rather rare that a linefeed is inserted by the author of a document to break
lines *within* a word so that you have a point. We'd better NOT remove
'linefeed' between two Korean syllables. 

Note You need to log in before you can comment on or make changes to this bug.