[Webkit-unassigned] [Bug 90670] Vertically center non-anchored <dialog> elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 31 17:56:16 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=90670





--- Comment #8 from Matt Falkenhagen <falken at chromium.org>  2012-07-31 17:56:16 PST ---
(In reply to comment #7)
> (In reply to comment #6)
> > It's looking tricky to get a non-fixed position element to be positioned like a fixed element.
> 
> Why is it not a fixed position element? Don't we set position:fixed in html.css?

As mentioned in comments #2-4, it's position:absolute in the spec and html.css.

> > Now I'm trying to alter code that gets called during layout like RenderBox::computePositionedLogicalHeight to use an effective top value for getting the dialog to be centered. This will mean triggering layout on a scroll, for dialog elements.
> 
> I think you probably need a RenderDialog class that subclasses RenderBlock and overrides layout to set the static inline/block positions (e.g. see adjustPositionedBlock) and the continue with RenderBlock's regular layout.

Thanks for the idea! I'll give this a try.

> You might need to do some more to get it to reposition on resizing the window. Actually, it is supposed to reposition when you resize the window?

It seems it should reposition on resize. The spec says the default static position should be computed such that the dialog is centered, and "this top static position must remain the element's top static position until it is next changed by the above algorithm or the next one." http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#the-dialog-element

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list