Closed Bug 752455 Opened 12 years ago Closed 12 years ago

text-transform disrupts cluster support in word-break:break-all

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: jfkthame, Assigned: jfkthame)

Details

Attachments

(2 files)

With the patches currently in bug 249159 to implement the word-break property, there's an unwanted interaction with text-transform.

Comparing these two examples,

  data:text/html;charset=utf-8,
    <div style="width:0px;word-break:break-all">
    foob%CC%A5ar

  data:text/html;charset=utf-8,
    <div style="text-transform:lowercase;width:0px;word-break:break-all">
    foob%CC%A5ar

the results should be identical (the 'b' and combining ring below should remain together as a cluster), but the version with text-transform:lowercase incorrectly splits this onto separate lines.
The problem here arises because we set word-break positions on the destination textrun's characterGlyph array before we've done the RebuildTextRun for text-transform, but at that point it had no cluster information and so gfxTextRun::SetPotentialLineBreaks didn't suppress those breaks.

CopyGlyphDataFrom has the cluster data available in its source run, so it needs to remove any potential breaks in the destination that turn out to be inside clusters.
Assignee: nobody → jfkthame
Attachment #621934 - Flags: review?(smontagu)
Attachment #621934 - Flags: review?(smontagu) → review+
Attachment #621935 - Flags: review?(smontagu) → review+
https://hg.mozilla.org/mozilla-central/rev/32837f32c4b6
https://hg.mozilla.org/mozilla-central/rev/141e694667c7
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: