mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-02 13:58:40 +09:00
Bug 1358037 - Inline the methods of nsHtml5ElementName and nsHtml5AttributeName.
HTML Regen. Tag UXP Issue #1344
This commit is contained in:
parent
39b7466633
commit
f4b7430967
18 changed files with 2256 additions and 2048 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue