Bug 1341992 - Only do hit-testing with the ignore-root-scroll-frame flag on zoomable platforms. r=tnikkel

The ignore-root-scroll-frame flag is generally needed on Fennec, or possibly
other zoom-enabled platforms, when we have them. It allows hit-testing things
outside the main thread's notion of what is visible, because that might occur
when the user zooms out.

For largely historical reasons, we are passing this flag around in other scenarios,
such as when doing hit-tests for touch events, because in the past touch events
and zooming only happened on Fennec, so it didn't matter. Now that we have
touch events enabled on other platforms, such as Windows, we need to make the
distinction clearer.

MozReview-Commit-ID: BlHjtjFYgzv

--HG--
extra : rebase_source : cbfeab4666b5556ba0b38f3abdf666d63945b9a1
This commit is contained in:
Kartikaya Gupta 2017-05-24 16:23:03 -04:00
Родитель fbe6893725
Коммит 88d6c78bc4
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -7478,7 +7478,12 @@ PresShell::HandleEvent(nsIFrame* aFrame,
nsPoint eventPoint;
uint32_t flags = 0;
if (aEvent->mMessage == eTouchStart) {
flags |= INPUT_IGNORE_ROOT_SCROLL_FRAME;
if (gfxPrefs::APZAllowZooming()) {
// Setting this flag will skip the scrollbars on the root frame from
// participating in hit-testing, and we only want that to happen on
// zoomable platforms (for now).
flags |= INPUT_IGNORE_ROOT_SCROLL_FRAME;
}
WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
// if this is a continuing session, ensure that all these events are
// in the same document by taking the target of the events already in