зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1663000 - Handle the event as if it's consumed in the root APZC in InputQueue::ReceiveTouchInput() if there's contents covered by the dynamic toolbar. r=geckoview-reviewers,botond,snorp
Differential Revision: https://phabricator.services.mozilla.com/D93917
This commit is contained in:
Родитель
32b301eceb
Коммит
f5ab9e9122
|
@ -856,9 +856,14 @@ bool AsyncPanZoomController::ArePointerEventsConsumable(
|
||||||
bool pannableX = aBlock->TouchActionAllowsPanningX() &&
|
bool pannableX = aBlock->TouchActionAllowsPanningX() &&
|
||||||
aBlock->GetOverscrollHandoffChain()->CanScrollInDirection(
|
aBlock->GetOverscrollHandoffChain()->CanScrollInDirection(
|
||||||
this, ScrollDirection::eHorizontal);
|
this, ScrollDirection::eHorizontal);
|
||||||
bool pannableY = aBlock->TouchActionAllowsPanningY() &&
|
bool pannableY =
|
||||||
aBlock->GetOverscrollHandoffChain()->CanScrollInDirection(
|
(aBlock->TouchActionAllowsPanningY() &&
|
||||||
this, ScrollDirection::eVertical);
|
(aBlock->GetOverscrollHandoffChain()->CanScrollInDirection(
|
||||||
|
this, ScrollDirection::eVertical) ||
|
||||||
|
// In the case of the root APZC with any dynamic toolbar, it
|
||||||
|
// shoule be pannable if there is room moving the dynamic
|
||||||
|
// toolbar.
|
||||||
|
(IsRootContent() && CanScrollDownwardsWithDynamicToolbar())));
|
||||||
|
|
||||||
bool pannable;
|
bool pannable;
|
||||||
|
|
||||||
|
|
|
@ -178,6 +178,11 @@ nsEventStatus InputQueue::ReceiveTouchInput(
|
||||||
INPQ_LOG("dropping event due to block %p being in slop\n", block);
|
INPQ_LOG("dropping event due to block %p being in slop\n", block);
|
||||||
result = nsEventStatus_eConsumeNoDefault;
|
result = nsEventStatus_eConsumeNoDefault;
|
||||||
} else {
|
} else {
|
||||||
|
// FIXME: Even if the event is consumed in a non-root APZC, if scroll
|
||||||
|
// positions in all relevant APZCs are at the bottom edge and if there are
|
||||||
|
// contents covered by the dynamic toolbar, we need to handle the event as
|
||||||
|
// if it's consumed in the root APZC so that GeckoView can tel the
|
||||||
|
// dynamic toolbar needs to move.
|
||||||
result = nsEventStatus_eConsumeDoDefault;
|
result = nsEventStatus_eConsumeDoDefault;
|
||||||
}
|
}
|
||||||
} else if (block->UpdateSlopState(aEvent, false)) {
|
} else if (block->UpdateSlopState(aEvent, false)) {
|
||||||
|
|
|
@ -354,8 +354,6 @@ class PanZoomControllerTest : BaseSessionTest() {
|
||||||
assertThat("The input result should be HANDLED_CONTENT in iframe_100_percent_height_scrollable.html",
|
assertThat("The input result should be HANDLED_CONTENT in iframe_100_percent_height_scrollable.html",
|
||||||
value, equalTo(PanZoomController.INPUT_RESULT_HANDLED_CONTENT))
|
value, equalTo(PanZoomController.INPUT_RESULT_HANDLED_CONTENT))
|
||||||
|
|
||||||
// Below cases don't work yet without event handlers
|
|
||||||
if (withEventHandler) {
|
|
||||||
// The content height is greater than "screen height - the dynamic toolbar height".
|
// The content height is greater than "screen height - the dynamic toolbar height".
|
||||||
setupTouchEventDocument(ROOT_98VH_HTML_PATH, withEventHandler)
|
setupTouchEventDocument(ROOT_98VH_HTML_PATH, withEventHandler)
|
||||||
value = sessionRule.waitForResult(sendDownEvent(50f, 50f))
|
value = sessionRule.waitForResult(sendDownEvent(50f, 50f))
|
||||||
|
@ -381,7 +379,6 @@ class PanZoomControllerTest : BaseSessionTest() {
|
||||||
// The input result should be handled in the iframe content initially.
|
// The input result should be handled in the iframe content initially.
|
||||||
assertThat("The input result should be HANDLED_CONTENT initially in iframe_98vh_scrollable.html",
|
assertThat("The input result should be HANDLED_CONTENT initially in iframe_98vh_scrollable.html",
|
||||||
value, equalTo(PanZoomController.INPUT_RESULT_HANDLED_CONTENT))
|
value, equalTo(PanZoomController.INPUT_RESULT_HANDLED_CONTENT))
|
||||||
}
|
|
||||||
|
|
||||||
// The following test doesn't work either with/without event handlers.
|
// The following test doesn't work either with/without event handlers.
|
||||||
if (false) {
|
if (false) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче