<!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>[167074] trunk/Source</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/167074">167074</a></dd>
<dt>Author</dt> <dd>ap@apple.com</dd>
<dt>Date</dt> <dd>2014-04-10 10:33:29 -0700 (Thu, 10 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Eliminate DragSession structure
https://bugs.webkit.org/show_bug.cgi?id=131465

Reviewed by Benjamin Poulain.

Source/WebCore: 

DragSession is really just a transient response to NSDragDestination delegate methods.
The &quot;session&quot; name was quite misleading, and thankfully, we don't need a class for this
bag of data at all.

* WebCore.xcodeproj/project.pbxproj:
* page/DragController.cpp:
(WebCore::DragController::DragController):
(WebCore::DragController::dragEntered):
(WebCore::DragController::dragUpdated):
(WebCore::DragController::dragEnteredOrUpdated):
(WebCore::DragController::tryDocumentDrag):
* page/DragController.h:
(WebCore::DragController::mouseIsOverFileInput):
(WebCore::DragController::numberOfItemsToBeAccepted):
* page/DragSession.h: Removed.

Source/WebKit/mac: 

* WebView/WebView.mm:
(-[WebView draggingEntered:]):
(-[WebView draggingUpdated:]):

Source/WebKit/win: 

* WebView.cpp:
(WebView::DragEnter):
(WebView::DragOver):

Source/WebKit2: 

* Scripts/webkit2/messages.py:
(struct_or_class):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder&lt;DragSession&gt;::encode): Deleted.
(IPC::ArgumentCoder&lt;DragSession&gt;::decode): Deleted.
* Shared/WebCoreArgumentCoders.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView draggingEntered:]):
(-[WKView draggingUpdated:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::didPerformDragControllerAction):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::currentDragOperation):
(WebKit::WebPageProxy::currentDragIsOverFileInput):
(WebKit::WebPageProxy::currentDragNumberOfFilesToBeAccepted):
(WebKit::WebPageProxy::resetCurrentDragInformation):
(WebKit::WebPageProxy::dragSession): Deleted.
(WebKit::WebPageProxy::resetDragSession): Deleted.
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorepageDragControllercpp">trunk/Source/WebCore/page/DragController.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDragControllerh">trunk/Source/WebCore/page/DragController.h</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebViewcpp">trunk/Source/WebKit/win/WebView.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2Scriptswebkit2messagespy">trunk/Source/WebKit2/Scripts/webkit2/messages.py</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCoderscpp">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCodersh">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewmm">trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxymessagesin">trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorepageDragSessionh">trunk/Source/WebCore/page/DragSession.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebCore/ChangeLog        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2014-04-09  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        Eliminate DragSession structure
+        https://bugs.webkit.org/show_bug.cgi?id=131465
+
+        Reviewed by Benjamin Poulain.
+
+        DragSession is really just a transient response to NSDragDestination delegate methods.
+        The &quot;session&quot; name was quite misleading, and thankfully, we don't need a class for this
+        bag of data at all.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * page/DragController.cpp:
+        (WebCore::DragController::DragController):
+        (WebCore::DragController::dragEntered):
+        (WebCore::DragController::dragUpdated):
+        (WebCore::DragController::dragEnteredOrUpdated):
+        (WebCore::DragController::tryDocumentDrag):
+        * page/DragController.h:
+        (WebCore::DragController::mouseIsOverFileInput):
+        (WebCore::DragController::numberOfItemsToBeAccepted):
+        * page/DragSession.h: Removed.
+
</ins><span class="cx"> 2014-04-10  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
</span><span class="cx"> 
</span><span class="cx">         [GStreamer] No CORS support for media elements
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -1180,7 +1180,6 @@
</span><span class="cx">                 31611E610E1C4E1400F6A579 /* DOMWebKitCSSTransformValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 31611E5E0E1C4E1400F6A579 /* DOMWebKitCSSTransformValue.h */; };
</span><span class="cx">                 31611E620E1C4E1400F6A579 /* DOMWebKitCSSTransformValue.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31611E5F0E1C4E1400F6A579 /* DOMWebKitCSSTransformValue.mm */; };
</span><span class="cx">                 31611E630E1C4E1400F6A579 /* DOMWebKitCSSTransformValueInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 31611E600E1C4E1400F6A579 /* DOMWebKitCSSTransformValueInternal.h */; };
</span><del>-                3169379C14609C6C00C01362 /* DragSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 3169379A14609C5B00C01362 /* DragSession.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 316FE0710E6CCBEE00BF6088 /* JSWebKitCSSKeyframeRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316FE06D0E6CCBEE00BF6088 /* JSWebKitCSSKeyframeRule.cpp */; };
</span><span class="cx">                 316FE0720E6CCBEE00BF6088 /* JSWebKitCSSKeyframeRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 316FE06E0E6CCBEE00BF6088 /* JSWebKitCSSKeyframeRule.h */; };
</span><span class="cx">                 316FE0730E6CCBEE00BF6088 /* JSWebKitCSSKeyframesRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316FE06F0E6CCBEE00BF6088 /* JSWebKitCSSKeyframesRule.cpp */; };
</span><span class="lines">@@ -8080,7 +8079,6 @@
</span><span class="cx">                 31611E5E0E1C4E1400F6A579 /* DOMWebKitCSSTransformValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWebKitCSSTransformValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 31611E5F0E1C4E1400F6A579 /* DOMWebKitCSSTransformValue.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMWebKitCSSTransformValue.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 31611E600E1C4E1400F6A579 /* DOMWebKitCSSTransformValueInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWebKitCSSTransformValueInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                3169379A14609C5B00C01362 /* DragSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DragSession.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 316FE06D0E6CCBEE00BF6088 /* JSWebKitCSSKeyframeRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitCSSKeyframeRule.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 316FE06E0E6CCBEE00BF6088 /* JSWebKitCSSKeyframeRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebKitCSSKeyframeRule.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 316FE06F0E6CCBEE00BF6088 /* JSWebKitCSSKeyframesRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitCSSKeyframesRule.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -16273,7 +16271,6 @@
</span><span class="cx">                                 A7CA59620B27C1F200FA021D /* DragClient.h */,
</span><span class="cx">                                 A7CA595C0B27BD9E00FA021D /* DragController.cpp */,
</span><span class="cx">                                 A7CA595B0B27BD9E00FA021D /* DragController.h */,
</span><del>-                                3169379A14609C5B00C01362 /* DragSession.h */,
</del><span class="cx">                                 81F65FF513788FAA00FF6F2D /* DragState.h */,
</span><span class="cx">                                 1AF326770D78B9440068F0C4 /* EditorClient.h */,
</span><span class="cx">                                 93C09A800B064F00005ABD4D /* EventHandler.cpp */,
</span><span class="lines">@@ -23753,7 +23750,6 @@
</span><span class="cx">                                 A7CA595D0B27BD9E00FA021D /* DragController.h in Headers */,
</span><span class="cx">                                 A7B6E69F0B291A9600D0529F /* DragData.h in Headers */,
</span><span class="cx">                                 A7CFB3D20B7ED10A0070C32D /* DragImage.h in Headers */,
</span><del>-                                3169379C14609C6C00C01362 /* DragSession.h in Headers */,
</del><span class="cx">                                 81F65FF613788FAA00FF6F2D /* DragState.h in Headers */,
</span><span class="cx">                                 498770DC1242C535002226BA /* DrawingBuffer.h in Headers */,
</span><span class="cx">                                 E1BA66F11742BD8600C20251 /* DynamicLinkerInterposing.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorepageDragControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DragController.cpp (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DragController.cpp        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebCore/page/DragController.cpp        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -37,7 +37,6 @@
</span><span class="cx"> #include &quot;DragClient.h&quot;
</span><span class="cx"> #include &quot;DragData.h&quot;
</span><span class="cx"> #include &quot;DragImage.h&quot;
</span><del>-#include &quot;DragSession.h&quot;
</del><span class="cx"> #include &quot;DragState.h&quot;
</span><span class="cx"> #include &quot;Editor.h&quot;
</span><span class="cx"> #include &quot;EditorClient.h&quot;
</span><span class="lines">@@ -101,9 +100,7 @@
</span><span class="cx"> DragController::DragController(Page&amp; page, DragClient&amp; client)
</span><span class="cx">     : m_page(page)
</span><span class="cx">     , m_client(client)
</span><del>-    , m_documentUnderMouse(0)
-    , m_dragInitiator(0)
-    , m_fileInputElementUnderMouse(0)
</del><ins>+    , m_numberOfItemsToBeAccepted(0)
</ins><span class="cx">     , m_documentIsHandlingDrag(false)
</span><span class="cx">     , m_dragDestinationAction(DragDestinationActionNone)
</span><span class="cx">     , m_dragSourceAction(DragSourceActionNone)
</span><span class="lines">@@ -176,7 +173,7 @@
</span><span class="cx">     m_client.dragEnded();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-DragSession DragController::dragEntered(DragData&amp; dragData)
</del><ins>+DragOperation DragController::dragEntered(DragData&amp; dragData)
</ins><span class="cx"> {
</span><span class="cx">     return dragEnteredOrUpdated(dragData);
</span><span class="cx"> }
</span><span class="lines">@@ -196,7 +193,7 @@
</span><span class="cx">     m_fileInputElementUnderMouse = 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-DragSession DragController::dragUpdated(DragData&amp; dragData)
</del><ins>+DragOperation DragController::dragUpdated(DragData&amp; dragData)
</ins><span class="cx"> {
</span><span class="cx">     return dragEnteredOrUpdated(dragData);
</span><span class="cx"> }
</span><span class="lines">@@ -247,21 +244,21 @@
</span><span class="cx">     m_documentUnderMouse = newDocument;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-DragSession DragController::dragEnteredOrUpdated(DragData&amp; dragData)
</del><ins>+DragOperation DragController::dragEnteredOrUpdated(DragData&amp; dragData)
</ins><span class="cx"> {
</span><span class="cx">     mouseMovedIntoDocument(m_page.mainFrame().documentAtPoint(dragData.clientPosition()));
</span><span class="cx"> 
</span><span class="cx">     m_dragDestinationAction = m_client.actionMaskForDrag(dragData);
</span><span class="cx">     if (m_dragDestinationAction == DragDestinationActionNone) {
</span><span class="cx">         cancelDrag(); // FIXME: Why not call mouseMovedIntoDocument(0)?
</span><del>-        return DragSession();
</del><ins>+        return DragOperationNone;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    DragSession dragSession;
-    m_documentIsHandlingDrag = tryDocumentDrag(dragData, m_dragDestinationAction, dragSession);
</del><ins>+    DragOperation dragOperation = DragOperationNone;
+    m_documentIsHandlingDrag = tryDocumentDrag(dragData, m_dragDestinationAction, dragOperation);
</ins><span class="cx">     if (!m_documentIsHandlingDrag &amp;&amp; (m_dragDestinationAction &amp; DragDestinationActionLoad))
</span><del>-        dragSession.operation = operationForLoad(dragData);
-    return dragSession;
</del><ins>+        dragOperation = operationForLoad(dragData);
+    return dragOperation;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static HTMLInputElement* asFileInput(Node* node)
</span><span class="lines">@@ -297,7 +294,7 @@
</span><span class="cx">     return toElement(n);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool DragController::tryDocumentDrag(DragData&amp; dragData, DragDestinationAction actionMask, DragSession&amp; dragSession)
</del><ins>+bool DragController::tryDocumentDrag(DragData&amp; dragData, DragDestinationAction actionMask, DragOperation&amp; dragOperation)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_documentUnderMouse)
</span><span class="cx">         return false;
</span><span class="lines">@@ -307,7 +304,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool isHandlingDrag = false;
</span><span class="cx">     if (actionMask &amp; DragDestinationActionDHTML) {
</span><del>-        isHandlingDrag = tryDHTMLDrag(dragData, dragSession.operation);
</del><ins>+        isHandlingDrag = tryDHTMLDrag(dragData, dragOperation);
</ins><span class="cx">         // Do not continue if m_documentUnderMouse has been reset by tryDHTMLDrag.
</span><span class="cx">         // tryDHTMLDrag fires dragenter event. The event listener that listens
</span><span class="cx">         // to this event may create a nested message loop (open a modal dialog),
</span><span class="lines">@@ -330,7 +327,7 @@
</span><span class="cx"> 
</span><span class="cx">     if ((actionMask &amp; DragDestinationActionEdit) &amp;&amp; canProcessDrag(dragData)) {
</span><span class="cx">         if (dragData.containsColor()) {
</span><del>-            dragSession.operation = DragOperationGeneric;
</del><ins>+            dragOperation = DragOperationGeneric;
</ins><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -350,28 +347,27 @@
</span><span class="cx">             m_page.dragCaretController().setCaretPosition(m_documentUnderMouse-&gt;frame()-&gt;visiblePositionForPoint(point));
</span><span class="cx"> 
</span><span class="cx">         Frame* innerFrame = element-&gt;document().frame();
</span><del>-        dragSession.operation = dragIsMove(innerFrame-&gt;selection(), dragData) ? DragOperationMove : DragOperationCopy;
-        dragSession.mouseIsOverFileInput = m_fileInputElementUnderMouse;
-        dragSession.numberOfItemsToBeAccepted = 0;
</del><ins>+        dragOperation = dragIsMove(innerFrame-&gt;selection(), dragData) ? DragOperationMove : DragOperationCopy;
+        m_numberOfItemsToBeAccepted = 0;
</ins><span class="cx"> 
</span><span class="cx">         unsigned numberOfFiles = dragData.numberOfFiles();
</span><span class="cx">         if (m_fileInputElementUnderMouse) {
</span><span class="cx">             if (m_fileInputElementUnderMouse-&gt;isDisabledFormControl())
</span><del>-                dragSession.numberOfItemsToBeAccepted = 0;
</del><ins>+                m_numberOfItemsToBeAccepted = 0;
</ins><span class="cx">             else if (m_fileInputElementUnderMouse-&gt;multiple())
</span><del>-                dragSession.numberOfItemsToBeAccepted = numberOfFiles;
</del><ins>+                m_numberOfItemsToBeAccepted = numberOfFiles;
</ins><span class="cx">             else if (numberOfFiles &gt; 1)
</span><del>-                dragSession.numberOfItemsToBeAccepted = 0;
</del><ins>+                m_numberOfItemsToBeAccepted = 0;
</ins><span class="cx">             else
</span><del>-                dragSession.numberOfItemsToBeAccepted = 1;
</del><ins>+                m_numberOfItemsToBeAccepted = 1;
</ins><span class="cx">             
</span><del>-            if (!dragSession.numberOfItemsToBeAccepted)
-                dragSession.operation = DragOperationNone;
-            m_fileInputElementUnderMouse-&gt;setCanReceiveDroppedFiles(dragSession.numberOfItemsToBeAccepted);
</del><ins>+            if (!m_numberOfItemsToBeAccepted)
+                dragOperation = DragOperationNone;
+            m_fileInputElementUnderMouse-&gt;setCanReceiveDroppedFiles(m_numberOfItemsToBeAccepted);
</ins><span class="cx">         } else {
</span><span class="cx">             // We are not over a file input element. The dragged item(s) will only
</span><span class="cx">             // be loaded into the view the number of dragged items is 1.
</span><del>-            dragSession.numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1;
</del><ins>+            m_numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1;
</ins><span class="cx">         }
</span><span class="cx">         
</span><span class="cx">         return true;
</span></span></pre></div>
<a id="trunkSourceWebCorepageDragControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DragController.h (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DragController.h        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebCore/page/DragController.h        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -45,7 +45,6 @@
</span><span class="cx">     class Page;
</span><span class="cx">     class PlatformMouseEvent;
</span><span class="cx"> 
</span><del>-    struct DragSession;
</del><span class="cx">     struct DragState;
</span><span class="cx"> 
</span><span class="cx">     class DragController {
</span><span class="lines">@@ -58,11 +57,14 @@
</span><span class="cx"> 
</span><span class="cx">         DragClient&amp; client() const { return m_client; }
</span><span class="cx"> 
</span><del>-        DragSession dragEntered(DragData&amp;);
</del><ins>+        DragOperation dragEntered(DragData&amp;);
</ins><span class="cx">         void dragExited(DragData&amp;);
</span><del>-        DragSession dragUpdated(DragData&amp;);
</del><ins>+        DragOperation dragUpdated(DragData&amp;);
</ins><span class="cx">         bool performDragOperation(DragData&amp;);
</span><del>-        
</del><ins>+
+        bool mouseIsOverFileInput() const { return m_fileInputElementUnderMouse; }
+        unsigned numberOfItemsToBeAccepted() const { return m_numberOfItemsToBeAccepted; }
+
</ins><span class="cx">         // FIXME: It should be possible to remove a number of these accessors once all
</span><span class="cx">         // drag logic is in WebCore.
</span><span class="cx">         void setDidInitiateDrag(bool initiated) { m_didInitiateDrag = initiated; } 
</span><span class="lines">@@ -95,9 +97,9 @@
</span><span class="cx">         bool dispatchTextInputEventFor(Frame*, DragData&amp;);
</span><span class="cx">         bool canProcessDrag(DragData&amp;);
</span><span class="cx">         bool concludeEditDrag(DragData&amp;);
</span><del>-        DragSession dragEnteredOrUpdated(DragData&amp;);
</del><ins>+        DragOperation dragEnteredOrUpdated(DragData&amp;);
</ins><span class="cx">         DragOperation operationForLoad(DragData&amp;);
</span><del>-        bool tryDocumentDrag(DragData&amp;, DragDestinationAction, DragSession&amp;);
</del><ins>+        bool tryDocumentDrag(DragData&amp;, DragDestinationAction, DragOperation&amp;);
</ins><span class="cx">         bool tryDHTMLDrag(DragData&amp;, DragOperation&amp;);
</span><span class="cx">         DragOperation dragOperation(DragData&amp;);
</span><span class="cx">         void cancelDrag();
</span><span class="lines">@@ -117,6 +119,7 @@
</span><span class="cx">         RefPtr&lt;Document&gt; m_documentUnderMouse; // The document the mouse was last dragged over.
</span><span class="cx">         RefPtr&lt;Document&gt; m_dragInitiator; // The Document (if any) that initiated the drag.
</span><span class="cx">         RefPtr&lt;HTMLInputElement&gt; m_fileInputElementUnderMouse;
</span><ins>+        unsigned m_numberOfItemsToBeAccepted;
</ins><span class="cx">         bool m_documentIsHandlingDrag;
</span><span class="cx"> 
</span><span class="cx">         DragDestinationAction m_dragDestinationAction;
</span></span></pre></div>
<a id="trunkSourceWebCorepageDragSessionh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/page/DragSession.h (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DragSession.h        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebCore/page/DragSession.h        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -1,48 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 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. ``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
- * 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 DragSession_h
-#define DragSession_h
-
-#include &quot;DragActions.h&quot;
-
-namespace WebCore {
-    
-struct DragSession {
-    DragOperation operation;
-    bool mouseIsOverFileInput;
-    unsigned numberOfItemsToBeAccepted;
-
-    DragSession()
-        : operation(DragOperationNone)
-        , mouseIsOverFileInput(false)
-        , numberOfItemsToBeAccepted(0)
-    {
-    }
-};
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -1,5 +1,16 @@
</span><span class="cx"> 2014-04-09  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Eliminate DragSession structure
+        https://bugs.webkit.org/show_bug.cgi?id=131465
+
+        Reviewed by Benjamin Poulain.
+
+        * WebView/WebView.mm:
+        (-[WebView draggingEntered:]):
+        (-[WebView draggingUpdated:]):
+
+2014-04-09  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
</ins><span class="cx">         Rename some dragging functions
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=131460
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -123,7 +123,6 @@
</span><span class="cx"> #import &lt;WebCore/DocumentLoader.h&gt;
</span><span class="cx"> #import &lt;WebCore/DragController.h&gt;
</span><span class="cx"> #import &lt;WebCore/DragData.h&gt;
</span><del>-#import &lt;WebCore/DragSession.h&gt;
</del><span class="cx"> #import &lt;WebCore/Editor.h&gt;
</span><span class="cx"> #import &lt;WebCore/EventHandler.h&gt;
</span><span class="cx"> #import &lt;WebCore/ExceptionHandlers.h&gt;
</span><span class="lines">@@ -5980,7 +5979,7 @@
</span><span class="cx">     IntPoint client([draggingInfo draggingLocation]);
</span><span class="cx">     IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
</span><span class="cx">     DragData dragData(draggingInfo, client, global, static_cast&lt;DragOperation&gt;([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
</span><del>-    return core(self)-&gt;dragController().dragEntered(dragData).operation;
</del><ins>+    return core(self)-&gt;dragController().dragEntered(dragData);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (NSDragOperation)draggingUpdated:(id &lt;NSDraggingInfo&gt;)draggingInfo
</span><span class="lines">@@ -5992,7 +5991,7 @@
</span><span class="cx">     IntPoint client([draggingInfo draggingLocation]);
</span><span class="cx">     IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
</span><span class="cx">     DragData dragData(draggingInfo, client, global, static_cast&lt;DragOperation&gt;([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
</span><del>-    return page-&gt;dragController().dragUpdated(dragData).operation;
</del><ins>+    return page-&gt;dragController().dragUpdated(dragData);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)draggingExited:(id &lt;NSDraggingInfo&gt;)draggingInfo
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebKit/win/ChangeLog        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -1,5 +1,16 @@
</span><span class="cx"> 2014-04-09  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Eliminate DragSession structure
+        https://bugs.webkit.org/show_bug.cgi?id=131465
+
+        Reviewed by Benjamin Poulain.
+
+        * WebView.cpp:
+        (WebView::DragEnter):
+        (WebView::DragOver):
+
+2014-04-09  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
</ins><span class="cx">         Rename some dragging functions
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=131460
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.cpp (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.cpp        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebKit/win/WebView.cpp        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -85,7 +85,6 @@
</span><span class="cx"> #include &lt;WebCore/DocumentMarkerController.h&gt;
</span><span class="cx"> #include &lt;WebCore/DragController.h&gt;
</span><span class="cx"> #include &lt;WebCore/DragData.h&gt;
</span><del>-#include &lt;WebCore/DragSession.h&gt;
</del><span class="cx"> #include &lt;WebCore/Editor.h&gt;
</span><span class="cx"> #include &lt;WebCore/EventHandler.h&gt;
</span><span class="cx"> #include &lt;WebCore/EventNames.h&gt;
</span><span class="lines">@@ -5246,7 +5245,7 @@
</span><span class="cx">     ::ScreenToClient(m_viewWindow, (LPPOINT)&amp;localpt);
</span><span class="cx">     DragData data(pDataObject, IntPoint(localpt.x, localpt.y), 
</span><span class="cx">         IntPoint(pt.x, pt.y), keyStateToDragOperation(grfKeyState));
</span><del>-    *pdwEffect = dragOperationToDragCursor(m_page-&gt;dragController().dragEntered(data).operation);
</del><ins>+    *pdwEffect = dragOperationToDragCursor(m_page-&gt;dragController().dragEntered(data));
</ins><span class="cx"> 
</span><span class="cx">     m_lastDropEffect = *pdwEffect;
</span><span class="cx">     m_dragData = pDataObject;
</span><span class="lines">@@ -5265,7 +5264,7 @@
</span><span class="cx">         ::ScreenToClient(m_viewWindow, (LPPOINT)&amp;localpt);
</span><span class="cx">         DragData data(m_dragData.get(), IntPoint(localpt.x, localpt.y), 
</span><span class="cx">             IntPoint(pt.x, pt.y), keyStateToDragOperation(grfKeyState));
</span><del>-        *pdwEffect = dragOperationToDragCursor(m_page-&gt;dragController().dragUpdated(data).operation);
</del><ins>+        *pdwEffect = dragOperationToDragCursor(m_page-&gt;dragController().dragUpdated(data));
</ins><span class="cx">     } else
</span><span class="cx">         *pdwEffect = DROPEFFECT_NONE;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebKit2/ChangeLog        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2014-04-09  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        Eliminate DragSession structure
+        https://bugs.webkit.org/show_bug.cgi?id=131465
+
+        Reviewed by Benjamin Poulain.
+
+        * Scripts/webkit2/messages.py:
+        (struct_or_class):
+        * Shared/WebCoreArgumentCoders.cpp:
+        (IPC::ArgumentCoder&lt;DragSession&gt;::encode): Deleted.
+        (IPC::ArgumentCoder&lt;DragSession&gt;::decode): Deleted.
+        * Shared/WebCoreArgumentCoders.h:
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView draggingEntered:]):
+        (-[WKView draggingUpdated:]):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+        (WebKit::WebPageProxy::didPerformDragControllerAction):
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::currentDragOperation):
+        (WebKit::WebPageProxy::currentDragIsOverFileInput):
+        (WebKit::WebPageProxy::currentDragNumberOfFilesToBeAccepted):
+        (WebKit::WebPageProxy::resetCurrentDragInformation):
+        (WebKit::WebPageProxy::dragSession): Deleted.
+        (WebKit::WebPageProxy::resetDragSession): Deleted.
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::performDragControllerAction):
+
</ins><span class="cx"> 2014-04-10  Martin Robinson  &lt;mrobinson@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] LayerTreeHostGtk is creating a software scene graph
</span></span></pre></div>
<a id="trunkSourceWebKit2Scriptswebkit2messagespy"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Scripts/webkit2/messages.py (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Scripts/webkit2/messages.py        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebKit2/Scripts/webkit2/messages.py        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -172,7 +172,6 @@
</span><span class="cx">         'WebCore::EditorCommandsForKeyEvent',
</span><span class="cx">         'WebCore::CompositionUnderline',
</span><span class="cx">         'WebCore::Cookie',
</span><del>-        'WebCore::DragSession',
</del><span class="cx">         'WebCore::FloatPoint3D',
</span><span class="cx">         'WebCore::FileChooserSettings',
</span><span class="cx">         'WebCore::GrammarDetail',
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx"> #include &lt;WebCore/Cursor.h&gt;
</span><span class="cx"> #include &lt;WebCore/DatabaseDetails.h&gt;
</span><span class="cx"> #include &lt;WebCore/DictationAlternative.h&gt;
</span><del>-#include &lt;WebCore/DragSession.h&gt;
</del><span class="cx"> #include &lt;WebCore/Editor.h&gt;
</span><span class="cx"> #include &lt;WebCore/FileChooser.h&gt;
</span><span class="cx"> #include &lt;WebCore/FilterOperation.h&gt;
</span><span class="lines">@@ -1310,24 +1309,6 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ArgumentCoder&lt;DragSession&gt;::encode(ArgumentEncoder&amp; encoder, const DragSession&amp; result)
-{
-    encoder.encodeEnum(result.operation);
-    encoder &lt;&lt; result.mouseIsOverFileInput;
-    encoder &lt;&lt; result.numberOfItemsToBeAccepted;
-}
-
-bool ArgumentCoder&lt;DragSession&gt;::decode(ArgumentDecoder&amp; decoder, DragSession&amp; result)
-{
-    if (!decoder.decodeEnum(result.operation))
-        return false;
-    if (!decoder.decode(result.mouseIsOverFileInput))
-        return false;
-    if (!decoder.decode(result.numberOfItemsToBeAccepted))
-        return false;
-    return true;
-}
-
</del><span class="cx"> void ArgumentCoder&lt;URL&gt;::encode(ArgumentEncoder&amp; encoder, const URL&amp; result)
</span><span class="cx"> {
</span><span class="cx">     encoder &lt;&lt; result.string();
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCodersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -67,7 +67,6 @@
</span><span class="cx"> struct CompositionUnderline;
</span><span class="cx"> struct Cookie;
</span><span class="cx"> struct DictationAlternative;
</span><del>-struct DragSession;
</del><span class="cx"> struct FileChooserSettings;
</span><span class="cx"> struct IDBDatabaseMetadata;
</span><span class="cx"> struct IDBGetResult;
</span><span class="lines">@@ -339,11 +338,6 @@
</span><span class="cx">     static bool decode(ArgumentDecoder&amp;, WebCore::TextCheckingResult&amp;);
</span><span class="cx"> };
</span><span class="cx">     
</span><del>-template&lt;&gt; struct ArgumentCoder&lt;WebCore::DragSession&gt; {
-    static void encode(ArgumentEncoder&amp;, const WebCore::DragSession&amp;);
-    static bool decode(ArgumentDecoder&amp;, WebCore::DragSession&amp;);
-};
-
</del><span class="cx"> template&lt;&gt; struct ArgumentCoder&lt;WebCore::URL&gt; {
</span><span class="cx">     static void encode(ArgumentEncoder&amp;, const WebCore::URL&amp;);
</span><span class="cx">     static bool decode(ArgumentDecoder&amp;, WebCore::URL&amp;);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -78,7 +78,6 @@
</span><span class="cx"> #import &lt;WebCore/ColorMac.h&gt;
</span><span class="cx"> #import &lt;WebCore/DragController.h&gt;
</span><span class="cx"> #import &lt;WebCore/DragData.h&gt;
</span><del>-#import &lt;WebCore/DragSession.h&gt;
</del><span class="cx"> #import &lt;WebCore/FloatRect.h&gt;
</span><span class="cx"> #import &lt;WebCore/Image.h&gt;
</span><span class="cx"> #import &lt;WebCore/IntRect.h&gt;
</span><span class="lines">@@ -2237,7 +2236,7 @@
</span><span class="cx">     IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
</span><span class="cx">     DragData dragData(draggingInfo, client, global, static_cast&lt;DragOperation&gt;([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
</span><span class="cx"> 
</span><del>-    _data-&gt;_page-&gt;resetDragSession();
</del><ins>+    _data-&gt;_page-&gt;resetCurrentDragInformation();
</ins><span class="cx">     _data-&gt;_page-&gt;dragEntered(dragData, [[draggingInfo draggingPasteboard] name]);
</span><span class="cx">     return NSDragOperationCopy;
</span><span class="cx"> }
</span><span class="lines">@@ -2249,10 +2248,9 @@
</span><span class="cx">     DragData dragData(draggingInfo, client, global, static_cast&lt;DragOperation&gt;([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
</span><span class="cx">     _data-&gt;_page-&gt;dragUpdated(dragData, [[draggingInfo draggingPasteboard] name]);
</span><span class="cx">     
</span><del>-    WebCore::DragSession dragSession = _data-&gt;_page-&gt;dragSession();
-    NSInteger numberOfValidItemsForDrop = dragSession.numberOfItemsToBeAccepted;
</del><ins>+    NSInteger numberOfValidItemsForDrop = _data-&gt;_page-&gt;currentDragNumberOfFilesToBeAccepted();
</ins><span class="cx">     NSDraggingFormation draggingFormation = NSDraggingFormationNone;
</span><del>-    if (dragSession.mouseIsOverFileInput &amp;&amp; numberOfValidItemsForDrop &gt; 0)
</del><ins>+    if (_data-&gt;_page-&gt;currentDragIsOverFileInput() &amp;&amp; numberOfValidItemsForDrop &gt; 0)
</ins><span class="cx">         draggingFormation = NSDraggingFormationList;
</span><span class="cx"> 
</span><span class="cx">     if ([draggingInfo numberOfValidItemsForDrop] != numberOfValidItemsForDrop)
</span><span class="lines">@@ -2260,7 +2258,7 @@
</span><span class="cx">     if ([draggingInfo draggingFormation] != draggingFormation)
</span><span class="cx">         [draggingInfo setDraggingFormation:draggingFormation];
</span><span class="cx"> 
</span><del>-    return dragSession.operation;
</del><ins>+    return _data-&gt;_page-&gt;currentDragOperation();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)draggingExited:(id &lt;NSDraggingInfo&gt;)draggingInfo
</span><span class="lines">@@ -2269,7 +2267,7 @@
</span><span class="cx">     IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
</span><span class="cx">     DragData dragData(draggingInfo, client, global, static_cast&lt;DragOperation&gt;([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
</span><span class="cx">     _data-&gt;_page-&gt;dragExited(dragData, [[draggingInfo draggingPasteboard] name]);
</span><del>-    _data-&gt;_page-&gt;resetDragSession();
</del><ins>+    _data-&gt;_page-&gt;resetCurrentDragInformation();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (BOOL)prepareForDragOperation:(id &lt;NSDraggingInfo&gt;)draggingInfo
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -89,7 +89,6 @@
</span><span class="cx"> #include &quot;WebSecurityOrigin.h&quot;
</span><span class="cx"> #include &lt;WebCore/DragController.h&gt;
</span><span class="cx"> #include &lt;WebCore/DragData.h&gt;
</span><del>-#include &lt;WebCore/DragSession.h&gt;
</del><span class="cx"> #include &lt;WebCore/FloatRect.h&gt;
</span><span class="cx"> #include &lt;WebCore/FocusDirection.h&gt;
</span><span class="cx"> #include &lt;WebCore/MIMETypeRegistry.h&gt;
</span><span class="lines">@@ -320,6 +319,9 @@
</span><span class="cx">     , m_hasSpellDocumentTag(false)
</span><span class="cx">     , m_pendingLearnOrIgnoreWordMessageCount(0)
</span><span class="cx">     , m_mainFrameHasCustomContentProvider(false)
</span><ins>+    , m_currentDragOperation(DragOperationNone)
+    , m_currentDragIsOverFileInput(false)
+    , m_currentDragNumberOfFilesToBeAccepted(0)
</ins><span class="cx">     , m_delegatesScrolling(false)
</span><span class="cx">     , m_mainFrameHasHorizontalScrollbar(false)
</span><span class="cx">     , m_mainFrameHasVerticalScrollbar(false)
</span><span class="lines">@@ -1205,9 +1207,13 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::didPerformDragControllerAction(WebCore::DragSession dragSession)
</del><ins>+void WebPageProxy::didPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted)
</ins><span class="cx"> {
</span><del>-    m_currentDragSession = dragSession;
</del><ins>+    MESSAGE_CHECK(dragOperation &lt;= DragOperationDelete);
+
+    m_currentDragOperation = static_cast&lt;DragOperation&gt;(dragOperation);
+    m_currentDragIsOverFileInput = mouseIsOverFileInput;
+    m_currentDragNumberOfFilesToBeAccepted = numberOfItemsToBeAccepted;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -62,7 +62,6 @@
</span><span class="cx"> #include &quot;WebPopupMenuProxy.h&quot;
</span><span class="cx"> #include &lt;WebCore/Color.h&gt;
</span><span class="cx"> #include &lt;WebCore/DragActions.h&gt;
</span><del>-#include &lt;WebCore/DragSession.h&gt;
</del><span class="cx"> #include &lt;WebCore/HitTestResult.h&gt;
</span><span class="cx"> #include &lt;WebCore/Page.h&gt;
</span><span class="cx"> #include &lt;WebCore/PlatformScreen.h&gt;
</span><span class="lines">@@ -82,7 +81,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><span class="cx"> #include &lt;WebCore/DragActions.h&gt;
</span><del>-#include &lt;WebCore/DragSession.h&gt;
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="lines">@@ -853,7 +851,7 @@
</span><span class="cx">     void dragExited(WebCore::DragData&amp;, const String&amp; dragStorageName = String());
</span><span class="cx">     void performDragOperation(WebCore::DragData&amp;, const String&amp; dragStorageName, const SandboxExtension::Handle&amp;, const SandboxExtension::HandleArray&amp;);
</span><span class="cx"> 
</span><del>-    void didPerformDragControllerAction(WebCore::DragSession);
</del><ins>+    void didPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted);
</ins><span class="cx">     void dragEnded(const WebCore::IntPoint&amp; clientPosition, const WebCore::IntPoint&amp; globalPosition, uint64_t operation);
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     void setDragImage(const WebCore::IntPoint&amp; clientPosition, const ShareableBitmap::Handle&amp; dragImageHandle, bool isLinkDrag);
</span><span class="lines">@@ -903,8 +901,15 @@
</span><span class="cx">     FrameLoadState::State loadStateAtProcessExit() const { return m_loadStateAtProcessExit; }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><del>-    WebCore::DragSession dragSession() const { return m_currentDragSession; }
-    void resetDragSession() { m_currentDragSession = WebCore::DragSession(); }
</del><ins>+    WebCore::DragOperation currentDragOperation() const { return m_currentDragOperation; }
+    bool currentDragIsOverFileInput() const { return m_currentDragIsOverFileInput; }
+    unsigned currentDragNumberOfFilesToBeAccepted() const { return m_currentDragNumberOfFilesToBeAccepted; }
+    void resetCurrentDragInformation()
+    {
+        m_currentDragOperation = WebCore::DragOperationNone;
+        m_currentDragIsOverFileInput = false;
+        m_currentDragNumberOfFilesToBeAccepted = 0;
+    }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void preferencesDidChange();
</span><span class="lines">@@ -1576,7 +1581,11 @@
</span><span class="cx">     bool m_mainFrameHasCustomContentProvider;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><del>-    WebCore::DragSession m_currentDragSession;
</del><ins>+    // Current drag destination details are delivered as an asynchronous response,
+    // so we preserve them to be used when the next dragging delegate call is made.
+    WebCore::DragOperation m_currentDragOperation;
+    bool m_currentDragIsOverFileInput;
+    unsigned m_currentDragNumberOfFilesToBeAccepted;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     PageLoadState m_pageLoadState;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -255,7 +255,7 @@
</span><span class="cx"> 
</span><span class="cx">     # Drag and drop messages
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><del>-    DidPerformDragControllerAction(WebCore::DragSession dragSession)
</del><ins>+    DidPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted)
</ins><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(COCOA) &amp;&amp; ENABLE(DRAG_SUPPORT)
</span><span class="cx">     SetDragImage(WebCore::IntPoint clientPosition, WebKit::ShareableBitmap::Handle dragImage, bool linkDrag)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (167073 => 167074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-04-10 15:46:10 UTC (rev 167073)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-04-10 17:33:29 UTC (rev 167074)
</span><span class="lines">@@ -100,7 +100,6 @@
</span><span class="cx"> #include &lt;WebCore/DocumentMarkerController.h&gt;
</span><span class="cx"> #include &lt;WebCore/DragController.h&gt;
</span><span class="cx"> #include &lt;WebCore/DragData.h&gt;
</span><del>-#include &lt;WebCore/DragSession.h&gt;
</del><span class="cx"> #include &lt;WebCore/ElementIterator.h&gt;
</span><span class="cx"> #include &lt;WebCore/EventHandler.h&gt;
</span><span class="cx"> #include &lt;WebCore/FocusController.h&gt;
</span><span class="lines">@@ -2740,7 +2739,7 @@
</span><span class="cx"> void WebPage::performDragControllerAction(uint64_t action, WebCore::DragData dragData)
</span><span class="cx"> {
</span><span class="cx">     if (!m_page) {
</span><del>-        send(Messages::WebPageProxy::DidPerformDragControllerAction(WebCore::DragSession()));
</del><ins>+        send(Messages::WebPageProxy::DidPerformDragControllerAction(DragOperationNone, false, 0));
</ins><span class="cx">         DataObjectGtk* data = const_cast&lt;DataObjectGtk*&gt;(dragData.platformData());
</span><span class="cx">         data-&gt;deref();
</span><span class="cx">         return;
</span><span class="lines">@@ -2776,20 +2775,23 @@
</span><span class="cx"> void WebPage::performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const String&amp; dragStorageName, uint32_t flags, const SandboxExtension::Handle&amp; sandboxExtensionHandle, const SandboxExtension::HandleArray&amp; sandboxExtensionsHandleArray)
</span><span class="cx"> {
</span><span class="cx">     if (!m_page) {
</span><del>-        send(Messages::WebPageProxy::DidPerformDragControllerAction(WebCore::DragSession()));
</del><ins>+        send(Messages::WebPageProxy::DidPerformDragControllerAction(DragOperationNone, false, 0));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     DragData dragData(dragStorageName, clientPosition, globalPosition, static_cast&lt;DragOperation&gt;(draggingSourceOperationMask), static_cast&lt;DragApplicationFlags&gt;(flags));
</span><span class="cx">     switch (action) {
</span><del>-    case DragControllerActionEntered:
-        send(Messages::WebPageProxy::DidPerformDragControllerAction(m_page-&gt;dragController().dragEntered(dragData)));
</del><ins>+    case DragControllerActionEntered: {
+        DragOperation resolvedDragOperation = m_page-&gt;dragController().dragEntered(dragData);
+        send(Messages::WebPageProxy::DidPerformDragControllerAction(resolvedDragOperation, m_page-&gt;dragController().mouseIsOverFileInput(), m_page-&gt;dragController().numberOfItemsToBeAccepted()));
</ins><span class="cx">         break;
</span><span class="cx"> 
</span><del>-    case DragControllerActionUpdated:
-        send(Messages::WebPageProxy::DidPerformDragControllerAction(m_page-&gt;dragController().dragUpdated(dragData)));
</del><ins>+    }
+    case DragControllerActionUpdated: {
+        DragOperation resolvedDragOperation = m_page-&gt;dragController().dragUpdated(dragData);
+        send(Messages::WebPageProxy::DidPerformDragControllerAction(resolvedDragOperation, m_page-&gt;dragController().mouseIsOverFileInput(), m_page-&gt;dragController().numberOfItemsToBeAccepted()));
</ins><span class="cx">         break;
</span><del>-        
</del><ins>+    }
</ins><span class="cx">     case DragControllerActionExited:
</span><span class="cx">         m_page-&gt;dragController().dragExited(dragData);
</span><span class="cx">         break;
</span></span></pre>
</div>
</div>

</body>
</html>