Changeset 201377 in webkit
- Timestamp:
- May 25, 2016 4:13:32 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r201374 r201377 1 2016-05-25 Nael Ouedraogo <nael.ouedraogo@crf.canon.fr> 2 3 Purge PassRefPtr from TouchList 4 https://bugs.webkit.org/show_bug.cgi?id=157985 5 6 Reviewed by Darin Adler. 7 8 Use RefPtr&& argument instead of PassRefPtr in append() 9 10 * dom/TouchList.h: 11 (WebCore::TouchList::append): 12 * page/EventHandler.cpp: 13 (WebCore::EventHandler::handleTouchEvent): 14 1 15 2016-05-25 Antoine Quint <graouts@apple.com> 2 16 -
trunk/Source/WebCore/dom/TouchList.h
r184225 r201377 23 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 26 #ifndef TouchList_h 27 #define TouchList_h 25 #pragma once 28 26 29 27 #if ENABLE(IOS_TOUCH_EVENTS) … … 49 47 const Touch* item(unsigned) const; 50 48 51 void append( const PassRefPtr<Touch> touch) { m_values.append(touch); }49 void append(RefPtr<Touch>&& touch) { m_values.append(WTFMove(touch)); } 52 50 53 51 private: 54 52 TouchList() {} 55 53 56 Vector<RefPtr<Touch> 54 Vector<RefPtr<Touch>> m_values; 57 55 }; 58 56 … … 61 59 #endif // ENABLE(TOUCH_EVENTS) 62 60 63 #endif /* TouchList_h */ -
trunk/Source/WebCore/page/EventHandler.cpp
r201292 r201377 3909 3909 int adjustedPageY = lroundf(pagePoint.y() / scaleFactor); 3910 3910 3911 RefPtr<Touch> touch = Touch::create(targetFrame, touchTarget.get(), point.id(), 3912 point.screenPos().x(), point.screenPos().y(), 3913 adjustedPageX, adjustedPageY, 3914 point.radiusX(), point.radiusY(), point.rotationAngle(), point.force()); 3911 auto touch = Touch::create(targetFrame, touchTarget.get(), point.id(), 3912 point.screenPos().x(), point.screenPos().y(), adjustedPageX, adjustedPageY, 3913 point.radiusX(), point.radiusY(), point.rotationAngle(), point.force()); 3915 3914 3916 3915 // Ensure this target's touch list exists, even if it ends up empty, so it can always be passed to TouchEvent::Create below. … … 3922 3921 // released or cancelled it will only appear in the changedTouches list. 3923 3922 if (pointState != PlatformTouchPoint::TouchReleased && pointState != PlatformTouchPoint::TouchCancelled) { 3924 touches->append(touch );3925 targetTouchesIterator->value->append(touch );3923 touches->append(touch.copyRef()); 3924 targetTouchesIterator->value->append(touch.copyRef()); 3926 3925 } 3927 3926 … … 3936 3935 if (!changedTouches[pointState].m_touches) 3937 3936 changedTouches[pointState].m_touches = TouchList::create(); 3938 changedTouches[pointState].m_touches->append( touch);3937 changedTouches[pointState].m_touches->append(WTFMove(touch)); 3939 3938 changedTouches[pointState].m_targets.add(touchTarget); 3940 3939 }
Note: See TracChangeset
for help on using the changeset viewer.