diff options
author | Steve Block <steveblock@google.com> | 2010-01-20 12:26:39 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-01-20 12:26:39 +0000 |
commit | f94c3ecac24651c15569bdca42b311d0fc971861 (patch) | |
tree | 3222cbe56cf10b82a93966f6eb01d4f6e50e0142 /WebCore | |
parent | f5306da72ab6bb63f7ae07371e687f72a75c2fb2 (diff) | |
parent | 3f4b1969e5c86f542a2b86118467a8fc8cec9c7c (diff) | |
download | external_webkit-f94c3ecac24651c15569bdca42b311d0fc971861.zip external_webkit-f94c3ecac24651c15569bdca42b311d0fc971861.tar.gz external_webkit-f94c3ecac24651c15569bdca42b311d0fc971861.tar.bz2 |
resolved conflicts for merge of 3f4b1969 to master
Change-Id: I24c41d6ab08dd3594edd4ff62a1c823c904b9851
Diffstat (limited to 'WebCore')
45 files changed, 296 insertions, 145 deletions
diff --git a/WebCore/Android.jscbindings.mk b/WebCore/Android.jscbindings.mk index 119601d..9309d6e 100644 --- a/WebCore/Android.jscbindings.mk +++ b/WebCore/Android.jscbindings.mk @@ -181,6 +181,7 @@ LOCAL_SRC_FILES += \ \ bindings/ScriptControllerBase.cpp \ \ + bridge/Bridge.cpp \ bridge/IdentifierRep.cpp \ bridge/NP_jsobject.cpp \ bridge/c/c_class.cpp \ @@ -193,7 +194,6 @@ LOCAL_SRC_FILES += \ bridge/jni/jsc/JavaInstanceJSC.cpp \ bridge/jni/jsc/jni_utility_private.cpp \ bridge/npruntime.cpp \ - bridge/runtime.cpp \ bridge/runtime_array.cpp \ bridge/runtime_method.cpp \ bridge/runtime_object.cpp \ diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 1e9ec41..c7fa692 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -2,6 +2,92 @@ Reviewed by Adam Barth. + Moves JSC-specific implementation of JavaString to a private implementation class. + https://bugs.webkit.org/show_bug.cgi?id=33558 + + Also modifies JavaField::name and JavaMethod::name to return const JavaString&, rather than UString::Rep*, + which is JSC-specific. This allows this code to be used with both JSC and V8, as required by Android. + + No new tests, refactoring only. + + * WebCore.xcodeproj/project.pbxproj: Modified. Added JavaStringJSC.h + * bridge/jni/jni_class.cpp: Modified. + (JavaClass::JavaClass): Modified. Updates call sites of JavaField::name and JavaMethod::name. + * bridge/jni/jni_runtime.h: Modified. + (JSC::Bindings::JavaString::JavaString): Modified. Pass through to implementation. + (JSC::Bindings::JavaString::UTF8String): Modified. Pass through to implementation. + (JSC::Bindings::JavaString::uchars): Modified. Pass through to implementation. + (JSC::Bindings::JavaString::length): Modified. Pass through to implementation. + (JSC::Bindings::JavaString::operator UString): Modified. Pass through to implementation. + (JSC::Bindings::JavaField::name): Modified. Pass through to implementation. + (JSC::Bindings::JavaMethod::name): Modified. Pass through to implementation. + * bridge/jni/jsc/JavaStringJSC.h: Added. + (JSC::Bindings::JavaStringImpl::~JavaStringImpl): + (JSC::Bindings::JavaStringImpl::init): + (JSC::Bindings::JavaStringImpl::UTF8String): + (JSC::Bindings::JavaStringImpl::uchars): + (JSC::Bindings::JavaStringImpl::length): + (JSC::Bindings::JavaStringImpl::uString): + +2010-01-19 Steve Block <steveblock@google.com> + + Reviewed by Adam Barth. + + Renames WebCore/bridge/runtime.[cpp|h] to WebCore/bridge/Bridge.[cpp|h] + https://bugs.webkit.org/show_bug.cgi?id=33801 + + runtime.[cpp|h] contains general interface classes for use in the bridge, + so Bridge is a more appropriate name than runtime. + + No new tests, renaming only. + + * Android.jscbindings.mk: + * GNUmakefile.am: + * WebCore.pro: + * WebCore.xcodeproj/project.pbxproj: + * WebCoreSources.bkl: + * bindings/js/JSPluginElementFunctions.cpp: + * bindings/js/ScriptControllerGtk.cpp: + * bindings/js/ScriptControllerHaiku.cpp: + * bindings/js/ScriptControllerMac.mm: + * bindings/js/ScriptControllerQt.cpp: + * bindings/js/ScriptControllerWin.cpp: + * bindings/js/ScriptControllerWx.cpp: + * bindings/js/ScriptInstance.h: + * bindings/objc/WebScriptObject.mm: + * bridge/Bridge.cpp: Copied from WebCore/bridge/runtime.cpp. + * bridge/Bridge.h: Copied from WebCore/bridge/runtime.h. + * bridge/c/c_class.h: + * bridge/c/c_instance.h: + * bridge/c/c_runtime.h: + * bridge/jni/jni_instance.h: + * bridge/objc/objc_runtime.h: + * bridge/qt/qt_class.h: + * bridge/qt/qt_instance.h: + * bridge/qt/qt_runtime.cpp: + * bridge/qt/qt_runtime.h: + * bridge/runtime.cpp: Removed. + * bridge/runtime.h: Removed. + * bridge/runtime_array.h: + * bridge/runtime_method.h: + * bridge/runtime_object.h: + * bridge/runtime_root.cpp: + * bridge/testbindings.cpp: + * bridge/testbindings.mm: + * bridge/testqtbindings.cpp: + * page/win/FrameWin.cpp: + * platform/graphics/wince/MediaPlayerProxy.cpp: + * plugins/PluginView.cpp: + * plugins/gtk/PluginViewGtk.cpp: + * plugins/mac/PluginViewMac.cpp: + * plugins/qt/PluginViewQt.cpp: + * plugins/symbian/PluginViewSymbian.cpp: + * plugins/win/PluginViewWin.cpp: + +2010-01-18 Steve Block <steveblock@google.com> + + Reviewed by Adam Barth. + Fix style in WebCore/bridge/jni/jsc/JavaInstanceJSC.[cpp|h] https://bugs.webkit.org/show_bug.cgi?id=33792 diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am index a04c123..c3e7c2e 100644 --- a/WebCore/GNUmakefile.am +++ b/WebCore/GNUmakefile.am @@ -484,6 +484,8 @@ webcore_sources += \ WebCore/bindings/js/SerializedScriptValue.h \ WebCore/bindings/js/StringSourceProvider.h \ WebCore/bindings/ScriptControllerBase.cpp \ + WebCore/bridge/Bridge.cpp \ + WebCore/bridge/Bridge.h \ WebCore/bridge/IdentifierRep.cpp \ WebCore/bridge/IdentifierRep.h \ WebCore/bridge/NP_jsobject.cpp \ @@ -507,8 +509,6 @@ webcore_sources += \ WebCore/bridge/npruntime_impl.h \ WebCore/bridge/npruntime_internal.h \ WebCore/bridge/npruntime_priv.h \ - WebCore/bridge/runtime.cpp \ - WebCore/bridge/runtime.h \ WebCore/bridge/runtime_array.cpp \ WebCore/bridge/runtime_array.h \ WebCore/bridge/runtime_method.cpp \ diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro index 474c143..b05a972 100644 --- a/WebCore/WebCore.pro +++ b/WebCore/WebCore.pro @@ -775,11 +775,11 @@ SOURCES += \ bindings/js/ScheduledAction.cpp \ bindings/js/SerializedScriptValue.cpp \ bindings/ScriptControllerBase.cpp \ + bridge/Bridge.cpp \ bridge/IdentifierRep.cpp \ bridge/NP_jsobject.cpp \ bridge/npruntime.cpp \ bridge/runtime_array.cpp \ - bridge/runtime.cpp \ bridge/runtime_method.cpp \ bridge/runtime_object.cpp \ bridge/runtime_root.cpp \ @@ -1459,6 +1459,7 @@ HEADERS += \ bindings/js/SerializedScriptValue.h \ bindings/js/StringSourceProvider.h \ bindings/js/WorkerScriptController.h \ + bridge/Bridge.h \ bridge/c/c_class.h \ bridge/c/c_instance.h \ bridge/c/c_runtime.h \ @@ -1470,7 +1471,6 @@ HEADERS += \ bridge/qt/qt_instance.h \ bridge/qt/qt_runtime.h \ bridge/runtime_array.h \ - bridge/runtime.h \ bridge/runtime_method.h \ bridge/runtime_object.h \ bridge/runtime_root.h \ diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj index 3635ae7..5b5d035 100644 --- a/WebCore/WebCore.xcodeproj/project.pbxproj +++ b/WebCore/WebCore.xcodeproj/project.pbxproj @@ -320,8 +320,6 @@ 1A569D190D7E2B82007C3983 /* objc_utility.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A569CEA0D7E2B82007C3983 /* objc_utility.h */; }; 1A569D1A0D7E2B82007C3983 /* objc_utility.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A569CEB0D7E2B82007C3983 /* objc_utility.mm */; }; 1A569D1B0D7E2B82007C3983 /* WebScriptObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A569CEC0D7E2B82007C3983 /* WebScriptObject.h */; }; - 1A569D1C0D7E2B82007C3983 /* runtime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A569CED0D7E2B82007C3983 /* runtime.cpp */; }; - 1A569D1D0D7E2B82007C3983 /* runtime.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A569CEE0D7E2B82007C3983 /* runtime.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1A569D1E0D7E2B82007C3983 /* runtime_array.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A569CEF0D7E2B82007C3983 /* runtime_array.cpp */; }; 1A569D1F0D7E2B82007C3983 /* runtime_array.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A569CF00D7E2B82007C3983 /* runtime_array.h */; }; 1A569D200D7E2B82007C3983 /* runtime_method.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A569CF10D7E2B82007C3983 /* runtime_method.cpp */; }; @@ -1099,8 +1097,11 @@ 550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */ = {isa = PBXBuildFile; fileRef = 550A0BC8085F6039007353D6 /* QualifiedName.h */; settings = {ATTRIBUTES = (Private, ); }; }; 599D1E3210C97D6E00E0EF12 /* jni_utility_private.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 599D1E3010C97D6E00E0EF12 /* jni_utility_private.cpp */; }; 599D1E3310C97D6E00E0EF12 /* jni_utility_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 599D1E3110C97D6E00E0EF12 /* jni_utility_private.h */; }; + 599E759011055A1F00D904FA /* Bridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 599E758F11055A1F00D904FA /* Bridge.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 599E759211055A2A00D904FA /* Bridge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 599E759111055A2A00D904FA /* Bridge.cpp */; }; 59A9E7B01104758800DFB4C1 /* JavaInstanceJSC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59A9E7AF1104758800DFB4C1 /* JavaInstanceJSC.cpp */; }; 59A9E7B21104759400DFB4C1 /* JavaInstanceJSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 59A9E7B11104759400DFB4C1 /* JavaInstanceJSC.h */; }; + 59BC393F11054A1300FD85DB /* JavaStringJSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 59BC393E11054A1300FD85DB /* JavaStringJSC.h */; }; 59C77F2A10545B3B00506104 /* GeolocationServiceMock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59C77F2810545B3B00506104 /* GeolocationServiceMock.cpp */; }; 59C77F2B10545B3B00506104 /* GeolocationServiceMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 59C77F2910545B3B00506104 /* GeolocationServiceMock.h */; settings = {ATTRIBUTES = (Private, ); }; }; 59E560A71105336600AA1258 /* JavaClassJSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 59E560A61105336600AA1258 /* JavaClassJSC.h */; }; @@ -5545,8 +5546,6 @@ 1A569CEA0D7E2B82007C3983 /* objc_utility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = objc_utility.h; sourceTree = "<group>"; }; 1A569CEB0D7E2B82007C3983 /* objc_utility.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = objc_utility.mm; sourceTree = "<group>"; }; 1A569CEC0D7E2B82007C3983 /* WebScriptObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebScriptObject.h; sourceTree = "<group>"; }; - 1A569CED0D7E2B82007C3983 /* runtime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = runtime.cpp; path = bridge/runtime.cpp; sourceTree = "<group>"; }; - 1A569CEE0D7E2B82007C3983 /* runtime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = runtime.h; path = bridge/runtime.h; sourceTree = "<group>"; }; 1A569CEF0D7E2B82007C3983 /* runtime_array.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = runtime_array.cpp; path = bridge/runtime_array.cpp; sourceTree = "<group>"; }; 1A569CF00D7E2B82007C3983 /* runtime_array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = runtime_array.h; path = bridge/runtime_array.h; sourceTree = "<group>"; }; 1A569CF10D7E2B82007C3983 /* runtime_method.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = runtime_method.cpp; path = bridge/runtime_method.cpp; sourceTree = "<group>"; }; @@ -6428,8 +6427,11 @@ 550A0BC8085F6039007353D6 /* QualifiedName.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = QualifiedName.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 599D1E3010C97D6E00E0EF12 /* jni_utility_private.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = jni_utility_private.cpp; path = jsc/jni_utility_private.cpp; sourceTree = "<group>"; }; 599D1E3110C97D6E00E0EF12 /* jni_utility_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jni_utility_private.h; path = jsc/jni_utility_private.h; sourceTree = "<group>"; }; + 599E758F11055A1F00D904FA /* Bridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Bridge.h; path = bridge/Bridge.h; sourceTree = "<group>"; }; + 599E759111055A2A00D904FA /* Bridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Bridge.cpp; path = bridge/Bridge.cpp; sourceTree = "<group>"; }; 59A9E7AF1104758800DFB4C1 /* JavaInstanceJSC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JavaInstanceJSC.cpp; path = jsc/JavaInstanceJSC.cpp; sourceTree = "<group>"; }; 59A9E7B11104759400DFB4C1 /* JavaInstanceJSC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JavaInstanceJSC.h; path = jsc/JavaInstanceJSC.h; sourceTree = "<group>"; }; + 59BC393E11054A1300FD85DB /* JavaStringJSC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JavaStringJSC.h; path = jsc/JavaStringJSC.h; sourceTree = "<group>"; }; 59C77F2810545B3B00506104 /* GeolocationServiceMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GeolocationServiceMock.cpp; path = mock/GeolocationServiceMock.cpp; sourceTree = "<group>"; }; 59C77F2910545B3B00506104 /* GeolocationServiceMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GeolocationServiceMock.h; path = mock/GeolocationServiceMock.h; sourceTree = "<group>"; }; 59E560A61105336600AA1258 /* JavaClassJSC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JavaClassJSC.h; path = jsc/JavaClassJSC.h; sourceTree = "<group>"; }; @@ -10244,6 +10246,8 @@ 1A569CC40D7E2B60007C3983 /* bridge */ = { isa = PBXGroup; children = ( + 599E759111055A2A00D904FA /* Bridge.cpp */, + 599E758F11055A1F00D904FA /* Bridge.h */, 1A569CC50D7E2B82007C3983 /* c */, 1A569CCE0D7E2B82007C3983 /* jni */, 1A569CE20D7E2B82007C3983 /* objc */, @@ -10257,8 +10261,6 @@ 1A569CDF0D7E2B82007C3983 /* npruntime_impl.h */, 1A569CE00D7E2B82007C3983 /* npruntime_internal.h */, 1A569CE10D7E2B82007C3983 /* npruntime_priv.h */, - 1A569CED0D7E2B82007C3983 /* runtime.cpp */, - 1A569CEE0D7E2B82007C3983 /* runtime.h */, 1A569CEF0D7E2B82007C3983 /* runtime_array.cpp */, 1A569CF00D7E2B82007C3983 /* runtime_array.h */, 1A569CF10D7E2B82007C3983 /* runtime_method.cpp */, @@ -10992,6 +10994,7 @@ 599D1E2F10C97D4C00E0EF12 /* jsc */ = { isa = PBXGroup; children = ( + 59BC393E11054A1300FD85DB /* JavaStringJSC.h */, 59E560A81105336F00AA1258 /* JavaClassJSC.cpp */, 59E560A61105336600AA1258 /* JavaClassJSC.h */, 59A9E7B11104759400DFB4C1 /* JavaInstanceJSC.h */, @@ -17733,7 +17736,6 @@ A8CFF5E10A155A05000A4234 /* RootInlineBox.h in Headers */, 49E911C90EF86D47009D0CAF /* RotateTransformOperation.h in Headers */, 1C63A2480F71646600C09D5A /* RunLoopTimer.h in Headers */, - 1A569D1D0D7E2B82007C3983 /* runtime.h in Headers */, 1A569D1F0D7E2B82007C3983 /* runtime_array.h in Headers */, 1A569D210D7E2B82007C3983 /* runtime_method.h in Headers */, 1A569D230D7E2B82007C3983 /* runtime_object.h in Headers */, @@ -18285,6 +18287,7 @@ 93F19A0C08245E59001E9ABC /* Sources */, 93F19B1208245E59001E9ABC /* Frameworks */, 939D050109D9FF6B00984996 /* Check For Global Initializers */, + 599E759011055A1F00D904FA /* Bridge.h in Headers */, 933457E60EBFDF6B00B80894 /* Check For Exit Time Destructors */, 5D0D540D0E9862F60029E223 /* Check For Weak VTables */, ); @@ -18307,6 +18310,7 @@ buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */; compatibilityVersion = "Xcode 2.4"; hasScannedForEncodings = 1; + 59BC393F11054A1300FD85DB /* JavaStringJSC.h in Headers */, knownRegions = ( English, Japanese, @@ -19948,7 +19952,6 @@ A8CFF5E70A155A05000A4234 /* RootInlineBox.cpp in Sources */, 49E911C80EF86D47009D0CAF /* RotateTransformOperation.cpp in Sources */, 1C63A2490F71646600C09D5A /* RunLoopTimerCF.cpp in Sources */, - 1A569D1C0D7E2B82007C3983 /* runtime.cpp in Sources */, 1A569D1E0D7E2B82007C3983 /* runtime_array.cpp in Sources */, 1A569D200D7E2B82007C3983 /* runtime_method.cpp in Sources */, 1A569D220D7E2B82007C3983 /* runtime_object.cpp in Sources */, @@ -20436,6 +20439,7 @@ }; /* End PBXTargetDependency section */ + 599E759211055A2A00D904FA /* Bridge.cpp in Sources */, /* Begin PBXVariantGroup section */ BCC64F5F0DCFB84E0081EF3B /* localizedStrings.js */ = { isa = PBXVariantGroup; diff --git a/WebCore/WebCoreSources.bkl b/WebCore/WebCoreSources.bkl index d44e593..1254b06 100644 --- a/WebCore/WebCoreSources.bkl +++ b/WebCore/WebCoreSources.bkl @@ -165,6 +165,7 @@ This file contains the list of files needed to build WebCore. </set> <set append="1" var="WEBCORE_SOURCES_BRIDGE"> + bridge/Bridge.cpp bridge/IdentifierRep.cpp bridge/NP_jsobject.cpp bridge/c/c_class.cpp @@ -172,7 +173,6 @@ This file contains the list of files needed to build WebCore. bridge/c/c_runtime.cpp bridge/c/c_utility.cpp bridge/npruntime.cpp - bridge/runtime.cpp bridge/runtime_array.cpp bridge/runtime_method.cpp bridge/runtime_object.cpp diff --git a/WebCore/bindings/js/JSPluginElementFunctions.cpp b/WebCore/bindings/js/JSPluginElementFunctions.cpp index ada2a77..e927ef1 100644 --- a/WebCore/bindings/js/JSPluginElementFunctions.cpp +++ b/WebCore/bindings/js/JSPluginElementFunctions.cpp @@ -20,10 +20,10 @@ #include "config.h" #include "JSPluginElementFunctions.h" +#include "Bridge.h" #include "HTMLNames.h" #include "HTMLPlugInElement.h" #include "JSHTMLElement.h" -#include "runtime.h" #include "runtime_object.h" using namespace JSC; diff --git a/WebCore/bindings/js/ScriptControllerAndroid.cpp b/WebCore/bindings/js/ScriptControllerAndroid.cpp index 91e5add..a2086e1 100644 --- a/WebCore/bindings/js/ScriptControllerAndroid.cpp +++ b/WebCore/bindings/js/ScriptControllerAndroid.cpp @@ -27,7 +27,7 @@ #include "ScriptController.h" #include "PluginView.h" -#include "runtime.h" +#include "Bridge.h" namespace WebCore { diff --git a/WebCore/bindings/js/ScriptControllerGtk.cpp b/WebCore/bindings/js/ScriptControllerGtk.cpp index c906034..6ffae69 100644 --- a/WebCore/bindings/js/ScriptControllerGtk.cpp +++ b/WebCore/bindings/js/ScriptControllerGtk.cpp @@ -31,9 +31,9 @@ #include "config.h" #include "ScriptController.h" +#include "Bridge.h" #include "PluginView.h" #include "runtime_root.h" -#include "runtime.h" namespace WebCore { diff --git a/WebCore/bindings/js/ScriptControllerHaiku.cpp b/WebCore/bindings/js/ScriptControllerHaiku.cpp index 3fe471d..a1f1590 100644 --- a/WebCore/bindings/js/ScriptControllerHaiku.cpp +++ b/WebCore/bindings/js/ScriptControllerHaiku.cpp @@ -27,8 +27,8 @@ #include "config.h" #include "ScriptController.h" +#include "Bridge.h" #include "PluginView.h" -#include "runtime.h" #include "runtime_root.h" diff --git a/WebCore/bindings/js/ScriptControllerMac.mm b/WebCore/bindings/js/ScriptControllerMac.mm index 7d3b267..650cb78 100644 --- a/WebCore/bindings/js/ScriptControllerMac.mm +++ b/WebCore/bindings/js/ScriptControllerMac.mm @@ -29,6 +29,7 @@ #import "config.h" #import "ScriptController.h" +#import "Bridge.h" #import "DOMAbstractViewFrame.h" #import "DOMWindow.h" #import "Frame.h" @@ -37,6 +38,8 @@ #import "JSDOMWindow.h" #import "WebScriptObjectPrivate.h" #import "Widget.h" +#import "objc_instance.h" +#import "runtime_root.h" #import <JavaScriptCore/APICast.h> #import <runtime/JSLock.h> @@ -46,10 +49,6 @@ #import "npruntime_impl.h" #endif -#import "objc_instance.h" -#import "runtime_root.h" -#import "runtime.h" - #if ENABLE(MAC_JAVA_BRIDGE) #import "JavaInstanceJSC.h" #endif diff --git a/WebCore/bindings/js/ScriptControllerQt.cpp b/WebCore/bindings/js/ScriptControllerQt.cpp index 6b14190..55d4ba4 100644 --- a/WebCore/bindings/js/ScriptControllerQt.cpp +++ b/WebCore/bindings/js/ScriptControllerQt.cpp @@ -36,11 +36,11 @@ #include "config.h" #include "ScriptController.h" +#include "Bridge.h" #include "DOMWindow.h" #include "PluginView.h" #include "qt_instance.h" #include "runtime_root.h" -#include "runtime.h" #include <QWidget> diff --git a/WebCore/bindings/js/ScriptControllerWin.cpp b/WebCore/bindings/js/ScriptControllerWin.cpp index 703cf7c..e0a959e 100644 --- a/WebCore/bindings/js/ScriptControllerWin.cpp +++ b/WebCore/bindings/js/ScriptControllerWin.cpp @@ -27,8 +27,8 @@ #include "config.h" #include "ScriptController.h" +#include "Bridge.h" #include "PluginView.h" -#include "runtime.h" using namespace JSC::Bindings; diff --git a/WebCore/bindings/js/ScriptControllerWx.cpp b/WebCore/bindings/js/ScriptControllerWx.cpp index 1c14928..1d7b4ca 100644 --- a/WebCore/bindings/js/ScriptControllerWx.cpp +++ b/WebCore/bindings/js/ScriptControllerWx.cpp @@ -27,9 +27,9 @@ #include "config.h" #include "ScriptController.h" +#include "Bridge.h" #include "PluginView.h" #include "runtime_root.h" -#include "runtime.h" namespace WebCore { diff --git a/WebCore/bindings/js/ScriptInstance.h b/WebCore/bindings/js/ScriptInstance.h index 3095df9..0b3b59f 100644 --- a/WebCore/bindings/js/ScriptInstance.h +++ b/WebCore/bindings/js/ScriptInstance.h @@ -31,8 +31,8 @@ #ifndef ScriptInstance_h #define ScriptInstance_h +#include "Bridge.h" #include <wtf/RefPtr.h> -#include "runtime.h" namespace WebCore { diff --git a/WebCore/bindings/objc/WebScriptObject.mm b/WebCore/bindings/objc/WebScriptObject.mm index 1622a3c..d7bc90c 100644 --- a/WebCore/bindings/objc/WebScriptObject.mm +++ b/WebCore/bindings/objc/WebScriptObject.mm @@ -26,6 +26,7 @@ #import "config.h" #import "WebScriptObjectPrivate.h" +#import "Bridge.h" #import "Console.h" #import "DOMInternal.h" #import "DOMWindow.h" @@ -36,7 +37,6 @@ #import "StringSourceProvider.h" #import "WebCoreObjCExtras.h" #import "objc_instance.h" -#import "runtime.h" #import "runtime_object.h" #import "runtime_root.h" #import <JavaScriptCore/APICast.h> diff --git a/WebCore/bridge/runtime.cpp b/WebCore/bridge/Bridge.cpp index eac8586..0fe583a 100644 --- a/WebCore/bridge/runtime.cpp +++ b/WebCore/bridge/Bridge.cpp @@ -24,7 +24,7 @@ */ #include "config.h" -#include "runtime.h" +#include "Bridge.h" #include "runtime_object.h" #include "runtime_root.h" diff --git a/WebCore/bridge/runtime.h b/WebCore/bridge/Bridge.h index 6682a97..5a743f1 100644 --- a/WebCore/bridge/runtime.h +++ b/WebCore/bridge/Bridge.h @@ -23,8 +23,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef JAVASCRIPTCORE_BINDINGS_RUNTIME_H -#define JAVASCRIPTCORE_BINDINGS_RUNTIME_H +#ifndef Bridge_h +#define Bridge_h #include <runtime/JSString.h> #include <wtf/HashMap.h> @@ -132,15 +132,15 @@ public: Array(PassRefPtr<RootObject>); virtual ~Array(); - virtual void setValueAt(ExecState *, unsigned index, JSValue) const = 0; - virtual JSValue valueAt(ExecState *, unsigned index) const = 0; + virtual void setValueAt(ExecState*, unsigned index, JSValue) const = 0; + virtual JSValue valueAt(ExecState*, unsigned index) const = 0; virtual unsigned int getLength() const = 0; protected: RefPtr<RootObject> _rootObject; }; -const char *signatureForParameters(const ArgList&); +const char* signatureForParameters(const ArgList&); typedef HashMap<RefPtr<UString::Rep>, MethodList*> MethodListMap; typedef HashMap<RefPtr<UString::Rep>, Method*> MethodMap; diff --git a/WebCore/bridge/c/c_class.h b/WebCore/bridge/c/c_class.h index 7f20af4..52db2b9 100644 --- a/WebCore/bridge/c/c_class.h +++ b/WebCore/bridge/c/c_class.h @@ -28,8 +28,8 @@ #if ENABLE(NETSCAPE_PLUGIN_API) +#include "Bridge.h" #include "npruntime_internal.h" -#include "runtime.h" #include <wtf/HashMap.h> namespace JSC { diff --git a/WebCore/bridge/c/c_instance.h b/WebCore/bridge/c/c_instance.h index f9e9de3..7109582 100644 --- a/WebCore/bridge/c/c_instance.h +++ b/WebCore/bridge/c/c_instance.h @@ -28,9 +28,9 @@ #if ENABLE(NETSCAPE_PLUGIN_API) -#include "runtime.h" -#include <wtf/PassRefPtr.h> +#include "Bridge.h" #include "runtime_root.h" +#include <wtf/PassRefPtr.h> typedef struct NPObject NPObject; diff --git a/WebCore/bridge/c/c_runtime.h b/WebCore/bridge/c/c_runtime.h index e797342..5355934 100644 --- a/WebCore/bridge/c/c_runtime.h +++ b/WebCore/bridge/c/c_runtime.h @@ -28,8 +28,8 @@ #if ENABLE(NETSCAPE_PLUGIN_API) +#include "Bridge.h" #include "npruntime_internal.h" -#include "runtime.h" namespace JSC { namespace Bindings { diff --git a/WebCore/bridge/jni/jni_runtime.h b/WebCore/bridge/jni/jni_runtime.h index 3b3aaf6..5c0dc66 100644 --- a/WebCore/bridge/jni/jni_runtime.h +++ b/WebCore/bridge/jni/jni_runtime.h @@ -30,8 +30,10 @@ #include "JavaInstanceJSC.h" #include "jni_utility.h" -#include <runtime/JSLock.h> +#if USE(JSC) +#include "JavaStringJSC.h" +#endif namespace JSC { @@ -46,49 +48,28 @@ class JavaString public: JavaString() { - JSLock lock(SilenceAssertionsOnly); - _rep = UString().rep(); + m_impl.init(); } - void _commonInit (JNIEnv *e, jstring s) + JavaString(JNIEnv* e, jstring s) { - int _size = e->GetStringLength (s); - const jchar *uc = getUCharactersFromJStringInEnv (e, s); - { - JSLock lock(SilenceAssertionsOnly); - _rep = UString(reinterpret_cast<const UChar*>(uc), _size).rep(); - } - releaseUCharactersForJStringInEnv (e, s, uc); + m_impl.init(e, s); } - - JavaString (JNIEnv *e, jstring s) { - _commonInit (e, s); - } - - JavaString (jstring s) { - _commonInit (getJNIEnv(), s); - } - - ~JavaString() + + JavaString(jstring s) { - JSLock lock(SilenceAssertionsOnly); - _rep = 0; - } - - const char *UTF8String() const { - if (_utf8String.c_str() == 0) { - JSLock lock(SilenceAssertionsOnly); - _utf8String = UString(_rep).UTF8String(); - } - return _utf8String.c_str(); + m_impl.init(getJNIEnv(), s); } - const jchar *uchars() const { return (const jchar *)_rep->data(); } - int length() const { return _rep->size(); } - operator UString() const { return UString(_rep); } + + const char* UTF8String() const { return m_impl.UTF8String(); } + const jchar* uchars() const { return m_impl.uchars(); } + int length() const { return m_impl.length(); } +#if USE(JSC) + operator UString() const { return m_impl.uString(); } +#endif private: - RefPtr<UString::Rep> _rep; - mutable CString _utf8String; + JavaStringImpl m_impl; }; class JavaParameter @@ -115,7 +96,7 @@ public: virtual JSValue valueFromInstance(ExecState *exec, const Instance *instance) const; virtual void setValueToInstance(ExecState *exec, const Instance *instance, JSValue aValue) const; - UString::Rep* name() const { return ((UString)_name).rep(); } + const JavaString& name() const { return _name; } virtual RuntimeType type() const { return _type.UTF8String(); } JNIType getJNIType() const { return _JNIType; } @@ -137,7 +118,7 @@ public: JavaMethod(JNIEnv* env, jobject aMethod); ~JavaMethod(); - UString::Rep* name() const { return ((UString)_name).rep(); } + const JavaString& name() const { return _name; } RuntimeType returnType() const { return _returnType.UTF8String(); }; JavaParameter* parameterAt(int i) const { return &_parameters[i]; }; int numParameters() const { return _numParameters; }; diff --git a/WebCore/bridge/jni/jsc/JavaClassJSC.cpp b/WebCore/bridge/jni/jsc/JavaClassJSC.cpp index 3e30a4a..b242cff 100644 --- a/WebCore/bridge/jni/jsc/JavaClassJSC.cpp +++ b/WebCore/bridge/jni/jsc/JavaClassJSC.cpp @@ -61,7 +61,7 @@ JavaClass::JavaClass(jobject anInstance) JavaField *aField = new JavaField(env, aJField); // deleted in the JavaClass destructor { JSLock lock(SilenceAssertionsOnly); - _fields.set(aField->name(), aField); + _fields.set(((UString)aField->name()).rep(), aField); } env->DeleteLocalRef(aJField); } @@ -76,10 +76,10 @@ JavaClass::JavaClass(jobject anInstance) { JSLock lock(SilenceAssertionsOnly); - methodList = _methods.get(aMethod->name()); + methodList = _methods.get(((UString)aMethod->name()).rep()); if (!methodList) { methodList = new MethodList(); - _methods.set(aMethod->name(), methodList); + _methods.set(((UString)aMethod->name()).rep(), methodList); } } methodList->append(aMethod); diff --git a/WebCore/bridge/jni/jsc/JavaInstanceJSC.h b/WebCore/bridge/jni/jsc/JavaInstanceJSC.h index fcd53f4..d7b6102 100644 --- a/WebCore/bridge/jni/jsc/JavaInstanceJSC.h +++ b/WebCore/bridge/jni/jsc/JavaInstanceJSC.h @@ -28,7 +28,7 @@ #if ENABLE(MAC_JAVA_BRIDGE) -#include "runtime.h" +#include "Bridge.h" #include "runtime_root.h" #include <JavaVM/jni.h> diff --git a/WebCore/bridge/jni/jsc/JavaStringJSC.h b/WebCore/bridge/jni/jsc/JavaStringJSC.h new file mode 100644 index 0000000..d3ed56b --- /dev/null +++ b/WebCore/bridge/jni/jsc/JavaStringJSC.h @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2010 Apple Computer, 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: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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 THE COPYRIGHT HOLDERS ``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 THE COPYRIGHT OWNER 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 JavaStringJSC_h +#define JavaStringJSC_h + +#include "JavaInstanceJSC.h" +#include "jni_utility.h" +#include <runtime/JSLock.h> + + +namespace JSC { + +namespace Bindings { + +class JavaStringImpl { +public: + ~JavaStringImpl() + { + JSLock lock(SilenceAssertionsOnly); + m_rep = 0; + } + + void init() + { + JSLock lock(SilenceAssertionsOnly); + m_rep = UString().rep(); + } + + void init(JNIEnv* e, jstring s) + { + int size = e->GetStringLength(s); + const jchar* uc = getUCharactersFromJStringInEnv(e, s); + { + JSLock lock(SilenceAssertionsOnly); + m_rep = UString(reinterpret_cast<const UChar*>(uc), size).rep(); + } + releaseUCharactersForJStringInEnv(e, s, uc); + } + + const char* UTF8String() const + { + if (!m_utf8String.c_str()) { + JSLock lock(SilenceAssertionsOnly); + m_utf8String = UString(m_rep).UTF8String(); + } + return m_utf8String.c_str(); + } + const jchar* uchars() const { return (const jchar*)m_rep->data(); } + int length() const { return m_rep->size(); } + UString uString() const { return UString(m_rep); } + +private: + RefPtr<UString::Rep> m_rep; + mutable CString m_utf8String; +}; + +} // namespace Bindings + +} // namespace JSC + +#endif // JavaStringJSC_h diff --git a/WebCore/bridge/objc/objc_runtime.h b/WebCore/bridge/objc/objc_runtime.h index 63f3254..4de1ce6 100644 --- a/WebCore/bridge/objc/objc_runtime.h +++ b/WebCore/bridge/objc/objc_runtime.h @@ -26,8 +26,8 @@ #ifndef KJS_BINDINGS_OBJC_RUNTIME_H #define KJS_BINDINGS_OBJC_RUNTIME_H +#include "Bridge.h" #include "objc_header.h" -#include "runtime.h" #include <runtime/JSGlobalObject.h> #include <wtf/RetainPtr.h> diff --git a/WebCore/bridge/qt/qt_class.h b/WebCore/bridge/qt/qt_class.h index dc6b130..b7a04cf 100644 --- a/WebCore/bridge/qt/qt_class.h +++ b/WebCore/bridge/qt/qt_class.h @@ -20,8 +20,7 @@ #ifndef BINDINGS_QT_CLASS_H_ #define BINDINGS_QT_CLASS_H_ -#include "runtime.h" - +#include "Bridge.h" #include "qglobal.h" QT_BEGIN_NAMESPACE diff --git a/WebCore/bridge/qt/qt_instance.h b/WebCore/bridge/qt/qt_instance.h index 0afc6c7..1fc253a 100644 --- a/WebCore/bridge/qt/qt_instance.h +++ b/WebCore/bridge/qt/qt_instance.h @@ -20,11 +20,11 @@ #ifndef BINDINGS_QT_INSTANCE_H_ #define BINDINGS_QT_INSTANCE_H_ -#include <QtScript/qscriptengine.h> -#include "runtime.h" +#include "Bridge.h" #include "runtime_root.h" -#include <qpointer.h> +#include <QtScript/qscriptengine.h> #include <qhash.h> +#include <qpointer.h> #include <qset.h> namespace JSC { diff --git a/WebCore/bridge/qt/qt_runtime.cpp b/WebCore/bridge/qt/qt_runtime.cpp index 94749b4..be1364a 100644 --- a/WebCore/bridge/qt/qt_runtime.cpp +++ b/WebCore/bridge/qt/qt_runtime.cpp @@ -46,7 +46,6 @@ #include "qvarlengtharray.h" #include <JSFunction.h> #include <limits.h> -#include <runtime.h> #include <runtime/Error.h> #include <runtime_array.h> #include <runtime_object.h> diff --git a/WebCore/bridge/qt/qt_runtime.h b/WebCore/bridge/qt/qt_runtime.h index dc55f61..d9450eb 100644 --- a/WebCore/bridge/qt/qt_runtime.h +++ b/WebCore/bridge/qt/qt_runtime.h @@ -20,9 +20,9 @@ #ifndef BINDINGS_QT_RUNTIME_H_ #define BINDINGS_QT_RUNTIME_H_ +#include "Bridge.h" #include "Completion.h" #include "Protect.h" -#include "runtime.h" #include "runtime_method.h" #include <qbytearray.h> diff --git a/WebCore/bridge/runtime_array.h b/WebCore/bridge/runtime_array.h index 1218b8c..eeaa337 100644 --- a/WebCore/bridge/runtime_array.h +++ b/WebCore/bridge/runtime_array.h @@ -26,7 +26,7 @@ #ifndef RUNTIME_ARRAY_H_ #define RUNTIME_ARRAY_H_ -#include "runtime.h" +#include "Bridge.h" #include <runtime/JSGlobalObject.h> namespace JSC { diff --git a/WebCore/bridge/runtime_method.h b/WebCore/bridge/runtime_method.h index 9676048..148be32 100644 --- a/WebCore/bridge/runtime_method.h +++ b/WebCore/bridge/runtime_method.h @@ -26,7 +26,7 @@ #ifndef RUNTIME_FUNCTION_H_ #define RUNTIME_FUNCTION_H_ -#include "runtime.h" +#include "Bridge.h" #include <runtime/InternalFunction.h> #include <runtime/JSGlobalObject.h> #include <wtf/OwnPtr.h> diff --git a/WebCore/bridge/runtime_object.h b/WebCore/bridge/runtime_object.h index 391e078..7d658fa 100644 --- a/WebCore/bridge/runtime_object.h +++ b/WebCore/bridge/runtime_object.h @@ -26,7 +26,7 @@ #ifndef KJS_RUNTIME_OBJECT_H #define KJS_RUNTIME_OBJECT_H -#include "runtime.h" +#include "Bridge.h" #include <runtime/JSGlobalObject.h> namespace JSC { diff --git a/WebCore/bridge/runtime_root.cpp b/WebCore/bridge/runtime_root.cpp index 0e9bf74..143c3ad 100644 --- a/WebCore/bridge/runtime_root.cpp +++ b/WebCore/bridge/runtime_root.cpp @@ -26,7 +26,7 @@ #include "config.h" #include "runtime_root.h" -#include "runtime.h" +#include "Bridge.h" #include "runtime_object.h" #include <runtime/JSGlobalObject.h> #include <wtf/HashCountedSet.h> diff --git a/WebCore/bridge/testbindings.cpp b/WebCore/bridge/testbindings.cpp index e4bbc7e..bcba115 100644 --- a/WebCore/bridge/testbindings.cpp +++ b/WebCore/bridge/testbindings.cpp @@ -19,19 +19,17 @@ * */ #include "config.h" -#include <assert.h> -#include <stdio.h> -#include <string.h> -#include "JSValue.h" +#include "Bridge.h" #include "JSObject.h" -#include "types.h" +#include "JSValue.h" #include "interpreter.h" - #include "npruntime_internal.h" - -#include "runtime.h" #include "runtime_object.h" +#include "types.h" +#include <assert.h> +#include <stdio.h> +#include <string.h> #define LOG(formatAndArgs...) { \ diff --git a/WebCore/bridge/testbindings.mm b/WebCore/bridge/testbindings.mm index ca70e17..31564a8 100644 --- a/WebCore/bridge/testbindings.mm +++ b/WebCore/bridge/testbindings.mm @@ -24,20 +24,18 @@ */ #include "config.h" -#include <Foundation/Foundation.h> +#include "Bridge.h" +#include <Foundation/Foundation.h> +#include "JSObject.h" +#include "JSValue.h" #import <WebKit/WebScriptObject.h> - +#include "interpreter.h" +#include "runtime_object.h" #include <stdio.h> #include <string.h> - -#include "JSValue.h" -#include "JSObject.h" #include "types.h" -#include "interpreter.h" -#include "runtime.h" -#include "runtime_object.h" #define LOG(formatAndArgs...) { \ fprintf (stderr, "%s: ", __PRETTY_FUNCTION__); \ diff --git a/WebCore/bridge/testqtbindings.cpp b/WebCore/bridge/testqtbindings.cpp index 41a9a3a..73df155 100644 --- a/WebCore/bridge/testqtbindings.cpp +++ b/WebCore/bridge/testqtbindings.cpp @@ -23,21 +23,18 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" -#include <assert.h> -#include <stdio.h> -#include <string.h> -#include "JSValue.h" +#include "Bridge.h" #include "JSObject.h" -#include "types.h" +#include "JSValue.h" #include "interpreter.h" - -#include "qobject.h" #include "qdebug.h" - -#include "runtime.h" +#include "qobject.h" #include "runtime_object.h" - +#include "types.h" +#include <assert.h> +#include <stdio.h> +#include <string.h> class MyObject : public QObject diff --git a/WebCore/page/win/FrameWin.cpp b/WebCore/page/win/FrameWin.cpp index b15d195..8440a80 100644 --- a/WebCore/page/win/FrameWin.cpp +++ b/WebCore/page/win/FrameWin.cpp @@ -24,14 +24,14 @@ */ #include "config.h" -#include "runtime.h" #include "FrameWin.h" -#include "TransformationMatrix.h" -#include "FloatRect.h" +#include "Bridge.h" #include "Document.h" +#include "FloatRect.h" #include "RenderView.h" #include "Settings.h" +#include "TransformationMatrix.h" using std::min; diff --git a/WebCore/platform/graphics/wince/MediaPlayerProxy.cpp b/WebCore/platform/graphics/wince/MediaPlayerProxy.cpp index 9673d18..ceb5a7c 100644 --- a/WebCore/platform/graphics/wince/MediaPlayerProxy.cpp +++ b/WebCore/platform/graphics/wince/MediaPlayerProxy.cpp @@ -22,9 +22,7 @@ #include "config.h" #include "MediaPlayerProxy.h" -#include "c_class.h" -#include "c_instance.h" -#include "c_runtime.h" +#include "Bridge.h" #include "DocumentLoader.h" #include "HTMLPlugInElement.h" #include "HTMLVideoElement.h" @@ -32,14 +30,16 @@ #include "JSPluginElementFunctions.h" #include "MediaPlayer.h" #include "Node.h" -#include "npruntime_impl.h" #include "PlatformString.h" #include "PluginView.h" #include "RenderPartObject.h" #include "RenderWidget.h" -#include "runtime.h" -#include <runtime/Identifier.h> #include "Widget.h" +#include "c_class.h" +#include "c_instance.h" +#include "c_runtime.h" +#include "npruntime_impl.h" +#include <runtime/Identifier.h> using namespace JSC; diff --git a/WebCore/plugins/PluginView.cpp b/WebCore/plugins/PluginView.cpp index afec228..129a21c 100644 --- a/WebCore/plugins/PluginView.cpp +++ b/WebCore/plugins/PluginView.cpp @@ -27,6 +27,12 @@ #include "config.h" #include "PluginView.h" +// ANDROID +// Temporary guard required until Bridge.h is script-engine independent +// See https://bugs.webkit.org/show_bug.cgi?id=32154 +#if USE(JSC) +#include "Bridge.h" +#endif #include "Document.h" #include "DocumentLoader.h" #include "Element.h" @@ -71,7 +77,6 @@ #include "JSDOMBinding.h" #include "c_instance.h" #include "runtime_root.h" -#include "runtime.h" #include <runtime/JSLock.h> #include <runtime/JSValue.h> diff --git a/WebCore/plugins/gtk/PluginViewGtk.cpp b/WebCore/plugins/gtk/PluginViewGtk.cpp index 6ea9417..3e7e3ee 100644 --- a/WebCore/plugins/gtk/PluginViewGtk.cpp +++ b/WebCore/plugins/gtk/PluginViewGtk.cpp @@ -27,6 +27,7 @@ #include "config.h" #include "PluginView.h" +#include "Bridge.h" #include "Document.h" #include "DocumentLoader.h" #include "Element.h" @@ -51,7 +52,6 @@ #include "JSDOMBinding.h" #include "ScriptController.h" #include "npruntime_impl.h" -#include "runtime.h" #include "runtime_root.h" #include <runtime/JSLock.h> #include <runtime/JSValue.h> diff --git a/WebCore/plugins/mac/PluginViewMac.cpp b/WebCore/plugins/mac/PluginViewMac.cpp index 44a0262..816efa0 100644 --- a/WebCore/plugins/mac/PluginViewMac.cpp +++ b/WebCore/plugins/mac/PluginViewMac.cpp @@ -31,10 +31,7 @@ #include "config.h" #include "PluginView.h" -#include <runtime/JSLock.h> -#include <runtime/JSValue.h> -#include "wtf/RetainPtr.h" - +#include "Bridge.h" #include "Document.h" #include "DocumentLoader.h" #include "Element.h" @@ -53,7 +50,6 @@ #include "KeyboardEvent.h" #include "MouseEvent.h" #include "NotImplemented.h" -#include "npruntime_impl.h" #include "Page.h" #include "PlatformMouseEvent.h" #include "PlatformKeyboardEvent.h" @@ -61,10 +57,14 @@ #include "PluginPackage.h" #include "PluginMainThreadScheduler.h" #include "RenderLayer.h" -#include "runtime.h" -#include "runtime_root.h" #include "ScriptController.h" #include "Settings.h" +#include "npruntime_impl.h" +#include "runtime_root.h" +#include <runtime/JSLock.h> +#include <runtime/JSValue.h> +#include <wtf/RetainPtr.h> + using JSC::ExecState; using JSC::Interpreter; diff --git a/WebCore/plugins/qt/PluginViewQt.cpp b/WebCore/plugins/qt/PluginViewQt.cpp index 063a7e5..bda76ce 100644 --- a/WebCore/plugins/qt/PluginViewQt.cpp +++ b/WebCore/plugins/qt/PluginViewQt.cpp @@ -28,6 +28,7 @@ #include "config.h" #include "PluginView.h" +#include "Bridge.h" #include "Document.h" #include "DocumentLoader.h" #include "Element.h" @@ -53,27 +54,27 @@ #include "PluginDebug.h" #include "PluginPackage.h" #include "PluginMainThreadScheduler.h" +#include "QWebPageClient.h" #include "RenderLayer.h" #include "ScriptController.h" #include "Settings.h" #include "npruntime_impl.h" -#include "runtime.h" #include "runtime_root.h" -#include "QWebPageClient.h" + #include <QApplication> #include <QDesktopWidget> #include <QKeyEvent> #include <QPainter> #include <QWidget> #include <QX11Info> -#include <runtime/JSLock.h> -#include <runtime/JSValue.h> #include <X11/X.h> #ifndef QT_NO_XRENDER #define Bool int #define Status int #include <X11/extensions/Xrender.h> #endif +#include <runtime/JSLock.h> +#include <runtime/JSValue.h> using JSC::ExecState; using JSC::Interpreter; diff --git a/WebCore/plugins/symbian/PluginViewSymbian.cpp b/WebCore/plugins/symbian/PluginViewSymbian.cpp index 14e25b1..44702fd 100644 --- a/WebCore/plugins/symbian/PluginViewSymbian.cpp +++ b/WebCore/plugins/symbian/PluginViewSymbian.cpp @@ -19,6 +19,7 @@ #include "config.h" #include "PluginView.h" +#include "Bridge.h" #include "Document.h" #include "DocumentLoader.h" #include "Element.h" @@ -36,8 +37,6 @@ #include "KeyboardEvent.h" #include "MouseEvent.h" #include "NotImplemented.h" -#include "npfunctions.h" -#include "npinterface.h" #include "Page.h" #include "PlatformKeyboardEvent.h" #include "PlatformMouseEvent.h" @@ -45,13 +44,14 @@ #include "PluginDebug.h" #include "PluginMainThreadScheduler.h" #include "PluginPackage.h" +#include "QWebPageClient.h" #include "RenderLayer.h" #include "ScriptController.h" #include "Settings.h" +#include "npfunctions.h" +#include "npinterface.h" #include "npruntime_impl.h" -#include "runtime.h" #include "runtime_root.h" -#include "QWebPageClient.h" #include <QKeyEvent> #include <QPixmap.h> #include <QRegion> diff --git a/WebCore/plugins/win/PluginViewWin.cpp b/WebCore/plugins/win/PluginViewWin.cpp index 89eecc6..37f1fc8 100644 --- a/WebCore/plugins/win/PluginViewWin.cpp +++ b/WebCore/plugins/win/PluginViewWin.cpp @@ -33,6 +33,7 @@ #if !PLATFORM(WX) #include "BitmapInfo.h" #endif +#include "Bridge.h" #include "Document.h" #include "DocumentLoader.h" #include "Element.h" @@ -62,11 +63,10 @@ #include "PluginDatabase.h" #include "PluginDebug.h" #include "PluginPackage.h" +#include "Settings.h" #include "c_instance.h" #include "npruntime_impl.h" #include "runtime_root.h" -#include "Settings.h" -#include "runtime.h" #include <runtime/JSLock.h> #include <runtime/JSValue.h> #include <wtf/ASCIICType.h> |