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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 8ef2234ecf6d917f8a31b2bed8ecb40f5fdb5aff..b8894f1dace53ca9bdbe97d039dc8d987c9ed70f 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
@@ -46,7 +46,6 @@
#include "core/html/parser/HTMLTokenizer.h"
#include "platform/text/PlatformLocale.h"
#include "wtf/text/CharacterNames.h"
-#include <memory>
namespace blink {
@@ -529,7 +528,7 @@ static void adjustSVGTagNameCase(AtomicHTMLToken* token)
static PrefixedNameToQualifiedNameMap* caseMap = 0;
if (!caseMap) {
caseMap = new PrefixedNameToQualifiedNameMap;
- std::unique_ptr<const SVGQualifiedName*[]> svgTags = SVGNames::getSVGTags();
+ OwnPtr<const SVGQualifiedName*[]> svgTags = SVGNames::getSVGTags();
mapLoweredLocalNameToName(caseMap, svgTags.get(), SVGNames::SVGTagsCount);
}
@@ -539,13 +538,13 @@ static void adjustSVGTagNameCase(AtomicHTMLToken* token)
token->setName(casedName.localName());
}
-template<std::unique_ptr<const QualifiedName*[]> getAttrs(), unsigned length>
+template<PassOwnPtr<const QualifiedName*[]> getAttrs(), unsigned length>
static void adjustAttributes(AtomicHTMLToken* token)
{
static PrefixedNameToQualifiedNameMap* caseMap = 0;
if (!caseMap) {
caseMap = new PrefixedNameToQualifiedNameMap;
- std::unique_ptr<const QualifiedName*[]> attrs = getAttrs();
+ OwnPtr<const QualifiedName*[]> attrs = getAttrs();
mapLoweredLocalNameToName(caseMap, attrs.get(), length);
}
@@ -584,10 +583,10 @@ static void adjustForeignAttributes(AtomicHTMLToken* token)
if (!map) {
map = new PrefixedNameToQualifiedNameMap;
- std::unique_ptr<const QualifiedName*[]> attrs = XLinkNames::getXLinkAttrs();
+ OwnPtr<const QualifiedName*[]> attrs = XLinkNames::getXLinkAttrs();
addNamesWithPrefix(map, xlinkAtom, attrs.get(), XLinkNames::XLinkAttrsCount);
- std::unique_ptr<const QualifiedName*[]> xmlAttrs = XMLNames::getXMLAttrs();
+ OwnPtr<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