<!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>[165178] 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/165178">165178</a></dd>
<dt>Author</dt> <dd>zandobersek@gmail.com</dd>
<dt>Date</dt> <dd>2014-03-06 01:04:38 -0800 (Thu, 06 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Move Source/WebCore/editing/ code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=129665

Reviewed by Anders Carlsson.

Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/editing/ with std::unique_ptr.

* editing/EditingStyle.cpp:
(WebCore::htmlElementEquivalents):
(WebCore::EditingStyle::conflictsWithImplicitStyleOfElement):
(WebCore::htmlAttributeEquivalents):
(WebCore::EditingStyle::conflictsWithImplicitStyleOfAttributes):
(WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
(WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
(WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
* editing/Editor.cpp:
(WebCore::Editor::Editor):
(WebCore::Editor::clear):
* editing/Editor.h:
* page/Frame.cpp:
(WebCore::Frame::Frame):
* page/Frame.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreeditingEditingStylecpp">trunk/Source/WebCore/editing/EditingStyle.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorcpp">trunk/Source/WebCore/editing/Editor.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorh">trunk/Source/WebCore/editing/Editor.h</a></li>
<li><a href="#trunkSourceWebCorepageFramecpp">trunk/Source/WebCore/page/Frame.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameh">trunk/Source/WebCore/page/Frame.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (165177 => 165178)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-06 09:02:33 UTC (rev 165177)
+++ trunk/Source/WebCore/ChangeLog        2014-03-06 09:04:38 UTC (rev 165178)
</span><span class="lines">@@ -1,5 +1,30 @@
</span><span class="cx"> 2014-03-06  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
</span><span class="cx"> 
</span><ins>+        Move Source/WebCore/editing/ code to std::unique_ptr
+        https://bugs.webkit.org/show_bug.cgi?id=129665
+
+        Reviewed by Anders Carlsson.
+
+        Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/editing/ with std::unique_ptr.
+
+        * editing/EditingStyle.cpp:
+        (WebCore::htmlElementEquivalents):
+        (WebCore::EditingStyle::conflictsWithImplicitStyleOfElement):
+        (WebCore::htmlAttributeEquivalents):
+        (WebCore::EditingStyle::conflictsWithImplicitStyleOfAttributes):
+        (WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
+        (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
+        (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
+        * editing/Editor.cpp:
+        (WebCore::Editor::Editor):
+        (WebCore::Editor::clear):
+        * editing/Editor.h:
+        * page/Frame.cpp:
+        (WebCore::Frame::Frame):
+        * page/Frame.h:
+
+2014-03-06  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
+
</ins><span class="cx">         Move to using std::unique_ptr for KeyboardEvent, ScriptExecutionContext::PendingException
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=129061
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditingStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/EditingStyle.cpp (165177 => 165178)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/EditingStyle.cpp        2014-03-06 09:02:33 UTC (rev 165177)
+++ trunk/Source/WebCore/editing/EditingStyle.cpp        2014-03-06 09:04:38 UTC (rev 165178)
</span><span class="lines">@@ -158,10 +158,7 @@
</span><span class="cx"> class HTMLElementEquivalent {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    static PassOwnPtr&lt;HTMLElementEquivalent&gt; create(CSSPropertyID propertyID, CSSValueID primitiveValue, const QualifiedName&amp; tagName)
-    {
-        return adoptPtr(new HTMLElementEquivalent(propertyID, primitiveValue, tagName));
-    }
</del><ins>+    HTMLElementEquivalent(CSSPropertyID, CSSValueID primitiveValue, const QualifiedName&amp; tagName);
</ins><span class="cx"> 
</span><span class="cx">     virtual ~HTMLElementEquivalent() { }
</span><span class="cx">     virtual bool matches(const Element* element) const { return !m_tagName || element-&gt;hasTagName(*m_tagName); }
</span><span class="lines">@@ -173,7 +170,6 @@
</span><span class="cx"> protected:
</span><span class="cx">     HTMLElementEquivalent(CSSPropertyID);
</span><span class="cx">     HTMLElementEquivalent(CSSPropertyID, const QualifiedName&amp; tagName);
</span><del>-    HTMLElementEquivalent(CSSPropertyID, CSSValueID primitiveValue, const QualifiedName&amp; tagName);
</del><span class="cx">     const CSSPropertyID m_propertyID;
</span><span class="cx">     const RefPtr&lt;CSSPrimitiveValue&gt; m_primitiveValue;
</span><span class="cx">     const QualifiedName* m_tagName; // We can store a pointer because HTML tag names are const global.
</span><span class="lines">@@ -212,15 +208,10 @@
</span><span class="cx"> 
</span><span class="cx"> class HTMLTextDecorationEquivalent : public HTMLElementEquivalent {
</span><span class="cx"> public:
</span><del>-    static PassOwnPtr&lt;HTMLElementEquivalent&gt; create(CSSValueID primitiveValue, const QualifiedName&amp; tagName)
-    {
-        return adoptPtr(new HTMLTextDecorationEquivalent(primitiveValue, tagName));
-    }
</del><ins>+    HTMLTextDecorationEquivalent(CSSValueID primitiveValue, const QualifiedName&amp; tagName);
+
</ins><span class="cx">     virtual bool propertyExistsInStyle(const StyleProperties*) const;
</span><span class="cx">     virtual bool valueIsPresentInStyle(Element*, StyleProperties*) const;
</span><del>-
-private:
-    HTMLTextDecorationEquivalent(CSSValueID primitiveValue, const QualifiedName&amp; tagName);
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> HTMLTextDecorationEquivalent::HTMLTextDecorationEquivalent(CSSValueID primitiveValue, const QualifiedName&amp; tagName)
</span><span class="lines">@@ -244,14 +235,8 @@
</span><span class="cx"> 
</span><span class="cx"> class HTMLAttributeEquivalent : public HTMLElementEquivalent {
</span><span class="cx"> public:
</span><del>-    static PassOwnPtr&lt;HTMLAttributeEquivalent&gt; create(CSSPropertyID propertyID, const QualifiedName&amp; tagName, const QualifiedName&amp; attrName)
-    {
-        return adoptPtr(new HTMLAttributeEquivalent(propertyID, tagName, attrName));
-    }
-    static PassOwnPtr&lt;HTMLAttributeEquivalent&gt; create(CSSPropertyID propertyID, const QualifiedName&amp; attrName)
-    {
-        return adoptPtr(new HTMLAttributeEquivalent(propertyID, attrName));
-    }
</del><ins>+    HTMLAttributeEquivalent(CSSPropertyID, const QualifiedName&amp; tagName, const QualifiedName&amp; attrName);
+    HTMLAttributeEquivalent(CSSPropertyID, const QualifiedName&amp; attrName);
</ins><span class="cx"> 
</span><span class="cx">     bool matches(const Element* elem) const { return HTMLElementEquivalent::matches(elem) &amp;&amp; elem-&gt;hasAttribute(m_attrName); }
</span><span class="cx">     virtual bool hasAttribute() const { return true; }
</span><span class="lines">@@ -261,8 +246,6 @@
</span><span class="cx">     inline const QualifiedName&amp; attributeName() const { return m_attrName; }
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    HTMLAttributeEquivalent(CSSPropertyID, const QualifiedName&amp; tagName, const QualifiedName&amp; attrName);
-    HTMLAttributeEquivalent(CSSPropertyID, const QualifiedName&amp; attrName);
</del><span class="cx">     const QualifiedName&amp; m_attrName; // We can store a reference because HTML attribute names are const global.
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -306,14 +289,9 @@
</span><span class="cx"> 
</span><span class="cx"> class HTMLFontSizeEquivalent : public HTMLAttributeEquivalent {
</span><span class="cx"> public:
</span><del>-    static PassOwnPtr&lt;HTMLFontSizeEquivalent&gt; create()
-    {
-        return adoptPtr(new HTMLFontSizeEquivalent());
-    }
-    virtual PassRefPtr&lt;CSSValue&gt; attributeValueAsCSSValue(Element*) const;
-
-private:
</del><span class="cx">     HTMLFontSizeEquivalent();
</span><ins>+
+    virtual PassRefPtr&lt;CSSValue&gt; attributeValueAsCSSValue(Element*) const;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> HTMLFontSizeEquivalent::HTMLFontSizeEquivalent()
</span><span class="lines">@@ -760,21 +738,21 @@
</span><span class="cx">     return conflictingProperties &amp;&amp; !conflictingProperties-&gt;isEmpty();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static const Vector&lt;OwnPtr&lt;HTMLElementEquivalent&gt;&gt;&amp; htmlElementEquivalents()
</del><ins>+static const Vector&lt;std::unique_ptr&lt;HTMLElementEquivalent&gt;&gt;&amp; htmlElementEquivalents()
</ins><span class="cx"> {
</span><del>-    DEFINE_STATIC_LOCAL(Vector&lt;OwnPtr&lt;HTMLElementEquivalent&gt;&gt;, HTMLElementEquivalents, ());
</del><ins>+    DEFINE_STATIC_LOCAL(Vector&lt;std::unique_ptr&lt;HTMLElementEquivalent&gt;&gt;, HTMLElementEquivalents, ());
</ins><span class="cx"> 
</span><span class="cx">     if (!HTMLElementEquivalents.size()) {
</span><del>-        HTMLElementEquivalents.append(HTMLElementEquivalent::create(CSSPropertyFontWeight, CSSValueBold, HTMLNames::bTag));
-        HTMLElementEquivalents.append(HTMLElementEquivalent::create(CSSPropertyFontWeight, CSSValueBold, HTMLNames::strongTag));
-        HTMLElementEquivalents.append(HTMLElementEquivalent::create(CSSPropertyVerticalAlign, CSSValueSub, HTMLNames::subTag));
-        HTMLElementEquivalents.append(HTMLElementEquivalent::create(CSSPropertyVerticalAlign, CSSValueSuper, HTMLNames::supTag));
-        HTMLElementEquivalents.append(HTMLElementEquivalent::create(CSSPropertyFontStyle, CSSValueItalic, HTMLNames::iTag));
-        HTMLElementEquivalents.append(HTMLElementEquivalent::create(CSSPropertyFontStyle, CSSValueItalic, HTMLNames::emTag));
</del><ins>+        HTMLElementEquivalents.append(std::make_unique&lt;HTMLElementEquivalent&gt;(CSSPropertyFontWeight, CSSValueBold, HTMLNames::bTag));
+        HTMLElementEquivalents.append(std::make_unique&lt;HTMLElementEquivalent&gt;(CSSPropertyFontWeight, CSSValueBold, HTMLNames::strongTag));
+        HTMLElementEquivalents.append(std::make_unique&lt;HTMLElementEquivalent&gt;(CSSPropertyVerticalAlign, CSSValueSub, HTMLNames::subTag));
+        HTMLElementEquivalents.append(std::make_unique&lt;HTMLElementEquivalent&gt;(CSSPropertyVerticalAlign, CSSValueSuper, HTMLNames::supTag));
+        HTMLElementEquivalents.append(std::make_unique&lt;HTMLElementEquivalent&gt;(CSSPropertyFontStyle, CSSValueItalic, HTMLNames::iTag));
+        HTMLElementEquivalents.append(std::make_unique&lt;HTMLElementEquivalent&gt;(CSSPropertyFontStyle, CSSValueItalic, HTMLNames::emTag));
</ins><span class="cx"> 
</span><del>-        HTMLElementEquivalents.append(HTMLTextDecorationEquivalent::create(CSSValueUnderline, HTMLNames::uTag));
-        HTMLElementEquivalents.append(HTMLTextDecorationEquivalent::create(CSSValueLineThrough, HTMLNames::sTag));
-        HTMLElementEquivalents.append(HTMLTextDecorationEquivalent::create(CSSValueLineThrough, HTMLNames::strikeTag));
</del><ins>+        HTMLElementEquivalents.append(std::make_unique&lt;HTMLTextDecorationEquivalent&gt;(CSSValueUnderline, HTMLNames::uTag));
+        HTMLElementEquivalents.append(std::make_unique&lt;HTMLTextDecorationEquivalent&gt;(CSSValueLineThrough, HTMLNames::sTag));
+        HTMLElementEquivalents.append(std::make_unique&lt;HTMLTextDecorationEquivalent&gt;(CSSValueLineThrough, HTMLNames::strikeTag));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return HTMLElementEquivalents;
</span><span class="lines">@@ -786,7 +764,7 @@
</span><span class="cx">     if (!m_mutableStyle)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    const Vector&lt;OwnPtr&lt;HTMLElementEquivalent&gt;&gt;&amp; HTMLElementEquivalents = htmlElementEquivalents();
</del><ins>+    const Vector&lt;std::unique_ptr&lt;HTMLElementEquivalent&gt;&gt;&amp; HTMLElementEquivalents = htmlElementEquivalents();
</ins><span class="cx">     for (size_t i = 0; i &lt; HTMLElementEquivalents.size(); ++i) {
</span><span class="cx">         const HTMLElementEquivalent* equivalent = HTMLElementEquivalents[i].get();
</span><span class="cx">         if (equivalent-&gt;matches(element) &amp;&amp; equivalent-&gt;propertyExistsInStyle(m_mutableStyle.get())
</span><span class="lines">@@ -799,19 +777,19 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static const Vector&lt;OwnPtr&lt;HTMLAttributeEquivalent&gt;&gt;&amp; htmlAttributeEquivalents()
</del><ins>+static const Vector&lt;std::unique_ptr&lt;HTMLAttributeEquivalent&gt;&gt;&amp; htmlAttributeEquivalents()
</ins><span class="cx"> {
</span><del>-    DEFINE_STATIC_LOCAL(Vector&lt;OwnPtr&lt;HTMLAttributeEquivalent&gt;&gt;, HTMLAttributeEquivalents, ());
</del><ins>+    DEFINE_STATIC_LOCAL(Vector&lt;std::unique_ptr&lt;HTMLAttributeEquivalent&gt;&gt;, HTMLAttributeEquivalents, ());
</ins><span class="cx"> 
</span><span class="cx">     if (!HTMLAttributeEquivalents.size()) {
</span><span class="cx">         // elementIsStyledSpanOrHTMLEquivalent depends on the fact each HTMLAttriuteEquivalent matches exactly one attribute
</span><span class="cx">         // of exactly one element except dirAttr.
</span><del>-        HTMLAttributeEquivalents.append(HTMLAttributeEquivalent::create(CSSPropertyColor, HTMLNames::fontTag, HTMLNames::colorAttr));
-        HTMLAttributeEquivalents.append(HTMLAttributeEquivalent::create(CSSPropertyFontFamily, HTMLNames::fontTag, HTMLNames::faceAttr));
-        HTMLAttributeEquivalents.append(HTMLFontSizeEquivalent::create());
</del><ins>+        HTMLAttributeEquivalents.append(std::make_unique&lt;HTMLAttributeEquivalent&gt;(CSSPropertyColor, HTMLNames::fontTag, HTMLNames::colorAttr));
+        HTMLAttributeEquivalents.append(std::make_unique&lt;HTMLAttributeEquivalent&gt;(CSSPropertyFontFamily, HTMLNames::fontTag, HTMLNames::faceAttr));
+        HTMLAttributeEquivalents.append(std::make_unique&lt;HTMLFontSizeEquivalent&gt;());
</ins><span class="cx"> 
</span><del>-        HTMLAttributeEquivalents.append(HTMLAttributeEquivalent::create(CSSPropertyDirection, HTMLNames::dirAttr));
-        HTMLAttributeEquivalents.append(HTMLAttributeEquivalent::create(CSSPropertyUnicodeBidi, HTMLNames::dirAttr));
</del><ins>+        HTMLAttributeEquivalents.append(std::make_unique&lt;HTMLAttributeEquivalent&gt;(CSSPropertyDirection, HTMLNames::dirAttr));
+        HTMLAttributeEquivalents.append(std::make_unique&lt;HTMLAttributeEquivalent&gt;(CSSPropertyUnicodeBidi, HTMLNames::dirAttr));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return HTMLAttributeEquivalents;
</span><span class="lines">@@ -823,7 +801,7 @@
</span><span class="cx">     if (!m_mutableStyle)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    const Vector&lt;OwnPtr&lt;HTMLAttributeEquivalent&gt;&gt;&amp; HTMLAttributeEquivalents = htmlAttributeEquivalents();
</del><ins>+    const Vector&lt;std::unique_ptr&lt;HTMLAttributeEquivalent&gt;&gt;&amp; HTMLAttributeEquivalents = htmlAttributeEquivalents();
</ins><span class="cx">     for (size_t i = 0; i &lt; HTMLAttributeEquivalents.size(); ++i) {
</span><span class="cx">         if (HTMLAttributeEquivalents[i]-&gt;matches(element) &amp;&amp; HTMLAttributeEquivalents[i]-&gt;propertyExistsInStyle(m_mutableStyle.get())
</span><span class="cx">             &amp;&amp; !HTMLAttributeEquivalents[i]-&gt;valueIsPresentInStyle(element, m_mutableStyle.get()))
</span><span class="lines">@@ -842,7 +820,7 @@
</span><span class="cx">     if (!m_mutableStyle)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    const Vector&lt;OwnPtr&lt;HTMLAttributeEquivalent&gt;&gt;&amp; HTMLAttributeEquivalents = htmlAttributeEquivalents();
</del><ins>+    const Vector&lt;std::unique_ptr&lt;HTMLAttributeEquivalent&gt;&gt;&amp; HTMLAttributeEquivalents = htmlAttributeEquivalents();
</ins><span class="cx">     bool removed = false;
</span><span class="cx">     for (size_t i = 0; i &lt; HTMLAttributeEquivalents.size(); ++i) {
</span><span class="cx">         const HTMLAttributeEquivalent* equivalent = HTMLAttributeEquivalents[i].get();
</span><span class="lines">@@ -878,7 +856,7 @@
</span><span class="cx">     if (element-&gt;hasTagName(HTMLNames::spanTag))
</span><span class="cx">         elementIsSpanOrElementEquivalent = true;
</span><span class="cx">     else {
</span><del>-        const Vector&lt;OwnPtr&lt;HTMLElementEquivalent&gt;&gt;&amp; HTMLElementEquivalents = htmlElementEquivalents();
</del><ins>+        const Vector&lt;std::unique_ptr&lt;HTMLElementEquivalent&gt;&gt;&amp; HTMLElementEquivalents = htmlElementEquivalents();
</ins><span class="cx">         size_t i;
</span><span class="cx">         for (i = 0; i &lt; HTMLElementEquivalents.size(); ++i) {
</span><span class="cx">             if (HTMLElementEquivalents[i]-&gt;matches(element)) {
</span><span class="lines">@@ -892,7 +870,7 @@
</span><span class="cx">         return elementIsSpanOrElementEquivalent; // span, b, etc... without any attributes
</span><span class="cx"> 
</span><span class="cx">     unsigned matchedAttributes = 0;
</span><del>-    const Vector&lt;OwnPtr&lt;HTMLAttributeEquivalent&gt;&gt;&amp; HTMLAttributeEquivalents = htmlAttributeEquivalents();
</del><ins>+    const Vector&lt;std::unique_ptr&lt;HTMLAttributeEquivalent&gt;&gt;&amp; HTMLAttributeEquivalents = htmlAttributeEquivalents();
</ins><span class="cx">     for (size_t i = 0; i &lt; HTMLAttributeEquivalents.size(); ++i) {
</span><span class="cx">         if (HTMLAttributeEquivalents[i]-&gt;matches(element) &amp;&amp; HTMLAttributeEquivalents[i]-&gt;attributeName() != HTMLNames::dirAttr)
</span><span class="cx">             matchedAttributes++;
</span><span class="lines">@@ -1020,13 +998,13 @@
</span><span class="cx">     styleFromRules-&gt;m_mutableStyle = extractEditingProperties(styleFromRules-&gt;m_mutableStyle.get(), propertiesToInclude);
</span><span class="cx">     mergeStyle(styleFromRules-&gt;m_mutableStyle.get(), mode);
</span><span class="cx"> 
</span><del>-    const Vector&lt;OwnPtr&lt;HTMLElementEquivalent&gt;&gt;&amp; elementEquivalents = htmlElementEquivalents();
</del><ins>+    const Vector&lt;std::unique_ptr&lt;HTMLElementEquivalent&gt;&gt;&amp; elementEquivalents = htmlElementEquivalents();
</ins><span class="cx">     for (size_t i = 0; i &lt; elementEquivalents.size(); ++i) {
</span><span class="cx">         if (elementMatchesAndPropertyIsNotInInlineStyleDecl(elementEquivalents[i].get(), element, mode, m_mutableStyle.get()))
</span><span class="cx">             elementEquivalents[i]-&gt;addToStyle(element, this);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    const Vector&lt;OwnPtr&lt;HTMLAttributeEquivalent&gt;&gt;&amp; attributeEquivalents = htmlAttributeEquivalents();
</del><ins>+    const Vector&lt;std::unique_ptr&lt;HTMLAttributeEquivalent&gt;&gt;&amp; attributeEquivalents = htmlAttributeEquivalents();
</ins><span class="cx">     for (size_t i = 0; i &lt; attributeEquivalents.size(); ++i) {
</span><span class="cx">         if (attributeEquivalents[i]-&gt;attributeName() == HTMLNames::dirAttr)
</span><span class="cx">             continue; // We don't want to include directionality
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.cpp (165177 => 165178)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.cpp        2014-03-06 09:02:33 UTC (rev 165177)
+++ trunk/Source/WebCore/editing/Editor.cpp        2014-03-06 09:04:38 UTC (rev 165178)
</span><span class="lines">@@ -1135,15 +1135,15 @@
</span><span class="cx"> Editor::Editor(Frame&amp; frame)
</span><span class="cx">     : m_frame(frame)
</span><span class="cx"> #if ENABLE(DELETION_UI)
</span><del>-    , m_deleteButtonController(adoptPtr(new DeleteButtonController(frame)))
</del><ins>+    , m_deleteButtonController(std::make_unique&lt;DeleteButtonController&gt;(frame))
</ins><span class="cx"> #endif
</span><span class="cx">     , m_ignoreCompositionSelectionChange(false)
</span><span class="cx">     , m_shouldStartNewKillRingSequence(false)
</span><span class="cx">     // This is off by default, since most editors want this behavior (this matches IE but not FF).
</span><span class="cx">     , m_shouldStyleWithCSS(false)
</span><del>-    , m_killRing(adoptPtr(new KillRing))
-    , m_spellChecker(adoptPtr(new SpellChecker(frame)))
-    , m_alternativeTextController(adoptPtr(new AlternativeTextController(frame)))
</del><ins>+    , m_killRing(std::make_unique&lt;KillRing&gt;())
+    , m_spellChecker(std::make_unique&lt;SpellChecker&gt;(frame))
+    , m_alternativeTextController(std::make_unique&lt;AlternativeTextController&gt;(frame))
</ins><span class="cx">     , m_areMarkedTextMatchesHighlighted(false)
</span><span class="cx">     , m_defaultParagraphSeparator(EditorParagraphSeparatorIsDiv)
</span><span class="cx">     , m_overwriteModeEnabled(false)
</span><span class="lines">@@ -1165,7 +1165,7 @@
</span><span class="cx">     m_defaultParagraphSeparator = EditorParagraphSeparatorIsDiv;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DELETION_UI)
</span><del>-    m_deleteButtonController = adoptPtr(new DeleteButtonController(m_frame));
</del><ins>+    m_deleteButtonController = std::make_unique&lt;DeleteButtonController&gt;(m_frame);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.h (165177 => 165178)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.h        2014-03-06 09:02:33 UTC (rev 165177)
+++ trunk/Source/WebCore/editing/Editor.h        2014-03-06 09:04:38 UTC (rev 165178)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #include &quot;TextIteratorBehavior.h&quot;
</span><span class="cx"> #include &quot;VisibleSelection.h&quot;
</span><span class="cx"> #include &quot;WritingDirection.h&quot;
</span><ins>+#include &lt;memory&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> OBJC_CLASS NSAttributedString;
</span><span class="lines">@@ -91,7 +92,7 @@
</span><span class="cx"> 
</span><span class="cx"> class Editor {
</span><span class="cx"> public:
</span><del>-    static PassOwnPtr&lt;Editor&gt; create(Frame&amp; frame) { return adoptPtr(new Editor(frame)); }
</del><ins>+    explicit Editor(Frame&amp;);
</ins><span class="cx">     ~Editor();
</span><span class="cx"> 
</span><span class="cx">     EditorClient* client() const;
</span><span class="lines">@@ -443,8 +444,6 @@
</span><span class="cx"> private:
</span><span class="cx">     class WebContentReader;
</span><span class="cx"> 
</span><del>-    explicit Editor(Frame&amp;);
-
</del><span class="cx">     Document&amp; document() const;
</span><span class="cx"> 
</span><span class="cx">     bool canDeleteRange(Range*) const;
</span><span class="lines">@@ -481,7 +480,7 @@
</span><span class="cx"> 
</span><span class="cx">     Frame&amp; m_frame;
</span><span class="cx"> #if ENABLE(DELETION_UI)
</span><del>-    OwnPtr&lt;DeleteButtonController&gt; m_deleteButtonController;
</del><ins>+    std::unique_ptr&lt;DeleteButtonController&gt; m_deleteButtonController;
</ins><span class="cx"> #endif
</span><span class="cx">     RefPtr&lt;CompositeEditCommand&gt; m_lastEditCommand;
</span><span class="cx">     RefPtr&lt;Text&gt; m_compositionNode;
</span><span class="lines">@@ -491,9 +490,9 @@
</span><span class="cx">     bool m_ignoreCompositionSelectionChange;
</span><span class="cx">     bool m_shouldStartNewKillRingSequence;
</span><span class="cx">     bool m_shouldStyleWithCSS;
</span><del>-    const OwnPtr&lt;KillRing&gt; m_killRing;
-    const OwnPtr&lt;SpellChecker&gt; m_spellChecker;
-    const OwnPtr&lt;AlternativeTextController&gt; m_alternativeTextController;
</del><ins>+    const std::unique_ptr&lt;KillRing&gt; m_killRing;
+    const std::unique_ptr&lt;SpellChecker&gt; m_spellChecker;
+    const std::unique_ptr&lt;AlternativeTextController&gt; m_alternativeTextController;
</ins><span class="cx">     VisibleSelection m_mark;
</span><span class="cx">     bool m_areMarkedTextMatchesHighlighted;
</span><span class="cx">     EditorParagraphSeparator m_defaultParagraphSeparator;
</span></span></pre></div>
<a id="trunkSourceWebCorepageFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Frame.cpp (165177 => 165178)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Frame.cpp        2014-03-06 09:02:33 UTC (rev 165177)
+++ trunk/Source/WebCore/page/Frame.cpp        2014-03-06 09:04:38 UTC (rev 165178)
</span><span class="lines">@@ -162,7 +162,7 @@
</span><span class="cx">     , m_navigationScheduler(*this)
</span><span class="cx">     , m_ownerElement(ownerElement)
</span><span class="cx">     , m_script(std::make_unique&lt;ScriptController&gt;(*this))
</span><del>-    , m_editor(Editor::create(*this))
</del><ins>+    , m_editor(std::make_unique&lt;Editor&gt;(*this))
</ins><span class="cx">     , m_selection(adoptPtr(new FrameSelection(this)))
</span><span class="cx">     , m_eventHandler(adoptPtr(new EventHandler(*this)))
</span><span class="cx">     , m_animationController(std::make_unique&lt;AnimationController&gt;(*this))
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Frame.h (165177 => 165178)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Frame.h        2014-03-06 09:02:33 UTC (rev 165177)
+++ trunk/Source/WebCore/page/Frame.h        2014-03-06 09:04:38 UTC (rev 165178)
</span><span class="lines">@@ -298,7 +298,7 @@
</span><span class="cx">         RefPtr&lt;Document&gt; m_doc;
</span><span class="cx"> 
</span><span class="cx">         const std::unique_ptr&lt;ScriptController&gt; m_script;
</span><del>-        const OwnPtr&lt;Editor&gt; m_editor;
</del><ins>+        const std::unique_ptr&lt;Editor&gt; m_editor;
</ins><span class="cx">         const OwnPtr&lt;FrameSelection&gt; m_selection;
</span><span class="cx">         const OwnPtr&lt;EventHandler&gt; m_eventHandler;
</span><span class="cx">         const std::unique_ptr&lt;AnimationController&gt; m_animationController;
</span></span></pre>
</div>
</div>

</body>
</html>