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

Unified Diff: third_party/WebKit/Source/core/dom/TouchList.h

Issue 1415673004: Added web-exposed constructor for Touch and TouchEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
Index: third_party/WebKit/Source/core/dom/TouchList.h
diff --git a/third_party/WebKit/Source/core/dom/TouchList.h b/third_party/WebKit/Source/core/dom/TouchList.h
index e8b68484e647aaa840458d266678d793937bc6d7..88c047e52861b55880cce398920bdba3ff82cf7a 100644
--- a/third_party/WebKit/Source/core/dom/TouchList.h
+++ b/third_party/WebKit/Source/core/dom/TouchList.h
@@ -43,6 +43,17 @@ public:
return adoptRefWillBeNoop(new TouchList);
}
+ static PassRefPtrWillBeRawPtr<TouchList> create(const WillBeHeapVector<RefPtrWillBeMember<Touch>>& touches)
+ {
+ RefPtrWillBeRawPtr<TouchList> list = adoptRefWillBeNoop(new TouchList);
+
+ size_t touchCount = touches.size();
+ for (size_t i = 0; i < touchCount; ++i) {
dtapuska 2015/11/04 16:29:43 Remove braces; and you should be able to use a ran
sof 2015/11/04 16:38:27 list->m_values.appendVector(touches); is shorter,
+ list->append(touches[i]);
+ }
+ return list.release();
+ }
+
static PassRefPtrWillBeRawPtr<TouchList> adopt(WillBeHeapVector<RefPtrWillBeMember<Touch>>& touches)
{
return adoptRefWillBeNoop(new TouchList(touches));
« no previous file with comments | « third_party/WebKit/Source/core/dom/TouchInit.idl ('k') | third_party/WebKit/Source/core/events/TouchEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698