| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
| 3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 class FragmentParsingContext { | 109 class FragmentParsingContext { |
| 110 WTF_MAKE_NONCOPYABLE(FragmentParsingContext); | 110 WTF_MAKE_NONCOPYABLE(FragmentParsingContext); |
| 111 DISALLOW_ALLOCATION(); | 111 DISALLOW_ALLOCATION(); |
| 112 public: | 112 public: |
| 113 FragmentParsingContext(); | 113 FragmentParsingContext(); |
| 114 FragmentParsingContext(DocumentFragment*, Element* contextElement); | 114 FragmentParsingContext(DocumentFragment*, Element* contextElement); |
| 115 ~FragmentParsingContext(); | 115 ~FragmentParsingContext(); |
| 116 | 116 |
| 117 DocumentFragment* fragment() const { return m_fragment; } | 117 DocumentFragment* fragment() const { return m_fragment; } |
| 118 Element* contextElement() const { ASSERT(m_fragment); return m_contextEl
ementStackItem->element(); } | |
| 119 HTMLStackItem* contextElementStackItem() const { ASSERT(m_fragment); ret
urn m_contextElementStackItem.get(); } | |
| 120 | 118 |
| 121 void trace(Visitor*); | 119 void trace(Visitor*); |
| 122 | 120 |
| 123 private: | 121 private: |
| 124 RawPtrWillBeMember<DocumentFragment> m_fragment; | 122 RawPtrWillBeMember<DocumentFragment> m_fragment; |
| 125 RefPtrWillBeMember<HTMLStackItem> m_contextElementStackItem; | |
| 126 }; | 123 }; |
| 127 | 124 |
| 128 #if ENABLE(ASSERT) | 125 #if ENABLE(ASSERT) |
| 129 bool m_isAttached; | 126 bool m_isAttached; |
| 130 #endif | 127 #endif |
| 131 FragmentParsingContext m_fragmentContext; | 128 FragmentParsingContext m_fragmentContext; |
| 132 HTMLConstructionSite m_tree; | 129 HTMLConstructionSite m_tree; |
| 133 | 130 |
| 134 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#
insertion-mode | 131 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#
insertion-mode |
| 135 InsertionMode m_insertionMode; | 132 InsertionMode m_insertionMode; |
| 136 | 133 |
| 137 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#
original-insertion-mode | 134 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#
original-insertion-mode |
| 138 InsertionMode m_originalInsertionMode; | 135 InsertionMode m_originalInsertionMode; |
| 139 | 136 |
| 140 // We access parser because HTML5 spec requires that we be able to change th
e state of the tokenizer | 137 // We access parser because HTML5 spec requires that we be able to change th
e state of the tokenizer |
| 141 // from within parser actions. We also need it to track the current position
. | 138 // from within parser actions. We also need it to track the current position
. |
| 142 RawPtrWillBeMember<HTMLDocumentParser> m_parser; | 139 RawPtrWillBeMember<HTMLDocumentParser> m_parser; |
| 143 | 140 |
| 144 RefPtrWillBeMember<Element> m_scriptToProcess; // <script> tag which needs p
rocessing before resuming the parser. | 141 RefPtrWillBeMember<Element> m_scriptToProcess; // <script> tag which needs p
rocessing before resuming the parser. |
| 145 TextPosition m_scriptToProcessStartPosition; // Starting line number of the
script tag needing processing. | 142 TextPosition m_scriptToProcessStartPosition; // Starting line number of the
script tag needing processing. |
| 146 | 143 |
| 147 HTMLParserOptions m_options; | 144 HTMLParserOptions m_options; |
| 148 }; | 145 }; |
| 149 | 146 |
| 150 } | 147 } |
| 151 | 148 |
| 152 #endif | 149 #endif |
| OLD | NEW |