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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 ~HTMLConstructionSite(); | 106 ~HTMLConstructionSite(); |
107 void trace(Visitor*); | 107 void trace(Visitor*); |
108 | 108 |
109 void detach(); | 109 void detach(); |
110 | 110 |
111 // executeQueuedTasks empties the queue but does not flush pending text. | 111 // executeQueuedTasks empties the queue but does not flush pending text. |
112 // NOTE: Possible reentrancy via JavaScript execution. | 112 // NOTE: Possible reentrancy via JavaScript execution. |
113 void executeQueuedTasks(); | 113 void executeQueuedTasks(); |
114 | 114 |
115 // flushPendingText turns pending text into queued Text insertions, but does
not execute them. | 115 // flushPendingText turns pending text into queued Text insertions, but does
not execute them. |
116 void flushPendingText(); | 116 void flushPendingText(bool force); |
117 | 117 |
118 // Called before every token in HTMLTreeBuilder::processToken, thus inlined: | 118 // Called before every token in HTMLTreeBuilder::processToken, thus inlined: |
119 void flush() | 119 void flush() |
120 { | 120 { |
121 if (!hasPendingTasks()) | 121 if (!hasPendingTasks()) |
122 return; | 122 return; |
123 flushPendingText(); | 123 flushPendingText(false); |
124 executeQueuedTasks(); // NOTE: Possible reentrancy via JavaScript execut
ion. | 124 executeQueuedTasks(); // NOTE: Possible reentrancy via JavaScript execut
ion. |
125 ASSERT(!hasPendingTasks()); | 125 ASSERT(!hasPendingTasks()); |
126 } | 126 } |
127 | 127 |
128 bool hasPendingTasks() | 128 bool hasPendingTasks() |
129 { | 129 { |
130 return !m_pendingText.isEmpty() || !m_taskQueue.isEmpty(); | 130 return !m_pendingText.isEmpty() || !m_taskQueue.isEmpty(); |
131 } | 131 } |
132 | 132 |
133 void setDefaultCompatibilityMode(); | 133 void setDefaultCompatibilityMode(); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 // "whenever a node would be inserted into the current node, it must instead | 307 // "whenever a node would be inserted into the current node, it must instead |
308 // be foster parented." This flag tracks whether we're in that state. | 308 // be foster parented." This flag tracks whether we're in that state. |
309 bool m_redirectAttachToFosterParent; | 309 bool m_redirectAttachToFosterParent; |
310 | 310 |
311 bool m_inQuirksMode; | 311 bool m_inQuirksMode; |
312 }; | 312 }; |
313 | 313 |
314 } // namespace blink | 314 } // namespace blink |
315 | 315 |
316 #endif | 316 #endif |
OLD | NEW |