Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(718)

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
index b8894f1dace53ca9bdbe97d039dc8d987c9ed70f..8ef2234ecf6d917f8a31b2bed8ecb40f5fdb5aff 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
@@ -46,6 +46,7 @@
#include "core/html/parser/HTMLTokenizer.h"
#include "platform/text/PlatformLocale.h"
#include "wtf/text/CharacterNames.h"
+#include <memory>
namespace blink {
@@ -528,7 +529,7 @@ static void adjustSVGTagNameCase(AtomicHTMLToken* token)
static PrefixedNameToQualifiedNameMap* caseMap = 0;
if (!caseMap) {
caseMap = new PrefixedNameToQualifiedNameMap;
- OwnPtr<const SVGQualifiedName*[]> svgTags = SVGNames::getSVGTags();
+ std::unique_ptr<const SVGQualifiedName*[]> svgTags = SVGNames::getSVGTags();
mapLoweredLocalNameToName(caseMap, svgTags.get(), SVGNames::SVGTagsCount);
}
@@ -538,13 +539,13 @@ static void adjustSVGTagNameCase(AtomicHTMLToken* token)
token->setName(casedName.localName());
}
-template<PassOwnPtr<const QualifiedName*[]> getAttrs(), unsigned length>
+template<std::unique_ptr<const QualifiedName*[]> getAttrs(), unsigned length>
static void adjustAttributes(AtomicHTMLToken* token)
{
static PrefixedNameToQualifiedNameMap* caseMap = 0;
if (!caseMap) {
caseMap = new PrefixedNameToQualifiedNameMap;
- OwnPtr<const QualifiedName*[]> attrs = getAttrs();
+ std::unique_ptr<const QualifiedName*[]> attrs = getAttrs();
mapLoweredLocalNameToName(caseMap, attrs.get(), length);
}
@@ -583,10 +584,10 @@ static void adjustForeignAttributes(AtomicHTMLToken* token)
if (!map) {
map = new PrefixedNameToQualifiedNameMap;
- OwnPtr<const QualifiedName*[]> attrs = XLinkNames::getXLinkAttrs();
+ std::unique_ptr<const QualifiedName*[]> attrs = XLinkNames::getXLinkAttrs();
addNamesWithPrefix(map, xlinkAtom, attrs.get(), XLinkNames::XLinkAttrsCount);
- OwnPtr<const QualifiedName*[]> xmlAttrs = XMLNames::getXMLAttrs();
+ std::unique_ptr<const QualifiedName*[]> xmlAttrs = XMLNames::getXMLAttrs();
addNamesWithPrefix(map, xmlAtom, xmlAttrs.get(), XMLNames::XMLAttrsCount);
map->add(WTF::xmlnsAtom, XMLNSNames::xmlnsAttr);

Powered by Google App Engine
This is Rietveld 408576698