Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(898)

Unified Diff: Source/core/frame/DeviceSensorEventController.cpp

Issue 212983007: When firing null-events stop DeviceSensorEventController only after the event has propagated to win… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/DeviceSensorEventController.cpp
diff --git a/Source/core/frame/DeviceSensorEventController.cpp b/Source/core/frame/DeviceSensorEventController.cpp
index b68944dd11798f242461ae57f18c30aa2238defd..4046775719eb8f183d731dbaf60a9d9921fe0d0a 100644
--- a/Source/core/frame/DeviceSensorEventController.cpp
+++ b/Source/core/frame/DeviceSensorEventController.cpp
@@ -58,11 +58,11 @@ void DeviceSensorEventController::fireDeviceEvent(Timer<DeviceSensorEventControl
void DeviceSensorEventController::dispatchDeviceEvent(PassRefPtr<Event> prpEvent)
{
+ if (!m_document.domWindow() || m_document.activeDOMObjectsAreSuspended() || m_document.activeDOMObjectsAreStopped())
+ return;
+
RefPtr<Event> event = prpEvent;
- if (m_document.domWindow()
- && !m_document.activeDOMObjectsAreSuspended()
- && !m_document.activeDOMObjectsAreStopped())
- m_document.domWindow()->dispatchEvent(event);
+ m_document.domWindow()->dispatchEvent(event);
if (m_needsCheckingNullEvents) {
if (isNullEvent(event.get()))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698