Bug 62501

Summary: Add TextRun charactersLength member
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: Layout and RenderingAssignee: Nikolas Zimmermann <zimmermann>
Status: RESOLVED FIXED    
Severity: Normal CC: kling, krit, rwlbuis
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 59085    
Attachments:
Description Flags
Patch
none
Patch v2 krit: review+

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]
Patch
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.