Last Comment Bug 752455 - text-transform disrupts cluster support in word-break:break-all
: text-transform disrupts cluster support in word-break:break-all
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Layout: Text (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla15
Assigned To: Jonathan Kew (:jfkthame)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-07 04:01 PDT by Jonathan Kew (:jfkthame)
Modified: 2012-05-18 18:17 PDT (History)
2 users (show)
ryanvm: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch, don't allow word break within cluster when copying glyph data for text-transform (1.15 KB, patch)
2012-05-08 04:41 PDT, Jonathan Kew (:jfkthame)
smontagu: review+
Details | Diff | Splinter Review
reftest for word-break, clusters, text-transform (2.68 KB, patch)
2012-05-08 04:42 PDT, Jonathan Kew (:jfkthame)
smontagu: review+
Details | Diff | Splinter Review

Description Jonathan Kew (:jfkthame) 2012-05-07 04:01:05 PDT
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.
Comment 1 Jonathan Kew (:jfkthame) 2012-05-08 04:41:39 PDT
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.
Comment 2 Jonathan Kew (:jfkthame) 2012-05-08 04:42:39 PDT
Created attachment 621935 [details] [diff] [review]
reftest for word-break, clusters, text-transform

Note You need to log in before you can comment on or make changes to this bug.