2008-01-07 Alp Toker <alp@atoker.com>
authoralp@webkit.org <alp@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Jan 2008 19:30:40 +0000 (19:30 +0000)
committeralp@webkit.org <alp@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Jan 2008 19:30:40 +0000 (19:30 +0000)
        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=16029
        JavaScriptCore.h is not suitable for platforms other than Mac OS X

        Introduce a new JavaScriptCore/JavaScript.h public API header. This
        should be used by all new portable code using the JavaScriptCore API.

        JavaScriptCore/JavaScriptCore.h will remain for compatibility with
        existing applications that depend on it including JSStringRefCF.h
        which isn't portable.

        Also add minidom to the GTK+/autotools build since we can now support
        it on all platforms.

        * API/JSNode.h:
        * API/JSNodeList.h:
        * API/JavaScript.h: Added.
        * API/JavaScriptCore.h:
        * ForwardingHeaders/JavaScriptCore/JavaScript.h: Added.
        * GNUmakefile.am:
        * JavaScriptCore.xcodeproj/project.pbxproj:

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

JavaScriptCore/API/JSNode.h
JavaScriptCore/API/JSNodeList.h
JavaScriptCore/API/JavaScript.h [new file with mode: 0644]
JavaScriptCore/API/JavaScriptCore.h
JavaScriptCore/ChangeLog
JavaScriptCore/ForwardingHeaders/JavaScriptCore/JavaScript.h [new file with mode: 0644]
JavaScriptCore/GNUmakefile.am
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

index 493dbba5356dd290d56f4dfa1877490b7f0b52b4..c3b80cc3db8e25148597b4ab1b0ad1fb0ac3343a 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef JSNode_h
 #define JSNode_h
 
-#include "JavaScriptCore.h"
+#include <JavaScriptCore/JavaScript.h>
 #include "Node.h"
 
 extern JSObjectRef JSNode_new(JSContextRef context, Node* node);
index 4b2600385931341e220cee9ca97fe7f02314188c..b96b4a863681204dd70be0eb05e7f84f387ca735 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef JSNodeList_h
 #define JSNodeList_h
 
-#include "JavaScriptCore.h"
+#include <JavaScriptCore/JavaScript.h>
 #include "NodeList.h"
 
 extern JSObjectRef JSNodeList_new(JSContextRef, NodeList*);
diff --git a/JavaScriptCore/API/JavaScript.h b/JavaScriptCore/API/JavaScript.h
new file mode 100644 (file)
index 0000000..c6d3f9b
--- /dev/null
@@ -0,0 +1,36 @@
+// -*- mode: c++; c-basic-offset: 4 -*-
+/*
+ * Copyright (C) 2008 Alp Toker <alp@atoker.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef JavaScript_h
+#define JavaScript_h
+
+#include <JavaScriptCore/JSBase.h>
+#include <JavaScriptCore/JSContextRef.h>
+#include <JavaScriptCore/JSStringRef.h>
+#include <JavaScriptCore/JSObjectRef.h>
+#include <JavaScriptCore/JSValueRef.h>
+
+#endif // JavaScript_h
index 4d9396c3bb56fa71478d6a916472cc79cbf71df8..34169ec3e9b7e1767af972d1ff6e45456b7e8c16 100644 (file)
 #ifndef JavaScriptCore_h
 #define JavaScriptCore_h
 
-#include <JavaScriptCore/JSBase.h>
-#include <JavaScriptCore/JSContextRef.h>
-#include <JavaScriptCore/JSStringRef.h>
+#include <JavaScriptCore/JavaScript.h>
 #include <JavaScriptCore/JSStringRefCF.h>
-#include <JavaScriptCore/JSObjectRef.h>
-#include <JavaScriptCore/JSValueRef.h>
 
 #endif // JavaScriptCore_h
index 0ab6d85941ee5b9019328c78a77142a7bd5d19ee..b988e443e7c85298a10a061feb861a473d01e30a 100644 (file)
@@ -1,3 +1,28 @@
+2008-01-07  Alp Toker  <alp@atoker.com>
+
+        Reviewed by Darin.
+
+        http://bugs.webkit.org/show_bug.cgi?id=16029
+        JavaScriptCore.h is not suitable for platforms other than Mac OS X
+
+        Introduce a new JavaScriptCore/JavaScript.h public API header. This
+        should be used by all new portable code using the JavaScriptCore API.
+
+        JavaScriptCore/JavaScriptCore.h will remain for compatibility with
+        existing applications that depend on it including JSStringRefCF.h
+        which isn't portable.
+
+        Also add minidom to the GTK+/autotools build since we can now support
+        it on all platforms.
+
+        * API/JSNode.h:
+        * API/JSNodeList.h:
+        * API/JavaScript.h: Added.
+        * API/JavaScriptCore.h:
+        * ForwardingHeaders/JavaScriptCore/JavaScript.h: Added.
+        * GNUmakefile.am:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+
 2008-01-06  Eric Seidel  <eric@webkit.org>
 
         Reviewed by Sam.
diff --git a/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JavaScript.h b/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JavaScript.h
new file mode 100644 (file)
index 0000000..ab90c6d
--- /dev/null
@@ -0,0 +1 @@
+#include <JavaScriptCore/API/JavaScript.h>
index f3d6fea3ed6b2b4d7093d5bede66fff0d7a3254d..7e47d53cdbfb43077401adb6a2ff6c96a85abf5d 100644 (file)
@@ -3,12 +3,14 @@ nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
        DerivedSources/dummy.cxx
 
 javascriptcore_cppflags += \
+       -I $(srcdir)/JavaScriptCore/ForwardingHeaders \
        -I $(srcdir)/JavaScriptCore/bindings \
        -I $(srcdir)/JavaScriptCore/bindings/c \
        -I $(top_builddir)/JavaScriptCore/pcre \
        -I $(top_builddir)/JavaScriptCore/kjs
 
 javascriptcore_h_api += \
+       JavaScriptCore/API/JavaScript.h \
        JavaScriptCore/API/JavaScriptCore.h \
        JavaScriptCore/API/JSBase.h \
        JavaScriptCore/API/JSContextRef.h \
@@ -137,12 +139,25 @@ JavaScriptCore/pcre/chartables.c: $(top_builddir)/Programs/dftables$(EXEEXT)
        ./Programs/dftables $@
 
 noinst_PROGRAMS += \
-       Programs/testkjs \
-       Programs/dftables
+       Programs/dftables \
+       Programs/minidom \
+       Programs/testkjs
 
 # dftables
 Programs_dftables_SOURCES = JavaScriptCore/pcre/dftables.cpp
 
+# minidom
+Programs_minidom_SOURCES = \
+       JavaScriptCore/API/JSNode.c \
+       JavaScriptCore/API/JSNodeList.c \
+       JavaScriptCore/API/Node.c \
+       JavaScriptCore/API/NodeList.c \
+       JavaScriptCore/API/minidom.c
+Programs_minidom_CPPFLAGS = $(global_cppflags)
+Programs_minidom_CXXFLAGS = $(ICU_CFLAGS)
+Programs_minidom_LDADD = $(ICU_LIBS) libJavaScriptCore.la
+Programs_minidom_LDFLAGS = -rpath $(CURDIR)/.libs
+
 # testkjs
 Programs_testkjs_SOURCES = JavaScriptCore/kjs/testkjs.cpp
 Programs_testkjs_CPPFLAGS = $(global_cppflags)
index 6ee8dc91203f4de154c797e0cca29d3d070bf120..621225da38e4fe4a2521dd811c8b3ec8adda1cae 100644 (file)
@@ -80,6 +80,7 @@
                14BD5A300A3E91F600BAF59C /* JSContextRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14BD5A290A3E91F600BAF59C /* JSContextRef.cpp */; };
                14BD5A310A3E91F600BAF59C /* JSContextRef.h in Headers */ = {isa = PBXBuildFile; fileRef = 14BD5A2A0A3E91F600BAF59C /* JSContextRef.h */; settings = {ATTRIBUTES = (Public, ); }; };
                14BD5A320A3E91F600BAF59C /* JSValueRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14BD5A2B0A3E91F600BAF59C /* JSValueRef.cpp */; };
+               14BD5A360A3E91F600BAF59C /* JavaScript.h in Headers */ = {isa = PBXBuildFile; fileRef = 14BD5A2F0A3E91F600BAF59C /* JavaScript.h */; settings = {ATTRIBUTES = (Public, ); }; };
                14BD5A360A3E91F600BAF59C /* JavaScriptCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 14BD5A2F0A3E91F600BAF59C /* JavaScriptCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
                14DE0D690D02431400AACCA2 /* JSGlobalObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DE0D680D02431400AACCA2 /* JSGlobalObject.cpp */; };
                14F252570D08DD8D004ECFFF /* JSVariableObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 14F252560D08DD8D004ECFFF /* JSVariableObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
                14BD5A2A0A3E91F600BAF59C /* JSContextRef.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSContextRef.h; sourceTree = "<group>"; };
                14BD5A2B0A3E91F600BAF59C /* JSValueRef.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSValueRef.cpp; sourceTree = "<group>"; };
                14BD5A2D0A3E91F600BAF59C /* testapi.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testapi.c; sourceTree = "<group>"; };
+               14BD5A2F0A3E91F600BAF59C /* JavaScript.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JavaScript.h; sourceTree = "<group>"; };
                14BD5A2F0A3E91F600BAF59C /* JavaScriptCore.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JavaScriptCore.h; sourceTree = "<group>"; };
                14D857740A4696C80032146C /* testapi.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = testapi.js; sourceTree = "<group>"; };
                14DE0D680D02431400AACCA2 /* JSGlobalObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObject.cpp; sourceTree = "<group>"; };
                        isa = PBXGroup;
                        children = (
                                1482B78A0A4305AB00517CFC /* APICast.h */,
+                               14BD5A2F0A3E91F600BAF59C /* JavaScript.h */,
                                14BD5A2F0A3E91F600BAF59C /* JavaScriptCore.h */,
                                1421359A0A677F4F00A8195E /* JSBase.cpp */,
                                142711380A460BBB0080EEEA /* JSBase.h */,
                                1482B6EB0A4300B300517CFC /* JSValueRef.h in Headers */,
                                14F252570D08DD8D004ECFFF /* JSVariableObject.h in Headers */,
                                65C7A1740A8EAACB00FA37EA /* JSWrapperObject.h in Headers */,
+                               14BD5A360A3E91F600BAF59C /* JavaScript.h in Headers */,
                                14BD5A360A3E91F600BAF59C /* JavaScriptCore.h in Headers */,
                                932F5B610822A1C700736975 /* JavaScriptCorePrefix.h in Headers */,
                                65A7A5E00CD1D50E00061F8E /* LabelStack.h in Headers */,