Add WTF::move()
https://bugs.webkit.org/show_bug.cgi?id=134500

Source/JavaScriptCore:
Rubber-stamped by Anders Carlsson.

Substitute WTF::move() for std::move().

* bytecode/CodeBlock.h:
* bytecode/UnlinkedCodeBlock.cpp:
* bytecompiler/BytecodeGenerator.cpp:
* dfg/DFGGraph.cpp:
* dfg/DFGJITCompiler.cpp:
* dfg/DFGStackLayoutPhase.cpp:
* dfg/DFGWorklist.cpp:
* heap/DelayedReleaseScope.h:
* heap/HeapInlines.h:
[...]

Source/WebCore:
Rubber-stamped by Anders Carlsson.

Substitute WTF::move() for std::move().

* Modules/battery/NavigatorBattery.cpp:
* Modules/encryptedmedia/MediaKeys.cpp:
* Modules/gamepad/NavigatorGamepad.cpp:
* Modules/gamepad/deprecated/NavigatorGamepad.cpp:
* Modules/geolocation/NavigatorGeolocation.cpp:
* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
* Modules/indexeddb/IDBDatabaseBackend.cpp:
* Modules/indexeddb/IDBDatabaseBackend.h:
[...]

Source/WebKit/ios:
Rubber-stamped by Anders Carlsson.

Substitute WTF::move() for std::move().

* WebCoreSupport/WebFixedPositionContent.mm:
(-[WebFixedPositionContent setViewportConstrainedLayers:stickyContainerMap:]):
* WebCoreSupport/WebInspectorClientIOS.mm:
(WebInspectorFrontendClient::WebInspectorFrontendClient):

Source/WebKit/mac:
Rubber-stamped by Anders Carlsson.

Substitute WTF::move() for std::move().

* History/WebHistoryItem.mm:
(-[WebHistoryItem initFromDictionaryRepresentation:]):
* Plugins/Hosted/NetscapePluginInstanceProxy.h:
(WebKit::NetscapePluginInstanceProxy::setCurrentReply):
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebFrameLoaderClient::dispatchWillSubmitForm):
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorClient::openInspectorFrontend):
(WebInspectorFrontendClient::WebInspectorFrontendClient):
* WebView/WebArchive.mm:
(-[WebArchive initWithMainResource:subresources:subframeArchives:]):

Source/WebKit/win:
Rubber-stamped by Anders Carlsson.

Substitute WTF::move() for std::move().

* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorClient::openInspectorFrontend):
(WebInspectorFrontendClient::WebInspectorFrontendClient):
* WebHistory.cpp:
(createUserInfoFromArray):
* WebHistoryItem.cpp:
(WebHistoryItem::initFromDictionaryRepresentation):
* WebView.cpp:
(WebView::addToDirtyRegion):
(WebView::scrollBackingStore):

Source/WebKit2:
Rubber-stamped by Anders Carlsson.

Substitute WTF::move() for std::move().

* DatabaseProcess/DatabaseProcess.cpp:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
* Platform/IPC/ArgumentCoders.h:
* Platform/IPC/ArgumentDecoder.cpp:
* Platform/IPC/Connection.cpp:
* Platform/IPC/Connection.h:
[...]

Source/WTF:
Reviewed by Darin Adler.

Substitution of WTF::move() for std::move() rubber-stamped by Anders Carlsson.

Implement WTF::move(), a replacement for std::move(). WTF::move() is less error
prone than std::move() as it compile asserts that its argument is a non-const
lvalue reference before ultimately casting it to a rvalue reference (via std::move).

* wtf/Deque.h: Substitute WTF::move() for std::move().
* wtf/HashMap.h: Ditto.
* wtf/HashSet.h: Ditto.
* wtf/HashTable.h: Ditto.
* wtf/IteratorAdaptors.h: Ditto.
* wtf/IteratorRange.h: Ditto.
* wtf/ListHashSet.h: Ditto.
* wtf/MainThread.cpp: Ditto.
[...]
* wtf/StdLibExtras.h:
(WTF::move): Added.
[...]

Tools:
Rubber-stamped by Anders Carlsson.

Substitute WTF::move() for std::move().

* DumpRenderTree/win/DRTDataObject.cpp:
* TestWebKitAPI/Tests/WTF/HashMap.cpp:
* TestWebKitAPI/Tests/WTF/HashSet.cpp:
* TestWebKitAPI/Tests/WTF/RefPtr.cpp:
* TestWebKitAPI/Tests/WTF/Vector.cpp:
* TestWebKitAPI/Tests/WTF/WTFString.cpp:
* TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm: Added FIXME comments that explain that some of the sub-tests
aren't actually testing move semantics in tests: MoveAssignmentFromSameType, MoveAssignmentFromSimilarType,
ConstructionFromSameType, and ConstructionFromSimilarType.
* TestWebKitAPI/Tests/WebCore/CalculationValue.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170774 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/rendering/RenderBlockFlow.cpp b/Source/WebCore/rendering/RenderBlockFlow.cpp
index 1bc80cc..ea66ae7 100644
--- a/Source/WebCore/rendering/RenderBlockFlow.cpp
+++ b/Source/WebCore/rendering/RenderBlockFlow.cpp
@@ -92,7 +92,7 @@
 }
 
 RenderBlockFlow::RenderBlockFlow(Element& element, PassRef<RenderStyle> style)
-    : RenderBlock(element, std::move(style), RenderBlockFlowFlag)
+    : RenderBlock(element, WTF::move(style), RenderBlockFlowFlag)
 #if ENABLE(IOS_TEXT_AUTOSIZING)
     , m_widthForTextAutosizing(-1)
     , m_lineCountForTextAutosizing(NOT_SET)
@@ -102,7 +102,7 @@
 }
 
 RenderBlockFlow::RenderBlockFlow(Document& document, PassRef<RenderStyle> style)
-    : RenderBlock(document, std::move(style), RenderBlockFlowFlag)
+    : RenderBlock(document, WTF::move(style), RenderBlockFlowFlag)
 #if ENABLE(IOS_TEXT_AUTOSIZING)
     , m_widthForTextAutosizing(-1)
     , m_lineCountForTextAutosizing(NOT_SET)
@@ -1916,7 +1916,7 @@
     VerticalPositionCache verticalPositionCache;
     lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, verticalPositionCache);
     
-    setLineGridBox(std::move(lineGridBox));
+    setLineGridBox(WTF::move(lineGridBox));
 
     // FIXME: If any of the characteristics of the box change compared to the old one, then we need to do a deep dirtying
     // (similar to what happens when the page height changes). Ideally, though, we only do this if someone is actually snapping
@@ -2222,7 +2222,7 @@
 
     setLogicalWidthForFloat(floatingObject.get(), logicalWidthForChild(floatBox) + marginStartForChild(floatBox) + marginEndForChild(floatBox));
 
-    return m_floatingObjects->add(std::move(floatingObject));
+    return m_floatingObjects->add(WTF::move(floatingObject));
 }
 
 void RenderBlockFlow::removeFloatingObject(RenderBox& floatBox)