Panel: Add floating margins to avoid overflowing content when floating
This is because we're adding the floating margin inside the panel's window, which means that the actual length of the panel ends up being (content length - floating margins). I'm just adding them back when we calculate the size of the panel.
BUG: 462130 FIXED-IN: 5.26.5
(cherry picked from commit 9d90c710)