Reviewed by John.
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Sep 2006 00:48:23 +0000 (00:48 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Sep 2006 00:48:23 +0000 (00:48 +0000)
        Removing the DOMImplementationFront workaround for an older GCC bug.
        This changes requires Xcode 2.3 or later.

        * WebCore.xcodeproj/project.pbxproj:
        * bindings/objc/DOM.mm:
        (-[DOMImplementation _initWithDOMImplementation:WebCore::]):
        (+[DOMImplementation _DOMImplementationWith:WebCore::]):
        (-[DOMImplementation WebCore::]):
        * bindings/objc/DOMImplementationFront.cpp: Removed.
        * bindings/objc/DOMImplementationFront.h: Removed.
        * bindings/objc/DOMInternal.h:
        * bindings/scripts/CodeGeneratorObjC.pm: remove DOMImplementationFront
          and some cleanup to under variables in WriteData

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16240 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/objc/DOM.mm
WebCore/bindings/objc/DOMImplementationFront.cpp [deleted file]
WebCore/bindings/objc/DOMImplementationFront.h [deleted file]
WebCore/bindings/objc/DOMInternal.h
WebCore/bindings/scripts/CodeGeneratorObjC.pm

index 687681d1a1141f97dbee56d2eb6e78b0478439b9..23ea04937fdedc8df498232dfe2220d654577367 100644 (file)
@@ -1,3 +1,21 @@
+2006-09-05  Timothy Hatcher  <timothy@apple.com>
+
+        Reviewed by John.
+
+        Removing the DOMImplementationFront workaround for an older GCC bug.
+        This changes requires Xcode 2.3 or later.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/objc/DOM.mm:
+        (-[DOMImplementation _initWithDOMImplementation:WebCore::]):
+        (+[DOMImplementation _DOMImplementationWith:WebCore::]):
+        (-[DOMImplementation WebCore::]):
+        * bindings/objc/DOMImplementationFront.cpp: Removed.
+        * bindings/objc/DOMImplementationFront.h: Removed.
+        * bindings/objc/DOMInternal.h:
+        * bindings/scripts/CodeGeneratorObjC.pm: remove DOMImplementationFront
+          and some cleanup to under variables in WriteData
+
 2006-09-05  Adele Peterson  <adele@apple.com>
 
         Reviewed by Adam.
index c7bbac628b34710cc4c63f3d74e3d0487c0019d8..40fefaa9362556b61bf40a2eeda0ae4000512cfb 100644 (file)
                93B70D7509EB0C7C009D8468 /* kjs_window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93B70D5909EB0C7C009D8468 /* kjs_window.cpp */; };
                93B70D7609EB0C7C009D8468 /* kjs_window.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D5A09EB0C7C009D8468 /* kjs_window.h */; };
                93B780CA09B3B7FE00690162 /* WidgetClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B780C909B3B7FE00690162 /* WidgetClient.h */; };
-               93C841F809CE855C00DFF5E5 /* DOMImplementationFront.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C841F709CE855C00DFF5E5 /* DOMImplementationFront.h */; };
-               93C841FF09CE858300DFF5E5 /* DOMImplementationFront.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93C841FE09CE858300DFF5E5 /* DOMImplementationFront.cpp */; };
                93CD4FDE0995F9EA007ECC97 /* AtomicString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93CD4FD70995F9EA007ECC97 /* AtomicString.cpp */; };
                93CD4FDF0995F9EA007ECC97 /* AtomicString.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CD4FD80995F9EA007ECC97 /* AtomicString.h */; };
                93CD4FE00995F9EA007ECC97 /* AtomicStringImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CD4FD90995F9EA007ECC97 /* AtomicStringImpl.h */; };
                93B70D5909EB0C7C009D8468 /* kjs_window.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = kjs_window.cpp; sourceTree = "<group>"; };
                93B70D5A09EB0C7C009D8468 /* kjs_window.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = kjs_window.h; sourceTree = "<group>"; };
                93B780C909B3B7FE00690162 /* WidgetClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WidgetClient.h; sourceTree = "<group>"; };
-               93C841F709CE855C00DFF5E5 /* DOMImplementationFront.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMImplementationFront.h; sourceTree = "<group>"; };
-               93C841FE09CE858300DFF5E5 /* DOMImplementationFront.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMImplementationFront.cpp; sourceTree = "<group>"; };
                93CA4C9909DF93FA00DF8677 /* html4.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = html4.css; sourceTree = "<group>"; };
                93CA4C9A09DF93FA00DF8677 /* make-css-file-arrays.pl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = "make-css-file-arrays.pl"; sourceTree = "<group>"; };
                93CA4C9B09DF93FA00DF8677 /* makeprop */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = makeprop; sourceTree = "<group>"; };
                                BC1A379F097C715F0019F3D8 /* DOMExtensions.h */,
                                BC1A37A0097C715F0019F3D8 /* DOMHTML.h */,
                                BC1A37A1097C715F0019F3D8 /* DOMHTML.mm */,
-                               93C841FE09CE858300DFF5E5 /* DOMImplementationFront.cpp */,
-                               93C841F709CE855C00DFF5E5 /* DOMImplementationFront.h */,
                                BC1A37A3097C715F0019F3D8 /* DOMInternal.h */,
                                BC1A37A4097C715F0019F3D8 /* DOMInternal.mm */,
                                BC1A37A5097C715F0019F3D8 /* DOMPrivate.h */,
                                93EEC20409C2877700C515D1 /* CanvasPattern.h in Headers */,
                                D0B0556809C6700100307E43 /* CreateLinkCommand.h in Headers */,
                                6522BCDF09C9DAA800C9BA7A /* ResourceRequest.h in Headers */,
-                               93C841F809CE855C00DFF5E5 /* DOMImplementationFront.h in Headers */,
                                656580F409D12B20000E61D7 /* CSSPropertyNames.h in Headers */,
                                6565815109D13043000E61D7 /* CSSValueKeywords.h in Headers */,
                                656581B209D14EE6000E61D7 /* UserAgentStyleSheets.h in Headers */,
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
+                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                        productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
                        projectDirPath = "";
                        projectRoot = "";
+                       shouldCheckCompatibility = 1;
                        targets = (
                                93F198A508245E59001E9ABC /* WebCore */,
                                DD041FBE09D9DDBE0010AF2A /* Derived Sources */,
                                93EEC26F09C3218000C515D1 /* CanvasPattern.cpp in Sources */,
                                93EEC27109C3218800C515D1 /* CanvasStyle.cpp in Sources */,
                                D0B0556909C6700100307E43 /* CreateLinkCommand.cpp in Sources */,
-                               93C841FF09CE858300DFF5E5 /* DOMImplementationFront.cpp in Sources */,
                                650F53DD09D15DDF00C9B0C8 /* CSSGrammar.cpp in Sources */,
                                65DF31DA09D1C123000BE325 /* JSAttr.cpp in Sources */,
                                65DF31F309D1CC60000BE325 /* JSCharacterData.cpp in Sources */,
index 7288c99fab1c8cb49db5470901a552bf9c7a6ed2..8dc18bcd02d40f184d2a3bc2ed24cfc898799a0d 100644 (file)
@@ -32,7 +32,7 @@
 #import "CSSStyleSheet.h"
 #import "Comment.h"
 #import "DOMHTML.h"
-#import "DOMImplementationFront.h"
+#import "DOMImplementation.h"
 #import "DOMInternal.h"
 #import "DOMPrivate.h"
 #import "DeprecatedValueList.h"
@@ -150,7 +150,6 @@ using WebCore::AtomicStringImpl;
 using WebCore::Attr;
 using WebCore::Document;
 using WebCore::DocumentFragment;
-using WebCore::DOMImplementationFront;
 using WebCore::Element;
 using WebCore::Event;
 using WebCore::EventListener;
@@ -518,7 +517,7 @@ static Class elementClass(const AtomicString& tagName)
  
 @implementation DOMImplementation (WebCoreInternal)
 
-- (id)_initWithDOMImplementation:(DOMImplementationFront *)impl
+- (id)_initWithDOMImplementation:(WebCore::DOMImplementation *)impl
 {
     ASSERT(impl);
 
@@ -529,7 +528,7 @@ static Class elementClass(const AtomicString& tagName)
     return self;
 }
 
-+ (DOMImplementation *)_DOMImplementationWith:(DOMImplementationFront *)impl
++ (DOMImplementation *)_DOMImplementationWith:(WebCore::DOMImplementation *)impl
 {
     if (!impl)
         return nil;
@@ -542,9 +541,9 @@ static Class elementClass(const AtomicString& tagName)
     return [[[self alloc] _initWithDOMImplementation:impl] autorelease];
 }
 
-- (DOMImplementationFront *)_DOMImplementation
+- (WebCore::DOMImplementation *)_DOMImplementation
 {
-    return DOM_cast<DOMImplementationFront *>(_internal);
+    return DOM_cast<WebCore::DOMImplementation *>(_internal);
 }
 
 @end
diff --git a/WebCore/bindings/objc/DOMImplementationFront.cpp b/WebCore/bindings/objc/DOMImplementationFront.cpp
deleted file mode 100644 (file)
index de3d792..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2006 Apple Computer, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#include "config.h"
-#include "DOMImplementationFront.h"
-
-#include "CSSStyleSheet.h"
-#include "DocumentType.h"
-#include "DOMImplementation.h"
-#include "HTMLDocument.h"
-
-namespace WebCore {
-
-DOMImplementationFront* implementationFront(Document* document)
-{
-    return reinterpret_cast<DOMImplementationFront*>(document->implementation());
-}
-
-void DOMImplementationFront::ref()
-{
-    reinterpret_cast<DOMImplementation*>(this)->ref();
-}
-
-void DOMImplementationFront::deref()
-{
-    reinterpret_cast<DOMImplementation*>(this)->deref();
-}
-
-bool DOMImplementationFront::hasFeature(const String& feature, const String& version) const
-{
-    return reinterpret_cast<const DOMImplementation*>(this)->hasFeature(feature, version);
-}
-
-PassRefPtr<DocumentType> DOMImplementationFront::createDocumentType(const String& qualifiedName, const String& publicId, const String& systemId, ExceptionCode& ec)
-{
-    return reinterpret_cast<DOMImplementation*>(this)->createDocumentType(qualifiedName, publicId, systemId, ec);
-}
-
-PassRefPtr<Document> DOMImplementationFront::createDocument(const String& namespaceURI, const String& qualifiedName, DocumentType* type, ExceptionCode& ec)
-{
-    return reinterpret_cast<DOMImplementation*>(this)->createDocument(namespaceURI, qualifiedName, type, ec);
-}
-
-DOMImplementationFront* DOMImplementationFront::getInterface(const String& feature) const
-{
-    return reinterpret_cast<DOMImplementationFront*>(reinterpret_cast<const DOMImplementation*>(this)->getInterface(feature));
-}
-
-PassRefPtr<CSSStyleSheet> DOMImplementationFront::createCSSStyleSheet(const String& title, const String& media, ExceptionCode& ec)
-{
-    return reinterpret_cast<DOMImplementation*>(this)->createCSSStyleSheet(title, media, ec);
-}
-
-PassRefPtr<HTMLDocument> DOMImplementationFront::createHTMLDocument(const String& title)
-{
-    return reinterpret_cast<DOMImplementation*>(this)->createHTMLDocument(title);
-}
-
-} //namespace
diff --git a/WebCore/bindings/objc/DOMImplementationFront.h b/WebCore/bindings/objc/DOMImplementationFront.h
deleted file mode 100644 (file)
index 9a95138..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2006 Apple Computer, Inc.
- * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef DOMImplementationFront_h
-#define DOMImplementationFront_h
-
-// FIXME: This source file exists to work around a problem that occurs trying
-// to mix DOMImplementation and WebCore::DOMImplementation in DOM.mm.
-// It seems to affect only older versions of gcc. Once the buildbot is upgraded,
-// we should consider increasing the minimum required version of gcc to build
-// WebCore, and rolling the change that introduced this file back.
-
-#include <wtf/Forward.h>
-
-namespace WebCore {
-
-class CSSStyleSheet;
-class Document;
-class DocumentType;
-class HTMLDocument;
-class String;
-
-typedef int ExceptionCode;
-
-class DOMImplementationFront {
-public:
-    void ref();
-    void deref();
-    bool hasFeature(const String& feature, const String& version) const;
-    PassRefPtr<DocumentType> createDocumentType(const String& qualifiedName, const String& publicId, const String& systemId, ExceptionCode&);
-    PassRefPtr<Document> createDocument(const String& namespaceURI, const String& qualifiedName, DocumentType*, ExceptionCode&);
-    DOMImplementationFront* getInterface(const String& feature) const;
-    PassRefPtr<CSSStyleSheet> createCSSStyleSheet(const String& title, const String& media, ExceptionCode&);
-    PassRefPtr<HTMLDocument> createHTMLDocument(const String& title);
-};
-
-DOMImplementationFront* implementationFront(Document*);
-
-} // namespace WebCore
-
-#endif // DOMImplementationFront_h
index 2982ed16036ee72055238b359e6ae79722756a13..6598bc6b2910af1307d44068aa2c3399fb0ebdf4 100644 (file)
@@ -85,7 +85,7 @@ namespace WebCore {
     class CSSValue;
     class Comment;
     class Counter;
-    class DOMImplementationFront;
+    class DOMImplementation;
     class DOMWindow;
     class Document;
     class DocumentFragment;
@@ -185,8 +185,8 @@ namespace WebCore {
 @end
 
 @interface DOMImplementation (WebCoreInternal)
-+ (DOMImplementation *)_DOMImplementationWith:(WebCore::DOMImplementationFront *)impl;
-- (WebCore::DOMImplementationFront *)_DOMImplementation;
++ (DOMImplementation *)_DOMImplementationWith:(WebCore::DOMImplementation *)impl;
+- (WebCore::DOMImplementation *)_DOMImplementation;
 @end
 
 @interface DOMDocument (WebCoreInternal)
@@ -406,7 +406,7 @@ ALLOW_DOM_CAST(CSSRuleList)
 ALLOW_DOM_CAST(CSSStyleDeclaration)
 ALLOW_DOM_CAST(CSSStyleSheet)
 ALLOW_DOM_CAST(CSSValue)
-ALLOW_DOM_CAST(DOMImplementationFront)
+ALLOW_DOM_CAST(DOMImplementation)
 ALLOW_DOM_CAST(HTMLCollection)
 ALLOW_DOM_CAST(HTMLOptionsCollection)
 ALLOW_DOM_CAST(MediaList)
index 812f3f7380ea00d0bc0401a895a9b0b1dfdb6fb4..43258a339626b8206da52256283ca0d9c6d9fafc 100644 (file)
@@ -232,7 +232,6 @@ sub GetImplClassName
     my $name = $codeGenerator->StripModule(shift);
 
     # special cases
-    return "DOMImplementationFront" if $name eq "DOMImplementation";
     return "RectImpl" if $name eq "Rect";
 
     return $name;
@@ -373,13 +372,6 @@ sub AddIncludesForType
         return;
     }
 
-    # Temp DOMImplementationFront.h
-    if ($type eq "DOMImplementation") {
-        $implIncludes{"DOMImplementationFront.h"} = 1;
-        $implIncludes{"DOM$type.h"} = 1;
-        return;
-    }
-
     # FIXME: for some reason it won't compile without both CSSStyleDeclaration.h
     # and CSSMutableStyleDeclaration.h
     if ($type eq "CSSStyleDeclaration") {
@@ -687,11 +679,7 @@ sub GenerateImplementation
             my $typeMaker = GetObjCTypeMaker($attribute->signature->type);
 
             # Special cases
-            if ($attributeTypeSansPtr eq "DOMImplementation") {
-                # FIXME: We have to special case DOMImplementation until DOMImplementationFront is removed
-                $getterContentHead = "[$attributeTypeSansPtr $typeMaker:implementationFront(IMPL";
-                $getterContentTail .= "]";
-            } elsif ($attributeName =~ /(\w+)DisplayString$/) {
+            if ($attributeName =~ /(\w+)DisplayString$/) {
                 my $attributeToDisplay = $1;
                 $getterContentHead = "IMPL->$attributeToDisplay().replace(\'\\\\\', [self _element]->document()->backslashAsCurrencySymbol()";
                 $implIncludes{"Document.h"} = 1;
@@ -971,8 +959,8 @@ sub WriteData
     close($IMPL);
     undef($IMPL);
 
-    @implHeaderContent = "";
-    @implContent = "";    
+    undef(@implContentHeader);
+    undef(@implContent);
     %implIncludes = ();
 
     # Write public header.
@@ -996,8 +984,8 @@ sub WriteData
     close($HEADER);
     undef($HEADER);
 
-    @headerContentHeader = "";
-    @headerContent = "";
+    undef(@headerContentHeader);
+    undef(@headerContent);
     %headerForwardDeclarations = ();
     %headerForwardDeclarationsForProtocols = ();
 
@@ -1022,7 +1010,8 @@ sub WriteData
         close($PRIVATE_HEADER);
         undef($PRIVATE_HEADER);
 
-        @privateHeaderContent = "";
+        undef(@privateHeaderContentHeader);
+        undef(@privateHeaderContent);
         %privateHeaderForwardDeclarations = ();
         %privateHeaderForwardDeclarationsForProtocols = ();
     }