/parser/html/nsHtml5StateSnapshot.cpp

http://github.com/zpao/v8monkey · C++ · 169 lines · 119 code · 25 blank · 25 comment · 3 complexity · 12850e3c76002cda981a7083694927c0 MD5 · raw file

  1. /*
  2. * Copyright (c) 2009-2010 Mozilla Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  17. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. /*
  23. * THIS IS A GENERATED FILE. PLEASE DO NOT EDIT.
  24. * Please edit StateSnapshot.java instead and regenerate.
  25. */
  26. #define nsHtml5StateSnapshot_cpp__
  27. #include "prtypes.h"
  28. #include "nsIAtom.h"
  29. #include "nsHtml5AtomTable.h"
  30. #include "nsString.h"
  31. #include "nsINameSpaceManager.h"
  32. #include "nsIContent.h"
  33. #include "nsTraceRefcnt.h"
  34. #include "jArray.h"
  35. #include "nsHtml5ArrayCopy.h"
  36. #include "nsAHtml5TreeBuilderState.h"
  37. #include "nsHtml5Atoms.h"
  38. #include "nsHtml5ByteReadable.h"
  39. #include "nsIUnicodeDecoder.h"
  40. #include "nsHtml5Macros.h"
  41. #include "nsHtml5Tokenizer.h"
  42. #include "nsHtml5TreeBuilder.h"
  43. #include "nsHtml5MetaScanner.h"
  44. #include "nsHtml5AttributeName.h"
  45. #include "nsHtml5ElementName.h"
  46. #include "nsHtml5HtmlAttributes.h"
  47. #include "nsHtml5StackNode.h"
  48. #include "nsHtml5UTF16Buffer.h"
  49. #include "nsHtml5Portability.h"
  50. #include "nsHtml5StateSnapshot.h"
  51. nsHtml5StateSnapshot::nsHtml5StateSnapshot(jArray<nsHtml5StackNode*,PRInt32> stack, jArray<nsHtml5StackNode*,PRInt32> listOfActiveFormattingElements, nsIContent** formPointer, nsIContent** headPointer, nsIContent** deepTreeSurrogateParent, PRInt32 mode, PRInt32 originalMode, bool framesetOk, bool needToDropLF, bool quirks)
  52. : stack(stack),
  53. listOfActiveFormattingElements(listOfActiveFormattingElements),
  54. formPointer(formPointer),
  55. headPointer(headPointer),
  56. deepTreeSurrogateParent(deepTreeSurrogateParent),
  57. mode(mode),
  58. originalMode(originalMode),
  59. framesetOk(framesetOk),
  60. needToDropLF(needToDropLF),
  61. quirks(quirks)
  62. {
  63. MOZ_COUNT_CTOR(nsHtml5StateSnapshot);
  64. }
  65. jArray<nsHtml5StackNode*,PRInt32>
  66. nsHtml5StateSnapshot::getStack()
  67. {
  68. return stack;
  69. }
  70. jArray<nsHtml5StackNode*,PRInt32>
  71. nsHtml5StateSnapshot::getListOfActiveFormattingElements()
  72. {
  73. return listOfActiveFormattingElements;
  74. }
  75. nsIContent**
  76. nsHtml5StateSnapshot::getFormPointer()
  77. {
  78. return formPointer;
  79. }
  80. nsIContent**
  81. nsHtml5StateSnapshot::getHeadPointer()
  82. {
  83. return headPointer;
  84. }
  85. nsIContent**
  86. nsHtml5StateSnapshot::getDeepTreeSurrogateParent()
  87. {
  88. return deepTreeSurrogateParent;
  89. }
  90. PRInt32
  91. nsHtml5StateSnapshot::getMode()
  92. {
  93. return mode;
  94. }
  95. PRInt32
  96. nsHtml5StateSnapshot::getOriginalMode()
  97. {
  98. return originalMode;
  99. }
  100. bool
  101. nsHtml5StateSnapshot::isFramesetOk()
  102. {
  103. return framesetOk;
  104. }
  105. bool
  106. nsHtml5StateSnapshot::isNeedToDropLF()
  107. {
  108. return needToDropLF;
  109. }
  110. bool
  111. nsHtml5StateSnapshot::isQuirks()
  112. {
  113. return quirks;
  114. }
  115. PRInt32
  116. nsHtml5StateSnapshot::getListOfActiveFormattingElementsLength()
  117. {
  118. return listOfActiveFormattingElements.length;
  119. }
  120. PRInt32
  121. nsHtml5StateSnapshot::getStackLength()
  122. {
  123. return stack.length;
  124. }
  125. nsHtml5StateSnapshot::~nsHtml5StateSnapshot()
  126. {
  127. MOZ_COUNT_DTOR(nsHtml5StateSnapshot);
  128. for (PRInt32 i = 0; i < stack.length; i++) {
  129. stack[i]->release();
  130. }
  131. for (PRInt32 i = 0; i < listOfActiveFormattingElements.length; i++) {
  132. if (listOfActiveFormattingElements[i]) {
  133. listOfActiveFormattingElements[i]->release();
  134. }
  135. }
  136. }
  137. void
  138. nsHtml5StateSnapshot::initializeStatics()
  139. {
  140. }
  141. void
  142. nsHtml5StateSnapshot::releaseStatics()
  143. {
  144. }