gecko-dev/view
Masayuki Nakano 0c300040e9 Bug 1506508 - Make PresShell::EventHandler::HandleEvent() flush any dirty region before deciding to event target of eMouseDown and eMouseUp r=smaug
When preceding mouse event is handled, that may cause changing style of the
target.  Therefore, when an eMouseDown or eMouseUp event is handled, handlers
require the latest layout.  Currently, nsViewManager::DispatchEvent() tries
to guarantee that with calling nsIPresShell::FlushPendingNotifications()
with FlushType::Layout.  However, this just flushes the pending layout in
the PresShell associated with the nsViewManager instance.  I.e., if the
target is in a child PresShell, its layout hasn't been flushed.

This patch makes PresShell::EventHandler::HandleEvent() flush pending
notifications at first of handling events using coordinates (only when
eMouseDown or eMouseUp, though).  Then, when it realizes that the event
should be handled in a child PresShell, makes it flush its pending
notifications and then, recompute event target with the latest layout if
the layout is actually changed.

Differential Revision: https://phabricator.services.mozilla.com/D13720

--HG--
extra : moz-landing-system : lando
2019-02-11 23:25:45 +00:00
..
crashtests Bug 1322780 - Part 2: Support unprefixed min-content and max-content. r=mats,emilio 2018-12-18 18:47:37 +00:00
moz.build Bug 1504521 - rename in-tree mentions of bugzilla metadata for product and component "Core :: Layout: Web Painting" to "Core :: Web Painting" r=kats 2018-11-04 12:57:04 +00:00
nsView.cpp Bug 1503745: Make widgets with empty bounds consistently hide themselves. r=karlt 2019-02-04 06:51:50 +00:00
nsView.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
nsViewManager.cpp Bug 1506508 - Make PresShell::EventHandler::HandleEvent() flush any dirty region before deciding to event target of eMouseDown and eMouseUp r=smaug 2019-02-11 23:25:45 +00:00
nsViewManager.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00