Closed
Bug 1277894
Opened 9 years ago
Closed 9 years ago
Support surrogate pair when cropping XUL label.
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
RESOLVED
DUPLICATE
of bug 1164759
Tracking | Status | |
---|---|---|
firefox49 | --- | affected |
People
(Reporter: arai, Assigned: arai)
Details
Attachments
(1 file)
204 bytes,
text/html
|
Details |
Currently surrogate pair is totally ignored when cropping text in XUL element.
This results in broken title in Tab, when it crops title text at the middle of surrogate pair.
We should support it, as webpages could use emoji in their title, and in most case Tab cannot show entire title.
----
Testcase A (Tab title)
1. open attached HTML
2. add and remove other tabs
Actual result:
sometimes emoji is shown and sometimes box with code is shown
Expected result:
always emoji is shown
----
Testcase B (all crop variants):
1. evaluate the following code in Scratchpad, with Browser environment.
it adds 3 labels at the bottom of the browser window
var w = Services.wm.getMostRecentWindow("navigator:browser");
var l = w.document.createElement("label");
l.setAttribute("value", ("\uD83D\uDC38\uD83C\uDF40\uD83D\uDC9A").repeat(20));
l.setAttribute("crop", "start");
w.document.documentElement.appendChild(l);
l = l.cloneNode(false);
l.setAttribute("crop", "end");
w.document.documentElement.appendChild(l);
l = l.cloneNode(false);
l.setAttribute("crop", "center");
w.document.documentElement.appendChild(l);
2. resize the browser window gradually to make those labels cropped
Actual result:
sometimes emoji is shown and sometimes box with code is shown
Expected result:
always emoji is shown
Assignee | ||
Comment 1•9 years ago
|
||
testing a patch.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=89758d73d634
Comment 2•9 years ago
|
||
There's already a patch for this in bug 1164759. It works but the test doesn't.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•