<!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 <zdobersek@igalia.com>
</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 <zdobersek@igalia.com>
+
</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<HTMLElementEquivalent> create(CSSPropertyID propertyID, CSSValueID primitiveValue, const QualifiedName& tagName)
- {
- return adoptPtr(new HTMLElementEquivalent(propertyID, primitiveValue, tagName));
- }
</del><ins>+ HTMLElementEquivalent(CSSPropertyID, CSSValueID primitiveValue, const QualifiedName& 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->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& tagName);
</span><del>- HTMLElementEquivalent(CSSPropertyID, CSSValueID primitiveValue, const QualifiedName& tagName);
</del><span class="cx"> const CSSPropertyID m_propertyID;
</span><span class="cx"> const RefPtr<CSSPrimitiveValue> 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<HTMLElementEquivalent> create(CSSValueID primitiveValue, const QualifiedName& tagName)
- {
- return adoptPtr(new HTMLTextDecorationEquivalent(primitiveValue, tagName));
- }
</del><ins>+ HTMLTextDecorationEquivalent(CSSValueID primitiveValue, const QualifiedName& 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& tagName);
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> HTMLTextDecorationEquivalent::HTMLTextDecorationEquivalent(CSSValueID primitiveValue, const QualifiedName& 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<HTMLAttributeEquivalent> create(CSSPropertyID propertyID, const QualifiedName& tagName, const QualifiedName& attrName)
- {
- return adoptPtr(new HTMLAttributeEquivalent(propertyID, tagName, attrName));
- }
- static PassOwnPtr<HTMLAttributeEquivalent> create(CSSPropertyID propertyID, const QualifiedName& attrName)
- {
- return adoptPtr(new HTMLAttributeEquivalent(propertyID, attrName));
- }
</del><ins>+ HTMLAttributeEquivalent(CSSPropertyID, const QualifiedName& tagName, const QualifiedName& attrName);
+ HTMLAttributeEquivalent(CSSPropertyID, const QualifiedName& attrName);
</ins><span class="cx">
</span><span class="cx"> bool matches(const Element* elem) const { return HTMLElementEquivalent::matches(elem) && elem->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& attributeName() const { return m_attrName; }
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- HTMLAttributeEquivalent(CSSPropertyID, const QualifiedName& tagName, const QualifiedName& attrName);
- HTMLAttributeEquivalent(CSSPropertyID, const QualifiedName& attrName);
</del><span class="cx"> const QualifiedName& 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<HTMLFontSizeEquivalent> create()
- {
- return adoptPtr(new HTMLFontSizeEquivalent());
- }
- virtual PassRefPtr<CSSValue> attributeValueAsCSSValue(Element*) const;
-
-private:
</del><span class="cx"> HTMLFontSizeEquivalent();
</span><ins>+
+ virtual PassRefPtr<CSSValue> 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 && !conflictingProperties->isEmpty();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static const Vector<OwnPtr<HTMLElementEquivalent>>& htmlElementEquivalents()
</del><ins>+static const Vector<std::unique_ptr<HTMLElementEquivalent>>& htmlElementEquivalents()
</ins><span class="cx"> {
</span><del>- DEFINE_STATIC_LOCAL(Vector<OwnPtr<HTMLElementEquivalent>>, HTMLElementEquivalents, ());
</del><ins>+ DEFINE_STATIC_LOCAL(Vector<std::unique_ptr<HTMLElementEquivalent>>, 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<HTMLElementEquivalent>(CSSPropertyFontWeight, CSSValueBold, HTMLNames::bTag));
+ HTMLElementEquivalents.append(std::make_unique<HTMLElementEquivalent>(CSSPropertyFontWeight, CSSValueBold, HTMLNames::strongTag));
+ HTMLElementEquivalents.append(std::make_unique<HTMLElementEquivalent>(CSSPropertyVerticalAlign, CSSValueSub, HTMLNames::subTag));
+ HTMLElementEquivalents.append(std::make_unique<HTMLElementEquivalent>(CSSPropertyVerticalAlign, CSSValueSuper, HTMLNames::supTag));
+ HTMLElementEquivalents.append(std::make_unique<HTMLElementEquivalent>(CSSPropertyFontStyle, CSSValueItalic, HTMLNames::iTag));
+ HTMLElementEquivalents.append(std::make_unique<HTMLElementEquivalent>(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<HTMLTextDecorationEquivalent>(CSSValueUnderline, HTMLNames::uTag));
+ HTMLElementEquivalents.append(std::make_unique<HTMLTextDecorationEquivalent>(CSSValueLineThrough, HTMLNames::sTag));
+ HTMLElementEquivalents.append(std::make_unique<HTMLTextDecorationEquivalent>(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<OwnPtr<HTMLElementEquivalent>>& HTMLElementEquivalents = htmlElementEquivalents();
</del><ins>+ const Vector<std::unique_ptr<HTMLElementEquivalent>>& HTMLElementEquivalents = htmlElementEquivalents();
</ins><span class="cx"> for (size_t i = 0; i < HTMLElementEquivalents.size(); ++i) {
</span><span class="cx"> const HTMLElementEquivalent* equivalent = HTMLElementEquivalents[i].get();
</span><span class="cx"> if (equivalent->matches(element) && equivalent->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<OwnPtr<HTMLAttributeEquivalent>>& htmlAttributeEquivalents()
</del><ins>+static const Vector<std::unique_ptr<HTMLAttributeEquivalent>>& htmlAttributeEquivalents()
</ins><span class="cx"> {
</span><del>- DEFINE_STATIC_LOCAL(Vector<OwnPtr<HTMLAttributeEquivalent>>, HTMLAttributeEquivalents, ());
</del><ins>+ DEFINE_STATIC_LOCAL(Vector<std::unique_ptr<HTMLAttributeEquivalent>>, 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<HTMLAttributeEquivalent>(CSSPropertyColor, HTMLNames::fontTag, HTMLNames::colorAttr));
+ HTMLAttributeEquivalents.append(std::make_unique<HTMLAttributeEquivalent>(CSSPropertyFontFamily, HTMLNames::fontTag, HTMLNames::faceAttr));
+ HTMLAttributeEquivalents.append(std::make_unique<HTMLFontSizeEquivalent>());
</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<HTMLAttributeEquivalent>(CSSPropertyDirection, HTMLNames::dirAttr));
+ HTMLAttributeEquivalents.append(std::make_unique<HTMLAttributeEquivalent>(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<OwnPtr<HTMLAttributeEquivalent>>& HTMLAttributeEquivalents = htmlAttributeEquivalents();
</del><ins>+ const Vector<std::unique_ptr<HTMLAttributeEquivalent>>& HTMLAttributeEquivalents = htmlAttributeEquivalents();
</ins><span class="cx"> for (size_t i = 0; i < HTMLAttributeEquivalents.size(); ++i) {
</span><span class="cx"> if (HTMLAttributeEquivalents[i]->matches(element) && HTMLAttributeEquivalents[i]->propertyExistsInStyle(m_mutableStyle.get())
</span><span class="cx"> && !HTMLAttributeEquivalents[i]->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<OwnPtr<HTMLAttributeEquivalent>>& HTMLAttributeEquivalents = htmlAttributeEquivalents();
</del><ins>+ const Vector<std::unique_ptr<HTMLAttributeEquivalent>>& HTMLAttributeEquivalents = htmlAttributeEquivalents();
</ins><span class="cx"> bool removed = false;
</span><span class="cx"> for (size_t i = 0; i < 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->hasTagName(HTMLNames::spanTag))
</span><span class="cx"> elementIsSpanOrElementEquivalent = true;
</span><span class="cx"> else {
</span><del>- const Vector<OwnPtr<HTMLElementEquivalent>>& HTMLElementEquivalents = htmlElementEquivalents();
</del><ins>+ const Vector<std::unique_ptr<HTMLElementEquivalent>>& HTMLElementEquivalents = htmlElementEquivalents();
</ins><span class="cx"> size_t i;
</span><span class="cx"> for (i = 0; i < HTMLElementEquivalents.size(); ++i) {
</span><span class="cx"> if (HTMLElementEquivalents[i]->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<OwnPtr<HTMLAttributeEquivalent>>& HTMLAttributeEquivalents = htmlAttributeEquivalents();
</del><ins>+ const Vector<std::unique_ptr<HTMLAttributeEquivalent>>& HTMLAttributeEquivalents = htmlAttributeEquivalents();
</ins><span class="cx"> for (size_t i = 0; i < HTMLAttributeEquivalents.size(); ++i) {
</span><span class="cx"> if (HTMLAttributeEquivalents[i]->matches(element) && HTMLAttributeEquivalents[i]->attributeName() != HTMLNames::dirAttr)
</span><span class="cx"> matchedAttributes++;
</span><span class="lines">@@ -1020,13 +998,13 @@
</span><span class="cx"> styleFromRules->m_mutableStyle = extractEditingProperties(styleFromRules->m_mutableStyle.get(), propertiesToInclude);
</span><span class="cx"> mergeStyle(styleFromRules->m_mutableStyle.get(), mode);
</span><span class="cx">
</span><del>- const Vector<OwnPtr<HTMLElementEquivalent>>& elementEquivalents = htmlElementEquivalents();
</del><ins>+ const Vector<std::unique_ptr<HTMLElementEquivalent>>& elementEquivalents = htmlElementEquivalents();
</ins><span class="cx"> for (size_t i = 0; i < elementEquivalents.size(); ++i) {
</span><span class="cx"> if (elementMatchesAndPropertyIsNotInInlineStyleDecl(elementEquivalents[i].get(), element, mode, m_mutableStyle.get()))
</span><span class="cx"> elementEquivalents[i]->addToStyle(element, this);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- const Vector<OwnPtr<HTMLAttributeEquivalent>>& attributeEquivalents = htmlAttributeEquivalents();
</del><ins>+ const Vector<std::unique_ptr<HTMLAttributeEquivalent>>& attributeEquivalents = htmlAttributeEquivalents();
</ins><span class="cx"> for (size_t i = 0; i < attributeEquivalents.size(); ++i) {
</span><span class="cx"> if (attributeEquivalents[i]->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& 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<DeleteButtonController>(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<KillRing>())
+ , m_spellChecker(std::make_unique<SpellChecker>(frame))
+ , m_alternativeTextController(std::make_unique<AlternativeTextController>(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<DeleteButtonController>(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 "TextIteratorBehavior.h"
</span><span class="cx"> #include "VisibleSelection.h"
</span><span class="cx"> #include "WritingDirection.h"
</span><ins>+#include <memory>
</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<Editor> create(Frame& frame) { return adoptPtr(new Editor(frame)); }
</del><ins>+ explicit Editor(Frame&);
</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&);
-
</del><span class="cx"> Document& 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& m_frame;
</span><span class="cx"> #if ENABLE(DELETION_UI)
</span><del>- OwnPtr<DeleteButtonController> m_deleteButtonController;
</del><ins>+ std::unique_ptr<DeleteButtonController> m_deleteButtonController;
</ins><span class="cx"> #endif
</span><span class="cx"> RefPtr<CompositeEditCommand> m_lastEditCommand;
</span><span class="cx"> RefPtr<Text> 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<KillRing> m_killRing;
- const OwnPtr<SpellChecker> m_spellChecker;
- const OwnPtr<AlternativeTextController> m_alternativeTextController;
</del><ins>+ const std::unique_ptr<KillRing> m_killRing;
+ const std::unique_ptr<SpellChecker> m_spellChecker;
+ const std::unique_ptr<AlternativeTextController> 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<ScriptController>(*this))
</span><del>- , m_editor(Editor::create(*this))
</del><ins>+ , m_editor(std::make_unique<Editor>(*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<AnimationController>(*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<Document> m_doc;
</span><span class="cx">
</span><span class="cx"> const std::unique_ptr<ScriptController> m_script;
</span><del>- const OwnPtr<Editor> m_editor;
</del><ins>+ const std::unique_ptr<Editor> m_editor;
</ins><span class="cx"> const OwnPtr<FrameSelection> m_selection;
</span><span class="cx"> const OwnPtr<EventHandler> m_eventHandler;
</span><span class="cx"> const std::unique_ptr<AnimationController> m_animationController;
</span></span></pre>
</div>
</div>
</body>
</html>