Regenerate nsHtml5*.cpp files from java htmlparser sources

This commit is contained in:
Matt A. Tobin 2020-01-16 07:28:40 -05:00 committed by Roy Tam
commit 4baeeaa8ec
19 changed files with 100 additions and 132 deletions

View file

@ -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);