Bug 1619169 - Duplicate ExpandHeightForViewportUnits to ExpandHeightForDynamicToolbar...
commitdc8db2c29103f7fb739600fd1e1dff9c7c2a8529
authorHiroyuki Ikezoe <hikezoe.birchill@mozilla.com>
Sat, 6 Jun 2020 04:44:54 +0000 (6 04:44 +0000)
committerHiroyuki Ikezoe <hikezoe.birchill@mozilla.com>
Sat, 6 Jun 2020 04:44:54 +0000 (6 04:44 +0000)
tree521f7ad9ed3ca068d514b5ddccc7bcf7cf2578ec
parent72a33db2ac6f5f82f271d42d204aa90b244a9627
Bug 1619169 - Duplicate ExpandHeightForViewportUnits to ExpandHeightForDynamicToolbar. r=botond

And use the duplicated one at the places where we need the expanded size for
interactions with the dynamic toolbar on the compositor. The new function will
be modified in the next commit.

Note that the only one remaining call site of ExpandHeightForViewportUnits is
for window.inner{Width,Height}. For window.inner{Width,Height} we don't yet
return the layout viewport (which might be expanded by the minimum-scale), it's
going to be fixed in bug 1598487 [1], but it's not ready to fix because there
also need fixes in comm-central (see dependencies in the bug).  So for now, we
should keep the current behavior for window.inner{Width,Height}.

Also note that it's not yet clear whether we will eventually replace the last
call site of ExpandHeightForViewportUnits with ExpandHeightForDynamicToolbar
since the value corresponding to the dynamic toolbar might _NOT_ be affected by
the minimum-scale in some cases.  See bug 1641166 for details.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1598487
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1641166

Differential Revision: https://phabricator.services.mozilla.com/D78440
layout/base/nsLayoutUtils.cpp
layout/base/nsLayoutUtils.h
layout/generic/nsGfxScrollFrame.cpp