[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

weinig at apple.com weinig at apple.com
Wed Dec 22 14:30:08 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit cd8f8c127154eee52d3f24f316aa14d2f926f71b
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 12 00:05:21 2010 +0000

    Add ability to convert from a JSObjectRef back to a WKBundleNodeHandleRef
    https://bugs.webkit.org/show_bug.cgi?id=47509
    
    Reviewed by Anders Carlsson.
    
    WebCore:
    
    * WebCore.exp.in: Export toNode.
    
    WebKit2:
    
    Add SPI to convert a JSObjectRef to a WKBundleNodeHandleRef.
    
    * DerivedSources.pro:
    * WebKit2.pro:
    * WebKit2.xcodeproj/project.pbxproj:
    * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
    (WKBundleNodeHandleCreate):
    * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: Added.
    * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
    (WebKit::InjectedBundleNodeHandle::getOrCreate):
    * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
    * win/WebKit2.vcproj:
    * win/WebKit2Generated.make:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69539 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a209324..f0cad53 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,12 @@
+2010-10-11  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Anders Carlsson.
+
+        Add ability to convert from a JSObjectRef back to a WKBundleNodeHandleRef
+        https://bugs.webkit.org/show_bug.cgi?id=47509
+
+        * WebCore.exp.in: Export toNode.
+
 2010-10-11  Martin Robinson  <mrobinson at igalia.com>
 
         Reviewed by Tony Chang.
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index d1dc021..732dde8 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -672,6 +672,7 @@ __ZN7WebCore6Widget9setParentEPNS_10ScrollViewE
 __ZN7WebCore6WidgetC1EP6NSView
 __ZN7WebCore6WidgetC2EP6NSView
 __ZN7WebCore6WidgetD2Ev
+__ZN7WebCore6toNodeEN3JSC7JSValueE
 __ZN7WebCore7Console21shouldPrintExceptionsEv
 __ZN7WebCore7Console24setShouldPrintExceptionsEb
 __ZN7WebCore7IntRect5uniteERKS0_
@@ -733,7 +734,6 @@ __ZN7WebCore8Settings24setDNSPrefetchingEnabledEb
 __ZN7WebCore8Settings24setTextAreasAreResizableEb
 __ZN7WebCore8Settings25setDeveloperExtrasEnabledEb
 __ZN7WebCore8Settings25setFrameFlatteningEnabledEb
-__ZN7WebCore8Settings27setSpatialNavigationEnabledEb
 __ZN7WebCore8Settings25setMinimumLogicalFontSizeEi
 __ZN7WebCore8Settings25setNeedsLeopardMailQuirksEb
 __ZN7WebCore8Settings25setPrivateBrowsingEnabledEb
@@ -744,6 +744,7 @@ __ZN7WebCore8Settings26setNeedsSiteSpecificQuirksEb
 __ZN7WebCore8Settings27setFTPDirectoryTemplatePathERKN3WTF6StringE
 __ZN7WebCore8Settings27setLoadsImagesAutomaticallyEb
 __ZN7WebCore8Settings27setLocalStorageDatabasePathERKN3WTF6StringE
+__ZN7WebCore8Settings27setSpatialNavigationEnabledEb
 __ZN7WebCore8Settings28setForceFTPDirectoryListingsEb
 __ZN7WebCore8Settings29setAccelerated2dCanvasEnabledEb
 __ZN7WebCore8Settings29setAuthorAndUserStylesEnabledEb
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 4df2196..425c751 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,24 @@
+2010-10-11  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Anders Carlsson.
+
+        Add ability to convert from a JSObjectRef back to a WKBundleNodeHandleRef
+        https://bugs.webkit.org/show_bug.cgi?id=47509
+
+        Add SPI to convert a JSObjectRef to a WKBundleNodeHandleRef.
+
+        * DerivedSources.pro:
+        * WebKit2.pro:
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
+        (WKBundleNodeHandleCreate):
+        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: Added.
+        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
+        (WebKit::InjectedBundleNodeHandle::getOrCreate):
+        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
+        * win/WebKit2.vcproj:
+        * win/WebKit2Generated.make:
+
 2010-10-11  Brady Eidson  <beidson at apple.com>
 
         Reviewed by Darin Adler and Sam Weinig.
diff --git a/WebKit2/DerivedSources.pro b/WebKit2/DerivedSources.pro
index 4952ea4..157089c 100644
--- a/WebKit2/DerivedSources.pro
+++ b/WebKit2/DerivedSources.pro
@@ -9,6 +9,7 @@ WEBCORE_GENERATED_HEADERS_FOR_WEBKIT2 += \
     $$OUTPUT_DIR/WebCore/generated/JSDOMWindow.h \
     $$OUTPUT_DIR/WebCore/generated/JSElement.h \
     $$OUTPUT_DIR/WebCore/generated/JSHTMLElement.h \
+    $$OUTPUT_DIR/WebCore/generated/JSNode.h \
     $$OUTPUT_DIR/WebCore/generated/JSRange.h \
 
 
diff --git a/WebKit2/WebKit2.pro b/WebKit2/WebKit2.pro
index 6b40fb8..5fbd32a 100644
--- a/WebKit2/WebKit2.pro
+++ b/WebKit2/WebKit2.pro
@@ -257,8 +257,10 @@ HEADERS += \
     UIProcess/WebProcessManager.h \
     UIProcess/WebProcessProxy.h \
     UIProcess/WebUIClient.h \
-    WebProcess/InjectedBundle/API/c/WKBundlePage.h \
     WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h \
+    WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h \
+    WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h \
+    WebProcess/InjectedBundle/API/c/WKBundlePage.h \
     WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h \
     WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h \
     WebProcess/InjectedBundle/InjectedBundle.h \
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index b3b3380..255cfdb 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -283,6 +283,7 @@
 		BC4BEEAC120A0A5F00FBA0C7 /* InjectedBundleNodeHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC4BEEAA120A0A5F00FBA0C7 /* InjectedBundleNodeHandle.cpp */; };
 		BC4BEFE1120A1A4C00FBA0C7 /* WKBundleNodeHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = BC4BEFDF120A1A4C00FBA0C7 /* WKBundleNodeHandle.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		BC4BEFE2120A1A4C00FBA0C7 /* WKBundleNodeHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC4BEFE0120A1A4C00FBA0C7 /* WKBundleNodeHandle.cpp */; };
+		BC57450C1263B155006F0F12 /* WKBundleNodeHandlePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = BC57450B1263B155006F0F12 /* WKBundleNodeHandlePrivate.h */; };
 		BC59534210FC04520098F82D /* WebLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BC59534010FC04520098F82D /* WebLoaderClient.h */; };
 		BC597075116591D000551FCA /* ProcessModel.h in Headers */ = {isa = PBXBuildFile; fileRef = BC597074116591D000551FCA /* ProcessModel.h */; };
 		BC5F7BB41182376C0052C02C /* ChunkedUpdateDrawingArea.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC5F7BB21182376C0052C02C /* ChunkedUpdateDrawingArea.cpp */; };
@@ -746,6 +747,7 @@
 		BC4BEEAA120A0A5F00FBA0C7 /* InjectedBundleNodeHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleNodeHandle.cpp; sourceTree = "<group>"; };
 		BC4BEFDF120A1A4C00FBA0C7 /* WKBundleNodeHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundleNodeHandle.h; sourceTree = "<group>"; };
 		BC4BEFE0120A1A4C00FBA0C7 /* WKBundleNodeHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKBundleNodeHandle.cpp; sourceTree = "<group>"; };
+		BC57450B1263B155006F0F12 /* WKBundleNodeHandlePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundleNodeHandlePrivate.h; sourceTree = "<group>"; };
 		BC59534010FC04520098F82D /* WebLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebLoaderClient.h; sourceTree = "<group>"; };
 		BC597074116591D000551FCA /* ProcessModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessModel.h; sourceTree = "<group>"; };
 		BC5F7BB21182376C0052C02C /* ChunkedUpdateDrawingArea.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChunkedUpdateDrawingArea.cpp; sourceTree = "<group>"; };
@@ -1556,6 +1558,7 @@
 				BC204EED11C83EC8008F3375 /* WKBundleInitialize.h */,
 				BC4BEFE0120A1A4C00FBA0C7 /* WKBundleNodeHandle.cpp */,
 				BC4BEFDF120A1A4C00FBA0C7 /* WKBundleNodeHandle.h */,
+				BC57450B1263B155006F0F12 /* WKBundleNodeHandlePrivate.h */,
 				BC20528011C94284008F3375 /* WKBundlePage.cpp */,
 				BC20527F11C94284008F3375 /* WKBundlePage.h */,
 				BC1B419711D41D570011E8DD /* WKBundlePagePrivate.h */,
@@ -1983,6 +1986,7 @@
 				1A3DD202125E5A1F004515E6 /* WebFindClient.h in Headers */,
 				1A3DD206125E5A2F004515E6 /* APIClient.h in Headers */,
 				BCC8B374125FB69000DE46A4 /* WKGeometry.h in Headers */,
+				BC57450C1263B155006F0F12 /* WKBundleNodeHandlePrivate.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp
index 5c4e111..2527005 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp
@@ -24,6 +24,7 @@
  */
 
 #include "WKBundleNodeHandle.h"
+#include "WKBundleNodeHandlePrivate.h"
 
 #include "InjectedBundleNodeHandle.h"
 #include "WKAPICast.h"
@@ -35,3 +36,9 @@ WKTypeID WKBundleNodeHandleGetTypeID()
 {
     return toAPI(InjectedBundleNodeHandle::APIType);
 }
+
+WKBundleNodeHandleRef WKBundleNodeHandleCreate(JSContextRef contextRef, JSObjectRef objectRef)
+{
+    RefPtr<InjectedBundleNodeHandle> nodeHandle = InjectedBundleNodeHandle::getOrCreate(contextRef, objectRef);
+    return toAPI(nodeHandle.release().releaseRef());
+}
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h
new file mode 100644
index 0000000..510ca02
--- /dev/null
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * 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 INC. AND ITS CONTRIBUTORS ``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 INC. OR ITS 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 WKBundleNodeHandlePrivate_h
+#define WKBundleNodeHandlePrivate_h
+
+#include <JavaScriptCore/JavaScript.h>
+#include <WebKit2/WKBase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT WKBundleNodeHandleRef WKBundleNodeHandleCreate(JSContextRef context, JSObjectRef object);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* WKBundleNodeHandlePrivate_h */
diff --git a/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp b/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
index cb312f8..8caaecb 100644
--- a/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
@@ -25,6 +25,8 @@
 
 #include "InjectedBundleNodeHandle.h"
 
+#include <JavaScriptCore/APICast.h>
+#include <WebCore/JSNode.h>
 #include <WebCore/Node.h>
 #include <wtf/HashMap.h>
 
@@ -40,6 +42,12 @@ static DOMHandleCache& domHandleCache()
     return cache;
 }
 
+PassRefPtr<InjectedBundleNodeHandle> InjectedBundleNodeHandle::getOrCreate(JSContextRef, JSObjectRef object)
+{
+    Node* node = toNode(toJS(object));
+    return getOrCreate(node);
+}
+
 PassRefPtr<InjectedBundleNodeHandle> InjectedBundleNodeHandle::getOrCreate(Node* node)
 {
     if (!node)
diff --git a/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h b/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h
index e577d23..8f65d91 100644
--- a/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h
+++ b/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h
@@ -24,6 +24,7 @@
  */
 
 #include "APIObject.h"
+#include <JavaScriptCore/JSBase.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefPtr.h>
 
@@ -39,7 +40,9 @@ class InjectedBundleNodeHandle : public APIObject {
 public:
     static const Type APIType = TypeBundleNodeHandle;
 
+    static PassRefPtr<InjectedBundleNodeHandle> getOrCreate(JSContextRef context, JSObjectRef object);
     static PassRefPtr<InjectedBundleNodeHandle> getOrCreate(WebCore::Node*);
+
     ~InjectedBundleNodeHandle();
 
     WebCore::Node* coreNode() const;
diff --git a/WebKit2/win/WebKit2.vcproj b/WebKit2/win/WebKit2.vcproj
index 28685b1..8607b5c 100755
--- a/WebKit2/win/WebKit2.vcproj
+++ b/WebKit2/win/WebKit2.vcproj
@@ -1182,6 +1182,10 @@
 							>
 						</File>
 						<File
+							RelativePath="..\WebProcess\InjectedBundle\API\c\WKBundleNodeHandlePrivate.h"
+							>
+						</File>
+						<File
 							RelativePath="..\WebProcess\InjectedBundle\API\c\WKBundlePage.cpp"
 							>
 						</File>
diff --git a/WebKit2/win/WebKit2Generated.make b/WebKit2/win/WebKit2Generated.make
index 8240022..90e20b1 100644
--- a/WebKit2/win/WebKit2Generated.make
+++ b/WebKit2/win/WebKit2Generated.make
@@ -48,6 +48,7 @@ all:
     xcopy /y /d "..\WebProcess\InjectedBundle\API\c\WKBundleFramePrivate.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\WebProcess\InjectedBundle\API\c\WKBundleInitialize.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\WebProcess\InjectedBundle\API\c\WKBundleNodeHandle.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
+    xcopy /y /d "..\WebProcess\InjectedBundle\API\c\WKBundleNodeHandlePrivate.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\WebProcess\InjectedBundle\API\c\WKBundlePage.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\WebProcess\InjectedBundle\API\c\WKBundlePagePrivate.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\WebProcess\InjectedBundle\API\c\WKBundlePrivate.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list