Changeset 61662 in webkit
- Timestamp:
- Jun 22, 2010 11:41:51 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 29 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/Android.mk
r61658 r61662 269 269 html/HTMLParserScheduler.cpp \ 270 270 html/HTMLTableRowsCollection.cpp \ 271 html/ HTMLDocumentParser.cpp \271 html/LegacyHTMLDocumentParser.cpp \ 272 272 html/HTMLViewSourceDocument.cpp \ 273 273 html/ImageData.cpp \ -
trunk/WebCore/CMakeLists.txt
r61658 r61662 994 994 html/HTMLTextAreaElement.cpp 995 995 html/HTMLTitleElement.cpp 996 html/ HTMLDocumentParser.cpp996 html/LegacyHTMLDocumentParser.cpp 997 997 html/HTMLUListElement.cpp 998 998 html/HTMLViewSourceDocument.cpp -
trunk/WebCore/ChangeLog
r61661 r61662 1 2010-06-22 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Rename HTMLDocumentParser to LegacyHTMLDocumentParser 6 https://bugs.webkit.org/show_bug.cgi?id=41043 7 8 As requested by Darin Adler. 9 10 * Android.mk: 11 * CMakeLists.txt: 12 * GNUmakefile.am: 13 * WebCore.gypi: 14 * WebCore.pro: 15 * WebCore.vcproj/WebCore.vcproj: 16 * WebCore.xcodeproj/project.pbxproj: 17 * css/CSSStyleSheet.cpp: 18 (WebCore::CSSStyleSheet::checkLoaded): 19 * dom/Document.cpp: 20 (WebCore::Document::write): 21 * dom/DocumentFragment.cpp: 22 * dom/DocumentParser.h: 23 (WebCore::DocumentParser::asHTMLDocumentParser): 24 * dom/XMLDocumentParserLibxml2.cpp: 25 * dom/XMLDocumentParserQt.cpp: 26 * html/HTML5Lexer.h: 27 (WebCore::HTML5Lexer::columnNumber): 28 * html/HTML5TreeBuilder.cpp: 29 * html/HTMLDocument.cpp: 30 (WebCore::HTMLDocument::createParser): 31 * html/HTMLDocumentParser.cpp: Removed. 32 * html/HTMLDocumentParser.h: Removed. 33 * html/HTMLFormControlElement.cpp: 34 * html/HTMLParserScheduler.cpp: 35 (WebCore::parserChunkSize): 36 * html/HTMLViewSourceDocument.cpp: 37 (WebCore::HTMLViewSourceDocument::createParser): 38 (WebCore::HTMLViewSourceDocument::addViewSourceToken): 39 * html/HTMLViewSourceDocument.h: 40 * html/LegacyHTMLDocumentParser.cpp: Copied from WebCore/html/HTMLDocumentParser.cpp. 41 (WebCore::LegacyHTMLDocumentParser::LegacyHTMLDocumentParser): 42 (WebCore::LegacyHTMLDocumentParser::reset): 43 (WebCore::LegacyHTMLDocumentParser::begin): 44 (WebCore::LegacyHTMLDocumentParser::setForceSynchronous): 45 (WebCore::LegacyHTMLDocumentParser::processListing): 46 (WebCore::LegacyHTMLDocumentParser::parseNonHTMLText): 47 (WebCore::LegacyHTMLDocumentParser::scriptHandler): 48 (WebCore::LegacyHTMLDocumentParser::scriptExecution): 49 (WebCore::LegacyHTMLDocumentParser::parseComment): 50 (WebCore::LegacyHTMLDocumentParser::parseServer): 51 (WebCore::LegacyHTMLDocumentParser::parseProcessingInstruction): 52 (WebCore::LegacyHTMLDocumentParser::parseText): 53 (WebCore::LegacyHTMLDocumentParser::parseEntity): 54 (WebCore::LegacyHTMLDocumentParser::parseDoctype): 55 (WebCore::LegacyHTMLDocumentParser::parseTag): 56 (WebCore::LegacyHTMLDocumentParser::continueProcessing): 57 (WebCore::LegacyHTMLDocumentParser::advance): 58 (WebCore::LegacyHTMLDocumentParser::willWriteHTML): 59 (WebCore::LegacyHTMLDocumentParser::didWriteHTML): 60 (WebCore::LegacyHTMLDocumentParser::write): 61 (WebCore::LegacyHTMLDocumentParser::stopParsing): 62 (WebCore::LegacyHTMLDocumentParser::processingData): 63 (WebCore::LegacyHTMLDocumentParser::timerFired): 64 (WebCore::LegacyHTMLDocumentParser::end): 65 (WebCore::LegacyHTMLDocumentParser::finish): 66 (WebCore::LegacyHTMLDocumentParser::finishWasCalled): 67 (WebCore::LegacyHTMLDocumentParser::processToken): 68 (WebCore::LegacyHTMLDocumentParser::processDoctypeToken): 69 (WebCore::LegacyHTMLDocumentParser::~LegacyHTMLDocumentParser): 70 (WebCore::LegacyHTMLDocumentParser::enlargeBuffer): 71 (WebCore::LegacyHTMLDocumentParser::enlargeScriptBuffer): 72 (WebCore::LegacyHTMLDocumentParser::executeScriptsWaitingForStylesheets): 73 (WebCore::LegacyHTMLDocumentParser::notifyFinished): 74 (WebCore::LegacyHTMLDocumentParser::executeExternalScriptsIfReady): 75 (WebCore::LegacyHTMLDocumentParser::executeExternalScriptsTimerFired): 76 (WebCore::LegacyHTMLDocumentParser::continueExecutingExternalScripts): 77 (WebCore::LegacyHTMLDocumentParser::isWaitingForScripts): 78 (WebCore::LegacyHTMLDocumentParser::setSrc): 79 (WebCore::parseLegacyHTMLDocumentFragment): 80 * html/LegacyHTMLDocumentParser.h: Copied from WebCore/html/HTMLDocumentParser.h. 81 (WebCore::LegacyHTMLDocumentParser::asHTMLDocumentParser): 82 * html/LegacyHTMLTreeConstructor.cpp: 83 (WebCore::LegacyHTMLTreeConstructor::reportErrorToConsole): 84 * html/LegacyHTMLTreeConstructor.h: 85 * loader/FTPDirectoryDocument.cpp: 86 (WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser): 87 (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate): 88 (WebCore::FTPDirectoryDocumentParser::finish): 89 * page/XSSAuditor.h: 90 1 91 2010-06-22 Shinichiro Hamaji <hamaji@chromium.org> 2 92 -
trunk/WebCore/GNUmakefile.am
r61658 r61662 1265 1265 WebCore/html/HTMLTitleElement.cpp \ 1266 1266 WebCore/html/HTMLTitleElement.h \ 1267 WebCore/html/ HTMLDocumentParser.cpp \1268 WebCore/html/ HTMLDocumentParser.h \1267 WebCore/html/LegacyHTMLDocumentParser.cpp \ 1268 WebCore/html/LegacyHTMLDocumentParser.h \ 1269 1269 WebCore/html/HTMLUListElement.cpp \ 1270 1270 WebCore/html/HTMLUListElement.h \ -
trunk/WebCore/WebCore.gypi
r61658 r61662 1653 1653 'html/HTMLTitleElement.cpp', 1654 1654 'html/HTMLTitleElement.h', 1655 'html/ HTMLDocumentParser.cpp',1656 'html/ HTMLDocumentParser.h',1655 'html/LegacyHTMLDocumentParser.cpp', 1656 'html/LegacyHTMLDocumentParser.h', 1657 1657 'html/HTMLUListElement.cpp', 1658 1658 'html/HTMLUListElement.h', -
trunk/WebCore/WebCore.pro
r61658 r61662 699 699 html/HTMLTextAreaElement.cpp \ 700 700 html/HTMLTitleElement.cpp \ 701 html/ HTMLDocumentParser.cpp \701 html/LegacyHTMLDocumentParser.cpp \ 702 702 html/HTMLUListElement.cpp \ 703 703 html/HTMLViewSourceDocument.cpp \ … … 1438 1438 html/HTMLTextAreaElement.h \ 1439 1439 html/HTMLTitleElement.h \ 1440 html/ HTMLDocumentParser.h \1440 html/LegacyHTMLDocumentParser.h \ 1441 1441 html/HTMLUListElement.h \ 1442 1442 html/HTMLVideoElement.h \ -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r61661 r61662 37578 37578 </File> 37579 37579 <File 37580 RelativePath="..\html\ HTMLDocumentParser.cpp"37581 > 37582 </File> 37583 <File 37584 RelativePath="..\html\ HTMLDocumentParser.h"37580 RelativePath="..\html\LegacyHTMLDocumentParser.cpp" 37581 > 37582 </File> 37583 <File 37584 RelativePath="..\html\LegacyHTMLDocumentParser.h" 37585 37585 > 37586 37586 </File> -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r61658 r61662 2482 2482 93F198E608245E59001E9ABC /* HTMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23F02DE4396018635CA /* HTMLElement.h */; settings = {ATTRIBUTES = (Private, ); }; }; 2483 2483 93F198EF08245E59001E9ABC /* LegacyHTMLTreeConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D25102DE4396018635CA /* LegacyHTMLTreeConstructor.h */; }; 2484 93F198F008245E59001E9ABC /* HTMLDocumentParser.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D25302DE4396018635CA /*HTMLDocumentParser.h */; };2484 93F198F008245E59001E9ABC /* LegacyHTMLDocumentParser.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D25302DE4396018635CA /* LegacyHTMLDocumentParser.h */; }; 2485 2485 93F198F608245E59001E9ABC /* TextResourceDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D27902DE43D7018635CA /* TextResourceDecoder.h */; settings = {ATTRIBUTES = (Private, ); }; }; 2486 2486 93F1991808245E59001E9ABC /* Range.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D30402DE4476018635CA /* Range.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 2512 2512 93F19A9208245E59001E9ABC /* HTMLElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D23E02DE4396018635CA /* HTMLElement.cpp */; }; 2513 2513 93F19A9B08245E59001E9ABC /* LegacyHTMLTreeConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D25002DE4396018635CA /* LegacyHTMLTreeConstructor.cpp */; }; 2514 93F19A9C08245E59001E9ABC /* HTMLDocumentParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D25202DE4396018635CA /*HTMLDocumentParser.cpp */; };2514 93F19A9C08245E59001E9ABC /* LegacyHTMLDocumentParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D25202DE4396018635CA /* LegacyHTMLDocumentParser.cpp */; }; 2515 2515 93F19A9D08245E59001E9ABC /* TextResourceDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D27802DE43D7018635CA /* TextResourceDecoder.cpp */; }; 2516 2516 93F19AB908245E59001E9ABC /* Range.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D30302DE4476018635CA /* Range.cpp */; }; … … 10657 10657 F523D25002DE4396018635CA /* LegacyHTMLTreeConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyHTMLTreeConstructor.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 10658 10658 F523D25102DE4396018635CA /* LegacyHTMLTreeConstructor.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = LegacyHTMLTreeConstructor.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 10659 F523D25202DE4396018635CA /* HTMLDocumentParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path =HTMLDocumentParser.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };10660 F523D25302DE4396018635CA /* HTMLDocumentParser.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path =HTMLDocumentParser.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };10659 F523D25202DE4396018635CA /* LegacyHTMLDocumentParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyHTMLDocumentParser.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 10660 F523D25302DE4396018635CA /* LegacyHTMLDocumentParser.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = LegacyHTMLDocumentParser.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 10661 10661 F523D27802DE43D7018635CA /* TextResourceDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextResourceDecoder.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 10662 10662 F523D27902DE43D7018635CA /* TextResourceDecoder.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = TextResourceDecoder.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; … … 13559 13559 F523D23C02DE4396018635CA /* HTMLDocument.h */, 13560 13560 1A494E290A12354300FDAFC1 /* HTMLDocument.idl */, 13561 F523D25202DE4396018635CA /* HTMLDocumentParser.cpp */,13562 F523D25302DE4396018635CA /* HTMLDocumentParser.h */,13561 F523D25202DE4396018635CA /* LegacyHTMLDocumentParser.cpp */, 13562 F523D25302DE4396018635CA /* LegacyHTMLDocumentParser.h */, 13563 13563 F523D23E02DE4396018635CA /* HTMLElement.cpp */, 13564 13564 F523D23F02DE4396018635CA /* HTMLElement.h */, … … 18076 18076 A8EA79F70A1916DF00A8EF5F /* HTMLDListElement.h in Headers */, 18077 18077 93F198E508245E59001E9ABC /* HTMLDocument.h in Headers */, 18078 93F198F008245E59001E9ABC /* HTMLDocumentParser.h in Headers */,18078 93F198F008245E59001E9ABC /* LegacyHTMLDocumentParser.h in Headers */, 18079 18079 93309DE8099E64920056E581 /* htmlediting.h in Headers */, 18080 18080 93F198E608245E59001E9ABC /* HTMLElement.h in Headers */, … … 20415 20415 A8EA79F50A1916DF00A8EF5F /* HTMLDListElement.cpp in Sources */, 20416 20416 93F19A9108245E59001E9ABC /* HTMLDocument.cpp in Sources */, 20417 93F19A9C08245E59001E9ABC /* HTMLDocumentParser.cpp in Sources */,20417 93F19A9C08245E59001E9ABC /* LegacyHTMLDocumentParser.cpp in Sources */, 20418 20418 93309DE7099E64920056E581 /* htmlediting.cpp in Sources */, 20419 20419 93F19A9208245E59001E9ABC /* HTMLElement.cpp in Sources */, -
trunk/WebCore/css/CSSStyleSheet.cpp
r61391 r61662 208 208 parent()->checkLoaded(); 209 209 210 // Avoid |this| being deleted by scripts that run via HTMLDocumentParser::executeScriptsWaitingForStylesheets().210 // Avoid |this| being deleted by scripts that run via LegacyHTMLDocumentParser::executeScriptsWaitingForStylesheets(). 211 211 // See <rdar://problem/6622300>. 212 212 RefPtr<CSSStyleSheet> protector(this); -
trunk/WebCore/dom/Document.cpp
r61357 r61662 80 80 #include "HTMLStyleElement.h" 81 81 #include "HTMLTitleElement.h" 82 #include " HTMLDocumentParser.h"82 #include "LegacyHTMLDocumentParser.h" 83 83 #include "HTTPParsers.h" 84 84 #include "HistoryItem.h" … … 1970 1970 // separate state for forceSynchronous. 1971 1971 bool wasForcedSynchronous = false; 1972 HTMLDocumentParser* parser = m_parser->asHTMLDocumentParser();1972 LegacyHTMLDocumentParser* parser = m_parser->asHTMLDocumentParser(); 1973 1973 if (parser) { 1974 1974 wasForcedSynchronous = parser->forceSynchronous(); -
trunk/WebCore/dom/DocumentFragment.cpp
r61637 r61662 26 26 #include "Document.h" 27 27 #include "HTML5DocumentParser.h" 28 #include " HTMLDocumentParser.h"28 #include "LegacyHTMLDocumentParser.h" 29 29 #include "Page.h" 30 30 #include "Settings.h" -
trunk/WebCore/dom/DocumentParser.h
r61286 r61662 27 27 28 28 class LegacyHTMLTreeConstructor; 29 class HTMLDocumentParser;29 class LegacyHTMLDocumentParser; 30 30 class SegmentedString; 31 31 class XSSAuditor; … … 45 45 virtual void stopParsing() { m_parserStopped = true; } 46 46 // FIXME: processingData() is only used by DocumentLoader::isLoadingInAPISense 47 // and is very unclear as to what it actually means. Only HTMLDocumentParser47 // and is very unclear as to what it actually means. Only LegacyHTMLDocumentParser 48 48 // actually implements it. 49 49 virtual bool processingData() const { return false; } … … 64 64 65 65 virtual LegacyHTMLTreeConstructor* htmlTreeConstructor() const { return 0; } 66 virtual HTMLDocumentParser* asHTMLDocumentParser() { return 0; }66 virtual LegacyHTMLDocumentParser* asHTMLDocumentParser() { return 0; } 67 67 68 68 XSSAuditor* xssAuditor() const { return m_XSSAuditor; } -
trunk/WebCore/dom/XMLDocumentParserLibxml2.cpp
r61640 r61662 39 39 #include "HTMLLinkElement.h" 40 40 #include "HTMLStyleElement.h" 41 #include " HTMLDocumentParser.h" // for decodeNamedEntity41 #include "LegacyHTMLDocumentParser.h" // for decodeNamedEntity 42 42 #include "ProcessingInstruction.h" 43 43 #include "ResourceError.h" -
trunk/WebCore/dom/XMLDocumentParserQt.cpp
r61104 r61662 39 39 #include "HTMLLinkElement.h" 40 40 #include "HTMLStyleElement.h" 41 #include " HTMLDocumentParser.h"41 #include "LegacyHTMLDocumentParser.h" 42 42 #include "ProcessingInstruction.h" 43 43 #include "ResourceError.h" -
trunk/WebCore/html/HTML5Lexer.h
r61386 r61662 122 122 123 123 int lineNumber() const { return m_lineNumber; } 124 int columnNumber() const { return 1; } // Matches HTMLDocumentParser.h behavior.124 int columnNumber() const { return 1; } // Matches LegacyHTMLDocumentParser.h behavior. 125 125 126 126 State state() const { return m_state; } -
trunk/WebCore/html/HTML5TreeBuilder.cpp
r61637 r61662 33 33 #include "HTML5Token.h" 34 34 #include "HTMLDocument.h" 35 #include " HTMLDocumentParser.h"35 #include "LegacyHTMLDocumentParser.h" 36 36 #include "HTMLNames.h" 37 37 #include "LegacyHTMLTreeConstructor.h" -
trunk/WebCore/html/HTMLDocument.cpp
r61104 r61662 69 69 #include "HTMLElementFactory.h" 70 70 #include "HTMLNames.h" 71 #include " HTMLDocumentParser.h"71 #include "LegacyHTMLDocumentParser.h" 72 72 #include "InspectorController.h" 73 73 #include "KURL.h" … … 295 295 return new HTML5DocumentParser(this, reportErrors); 296 296 297 return new HTMLDocumentParser(this, reportErrors);297 return new LegacyHTMLDocumentParser(this, reportErrors); 298 298 } 299 299 -
trunk/WebCore/html/HTMLFormControlElement.cpp
r61322 r61662 40 40 #include "HTMLNames.h" 41 41 #include "LegacyHTMLTreeConstructor.h" 42 #include " HTMLDocumentParser.h"42 #include "LegacyHTMLDocumentParser.h" 43 43 #include "LabelsNodeList.h" 44 44 #include "Page.h" -
trunk/WebCore/html/HTMLParserScheduler.cpp
r61658 r61662 55 55 // FIXME: We may need to divide the value from customHTMLTokenizerChunkSize 56 56 // by some constant to translate from the "character" based behavior of the 57 // old HTMLDocumentParser to the token-based behavior of this parser.57 // old LegacyHTMLDocumentParser to the token-based behavior of this parser. 58 58 if (page && page->hasCustomHTMLTokenizerChunkSize()) 59 59 return page->customHTMLTokenizerChunkSize(); -
trunk/WebCore/html/HTMLViewSourceDocument.cpp
r61104 r61662 37 37 #include "HTMLTableRowElement.h" 38 38 #include "HTMLTableSectionElement.h" 39 #include " HTMLDocumentParser.h"39 #include "LegacyHTMLDocumentParser.h" 40 40 #include "Text.h" 41 41 #include "TextDocument.h" … … 54 54 DocumentParser* HTMLViewSourceDocument::createParser() 55 55 { 56 // Use HTMLDocumentParser if applicable, otherwise use TextDocumentParser.56 // Use LegacyHTMLDocumentParser if applicable, otherwise use TextDocumentParser. 57 57 if (m_type == "text/html" || m_type == "application/xhtml+xml" || m_type == "image/svg+xml" || DOMImplementation::isXMLMIMEType(m_type) 58 58 #if ENABLE(XHTMLMP) … … 61 61 ) { 62 62 // FIXME: Should respect Settings::html5ParserEnabled() 63 return new HTMLDocumentParser(this);63 return new LegacyHTMLDocumentParser(this); 64 64 } 65 65 … … 158 158 const String& value = attr->value().string(); 159 159 160 // Compare ignoring case since HTMLDocumentParser doesn't160 // Compare ignoring case since LegacyHTMLDocumentParser doesn't 161 161 // lower names when passing in tokens to 162 162 // HTMLViewSourceDocument. -
trunk/WebCore/html/HTMLViewSourceDocument.h
r61104 r61662 43 43 } 44 44 45 void addViewSourceToken(Token*); // Used by the HTMLDocumentParser.45 void addViewSourceToken(Token*); // Used by the LegacyHTMLDocumentParser. 46 46 void addViewSourceText(const String&); // Used by the TextDocumentParser. 47 47 void addViewSourceDoctypeToken(DoctypeToken*); … … 50 50 HTMLViewSourceDocument(Frame*, const String& mimeType); 51 51 52 // Returns HTMLDocumentParser or TextDocumentParser based on m_type.52 // Returns LegacyHTMLDocumentParser or TextDocumentParser based on m_type. 53 53 virtual DocumentParser* createParser(); 54 54 -
trunk/WebCore/html/LegacyHTMLDocumentParser.cpp
r61658 r61662 27 27 28 28 #include "config.h" 29 #include " HTMLDocumentParser.h"29 #include "LegacyHTMLDocumentParser.h" 30 30 31 31 #include "Attribute.h" … … 147 147 // ---------------------------------------------------------------------------- 148 148 149 HTMLDocumentParser::HTMLDocumentParser(HTMLDocument* doc, bool reportErrors)149 LegacyHTMLDocumentParser::LegacyHTMLDocumentParser(HTMLDocument* doc, bool reportErrors) 150 150 : DocumentParser() 151 151 , m_buffer(0) … … 157 157 , m_requestingScript(false) 158 158 , m_hasScriptsWaitingForStylesheets(false) 159 , m_timer(this, & HTMLDocumentParser::timerFired)160 , m_externalScriptsTimer(this, & HTMLDocumentParser::executeExternalScriptsTimerFired)159 , m_timer(this, &LegacyHTMLDocumentParser::timerFired) 160 , m_externalScriptsTimer(this, &LegacyHTMLDocumentParser::executeExternalScriptsTimerFired) 161 161 , m_doc(doc) 162 162 , m_treeConstructor(new LegacyHTMLTreeConstructor(doc, reportErrors)) … … 168 168 } 169 169 170 HTMLDocumentParser::HTMLDocumentParser(HTMLViewSourceDocument* doc)170 LegacyHTMLDocumentParser::LegacyHTMLDocumentParser(HTMLViewSourceDocument* doc) 171 171 : DocumentParser(true) 172 172 , m_buffer(0) … … 178 178 , m_requestingScript(false) 179 179 , m_hasScriptsWaitingForStylesheets(false) 180 , m_timer(this, & HTMLDocumentParser::timerFired)181 , m_externalScriptsTimer(this, & HTMLDocumentParser::executeExternalScriptsTimerFired)180 , m_timer(this, &LegacyHTMLDocumentParser::timerFired) 181 , m_externalScriptsTimer(this, &LegacyHTMLDocumentParser::executeExternalScriptsTimerFired) 182 182 , m_doc(doc) 183 183 , m_inWrite(false) … … 188 188 } 189 189 190 HTMLDocumentParser::HTMLDocumentParser(DocumentFragment* frag, FragmentScriptingPermission scriptingPermission)190 LegacyHTMLDocumentParser::LegacyHTMLDocumentParser(DocumentFragment* frag, FragmentScriptingPermission scriptingPermission) 191 191 : m_buffer(0) 192 192 , m_scriptCode(0) … … 197 197 , m_requestingScript(false) 198 198 , m_hasScriptsWaitingForStylesheets(false) 199 , m_timer(this, & HTMLDocumentParser::timerFired)200 , m_externalScriptsTimer(this, & HTMLDocumentParser::executeExternalScriptsTimerFired)199 , m_timer(this, &LegacyHTMLDocumentParser::timerFired) 200 , m_externalScriptsTimer(this, &LegacyHTMLDocumentParser::executeExternalScriptsTimerFired) 201 201 , m_doc(frag->document()) 202 202 , m_treeConstructor(new LegacyHTMLTreeConstructor(frag, scriptingPermission)) … … 208 208 } 209 209 210 void HTMLDocumentParser::reset()210 void LegacyHTMLDocumentParser::reset() 211 211 { 212 212 ASSERT(m_executingScript == 0); … … 239 239 } 240 240 241 void HTMLDocumentParser::begin()241 void LegacyHTMLDocumentParser::begin() 242 242 { 243 243 m_executingScript = 0; … … 275 275 } 276 276 277 void HTMLDocumentParser::setForceSynchronous(bool force)277 void LegacyHTMLDocumentParser::setForceSynchronous(bool force) 278 278 { 279 279 m_state.setForceSynchronous(force); 280 280 } 281 281 282 HTMLDocumentParser::StateHTMLDocumentParser::processListing(SegmentedString list, State state)282 LegacyHTMLDocumentParser::State LegacyHTMLDocumentParser::processListing(SegmentedString list, State state) 283 283 { 284 284 // This function adds the listing 'list' as … … 317 317 } 318 318 319 HTMLDocumentParser::StateHTMLDocumentParser::parseNonHTMLText(SegmentedString& src, State state)319 LegacyHTMLDocumentParser::State LegacyHTMLDocumentParser::parseNonHTMLText(SegmentedString& src, State state) 320 320 { 321 321 ASSERT(state.inTextArea() || state.inTitle() || state.inIFrame() || !state.hasEntityState()); … … 414 414 } 415 415 416 HTMLDocumentParser::StateHTMLDocumentParser::scriptHandler(State state)416 LegacyHTMLDocumentParser::State LegacyHTMLDocumentParser::scriptHandler(State state) 417 417 { 418 418 // We are inside a <script> … … 546 546 } 547 547 548 HTMLDocumentParser::StateHTMLDocumentParser::scriptExecution(const ScriptSourceCode& sourceCode, State state)548 LegacyHTMLDocumentParser::State LegacyHTMLDocumentParser::scriptExecution(const ScriptSourceCode& sourceCode, State state) 549 549 { 550 550 if (m_fragment || !m_doc->frame()) … … 602 602 } 603 603 604 HTMLDocumentParser::StateHTMLDocumentParser::parseComment(SegmentedString& src, State state)604 LegacyHTMLDocumentParser::State LegacyHTMLDocumentParser::parseComment(SegmentedString& src, State state) 605 605 { 606 606 // FIXME: Why does this code even run for comments inside <script> and <style>? This seems bogus. … … 645 645 } 646 646 647 HTMLDocumentParser::StateHTMLDocumentParser::parseServer(SegmentedString& src, State state)647 LegacyHTMLDocumentParser::State LegacyHTMLDocumentParser::parseServer(SegmentedString& src, State state) 648 648 { 649 649 checkScriptBuffer(src.length()); … … 662 662 } 663 663 664 HTMLDocumentParser::StateHTMLDocumentParser::parseProcessingInstruction(SegmentedString& src, State state)664 LegacyHTMLDocumentParser::State LegacyHTMLDocumentParser::parseProcessingInstruction(SegmentedString& src, State state) 665 665 { 666 666 UChar oldchar = 0; … … 688 688 } 689 689 690 HTMLDocumentParser::StateHTMLDocumentParser::parseText(SegmentedString& src, State state)690 LegacyHTMLDocumentParser::State LegacyHTMLDocumentParser::parseText(SegmentedString& src, State state) 691 691 { 692 692 while (!src.isEmpty()) { … … 716 716 717 717 718 HTMLDocumentParser::StateHTMLDocumentParser::parseEntity(SegmentedString& src, UChar*& dest, State state, unsigned& cBufferPos, bool start, bool parsingTag)718 LegacyHTMLDocumentParser::State LegacyHTMLDocumentParser::parseEntity(SegmentedString& src, UChar*& dest, State state, unsigned& cBufferPos, bool start, bool parsingTag) 719 719 { 720 720 if (start) { … … 890 890 } 891 891 892 HTMLDocumentParser::StateHTMLDocumentParser::parseDoctype(SegmentedString& src, State state)892 LegacyHTMLDocumentParser::State LegacyHTMLDocumentParser::parseDoctype(SegmentedString& src, State state) 893 893 { 894 894 ASSERT(state.inDoctype()); … … 1106 1106 } 1107 1107 1108 HTMLDocumentParser::StateHTMLDocumentParser::parseTag(SegmentedString& src, State state)1108 LegacyHTMLDocumentParser::State LegacyHTMLDocumentParser::parseTag(SegmentedString& src, State state) 1109 1109 { 1110 1110 ASSERT(!state.hasEntityState()); … … 1576 1576 } 1577 1577 1578 inline bool HTMLDocumentParser::continueProcessing(int& processedCount, double startTime, State &state)1578 inline bool LegacyHTMLDocumentParser::continueProcessing(int& processedCount, double startTime, State &state) 1579 1579 { 1580 1580 // We don't want to be checking elapsed time with every character, so we only check after we've … … 1602 1602 // Turns the statemachine one crank using the passed in State object. 1603 1603 // This does not modify m_state directly in order to be reentrant. 1604 ALWAYS_INLINE void HTMLDocumentParser::advance(State& state)1604 ALWAYS_INLINE void LegacyHTMLDocumentParser::advance(State& state) 1605 1605 { 1606 1606 // do we need to enlarge the buffer? … … 1710 1710 } 1711 1711 1712 void HTMLDocumentParser::willWriteHTML(const SegmentedString& source)1712 void LegacyHTMLDocumentParser::willWriteHTML(const SegmentedString& source) 1713 1713 { 1714 1714 #if ENABLE(INSPECTOR) … … 1718 1718 } 1719 1719 1720 void HTMLDocumentParser::didWriteHTML()1720 void LegacyHTMLDocumentParser::didWriteHTML() 1721 1721 { 1722 1722 #if ENABLE(INSPECTOR) … … 1726 1726 } 1727 1727 1728 void HTMLDocumentParser::write(const SegmentedString& str, bool appendData)1728 void LegacyHTMLDocumentParser::write(const SegmentedString& str, bool appendData) 1729 1729 { 1730 1730 if (!m_buffer) … … 1794 1794 } 1795 1795 1796 void HTMLDocumentParser::stopParsing()1796 void LegacyHTMLDocumentParser::stopParsing() 1797 1797 { 1798 1798 DocumentParser::stopParsing(); 1799 1799 m_timer.stop(); 1800 1800 1801 // FIXME: Why is HTMLDocumentParser the only DocumentParser which calls checkCompleted?1801 // FIXME: Why is LegacyHTMLDocumentParser the only DocumentParser which calls checkCompleted? 1802 1802 // The FrameLoader needs to know that the parser has finished with its data, 1803 1803 // regardless of whether it happened naturally or due to manual intervention. … … 1806 1806 } 1807 1807 1808 bool HTMLDocumentParser::processingData() const1808 bool LegacyHTMLDocumentParser::processingData() const 1809 1809 { 1810 1810 return m_timer.isActive() || m_inWrite; 1811 1811 } 1812 1812 1813 void HTMLDocumentParser::timerFired(Timer<HTMLDocumentParser>*)1813 void LegacyHTMLDocumentParser::timerFired(Timer<LegacyHTMLDocumentParser>*) 1814 1814 { 1815 1815 if (m_doc->view() && m_doc->view()->layoutPending() && !m_doc->minimumLayoutDelay()) { … … 1824 1824 } 1825 1825 1826 void HTMLDocumentParser::end()1826 void LegacyHTMLDocumentParser::end() 1827 1827 { 1828 1828 ASSERT(!m_timer.isActive()); … … 1848 1848 } 1849 1849 1850 void HTMLDocumentParser::finish()1850 void LegacyHTMLDocumentParser::finish() 1851 1851 { 1852 1852 // do this as long as we don't find matching comment ends … … 1886 1886 } 1887 1887 1888 bool HTMLDocumentParser::finishWasCalled()1888 bool LegacyHTMLDocumentParser::finishWasCalled() 1889 1889 { 1890 1890 return m_noMoreData; 1891 1891 } 1892 1892 1893 PassRefPtr<Node> HTMLDocumentParser::processToken()1893 PassRefPtr<Node> LegacyHTMLDocumentParser::processToken() 1894 1894 { 1895 1895 if (m_dest > m_buffer) { … … 1920 1920 } 1921 1921 1922 void HTMLDocumentParser::processDoctypeToken()1922 void LegacyHTMLDocumentParser::processDoctypeToken() 1923 1923 { 1924 1924 if (inViewSourceMode()) … … 1928 1928 } 1929 1929 1930 HTMLDocumentParser::~HTMLDocumentParser()1930 LegacyHTMLDocumentParser::~LegacyHTMLDocumentParser() 1931 1931 { 1932 1932 ASSERT(!m_inWrite); … … 1935 1935 1936 1936 1937 void HTMLDocumentParser::enlargeBuffer(int len)1937 void LegacyHTMLDocumentParser::enlargeBuffer(int len) 1938 1938 { 1939 1939 // Resize policy: Always at least double the size of the buffer each time. … … 1953 1953 } 1954 1954 1955 void HTMLDocumentParser::enlargeScriptBuffer(int len)1955 void LegacyHTMLDocumentParser::enlargeScriptBuffer(int len) 1956 1956 { 1957 1957 // Resize policy: Always at least double the size of the buffer each time. … … 1977 1977 } 1978 1978 1979 void HTMLDocumentParser::executeScriptsWaitingForStylesheets()1979 void LegacyHTMLDocumentParser::executeScriptsWaitingForStylesheets() 1980 1980 { 1981 1981 ASSERT(m_doc->haveStylesheetsLoaded()); … … 1985 1985 } 1986 1986 1987 void HTMLDocumentParser::notifyFinished(CachedResource*)1987 void LegacyHTMLDocumentParser::notifyFinished(CachedResource*) 1988 1988 { 1989 1989 executeExternalScriptsIfReady(); 1990 1990 } 1991 1991 1992 void HTMLDocumentParser::executeExternalScriptsIfReady()1992 void LegacyHTMLDocumentParser::executeExternalScriptsIfReady() 1993 1993 { 1994 1994 ASSERT(!m_pendingScripts.isEmpty()); … … 2056 2056 } 2057 2057 2058 void HTMLDocumentParser::executeExternalScriptsTimerFired(Timer<HTMLDocumentParser>*)2058 void LegacyHTMLDocumentParser::executeExternalScriptsTimerFired(Timer<LegacyHTMLDocumentParser>*) 2059 2059 { 2060 2060 if (m_doc->view() && m_doc->view()->layoutPending() && !m_doc->minimumLayoutDelay()) { … … 2068 2068 } 2069 2069 2070 bool HTMLDocumentParser::continueExecutingExternalScripts(double startTime)2070 bool LegacyHTMLDocumentParser::continueExecutingExternalScripts(double startTime) 2071 2071 { 2072 2072 if (m_externalScriptsTimer.isActive()) … … 2081 2081 } 2082 2082 2083 bool HTMLDocumentParser::isWaitingForScripts() const2083 bool LegacyHTMLDocumentParser::isWaitingForScripts() const 2084 2084 { 2085 2085 return m_state.loadingExtScript(); 2086 2086 } 2087 2087 2088 void HTMLDocumentParser::setSrc(const SegmentedString& source)2088 void LegacyHTMLDocumentParser::setSrc(const SegmentedString& source) 2089 2089 { 2090 2090 m_src = source; … … 2093 2093 void parseLegacyHTMLDocumentFragment(const String& source, DocumentFragment* fragment, FragmentScriptingPermission scriptingPermission) 2094 2094 { 2095 HTMLDocumentParser parser(fragment, scriptingPermission);2095 LegacyHTMLDocumentParser parser(fragment, scriptingPermission); 2096 2096 parser.setForceSynchronous(true); 2097 2097 parser.write(source, true); -
trunk/WebCore/html/LegacyHTMLDocumentParser.h
r61658 r61662 141 141 // down into a separate HTML lexer class. 142 142 143 class HTMLDocumentParser : public DocumentParser, public CachedResourceClient {143 class LegacyHTMLDocumentParser : public DocumentParser, public CachedResourceClient { 144 144 public: 145 HTMLDocumentParser(HTMLDocument*, bool reportErrors);146 HTMLDocumentParser(HTMLViewSourceDocument*);147 HTMLDocumentParser(DocumentFragment*, FragmentScriptingPermission = FragmentScriptingAllowed);148 virtual ~ HTMLDocumentParser();145 LegacyHTMLDocumentParser(HTMLDocument*, bool reportErrors); 146 LegacyHTMLDocumentParser(HTMLViewSourceDocument*); 147 LegacyHTMLDocumentParser(DocumentFragment*, FragmentScriptingPermission = FragmentScriptingAllowed); 148 virtual ~LegacyHTMLDocumentParser(); 149 149 150 150 virtual void write(const SegmentedString&, bool appendData); … … 166 166 167 167 virtual LegacyHTMLTreeConstructor* htmlTreeConstructor() const { return m_treeConstructor.get(); } 168 virtual HTMLDocumentParser* asHTMLDocumentParser() { return this; }168 virtual LegacyHTMLDocumentParser* asHTMLDocumentParser() { return this; } 169 169 170 170 private: … … 215 215 216 216 bool continueProcessing(int& processedCount, double startTime, State&); 217 void timerFired(Timer< HTMLDocumentParser>*);217 void timerFired(Timer<LegacyHTMLDocumentParser>*); 218 218 void allDataProcessed(); 219 219 … … 222 222 223 223 void executeExternalScriptsIfReady(); 224 void executeExternalScriptsTimerFired(Timer< HTMLDocumentParser>*);224 void executeExternalScriptsTimerFired(Timer<LegacyHTMLDocumentParser>*); 225 225 bool continueExecutingExternalScripts(double startTime); 226 226 … … 419 419 420 420 // The timer for continued processing. 421 Timer< HTMLDocumentParser> m_timer;421 Timer<LegacyHTMLDocumentParser> m_timer; 422 422 423 423 // The timer for continued executing external scripts. 424 Timer< HTMLDocumentParser> m_externalScriptsTimer;424 Timer<LegacyHTMLDocumentParser> m_externalScriptsTimer; 425 425 426 426 // This buffer can hold arbitrarily long user-defined attribute names, such as in EMBED tags. -
trunk/WebCore/html/LegacyHTMLTreeConstructor.cpp
r61107 r61662 53 53 #include "HTMLTableRowElement.h" 54 54 #include "HTMLTableSectionElement.h" 55 #include " HTMLDocumentParser.h"55 #include "LegacyHTMLDocumentParser.h" 56 56 #include "LocalizedStrings.h" 57 57 #include "Page.h" … … 1649 1649 return; 1650 1650 1651 HTMLDocumentParser* htmlTokenizer = static_cast<HTMLDocumentParser*>(m_document->parser());1651 LegacyHTMLDocumentParser* htmlTokenizer = static_cast<LegacyHTMLDocumentParser*>(m_document->parser()); 1652 1652 int lineNumber = htmlTokenizer->lineNumber() + 1; 1653 1653 -
trunk/WebCore/html/LegacyHTMLTreeConstructor.h
r61637 r61662 48 48 49 49 /** 50 * The parser for HTML. It receives a stream of tokens from the HTMLDocumentParser, and50 * The parser for HTML. It receives a stream of tokens from the LegacyHTMLDocumentParser, and 51 51 * builds up the Document structure from it. 52 52 */ -
trunk/WebCore/loader/FTPDirectoryDocument.cpp
r61104 r61662 30 30 #include "HTMLNames.h" 31 31 #include "HTMLTableElement.h" 32 #include " HTMLDocumentParser.h"32 #include "LegacyHTMLDocumentParser.h" 33 33 #include "LocalizedStrings.h" 34 34 #include "Logging.h" … … 49 49 using namespace HTMLNames; 50 50 51 class FTPDirectoryDocumentParser : public HTMLDocumentParser {51 class FTPDirectoryDocumentParser : public LegacyHTMLDocumentParser { 52 52 public: 53 53 FTPDirectoryDocumentParser(HTMLDocument*); … … 96 96 97 97 FTPDirectoryDocumentParser::FTPDirectoryDocumentParser(HTMLDocument* doc) 98 : HTMLDocumentParser(doc, false)98 : LegacyHTMLDocumentParser(doc, false) 99 99 , m_doc(doc) 100 100 , m_skipLF(false) … … 307 307 // Tokenize the template as an HTML document synchronously 308 308 setForceSynchronous(true); 309 HTMLDocumentParser::write(String(templateDocumentData->data(), templateDocumentData->size()), true);309 LegacyHTMLDocumentParser::write(String(templateDocumentData->data(), templateDocumentData->size()), true); 310 310 setForceSynchronous(false); 311 311 … … 432 432 fastFree(m_buffer); 433 433 434 HTMLDocumentParser::finish();434 LegacyHTMLDocumentParser::finish(); 435 435 } 436 436 -
trunk/WebCore/page/XSSAuditor.h
r61584 r61662 67 67 // * ScriptEventListener::createAttributeEventListener - used to create JavaScript event handlers. 68 68 // * HTMLBaseElement::process - used to set the document base URL. 69 // * HTMLDocumentParser::parseTag - used to load external JavaScript scripts.69 // * LegacyHTMLDocumentParser::parseTag - used to load external JavaScript scripts. 70 70 // * SubframeLoader::requestObject - used to load <object>/<embed> elements. 71 71 // -
trunk/WebKit/chromium/ChangeLog
r61659 r61662 1 2010-06-22 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Rename HTMLDocumentParser to LegacyHTMLDocumentParser 6 https://bugs.webkit.org/show_bug.cgi?id=41043 7 8 * src/WebEntities.cpp: 9 1 10 2010-06-22 Pavel Feldman <pfeldman@chromium.org> 2 11 -
trunk/WebKit/chromium/src/WebEntities.cpp
r61091 r61662 43 43 44 44 namespace { 45 // Note that this file is also included by HTMLDocumentParser.cpp so we are getting45 // Note that this file is also included by LegacyHTMLDocumentParser.cpp so we are getting 46 46 // two copies of the data in memory. We can fix this by changing the script 47 47 // that generated the array to create a static const that is its length, but -
trunk/WebKitTools/ChangeLog
r61660 r61662 1 2010-06-22 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Rename HTMLDocumentParser to LegacyHTMLDocumentParser 6 https://bugs.webkit.org/show_bug.cgi?id=41043 7 8 Update the hash. 9 10 * Scripts/do-webcore-rename: 11 1 12 2010-06-22 Sam Magnuson <smagnuson@netflix.com> 2 13 -
trunk/WebKitTools/Scripts/do-webcore-rename
r61583 r61662 97 97 my %renames = ( 98 98 # Renames go here in the form of: 99 # " Tokenizer" => "DocumentParser",99 # "HTMLDocumentParser" => "LegacyHTMLDocumentParser", 100 100 ); 101 101
Note: See TracChangeset
for help on using the changeset viewer.