| Index: Source/core/css/CSSLocalNameToLowerMaps.cpp
|
| diff --git a/Source/core/css/CSSLocalNameToLowerMaps.cpp b/Source/core/css/CSSLocalNameToLowerMaps.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0687ec7f57d4bfface01141b1cb3af415d22e3a7
|
| --- /dev/null
|
| +++ b/Source/core/css/CSSLocalNameToLowerMaps.cpp
|
| @@ -0,0 +1,38 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "config.h"
|
| +#include "core/css/CSSLocalNameToLowerMaps.h"
|
| +
|
| +#include "core/SVGNames.h"
|
| +
|
| +namespace blink {
|
| +
|
| +namespace CSSLocalNameToLowerMaps {
|
| +
|
| +HashMap<AtomicString, AtomicString>* s_elementToLowerMap = nullptr;
|
| +HashMap<AtomicString, AtomicString>* s_attributeToLowerMap = nullptr;
|
| +
|
| +void buildElementToLowerMap()
|
| +{
|
| + ASSERT(!s_elementToLowerMap);
|
| + s_elementToLowerMap = new HashMap<AtomicString, AtomicString>;
|
| + OwnPtr<const SVGQualifiedName*[]> svgTags = SVGNames::getSVGTags();
|
| + for (size_t i = 0; i < SVGNames::SVGTagsCount; ++i) {
|
| + AtomicString localName = svgTags[i]->localName();
|
| + AtomicString localNameLower = localName.lower();
|
| + if (localName != localNameLower)
|
| + s_elementToLowerMap->set(localName, localNameLower);
|
| + }
|
| +}
|
| +
|
| +void buildAttributeToLowerMap()
|
| +{
|
| + ASSERT(!s_attributeToLowerMap);
|
| + s_attributeToLowerMap = new HashMap<AtomicString, AtomicString>;
|
| +}
|
| +
|
| +} // namespace CSSElementNameMap
|
| +
|
| +} // namespace blink
|
|
|