Changeset 64023 in webkit
- Timestamp:
- Jul 25, 2010 2:36:32 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r64022 r64023 1 2010-07-25 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Functions supporting the legacy tree builder are confusing 6 https://bugs.webkit.org/show_bug.cgi?id=42951 7 8 This patch just inlines these functions into their one call site and 9 removes the notImplemented() calls. We thought we were going to grow 10 these to support the new tree builder, but we took a different path. 11 Previous to this patch, these functions were confusing because they 12 looked like part of the new tree builder. 13 14 * html/HTMLTreeBuilder.cpp: 15 (WebCore::HTMLTreeBuilder::passTokenToLegacyParser): 16 * html/HTMLTreeBuilder.h: 17 1 18 2010-07-25 Adam Barth <abarth@webkit.org> 2 19 -
trunk/WebCore/html/HTMLTreeBuilder.cpp
r64018 r64023 393 393 } 394 394 395 void HTMLTreeBuilder::handleScriptStartTag()396 {397 notImplemented(); // The HTML frgment case?398 m_tokenizer->setState(HTMLTokenizer::ScriptDataState);399 notImplemented(); // Save insertion mode.400 }401 402 void HTMLTreeBuilder::handleScriptEndTag(Element* scriptElement, int scriptStartLine)403 {404 ASSERT(!m_scriptToProcess); // Caller never called takeScriptToProcess!405 ASSERT(m_scriptToProcessStartLine == uninitializedLineNumberValue); // Caller never called takeScriptToProcess!406 notImplemented(); // Save insertion mode and insertion point?407 408 // Pause ourselves so that parsing stops until the script can be processed by the caller.409 m_isPaused = true;410 m_scriptToProcess = scriptElement;411 // Lexer line numbers are 0-based, ScriptSourceCode expects 1-based lines,412 // so we convert here before passing the line number off to HTMLScriptRunner.413 m_scriptToProcessStartLine = scriptStartLine + 1;414 }415 416 395 PassRefPtr<Element> HTMLTreeBuilder::takeScriptToProcess(int& scriptStartLine) 417 396 { … … 471 450 // when using the old parser for we have to do this manually. 472 451 if (oldStyleToken.tagName == scriptTag) { 473 handleScriptStartTag();452 m_tokenizer->setState(HTMLTokenizer::ScriptDataState); 474 453 m_lastScriptElement = static_pointer_cast<Element>(result); 475 454 m_lastScriptElementStartLine = m_tokenizer->lineNumber(); … … 488 467 // does not show up in pasted HTML. 489 468 m_lastScriptElement->removeChildren(); 490 } else if (insertionMode() != AfterFramesetMode) 491 handleScriptEndTag(m_lastScriptElement.get(), m_lastScriptElementStartLine); 469 } else if (insertionMode() != AfterFramesetMode) { 470 ASSERT(!m_scriptToProcess); // Caller never called takeScriptToProcess! 471 ASSERT(m_scriptToProcessStartLine == uninitializedLineNumberValue); // Caller never called takeScriptToProcess! 472 // Pause ourselves so that parsing stops until the script can be processed by the caller. 473 m_isPaused = true; 474 m_scriptToProcess = m_lastScriptElement.get(); 475 // Lexer line numbers are 0-based, ScriptSourceCode expects 1-based lines, 476 // so we convert here before passing the line number off to HTMLScriptRunner. 477 m_scriptToProcessStartLine = m_lastScriptElementStartLine + 1; 478 } 492 479 m_lastScriptElement = 0; 493 480 m_lastScriptElementStartLine = uninitializedLineNumberValue; -
trunk/WebCore/html/HTMLTreeBuilder.h
r63868 r64023 174 174 void parseError(AtomicHTMLToken&) { } 175 175 176 void handleScriptStartTag();177 void handleScriptEndTag(Element*, int scriptStartLine);178 179 176 InsertionMode insertionMode() const { return m_insertionMode; } 180 177 void setInsertionMode(InsertionMode mode)
Note: See TracChangeset
for help on using the changeset viewer.