RESOLVED WONTFIX 103719
Implement anchored positioning used by <dialog>
https://bugs.webkit.org/show_bug.cgi?id=103719
Summary Implement anchored positioning used by <dialog>
Matt Falkenhagen
Reported 2012-11-30 00:40:30 PST
<dialog> elements can be anchored to other elements, specified in the call show/showModal(): dialog.show(anchor); The spec calls this magical alignment: http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#magically-aligned
Attachments
work in progress patch (18.77 KB, patch)
2012-11-30 00:51 PST, Matt Falkenhagen
no flags
Matt Falkenhagen
Comment 1 2012-11-30 00:51:13 PST
Created attachment 176914 [details] work in progress patch
Matt Falkenhagen
Comment 2 2012-11-30 00:58:51 PST
This patch is very much a WIP but I hope it can spark some discussion. I think the anchored positioning step must occur after normal layout, or else we don't know where the anchor itself is be positioned. The tricky part is that an anchor can itself be anchored to something else (or it may be in the subtree of an anchored object). So the order in which the anchored objects are processed is important. This WIP patch simply traverses the render tree but this is incorrect. The order of anchoring has nothing to do with the render tree structure. I think we need to somehow build a anchored object tree, and then traverse that instead.
Simon Fraser (smfr)
Comment 3 2012-11-30 09:21:59 PST
If the anchor target is being animated, should the dialog also move around?
Matt Falkenhagen
Comment 4 2012-12-02 21:32:22 PST
(In reply to comment #3) > If the anchor target is being animated, should the dialog also move around? Yes, I think so. If I'm interpreting the spec correctly, the dialog follows the anchor if its position is changed dynamically. It looks like animations can be considered the same thing. Is it more difficult to handle following an animated anchor?
Simon Fraser (smfr)
Comment 5 2012-12-02 22:08:35 PST
(In reply to comment #4) > (In reply to comment #3) > > If the anchor target is being animated, should the dialog also move around? > > Yes, I think so. If I'm interpreting the spec correctly, the dialog follows the anchor if its position is changed dynamically. It looks like animations can be considered the same thing. > > Is it more difficult to handle following an animated anchor? Yes, in some cases. You also need to consider the effects of CSS transforms on your target.
Tim Nguyen (:ntim)
Comment 6 2021-04-23 14:53:58 PDT
This has been removed from the spec.
Note You need to log in before you can comment on or make changes to this bug.