Changeset 64788 in webkit
- Timestamp:
- Aug 5, 2010 2:32:14 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r64778 r64788 1 2010-08-05 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Gavin Barraclough. 4 5 Add script world API for injected bundles 6 https://bugs.webkit.org/show_bug.cgi?id=43577 7 8 * Shared/APIObject.h: 9 (WebKit::APIObject::): 10 * WebKit2.xcodeproj/project.pbxproj: 11 * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h: 12 (WebKit::): 13 * WebProcess/InjectedBundle/API/c/WKBundleBase.h: 14 * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp: Added. 15 (WKBundleScriptWorldGetTypeID): 16 (WKBundleScriptWorldCreateWorld): 17 (WKBundleScriptWorldNormalWorld): 18 (WKBundleScriptWorldRetain): 19 (WKBundleScriptWorldRelease): 20 * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h: Added. 21 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: 22 * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp: Added. 23 (WebKit::allWorlds): 24 (WebKit::InjectedBundleScriptWorld::create): 25 (WebKit::InjectedBundleScriptWorld::getOrCreate): 26 (WebKit::InjectedBundleScriptWorld::normalWorld): 27 (WebKit::InjectedBundleScriptWorld::InjectedBundleScriptWorld): 28 (WebKit::InjectedBundleScriptWorld::~InjectedBundleScriptWorld): 29 * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h: Added. 30 (WebKit::InjectedBundleScriptWorld::type): 31 * win/WebKit2.vcproj: 32 * win/WebKit2Generated.make: 33 1 34 2010-08-05 Sam Weinig <sam@webkit.org> 2 35 -
trunk/WebKit2/Shared/APIObject.h
r64778 r64788 56 56 TypeBundleFrame, 57 57 TypeBundlePage, 58 TypeBundleScriptWorld, 58 59 TypeBundleNodeHandle, 59 60 -
trunk/WebKit2/WebKit2.xcodeproj/project.pbxproj
r64778 r64788 152 152 BC111B65112F638300337BAB /* WebProcessMessageKinds.h in Headers */ = {isa = PBXBuildFile; fileRef = BC111B62112F638300337BAB /* WebProcessMessageKinds.h */; }; 153 153 BC131BC911726C2800B69727 /* CoreIPCMessageKinds.h in Headers */ = {isa = PBXBuildFile; fileRef = BC131BC811726C2800B69727 /* CoreIPCMessageKinds.h */; }; 154 BC14DF77120B5B7900826C0C /* InjectedBundleScriptWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = BC14DF75120B5B7900826C0C /* InjectedBundleScriptWorld.h */; }; 155 BC14DF78120B5B7900826C0C /* InjectedBundleScriptWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC14DF76120B5B7900826C0C /* InjectedBundleScriptWorld.cpp */; }; 156 BC14DF9E120B635F00826C0C /* WKBundleScriptWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC14DF9C120B635F00826C0C /* WKBundleScriptWorld.cpp */; }; 157 BC14DF9F120B635F00826C0C /* WKBundleScriptWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = BC14DF9D120B635F00826C0C /* WKBundleScriptWorld.h */; }; 154 158 BC177465118B9FF4007D9E9A /* WKPagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = BC177464118B9FF4007D9E9A /* WKPagePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 155 159 BC17753F118BABF0007D9E9A /* GenericCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = BC17753E118BABF0007D9E9A /* GenericCallback.h */; }; … … 473 477 BC111B62112F638300337BAB /* WebProcessMessageKinds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebProcessMessageKinds.h; sourceTree = "<group>"; }; 474 478 BC131BC811726C2800B69727 /* CoreIPCMessageKinds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreIPCMessageKinds.h; sourceTree = "<group>"; }; 479 BC14DF75120B5B7900826C0C /* InjectedBundleScriptWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundleScriptWorld.h; sourceTree = "<group>"; }; 480 BC14DF76120B5B7900826C0C /* InjectedBundleScriptWorld.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleScriptWorld.cpp; sourceTree = "<group>"; }; 481 BC14DF9C120B635F00826C0C /* WKBundleScriptWorld.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKBundleScriptWorld.cpp; sourceTree = "<group>"; }; 482 BC14DF9D120B635F00826C0C /* WKBundleScriptWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundleScriptWorld.h; sourceTree = "<group>"; }; 475 483 BC177464118B9FF4007D9E9A /* WKPagePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPagePrivate.h; sourceTree = "<group>"; }; 476 484 BC17753E118BABF0007D9E9A /* GenericCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenericCallback.h; sourceTree = "<group>"; }; … … 1134 1142 BCA8C6AD11E3C08700812FB7 /* InjectedBundlePageUIClient.cpp */, 1135 1143 BCA8C6AE11E3C08700812FB7 /* InjectedBundlePageUIClient.h */, 1144 BC14DF76120B5B7900826C0C /* InjectedBundleScriptWorld.cpp */, 1145 BC14DF75120B5B7900826C0C /* InjectedBundleScriptWorld.h */, 1136 1146 ); 1137 1147 path = InjectedBundle; … … 1175 1185 E1EE55F711F8F1BC00CCBEE4 /* WKBundleRange.cpp */, 1176 1186 E1EE55F311F8F18900CCBEE4 /* WKBundleRange.h */, 1187 BC14DF9C120B635F00826C0C /* WKBundleScriptWorld.cpp */, 1188 BC14DF9D120B635F00826C0C /* WKBundleScriptWorld.h */, 1177 1189 ); 1178 1190 path = c; … … 1419 1431 BC4BEEAB120A0A5F00FBA0C7 /* InjectedBundleNodeHandle.h in Headers */, 1420 1432 BC4BEFE1120A1A4C00FBA0C7 /* WKBundleNodeHandle.h in Headers */, 1433 BC14DF77120B5B7900826C0C /* InjectedBundleScriptWorld.h in Headers */, 1434 BC14DF9F120B635F00826C0C /* WKBundleScriptWorld.h in Headers */, 1421 1435 ); 1422 1436 runOnlyForDeploymentPostprocessing = 0; … … 1631 1645 BC4BEEAC120A0A5F00FBA0C7 /* InjectedBundleNodeHandle.cpp in Sources */, 1632 1646 BC4BEFE2120A1A4C00FBA0C7 /* WKBundleNodeHandle.cpp in Sources */, 1647 BC14DF78120B5B7900826C0C /* InjectedBundleScriptWorld.cpp in Sources */, 1648 BC14DF9E120B635F00826C0C /* WKBundleScriptWorld.cpp in Sources */, 1633 1649 ); 1634 1650 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h
r64778 r64788 42 42 class InjectedBundle; 43 43 class InjectedBundleNodeHandle; 44 class InjectedBundleScriptWorld; 44 45 class WebFrame; 45 46 class WebPage; … … 50 51 template<> struct BundleAPITypeInfo<WKBundleRef> { typedef InjectedBundle* ImplType; }; 51 52 template<> struct BundleAPITypeInfo<WKBundleNodeHandleRef> { typedef InjectedBundleNodeHandle* ImplType; }; 53 template<> struct BundleAPITypeInfo<WKBundleScriptWorldRef> { typedef InjectedBundleScriptWorld* ImplType; }; 52 54 template<> struct BundleAPITypeInfo<WKBundleNodeRef> { typedef WebCore::Node* ImplType; }; 53 55 template<> struct BundleAPITypeInfo<WKBundleRangeRef> { typedef WebCore::Range* ImplType; }; … … 57 59 template<> struct BundleImplTypeInfo<InjectedBundle*> { typedef WKBundleRef APIType; }; 58 60 template<> struct BundleImplTypeInfo<InjectedBundleNodeHandle*> { typedef WKBundleNodeHandleRef APIType; }; 61 template<> struct BundleImplTypeInfo<InjectedBundleScriptWorld*> { typedef WKBundleScriptWorldRef APIType; }; 59 62 template<> struct BundleImplTypeInfo<WebFrame*> { typedef WKBundleFrameRef APIType; }; 60 63 template<> struct BundleImplTypeInfo<WebPage*> { typedef WKBundlePageRef APIType; }; -
trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBase.h
r64778 r64788 31 31 typedef struct OpaqueWKBundleNodeHandle* WKBundleNodeHandleRef; 32 32 typedef struct OpaqueWKBundlePage* WKBundlePageRef; 33 typedef struct OpaqueWKBundleScriptWorld* WKBundleScriptWorldRef; 33 34 34 35 typedef struct OpaqueWKBundleDOMCSSStyleDeclaration* WKBundleCSSStyleDeclarationRef; -
trunk/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
r64778 r64788 41 41 } 42 42 43 static inline InjectedBundleNodeHandle* getDOMHandle(Node* domObject)44 {45 return domHandleCache().get(domObject);46 }47 48 static inline void setDOMHandle(Node* domObject, InjectedBundleNodeHandle* handle)49 {50 domHandleCache().set(domObject, handle);51 }52 53 static inline void removeDOMHandle(Node* domObject)54 {55 domHandleCache().remove(domObject);56 }57 58 43 PassRefPtr<InjectedBundleNodeHandle> InjectedBundleNodeHandle::getOrCreate(Node* node) 59 44 { -
trunk/WebKit2/win/WebKit2.vcproj
r64778 r64788 732 732 > 733 733 </File> 734 <File 735 RelativePath="..\WebProcess\InjectedBundle\InjectedBundleScriptWorld.cpp" 736 > 737 </File> 738 <File 739 RelativePath="..\WebProcess\InjectedBundle\InjectedBundleScriptWorld.h" 740 > 741 </File> 734 742 <Filter 735 743 Name="API" … … 808 816 <File 809 817 RelativePath="..\WebProcess\InjectedBundle\API\c\WKBundleRange.h" 818 > 819 </File> 820 <File 821 RelativePath="..\WebProcess\InjectedBundle\API\c\WKBundleScriptWorld.cpp" 822 > 823 </File> 824 <File 825 RelativePath="..\WebProcess\InjectedBundle\API\c\WKBundleScriptWorld.h" 810 826 > 811 827 </File> -
trunk/WebKit2/win/WebKit2Generated.make
r64778 r64788 36 36 xcopy /y /d "..\WebProcess\InjectedBundle\API\c\WKBundlePrivate.h" "$(WEBKITOUTPUTDIR)\include\WebKit2" 37 37 xcopy /y /d "..\WebProcess\InjectedBundle\API\c\WKBundleRange.h" "$(WEBKITOUTPUTDIR)\include\WebKit2" 38 xcopy /y /d "..\WebProcess\InjectedBundle\API\c\WKBundleScriptWorld.h" "$(WEBKITOUTPUTDIR)\include\WebKit2" 38 39 -del "$(WEBKITOUTPUTDIR)\buildfailed" 39 40
Note: See TracChangeset
for help on using the changeset viewer.