Chromium Code Reviews| 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)); |