mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Regenerate nsHtml5*.cpp files from java htmlparser sources
This commit is contained in:
parent
0add893f66
commit
4baeeaa8ec
19 changed files with 100 additions and 132 deletions
|
|
@ -1,7 +1,8 @@
|
|||
/*
|
||||
* Copyright (c) 2007 Henri Sivonen
|
||||
* Copyright (c) 2008-2011 Mozilla Foundation
|
||||
* Copyright (c) 2019 Moonchild Productions
|
||||
* Copyright (c) 2018-2020 Moonchild Productions
|
||||
* Copyright (c) 2020 Binary Outcast
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -59,11 +60,11 @@
|
|||
nsHtml5HtmlAttributes* nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES = nullptr;
|
||||
|
||||
nsHtml5HtmlAttributes::nsHtml5HtmlAttributes(int32_t mode)
|
||||
: mode(mode)
|
||||
, length(0)
|
||||
, names(jArray<nsHtml5AttributeName*, int32_t>::newJArray(8))
|
||||
, values(jArray<nsHtml5String, int32_t>::newJArray(8))
|
||||
, lines(jArray<int32_t, int32_t>::newJArray(8))
|
||||
: mode(mode),
|
||||
length(0),
|
||||
names(jArray<nsHtml5AttributeName*,int32_t>::newJArray(8)),
|
||||
values(jArray<nsHtml5String,int32_t>::newJArray(8)),
|
||||
lines(jArray<int32_t,int32_t>::newJArray(8))
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsHtml5HtmlAttributes);
|
||||
}
|
||||
|
|
@ -146,17 +147,14 @@ nsHtml5HtmlAttributes::getLineNoBoundsCheck(int32_t index)
|
|||
}
|
||||
|
||||
void
|
||||
nsHtml5HtmlAttributes::addAttribute(nsHtml5AttributeName* name,
|
||||
nsHtml5String value,
|
||||
int32_t line)
|
||||
nsHtml5HtmlAttributes::addAttribute(nsHtml5AttributeName* name, nsHtml5String value, int32_t line)
|
||||
{
|
||||
if (names.length == length) {
|
||||
int32_t newLen = length << 1;
|
||||
jArray<nsHtml5AttributeName*,int32_t> newNames = jArray<nsHtml5AttributeName*,int32_t>::newJArray(newLen);
|
||||
nsHtml5ArrayCopy::arraycopy(names, newNames, names.length);
|
||||
names = newNames;
|
||||
jArray<nsHtml5String, int32_t> newValues =
|
||||
jArray<nsHtml5String, int32_t>::newJArray(newLen);
|
||||
jArray<nsHtml5String,int32_t> newValues = jArray<nsHtml5String,int32_t>::newJArray(newLen);
|
||||
nsHtml5ArrayCopy::arraycopy(values, newValues, values.length);
|
||||
values = newValues;
|
||||
jArray<int32_t,int32_t> newLines = jArray<int32_t,int32_t>::newJArray(newLen);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue