Title: [173220] trunk/Source/WebCore
Revision
173220
Author
ander...@apple.com
Date
2014-09-03 13:18:36 -0700 (Wed, 03 Sep 2014)

Log Message

Get rid of DOMImplementationFront
https://bugs.webkit.org/show_bug.cgi?id=136495

Reviewed by Andreas Kling.

DOMImplementationFront was used in a workaround for a GCC bug, and since we're building with clang
on Mac this is no longer an issue.

* WebCore.xcodeproj/project.pbxproj:
* bindings/objc/DOMImplementationFront.cpp: Removed.
* bindings/objc/DOMImplementationFront.h: Removed.
Remove files.

* bindings/objc/DOMUtility.mm:
(JSC::createDOMWrapper):
Remove call to implementationFront.

* bindings/scripts/CodeGeneratorObjC.pm:
(GetImplClassName):
Remove DOMImplementation special case

(AddIncludesForType):
Ditto.

(GenerateHeader):
Use the class header name in the #import in the internal header.

(GenerateImplementation):
Remove DOMImplementation special case.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (173219 => 173220)


--- trunk/Source/WebCore/ChangeLog	2014-09-03 20:12:31 UTC (rev 173219)
+++ trunk/Source/WebCore/ChangeLog	2014-09-03 20:18:36 UTC (rev 173220)
@@ -1,3 +1,35 @@
+2014-09-03  Anders Carlsson  <ander...@apple.com>
+
+        Get rid of DOMImplementationFront
+        https://bugs.webkit.org/show_bug.cgi?id=136495
+
+        Reviewed by Andreas Kling.
+
+        DOMImplementationFront was used in a workaround for a GCC bug, and since we're building with clang
+        on Mac this is no longer an issue.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/objc/DOMImplementationFront.cpp: Removed.
+        * bindings/objc/DOMImplementationFront.h: Removed.
+        Remove files.
+
+        * bindings/objc/DOMUtility.mm:
+        (JSC::createDOMWrapper):
+        Remove call to implementationFront.
+
+        * bindings/scripts/CodeGeneratorObjC.pm:
+        (GetImplClassName):
+        Remove DOMImplementation special case
+
+        (AddIncludesForType):
+        Ditto.
+
+        (GenerateHeader):
+        Use the class header name in the #import in the internal header.
+
+        (GenerateImplementation):
+        Remove DOMImplementation special case.
+
 2014-09-03  Brent Fulgham  <bfulg...@apple.com>
 
         [Win] Improper release of unretained AVCFAssetResourceLoaderRef

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (173219 => 173220)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-09-03 20:12:31 UTC (rev 173219)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-09-03 20:18:36 UTC (rev 173220)
@@ -3290,8 +3290,6 @@
 		93C4A4151629DF5A00C3EB6E /* ScrollingTreeFrameScrollingNodeMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C4A4131629DF5A00C3EB6E /* ScrollingTreeFrameScrollingNodeMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		93C4A4161629DF5A00C3EB6E /* ScrollingTreeFrameScrollingNodeMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93C4A4141629DF5A00C3EB6E /* ScrollingTreeFrameScrollingNodeMac.mm */; };
 		93C4F6EB1108F9A50099D0DB /* AccessibilityScrollbar.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C4F6E91108F9A50099D0DB /* AccessibilityScrollbar.h */; };
-		93C841F809CE855C00DFF5E5 /* DOMImplementationFront.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C841F709CE855C00DFF5E5 /* DOMImplementationFront.h */; };
-		93C841FF09CE858300DFF5E5 /* DOMImplementationFront.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93C841FE09CE858300DFF5E5 /* DOMImplementationFront.cpp */; };
 		93CCF0270AF6C52900018E89 /* NavigationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CCF0260AF6C52900018E89 /* NavigationAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		93CCF0600AF6CA7600018E89 /* NavigationAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93CCF05F0AF6CA7600018E89 /* NavigationAction.cpp */; };
 		93D3C1590F97A9D70053C013 /* DOMHTMLCanvasElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3C1580F97A9D70053C013 /* DOMHTMLCanvasElement.h */; };
@@ -10411,8 +10409,6 @@
 		93C4A4131629DF5A00C3EB6E /* ScrollingTreeFrameScrollingNodeMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingTreeFrameScrollingNodeMac.h; sourceTree = "<group>"; };
 		93C4A4141629DF5A00C3EB6E /* ScrollingTreeFrameScrollingNodeMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollingTreeFrameScrollingNodeMac.mm; sourceTree = "<group>"; };
 		93C4F6E91108F9A50099D0DB /* AccessibilityScrollbar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityScrollbar.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 /* html.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = html.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.pl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = makeprop.pl; sourceTree = "<group>"; };
@@ -16759,8 +16755,6 @@
 		854F12AC0A8EBC18000940B5 /* Core */ = {
 			isa = PBXGroup;
 			children = (
-				93C841FE09CE858300DFF5E5 /* DOMImplementationFront.cpp */,
-				93C841F709CE855C00DFF5E5 /* DOMImplementationFront.h */,
 				856C8AE20A912649005C687B /* DOMObject.h */,
 				856C8AE30A912649005C687B /* DOMObject.mm */,
 			);
@@ -23946,7 +23940,6 @@
 				85BA4D170AA688680088052D /* DOMHTMLUListElement.h in Headers */,
 				85E711D00AC5D5350053270F /* DOMHTMLUListElementInternal.h in Headers */,
 				A8185F3B09765766005826D9 /* DOMImplementation.h in Headers */,
-				93C841F809CE855C00DFF5E5 /* DOMImplementationFront.h in Headers */,
 				BC1A37B9097C715F0019F3D8 /* DOMInternal.h in Headers */,
 				85FF315A0AAFBFCB00374F38 /* DOMKeyboardEvent.h in Headers */,
 				85989DCC0ACC8BBD00A0BC51 /* DOMKeyboardEventInternal.h in Headers */,
@@ -27489,7 +27482,6 @@
 				85992EC10AA5069500AC0785 /* DOMHTMLTitleElement.mm in Sources */,
 				85BA4D180AA688680088052D /* DOMHTMLUListElement.mm in Sources */,
 				A8185F3E09765766005826D9 /* DOMImplementation.cpp in Sources */,
-				93C841FF09CE858300DFF5E5 /* DOMImplementationFront.cpp in Sources */,
 				BC1A37BA097C715F0019F3D8 /* DOMInternal.mm in Sources */,
 				85FF315B0AAFBFCB00374F38 /* DOMKeyboardEvent.mm in Sources */,
 				850656FF0AAB4763002D15C0 /* DOMMediaList.mm in Sources */,

Deleted: trunk/Source/WebCore/bindings/objc/DOMImplementationFront.cpp (173219 => 173220)


--- trunk/Source/WebCore/bindings/objc/DOMImplementationFront.cpp	2014-09-03 20:12:31 UTC (rev 173219)
+++ trunk/Source/WebCore/bindings/objc/DOMImplementationFront.cpp	2014-09-03 20:18:36 UTC (rev 173220)
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
- *
- * 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., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#include "config.h"
-#include "DOMImplementationFront.h"
-
-#include "CSSStyleSheet.h"
-#include "DocumentType.h"
-#include "DOMImplementation.h"
-#include "HTMLDocument.h"
-#include "JSDOMImplementation.h"
-
-namespace WebCore {
-
-DOMImplementationFront* implementationFront(Document* document)
-{
-    return reinterpret_cast<DOMImplementationFront*>(document->implementation());
-}
-
-DOMImplementationFront* implementationFront(JSDOMImplementation* wrapper)
-{
-    return reinterpret_cast<DOMImplementationFront*>(&wrapper->impl());
-}
-
-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)
-{
-    return reinterpret_cast<DOMImplementationFront*>(reinterpret_cast<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

Deleted: trunk/Source/WebCore/bindings/objc/DOMImplementationFront.h (173219 => 173220)


--- trunk/Source/WebCore/bindings/objc/DOMImplementationFront.h	2014-09-03 20:12:31 UTC (rev 173219)
+++ trunk/Source/WebCore/bindings/objc/DOMImplementationFront.h	2014-09-03 20:18:36 UTC (rev 173220)
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2006 Samuel Weinig <sam.wei...@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., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, 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 JSDOMImplementation;
-
-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);
-    PassRefPtr<CSSStyleSheet> createCSSStyleSheet(const String& title, const String& media, ExceptionCode&);
-    PassRefPtr<HTMLDocument> createHTMLDocument(const String& title);
-};
-
-DOMImplementationFront* implementationFront(Document*);
-DOMImplementationFront* implementationFront(JSDOMImplementation*);
-
-} // namespace WebCore
-
-#endif // DOMImplementationFront_h

Modified: trunk/Source/WebCore/bindings/objc/DOMUtility.mm (173219 => 173220)


--- trunk/Source/WebCore/bindings/objc/DOMUtility.mm	2014-09-03 20:12:31 UTC (rev 173219)
+++ trunk/Source/WebCore/bindings/objc/DOMUtility.mm	2014-09-03 20:18:36 UTC (rev 173220)
@@ -32,9 +32,9 @@
 #import "DOMCSSStyleDeclarationInternal.h"
 #import "DOMCSSValueInternal.h"
 #import "DOMCounterInternal.h"
+#import "DOMDOMImplementationInternal.h"
 #import "DOMEventInternal.h"
 #import "DOMHTMLCollectionInternal.h"
-#import "DOMImplementationFront.h"
 #import "DOMInternal.h"
 #import "DOMMediaListInternal.h"
 #import "DOMNamedNodeMapInternal.h"
@@ -76,9 +76,6 @@
 #import "WebScriptObjectPrivate.h"
 #import "runtime_root.h"
 
-// FIXME: Couldn't get an include of "DOMDOMImplementationInternal.h" to work here.
-DOMImplementation *kit(WebCore::DOMImplementationFront*);
-
 // This file makes use of both the ObjC DOM API and the C++ DOM API, so we need to be careful about what
 // headers are included and what namespaces we use to avoid naming conflicts.
 
@@ -127,7 +124,7 @@
         return kit(&static_cast<WebCore::JSDOMWindowShell*>(object)->impl());
 
     if (object->inherits(WebCore::JSDOMImplementation::info()))
-        return kit(implementationFront(static_cast<WebCore::JSDOMImplementation*>(object)));
+        return kit(&static_cast<WebCore::JSDOMImplementation*>(object)->impl());
 
     return nil;
 }

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm (173219 => 173220)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm	2014-09-03 20:12:31 UTC (rev 173219)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm	2014-09-03 20:18:36 UTC (rev 173220)
@@ -420,7 +420,6 @@
 {
     my $name = shift;
 
-    return "DOMImplementationFront" if $name eq "DOMImplementation";
     return "DOMWindow" if $name eq "AbstractView";
     return $name;
 }
@@ -680,12 +679,6 @@
         return;
     }
 
-    if ($type eq "DOMImplementation") {
-        $implIncludes{"DOMDOMImplementationInternal.h"} = 1;
-        $implIncludes{"DOMImplementationFront.h"} = 1;
-        return;
-    }
-
     if ($type eq "EventTarget") {
         $implIncludes{"Node.h"} = 1;
         $implIncludes{"DOMEventTarget.h"} = 1;
@@ -1101,7 +1094,8 @@
             @internalHeaderContent = split("\r", $implementationLicenseTemplate);
         }
 
-        push(@internalHeaderContent, "\n#import <WebCore/$className.h>\n\n");
+        my $classHeaderName = GetClassHeaderName($className);
+        push(@internalHeaderContent, "\n#import <WebCore/$classHeaderName.h>\n\n");
 
         if ($interfaceName eq "Node") {
             push(@internalHeaderContent, "\@protocol DOMEventTarget;\n\n");
@@ -1303,11 +1297,7 @@
 
             # Special cases
             my @customGetterContent = (); 
-            if ($attributeTypeSansPtr eq "DOMImplementation") {
-                # FIXME: We have to special case DOMImplementation until DOMImplementationFront is removed
-                $getterContentHead = "kit(implementationFront(IMPL";
-                $getterContentTail .= ")";
-            } elsif ($attributeName =~ /(\w+)DisplayString$/) {
+            if ($attributeName =~ /(\w+)DisplayString$/) {
                 my $attributeToDisplay = $1;
                 $getterContentHead = "WebCore::displayString(IMPL->$attributeToDisplay(), core(self)";
                 $implIncludes{"HitTestResult.h"} = 1;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to