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

Side by Side Diff: Source/core/dom/Document.cpp

Issue 23522051: Get rid of custom code for Document::createTouchList() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add missing references Created 7 years, 3 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 | Annotate | Revision Log
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 5027 matching lines...) Expand 10 before | Expand all | Expand 10 after
5038 PassRefPtr<Touch> Document::createTouch(DOMWindow* window, EventTarget* target, int identifier, int pageX, int pageY, int screenX, int screenY, int radiusX, int radiusY, float rotationAngle, float force) const 5038 PassRefPtr<Touch> Document::createTouch(DOMWindow* window, EventTarget* target, int identifier, int pageX, int pageY, int screenX, int screenY, int radiusX, int radiusY, float rotationAngle, float force) const
5039 { 5039 {
5040 // FIXME: It's not clear from the documentation at 5040 // FIXME: It's not clear from the documentation at
5041 // http://developer.apple.com/library/safari/#documentation/UserExperience/R eference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html 5041 // http://developer.apple.com/library/safari/#documentation/UserExperience/R eference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html
5042 // 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 5042 // 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
5043 // and implement them here. See https://bugs.webkit.org/show_bug.cgi?id=4781 9 5043 // and implement them here. See https://bugs.webkit.org/show_bug.cgi?id=4781 9
5044 Frame* frame = window ? window->frame() : this->frame(); 5044 Frame* frame = window ? window->frame() : this->frame();
5045 return Touch::create(frame, target, identifier, screenX, screenY, pageX, pag eY, radiusX, radiusY, rotationAngle, force); 5045 return Touch::create(frame, target, identifier, screenX, screenY, pageX, pag eY, radiusX, radiusY, rotationAngle, force);
5046 } 5046 }
5047 5047
5048 PassRefPtr<TouchList> Document::createTouchList(Vector<RefPtr<Touch> >& touches) const
5049 {
5050 return TouchList::create(touches);
5051 }
5052
5048 void Document::didAddTouchEventHandler(Node* handler) 5053 void Document::didAddTouchEventHandler(Node* handler)
5049 { 5054 {
5050 if (!m_touchEventTargets.get()) 5055 if (!m_touchEventTargets.get())
5051 m_touchEventTargets = adoptPtr(new TouchEventTargetSet); 5056 m_touchEventTargets = adoptPtr(new TouchEventTargetSet);
5052 m_touchEventTargets->add(handler); 5057 m_touchEventTargets->add(handler);
5053 if (Document* parent = parentDocument()) { 5058 if (Document* parent = parentDocument()) {
5054 parent->didAddTouchEventHandler(this); 5059 parent->didAddTouchEventHandler(this);
5055 return; 5060 return;
5056 } 5061 }
5057 if (Page* page = this->page()) { 5062 if (Page* page = this->page()) {
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
5438 { 5443 {
5439 return DocumentLifecycleNotifier::create(this); 5444 return DocumentLifecycleNotifier::create(this);
5440 } 5445 }
5441 5446
5442 DocumentLifecycleNotifier* Document::lifecycleNotifier() 5447 DocumentLifecycleNotifier* Document::lifecycleNotifier()
5443 { 5448 {
5444 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier()); 5449 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier());
5445 } 5450 }
5446 5451
5447 } // namespace WebCore 5452 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698