<!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>[166491] trunk/Source/WebCore</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/166491">166491</a></dd>
<dt>Author</dt> <dd>zandobersek@gmail.com</dd>
<dt>Date</dt> <dd>2014-03-31 03:35:59 -0700 (Mon, 31 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Move the rest of Source/WebCore/html/ code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=129669

Reviewed by Anders Carlsson.

Replace the remaining uses of OwnPtr, PassOwnPtr under Source/WebCore/html/ with std::unique_ptr.

* html/FormController.cpp:
(WebCore::SavedFormState::SavedFormState):
(WebCore::SavedFormState::deserialize):
(WebCore::FormController::createSavedFormStateMap):
(WebCore::FormController::formElementsState):
(WebCore::FormController::takeStateForFormElement):
(WebCore::FormController::formStatesFromStateVector):
* html/FormController.h:
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::mapMouseEvent):
* html/HTMLAreaElement.h:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::setSurfaceSize):
(WebCore::HTMLCanvasElement::createImageBuffer):
* html/HTMLCanvasElement.h:
* html/HTMLCollection.h:
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parseAttribute):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::updateVisibleValidationMessage):
* html/HTMLFormControlElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::addToPastNamesMap):
* html/HTMLFormElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::imageLoader):
(WebCore::HTMLInputElement::resetListAttributeTargetObserver):
* html/HTMLInputElement.h:
(WebCore::HTMLInputElement::hasImageLoader):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::startLoadingImage):
* html/HTMLPlugInImageElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::didAttachRenderers):
(WebCore::HTMLVideoElement::parseAttribute):
* html/HTMLVideoElement.h:
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::ValidationMessage):
(WebCore::ValidationMessage::setMessage):
(WebCore::ValidationMessage::setMessageDOMAndStartTimer):
(WebCore::ValidationMessage::requestToHideMessage):
* html/ValidationMessage.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlFormControllercpp">trunk/Source/WebCore/html/FormController.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlFormControllerh">trunk/Source/WebCore/html/FormController.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAreaElementcpp">trunk/Source/WebCore/html/HTMLAreaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAreaElementh">trunk/Source/WebCore/html/HTMLAreaElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLCanvasElementcpp">trunk/Source/WebCore/html/HTMLCanvasElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLCanvasElementh">trunk/Source/WebCore/html/HTMLCanvasElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLCollectionh">trunk/Source/WebCore/html/HTMLCollection.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormControlElementcpp">trunk/Source/WebCore/html/HTMLFormControlElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormControlElementh">trunk/Source/WebCore/html/HTMLFormControlElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormElementcpp">trunk/Source/WebCore/html/HTMLFormElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormElementh">trunk/Source/WebCore/html/HTMLFormElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementcpp">trunk/Source/WebCore/html/HTMLInputElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementh">trunk/Source/WebCore/html/HTMLInputElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLVideoElementcpp">trunk/Source/WebCore/html/HTMLVideoElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLVideoElementh">trunk/Source/WebCore/html/HTMLVideoElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlValidationMessagecpp">trunk/Source/WebCore/html/ValidationMessage.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlValidationMessageh">trunk/Source/WebCore/html/ValidationMessage.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/ChangeLog        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -1,3 +1,57 @@
</span><ins>+2014-03-31  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
+
+        Move the rest of Source/WebCore/html/ code to std::unique_ptr
+        https://bugs.webkit.org/show_bug.cgi?id=129669
+
+        Reviewed by Anders Carlsson.
+
+        Replace the remaining uses of OwnPtr, PassOwnPtr under Source/WebCore/html/ with std::unique_ptr.
+
+        * html/FormController.cpp:
+        (WebCore::SavedFormState::SavedFormState):
+        (WebCore::SavedFormState::deserialize):
+        (WebCore::FormController::createSavedFormStateMap):
+        (WebCore::FormController::formElementsState):
+        (WebCore::FormController::takeStateForFormElement):
+        (WebCore::FormController::formStatesFromStateVector):
+        * html/FormController.h:
+        * html/HTMLAreaElement.cpp:
+        (WebCore::HTMLAreaElement::mapMouseEvent):
+        * html/HTMLAreaElement.h:
+        * html/HTMLCanvasElement.cpp:
+        (WebCore::HTMLCanvasElement::setSurfaceSize):
+        (WebCore::HTMLCanvasElement::createImageBuffer):
+        * html/HTMLCanvasElement.h:
+        * html/HTMLCollection.h:
+        * html/HTMLEmbedElement.cpp:
+        (WebCore::HTMLEmbedElement::parseAttribute):
+        * html/HTMLFormControlElement.cpp:
+        (WebCore::HTMLFormControlElement::updateVisibleValidationMessage):
+        * html/HTMLFormControlElement.h:
+        * html/HTMLFormElement.cpp:
+        (WebCore::HTMLFormElement::addToPastNamesMap):
+        * html/HTMLFormElement.h:
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::imageLoader):
+        (WebCore::HTMLInputElement::resetListAttributeTargetObserver):
+        * html/HTMLInputElement.h:
+        (WebCore::HTMLInputElement::hasImageLoader):
+        * html/HTMLObjectElement.cpp:
+        (WebCore::HTMLObjectElement::parseAttribute):
+        * html/HTMLPlugInImageElement.cpp:
+        (WebCore::HTMLPlugInImageElement::startLoadingImage):
+        * html/HTMLPlugInImageElement.h:
+        * html/HTMLVideoElement.cpp:
+        (WebCore::HTMLVideoElement::didAttachRenderers):
+        (WebCore::HTMLVideoElement::parseAttribute):
+        * html/HTMLVideoElement.h:
+        * html/ValidationMessage.cpp:
+        (WebCore::ValidationMessage::ValidationMessage):
+        (WebCore::ValidationMessage::setMessage):
+        (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
+        (WebCore::ValidationMessage::requestToHideMessage):
+        * html/ValidationMessage.h:
+
</ins><span class="cx"> 2014-03-31  Maurice van der Pot  &lt;griffon26@kfk4ever.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix mixed use of booleans in JPEGImageDecoder.cpp
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlFormControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/FormController.cpp (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/FormController.cpp        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/FormController.cpp        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -173,8 +173,12 @@
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> 
</span><span class="cx"> public:
</span><del>-    static OwnPtr&lt;SavedFormState&gt; create();
-    static OwnPtr&lt;SavedFormState&gt; deserialize(const Vector&lt;String&gt;&amp;, size_t&amp; index);
</del><ins>+    SavedFormState()
+        : m_controlStateCount(0)
+    {
+    }
+
+    static std::unique_ptr&lt;SavedFormState&gt; deserialize(const Vector&lt;String&gt;&amp;, size_t&amp; index);
</ins><span class="cx">     void serializeTo(Vector&lt;String&gt;&amp;) const;
</span><span class="cx">     bool isEmpty() const { return m_stateForNewFormElements.isEmpty(); }
</span><span class="cx">     void appendControlState(const AtomicString&amp; name, const AtomicString&amp; type, const FormControlState&amp;);
</span><span class="lines">@@ -183,24 +187,17 @@
</span><span class="cx">     Vector&lt;String&gt; getReferencedFilePaths() const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    SavedFormState() : m_controlStateCount(0) { }
-
</del><span class="cx">     typedef HashMap&lt;FormElementKey, Deque&lt;FormControlState&gt;, FormElementKeyHash, FormElementKeyHashTraits&gt; FormElementStateMap;
</span><span class="cx">     FormElementStateMap m_stateForNewFormElements;
</span><span class="cx">     size_t m_controlStateCount;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-OwnPtr&lt;SavedFormState&gt; SavedFormState::create()
-{
-    return adoptPtr(new SavedFormState);
-}
-
</del><span class="cx"> static bool isNotFormControlTypeCharacter(UChar ch)
</span><span class="cx"> {
</span><span class="cx">     return ch != '-' &amp;&amp; (ch &gt; 'z' || ch &lt; 'a');
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-OwnPtr&lt;SavedFormState&gt; SavedFormState::deserialize(const Vector&lt;String&gt;&amp; stateVector, size_t&amp; index)
</del><ins>+std::unique_ptr&lt;SavedFormState&gt; SavedFormState::deserialize(const Vector&lt;String&gt;&amp; stateVector, size_t&amp; index)
</ins><span class="cx"> {
</span><span class="cx">     if (index &gt;= stateVector.size())
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -208,7 +205,7 @@
</span><span class="cx">     size_t itemCount = stateVector[index++].toUInt();
</span><span class="cx">     if (!itemCount)
</span><span class="cx">         return nullptr;
</span><del>-    OwnPtr&lt;SavedFormState&gt; savedFormState = adoptPtr(new SavedFormState);
</del><ins>+    auto savedFormState = std::make_unique&lt;SavedFormState&gt;();
</ins><span class="cx">     while (itemCount--) {
</span><span class="cx">         if (index + 1 &gt;= stateVector.size())
</span><span class="cx">             return nullptr;
</span><span class="lines">@@ -219,7 +216,7 @@
</span><span class="cx">             return nullptr;
</span><span class="cx">         savedFormState-&gt;appendControlState(name, type, state);
</span><span class="cx">     }
</span><del>-    return savedFormState.release();
</del><ins>+    return std::move(savedFormState);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SavedFormState::serializeTo(Vector&lt;String&gt;&amp; stateVector) const
</span><span class="lines">@@ -289,13 +286,11 @@
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> 
</span><span class="cx"> public:
</span><del>-    static OwnPtr&lt;FormKeyGenerator&gt; create() { return adoptPtr(new FormKeyGenerator); }
</del><ins>+    FormKeyGenerator() = default;
</ins><span class="cx">     AtomicString formKey(const HTMLFormControlElementWithState&amp;);
</span><span class="cx">     void willDeleteForm(HTMLFormElement*);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    FormKeyGenerator() { }
-
</del><span class="cx">     typedef HashMap&lt;HTMLFormElement*, AtomicString&gt; FormToKeyMap;
</span><span class="cx">     typedef HashMap&lt;String, unsigned&gt; FormSignatureToNextIndexMap;
</span><span class="cx">     FormToKeyMap m_formToKeyMap;
</span><span class="lines">@@ -399,25 +394,25 @@
</span><span class="cx">     return signature;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-OwnPtr&lt;FormController::SavedFormStateMap&gt; FormController::createSavedFormStateMap(const FormElementListHashSet&amp; controlList)
</del><ins>+std::unique_ptr&lt;FormController::SavedFormStateMap&gt; FormController::createSavedFormStateMap(const FormElementListHashSet&amp; controlList)
</ins><span class="cx"> {
</span><del>-    OwnPtr&lt;FormKeyGenerator&gt; keyGenerator = FormKeyGenerator::create();
-    OwnPtr&lt;SavedFormStateMap&gt; stateMap = adoptPtr(new SavedFormStateMap);
</del><ins>+    auto keyGenerator = std::make_unique&lt;FormKeyGenerator&gt;();
+    auto stateMap = std::make_unique&lt;SavedFormStateMap&gt;();
</ins><span class="cx">     for (FormElementListHashSet::const_iterator it = controlList.begin(); it != controlList.end(); ++it) {
</span><span class="cx">         HTMLFormControlElementWithState* control = it-&gt;get();
</span><span class="cx">         if (!control-&gt;shouldSaveAndRestoreFormControlState())
</span><span class="cx">             continue;
</span><del>-        SavedFormStateMap::AddResult result = stateMap-&gt;add(keyGenerator-&gt;formKey(*control).impl(), nullptr);
-        if (result.isNewEntry)
-            result.iterator-&gt;value = SavedFormState::create();
-        result.iterator-&gt;value-&gt;appendControlState(control-&gt;name(), control-&gt;type(), control-&gt;saveFormControlState());
</del><ins>+        auto&amp; formState = stateMap-&gt;add(keyGenerator-&gt;formKey(*control).impl(), nullptr).iterator-&gt;value;
+        if (!formState)
+            formState = std::make_unique&lt;SavedFormState&gt;();
+        formState-&gt;appendControlState(control-&gt;name(), control-&gt;type(), control-&gt;saveFormControlState());
</ins><span class="cx">     }
</span><del>-    return stateMap.release();
</del><ins>+    return std::move(stateMap);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Vector&lt;String&gt; FormController::formElementsState() const
</span><span class="cx"> {
</span><del>-    OwnPtr&lt;SavedFormStateMap&gt; stateMap = createSavedFormStateMap(m_formElementsWithState);
</del><ins>+    std::unique_ptr&lt;SavedFormStateMap&gt; stateMap = createSavedFormStateMap(m_formElementsWithState);
</ins><span class="cx">     Vector&lt;String&gt; stateVector;
</span><span class="cx">     stateVector.reserveInitialCapacity(m_formElementsWithState.size() * 4);
</span><span class="cx">     stateVector.append(formStateSignature());
</span><span class="lines">@@ -441,7 +436,7 @@
</span><span class="cx">     if (m_savedFormStateMap.isEmpty())
</span><span class="cx">         return FormControlState();
</span><span class="cx">     if (!m_formKeyGenerator)
</span><del>-        m_formKeyGenerator = FormKeyGenerator::create();
</del><ins>+        m_formKeyGenerator = std::make_unique&lt;FormKeyGenerator&gt;();
</ins><span class="cx">     SavedFormStateMap::iterator it = m_savedFormStateMap.find(m_formKeyGenerator-&gt;formKey(control).impl());
</span><span class="cx">     if (it == m_savedFormStateMap.end())
</span><span class="cx">         return FormControlState();
</span><span class="lines">@@ -461,12 +456,12 @@
</span><span class="cx"> 
</span><span class="cx">     while (i + 1 &lt; stateVector.size()) {
</span><span class="cx">         AtomicString formKey = stateVector[i++];
</span><del>-        OwnPtr&lt;SavedFormState&gt; state = SavedFormState::deserialize(stateVector, i);
</del><ins>+        std::unique_ptr&lt;SavedFormState&gt; state = SavedFormState::deserialize(stateVector, i);
</ins><span class="cx">         if (!state) {
</span><span class="cx">             i = 0;
</span><span class="cx">             break;
</span><span class="cx">         }
</span><del>-        map.add(formKey.impl(), state.release());
</del><ins>+        map.add(formKey.impl(), std::move(state));
</ins><span class="cx">     }
</span><span class="cx">     if (i != stateVector.size())
</span><span class="cx">         map.clear();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlFormControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/FormController.h (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/FormController.h        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/FormController.h        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -96,16 +96,16 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     typedef ListHashSet&lt;RefPtr&lt;HTMLFormControlElementWithState&gt;, 64&gt; FormElementListHashSet;
</span><del>-    typedef HashMap&lt;RefPtr&lt;AtomicStringImpl&gt;, OwnPtr&lt;SavedFormState&gt;&gt; SavedFormStateMap;
</del><ins>+    typedef HashMap&lt;RefPtr&lt;AtomicStringImpl&gt;, std::unique_ptr&lt;SavedFormState&gt;&gt; SavedFormStateMap;
</ins><span class="cx"> 
</span><del>-    static OwnPtr&lt;SavedFormStateMap&gt; createSavedFormStateMap(const FormElementListHashSet&amp;);
</del><ins>+    static std::unique_ptr&lt;SavedFormStateMap&gt; createSavedFormStateMap(const FormElementListHashSet&amp;);
</ins><span class="cx">     FormControlState takeStateForFormElement(const HTMLFormControlElementWithState&amp;);
</span><span class="cx">     static void formStatesFromStateVector(const Vector&lt;String&gt;&amp;, SavedFormStateMap&amp;);
</span><span class="cx"> 
</span><span class="cx">     CheckedRadioButtons m_checkedRadioButtons;
</span><span class="cx">     FormElementListHashSet m_formElementsWithState;
</span><span class="cx">     SavedFormStateMap m_savedFormStateMap;
</span><del>-    OwnPtr&lt;FormKeyGenerator&gt; m_formKeyGenerator;
</del><ins>+    std::unique_ptr&lt;FormKeyGenerator&gt; m_formKeyGenerator;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAreaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAreaElement.cpp (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAreaElement.cpp        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/HTMLAreaElement.cpp        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx"> bool HTMLAreaElement::mapMouseEvent(LayoutPoint location, const LayoutSize&amp; size, HitTestResult&amp; result)
</span><span class="cx"> {
</span><span class="cx">     if (m_lastSize != size) {
</span><del>-        m_region = adoptPtr(new Path(getRegion(size)));
</del><ins>+        m_region = std::make_unique&lt;Path&gt;(getRegion(size));
</ins><span class="cx">         m_lastSize = size;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAreaElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAreaElement.h (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAreaElement.h        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/HTMLAreaElement.h        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx">     Path getRegion(const LayoutSize&amp;) const;
</span><span class="cx">     void invalidateCachedRegion();
</span><span class="cx"> 
</span><del>-    OwnPtr&lt;Path&gt; m_region;
</del><ins>+    std::unique_ptr&lt;Path&gt; m_region;
</ins><span class="cx">     std::unique_ptr&lt;Length[]&gt; m_coords;
</span><span class="cx">     int m_coordsLen;
</span><span class="cx">     LayoutSize m_lastSize;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLCanvasElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLCanvasElement.cpp (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLCanvasElement.cpp        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.cpp        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -447,7 +447,7 @@
</span><span class="cx"> {
</span><span class="cx">     m_size = size;
</span><span class="cx">     m_hasCreatedImageBuffer = false;
</span><del>-    m_contextStateSaver.clear();
</del><ins>+    m_contextStateSaver = nullptr;
</ins><span class="cx">     m_imageBuffer.reset();
</span><span class="cx">     clearCopiedImage();
</span><span class="cx"> }
</span><span class="lines">@@ -595,7 +595,7 @@
</span><span class="cx">     if (document().settings() &amp;&amp; !document().settings()-&gt;antialiased2dCanvasEnabled())
</span><span class="cx">         m_imageBuffer-&gt;context()-&gt;setShouldAntialias(false);
</span><span class="cx">     m_imageBuffer-&gt;context()-&gt;setStrokeThickness(1);
</span><del>-    m_contextStateSaver = adoptPtr(new GraphicsContextStateSaver(*m_imageBuffer-&gt;context()));
</del><ins>+    m_contextStateSaver = std::make_unique&lt;GraphicsContextStateSaver&gt;(*m_imageBuffer-&gt;context());
</ins><span class="cx"> 
</span><span class="cx">     JSC::JSLockHolder lock(scriptExecutionContext()-&gt;vm());
</span><span class="cx">     size_t numBytes = 4 * m_imageBuffer-&gt;internalSize().width() * m_imageBuffer-&gt;internalSize().height();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLCanvasElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLCanvasElement.h (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLCanvasElement.h        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.h        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -191,7 +191,7 @@
</span><span class="cx">     mutable bool m_hasCreatedImageBuffer;
</span><span class="cx">     mutable bool m_didClearImageBuffer;
</span><span class="cx">     mutable std::unique_ptr&lt;ImageBuffer&gt; m_imageBuffer;
</span><del>-    mutable OwnPtr&lt;GraphicsContextStateSaver&gt; m_contextStateSaver;
</del><ins>+    mutable std::unique_ptr&lt;GraphicsContextStateSaver&gt; m_contextStateSaver;
</ins><span class="cx">     
</span><span class="cx">     mutable RefPtr&lt;Image&gt; m_presentedImage;
</span><span class="cx">     mutable RefPtr&lt;Image&gt; m_copiedImage; // FIXME: This is temporary for platforms that have to copy the image buffer to render (and for CSSCanvasValue).
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLCollectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLCollection.h (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLCollection.h        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/HTMLCollection.h        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include &quot;HTMLNames.h&quot;
</span><span class="cx"> #include &quot;LiveNodeList.h&quot;
</span><span class="cx"> #include &quot;ScriptWrappable.h&quot;
</span><ins>+#include &lt;memory&gt;
</ins><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormControlElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormControlElement.cpp (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormControlElement.cpp        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/HTMLFormControlElement.cpp        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -393,7 +393,7 @@
</span><span class="cx">     if (renderer() &amp;&amp; willValidate())
</span><span class="cx">         message = validationMessage().stripWhiteSpace();
</span><span class="cx">     if (!m_validationMessage)
</span><del>-        m_validationMessage = ValidationMessage::create(this);
</del><ins>+        m_validationMessage = std::make_unique&lt;ValidationMessage&gt;(this);
</ins><span class="cx">     m_validationMessage-&gt;updateValidationMessage(message);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormControlElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormControlElement.h (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormControlElement.h        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/HTMLFormControlElement.h        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -165,7 +165,7 @@
</span><span class="cx">     virtual const HTMLFormControlElement&amp; asHTMLElement() const override final { return *this; }
</span><span class="cx">     virtual HTMLFormControlElement* asFormNamedItem() override final { return this; }
</span><span class="cx"> 
</span><del>-    OwnPtr&lt;ValidationMessage&gt; m_validationMessage;
</del><ins>+    std::unique_ptr&lt;ValidationMessage&gt; m_validationMessage;
</ins><span class="cx">     bool m_disabled : 1;
</span><span class="cx">     bool m_isReadOnly : 1;
</span><span class="cx">     bool m_isRequired : 1;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormElement.cpp (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormElement.cpp        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/HTMLFormElement.cpp        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -699,7 +699,7 @@
</span><span class="cx">     if (pastName.isEmpty())
</span><span class="cx">         return;
</span><span class="cx">     if (!m_pastNamesMap)
</span><del>-        m_pastNamesMap = adoptPtr(new PastNamesMap);
</del><ins>+        m_pastNamesMap = std::make_unique&lt;PastNamesMap&gt;();
</ins><span class="cx">     m_pastNamesMap-&gt;set(pastName.impl(), item);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormElement.h (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormElement.h        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/HTMLFormElement.h        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> #include &quot;FormState.h&quot;
</span><span class="cx"> #include &quot;FormSubmission.h&quot;
</span><span class="cx"> #include &quot;HTMLElement.h&quot;
</span><del>-#include &lt;wtf/OwnPtr.h&gt;
</del><ins>+#include &lt;memory&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE)
</span><span class="cx"> #include &quot;Autocapitalize.h&quot;
</span><span class="lines">@@ -161,7 +161,7 @@
</span><span class="cx">     typedef HashMap&lt;RefPtr&lt;AtomicStringImpl&gt;, FormNamedItem*&gt; PastNamesMap;
</span><span class="cx"> 
</span><span class="cx">     FormSubmission::Attributes m_attributes;
</span><del>-    OwnPtr&lt;PastNamesMap&gt; m_pastNamesMap;
</del><ins>+    std::unique_ptr&lt;PastNamesMap&gt; m_pastNamesMap;
</ins><span class="cx"> 
</span><span class="cx">     CheckedRadioButtons m_checkedRadioButtons;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.cpp        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -85,12 +85,11 @@
</span><span class="cx"> class ListAttributeTargetObserver : IdTargetObserver {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    static OwnPtr&lt;ListAttributeTargetObserver&gt; create(const AtomicString&amp; id, HTMLInputElement*);
</del><ins>+    ListAttributeTargetObserver(const AtomicString&amp; id, HTMLInputElement*);
+
</ins><span class="cx">     virtual void idTargetChanged() override;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    ListAttributeTargetObserver(const AtomicString&amp; id, HTMLInputElement*);
-
</del><span class="cx">     HTMLInputElement* m_element;
</span><span class="cx"> };
</span><span class="cx"> #endif
</span><span class="lines">@@ -142,7 +141,7 @@
</span><span class="cx"> HTMLImageLoader* HTMLInputElement::imageLoader()
</span><span class="cx"> {
</span><span class="cx">     if (!m_imageLoader)
</span><del>-        m_imageLoader = adoptPtr(new HTMLImageLoader(*this));
</del><ins>+        m_imageLoader = std::make_unique&lt;HTMLImageLoader&gt;(*this);
</ins><span class="cx">     return m_imageLoader.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1587,7 +1586,7 @@
</span><span class="cx"> void HTMLInputElement::resetListAttributeTargetObserver()
</span><span class="cx"> {
</span><span class="cx">     if (inDocument())
</span><del>-        m_listAttributeTargetObserver = ListAttributeTargetObserver::create(fastGetAttribute(listAttr), this);
</del><ins>+        m_listAttributeTargetObserver = std::make_unique&lt;ListAttributeTargetObserver&gt;(fastGetAttribute(listAttr), this);
</ins><span class="cx">     else
</span><span class="cx">         m_listAttributeTargetObserver = nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -1856,11 +1855,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATALIST_ELEMENT)
</span><del>-OwnPtr&lt;ListAttributeTargetObserver&gt; ListAttributeTargetObserver::create(const AtomicString&amp; id, HTMLInputElement* element)
-{
-    return adoptPtr(new ListAttributeTargetObserver(id, element));
-}
-
</del><span class="cx"> ListAttributeTargetObserver::ListAttributeTargetObserver(const AtomicString&amp; id, HTMLInputElement* element)
</span><span class="cx">     : IdTargetObserver(element-&gt;treeScope().idTargetObserverRegistry(), id)
</span><span class="cx">     , m_element(element)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.h (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.h        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/HTMLInputElement.h        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include &quot;FileChooser.h&quot;
</span><span class="cx"> #include &quot;HTMLTextFormControlElement.h&quot;
</span><span class="cx"> #include &quot;StepRange.h&quot;
</span><ins>+#include &lt;memory&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> #include &quot;DateComponents.h&quot;
</span><span class="lines">@@ -322,7 +323,7 @@
</span><span class="cx">     virtual void setRangeText(const String&amp; replacement, ExceptionCode&amp;) override;
</span><span class="cx">     virtual void setRangeText(const String&amp; replacement, unsigned start, unsigned end, const String&amp; selectionMode, ExceptionCode&amp;) override;
</span><span class="cx"> 
</span><del>-    bool hasImageLoader() const { return m_imageLoader; }
</del><ins>+    bool hasImageLoader() const { return !!m_imageLoader; }
</ins><span class="cx">     HTMLImageLoader* imageLoader();
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATE_AND_TIME_INPUT_TYPES)
</span><span class="lines">@@ -454,9 +455,9 @@
</span><span class="cx">     // The ImageLoader must be owned by this element because the loader code assumes
</span><span class="cx">     // that it lives as long as its owning element lives. If we move the loader into
</span><span class="cx">     // the ImageInput object we may delete the loader while this element lives on.
</span><del>-    OwnPtr&lt;HTMLImageLoader&gt; m_imageLoader;
</del><ins>+    std::unique_ptr&lt;HTMLImageLoader&gt; m_imageLoader;
</ins><span class="cx"> #if ENABLE(DATALIST_ELEMENT)
</span><del>-    OwnPtr&lt;ListAttributeTargetObserver&gt; m_listAttributeTargetObserver;
</del><ins>+    std::unique_ptr&lt;ListAttributeTargetObserver&gt; m_listAttributeTargetObserver;
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLVideoElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLVideoElement.cpp (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLVideoElement.cpp        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/HTMLVideoElement.cpp        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx">         updateDisplayState();
</span><span class="cx">         if (shouldDisplayPosterImage()) {
</span><span class="cx">             if (!m_imageLoader)
</span><del>-                m_imageLoader = adoptPtr(new HTMLImageLoader(*this));
</del><ins>+                m_imageLoader = std::make_unique&lt;HTMLImageLoader&gt;(*this);
</ins><span class="cx">             m_imageLoader-&gt;updateFromElement();
</span><span class="cx">             if (renderer())
</span><span class="cx">                 toRenderImage(renderer())-&gt;imageResource().setCachedImage(m_imageLoader-&gt;image());
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx"> #endif
</span><span class="cx">         if (shouldDisplayPosterImage()) {
</span><span class="cx">             if (!m_imageLoader)
</span><del>-                m_imageLoader = adoptPtr(new HTMLImageLoader(*this));
</del><ins>+                m_imageLoader = std::make_unique&lt;HTMLImageLoader&gt;(*this);
</ins><span class="cx">             m_imageLoader-&gt;updateFromElementIgnoringPreviousError();
</span><span class="cx">         } else {
</span><span class="cx">             if (renderer())
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLVideoElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLVideoElement.h (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLVideoElement.h        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/HTMLVideoElement.h        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -27,7 +27,9 @@
</span><span class="cx"> #define HTMLVideoElement_h
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO)
</span><ins>+
</ins><span class="cx"> #include &quot;HTMLMediaElement.h&quot;
</span><ins>+#include &lt;memory&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -95,7 +97,7 @@
</span><span class="cx">     virtual void didMoveToNewDocument(Document* oldDocument) override;
</span><span class="cx">     virtual void setDisplayMode(DisplayMode) override;
</span><span class="cx"> 
</span><del>-    OwnPtr&lt;HTMLImageLoader&gt; m_imageLoader;
</del><ins>+    std::unique_ptr&lt;HTMLImageLoader&gt; m_imageLoader;
</ins><span class="cx"> 
</span><span class="cx">     AtomicString m_defaultPosterURL;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlValidationMessagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/ValidationMessage.cpp (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/ValidationMessage.cpp        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/ValidationMessage.cpp        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -46,13 +46,12 @@
</span><span class="cx"> #include &quot;StyleResolver.h&quot;
</span><span class="cx"> #include &quot;Text.h&quot;
</span><span class="cx"> #include &quot;ValidationMessageClient.h&quot;
</span><del>-#include &lt;wtf/PassOwnPtr.h&gt;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> using namespace HTMLNames;
</span><span class="cx"> 
</span><del>-ALWAYS_INLINE ValidationMessage::ValidationMessage(HTMLFormControlElement* element)
</del><ins>+ValidationMessage::ValidationMessage(HTMLFormControlElement* element)
</ins><span class="cx">     : m_element(element)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_element);
</span><span class="lines">@@ -68,11 +67,6 @@
</span><span class="cx">     deleteBubbleTree();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-OwnPtr&lt;ValidationMessage&gt; ValidationMessage::create(HTMLFormControlElement* element)
-{
-    return adoptPtr(new ValidationMessage(element));
-}
-
</del><span class="cx"> ValidationMessageClient* ValidationMessage::validationMessageClient() const
</span><span class="cx"> {
</span><span class="cx">     if (Page* page = m_element-&gt;document().page())
</span><span class="lines">@@ -113,9 +107,9 @@
</span><span class="cx">     ASSERT(!message.isEmpty());
</span><span class="cx">     m_message = message;
</span><span class="cx">     if (!m_bubble)
</span><del>-        m_timer = adoptPtr(new Timer&lt;ValidationMessage&gt;(this, &amp;ValidationMessage::buildBubbleTree));
</del><ins>+        m_timer = std::make_unique&lt;Timer&lt;ValidationMessage&gt;&gt;(this, &amp;ValidationMessage::buildBubbleTree);
</ins><span class="cx">     else
</span><del>-        m_timer = adoptPtr(new Timer&lt;ValidationMessage&gt;(this, &amp;ValidationMessage::setMessageDOMAndStartTimer));
</del><ins>+        m_timer = std::make_unique&lt;Timer&lt;ValidationMessage&gt;&gt;(this, &amp;ValidationMessage::setMessageDOMAndStartTimer);
</ins><span class="cx">     m_timer-&gt;startOneShot(0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -140,9 +134,9 @@
</span><span class="cx"> 
</span><span class="cx">     int magnification = document.page() ? document.page()-&gt;settings().validationMessageTimerMagnification() : -1;
</span><span class="cx">     if (magnification &lt;= 0)
</span><del>-        m_timer.clear();
</del><ins>+        m_timer = nullptr;
</ins><span class="cx">     else {
</span><del>-        m_timer = adoptPtr(new Timer&lt;ValidationMessage&gt;(this, &amp;ValidationMessage::deleteBubbleTree));
</del><ins>+        m_timer = std::make_unique&lt;Timer&lt;ValidationMessage&gt;&gt;(this, &amp;ValidationMessage::deleteBubbleTree);
</ins><span class="cx">         m_timer-&gt;startOneShot(std::max(5.0, static_cast&lt;double&gt;(m_message.length()) * magnification / 1000));
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -222,7 +216,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // We must not modify the DOM tree in this context by the same reason as setMessage().
</span><del>-    m_timer = adoptPtr(new Timer&lt;ValidationMessage&gt;(this, &amp;ValidationMessage::deleteBubbleTree));
</del><ins>+    m_timer = std::make_unique&lt;Timer&lt;ValidationMessage&gt;&gt;(this, &amp;ValidationMessage::deleteBubbleTree);
</ins><span class="cx">     m_timer-&gt;startOneShot(0);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlValidationMessageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/ValidationMessage.h (166490 => 166491)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/ValidationMessage.h        2014-03-31 10:21:27 UTC (rev 166490)
+++ trunk/Source/WebCore/html/ValidationMessage.h        2014-03-31 10:35:59 UTC (rev 166491)
</span><span class="lines">@@ -32,8 +32,8 @@
</span><span class="cx"> #define ValidationMessage_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Timer.h&quot;
</span><ins>+#include &lt;memory&gt;
</ins><span class="cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><del>-#include &lt;wtf/OwnPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -49,15 +49,15 @@
</span><span class="cx"> class ValidationMessage {
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(ValidationMessage); WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    static OwnPtr&lt;ValidationMessage&gt; create(HTMLFormControlElement*);
</del><ins>+    explicit ValidationMessage(HTMLFormControlElement*);
</ins><span class="cx">     ~ValidationMessage();
</span><ins>+
</ins><span class="cx">     void updateValidationMessage(const String&amp;);
</span><span class="cx">     void requestToHideMessage();
</span><span class="cx">     bool isVisible() const;
</span><span class="cx">     bool shadowTreeContains(const Node&amp;) const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit ValidationMessage(HTMLFormControlElement*);
</del><span class="cx">     ValidationMessageClient* validationMessageClient() const;
</span><span class="cx">     void setMessage(const String&amp;);
</span><span class="cx">     void setMessageDOMAndStartTimer(Timer&lt;ValidationMessage&gt;* = 0);
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx"> 
</span><span class="cx">     HTMLFormControlElement* m_element;
</span><span class="cx">     String m_message;
</span><del>-    OwnPtr&lt;Timer&lt;ValidationMessage&gt;&gt; m_timer;
</del><ins>+    std::unique_ptr&lt;Timer&lt;ValidationMessage&gt;&gt; m_timer;
</ins><span class="cx">     RefPtr&lt;HTMLElement&gt; m_bubble;
</span><span class="cx">     RefPtr&lt;HTMLElement&gt; m_messageHeading;
</span><span class="cx">     RefPtr&lt;HTMLElement&gt; m_messageBody;
</span></span></pre>
</div>
</div>

</body>
</html>