DescriptionFix <dialog> centering
This patch:
1) Forces a sync layout on dialog.show() and then computes the top value that would center the dialog.
2) Uses customStyleForRenderer to center the dialog.
This satisfies the spec that dialog is centered only on dialog.show() and not re-centered on subsequent relayouts.
Before this patch, <dialog> centering occurred during dialog's layout, which doesn't work because it incorrectly depends on dialog's ancestors having been already laid out. Furthermore, it recentered on a relayout.
This patch just does vertical centering. It does not do horizontal centering and doesn't work well with writing-mode.
BUG=232268
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=148615
Patch Set 1 #
Total comments: 3
Patch Set 2 : get working for relpos #
Total comments: 1
Patch Set 3 : new approach: adjust RenderStyle in attach #Patch Set 4 : override top on style recalc, and don't make dialog's cb the icb #Patch Set 5 : use hasCustomStyleCallbacks #
Total comments: 10
Patch Set 6 : review comments and try reparenting by RenderView again #Patch Set 7 : just do centering in this patch, no reparenting logic #Patch Set 8 : fix use of PassRefPtr #
Total comments: 12
Patch Set 9 : sync #Patch Set 10 : review comments #
Messages
Total messages: 21 (0 generated)
|