Title: [161806] trunk/Source/WebCore
Revision
161806
Author
[email protected]
Date
2014-01-12 08:09:49 -0800 (Sun, 12 Jan 2014)

Log Message

[iOS] Upstream WebEventRegion.{h|mm} to fix the build

* WebCore.xcodeproj/project.pbxproj: Add to project.
* page/ios/WebEventRegion.h: Added.
* page/ios/WebEventRegion.mm: Added.
(-[WebEventRegion initWithPoints::::]):
(-[WebEventRegion copyWithZone:]):
(-[WebEventRegion description]):
(-[WebEventRegion hitTest:]):
(-[WebEventRegion isEqual:]):
(-[WebEventRegion quad]):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (161805 => 161806)


--- trunk/Source/WebCore/ChangeLog	2014-01-12 08:45:48 UTC (rev 161805)
+++ trunk/Source/WebCore/ChangeLog	2014-01-12 16:09:49 UTC (rev 161806)
@@ -1,3 +1,17 @@
+2014-01-12  David Kilzer  <[email protected]>
+
+        [iOS] Upstream WebEventRegion.{h|mm} to fix the build
+
+        * WebCore.xcodeproj/project.pbxproj: Add to project.
+        * page/ios/WebEventRegion.h: Added.
+        * page/ios/WebEventRegion.mm: Added.
+        (-[WebEventRegion initWithPoints::::]):
+        (-[WebEventRegion copyWithZone:]):
+        (-[WebEventRegion description]):
+        (-[WebEventRegion hitTest:]):
+        (-[WebEventRegion isEqual:]):
+        (-[WebEventRegion quad]):
+
 2014-01-11  Anders Carlsson  <[email protected]>
 
         Use std::call_once instead of AtomicallyInitializedStatic when creating a HTTP header set

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (161805 => 161806)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-01-12 08:45:48 UTC (rev 161805)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-01-12 16:09:49 UTC (rev 161806)
@@ -927,6 +927,8 @@
 		209B456B16796A7E00E54E4E /* JSCryptoCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 209B456A16796A7E00E54E4E /* JSCryptoCustom.cpp */; };
 		20D629261253690B00081543 /* InspectorInstrumentation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 20D629241253690B00081543 /* InspectorInstrumentation.cpp */; };
 		20D629271253690B00081543 /* InspectorInstrumentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 20D629251253690B00081543 /* InspectorInstrumentation.h */; };
+		225A16B50D5C11E900090295 /* WebEventRegion.h in Headers */ = {isa = PBXBuildFile; fileRef = 225A16B30D5C11E900090295 /* WebEventRegion.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		225A16B60D5C11E900090295 /* WebEventRegion.mm in Sources */ = {isa = PBXBuildFile; fileRef = 225A16B40D5C11E900090295 /* WebEventRegion.mm */; };
 		227777601345DEA9008EA455 /* InspectorForwarding.h in Headers */ = {isa = PBXBuildFile; fileRef = 2277775F1345DEA9008EA455 /* InspectorForwarding.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		228C284510D82500009D0D0E /* ScriptWrappable.h in Headers */ = {isa = PBXBuildFile; fileRef = 228C284410D82500009D0D0E /* ScriptWrappable.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		2292B27C1356669400CF11EF /* ImageBufferDataCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2292B27B1356669400CF11EF /* ImageBufferDataCG.cpp */; };
@@ -7734,6 +7736,8 @@
 		209B456A16796A7E00E54E4E /* JSCryptoCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCryptoCustom.cpp; sourceTree = "<group>"; };
 		20D629241253690B00081543 /* InspectorInstrumentation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorInstrumentation.cpp; sourceTree = "<group>"; };
 		20D629251253690B00081543 /* InspectorInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorInstrumentation.h; sourceTree = "<group>"; };
+		225A16B30D5C11E900090295 /* WebEventRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebEventRegion.h; sourceTree = "<group>"; };
+		225A16B40D5C11E900090295 /* WebEventRegion.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebEventRegion.mm; sourceTree = "<group>"; };
 		2277775F1345DEA9008EA455 /* InspectorForwarding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorForwarding.h; sourceTree = "<group>"; };
 		228C284410D82500009D0D0E /* ScriptWrappable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptWrappable.h; sourceTree = "<group>"; };
 		2292B27B1356669400CF11EF /* ImageBufferDataCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageBufferDataCG.cpp; sourceTree = "<group>"; };
@@ -14584,6 +14588,8 @@
 			children = (
 				FE6938B51045D67E008EABB6 /* EventHandlerIOS.mm */,
 				FED13D3B0CEA936A00D89466 /* FrameIOS.mm */,
+				225A16B30D5C11E900090295 /* WebEventRegion.h */,
+				225A16B40D5C11E900090295 /* WebEventRegion.mm */,
 			);
 			path = ios;
 			sourceTree = "<group>";
@@ -25896,6 +25902,7 @@
 				93EB169709F880C00091F8FF /* WebCoreSystemInterface.h in Headers */,
 				37F818FD0D657606005E1F05 /* WebCoreURLResponse.h in Headers */,
 				93F199F008245E59001E9ABC /* WebCoreView.h in Headers */,
+				225A16B50D5C11E900090295 /* WebEventRegion.h in Headers */,
 				BC6DADEF0A195FDF00E5CD14 /* WebFontCache.h in Headers */,
 				A7D20F6D107F438B00A80392 /* WebGLActiveInfo.h in Headers */,
 				07C59B5717F4AC15000FBCBB /* VideoStreamTrack.h in Headers */,
@@ -29106,6 +29113,7 @@
 				93EB169509F880B00091F8FF /* WebCoreSystemInterface.mm in Sources */,
 				37F818FE0D657606005E1F05 /* WebCoreURLResponse.mm in Sources */,
 				93F19B0708245E59001E9ABC /* WebCoreView.m in Sources */,
+				225A16B60D5C11E900090295 /* WebEventRegion.mm in Sources */,
 				BC6DADFA0A19602B00E5CD14 /* WebFontCache.mm in Sources */,
 				C5278B0C17F212EA003A2998 /* PlatformPasteboardIOS.mm in Sources */,
 				49C7B9C81042D32F0009D447 /* WebGLBuffer.cpp in Sources */,

Added: trunk/Source/WebCore/page/ios/WebEventRegion.h (0 => 161806)


--- trunk/Source/WebCore/page/ios/WebEventRegion.h	                        (rev 0)
+++ trunk/Source/WebCore/page/ios/WebEventRegion.h	2014-01-12 16:09:49 UTC (rev 161806)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``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 INC. OR ITS 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 PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebEventRegion_h
+#define WebEventRegion_h
+
+#if ENABLE(TOUCH_EVENTS)
+
+#import <CoreGraphics/CGGeometry.h>
+#import <Foundation/NSObject.h>
+
+@interface WebEventRegion : NSObject <NSCopying>
+{
+    CGPoint p1, p2, p3, p4;
+}
+- (id)initWithPoints:(CGPoint)inP1 :(CGPoint)inP2 :(CGPoint)inP3 :(CGPoint)inP4;
+- (BOOL)hitTest:(CGPoint)point;
+@end
+
+#endif // ENABLE(TOUCH_EVENTS)
+
+#endif // WebEventRegion_h

Added: trunk/Source/WebCore/page/ios/WebEventRegion.mm (0 => 161806)


--- trunk/Source/WebCore/page/ios/WebEventRegion.mm	                        (rev 0)
+++ trunk/Source/WebCore/page/ios/WebEventRegion.mm	2014-01-12 16:09:49 UTC (rev 161806)
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``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 INC. OR ITS 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 PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "WebEventRegion.h"
+ 
+#if ENABLE(TOUCH_EVENTS)
+
+#import "FloatQuad.h"
+
+using namespace WebCore;
+
+@interface WebEventRegion(Private)
+- (FloatQuad)quad;
+@end
+
+@implementation WebEventRegion
+
+- (id)initWithPoints:(CGPoint)inP1 :(CGPoint)inP2 :(CGPoint)inP3 :(CGPoint)inP4
+{
+    if (!(self = [super init]))
+        return nil;
+        
+    p1 = inP1;
+    p2 = inP2;
+    p3 = inP3;
+    p4 = inP4;
+    return self;
+}
+
+- (id)copyWithZone:(NSZone *)zone
+{
+    UNUSED_PARAM(zone);
+    return [self retain];
+}
+
+- (NSString *)description
+{
+    return [NSString stringWithFormat:@"p1:{%g, %g} p2:{%g, %g} p3:{%g, %g} p4:{%g, %g}", p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, p4.x, p4.y];
+}
+
+- (BOOL)hitTest:(CGPoint)point
+{
+    return [self quad].containsPoint(point);
+}
+
+- (BOOL)isEqual:(id)other
+{
+    return  CGPointEqualToPoint(p1, ((WebEventRegion *)other)->p1) &&
+            CGPointEqualToPoint(p2, ((WebEventRegion *)other)->p2) &&
+            CGPointEqualToPoint(p3, ((WebEventRegion *)other)->p3) &&
+            CGPointEqualToPoint(p4, ((WebEventRegion *)other)->p4);
+}
+
+- (FloatQuad)quad
+{
+    return FloatQuad(p1, p2, p3, p4);
+}
+
+@end
+
+#endif // ENABLE(TOUCH_EVENTS)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to