Changeset 56412 in webkit


Ignore:
Timestamp:
Mar 23, 2010 1:48:19 PM (14 years ago)
Author:
Darin Adler
Message:

2010-03-23 Darin Adler <Darin Adler>

Reviewed by Sam Weinig.

Reduce and straighten internal use of DOMImplementation
https://bugs.webkit.org/show_bug.cgi?id=36501

  • WebCore.xcodeproj/project.pbxproj: Xcode decided to re-sort this file.
  • dom/Clipboard.cpp: Removed unneeded include of DOMImplementation.h.
  • dom/DOMImplementation.cpp: Removed unneeded createDocument and createHTMLDocument functions. These should be done directly instead of involving the DOMImplementation class.
  • dom/DOMImplementation.h: Ditto.
  • dom/DocumentType.cpp: Removed unneeded include of DOMImplementation.h.
  • html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createTokenizer): Don't allocate a DOMImplementation object just to use a class member function.
  • loader/CachedFont.cpp: Removed unneeded include of DOMImplementation.h.
  • xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseXML): Use Document::create to create a new document instead of involving DOMImplementation.
  • xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::createDocumentFromSource): Ditto. And in the case where we do need to call DOMImplementation to interpret the MIME type, don't allocate a DOMImplementation object just to use a class member function.
Location:
trunk/WebCore
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r56411 r56412  
     12010-03-23  Darin Adler  <darin@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Reduce and straighten internal use of DOMImplementation
     6        https://bugs.webkit.org/show_bug.cgi?id=36501
     7
     8        * WebCore.xcodeproj/project.pbxproj: Xcode decided to
     9        re-sort this file.
     10
     11        * dom/Clipboard.cpp: Removed unneeded include of DOMImplementation.h.
     12
     13        * dom/DOMImplementation.cpp: Removed unneeded createDocument and
     14        createHTMLDocument functions. These should be done directly instead
     15        of involving the DOMImplementation class.
     16        * dom/DOMImplementation.h: Ditto.
     17
     18        * dom/DocumentType.cpp: Removed unneeded include of DOMImplementation.h.
     19
     20        * html/HTMLViewSourceDocument.cpp:
     21        (WebCore::HTMLViewSourceDocument::createTokenizer): Don't allocate a
     22        DOMImplementation object just to use a class member function.
     23
     24        * loader/CachedFont.cpp: Removed unneeded include of DOMImplementation.h.
     25
     26        * xml/XMLHttpRequest.cpp:
     27        (WebCore::XMLHttpRequest::responseXML): Use Document::create to create a
     28        new document instead of involving DOMImplementation.
     29        * xml/XSLTProcessor.cpp:
     30        (WebCore::XSLTProcessor::createDocumentFromSource): Ditto. And in the case
     31        where we do need to call DOMImplementation to interpret the MIME type,
     32        don't allocate a DOMImplementation object just to use a class member
     33        function.
     34
    1352010-03-23  Luiz Agostini  <luiz.agostini@openbossa.org>
    236
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r56394 r56412  
    24882488                9F72305011184B4100AD0126 /* ScriptProfiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9F72304D11184B4100AD0126 /* ScriptProfiler.cpp */; };
    24892489                9F72305111184B4100AD0126 /* ScriptProfiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F72304E11184B4100AD0126 /* ScriptProfiler.h */; settings = {ATTRIBUTES = (Private, ); }; };
     2490                A136A00C1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A136A00A1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp */; };
     2491                A136A00D1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.h in Headers */ = {isa = PBXBuildFile; fileRef = A136A00B1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.h */; };
    24902492                A17C81220F2A5CF7005DAAEB /* HTMLElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */; };
    24912493                A17C81230F2A5CF7005DAAEB /* HTMLElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */; };
     
    43964398                BC772C460C4EB2C60083285F /* XMLHttpRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC772C440C4EB2C60083285F /* XMLHttpRequest.cpp */; };
    43974399                BC772C470C4EB2C60083285F /* XMLHttpRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = BC772C450C4EB2C60083285F /* XMLHttpRequest.h */; };
    4398                 A136A00C1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A136A00A1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp */; };
    4399                 A136A00D1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.h in Headers */ = {isa = PBXBuildFile; fileRef = A136A00B1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.h */; };
    44004400                BC772C4E0C4EB3040083285F /* MIMETypeRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC772C4C0C4EB3040083285F /* MIMETypeRegistry.cpp */; };
    44014401                BC772C4F0C4EB3040083285F /* MIMETypeRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = BC772C4D0C4EB3040083285F /* MIMETypeRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; };
  • trunk/WebCore/dom/Clipboard.cpp

    r55977 r56412  
    2828
    2929#include "CachedImage.h"
    30 #include "DOMImplementation.h"
    3130#include "Frame.h"
    3231#include "FrameLoader.h"
  • trunk/WebCore/dom/DOMImplementation.cpp

    r55449 r56412  
    274274}
    275275
    276 PassRefPtr<Document> DOMImplementation::createDocument(Frame* frame)
    277 {
    278     return Document::create(frame);
    279 }
    280 
    281 PassRefPtr<HTMLDocument> DOMImplementation::createHTMLDocument(Frame* frame)
    282 {
    283     return HTMLDocument::create(frame);
    284 }
    285 
    286276bool DOMImplementation::isXMLMIMEType(const String& mimeType)
    287277{
  • trunk/WebCore/dom/DOMImplementation.h

    r34574 r56412  
    5858    // Other methods (not part of DOM)
    5959    static PassRefPtr<Document> createDocument(const String& MIMEType, Frame*, bool inViewSourceMode);
    60     static PassRefPtr<Document> createDocument(Frame*);
    61     static PassRefPtr<HTMLDocument> createHTMLDocument(Frame*);
    6260
    6361    static bool isXMLMIMEType(const String& MIMEType);
  • trunk/WebCore/dom/DocumentType.cpp

    r47313 r56412  
    2424#include "DocumentType.h"
    2525
    26 #include "DOMImplementation.h"
    2726#include "Document.h"
    2827#include "NamedNodeMap.h"
  • trunk/WebCore/html/HTMLViewSourceDocument.cpp

    r47688 r56412  
    5555{
    5656    // Use HTMLTokenizer if applicable, otherwise use TextTokenizer.
    57     if (m_type == "text/html" || m_type == "application/xhtml+xml" || m_type == "image/svg+xml" || implementation()->isXMLMIMEType(m_type)
     57    if (m_type == "text/html" || m_type == "application/xhtml+xml" || m_type == "image/svg+xml" || DOMImplementation::isXMLMIMEType(m_type)
    5858#if ENABLE(XHTMLMP)
    5959        || m_type == "application/vnd.wap.xhtml+xml"
  • trunk/WebCore/loader/CachedFont.cpp

    r55643 r56412  
    3535#include "CachedResourceClient.h"
    3636#include "CachedResourceClientWalker.h"
    37 #include "DOMImplementation.h"
    3837#include "FontPlatformData.h"
    3938#include "SharedBuffer.h"
  • trunk/WebCore/xml/XMLHttpRequest.cpp

    r56394 r56412  
    217217            m_responseXML = 0;
    218218        } else {
    219             m_responseXML = document()->implementation()->createDocument(0);
     219            m_responseXML = Document::create(0);
    220220            m_responseXML->open();
    221221            m_responseXML->setURL(m_url);
  • trunk/WebCore/xml/XSLTProcessor.cpp

    r55633 r56412  
    7070    RefPtr<Document> result;
    7171    if (sourceMIMEType == "text/plain") {
    72         result = ownerDocument->implementation()->createDocument(frame);
     72        result = Document::create(frame);
    7373        transformTextStringToXHTMLDocumentString(documentSource);
    7474    } else
    75         result = ownerDocument->implementation()->createDocument(sourceMIMEType, frame, false);
     75        result = DOMImplementation::createDocument(sourceMIMEType, frame, false);
    7676
    7777    // Before parsing, we need to save & detach the old document and get the new document
Note: See TracChangeset for help on using the changeset viewer.