Bug 106538 - Top layer fails for inline elements
Summary: Top layer fails for inline elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Matt Falkenhagen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-10 01:33 PST by Matt Falkenhagen
Modified: 2013-01-17 17:35 PST (History)
10 users (show)

See Also:


Attachments
Patch (11.87 KB, patch)
2013-01-15 00:23 PST, Matt Falkenhagen
no flags Details | Formatted Diff | Diff
patch for landing (11.89 KB, patch)
2013-01-17 00:59 PST, Matt Falkenhagen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Falkenhagen 2013-01-10 01:33:45 PST
When RenderLayer::rebuildZOrderLists traverses RenderView's children to collect top layer elements, it fails if a top layer element is inline, because it is wrapped in an anonymous block.

So the following fails when dialog.showModal() is called:
<body><dialog style="position:static"></body>

I think this can be solved with a special child of RenderView that the top layer renderers are added to. This is probably cleaner for when we implement :backdrop as well.
Comment 1 Matt Falkenhagen 2013-01-10 23:14:44 PST
Actually it seems top layer elements should never be in-flow. The spec says for a top layer element:
  "If its specified position property is static, it computes to absolute."

There is no mention of 'relative', though. Shouldn't relative also compute to absolute? I'll write to WHATWG.
Comment 2 Matt Falkenhagen 2013-01-15 00:23:45 PST
Created attachment 182710 [details]
Patch
Comment 3 Matt Falkenhagen 2013-01-15 00:25:28 PST
The Fullscreen spec has been updated to make clear that there are no in-flow elements in the top layer; 'static' and 'relative' compute to 'absolute'. I've uploaded a patch to do this.
Comment 4 Hajime Morrita 2013-01-17 00:44:47 PST
Comment on attachment 182710 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=182710&action=review

> Source/WebCore/ChangeLog:12
> +        anonymous block was added to the top layer.

It's worth referring the spec section here.
Comment 5 Matt Falkenhagen 2013-01-17 00:59:37 PST
Created attachment 183138 [details]
patch for landing
Comment 6 WebKit Review Bot 2013-01-17 17:35:55 PST
Comment on attachment 183138 [details]
patch for landing

Clearing flags on attachment: 183138

Committed r140075: <http://trac.webkit.org/changeset/140075>
Comment 7 WebKit Review Bot 2013-01-17 17:35:59 PST
All reviewed patches have been landed.  Closing bug.