Bug 60459 - Inline elements are wrapped prematurely with non-zero border, margin or padding.
Summary: Inline elements are wrapped prematurely with non-zero border, margin or padding.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-09 00:46 PDT by Samuel Williams
Modified: 2011-06-06 11:33 PDT (History)
8 users (show)

See Also:


Attachments
Test case that fails. (576 bytes, text/html)
2011-05-09 00:46 PDT, Samuel Williams
no flags Details
A screen shot comparing Firefox to Safari to show the incorrect behavior. (105.87 KB, image/png)
2011-05-09 00:47 PDT, Samuel Williams
no flags Details
Compare display: inline and display: inline-block (1.20 KB, text/html)
2011-05-09 01:02 PDT, Samuel Williams
no flags Details
Patch. (25.86 KB, patch)
2011-06-04 18:27 PDT, Yael
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Williams 2011-05-09 00:46:34 PDT
Created attachment 92766 [details]
Test case that fails.

See the example.

The number of nested span elements is proportional to the amount of incorrect space required on the RHS.

Simply resize the window and you will see that the span elements are wrapped with plenty of space to spare.

This appears to be incorrect behavior, works fine in FF, but also broken in Chrome (uses WebKit too right?).

Thanks
Samuel
Comment 1 Samuel Williams 2011-05-09 00:47:24 PDT
Created attachment 92767 [details]
A screen shot comparing Firefox to Safari to show the incorrect behavior.
Comment 2 Samuel Williams 2011-05-09 01:02:11 PDT
Created attachment 92769 [details]
Compare display: inline and display: inline-block

I have been doing some more testing, and I found that if I add "display: inline-block;" to the top span, it shows how one might expect the wrapping to look. Unfortunately, inline-block isn't suitable because it doesn't break into separate pieces like a normal inline span.
Comment 3 Yael 2011-06-04 18:27:56 PDT
Created attachment 96040 [details]
Patch.
Comment 4 Eric Seidel (no email) 2011-06-04 19:49:34 PDT
This isn't a regression from earlier padding changes for bidi, right?
Comment 5 Yael 2011-06-05 06:09:01 PDT
(In reply to comment #4)
> This isn't a regression from earlier padding changes for bidi, right?

No.
I have a build of QtWebKit 2.1 from almost a year ago, and I can reproduce the error there too.
Comment 6 Eric Seidel (no email) 2011-06-05 08:24:36 PDT
Comment on attachment 96040 [details]
Patch.

Looks OK to me.  I would like mitz or leviw to comment before you land though.
Comment 7 Levi Weintraub 2011-06-06 10:30:32 PDT
(In reply to comment #6)
> (From update of attachment 96040 [details])
> Looks OK to me.  I would like mitz or leviw to comment before you land though.

LGTM! Thanks for the heads up :)
Comment 8 Yael 2011-06-06 10:52:13 PDT
(In reply to comment #7)
> (In reply to comment #6)
> > (From update of attachment 96040 [details] [details])
> > Looks OK to me.  I would like mitz or leviw to comment before you land though.
> 
> LGTM! Thanks for the heads up :)

Thank you both :)
Comment 9 WebKit Commit Bot 2011-06-06 11:33:08 PDT
Comment on attachment 96040 [details]
Patch.

Clearing flags on attachment: 96040

Committed r88175: <http://trac.webkit.org/changeset/88175>
Comment 10 WebKit Commit Bot 2011-06-06 11:33:14 PDT
All reviewed patches have been landed.  Closing bug.