diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2020-01-18 17:17:17 -0500 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2020-01-26 15:50:37 -0500 |
commit | 76a4af34064296177e11a0d3887a5763a6c3a572 (patch) | |
tree | 5dbda446420569acd00e120e34db8e4320ee4336 /parser/html/nsHtml5AttributeName.cpp | |
parent | 5d4200f56df55774dcc94df431cc67fe65b674ed (diff) | |
download | UXP-76a4af34064296177e11a0d3887a5763a6c3a572.tar UXP-76a4af34064296177e11a0d3887a5763a6c3a572.tar.gz UXP-76a4af34064296177e11a0d3887a5763a6c3a572.tar.lz UXP-76a4af34064296177e11a0d3887a5763a6c3a572.tar.xz UXP-76a4af34064296177e11a0d3887a5763a6c3a572.zip |
Bug 1358037 - Inline the methods of nsHtml5ElementName and nsHtml5AttributeName.
HTML Regen.
Tag UXP Issue #1344
Diffstat (limited to 'parser/html/nsHtml5AttributeName.cpp')
-rw-r--r-- | parser/html/nsHtml5AttributeName.cpp | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/parser/html/nsHtml5AttributeName.cpp b/parser/html/nsHtml5AttributeName.cpp index 1947972b8..f9819f6f5 100644 --- a/parser/html/nsHtml5AttributeName.cpp +++ b/parser/html/nsHtml5AttributeName.cpp @@ -43,11 +43,12 @@ #include "nsIUnicodeDecoder.h" #include "nsHtml5Macros.h" #include "nsIContentHandle.h" +#include "nsHtml5Portability.h" +#include "nsHtml5ElementName.h" #include "nsHtml5Tokenizer.h" #include "nsHtml5TreeBuilder.h" #include "nsHtml5MetaScanner.h" -#include "nsHtml5ElementName.h" #include "nsHtml5StackNode.h" #include "nsHtml5UTF16Buffer.h" #include "nsHtml5StateSnapshot.h" @@ -103,22 +104,6 @@ nsHtml5AttributeName::SAME_LOCAL(nsIAtom* name) return arr; } -nsHtml5AttributeName* -nsHtml5AttributeName::nameByBuffer(char16_t* buf, int32_t offset, int32_t length, nsHtml5AtomTable* interner) -{ - uint32_t hash = nsHtml5AttributeName::bufToHash(buf, length); - int32_t index = nsHtml5AttributeName::ATTRIBUTE_HASHES.binarySearch(hash); - if (index < 0) { - return nullptr; - } - nsHtml5AttributeName* attributeName = nsHtml5AttributeName::ATTRIBUTE_NAMES[index]; - nsIAtom* name = attributeName->getLocal(NS_HTML5ATTRIBUTE_NAME_HTML); - if (!nsHtml5Portability::localEqualsBuffer(name, buf, offset, length)) { - return nullptr; - } - return attributeName; -} - nsHtml5AttributeName::nsHtml5AttributeName(int32_t* uri, nsIAtom** local, nsIAtom** prefix) : uri(uri), @@ -139,21 +124,6 @@ nsHtml5AttributeName::nsHtml5AttributeName() MOZ_COUNT_CTOR(nsHtml5AttributeName); } -bool -nsHtml5AttributeName::isInterned() -{ - return !custom; -} - -void -nsHtml5AttributeName::setNameForNonInterned(nsIAtom* name) -{ - MOZ_ASSERT(custom); - local[0] = name; - local[1] = name; - local[2] = name; -} - nsHtml5AttributeName* nsHtml5AttributeName::createAttributeName(nsIAtom* name) { @@ -188,7 +158,7 @@ nsHtml5AttributeName::getPrefix(int32_t mode) bool nsHtml5AttributeName::equalsAnother(nsHtml5AttributeName* another) { - return this->getLocal(NS_HTML5ATTRIBUTE_NAME_HTML) == another->getLocal(NS_HTML5ATTRIBUTE_NAME_HTML); + return this->getLocal(nsHtml5AttributeName::HTML) == another->getLocal(nsHtml5AttributeName::HTML); } nsHtml5AttributeName* nsHtml5AttributeName::ATTR_ALT = nullptr; |