2009-06-29 02:44:22 +04:00
|
|
|
/*
|
2010-09-28 11:32:31 +04:00
|
|
|
* Copyright (c) 2009-2010 Mozilla Foundation
|
2009-06-29 02:44:22 +04:00
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
|
|
* to deal in the Software without restriction, including without limitation
|
|
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
|
* DEALINGS IN THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* THIS IS A GENERATED FILE. PLEASE DO NOT EDIT.
|
|
|
|
* Please edit StateSnapshot.java instead and regenerate.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define nsHtml5StateSnapshot_cpp__
|
|
|
|
|
|
|
|
#include "nsIAtom.h"
|
2009-09-21 15:43:43 +04:00
|
|
|
#include "nsHtml5AtomTable.h"
|
2017-03-20 15:45:15 +03:00
|
|
|
#include "nsHtml5String.h"
|
2014-02-28 03:04:46 +04:00
|
|
|
#include "nsNameSpaceManager.h"
|
2009-06-29 02:44:22 +04:00
|
|
|
#include "nsIContent.h"
|
2014-03-05 23:38:49 +04:00
|
|
|
#include "nsTraceRefcnt.h"
|
2009-06-29 02:44:22 +04:00
|
|
|
#include "jArray.h"
|
|
|
|
#include "nsHtml5ArrayCopy.h"
|
2010-07-30 14:15:38 +04:00
|
|
|
#include "nsAHtml5TreeBuilderState.h"
|
2017-04-20 11:47:02 +03:00
|
|
|
#include "nsGkAtoms.h"
|
2009-06-29 02:44:22 +04:00
|
|
|
#include "nsHtml5ByteReadable.h"
|
2009-09-18 13:21:47 +04:00
|
|
|
#include "nsIUnicodeDecoder.h"
|
2010-04-19 17:25:13 +04:00
|
|
|
#include "nsHtml5Macros.h"
|
2014-03-05 23:38:49 +04:00
|
|
|
#include "nsIContentHandle.h"
|
2017-04-20 10:34:32 +03:00
|
|
|
#include "nsHtml5Portability.h"
|
2009-06-29 02:44:22 +04:00
|
|
|
|
2017-04-20 10:34:32 +03:00
|
|
|
#include "nsHtml5AttributeName.h"
|
|
|
|
#include "nsHtml5ElementName.h"
|
2009-06-29 02:44:22 +04:00
|
|
|
#include "nsHtml5Tokenizer.h"
|
|
|
|
#include "nsHtml5TreeBuilder.h"
|
|
|
|
#include "nsHtml5MetaScanner.h"
|
|
|
|
#include "nsHtml5StackNode.h"
|
|
|
|
#include "nsHtml5UTF16Buffer.h"
|
|
|
|
#include "nsHtml5Portability.h"
|
|
|
|
|
|
|
|
#include "nsHtml5StateSnapshot.h"
|
|
|
|
|
|
|
|
|
2017-05-09 12:11:28 +03:00
|
|
|
nsHtml5StateSnapshot::nsHtml5StateSnapshot(jArray<nsHtml5StackNode*,int32_t> stack, jArray<nsHtml5StackNode*,int32_t> listOfActiveFormattingElements, jArray<int32_t,int32_t> templateModeStack, nsIContentHandle* formPointer, nsIContentHandle* headPointer, nsIContentHandle* deepTreeSurrogateParent, int32_t mode, int32_t originalMode, bool framesetOk, bool needToDropLF, bool quirks)
|
|
|
|
: stack(stack),
|
2009-06-29 02:44:22 +04:00
|
|
|
listOfActiveFormattingElements(listOfActiveFormattingElements),
|
2013-08-13 01:46:12 +04:00
|
|
|
templateModeStack(templateModeStack),
|
2009-09-21 17:18:20 +04:00
|
|
|
formPointer(formPointer),
|
|
|
|
headPointer(headPointer),
|
2010-09-06 11:41:26 +04:00
|
|
|
deepTreeSurrogateParent(deepTreeSurrogateParent),
|
2009-09-21 17:18:20 +04:00
|
|
|
mode(mode),
|
|
|
|
originalMode(originalMode),
|
2009-12-23 11:31:48 +03:00
|
|
|
framesetOk(framesetOk),
|
2009-09-21 17:18:20 +04:00
|
|
|
needToDropLF(needToDropLF),
|
|
|
|
quirks(quirks)
|
2009-06-29 02:44:22 +04:00
|
|
|
{
|
|
|
|
MOZ_COUNT_CTOR(nsHtml5StateSnapshot);
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
jArray<nsHtml5StackNode*,int32_t>
|
2009-09-21 17:18:20 +04:00
|
|
|
nsHtml5StateSnapshot::getStack()
|
|
|
|
{
|
|
|
|
return stack;
|
|
|
|
}
|
|
|
|
|
2013-08-13 01:46:12 +04:00
|
|
|
jArray<int32_t,int32_t>
|
|
|
|
nsHtml5StateSnapshot::getTemplateModeStack()
|
|
|
|
{
|
|
|
|
return templateModeStack;
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
jArray<nsHtml5StackNode*,int32_t>
|
2009-09-21 17:18:20 +04:00
|
|
|
nsHtml5StateSnapshot::getListOfActiveFormattingElements()
|
|
|
|
{
|
|
|
|
return listOfActiveFormattingElements;
|
|
|
|
}
|
|
|
|
|
2014-03-05 23:38:49 +04:00
|
|
|
nsIContentHandle*
|
2009-09-21 17:18:20 +04:00
|
|
|
nsHtml5StateSnapshot::getFormPointer()
|
|
|
|
{
|
|
|
|
return formPointer;
|
|
|
|
}
|
|
|
|
|
2014-03-05 23:38:49 +04:00
|
|
|
nsIContentHandle*
|
2009-09-21 17:18:20 +04:00
|
|
|
nsHtml5StateSnapshot::getHeadPointer()
|
|
|
|
{
|
|
|
|
return headPointer;
|
|
|
|
}
|
|
|
|
|
2014-03-05 23:38:49 +04:00
|
|
|
nsIContentHandle*
|
2010-09-06 11:41:26 +04:00
|
|
|
nsHtml5StateSnapshot::getDeepTreeSurrogateParent()
|
|
|
|
{
|
|
|
|
return deepTreeSurrogateParent;
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t
|
2009-09-21 17:18:20 +04:00
|
|
|
nsHtml5StateSnapshot::getMode()
|
|
|
|
{
|
|
|
|
return mode;
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t
|
2009-09-21 17:18:20 +04:00
|
|
|
nsHtml5StateSnapshot::getOriginalMode()
|
|
|
|
{
|
|
|
|
return originalMode;
|
|
|
|
}
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool
|
2009-12-23 11:31:48 +03:00
|
|
|
nsHtml5StateSnapshot::isFramesetOk()
|
|
|
|
{
|
|
|
|
return framesetOk;
|
|
|
|
}
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool
|
2009-09-21 17:18:20 +04:00
|
|
|
nsHtml5StateSnapshot::isNeedToDropLF()
|
|
|
|
{
|
|
|
|
return needToDropLF;
|
|
|
|
}
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool
|
2009-09-21 17:18:20 +04:00
|
|
|
nsHtml5StateSnapshot::isQuirks()
|
|
|
|
{
|
|
|
|
return quirks;
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t
|
2010-04-16 14:52:06 +04:00
|
|
|
nsHtml5StateSnapshot::getListOfActiveFormattingElementsLength()
|
2009-09-21 17:18:20 +04:00
|
|
|
{
|
|
|
|
return listOfActiveFormattingElements.length;
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t
|
2009-09-21 17:18:20 +04:00
|
|
|
nsHtml5StateSnapshot::getStackLength()
|
|
|
|
{
|
|
|
|
return stack.length;
|
|
|
|
}
|
|
|
|
|
2013-08-13 01:46:12 +04:00
|
|
|
int32_t
|
|
|
|
nsHtml5StateSnapshot::getTemplateModeStackLength()
|
|
|
|
{
|
|
|
|
return templateModeStack.length;
|
|
|
|
}
|
|
|
|
|
2009-06-29 02:44:22 +04:00
|
|
|
|
|
|
|
nsHtml5StateSnapshot::~nsHtml5StateSnapshot()
|
|
|
|
{
|
|
|
|
MOZ_COUNT_DTOR(nsHtml5StateSnapshot);
|
2012-08-22 19:56:38 +04:00
|
|
|
for (int32_t i = 0; i < stack.length; i++) {
|
2017-05-09 12:11:28 +03:00
|
|
|
stack[i]->release();
|
2009-06-29 02:44:22 +04:00
|
|
|
}
|
2012-08-22 19:56:38 +04:00
|
|
|
for (int32_t i = 0; i < listOfActiveFormattingElements.length; i++) {
|
2010-04-19 17:25:13 +04:00
|
|
|
if (listOfActiveFormattingElements[i]) {
|
2017-05-09 12:11:28 +03:00
|
|
|
listOfActiveFormattingElements[i]->release();
|
2009-06-29 02:44:22 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
nsHtml5StateSnapshot::initializeStatics()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
nsHtml5StateSnapshot::releaseStatics()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|