Changeset 36630 in webkit for trunk/JavaScriptCore/wtf/Platform.h


Ignore:
Timestamp:
Sep 18, 2008, 4:28:34 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore
2008-09-18 Holger Hans Peter Freyther <[email protected]>

Reviewed by Mark Rowe.

https://bugs.webkit.org/show_bug.cgi?id=20437

Add a proper #define to define which XML Parser implementation to use. Client
code can use #if USE(QXMLSTREAM) to decide if the Qt XML StreamReader
implementation is going to be used.

  • wtf/Platform.h:

WebCore
2008-09-18 Holger Hans Peter Freyther <[email protected]>

Reviewed by Mark Rowe.

https://bugs.webkit.org/show_bug.cgi?id=20437

XMLTokenizer.cpp used to contain two different implementations. One was using
libxml2 and the other was using the Qt XML StreamReader. Clean up the code by
separating the two implementations from each other.
Common code and some small bits are kept inside the XMLTokenizer.cpp, the Qt code
was moved to XMLTokenizerQt.cpp and the Libxml2 based code was moved to
XMLTokenizerLibxml2.cpp. There should be no functional changes.

Attempt to add XMLTokenizerLibxml2.cpp to every buildsystem so the build continues
to work.

  • GNUmakefile.am:
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • WebCoreSources.bkl:
  • dom/XMLTokenizer.cpp: (WebCore::isScriptElement): (WebCore::castToScriptElement): (WebCore::XMLTokenizer::setCurrentNode): (WebCore::XMLTokenizer::write): (WebCore::XMLTokenizer::eventuallyMarkAsParserCreated): (WebCore::XMLTokenizer::enterText): (WebCore::toString): (WebCore::XMLTokenizer::exitText): (WebCore::XMLTokenizer::end): (WebCore::XMLTokenizer::insertErrorMessageBlock):
  • dom/XMLTokenizer.h: (WebCore::XMLTokenizer::wellFormed):
  • dom/XMLTokenizerLibxml2.cpp: Copied from WebCore/dom/XMLTokenizer.cpp. (WebCore::createMemoryParser): (WebCore::XMLTokenizer::XMLTokenizer): (WebCore::XMLTokenizer::~XMLTokenizer): (WebCore::XMLTokenizer::doWrite): (WebCore::ignorableWhitespaceHandler): (WebCore::XMLTokenizer::initializeParserContext): (WebCore::XMLTokenizer::doEnd): (WebCore::XMLTokenizer::lineNumber): (WebCore::XMLTokenizer::columnNumber): (WebCore::XMLTokenizer::stopParsing): (WebCore::XMLTokenizer::resumeParsing): (WebCore::parseXMLDocumentFragment): (WebCore::attributesStartElementNsHandler): (WebCore::parseAttributes):
  • dom/XMLTokenizerQt.cpp: Copied from WebCore/dom/XMLTokenizer.cpp. (WebCore::EntityResolver::resolveUndeclaredEntity): (WebCore::XMLTokenizer::XMLTokenizer): (WebCore::XMLTokenizer::~XMLTokenizer): (WebCore::XMLTokenizer::doWrite): (WebCore::XMLTokenizer::initializeParserContext): (WebCore::XMLTokenizer::doEnd): (WebCore::XMLTokenizer::lineNumber): (WebCore::XMLTokenizer::columnNumber): (WebCore::XMLTokenizer::stopParsing): (WebCore::XMLTokenizer::resumeParsing): (WebCore::parseXMLDocumentFragment): (WebCore::attributesStartElementNsHandler): (WebCore::parseAttributes): (WebCore::):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/Platform.h

    r36328 r36630  
    358358#endif
    359359
     360/* Use the QtXmlStreamReader implementation for XMLTokenizer */
     361#if PLATFORM(QT)
     362#if !ENABLE(XSLT)
     363#define WTF_USE_QXMLSTREAM 1
     364#endif
     365#endif
     366
    360367#endif /* WTF_Platform_h */
Note: See TracChangeset for help on using the changeset viewer.