Bug 39352 - Block inside Inline Float fail
Summary: Block inside Inline Float fail
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL: data:text/html,<html><body><p><span s...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-19 04:48 PDT by tbsmark86
Modified: 2012-11-06 08:57 PST (History)
3 users (show)

See Also:


Attachments
testcase (3.10 KB, text/html)
2010-05-19 04:48 PDT, tbsmark86
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description tbsmark86 2010-05-19 04:48:34 PDT
Created attachment 56482 [details]
testcase

Layout of Code like
<span style="float:left;"><div>..</div</span>
fails if surrounded with a <p>:
<p><span style="float:left"><div>..</div</span></p>

Without <p> it display as intend but with <p> an additional line break is added.
Comment 1 Robert Hogan 2012-11-05 13:50:53 PST
Reduction is:

<html>
<body>
<p><span style="float: left;"><div style="background: green;">Block</div></span></p>
</body>
</html>

For some reason, this gets the RenderTree:

  RenderBlock {HTML} at (0,0) size 800x600
    RenderBody {BODY} at (8,8) size 784x576
      RenderBlock {P} at (0,0) size 784x0
        RenderBlock (floating) {SPAN} at (0,0) size 0x0
      RenderBlock {DIV} at (0,0) size 784x20 [bgcolor=#008000]
        RenderText {#text} at (0,0) size 36x19
          text run at (0,0) width 36: "Block"
      RenderBlock {P} at (0,36) size 784x0

Clearly the 'RenderBlock {DIV}' should not have RenderBody as its parent.

So may well be a parsing issue: Eric, any clues where to start looking?
Comment 2 Adam Barth 2012-11-05 14:12:45 PST
> Clearly the 'RenderBlock {DIV}' should not have RenderBody as its parent.

Why do you say that?  The <div> closes the <p>.
Comment 3 Robert Hogan 2012-11-06 08:57:17 PST
(In reply to comment #2)
> > Clearly the 'RenderBlock {DIV}' should not have RenderBody as its parent.
> 
> Why do you say that?  The <div> closes the <p>.

Ah OK - thanks.

I'm going to close this as invalid in that case.