зеркало из https://github.com/mozilla/gecko-dev.git
0c300040e9
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 |
||
---|---|---|
.. | ||
crashtests | ||
moz.build | ||
nsView.cpp | ||
nsView.h | ||
nsViewManager.cpp | ||
nsViewManager.h |