Closed Bug 460441 Opened 16 years ago Closed 9 years ago

Dynamically added "…"(intl.ellipsis) breaks surrogate pair

Categories

(Core :: XUL, defect)

defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 404856

People

(Reporter: masa141421356, Assigned: m_kato)

References

()

Details

(Keywords: intl)

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3

Patches for bug 403484 and related bugs does not handle surrogate pair correctly.
intl.ellipsis can be inserted after first byte of surrogate pair.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.



It would be better to implement Core APIs that does not break surrogate pair.
Keywords: intl
Summary: Patches for bug 403484 and related bugs breaks surrogate pair → Dynamically added "…"(intl.ellipsis) breaks surrogate pair
In C++ code, we can use NS_IS_LOW_SURROGATE() and NS_IS_HIGH_SURROGATE().
nsIndexedToHTML.cpp uses them to keep surrogate pair correctly.
Blocks: 403484
Assignee: nobody → jag
Component: General → XUL
Product: Firefox → Core
QA Contact: general → xptoolkit.widgets
Version: unspecified → Trunk
Assignee: jag → nobody
For example:
http://www.google.co.jp/search?q=%F0%9D%90%B4%F0%9D%90%B4%F0%9D%90%B4%F0%9D%90%B4%F0%9D%90%B4%F0%9D%90%B4
(On Windows, It needs Cambria Math font, cantained in "MS Office" or "Power Point Viewer")
(In reply to comment #2)
> For example:
> http://www.google.co.jp/search?q=%F0%9D%90%B4%F0%9D%90%B4%F0%9D%90%B4%F0%9D%90%B4%F0%9D%90%B4%F0%9D%90%B4
> (On Windows, It needs Cambria Math font, cantained in "MS Office" or "Power
> Point Viewer")

It can be reproduced on title text of tab.
Assignee: nobody → m_kato
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attached patch fix v1 (obsolete) — Splinter Review
Attached patch fix v1.1Splinter Review
Attachment #537093 - Attachment is obsolete: true
Attachment #540006 - Flags: review?(bzbarsky)
Comment on attachment 540006 [details] [diff] [review]
fix v1.1

>-    // XXX and clusters!

This comment needs to stay.

>         case CropLeft:

In this case, ucs4 and isSurrogate should still be declared inside the for loop.

Can we try to factor out that identical-looking code instead of copy/pasting it?
Attachment #540006 - Flags: review?(bzbarsky) → review-
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: