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

Unified Diff: Source/core/dom/Touch.cpp

Issue 392223003: Handle "frame-less" creation of Touch objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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 | « LayoutTests/fast/events/touch/script-tests/document-create-touch.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Touch.cpp
diff --git a/Source/core/dom/Touch.cpp b/Source/core/dom/Touch.cpp
index c2b5f6118f56b71c21208d80a88321d51ee3f8c8..45fb67233da5c3fe03c39559c04d1bc01ee8f0dc 100644
--- a/Source/core/dom/Touch.cpp
+++ b/Source/core/dom/Touch.cpp
@@ -55,7 +55,7 @@ Touch::Touch(LocalFrame* frame, EventTarget* target, unsigned identifier, const
, m_force(force)
{
ScriptWrappable::init(this);
- float scaleFactor = frame->pageZoomFactor();
+ float scaleFactor = frame ? frame->pageZoomFactor() : 1.0f;
m_absoluteLocation = roundedLayoutPoint(pagePos.scaledBy(scaleFactor));
}
« no previous file with comments | « LayoutTests/fast/events/touch/script-tests/document-create-touch.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698