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

Side by Side Diff: sky/engine/core/dom/Touch.cpp

Issue 706123005: Remove nop ScriptWrappable::init calls (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « sky/engine/core/dom/Text.h ('k') | sky/engine/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 25 matching lines...) Expand all
36 Touch::Touch(LocalFrame* frame, EventTarget* target, unsigned identifier, const FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& radius, float rotationAngle, float force) 36 Touch::Touch(LocalFrame* frame, EventTarget* target, unsigned identifier, const FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& radius, float rotationAngle, float force)
37 : m_target(target) 37 : m_target(target)
38 , m_identifier(identifier) 38 , m_identifier(identifier)
39 , m_clientPos(pagePos) 39 , m_clientPos(pagePos)
40 , m_screenPos(screenPos) 40 , m_screenPos(screenPos)
41 , m_pagePos(pagePos) 41 , m_pagePos(pagePos)
42 , m_radius(radius) 42 , m_radius(radius)
43 , m_rotationAngle(rotationAngle) 43 , m_rotationAngle(rotationAngle)
44 , m_force(force) 44 , m_force(force)
45 { 45 {
46 ScriptWrappable::init(this);
47 float scaleFactor = frame ? frame->pageZoomFactor() : 1.0f; 46 float scaleFactor = frame ? frame->pageZoomFactor() : 1.0f;
48 m_absoluteLocation = roundedLayoutPoint(pagePos.scaledBy(scaleFactor)); 47 m_absoluteLocation = roundedLayoutPoint(pagePos.scaledBy(scaleFactor));
49 } 48 }
50 49
51 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) 50 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)
52 : m_target(target) 51 : m_target(target)
53 , m_identifier(identifier) 52 , m_identifier(identifier)
54 , m_clientPos(clientPos) 53 , m_clientPos(clientPos)
55 , m_screenPos(screenPos) 54 , m_screenPos(screenPos)
56 , m_pagePos(pagePos) 55 , m_pagePos(pagePos)
57 , m_radius(radius) 56 , m_radius(radius)
58 , m_rotationAngle(rotationAngle) 57 , m_rotationAngle(rotationAngle)
59 , m_force(force) 58 , m_force(force)
60 , m_absoluteLocation(absoluteLocation) 59 , m_absoluteLocation(absoluteLocation)
61 { 60 {
62 ScriptWrappable::init(this);
63 } 61 }
64 62
65 PassRefPtr<Touch> Touch::cloneWithNewTarget(EventTarget* eventTarget) const 63 PassRefPtr<Touch> Touch::cloneWithNewTarget(EventTarget* eventTarget) const
66 { 64 {
67 return adoptRef(new Touch(eventTarget, m_identifier, m_clientPos, m_screenPo s, m_pagePos, m_radius, m_rotationAngle, m_force, m_absoluteLocation)); 65 return adoptRef(new Touch(eventTarget, m_identifier, m_clientPos, m_screenPo s, m_pagePos, m_radius, m_rotationAngle, m_force, m_absoluteLocation));
68 } 66 }
69 67
70 void Touch::trace(Visitor* visitor) 68 void Touch::trace(Visitor* visitor)
71 { 69 {
72 visitor->trace(m_target); 70 visitor->trace(m_target);
73 } 71 }
74 72
75 } // namespace blink 73 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Text.h ('k') | sky/engine/core/dom/TouchList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698