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

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

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 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
« no previous file with comments | « Source/core/dom/Text.h ('k') | Source/core/dom/TouchList.h » ('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 2008, The Android Open Source Project 2 * Copyright 2008, The Android Open Source Project
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 Touch::Touch(LocalFrame* frame, EventTarget* target, unsigned identifier, const FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& radius, float rotationAngle, float force) 47 Touch::Touch(LocalFrame* frame, EventTarget* target, unsigned identifier, const FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& radius, float rotationAngle, float force)
48 : m_target(target) 48 : m_target(target)
49 , m_identifier(identifier) 49 , m_identifier(identifier)
50 , m_clientPos(pagePos - contentsOffset(frame)) 50 , m_clientPos(pagePos - contentsOffset(frame))
51 , m_screenPos(screenPos) 51 , m_screenPos(screenPos)
52 , m_pagePos(pagePos) 52 , m_pagePos(pagePos)
53 , m_radius(radius) 53 , m_radius(radius)
54 , m_rotationAngle(rotationAngle) 54 , m_rotationAngle(rotationAngle)
55 , m_force(force) 55 , m_force(force)
56 { 56 {
57 ScriptWrappable::init(this);
58 float scaleFactor = frame ? frame->pageZoomFactor() : 1.0f; 57 float scaleFactor = frame ? frame->pageZoomFactor() : 1.0f;
59 m_absoluteLocation = roundedLayoutPoint(pagePos.scaledBy(scaleFactor)); 58 m_absoluteLocation = roundedLayoutPoint(pagePos.scaledBy(scaleFactor));
60 } 59 }
61 60
62 Touch::Touch(EventTarget* target, unsigned identifier, const FloatPoint& clientP os, const FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& rad ius, float rotationAngle, float force, LayoutPoint absoluteLocation) 61 Touch::Touch(EventTarget* target, unsigned identifier, const FloatPoint& clientP os, const FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& rad ius, float rotationAngle, float force, LayoutPoint absoluteLocation)
63 : m_target(target) 62 : m_target(target)
64 , m_identifier(identifier) 63 , m_identifier(identifier)
65 , m_clientPos(clientPos) 64 , m_clientPos(clientPos)
66 , m_screenPos(screenPos) 65 , m_screenPos(screenPos)
67 , m_pagePos(pagePos) 66 , m_pagePos(pagePos)
68 , m_radius(radius) 67 , m_radius(radius)
69 , m_rotationAngle(rotationAngle) 68 , m_rotationAngle(rotationAngle)
70 , m_force(force) 69 , m_force(force)
71 , m_absoluteLocation(absoluteLocation) 70 , m_absoluteLocation(absoluteLocation)
72 { 71 {
73 ScriptWrappable::init(this);
74 } 72 }
75 73
76 PassRefPtrWillBeRawPtr<Touch> Touch::cloneWithNewTarget(EventTarget* eventTarget ) const 74 PassRefPtrWillBeRawPtr<Touch> Touch::cloneWithNewTarget(EventTarget* eventTarget ) const
77 { 75 {
78 return adoptRefWillBeNoop(new Touch(eventTarget, m_identifier, m_clientPos, m_screenPos, m_pagePos, m_radius, m_rotationAngle, m_force, m_absoluteLocation)) ; 76 return adoptRefWillBeNoop(new Touch(eventTarget, m_identifier, m_clientPos, m_screenPos, m_pagePos, m_radius, m_rotationAngle, m_force, m_absoluteLocation)) ;
79 } 77 }
80 78
81 void Touch::trace(Visitor* visitor) 79 void Touch::trace(Visitor* visitor)
82 { 80 {
83 visitor->trace(m_target); 81 visitor->trace(m_target);
84 } 82 }
85 83
86 } // namespace blink 84 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/Text.h ('k') | Source/core/dom/TouchList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698