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

Side by Side Diff: sky/engine/core/dom/Document.cpp

Issue 868133003: Remove touch events from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/dom/Document.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 #include "sky/engine/core/dom/NodeRenderStyle.h" 65 #include "sky/engine/core/dom/NodeRenderStyle.h"
66 #include "sky/engine/core/dom/NodeRenderingTraversal.h" 66 #include "sky/engine/core/dom/NodeRenderingTraversal.h"
67 #include "sky/engine/core/dom/NodeTraversal.h" 67 #include "sky/engine/core/dom/NodeTraversal.h"
68 #include "sky/engine/core/dom/NodeWithIndex.h" 68 #include "sky/engine/core/dom/NodeWithIndex.h"
69 #include "sky/engine/core/dom/RequestAnimationFrameCallback.h" 69 #include "sky/engine/core/dom/RequestAnimationFrameCallback.h"
70 #include "sky/engine/core/dom/ScriptedAnimationController.h" 70 #include "sky/engine/core/dom/ScriptedAnimationController.h"
71 #include "sky/engine/core/dom/SelectorQuery.h" 71 #include "sky/engine/core/dom/SelectorQuery.h"
72 #include "sky/engine/core/dom/StaticNodeList.h" 72 #include "sky/engine/core/dom/StaticNodeList.h"
73 #include "sky/engine/core/dom/StyleEngine.h" 73 #include "sky/engine/core/dom/StyleEngine.h"
74 #include "sky/engine/core/dom/Text.h" 74 #include "sky/engine/core/dom/Text.h"
75 #include "sky/engine/core/dom/TouchList.h"
76 #include "sky/engine/core/dom/custom/CustomElementMicrotaskRunQueue.h" 75 #include "sky/engine/core/dom/custom/CustomElementMicrotaskRunQueue.h"
77 #include "sky/engine/core/dom/custom/CustomElementRegistrationContext.h" 76 #include "sky/engine/core/dom/custom/CustomElementRegistrationContext.h"
78 #include "sky/engine/core/dom/shadow/ElementShadow.h" 77 #include "sky/engine/core/dom/shadow/ElementShadow.h"
79 #include "sky/engine/core/dom/shadow/ShadowRoot.h" 78 #include "sky/engine/core/dom/shadow/ShadowRoot.h"
80 #include "sky/engine/core/editing/FrameSelection.h" 79 #include "sky/engine/core/editing/FrameSelection.h"
81 #include "sky/engine/core/editing/SpellChecker.h" 80 #include "sky/engine/core/editing/SpellChecker.h"
82 #include "sky/engine/core/events/Event.h" 81 #include "sky/engine/core/events/Event.h"
83 #include "sky/engine/core/events/EventFactory.h" 82 #include "sky/engine/core/events/EventFactory.h"
84 #include "sky/engine/core/events/EventListener.h" 83 #include "sky/engine/core/events/EventListener.h"
85 #include "sky/engine/core/events/HashChangeEvent.h" 84 #include "sky/engine/core/events/HashChangeEvent.h"
(...skipping 2176 matching lines...) Expand 10 before | Expand all | Expand 10 after
2262 2261
2263 void Document::serviceScriptedAnimations(double monotonicAnimationStartTime) 2262 void Document::serviceScriptedAnimations(double monotonicAnimationStartTime)
2264 { 2263 {
2265 WTF_LOG(ScriptedAnimationController, "Document::serviceScriptedAnimations: c ontroller = %d", 2264 WTF_LOG(ScriptedAnimationController, "Document::serviceScriptedAnimations: c ontroller = %d",
2266 m_scriptedAnimationController ? 1 : 0); 2265 m_scriptedAnimationController ? 1 : 0);
2267 if (!m_scriptedAnimationController) 2266 if (!m_scriptedAnimationController)
2268 return; 2267 return;
2269 m_scriptedAnimationController->serviceScriptedAnimations(monotonicAnimationS tartTime); 2268 m_scriptedAnimationController->serviceScriptedAnimations(monotonicAnimationS tartTime);
2270 } 2269 }
2271 2270
2272 PassRefPtr<Touch> Document::createTouch(LocalDOMWindow* window, EventTarget* tar get, int identifier, double pageX, double pageY, double screenX, double screenY, double radiusX, double radiusY, float rotationAngle, float force) const
2273 {
2274 // Match behavior from when these types were integers, and avoid surprises f rom someone explicitly
2275 // passing Infinity/NaN.
2276 if (!std::isfinite(pageX))
2277 pageX = 0;
2278 if (!std::isfinite(pageY))
2279 pageY = 0;
2280 if (!std::isfinite(screenX))
2281 screenX = 0;
2282 if (!std::isfinite(screenY))
2283 screenY = 0;
2284 if (!std::isfinite(radiusX))
2285 radiusX = 0;
2286 if (!std::isfinite(radiusY))
2287 radiusY = 0;
2288 if (!std::isfinite(rotationAngle))
2289 rotationAngle = 0;
2290 if (!std::isfinite(force))
2291 force = 0;
2292
2293 // FIXME: It's not clear from the documentation at
2294 // http://developer.apple.com/library/safari/#documentation/UserExperience/R eference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html
2295 // when this method should throw and nor is it by inspection of iOS behavior . It would be nice to verify any cases where it throws under iOS
2296 // and implement them here. See https://bugs.webkit.org/show_bug.cgi?id=4781 9
2297 LocalFrame* frame = window ? window->frame() : this->frame();
2298 return Touch::create(frame, target, identifier, FloatPoint(screenX, screenY) , FloatPoint(pageX, pageY), FloatSize(radiusX, radiusY), rotationAngle, force);
2299 }
2300
2301 PassRefPtr<TouchList> Document::createTouchList(Vector<RefPtr<Touch> >& touches) const
2302 {
2303 return TouchList::adopt(touches);
2304 }
2305
2306 DocumentLoadTiming* Document::timing() const 2271 DocumentLoadTiming* Document::timing() const
2307 { 2272 {
2308 return &m_documentLoadTiming; 2273 return &m_documentLoadTiming;
2309 } 2274 }
2310 2275
2311 IntSize Document::initialViewportSize() const 2276 IntSize Document::initialViewportSize() const
2312 { 2277 {
2313 if (!view()) 2278 if (!view())
2314 return IntSize(); 2279 return IntSize();
2315 return view()->unscaledVisibleContentSize(IncludeScrollbars); 2280 return view()->unscaledVisibleContentSize(IncludeScrollbars);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
2440 using namespace blink; 2405 using namespace blink;
2441 void showLiveDocumentInstances() 2406 void showLiveDocumentInstances()
2442 { 2407 {
2443 WeakDocumentSet& set = liveDocumentSet(); 2408 WeakDocumentSet& set = liveDocumentSet();
2444 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 2409 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
2445 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { 2410 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) {
2446 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); 2411 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data());
2447 } 2412 }
2448 } 2413 }
2449 #endif 2414 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698