Chromium Code Reviews| 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 23 matching lines...) Expand all Loading... | |
| 34 #include <wtf/Noncopyable.h> | 34 #include <wtf/Noncopyable.h> |
| 35 #include <wtf/PassRefPtr.h> | 35 #include <wtf/PassRefPtr.h> |
| 36 #include <wtf/RefPtr.h> | 36 #include <wtf/RefPtr.h> |
| 37 #include <wtf/Vector.h> | 37 #include <wtf/Vector.h> |
| 38 | 38 |
| 39 namespace WebCore { | 39 namespace WebCore { |
| 40 | 40 |
| 41 struct HTMLConstructionSiteTask { | 41 struct HTMLConstructionSiteTask { |
| 42 enum Operation { | 42 enum Operation { |
| 43 Insert, | 43 Insert, |
| 44 InsertAgain, | |
|
eseidel
2013/05/07 00:11:37
InsertHarder?
| |
| 44 Reparent, | 45 Reparent, |
| 46 TakeAllChildren, | |
| 45 }; | 47 }; |
| 46 | 48 |
| 47 explicit HTMLConstructionSiteTask(Operation op) | 49 explicit HTMLConstructionSiteTask(Operation op) |
| 48 : operation(op) | 50 : operation(op) |
| 49 , selfClosing(false) | 51 , selfClosing(false) |
| 50 { | 52 { |
| 51 } | 53 } |
| 52 | 54 |
| 53 Operation operation; | 55 Operation operation; |
| 54 RefPtr<ContainerNode> parent; | 56 RefPtr<ContainerNode> parent; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 void insertHTMLFormElement(AtomicHTMLToken*, bool isDemoted = false); | 103 void insertHTMLFormElement(AtomicHTMLToken*, bool isDemoted = false); |
| 102 void insertScriptElement(AtomicHTMLToken*); | 104 void insertScriptElement(AtomicHTMLToken*); |
| 103 void insertTextNode(const String&, WhitespaceMode = WhitespaceUnknown); | 105 void insertTextNode(const String&, WhitespaceMode = WhitespaceUnknown); |
| 104 void insertForeignElement(AtomicHTMLToken*, const AtomicString& namespaceURI ); | 106 void insertForeignElement(AtomicHTMLToken*, const AtomicString& namespaceURI ); |
| 105 | 107 |
| 106 void insertHTMLHtmlStartTagBeforeHTML(AtomicHTMLToken*); | 108 void insertHTMLHtmlStartTagBeforeHTML(AtomicHTMLToken*); |
| 107 void insertHTMLHtmlStartTagInBody(AtomicHTMLToken*); | 109 void insertHTMLHtmlStartTagInBody(AtomicHTMLToken*); |
| 108 void insertHTMLBodyStartTagInBody(AtomicHTMLToken*); | 110 void insertHTMLBodyStartTagInBody(AtomicHTMLToken*); |
| 109 | 111 |
| 110 void reparent(HTMLElementStack::ElementRecord* newParent, HTMLElementStack:: ElementRecord* child); | 112 void reparent(HTMLElementStack::ElementRecord* newParent, HTMLElementStack:: ElementRecord* child); |
| 113 void reparent(HTMLElementStack::ElementRecord* newParent, HTMLStackItem* chi ld); | |
| 114 void insertAgain(HTMLStackItem* newParent, HTMLElementStack::ElementRecord* child); | |
| 115 void takeAllChildren(HTMLStackItem* newParent, HTMLElementStack::ElementReco rd* oldParent); | |
| 111 | 116 |
| 112 PassRefPtr<HTMLStackItem> createElementFromSavedToken(HTMLStackItem*); | 117 PassRefPtr<HTMLStackItem> createElementFromSavedToken(HTMLStackItem*); |
| 113 | 118 |
| 114 bool shouldFosterParent() const; | 119 bool shouldFosterParent() const; |
| 115 void fosterParent(PassRefPtr<Node>); | 120 void fosterParent(PassRefPtr<Node>); |
| 116 | 121 |
| 117 bool indexOfFirstUnopenFormattingElement(unsigned& firstUnopenElementIndex) const; | 122 bool indexOfFirstUnopenFormattingElement(unsigned& firstUnopenElementIndex) const; |
| 118 void reconstructTheActiveFormattingElements(); | 123 void reconstructTheActiveFormattingElements(); |
| 119 | 124 |
| 120 void generateImpliedEndTags(); | 125 void generateImpliedEndTags(); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 202 // "whenever a node would be inserted into the current node, it must instead | 207 // "whenever a node would be inserted into the current node, it must instead |
| 203 // be foster parented." This flag tracks whether we're in that state. | 208 // be foster parented." This flag tracks whether we're in that state. |
| 204 bool m_redirectAttachToFosterParent; | 209 bool m_redirectAttachToFosterParent; |
| 205 | 210 |
| 206 bool m_inQuirksMode; | 211 bool m_inQuirksMode; |
| 207 }; | 212 }; |
| 208 | 213 |
| 209 } // namespace WebCore | 214 } // namespace WebCore |
| 210 | 215 |
| 211 #endif | 216 #endif |
| OLD | NEW |