Summary: | <span> in word-spaced text breaks width calculation, causes overflow | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | mitz | ||||||||
Component: | Layout and Rendering | Assignee: | Dave Hyatt <hyatt> | ||||||||
Status: | VERIFIED FIXED | ||||||||||
Severity: | Normal | CC: | oliver | ||||||||
Priority: | P2 | ||||||||||
Version: | 420+ | ||||||||||
Hardware: | Mac | ||||||||||
OS: | OS X 10.4 | ||||||||||
Attachments: |
|
Description
mitz
2005-08-27 03:41:46 PDT
Created attachment 3607 [details]
testcase
More wordspacing woes, confirmed in ToT as at 27/8 The current way of handling word-spacing, which is to apply it a-postriori in many different places, seems somewhat problematic to me. With the exception of negative word-spacing, I can't see what's wrong with applying it during text width calculation (i.e. in -[WebTextRenderer floatWidth...] and such ; whenever they decide that something is a space and has the width of a space, they should add word-spacing to its width). Currently, some spaces (mostly leading spaces) are initially given the width of a normal space. I tried this approach in my first patch for bug 4672, but ran into problems with negative spacing. I think I'll give it another try, because I think it could simplify things significantly. Created attachment 4629 [details]
check for non-whitespace ahead
Comment on attachment 4629 [details]
check for non-whitespace ahead
Bad idea
Created attachment 4654 [details]
Proposed patch
Add word spacing only when (and if) measuring the space that's responsible for
it.
Comment on attachment 4654 [details]
Proposed patch
Passes all layout tests except fast/css/word-space-extra.html, where the new
result is the correct one.
Comment on attachment 4654 [details]
Proposed patch
r=me
|