Bug 62501 - Add TextRun charactersLength member
Summary: Add TextRun charactersLength member
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nikolas Zimmermann
Depends on:
Blocks: 59085
  Show dependency treegraph
Reported: 2011-06-11 01:42 PDT by Nikolas Zimmermann
Modified: 2011-06-12 05:41 PDT (History)
3 users (show)

See Also:

Patch (13.88 KB, patch)
2011-06-11 02:09 PDT, Nikolas Zimmermann
no flags Details | Formatted Diff | Diff
Patch v2 (16.38 KB, patch)
2011-06-11 04:17 PDT, Nikolas Zimmermann
krit: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolas Zimmermann 2011-06-11 01:42:03 PDT
Propagate the maximum length of the characters buffer to the TextRun, even when we're only processing a substring.

eg. in RenderText, when we're measuring:
'len' glyphs starting from 'text()->characters() + start', then there's a remaining length of 'textLength() - start' that we're not processing.
When integrating SVG Fonts with the GlyphPage concept this information is needed to properly handle ligatures.
Currently this is done by a special floatWidthUsingSVGFont that takes an "int& extraCharsAvailable" parameter.

This generalizes the concept.
Comment 1 Nikolas Zimmermann 2011-06-11 02:09:09 PDT
Created attachment 96852 [details]
Comment 2 Nikolas Zimmermann 2011-06-11 04:17:37 PDT
Created attachment 96855 [details]
Patch v2

Fix win/wx build.
Comment 3 Dirk Schulze 2011-06-11 09:50:32 PDT
Comment on attachment 96855 [details]
Patch v2

LGTM. Please think about renaming m_len to a more meaningful name in a follow up patch. r=me
Comment 4 Nikolas Zimmermann 2011-06-12 05:41:47 PDT
Landed in r88613.