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

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

Issue 45173005: Move *Tags / *Attrs arrays from .data to .data.rel.ro section (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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
« no previous file with comments | « Source/core/html/parser/HTMLIdentifier.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLTreeBuilder.cpp
diff --git a/Source/core/html/parser/HTMLTreeBuilder.cpp b/Source/core/html/parser/HTMLTreeBuilder.cpp
index 84100a88e31f8edc5bbe4f2fb27c248c98bac633..4caa70c1562c17a8bbe5f2ed4290b75bdc9ad1ba 100644
--- a/Source/core/html/parser/HTMLTreeBuilder.cpp
+++ b/Source/core/html/parser/HTMLTreeBuilder.cpp
@@ -546,7 +546,7 @@ void HTMLTreeBuilder::processCloseWhenNestedTag(AtomicHTMLToken* token)
typedef HashMap<AtomicString, QualifiedName> PrefixedNameToQualifiedNameMap;
-static void mapLoweredLocalNameToName(PrefixedNameToQualifiedNameMap* map, QualifiedName** names, size_t length)
+static void mapLoweredLocalNameToName(PrefixedNameToQualifiedNameMap* map, const QualifiedName* const* names, size_t length)
{
for (size_t i = 0; i < length; ++i) {
const QualifiedName& name = *names[i];
@@ -562,7 +562,7 @@ static void adjustSVGTagNameCase(AtomicHTMLToken* token)
static PrefixedNameToQualifiedNameMap* caseMap = 0;
if (!caseMap) {
caseMap = new PrefixedNameToQualifiedNameMap;
- QualifiedName** svgTags = SVGNames::getSVGTags();
+ const QualifiedName* const* svgTags = SVGNames::getSVGTags();
mapLoweredLocalNameToName(caseMap, svgTags, SVGNames::SVGTagsCount);
}
@@ -572,13 +572,13 @@ static void adjustSVGTagNameCase(AtomicHTMLToken* token)
token->setName(casedName.localName());
}
-template<QualifiedName** getAttrs(), unsigned length>
+template<const QualifiedName* const* getAttrs(), unsigned length>
static void adjustAttributes(AtomicHTMLToken* token)
{
static PrefixedNameToQualifiedNameMap* caseMap = 0;
if (!caseMap) {
caseMap = new PrefixedNameToQualifiedNameMap;
- QualifiedName** attrs = getAttrs();
+ const QualifiedName* const* attrs = getAttrs();
mapLoweredLocalNameToName(caseMap, attrs, length);
}
@@ -600,10 +600,10 @@ static void adjustMathMLAttributes(AtomicHTMLToken* token)
adjustAttributes<MathMLNames::getMathMLAttrs, MathMLNames::MathMLAttrsCount>(token);
}
-static void addNamesWithPrefix(PrefixedNameToQualifiedNameMap* map, const AtomicString& prefix, QualifiedName** names, size_t length)
+static void addNamesWithPrefix(PrefixedNameToQualifiedNameMap* map, const AtomicString& prefix, const QualifiedName* const* names, size_t length)
{
for (size_t i = 0; i < length; ++i) {
- QualifiedName* name = names[i];
+ const QualifiedName* name = names[i];
const AtomicString& localName = name->localName();
AtomicString prefixColonLocalName = prefix + ':' + localName;
QualifiedName nameWithPrefix(prefix, localName, name->namespaceURI());
@@ -617,7 +617,7 @@ static void adjustForeignAttributes(AtomicHTMLToken* token)
if (!map) {
map = new PrefixedNameToQualifiedNameMap;
- QualifiedName** attrs = XLinkNames::getXLinkAttrs();
+ const QualifiedName* const* attrs = XLinkNames::getXLinkAttrs();
addNamesWithPrefix(map, xlinkAtom, attrs, XLinkNames::XLinkAttrsCount);
attrs = XMLNames::getXMLAttrs();
« no previous file with comments | « Source/core/html/parser/HTMLIdentifier.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698