summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/Touch.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/dom/Touch.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/dom/Touch.h')
-rw-r--r--Source/WebCore/dom/Touch.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/Source/WebCore/dom/Touch.h b/Source/WebCore/dom/Touch.h
index 7b3d09896..36a12f373 100644
--- a/Source/WebCore/dom/Touch.h
+++ b/Source/WebCore/dom/Touch.h
@@ -13,7 +13,7 @@
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
@@ -23,16 +23,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef Touch_h
-#define Touch_h
+#pragma once
-#if PLATFORM(IOS)
+#if ENABLE(IOS_TOUCH_EVENTS)
#include <WebKitAdditions/TouchIOS.h>
#elif ENABLE(TOUCH_EVENTS)
#include "EventTarget.h"
#include "LayoutPoint.h"
-#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
@@ -42,11 +40,11 @@ class Frame;
class Touch : public RefCounted<Touch> {
public:
- static PassRefPtr<Touch> create(Frame* frame, EventTarget* target,
+ static Ref<Touch> create(Frame* frame, EventTarget* target,
unsigned identifier, int screenX, int screenY, int pageX, int pageY,
int radiusX, int radiusY, float rotationAngle, float force)
{
- return adoptRef(new Touch(frame, target, identifier, screenX,
+ return adoptRef(*new Touch(frame, target, identifier, screenX,
screenY, pageX, pageY, radiusX, radiusY, rotationAngle, force));
}
@@ -63,7 +61,7 @@ public:
float webkitRotationAngle() const { return m_rotationAngle; }
float webkitForce() const { return m_force; }
const LayoutPoint& absoluteLocation() const { return m_absoluteLocation; }
- PassRefPtr<Touch> cloneWithNewTarget(EventTarget*) const;
+ Ref<Touch> cloneWithNewTarget(EventTarget*) const;
private:
Touch(Frame* frame, EventTarget* target, unsigned identifier,
@@ -92,5 +90,3 @@ private:
} // namespace WebCore
#endif // ENABLE(TOUCH_EVENTS)
-
-#endif /* Touch_h */