[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
barraclough at apple.com
barraclough at apple.com
Thu Oct 29 20:51:05 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit b84093b683461a6ac812a79a2fdb0abcc17eaa57
Author: barraclough at apple.com <barraclough at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Oct 24 00:13:03 2009 +0000
https://bugs.webkit.org/show_bug.cgi?id=30729
Provide private API to request the global context for a specific world.
Used to initialize parameters on the global object.
Patch by Gavin Barraclough <barraclough at apple.com> on 2009-10-23
Reviewed by Geoff Garen.
WebCore:
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::globalObject):
* bindings/js/ScriptController.h:
WebKit/mac:
* WebView/WebFramePrivate.h:
* WebView/WebFrame.mm:
(-[WebFrame contextForWorldID:]):
WebKit/win:
* WebFrame.cpp:
(WebFrame::contextForWorldID):
* WebFrame.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d2d2ee9..8350505 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2009-10-23 Gavin Barraclough <barraclough at apple.com>
+
+ Reviewed by Geoff Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30729
+ Provide private API to request the global context for a specific world.
+ Used to initialize parameters on the global object.
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::globalObject):
+ * bindings/js/ScriptController.h:
+
2009-10-23 Steve Block <steveblock at google.com>
Reviewed by Eric Seidel.
diff --git a/WebCore/WebCore.base.exp b/WebCore/WebCore.base.exp
index a7da54c..c0a0e67 100644
--- a/WebCore/WebCore.base.exp
+++ b/WebCore/WebCore.base.exp
@@ -370,6 +370,7 @@ __ZN7WebCore16NavigationActionC1ERKNS_4KURLENS_13FrameLoadTypeEb
__ZN7WebCore16NavigationActionC1ERKNS_4KURLENS_14NavigationTypeE
__ZN7WebCore16NavigationActionC1Ev
__ZN7WebCore16ScriptController10initScriptEPNS_15DOMWrapperWorldE
+__ZN7WebCore16ScriptController12globalObjectEj
__ZN7WebCore16ScriptController13executeScriptERKNS_6StringEb
__ZN7WebCore16ScriptController18windowScriptObjectEv
__ZN7WebCore16ScriptController28executeScriptInIsolatedWorldEjRKNS_6StringEb
diff --git a/WebCore/bindings/js/ScriptController.cpp b/WebCore/bindings/js/ScriptController.cpp
index ede6391..98b1603 100644
--- a/WebCore/bindings/js/ScriptController.cpp
+++ b/WebCore/bindings/js/ScriptController.cpp
@@ -167,6 +167,12 @@ static PassRefPtr<IsolatedWorld> findWorld(unsigned worldID)
return newWorld;
}
+JSDOMWindow* ScriptController::globalObject(unsigned worldID)
+{
+ RefPtr<DOMWrapperWorld> world = findWorld(worldID);
+ return windowShell(world.get())->window();
+}
+
ScriptValue ScriptController::evaluateInIsolatedWorld(unsigned worldID, const ScriptSourceCode& sourceCode)
{
RefPtr<DOMWrapperWorld> world = findWorld(worldID);
diff --git a/WebCore/bindings/js/ScriptController.h b/WebCore/bindings/js/ScriptController.h
index 9bab6df..d631498 100644
--- a/WebCore/bindings/js/ScriptController.h
+++ b/WebCore/bindings/js/ScriptController.h
@@ -83,6 +83,8 @@ public:
{
return windowShell(world)->window();
}
+ JSDOMWindow* globalObject(unsigned worldID);
+
void forgetWorld(DOMWrapperWorld* world)
{
m_windowShells.remove(world);
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index d70564b..3bc5301 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,15 @@
+2009-10-23 Gavin Barraclough <barraclough at apple.com>
+
+ Reviewed by Geoff Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30729
+ Provide private API to request the global context for a specific world.
+ Used to initialize parameters on the global object.
+
+ * WebView/WebFramePrivate.h:
+ * WebView/WebFrame.mm:
+ (-[WebFrame contextForWorldID:]):
+
2009-10-22 Eric Carlson <eric.carlson at apple.com>
Reviewed by John Sullivan.
diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm
index b05f425..94fe997 100644
--- a/WebKit/mac/WebView/WebFrame.mm
+++ b/WebKit/mac/WebView/WebFrame.mm
@@ -1232,6 +1232,14 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return String(result.toString(anyWorldGlobalObject->globalExec()));
}
+- (JSGlobalContextRef)contextForWorldID:(unsigned)worldID;
+{
+ Frame* coreFrame = _private->coreFrame;
+ if (!coreFrame)
+ return 0;
+ return toGlobalRef(coreFrame->script()->globalObject(worldID)->globalExec());
+}
+
@end
@implementation WebFrame
diff --git a/WebKit/mac/WebView/WebFramePrivate.h b/WebKit/mac/WebView/WebFramePrivate.h
index 046898c..be13430 100644
--- a/WebKit/mac/WebView/WebFramePrivate.h
+++ b/WebKit/mac/WebView/WebFramePrivate.h
@@ -97,6 +97,7 @@ typedef enum {
#endif
- (NSString *)_stringByEvaluatingJavaScriptInIsolatedWorld:(unsigned)worldID WithGlobalObject:(JSObjectRef)globalObject FromString:(NSString *)string;
+- (JSGlobalContextRef)contextForWorldID:(unsigned)worldID;
// Pause a given CSS animation or transition on the target node at a specific time.
// If the animation or transition is already paused, it will update its pause time.
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 8afe04d..6f166c1 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,15 @@
+2009-10-23 Gavin Barraclough <barraclough at apple.com>
+
+ Reviewed by Geoff Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30729
+ Provide private API to request the global context for a specific world.
+ Used to initialize parameters on the global object.
+
+ * WebFrame.cpp:
+ (WebFrame::contextForWorldID):
+ * WebFrame.h:
+
2009-10-23 Brian Weinstein <bweinstein at apple.com>
Reviewed by John Sullivan.
diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp
index dafa658..ea2c4f9 100644
--- a/WebKit/win/WebFrame.cpp
+++ b/WebKit/win/WebFrame.cpp
@@ -490,6 +490,16 @@ JSGlobalContextRef STDMETHODCALLTYPE WebFrame::globalContext()
return toGlobalRef(coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec());
}
+JSGlobalContextRef STDMETHODCALLTYPE WebFrame::contextForWorldID(
+ /* [in] */ unsigned worldID)
+{
+ Frame* coreFrame = core(this);
+ if (!coreFrame)
+ return 0;
+
+ return toGlobalRef(coreFrame->script()->globalObject(worldID)->globalExec());
+}
+
HRESULT STDMETHODCALLTYPE WebFrame::loadRequest(
/* [in] */ IWebURLRequest* request)
{
diff --git a/WebKit/win/WebFrame.h b/WebKit/win/WebFrame.h
index d84653c..1ed2fef 100644
--- a/WebKit/win/WebFrame.h
+++ b/WebKit/win/WebFrame.h
@@ -153,6 +153,8 @@ public:
/* [retval][out] */ IDOMElement **formElement);
virtual /* [local] */ JSGlobalContextRef STDMETHODCALLTYPE globalContext();
+ virtual /* [local] */ JSGlobalContextRef STDMETHODCALLTYPE contextForWorldID(
+ /* [in] */ unsigned worldID);
// IWebFramePrivate
virtual HRESULT STDMETHODCALLTYPE renderTreeAsExternalRepresentation(
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list