Note: There are a few cases of duplicates in user autocompletion which are being worked on.

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

RESOLVED FIXED in mozilla15

Status

()

Core
Layout: Text
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jfkthame, Assigned: jfkthame)

Tracking

unspecified
mozilla15
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

5 years ago
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.
(Assignee)

Comment 1

5 years ago
Created attachment 621934 [details] [diff] [review]
patch, don't allow word break within cluster when copying glyph data for text-transform

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)
(Assignee)

Comment 2

5 years ago
Created attachment 621935 [details] [diff] [review]
reftest for word-break, clusters, text-transform
Attachment #621935 - Flags: review?(smontagu)
Attachment #621934 - Flags: review?(smontagu) → review+
Attachment #621935 - Flags: review?(smontagu) → review+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/32837f32c4b6
https://hg.mozilla.org/integration/mozilla-inbound/rev/141e694667c7
Target Milestone: --- → mozilla15
https://hg.mozilla.org/mozilla-central/rev/32837f32c4b6
https://hg.mozilla.org/mozilla-central/rev/141e694667c7
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.