mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 04:09:50 +00:00
Bug 1918178 - Flush position:fixed elements' frames unconditionally when the dynamic toolbar is completely hidden or fully visible. r=botond
Unfortunately we can't write any automated tests for this bug as of now since a) GeckoView test runnner doesn't support dynamic toolbars, thus we can't use reftest or mochitest here. b) JUnit test can handle dynamic toolbar movements, but the software keyboardu doesn't appear in JUnit test for some reasons. Differential Revision: https://phabricator.services.mozilla.com/D224569
This commit is contained in:
parent
78b232fba8
commit
3001d8945b
@ -3117,17 +3117,15 @@ void nsPresContext::UpdateDynamicToolbarOffset(ScreenIntCoord aOffset) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (interactiveWidget == InteractiveWidget::ResizesContent ||
|
||||
mKeyboardHeight == 0) {
|
||||
// On resizes-content mode or the software keyboard is not visible, forcibly
|
||||
// flush position:fixed elements in the case where the dynamic toolbar is
|
||||
// going to be completely hidden or starts to be visible so that %-based
|
||||
// style values will be recomputed with the visual viewport size which is
|
||||
// including the area covered by the dynamic toolbar.
|
||||
if (mDynamicToolbarHeight == 0 || aOffset == -mDynamicToolbarMaxHeight) {
|
||||
mPresShell->MarkFixedFramesForReflow(IntrinsicDirty::None);
|
||||
mPresShell->AddResizeEventFlushObserverIfNeeded();
|
||||
}
|
||||
// Forcibly flush position:fixed elements in the case where the dynamic
|
||||
// toolbar is going to be completely hidden or starts to be visible so that
|
||||
// %-based style values will be recomputed with the visual viewport size
|
||||
// which is including the area covered by the dynamic toolbar, it also ensures
|
||||
// that each position:fixed element is painted at the correct position on the
|
||||
// main-thread.
|
||||
if (mDynamicToolbarHeight == 0 || aOffset == -mDynamicToolbarMaxHeight) {
|
||||
mPresShell->MarkFixedFramesForReflow(IntrinsicDirty::None);
|
||||
mPresShell->AddResizeEventFlushObserverIfNeeded();
|
||||
}
|
||||
|
||||
mDynamicToolbarHeight = mDynamicToolbarMaxHeight + aOffset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user