<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[164626] trunk/Source/WebKit2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/164626">164626</a></dd>
<dt>Author</dt> <dd>mitz@apple.com</dd>
<dt>Date</dt> <dd>2014-02-24 20:00:13 -0800 (Mon, 24 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Cocoa] Start adding API for customizing actions on activated elements
https://bugs.webkit.org/show_bug.cgi?id=129284

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Added. Includes the public interface of what
was WKElementActionInfo.
* UIProcess/API/Cocoa/_WKActivatedElementInfo.m: Added.
(-[_WKActivatedElementInfo _initWithURL:location:title:rect:]): Moved and renamed internal
initializer from WKElementActionInfo.
(-[_WKActivatedElementInfo dealloc]): Moved from WKElementActionInfo.
(-[_WKActivatedElementInfo _boundingRect]): Added private accessor.
(-[_WKActivatedElementInfo _interactionLocation]): Ditto.
* UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: Added.

* UIProcess/API/Cocoa/_WKElementAction.h: Added.
(_WKElementActionType): Moved from WKActionSheet.h and turned into a proper NS_ENUM.
* UIProcess/API/Cocoa/_WKElementAction.mm: Added.
(-[_WKElementAction _initWithTitle:actionHandler:type:]): Moved and renamed internal
initializer from WKActionSheet.mm.
(-[_WKElementAction dealloc]): Moved from WKActionSheet.mm.
(+[_WKElementAction elementActionWithTitle:actionHandler:]): Moved and renamed.
(copyElement): Moved from WKActionSheet.mm.
(saveImage): Ditto.
(addToReadingList): Ditto.
(+[_WKElementAction elementActionWithType:customTitle:]): Moved and renamed.
(+[_WKElementAction elementActionWithType:]): Ditto.
(-[_WKElementAction _runActionWithElementInfo:view:]): Moved from WKActionSheet.mm.
* UIProcess/API/Cocoa/WKElementActionInternal.h: Added.

* UIProcess/ios/WKActionSheet.h: Removed declarations that were moved elsewhere.
* UIProcess/ios/WKActionSheet.mm: Removed code that was moved elsewhere.
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]):
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant showDataDetectorsSheet]):

* WebKit2.xcodeproj/project.pbxproj: Added references to new files. Changed the Objective-C
class name check to allow _WK as a class name prefix.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKActionSheeth">trunk/Source/WebKit2/UIProcess/ios/WKActionSheet.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKActionSheetmm">trunk/Source/WebKit2/UIProcess/ios/WKActionSheet.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKActionSheetAssistantmm">trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKActivatedElementInfoh">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfo.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKActivatedElementInfomm">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfo.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKActivatedElementInfoInternalh">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKElementActionh">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKElementActionmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKElementActionInternalh">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKElementActionInternal.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (164625 => 164626)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-02-25 03:34:44 UTC (rev 164625)
+++ trunk/Source/WebKit2/ChangeLog        2014-02-25 04:00:13 UTC (rev 164626)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><ins>+2014-02-24  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        [Cocoa] Start adding API for customizing actions on activated elements
+        https://bugs.webkit.org/show_bug.cgi?id=129284
+
+        Reviewed by Anders Carlsson.
+
+        * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Added. Includes the public interface of what
+        was WKElementActionInfo.
+        * UIProcess/API/Cocoa/_WKActivatedElementInfo.m: Added.
+        (-[_WKActivatedElementInfo _initWithURL:location:title:rect:]): Moved and renamed internal
+        initializer from WKElementActionInfo.
+        (-[_WKActivatedElementInfo dealloc]): Moved from WKElementActionInfo.
+        (-[_WKActivatedElementInfo _boundingRect]): Added private accessor.
+        (-[_WKActivatedElementInfo _interactionLocation]): Ditto.
+        * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: Added.
+
+        * UIProcess/API/Cocoa/_WKElementAction.h: Added.
+        (_WKElementActionType): Moved from WKActionSheet.h and turned into a proper NS_ENUM.
+        * UIProcess/API/Cocoa/_WKElementAction.mm: Added.
+        (-[_WKElementAction _initWithTitle:actionHandler:type:]): Moved and renamed internal
+        initializer from WKActionSheet.mm.
+        (-[_WKElementAction dealloc]): Moved from WKActionSheet.mm.
+        (+[_WKElementAction elementActionWithTitle:actionHandler:]): Moved and renamed.
+        (copyElement): Moved from WKActionSheet.mm.
+        (saveImage): Ditto.
+        (addToReadingList): Ditto.
+        (+[_WKElementAction elementActionWithType:customTitle:]): Moved and renamed.
+        (+[_WKElementAction elementActionWithType:]): Ditto.
+        (-[_WKElementAction _runActionWithElementInfo:view:]): Moved from WKActionSheet.mm.
+        * UIProcess/API/Cocoa/WKElementActionInternal.h: Added.
+
+        * UIProcess/ios/WKActionSheet.h: Removed declarations that were moved elsewhere.
+        * UIProcess/ios/WKActionSheet.mm: Removed code that was moved elsewhere.
+        * UIProcess/ios/WKActionSheetAssistant.mm:
+        (-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]):
+        (-[WKActionSheetAssistant showImageSheet]):
+        (-[WKActionSheetAssistant showLinkSheet]):
+        (-[WKActionSheetAssistant showDataDetectorsSheet]):
+
+        * WebKit2.xcodeproj/project.pbxproj: Added references to new files. Changed the Objective-C
+        class name check to allow _WK as a class name prefix.
+
</ins><span class="cx"> 2014-02-24  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Use RetainPtrs for two WKContentView data members
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKActivatedElementInfoh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfo.h (0 => 164626)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfo.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfo.h        2014-02-25 04:00:13 UTC (rev 164626)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 &lt;WebKit2/WKFoundation.h&gt;
+
+#if WK_API_ENABLED
+
+#import &lt;Foundation/Foundation.h&gt;
+
+WK_API_CLASS
+@interface _WKActivatedElementInfo : NSObject
+
+@property (nonatomic, readonly) NSURL *URL;
+@property (nonatomic, readonly) NSString *title;
+
+@end
+
+#endif // WK_API_ENABLED
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKActivatedElementInfomm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfo.mm (0 => 164626)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfo.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfo.mm        2014-02-25 04:00:13 UTC (rev 164626)
</span><span class="lines">@@ -0,0 +1,75 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 &quot;config.h&quot;
+#import &quot;_WKActivatedElementInfoInternal.h&quot;
+
+#if WK_API_ENABLED
+
+#import &lt;wtf/RetainPtr.h&gt;
+
+@implementation _WKActivatedElementInfo  {
+    RetainPtr&lt;NSURL&gt; _URL;
+    RetainPtr&lt;NSString&gt; _title;
+    CGPoint _interactionLocation;
+    CGRect _boundingRect;
+}
+
+- (instancetype)_initWithURL:(NSURL *)url location:(CGPoint)location title:(NSString *)title rect:(CGRect)rect
+{
+    if (!(self = [super init]))
+        return nil;
+
+    _URL = adoptNS([url copy]);
+    _interactionLocation = location;
+    _title = adoptNS([title copy]);
+    _boundingRect = rect;
+
+    return self;
+}
+
+- (NSURL *)URL
+{
+    return _URL.get();
+}
+
+- (NSString *)title
+{
+    return _title.get();
+}
+
+- (CGRect)_boundingRect
+{
+    return _boundingRect;
+}
+
+- (CGPoint)_interactionLocation
+{
+    return _interactionLocation;
+}
+
+@end
+
+#endif // WK_API_ENABLED
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKActivatedElementInfoInternalh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h (0 => 164626)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h        2014-02-25 04:00:13 UTC (rev 164626)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 &quot;_WKActivatedElementInfo.h&quot;
+
+#if WK_API_ENABLED
+
+@interface _WKActivatedElementInfo ()
+
+- (instancetype)_initWithURL:(NSURL *)url location:(CGPoint)location title:(NSString *)title rect:(CGRect)rect;
+
+@property (nonatomic, readonly) CGPoint _interactionLocation;
+@property (nonatomic, readonly) CGRect _boundingRect;
+
+@end
+
+#endif // WK_API_ENABLED
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKElementActionh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.h (0 => 164626)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.h        2014-02-25 04:00:13 UTC (rev 164626)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 &lt;WebKit2/WKFoundation.h&gt;
+
+#if WK_API_ENABLED
+
+#if TARGET_OS_IPHONE
+
+#import &lt;WebKit2/_WKActivatedElementInfo.h&gt;
+
+typedef void (^WKElementActionHandler)(_WKActivatedElementInfo *);
+
+typedef NS_ENUM(NSInteger, _WKElementActionType) {
+    _WKElementActionTypeCustom,
+    _WKElementActionTypeOpen,
+    _WKElementActionTypeCopy,
+    _WKElementActionTypeSaveImage,
+    _WKElementActionTypeAddToReadingList,
+};
+
+WK_API_CLASS
+@interface _WKElementAction : NSObject
+
++ (instancetype)elementActionWithType:(_WKElementActionType)type;
++ (instancetype)elementActionWithType:(_WKElementActionType)type customTitle:(NSString *)title;
+
++ (instancetype)elementActionWithTitle:(NSString *)title actionHandler:(WKElementActionHandler)handler;
+
+@property (nonatomic, readonly) _WKElementActionType type;
+@property (nonatomic, readonly) NSString* title;
+
+@end
+
+#endif // TARGET_OS_IPHONE
+
+#endif // WK_API_ENABLED
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKElementActionmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.mm (0 => 164626)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.mm        2014-02-25 04:00:13 UTC (rev 164626)
</span><span class="lines">@@ -0,0 +1,150 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 &quot;config.h&quot;
+#import &quot;_WKElementActionInternal.h&quot;
+
+#if WK_API_ENABLED
+
+#if PLATFORM(IOS)
+
+#import &quot;_WKActivatedElementInfoInternal.h&quot;
+#import &quot;WKContentViewInteraction.h&quot;
+#import &quot;WKGestureTypes.h&quot;
+#import &lt;SafariServices/SSReadingList.h&gt;
+#import &lt;WebCore/LocalizedStrings.h&gt;
+#import &lt;WebCore/SoftLinking.h&gt;
+#import &lt;wtf/RetainPtr.h&gt;
+#import &lt;wtf/text/WTFString.h&gt;
+
+SOFT_LINK_FRAMEWORK(SafariServices);
+SOFT_LINK_CLASS(SafariServices, SSReadingList);
+
+typedef void (^WKElementActionHandlerInternal)(WKContentView *, _WKActivatedElementInfo *);
+
+@implementation _WKElementAction  {
+    RetainPtr&lt;NSString&gt; _title;
+    WKElementActionHandlerInternal _actionHandler;
+}
+
+- (id)_initWithTitle:(NSString *)title actionHandler:(WKElementActionHandlerInternal)handler type:(_WKElementActionType)type
+{
+    if (!(self = [super init]))
+        return nil;
+
+    _title = adoptNS([title copy]);
+    _type = type;
+    _actionHandler = [handler copy];
+    return self;
+}
+
+- (void)dealloc
+{
+    [_actionHandler release];
+
+    [super dealloc];
+}
+
++ (instancetype)elementActionWithTitle:(NSString *)title actionHandler:(WKElementActionHandler)handler
+{
+    return [[[self alloc] _initWithTitle:title actionHandler:^(WKContentView *view, _WKActivatedElementInfo *actionInfo) { handler(actionInfo); }
+       type:_WKElementActionTypeCustom] autorelease];
+}
+
+static void copyElement(WKContentView *view)
+{
+    [view _performAction:WebKit::WKSheetActionCopy];
+}
+
+static void saveImage(WKContentView *view)
+{
+    [view _performAction:WebKit::WKSheetActionSaveImage];
+}
+
+static void addToReadingList(NSURL *targetURL, NSString *title)
+{
+    if (!title || [title length] == 0)
+        title = [targetURL absoluteString];
+
+    [[getSSReadingListClass() defaultReadingList] addReadingListItemWithURL:targetURL title:title previewText:nil error:nil];
+}
+
++ (instancetype)elementActionWithType:(_WKElementActionType)type customTitle:(NSString *)customTitle
+{
+    NSString *title;
+    WKElementActionHandlerInternal handler;
+    switch (type) {
+    case _WKElementActionTypeCopy:
+        title = WEB_UI_STRING_KEY(&quot;Copy&quot;, &quot;Copy ActionSheet Link&quot;, &quot;Title for Copy Link or Image action button&quot;);
+        handler = ^(WKContentView *view, _WKActivatedElementInfo *actionInfo) {
+            copyElement(view);
+        };
+        break;
+    case _WKElementActionTypeOpen:
+        title = WEB_UI_STRING_KEY(&quot;Open&quot;, &quot;Open ActionSheet Link&quot;, &quot;Title for Open Link action button&quot;);
+        handler = ^(WKContentView *view, _WKActivatedElementInfo *actionInfo) {
+            [view _attemptClickAtLocation:actionInfo._interactionLocation];
+        };
+        break;
+    case _WKElementActionTypeSaveImage:
+        title = WEB_UI_STRING_KEY(&quot;Save Image&quot;, &quot;Save Image&quot;, &quot;Title for Save Image action button&quot;);
+        handler = ^(WKContentView *view, _WKActivatedElementInfo *actionInfo) {
+            saveImage(view);
+        };
+        break;
+    case _WKElementActionTypeAddToReadingList:
+        title = WEB_UI_STRING(&quot;Add to Reading List&quot;, &quot;Title for Add to Reading List action button&quot;);
+        handler = ^(WKContentView *view, _WKActivatedElementInfo *actionInfo) {
+            addToReadingList(actionInfo.URL, actionInfo.title);
+        };
+        break;
+    default:
+        [NSException raise:NSInvalidArgumentException format:@&quot;There is no standard web element action of type %ld.&quot;, type];
+        return nil;
+    }
+
+    return [[[self alloc] _initWithTitle:(customTitle ? customTitle : title) actionHandler:handler type:type] autorelease];
+}
+
++ (instancetype)elementActionWithType:(_WKElementActionType)type
+{
+    return [self elementActionWithType:type customTitle:nil];
+}
+
+- (NSString *)title
+{
+    return _title.get();
+}
+
+- (void)_runActionWithElementInfo:(_WKActivatedElementInfo *)info view:(WKContentView *)view
+{
+    _actionHandler(view, info);
+}
+
+@end
+
+#endif // PLATFORM(IOS)
+
+#endif // WK_API_ENABLED
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKElementActionInternalh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKElementActionInternal.h (0 => 164626)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKElementActionInternal.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKElementActionInternal.h        2014-02-25 04:00:13 UTC (rev 164626)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 &quot;_WKElementAction.h&quot;
+
+#if WK_API_ENABLED
+
+#if PLATFORM(IOS)
+
+@class WKContentView;
+
+@interface _WKElementAction ()
+
+- (void)_runActionWithElementInfo:(_WKActivatedElementInfo *)info view:(WKContentView *)view;
+
+@end
+
+#endif // PLATFORM(IOS)
+
+#endif // WK_API_ENABLED
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKActionSheeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKActionSheet.h (164625 => 164626)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKActionSheet.h        2014-02-25 03:34:44 UTC (rev 164625)
+++ trunk/Source/WebKit2/UIProcess/ios/WKActionSheet.h        2014-02-25 04:00:13 UTC (rev 164626)
</span><span class="lines">@@ -25,7 +25,6 @@
</span><span class="cx"> 
</span><span class="cx"> #import &lt;UIKit/UIActionSheet.h&gt;
</span><span class="cx"> #import &lt;UIKit/UIPopoverController.h&gt;
</span><del>-#import &lt;WebKit2/WKDeclarationSpecifiers.h&gt;
</del><span class="cx"> 
</span><span class="cx"> @protocol WKActionSheetDelegate;
</span><span class="cx"> @class WKContentView;
</span><span class="lines">@@ -41,43 +40,9 @@
</span><span class="cx"> - (void)updateSheetPosition;
</span><span class="cx"> @end
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> @protocol WKActionSheetDelegate&lt;UIActionSheetDelegate&gt;
</span><span class="cx"> @required
</span><span class="cx"> - (UIView *)hostViewForSheet;
</span><span class="cx"> - (CGRect)initialPresentationRectInHostViewForSheet;
</span><span class="cx"> - (CGRect)presentationRectInHostViewForSheet;
</span><span class="cx"> @end
</span><del>-
-// Elements to describe action sheet content.
-
-WK_EXPORT @interface WKElementActionInfo : NSObject
-
-- (WKElementActionInfo *)initWithInfo:(NSURL *)url location:(CGPoint)location title:(NSString *)title rect:(CGRect)rect;
-@property (nonatomic, readonly) CGPoint interactionLocation;
-@property (nonatomic, readonly) NSURL *url;
-@property (nonatomic, readonly) NSString *title;
-@property (nonatomic, readonly) CGRect boundingRect;
-@end
-
-typedef void (^WKElementActionHandler)(WKElementActionInfo *);
-typedef void (^WKElementActionHandlerInternal)(WKContentView *, WKElementActionInfo *);
-
-typedef enum {
-    WKElementActionTypeCustom = 0,
-    WKElementActionTypeOpen,
-    WKElementActionTypeCopy,
-    WKElementActionTypeSaveImage,
-    WKElementActionTypeAddToReadingList,
-} WKElementActionType;
-
-WK_EXPORT @interface WKElementAction : NSObject
-@property (nonatomic, readonly) WKElementActionType type;
-@property (nonatomic, readonly) NSString* title;
-
-+ (WKElementAction *)customElementActionWithTitle:(NSString *)title actionHandler:(WKElementActionHandler)handler;
-+ (WKElementAction *)standardElementActionWithType:(WKElementActionType)type;
-+ (WKElementAction *)standardElementActionWithType:(WKElementActionType)type customTitle:(NSString *)title;
-- (void)runActionWithElementInfo:(WKElementActionInfo *)info view:(WKContentView *)view;
-
-@end
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKActionSheetmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKActionSheet.mm (164625 => 164626)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKActionSheet.mm        2014-02-25 03:34:44 UTC (rev 164625)
+++ trunk/Source/WebKit2/UIProcess/ios/WKActionSheet.mm        2014-02-25 04:00:13 UTC (rev 164626)
</span><span class="lines">@@ -26,29 +26,13 @@
</span><span class="cx"> #import &quot;config.h&quot;
</span><span class="cx"> #import &quot;WKActionSheet.h&quot;
</span><span class="cx"> 
</span><del>-#import &quot;WKGestureTypes.h&quot;
</del><span class="cx"> #import &quot;WKContentViewInteraction.h&quot;
</span><del>-#import &lt;SafariServices/SSReadingList.h&gt;
</del><span class="cx"> #import &lt;UIKit/UIActionSheet_Private.h&gt;
</span><del>-#import &lt;UIKit/UIView.h&gt;
</del><span class="cx"> #import &lt;UIKit/UIWindow_Private.h&gt;
</span><del>-#import &lt;WebCore/LocalizedStrings.h&gt;
-#import &lt;WebCore/SoftLinking.h&gt;
-#import &lt;wtf/text/WTFString.h&gt;
-#import &lt;wtf/RetainPtr.h&gt;
</del><span class="cx"> 
</span><del>-SOFT_LINK_FRAMEWORK(SafariServices);
-SOFT_LINK_CLASS(SafariServices, SSReadingList);
-
-using namespace WebKit;
-
-@interface WKElementAction(Private)
-- (void)_runActionWithElement:(NSURL *)targetURL documentView:(WKContentView *)view interactionLocation:(CGPoint)interactionLocation;
-@end
-
</del><span class="cx"> @implementation WKActionSheet {
</span><del>-    id&lt;WKActionSheetDelegate&gt; _sheetDelegate;
-    id&lt;UIActionSheetDelegate&gt; _delegateWhileRotating;
</del><ins>+    id &lt;WKActionSheetDelegate&gt; _sheetDelegate;
+    id &lt;UIActionSheetDelegate&gt; _delegateWhileRotating;
</ins><span class="cx">     WKContentView *_view;
</span><span class="cx">     UIPopoverArrowDirection _arrowDirections;
</span><span class="cx">     BOOL _isRotating;
</span><span class="lines">@@ -173,128 +157,3 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> @end
</span><del>-
-@implementation WKElementActionInfo  {
-    CGPoint _interactionLocation;
-    NSURL *_url;
-    NSString *_title;
-    CGRect _boundingRect;
-    CGImageRef _snapshot;
-}
-
-- (WKElementActionInfo *) initWithInfo:(NSURL *)url location:(CGPoint)location title:(NSString *)title rect:(CGRect)rect
-{
-    _url = [url copy];
-    _interactionLocation = location;
-    _title = [title copy];
-    _boundingRect = rect;
-
-    return self;
-}
-
-- (void)dealloc
-{
-    [_title release];
-    [_url release];
-    
-    [super dealloc];
-}
-
-@end
-
-@implementation WKElementAction  {
-    NSString *_title;
-    WKElementActionHandlerInternal _actionHandler;
-    WKElementActionType _type;
-}
-
-- (id)initWithTitle:(NSString *)title actionHandler:(WKElementActionHandlerInternal)handler type:(WKElementActionType)type
-{
-    if (!(self = [super init]))
-        return nil;
-    _title = [title copy];
-    _type = type;
-    _actionHandler = Block_copy(handler);
-    return self;
-}
-
-- (void)dealloc
-{
-    [_title release];
-    [_actionHandler release];
-    [super dealloc];
-}
-
-+ (WKElementAction *)customElementActionWithTitle:(NSString *)title actionHandler:(WKElementActionHandler)handler
-{
-    return [[[self alloc] initWithTitle:title
-                          actionHandler:^(WKContentView *view, WKElementActionInfo *actionInfo) { handler(actionInfo); }
-                                   type:WKElementActionTypeCustom] autorelease];
-}
-
-static void copyElement(WKContentView *view)
-{
-    [view _performAction:WebKit::WKSheetActionCopy];
-}
-
-static void saveImage(WKContentView *view)
-{
-    [view _performAction:WebKit::WKSheetActionSaveImage];
-}
-
-static void addToReadingList(NSURL *targetURL, NSString *title)
-{
-    if (!title || [title length] == 0)
-        title = [targetURL absoluteString];
-
-    [[getSSReadingListClass() defaultReadingList] addReadingListItemWithURL:targetURL title:title previewText:nil error:nil];
-}
-
-+ (WKElementAction *)standardElementActionWithType:(WKElementActionType)type customTitle:(NSString *)customTitle
-{
-    NSString *title;
-    WKElementActionHandlerInternal handler;
-    switch (type) {
-    case WKElementActionTypeCopy:
-        title = WEB_UI_STRING_KEY(&quot;Copy&quot;, &quot;Copy ActionSheet Link&quot;, &quot;Title for Copy Link or Image action button&quot;);
-        handler = ^(WKContentView *view, WKElementActionInfo *actionInfo) {
-            copyElement(view);
-        };
-        break;
-    case WKElementActionTypeOpen:
-        title = WEB_UI_STRING_KEY(&quot;Open&quot;, &quot;Open ActionSheet Link&quot;, &quot;Title for Open Link action button&quot;);
-        handler = ^(WKContentView *view, WKElementActionInfo *actionInfo) {
-            [view _attemptClickAtLocation:actionInfo.interactionLocation];
-        };
-        break;
-    case WKElementActionTypeSaveImage:
-        title = WEB_UI_STRING_KEY(&quot;Save Image&quot;, &quot;Save Image&quot;, &quot;Title for Save Image action button&quot;);
-        handler = ^(WKContentView *view, WKElementActionInfo *actionInfo) {
-            saveImage(view);
-        };
-        break;
-    case WKElementActionTypeAddToReadingList:
-        title = WEB_UI_STRING(&quot;Add to Reading List&quot;, &quot;Title for Add to Reading List action button&quot;);
-        handler = ^(WKContentView *view, WKElementActionInfo *actionInfo) {
-            addToReadingList(actionInfo.url, actionInfo.title);
-        };
-        break;
-    default:
-        [NSException raise:NSInvalidArgumentException format:@&quot;There is no standard web element action of type %d.&quot;, type];
-        return nil;
-    }
-    return [[[WKElementAction alloc] initWithTitle:(customTitle ? customTitle : title) actionHandler:handler type:type] autorelease];
-}
-
-+ (WKElementAction *)standardElementActionWithType:(WKElementActionType)type
-{
-    return [self standardElementActionWithType:type customTitle:nil];
-}
-
-- (void)runActionWithElementInfo:(WKElementActionInfo *)info view:(WKContentView *)view
-{
-    _actionHandler(view, info);
-}
-@end
-
-
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKActionSheetAssistantmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm (164625 => 164626)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm        2014-02-25 03:34:44 UTC (rev 164625)
+++ trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm        2014-02-25 04:00:13 UTC (rev 164626)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #import &quot;config.h&quot;
</span><span class="cx"> #import &quot;WKActionSheetAssistant.h&quot;
</span><span class="cx"> 
</span><ins>+#import &quot;_WKActivatedElementInfoInternal.h&quot;
+#import &quot;_WKElementActionInternal.h&quot;
</ins><span class="cx"> #import &quot;WKActionSheet.h&quot;
</span><span class="cx"> #import &quot;WKContentViewInteraction.h&quot;
</span><span class="cx"> #import &quot;WebPageProxy.h&quot;
</span><span class="lines">@@ -51,10 +53,6 @@
</span><span class="cx"> SOFT_LINK_PRIVATE_FRAMEWORK(DataDetectorsUI)
</span><span class="cx"> SOFT_LINK_CLASS(DataDetectorsUI, DDDetectionController)
</span><span class="cx"> 
</span><del>-@interface WKElementAction(Private)
-- (void)_runActionWithElement:(NSURL *)targetURL documentView:(WKContentView *)view interactionLocation:(CGPoint)interactionLocation;
-@end
-
</del><span class="cx"> @implementation WKActionSheetAssistant {
</span><span class="cx">     RetainPtr&lt;WKActionSheet&gt; _interactionSheet;
</span><span class="cx">     RetainPtr&lt;NSArray&gt; _elementActions;
</span><span class="lines">@@ -157,11 +155,9 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (_elementActions &amp;&amp; buttonIndex &lt; (NSInteger)[_elementActions count]) {
</span><del>-        WKElementActionInfo* actionInfo = [[WKElementActionInfo alloc] initWithInfo:[NSURL URLWithString:_view.positionInformation.url]
-                                                                           location:_view.positionInformation.point
-                                                                              title:_view.positionInformation.title
-                                                                               rect:_view.positionInformation.bounds];
-        [[_elementActions objectAtIndex:buttonIndex] runActionWithElementInfo:actionInfo view:_view];
</del><ins>+        _WKActivatedElementInfo *actionInfo = [[_WKActivatedElementInfo alloc] _initWithURL:[NSURL URLWithString:_view.positionInformation.url]
+            location:_view.positionInformation.point title:_view.positionInformation.title rect:_view.positionInformation.bounds];
+        [[_elementActions objectAtIndex:buttonIndex] _runActionWithElementInfo:actionInfo view:_view];
</ins><span class="cx">         [actionInfo release];
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -209,7 +205,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _elementActions = adoptNS([actions copy]);
</span><del>-    for (WKElementAction *action in _elementActions.get())
</del><ins>+    for (_WKElementAction *action in _elementActions.get())
</ins><span class="cx">         [_interactionSheet addButtonWithTitle:[action title]];
</span><span class="cx"> 
</span><span class="cx">     [_interactionSheet setCancelButtonIndex:[_interactionSheet addButtonWithTitle:WEB_UI_STRING_KEY(&quot;Cancel&quot;, &quot;Cancel button label in button bar&quot;, &quot;Title for Cancel button label in button bar&quot;)]];
</span><span class="lines">@@ -223,13 +219,13 @@
</span><span class="cx">     NSURL *targetURL = [NSURL URLWithString:_view.positionInformation.url];
</span><span class="cx">     NSMutableArray *actions = [NSMutableArray array];
</span><span class="cx">     if (!_view.positionInformation.url.isEmpty())
</span><del>-        [actions addObject:[WKElementAction standardElementActionWithType:WKElementActionTypeOpen]];
</del><ins>+        [actions addObject:[_WKElementAction elementActionWithType:_WKElementActionTypeOpen]];
</ins><span class="cx">     if ([getSSReadingListClass() supportsURL:targetURL])
</span><del>-        [actions addObject:[WKElementAction standardElementActionWithType:WKElementActionTypeAddToReadingList]];
</del><ins>+        [actions addObject:[_WKElementAction elementActionWithType:_WKElementActionTypeAddToReadingList]];
</ins><span class="cx">     if (TCCAccessPreflight(getkTCCServicePhotos(), NULL) != kTCCAccessPreflightDenied)
</span><del>-        [actions addObject:[WKElementAction standardElementActionWithType:WKElementActionTypeSaveImage]];
</del><ins>+        [actions addObject:[_WKElementAction elementActionWithType:_WKElementActionTypeSaveImage]];
</ins><span class="cx">     if (![[targetURL scheme] length] || [[targetURL scheme] caseInsensitiveCompare:@&quot;javascript&quot;] != NSOrderedSame)
</span><del>-        [actions addObject:[WKElementAction standardElementActionWithType:WKElementActionTypeCopy]];
</del><ins>+        [actions addObject:[_WKElementAction elementActionWithType:_WKElementActionTypeCopy]];
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: Add call to delegate to add custom actions.
</span><span class="cx"> 
</span><span class="lines">@@ -249,11 +245,11 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     NSMutableArray *actions = [NSMutableArray array];
</span><del>-    [actions addObject:[WKElementAction standardElementActionWithType:WKElementActionTypeOpen]];
</del><ins>+    [actions addObject:[_WKElementAction elementActionWithType:_WKElementActionTypeOpen]];
</ins><span class="cx">     if ([getSSReadingListClass() supportsURL:targetURL])
</span><del>-        [actions addObject:[WKElementAction standardElementActionWithType:WKElementActionTypeAddToReadingList]];
</del><ins>+        [actions addObject:[_WKElementAction elementActionWithType:_WKElementActionTypeAddToReadingList]];
</ins><span class="cx">     if (![[targetURL scheme] length] || [[targetURL scheme] caseInsensitiveCompare:@&quot;javascript&quot;] != NSOrderedSame)
</span><del>-        [actions addObject:[WKElementAction standardElementActionWithType:WKElementActionTypeCopy]];
</del><ins>+        [actions addObject:[_WKElementAction elementActionWithType:_WKElementActionTypeCopy]];
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: Add call to delegate to add custom actions.
</span><span class="cx"> 
</span><span class="lines">@@ -288,7 +284,7 @@
</span><span class="cx">     NSMutableArray *elementActions = [NSMutableArray array];
</span><span class="cx">     for (NSUInteger actionNumber = 0; actionNumber &lt; [dataDetectorsActions count]; actionNumber++) {
</span><span class="cx">         DDAction *action = [dataDetectorsActions objectAtIndex:actionNumber];
</span><del>-        [elementActions addObject:[WKElementAction customElementActionWithTitle:[action localizedName] actionHandler:^(WKElementActionInfo *actionInfo) {
</del><ins>+        [elementActions addObject:[_WKElementAction elementActionWithTitle:[action localizedName] actionHandler:^(_WKActivatedElementInfo *actionInfo) {
</ins><span class="cx">             UIPopoverController *popoverController = nil;
</span><span class="cx">             if (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPhone) {
</span><span class="cx">                 [_interactionSheet setUserInteractionEnabled:NO];
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (164625 => 164626)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-02-25 03:34:44 UTC (rev 164625)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-02-25 04:00:13 UTC (rev 164626)
</span><span class="lines">@@ -623,6 +623,12 @@
</span><span class="cx">                 37948408150C4B9700E52CE9 /* WKRenderLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37948406150C4B9600E52CE9 /* WKRenderLayer.cpp */; };
</span><span class="cx">                 37948409150C4B9700E52CE9 /* WKRenderLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 37948407150C4B9600E52CE9 /* WKRenderLayer.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 3795789C18AD4F1900B9ED2E /* WKWebProcessPlugInFormDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 3795789B18AD4F1100B9ED2E /* WKWebProcessPlugInFormDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                379A873618BBFA4300588AF2 /* _WKActivatedElementInfoInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 379A873518BBFA4300588AF2 /* _WKActivatedElementInfoInternal.h */; };
+                379A873918BBFE0F00588AF2 /* _WKElementAction.mm in Sources */ = {isa = PBXBuildFile; fileRef = 379A873718BBFE0F00588AF2 /* _WKElementAction.mm */; };
+                379A873A18BBFE0F00588AF2 /* _WKElementAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 379A873818BBFE0F00588AF2 /* _WKElementAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                379A873C18BBFF0700588AF2 /* _WKElementActionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 379A873B18BBFF0700588AF2 /* _WKElementActionInternal.h */; };
+                37A5E01318BBF937000A081E /* _WKActivatedElementInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37A5E01118BBF937000A081E /* _WKActivatedElementInfo.mm */; };
+                37A5E01418BBF93F000A081E /* _WKActivatedElementInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 37A5E01218BBF937000A081E /* _WKActivatedElementInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 37C4C08618149C5B003688B9 /* WKBackForwardListItem.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37C4C08418149C5B003688B9 /* WKBackForwardListItem.mm */; };
</span><span class="cx">                 37C4C08718149C5B003688B9 /* WKBackForwardListItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 37C4C08518149C5B003688B9 /* WKBackForwardListItem.h */; settings = {ATTRIBUTES = (Public, ); }; };
</span><span class="cx">                 37C4C08918149F23003688B9 /* WKBackForwardListItemInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 37C4C08818149F23003688B9 /* WKBackForwardListItemInternal.h */; };
</span><span class="lines">@@ -2344,6 +2350,12 @@
</span><span class="cx">                 37948406150C4B9600E52CE9 /* WKRenderLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKRenderLayer.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37948407150C4B9600E52CE9 /* WKRenderLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKRenderLayer.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 3795789B18AD4F1100B9ED2E /* WKWebProcessPlugInFormDelegatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebProcessPlugInFormDelegatePrivate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                379A873518BBFA4300588AF2 /* _WKActivatedElementInfoInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKActivatedElementInfoInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                379A873718BBFE0F00588AF2 /* _WKElementAction.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKElementAction.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                379A873818BBFE0F00588AF2 /* _WKElementAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKElementAction.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                379A873B18BBFF0700588AF2 /* _WKElementActionInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKElementActionInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                37A5E01118BBF937000A081E /* _WKActivatedElementInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKActivatedElementInfo.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                37A5E01218BBF937000A081E /* _WKActivatedElementInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKActivatedElementInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 37C4C08418149C5B003688B9 /* WKBackForwardListItem.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKBackForwardListItem.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37C4C08518149C5B003688B9 /* WKBackForwardListItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBackForwardListItem.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37C4C08818149F23003688B9 /* WKBackForwardListItemInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBackForwardListItemInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4396,6 +4408,12 @@
</span><span class="cx">                         children = (
</span><span class="cx">                                 1AC5C47A18BBCB7D0089F57F /* To Be Removed */,
</span><span class="cx">                                 1A43E826188F38E2009E4D30 /* Deprecated */,
</span><ins>+                                37A5E01218BBF937000A081E /* _WKActivatedElementInfo.h */,
+                                37A5E01118BBF937000A081E /* _WKActivatedElementInfo.mm */,
+                                379A873518BBFA4300588AF2 /* _WKActivatedElementInfoInternal.h */,
+                                379A873818BBFE0F00588AF2 /* _WKElementAction.h */,
+                                379A873718BBFE0F00588AF2 /* _WKElementAction.mm */,
+                                379A873B18BBFF0700588AF2 /* _WKElementActionInternal.h */,
</ins><span class="cx">                                 2D6B371918A967AD0042AE80 /* WKThumbnailView.h */,
</span><span class="cx">                                 2DACE64D18ADBFF000E4CA76 /* WKThumbnailViewInternal.h */,
</span><span class="cx">                                 2D6B371A18A967AD0042AE80 /* WKThumbnailView.mm */,
</span><span class="lines">@@ -6384,6 +6402,7 @@
</span><span class="cx">                                 BCE81D8D1319F7EF00241910 /* FontInfo.h in Headers */,
</span><span class="cx">                                 1ABC3DFC1899F51C004F0626 /* WKNavigationDelegate.h in Headers */,
</span><span class="cx">                                 BC17753F118BABF0007D9E9A /* GenericCallback.h in Headers */,
</span><ins>+                                379A873618BBFA4300588AF2 /* _WKActivatedElementInfoInternal.h in Headers */,
</ins><span class="cx">                                 BC06F42F12DBB9B6002D78DE /* GeolocationPermissionRequestManager.h in Headers */,
</span><span class="cx">                                 BC06F44A12DBD1F5002D78DE /* GeolocationPermissionRequestManagerProxy.h in Headers */,
</span><span class="cx">                                 BC06F43A12DBCCFB002D78DE /* GeolocationPermissionRequestProxy.h in Headers */,
</span><span class="lines">@@ -6448,6 +6467,7 @@
</span><span class="cx">                                 1AA5889211EE70400061B882 /* NetscapePluginStream.h in Headers */,
</span><span class="cx">                                 E1798C7A16E6818800240139 /* NetworkBlobRegistry.h in Headers */,
</span><span class="cx">                                 513A164D1630A9BF005D7D22 /* NetworkConnectionToWebProcess.h in Headers */,
</span><ins>+                                379A873C18BBFF0700588AF2 /* _WKElementActionInternal.h in Headers */,
</ins><span class="cx">                                 51DD9F2916367DA2001578E9 /* NetworkConnectionToWebProcessMessages.h in Headers */,
</span><span class="cx">                                 5179556A162876F300FA43B6 /* NetworkProcess.h in Headers */,
</span><span class="cx">                                 517CF0E4163A486C00C2950E /* NetworkProcessConnectionMessages.h in Headers */,
</span><span class="lines">@@ -6569,6 +6589,7 @@
</span><span class="cx">                                 1AB474E6184D44B40051B622 /* WKBundlePageFullScreenClient.h in Headers */,
</span><span class="cx">                                 1AB31A9716BC688100F6DBC9 /* StorageManagerMessages.h in Headers */,
</span><span class="cx">                                 296BD85D15019BC30071F424 /* StringUtilities.h in Headers */,
</span><ins>+                                379A873A18BBFE0F00588AF2 /* _WKElementAction.h in Headers */,
</ins><span class="cx">                                 511D81FF185BBDEE001AED56 /* SQLiteIDBTransaction.h in Headers */,
</span><span class="cx">                                 2DA944A01884E4F000ED86DB /* WebIOSEventFactory.h in Headers */,
</span><span class="cx">                                 7CD102DA1866770600ED429D /* AutoCorrectionCallback.h in Headers */,
</span><span class="lines">@@ -6776,6 +6797,7 @@
</span><span class="cx">                                 BCC5715B115ADAEF001CCAF9 /* WebSystemInterface.h in Headers */,
</span><span class="cx">                                 BCA0EF7F12331E78007D3CFB /* WebUndoStep.h in Headers */,
</span><span class="cx">                                 1AC1336C18565C7A00F3EC05 /* APIPageHandle.h in Headers */,
</span><ins>+                                37A5E01418BBF93F000A081E /* _WKActivatedElementInfo.h in Headers */,
</ins><span class="cx">                                 1AB474E8184D44D00051B622 /* WKBundlePageDiagnosticLoggingClient.h in Headers */,
</span><span class="cx">                                 1AC7537C183A9FDB0072CB15 /* PageLoadState.h in Headers */,
</span><span class="cx">                                 BCDB86C11200FB97007254BE /* APIURL.h in Headers */,
</span><span class="lines">@@ -7473,7 +7495,7 @@
</span><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                         shellPath = /bin/sh;
</span><del>-                        shellScript = &quot;if [ \&quot;${ACTION}\&quot; = \&quot;installhdrs\&quot; ]; then\n    exit 0;\nfi\n\nif [ -f ../../Tools/Scripts/check-for-inappropriate-objc-class-names ]; then\n    ../../Tools/Scripts/check-for-inappropriate-objc-class-names WK || exit $?\nfi&quot;;
</del><ins>+                        shellScript = &quot;if [ \&quot;${ACTION}\&quot; = \&quot;installhdrs\&quot; ]; then\n    exit 0;\nfi\n\nif [ -f ../../Tools/Scripts/check-for-inappropriate-objc-class-names ]; then\n    ../../Tools/Scripts/check-for-inappropriate-objc-class-names WK _WK || exit $?\nfi&quot;;
</ins><span class="cx">                 };
</span><span class="cx">                 375A248817E5048E00C9A086 /* Postprocess WKBase.h */ = {
</span><span class="cx">                         isa = PBXShellScriptBuildPhase;
</span><span class="lines">@@ -8139,6 +8161,7 @@
</span><span class="cx">                                 29D55DF1161BF9F10031A2E3 /* WebPageGroupProxyMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 BC963D6E113DD1A500574BE2 /* WebPageMac.mm in Sources */,
</span><span class="cx">                                 C0CE72A01247E71D00BC0EC4 /* WebPageMessageReceiver.cpp in Sources */,
</span><ins>+                                37A5E01318BBF937000A081E /* _WKActivatedElementInfo.mm in Sources */,
</ins><span class="cx">                                 BC111B0F112F5E4F00337BAB /* WebPageProxy.cpp in Sources */,
</span><span class="cx">                                 C58CDF2D1887609F00871536 /* InteractionInformationAtPosition.cpp in Sources */,
</span><span class="cx">                                 51B3005112529D0E000B5CA0 /* WebPageProxyCF.cpp in Sources */,
</span><span class="lines">@@ -8328,6 +8351,7 @@
</span><span class="cx">                                 BC40762A124FF0400068F20A /* WKURLRequestNS.mm in Sources */,
</span><span class="cx">                                 512A9760180E031D0039A149 /* DatabaseProcessMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 BC40760D124FF0270068F20A /* WKURLResponse.cpp in Sources */,
</span><ins>+                                379A873918BBFE0F00588AF2 /* _WKElementAction.mm in Sources */,
</ins><span class="cx">                                 0FCB4E6318BBE3D9000FCFC9 /* PageClientImpl.mm in Sources */,
</span><span class="cx">                                 1ADCB86A189831B30022EE5A /* NavigationActionData.cpp in Sources */,
</span><span class="cx">                                 BC40762C124FF0400068F20A /* WKURLResponseNS.mm in Sources */,
</span></span></pre>
</div>
</div>

</body>
</html>