Closed Bug 344780 Opened 18 years ago Closed 18 years ago

Make better breaking spec

Categories

(Core :: Layout: Text and Fonts, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(2 files, 3 obsolete files)

I think that we should not break the line before '+', '=' and '-'.
Because IE doesn't break the line in this point. And we allow to break after too.
So, some table layout cases, we can see only '+' or '=' or '-' line.

E.g.,

2000-01
-
01T00:00

And '-' are used for date format in some locales. I think that we should not break both before and after if around of '-' are numeric.
Status: NEW → ASSIGNED
OS: Windows 2000 → All
Hardware: PC → All
Attached patch Patch rv1.0 (obsolete) — Splinter Review
Attachment #229355 - Flags: review?(jshin1987)
Or there is another idea. That is always not breaking the line between first and second character. But I worry that way, that may have some regression.
(In reply to comment #3)
> Or there is another idea. That is always not breaking the line between first
> and second character. But I worry that way, that may have some regression.
> 

That would not fix the problem for the case of the '-' character.  Currently hyphenated words break before the hyphen which is incorrect at least in English.  hyphenated words are supposed to break following the hyphen.
(In reply to comment #4)
> (In reply to comment #3)
> > Or there is another idea. That is always not breaking the line between first
> > and second character. But I worry that way, that may have some regression.
> > 
> 
> That would not fix the problem for the case of the '-' character.  Currently
> hyphenated words break before the hyphen which is incorrect at least in
> English.  hyphenated words are supposed to break following the hyphen.

Right. Thank you.
(In reply to comment #0)
> I think that we should not break the line before '+', '=' and '-'.

And %.
(In reply to comment #6)
> (In reply to comment #0)
> > I think that we should not break the line before '+', '=' and '-'.
> 
> And %.
> 

What case is a problem?
If the previous character is numeric, not broken before '%'.
(In reply to comment #7)
> (In reply to comment #6)
> > And %.
> 
> What case is a problem?
> If the previous character is numeric, not broken before '%'.

It shouldn't break after % if the next character is numeric (e.g. %xx in URLs).
Also note that % is the modulo operator, so one could argue that it should be treated like *, +, / and so forth.
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > And %.
> > 
> > What case is a problem?
> > If the previous character is numeric, not broken before '%'.
> 
> It shouldn't break after % if the next character is numeric (e.g. %xx in URLs).

Right and good.
Breaking "$foo" is also inappropriate (see languages like Perl or PHP) and inconsistent with both IE and Opera.
Summary: Should not break the line before '+', '=' and '-' → Make better breaking spec
Attachment #229355 - Flags: review?(jshin1987) → review-
Attached patch Patch rv2.0 (obsolete) — Splinter Review
better fix.

1. Don't break after '$' for some script. (IE only breaks if previous is numeric.)
2. Don't break after '%'. But keep to break before it for get param of URL.
3. Don't break around '+' for IE compatible.
4. Don't break around '-'. But keep to break if after char is an alphabet for long word or URL.
5. Don't break around '='. But keep to break if after char is an alphabet for long URL.
6. Don't break after '\' even if after char is alphabet for escape sequence.
7. Don't break around copyright mark(U+A9) for IE compatible.
8. Don't break around reserved mark(U+AE) for IE compatible.
9. Don't break before degree sign(U+B0) even if the before character is alphabet for IE compatible.

And don't break after '.' that is bug of bug 255990.(I don't change this table.)

We have other non-compatible cases. But I think that this patch is enough for daily use. (I think that we need refactoring for more compatible. Because current spec is difficult to keep the balance between Latin text and Japanese text. Note that current spec is based on Japanese Line Breaking spec(JIS X 4051).)
Attachment #229355 - Attachment is obsolete: true
Attachment #229356 - Attachment is obsolete: true
Attachment #229686 - Flags: review?(jshin1987)
German quotation marks („x“) missing.
(In reply to comment #13)
> German quotation marks („x“) missing.

These are not below U+0100... I think that it is not a regression of bug 255990.
(In reply to comment #14)
> I think that it is not a regression of bug 255990.

Do you know where similar work has been done? It's trunk-only and probably quite new.
(In reply to comment #13)
> German quotation marks („x“) missing.

Dao, could you file a new bug on this, and mention the bug number here? Thanks.
(In reply to comment #15)
> (In reply to comment #14)
> > I think that it is not a regression of bug 255990.
> 
> Do you know where similar work has been done? It's trunk-only and probably
> quite new.
> 

Wow, I see. The patch of bug 255990 isn't affecting to only below U+100.
(In reply to comment #17)
> (In reply to comment #15)
> > (In reply to comment #14)
> > > I think that it is not a regression of bug 255990.
> > 
> > Do you know where similar work has been done? It's trunk-only and probably
> > quite new.
> > 
> 
> Wow, I see. The patch of bug 255990 isn't affecting to only below U+100.
> 

Ah, sorry. My previous comment may be wrong, I misread the code. I'll test it.
(In reply to comment #16)
> (In reply to comment #13)
> > German quotation marks („x“) missing.

I understand why this happen. Because the patch of bug 255990 removed the CJK checking in nsJISx4051LineBreaker. So, the German quotations are affected the patch. I'll check the regression range.
Attached patch Patch rv3.0Splinter Review
The General Punctuations are override as open/close class. But they are not match to Germany. We should remove the override the specifications.
Attachment #229686 - Attachment is obsolete: true
Attachment #229836 - Flags: review?(jshin1987)
Attachment #229686 - Flags: review?(jshin1987)
backed-out the original patch. I'll retry to fix it with UAX#14. If you have some ideas and suggestions, please tell me.

-> FIXED(by backed-out)
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: