summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/ChangeLog45
-rw-r--r--WebKit/LICENSE22
-rw-r--r--WebKit/WebKit.xcodeproj/project.pbxproj4
-rw-r--r--WebKit/chromium/DEPS19
-rw-r--r--WebKit/chromium/features.gypi4
-rw-r--r--WebKit/gtk/ChangeLog243
-rw-r--r--WebKit/gtk/NEWS24
-rw-r--r--WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp5
-rw-r--r--WebKit/gtk/WebCoreSupport/EditorClientGtk.h1
-rw-r--r--WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp29
-rw-r--r--WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp26
-rw-r--r--WebKit/gtk/docs/webkitgtk-docs.sgml4
-rw-r--r--WebKit/gtk/docs/webkitgtk-sections.txt1
-rw-r--r--WebKit/gtk/po/ChangeLog29
-rw-r--r--WebKit/gtk/po/GNUmakefile.am8
-rw-r--r--WebKit/gtk/po/lt.po702
-rw-r--r--WebKit/gtk/tests/testatk.c96
-rw-r--r--WebKit/gtk/webkit/webkitapplicationcache.cpp8
-rw-r--r--WebKit/gtk/webkit/webkitdownload.cpp67
-rw-r--r--WebKit/gtk/webkit/webkitdownload.h3
-rw-r--r--WebKit/gtk/webkit/webkitprivate.h7
-rw-r--r--WebKit/gtk/webkit/webkitsecurityorigin.h1
-rw-r--r--WebKit/gtk/webkit/webkitwebframe.cpp24
-rw-r--r--WebKit/gtk/webkit/webkitwebinspector.cpp76
-rw-r--r--WebKit/gtk/webkit/webkitwebinspector.h6
-rw-r--r--WebKit/gtk/webkit/webkitwebsettings.cpp77
-rw-r--r--WebKit/gtk/webkit/webkitwebview.cpp17
-rw-r--r--WebKit/mac/ChangeLog550
-rw-r--r--WebKit/mac/Configurations/DebugRelease.xcconfig3
-rw-r--r--WebKit/mac/Configurations/FeatureDefines.xcconfig2
-rw-r--r--WebKit/mac/Configurations/Version.xcconfig3
-rw-r--r--WebKit/mac/History/WebHistory.mm10
-rw-r--r--WebKit/mac/History/WebHistoryPrivate.h3
-rw-r--r--WebKit/mac/Misc/WebCoreStatistics.h3
-rw-r--r--WebKit/mac/Misc/WebCoreStatistics.mm6
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h2
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm3
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm3
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h1
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm48
-rw-r--r--WebKit/mac/Plugins/Hosted/ProxyInstance.mm2
-rw-r--r--WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm14
-rw-r--r--WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs4
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginView.h8
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginView.mm92
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginView.mm28
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.mm9
-rw-r--r--WebKit/mac/WebCoreSupport/WebEditorClient.mm9
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h1
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm13
-rw-r--r--WebKit/mac/WebCoreSupport/WebPluginHalterClient.h1
-rw-r--r--WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm5
-rw-r--r--WebKit/mac/WebView/WebDelegateImplementationCaching.h2
-rw-r--r--WebKit/mac/WebView/WebDelegateImplementationCaching.mm5
-rw-r--r--WebKit/mac/WebView/WebDynamicScrollBarsView.h8
-rw-r--r--WebKit/mac/WebView/WebFrame.mm50
-rw-r--r--WebKit/mac/WebView/WebFramePrivate.h3
-rw-r--r--WebKit/mac/WebView/WebHTMLView.mm9
-rw-r--r--WebKit/mac/WebView/WebHTMLViewPrivate.h2
-rw-r--r--WebKit/mac/WebView/WebHistoryDelegate.h2
-rw-r--r--WebKit/mac/WebView/WebPDFView.mm2
-rw-r--r--WebKit/mac/WebView/WebPolicyDelegatePrivate.h2
-rw-r--r--WebKit/mac/WebView/WebPreferenceKeysPrivate.h2
-rw-r--r--WebKit/mac/WebView/WebPreferences.mm22
-rw-r--r--WebKit/mac/WebView/WebPreferencesPrivate.h6
-rw-r--r--WebKit/mac/WebView/WebResourceLoadDelegate.h2
-rw-r--r--WebKit/mac/WebView/WebScriptDebugDelegate.mm2
-rw-r--r--WebKit/mac/WebView/WebTextCompletionController.mm3
-rw-r--r--WebKit/mac/WebView/WebVideoFullscreenController.mm40
-rw-r--r--WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.h2
-rw-r--r--WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm84
-rw-r--r--WebKit/mac/WebView/WebView.mm333
-rw-r--r--WebKit/mac/WebView/WebViewEventHandling.mm240
-rw-r--r--WebKit/mac/WebView/WebViewInternal.h14
-rw-r--r--WebKit/mac/WebView/WebViewPrivate.h18
-rw-r--r--WebKit/mac/WebView/WebWindowAnimation.h2
-rw-r--r--WebKit/mac/WebView/WebWindowAnimation.m1
-rw-r--r--WebKit/qt/Api/qgraphicswebview.cpp105
-rw-r--r--WebKit/qt/Api/qgraphicswebview.h1
-rw-r--r--WebKit/qt/Api/qwebelement.cpp453
-rw-r--r--WebKit/qt/Api/qwebelement.h82
-rw-r--r--WebKit/qt/Api/qwebframe.cpp148
-rw-r--r--WebKit/qt/Api/qwebframe.h19
-rw-r--r--WebKit/qt/Api/qwebframe_p.h4
-rw-r--r--WebKit/qt/Api/qwebhistory.cpp151
-rw-r--r--WebKit/qt/Api/qwebhistory.h15
-rw-r--r--WebKit/qt/Api/qwebpage.cpp71
-rw-r--r--WebKit/qt/Api/qwebpage.h6
-rw-r--r--WebKit/qt/Api/qwebpage_p.h5
-rw-r--r--WebKit/qt/Api/qwebsecurityorigin.cpp28
-rw-r--r--WebKit/qt/Api/qwebsecurityorigin.h2
-rw-r--r--WebKit/qt/Api/qwebsettings.cpp65
-rw-r--r--WebKit/qt/Api/qwebsettings.h6
-rw-r--r--WebKit/qt/Api/qwebview.cpp69
-rw-r--r--WebKit/qt/Api/qwebview.h3
-rw-r--r--WebKit/qt/ChangeLog820
-rw-r--r--WebKit/qt/QGVLauncher/QGVLauncher.pro5
-rw-r--r--WebKit/qt/QGVLauncher/main.cpp156
-rw-r--r--WebKit/qt/QtLauncher/QtLauncher.pro5
-rw-r--r--WebKit/qt/QtLauncher/main.cpp16
-rw-r--r--WebKit/qt/WebCoreSupport/EditorClientQt.cpp26
-rw-r--r--WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp27
-rw-r--r--WebKit/qt/tests/benchmarks/loading/tst_loading.pro5
-rw-r--r--WebKit/qt/tests/benchmarks/painting/tst_painting.pro5
-rw-r--r--WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro4
-rw-r--r--WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp76
-rw-r--r--WebKit/qt/tests/qwebelement/image.pngbin0 -> 14743 bytes
-rw-r--r--WebKit/qt/tests/qwebelement/qwebelement.pro5
-rw-r--r--WebKit/qt/tests/qwebelement/qwebelement.qrc1
-rw-r--r--WebKit/qt/tests/qwebelement/tst_qwebelement.cpp160
-rw-r--r--WebKit/qt/tests/qwebframe/qwebframe.pro5
-rw-r--r--WebKit/qt/tests/qwebframe/resources/image2.pngbin0 -> 14743 bytes
-rw-r--r--WebKit/qt/tests/qwebframe/tst_qwebframe.cpp24
-rw-r--r--WebKit/qt/tests/qwebhistory/qwebhistory.pro5
-rw-r--r--WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp80
-rw-r--r--WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro5
-rw-r--r--WebKit/qt/tests/qwebpage/qwebpage.pro6
-rw-r--r--WebKit/qt/tests/qwebpage/tst_qwebpage.cpp228
-rw-r--r--WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro5
-rw-r--r--WebKit/qt/tests/qwebview/qwebview.pro6
-rw-r--r--WebKit/qt/tests/qwebview/tst_qwebview.cpp45
-rw-r--r--WebKit/qt/tests/resources/test.swfbin0 -> 10085 bytes
-rw-r--r--WebKit/win/AccessibleBase.cpp8
-rw-r--r--WebKit/win/AccessibleImage.cpp58
-rw-r--r--WebKit/win/AccessibleImage.h41
-rw-r--r--WebKit/win/ChangeLog535
-rwxr-xr-xWebKit/win/Interfaces/IWebFramePrivate.idl5
-rw-r--r--WebKit/win/Interfaces/IWebHistoryDelegate.idl49
-rw-r--r--WebKit/win/Interfaces/IWebHistoryPrivate.idl2
-rw-r--r--WebKit/win/Interfaces/IWebNavigationData.idl51
-rw-r--r--WebKit/win/Interfaces/IWebPolicyDelegatePrivate.idl1
-rw-r--r--WebKit/win/Interfaces/IWebPreferencesPrivate.idl6
-rw-r--r--WebKit/win/Interfaces/IWebViewPrivate.idl16
-rw-r--r--WebKit/win/Interfaces/WebKit.idl105
-rw-r--r--WebKit/win/WebCoreSupport/WebChromeClient.cpp7
-rw-r--r--WebKit/win/WebCoreSupport/WebContextMenuClient.cpp2
-rw-r--r--WebKit/win/WebCoreSupport/WebDragClient.cpp21
-rw-r--r--WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp86
-rw-r--r--WebKit/win/WebCoreSupport/WebFrameLoaderClient.h1
-rw-r--r--WebKit/win/WebCoreSupport/WebPluginHalterClient.cpp9
-rw-r--r--WebKit/win/WebCoreSupport/WebPluginHalterClient.h1
-rw-r--r--WebKit/win/WebDropSource.cpp4
-rw-r--r--WebKit/win/WebDropSource.h6
-rw-r--r--WebKit/win/WebElementPropertyBag.cpp5
-rw-r--r--WebKit/win/WebFrame.cpp108
-rw-r--r--WebKit/win/WebFrame.h13
-rw-r--r--WebKit/win/WebHistory.cpp12
-rw-r--r--WebKit/win/WebHistory.h3
-rw-r--r--WebKit/win/WebKit.vcproj/Interfaces.vcproj40
-rw-r--r--WebKit/win/WebKit.vcproj/InterfacesGenerated.vcproj48
-rwxr-xr-xWebKit/win/WebKit.vcproj/WebKit.make2
-rw-r--r--WebKit/win/WebKit.vcproj/WebKit.rc2
-rw-r--r--WebKit/win/WebKit.vcproj/WebKit.sln116
-rw-r--r--WebKit/win/WebKit.vcproj/WebKit.submit.sln24
-rw-r--r--WebKit/win/WebKit.vcproj/WebKit.vcproj944
-rw-r--r--WebKit/win/WebKit.vcproj/WebKitGUID.vcproj60
-rw-r--r--WebKit/win/WebKitClassFactory.cpp2
-rw-r--r--WebKit/win/WebLocalizableStrings.cpp46
-rw-r--r--WebKit/win/WebNavigationData.cpp144
-rw-r--r--WebKit/win/WebNavigationData.h77
-rw-r--r--WebKit/win/WebPreferenceKeysPrivate.h3
-rw-r--r--WebKit/win/WebPreferences.cpp28
-rw-r--r--WebKit/win/WebPreferences.h12
-rw-r--r--WebKit/win/WebView.cpp218
-rw-r--r--WebKit/win/WebView.h26
-rw-r--r--WebKit/wx/ChangeLog89
-rw-r--r--WebKit/wx/WebFrame.cpp4
-rw-r--r--WebKit/wx/WebKitSupport/ChromeClientWx.cpp12
-rw-r--r--WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp4
-rw-r--r--WebKit/wx/WebView.cpp68
-rw-r--r--WebKit/wx/WebView.h21
-rw-r--r--WebKit/wx/bindings/python/samples/simple.py6
-rw-r--r--WebKit/wx/bindings/python/webview.i3
173 files changed, 7244 insertions, 2090 deletions
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 9293336..5006da7 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,48 @@
+2009-10-27 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Updated license
+
+ * LICENSE:
+
+2009-10-26 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Move some WebView event handling code into its own file, WebViewEventHandling.mm
+
+ * WebKit.xcodeproj/project.pbxproj:
+
+2009-10-19 John Gregg <johnnyg@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ set ENABLE_NOTIFICATIONS=1 for Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=29949
+
+ * chromium/features.gypi:
+
+2009-10-13 Drew Wilson <atwilson@atwilson-macpro.local>
+
+ Reviewed by David Levin.
+
+ Enable SHARED_WORKERS for Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=30289
+
+ * chromium/features.gypi:
+ Turned on ENABLE_SHARED_WORKERS by default. This doesn't actually turn on
+ SharedWorkers yet, as Chromium overrides this flag in its feature_overrides.gypi.
+
+2009-10-12 Yaar Schnitman <yaar@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Chromium Port - Windows
+ https://bugs.webkit.org/show_bug.cgi?id=29969
+
+ * chromium/DEPS: Added gtest dep required by windows and incremented some of the deps revisions.
+
2009-10-06 Simon Fraser <simon.fraser@apple.com>
Reviewed by Mark Rowe.
diff --git a/WebKit/LICENSE b/WebKit/LICENSE
index 47dee86..f29b41c 100644
--- a/WebKit/LICENSE
+++ b/WebKit/LICENSE
@@ -1,25 +1,21 @@
-Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+Copyright (C) 2005, 2006, 2007, 2008, 2009 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.
+ 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.
-3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- its contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
+ documentation and/or other materials provided with the distribution.
-THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+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 OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+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.
+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.
diff --git a/WebKit/WebKit.xcodeproj/project.pbxproj b/WebKit/WebKit.xcodeproj/project.pbxproj
index db25bf9..a5a2e39 100644
--- a/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/WebKit/WebKit.xcodeproj/project.pbxproj
@@ -330,6 +330,7 @@
BC2E464E0FD8A96800A9D9DE /* WebViewData.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC2E464C0FD8A96800A9D9DE /* WebViewData.mm */; };
BC542C420FD7766F00D8AB5D /* WebDelegateImplementationCaching.h in Headers */ = {isa = PBXBuildFile; fileRef = BC542C400FD7766F00D8AB5D /* WebDelegateImplementationCaching.h */; };
BC542C430FD7766F00D8AB5D /* WebDelegateImplementationCaching.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC542C410FD7766F00D8AB5D /* WebDelegateImplementationCaching.mm */; };
+ BC97E7E210963D260010D361 /* WebViewEventHandling.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC97E7E110963D260010D361 /* WebViewEventHandling.mm */; };
C0167BF80D7F5DD00028696E /* WebScriptDebugger.h in Headers */ = {isa = PBXBuildFile; fileRef = C0167BF60D7F5DD00028696E /* WebScriptDebugger.h */; };
C0167BF90D7F5DD00028696E /* WebScriptDebugger.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0167BF70D7F5DD00028696E /* WebScriptDebugger.mm */; };
DD7CDEE70A23BA9E00069928 /* WebTypesInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = DD7CDEE60A23BA9E00069928 /* WebTypesInternal.h */; };
@@ -604,6 +605,7 @@
BC2E464C0FD8A96800A9D9DE /* WebViewData.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebViewData.mm; sourceTree = "<group>"; };
BC542C400FD7766F00D8AB5D /* WebDelegateImplementationCaching.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebDelegateImplementationCaching.h; sourceTree = "<group>"; };
BC542C410FD7766F00D8AB5D /* WebDelegateImplementationCaching.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDelegateImplementationCaching.mm; sourceTree = "<group>"; };
+ BC97E7E110963D260010D361 /* WebViewEventHandling.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebViewEventHandling.mm; sourceTree = "<group>"; };
BE4FBECB0653DF47005EDE15 /* WebEditingDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebEditingDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
BE6DC39904C62C4E004D0EF6 /* WebNSURLExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSURLExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
BE6DC39A04C62C4E004D0EF6 /* WebNSURLExtras.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNSURLExtras.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
@@ -1144,6 +1146,7 @@
BC2E464C0FD8A96800A9D9DE /* WebViewData.mm */,
930D02BB06275F640076701E /* WebViewInternal.h */,
51A8B57D0428353A00CA2D3A /* WebViewPrivate.h */,
+ BC97E7E110963D260010D361 /* WebViewEventHandling.mm */,
0FD3B0F61076C3F700039B96 /* WebWindowAnimation.h */,
0FD3B0F71076C3F700039B96 /* WebWindowAnimation.m */,
);
@@ -1849,6 +1852,7 @@
0FD3B0F51076C3E900039B96 /* WebVideoFullscreenHUDWindowController.mm in Sources */,
0FD3B0F91076C3F700039B96 /* WebWindowAnimation.m in Sources */,
0A2D87FE107AF52B00CDDEE3 /* WebPluginHalterClient.mm in Sources */,
+ BC97E7E210963D260010D361 /* WebViewEventHandling.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS
index 514a640..5f5b9b8 100644
--- a/WebKit/chromium/DEPS
+++ b/WebKit/chromium/DEPS
@@ -35,17 +35,18 @@ vars = {
'chromium_deps_svn': 'http://src.chromium.org/svn/trunk/deps/third_party',
# Dependencies' revisions to use:
- 'chromium_rev': '27692',
+ 'chromium_rev': '28710',
'google-url_rev': '119',
- 'gyp_rev': '671',
+ 'gtest_rev': '329',
+ 'gyp_rev': '685',
'icu_rev': '27687',
- 'openvcdiff_rev': '26',
- 'skia_rev': '341',
- 'v8_rev': '2966',
+ 'openvcdiff_rev': '28',
+ 'skia_rev': '376',
+ 'v8_rev': '3030',
# Windows:
'cygwin_rev': '11984',
- 'ffmpeg_ia32_rev': '26428',
+ 'ffmpeg_ia32_rev': '28488',
'pthreads-win32_rev': '26716',
'python_24_rev': '22967',
}
@@ -72,11 +73,15 @@ deps = {
# testing
'testing':
Var('chromium_svn')+'/testing@'+Var('chromium_rev'),
+ 'testing/gtest':
+ 'http://googletest.googlecode.com/svn/trunk@'+Var('gtest_rev'),
# v8 javascript engine
'v8':
'http://v8.googlecode.com/svn/trunk@'+Var('v8_rev'),
-
+ 'testing/gtest':
+ 'http://googletest.googlecode.com/svn/trunk@'+Var('gtest_rev'),
+
# net dependencies
'net':
Var('chromium_svn')+'/net@'+Var('chromium_rev'),
diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi
index f91598c..e3bc7d3 100644
--- a/WebKit/chromium/features.gypi
+++ b/WebKit/chromium/features.gypi
@@ -49,11 +49,11 @@
'ENABLE_JAVASCRIPT_DEBUGGER=0',
'ENABLE_JSC_MULTIPLE_THREADS=0',
'ENABLE_ICONDATABASE=0',
- 'ENABLE_NOTIFICATIONS=0',
+ 'ENABLE_NOTIFICATIONS=1',
'ENABLE_ORIENTATION_EVENTS=0',
'ENABLE_XSLT=1',
'ENABLE_XPATH=1',
- 'ENABLE_SHARED_WORKERS=0',
+ 'ENABLE_SHARED_WORKERS=1',
'ENABLE_SVG=1',
'ENABLE_SVG_ANIMATION=1',
'ENABLE_SVG_AS_IMAGE=1',
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 370fb2b..62aa3da 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,244 @@
+2009-10-28 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Jan Alonzo.
+
+ [GTK] API to start inspector for a WebView
+ https://bugs.webkit.org/show_bug.cgi?id=22551
+
+ Provide a simple, coordinates-based API to start the inspector.
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::InspectorClient::createPage): Use files from the source
+ tree when running from the top of the source directory.
+ (WebKit::InspectorClient::localizedStringsURL): Ditto.
+ * webkit/webkitprivate.h:
+ * webkit/webkitwebinspector.cpp:
+ (webkit_web_inspector_inspect_coordinates):
+ (webkit_web_inspector_close):
+ (webkit_web_inspector_execute_script):
+ * webkit/webkitwebinspector.h:
+
+2009-10-27 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Provide a way to get counter values with layoutTestContoller
+ https://bugs.webkit.org/show_bug.cgi?id=30555
+
+ * webkit/webkitprivate.h:
+ * webkit/webkitwebframe.cpp:
+ (webkit_web_frame_counter_value_for_element_by_id):
+
+2009-10-28 Joe Mason <jmason@rim.com>
+
+ Reviewed by Adam Treat.
+
+ Call the shared FrameLoader::defaultObjectContentType instead of
+ copying code into FrameLoaderClient::objectContentType. This causes no
+ behavioural change.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::objectContentType):
+
+2009-10-28 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Jan Alonzo.
+
+ [Gtk] Extraneous object of ROLE_PANEL in hierarchy for entries
+ https://bugs.webkit.org/show_bug.cgi?id=25897
+
+ Update test to also check that entries implement the AtkText
+ interface.
+
+ * tests/testatk.c:
+ (run_get_text_tests):
+ (test_webkit_atk_get_text_at_offset_forms):
+ (test_webkit_atk_get_text_at_offset):
+ (main):
+
+2009-10-26 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed. Update documentation control files for 1.1.16.
+
+ * docs/webkitgtk-docs.sgml:
+ * docs/webkitgtk-sections.txt:
+
+2009-10-26 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30759
+ [GTK] Should use WebKitNetworkResponse, and expose it
+
+ WebKitDownload now uses our WebKitNetworkResponse instead of using
+ ResourceResponse directly. By exposing the response, like we do
+ with the request, we give our users the ability to look at the
+ response headers, status code, and so on, through the SoupMessage
+ object.
+
+ * webkit/webkitdownload.cpp:
+ (webkit_download_dispose):
+ (webkit_download_finalize):
+ (webkit_download_get_property):
+ (webkit_download_set_property):
+ (webkit_download_class_init):
+ (webkit_download_get_network_response):
+ (webkit_download_set_response):
+ (webkit_download_get_total_size):
+ (webkit_download_get_progress):
+ (webkit_download_received_data):
+ * webkit/webkitdownload.h:
+
+2009-10-26 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Update for 1.1.16 release.
+
+ * NEWS:
+
+2009-10-22 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by NOBODY (build fix).
+ Build fix following bug #30696.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::windowObjectCleared):
+ * webkit/webkitwebframe.cpp:
+ (webkit_web_frame_get_global_context):
+
+2009-10-22 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ m_webView should be private attribute of the EditorClientGtk.
+ https://bugs.webkit.org/show_bug.cgi?id=30664
+
+ * WebKit/gtk/WebCoreSupport/EditorClientGtk.h:
+
+2009-10-20 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by David Levin.
+
+ Removed WebSocket runtime settings.
+ https://bugs.webkit.org/show_bug.cgi?id=29896
+
+ WebSocket runtime configuration is supported by chromium/v8 only.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_update_settings):
+ (webkit_web_view_settings_notify):
+
+2009-10-19 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ [Gtk] ApplicationCacheStorage error while compiling WebKit/gtk/webkit/webkitapplicationcache.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=30358
+
+ Guard calls to cacheStorage() with ENABLE(OFFLINE_WEB_APPLICATIONS).
+
+ * webkit/webkitapplicationcache.cpp:
+
+2009-10-19 Zan Dobersek <zandobersek@gmail.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Add a settings to allow DOM pastes to be performed.
+
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_class_init):
+ (webkit_web_settings_set_property):
+ (webkit_web_settings_get_property):
+ (webkit_web_settings_copy):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_update_settings):
+ (webkit_web_view_settings_notify):
+
+2009-10-19 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed. Make WebKitHitTestResult actually appear in the
+ documentation index.
+
+ * docs/webkitgtk-docs.sgml:
+
+2009-10-15 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Protect WebSocket calls in case the feature is not compiled in.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_update_settings):
+ (webkit_web_view_settings_notify):
+
+2009-10-15 Zan Dobersek <zandobersek@gmail.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Add a settings to enable support for experimental Web Sockets.
+ Currently this comes in handy in layout tests.
+
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_class_init):
+ (webkit_web_settings_set_property):
+ (webkit_web_settings_get_property):
+ (webkit_web_settings_copy):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_update_settings):
+ (webkit_web_view_settings_notify):
+
+2009-10-15 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ page transition may crash webkit
+ https://bugs.webkit.org/show_bug.cgi?id=29890
+
+ There are actually cases in which a resource may be asked using
+ webkit_web_view_get_resource after a new load has already been
+ started, so protect ourselves from crashes in this case.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::dispatchDidFinishLoading):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_get_resource):
+
+2009-10-12 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Rubber-stamped by Xan Lopez.
+
+ Remove unnecessary self-include.
+
+ * webkit/webkitsecurityorigin.h:
+
+2009-10-12 Christian Dywan <christian@twotoasts.de>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] Crash when right-clicking misspelled word
+ https://bugs.webkit.org/show_bug.cgi?id=29772
+
+ Make sure the dictionary exist before adding it to the list of
+ dictionaries.
+
+ * WebCoreSupport/EditorClientGtk.cpp:
+ (WebKit::EditorClient::checkSpellingOfString):
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_set_property):
+
+2009-10-08 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move executeScript from FrameLoader to ScriptController
+ https://bugs.webkit.org/show_bug.cgi?id=30200
+
+ Update API call.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_execute_script):
+
2009-10-07 Xan Lopez <xlopez@igalia.com>
Fix the GTK+ build.
@@ -2001,7 +2242,7 @@
Refactor how SoupMessage is handled, so that our ResourceRequest
object doesn't have to store it as a member, which complicates
- managing ResourceRequest's lifetime.
+ managing ResourceRequest's lifetvime.
* tests/testhttpbackend.c:
(navigation_policy_decision_requested_cb):
diff --git a/WebKit/gtk/NEWS b/WebKit/gtk/NEWS
index 8d0803c..b901f4b 100644
--- a/WebKit/gtk/NEWS
+++ b/WebKit/gtk/NEWS
@@ -1,4 +1,28 @@
=================
+WebKitGTK+ 1.1.16
+=================
+
+What's new in WebKitGTK+ 1.1.16?
+
+ - Add optional support to generate the gobject-introspection
+ gir/typelib files. Enable with --enable-introspection, it's off by
+ default.
+ - Add a new load status value, WEBKIT_LOAD_FAILED, emitted when
+ there's an error during the load process. This is the natural
+ companion to WEBKIT_LOAD_FINISHED, which is only emitted when the
+ load finished succesfuly.
+ - Ensure that keyboard events filtered by GtkIMContext still create
+ the proper DOM events.
+ - Many a11y improvements: caret browsing fixes, expose heading
+ levels, more accessible roles supported, more work in correctly
+ showing the element's ancestry list, improved support for lists,
+ etc.
+ - Many improvements to our media support.
+ - Add a new setting to control DOM pastes
+ (document.execCommand("Paste"))
+ - Many, many bugfixes all over the place.
+
+=================
WebKitGTK+ 1.1.15
=================
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
index 7121163..6ec6baf 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
@@ -615,6 +615,10 @@ void EditorClient::learnWord(const String& text)
void EditorClient::checkSpellingOfString(const UChar* text, int length, int* misspellingLocation, int* misspellingLength)
{
+ GSList* langs = webkit_web_settings_get_spell_languages(m_webView);
+ if (!langs)
+ return;
+
gchar* ctext = g_utf16_to_utf8(const_cast<gunichar2*>(text), length, 0, 0, 0);
int utflen = g_utf8_strlen(ctext, -1);
@@ -632,7 +636,6 @@ void EditorClient::checkSpellingOfString(const UChar* text, int length, int* mis
int start = i;
int end = i;
int wordLength;
- GSList* langs = webkit_web_settings_get_spell_languages(m_webView);
while (attrs[end].is_word_end < 1)
end++;
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
index 68034cf..9292651 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
@@ -118,6 +118,7 @@ namespace WebKit {
virtual void getGuessesForWord(const WebCore::String&, WTF::Vector<WebCore::String>& guesses);
virtual void setInputMethodState(bool enabled);
+ private:
WebKitWebView* m_webView;
};
}
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index 1cf9aee..d53df88 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -4,6 +4,7 @@
* Copyright (C) 2007 Christian Dywan <christian@twotoasts.de>
* Copyright (C) 2008, 2009 Collabora Ltd. All rights reserved.
* Copyright (C) 2009 Gustavo Noronha Silva <gns@gnome.org>
+ * Copyright (C) Research In Motion Limited 2009. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -490,24 +491,7 @@ PassRefPtr<Widget> FrameLoaderClient::createJavaAppletWidget(const IntSize&, HTM
ObjectContentType FrameLoaderClient::objectContentType(const KURL& url, const String& mimeType)
{
- String type = mimeType;
- // We don't use MIMETypeRegistry::getMIMETypeForPath() because it returns "application/octet-stream" upon failure
- if (type.isEmpty())
- type = MIMETypeRegistry::getMIMETypeForExtension(url.path().substring(url.path().reverseFind('.') + 1));
-
- if (type.isEmpty())
- return WebCore::ObjectContentFrame;
-
- if (MIMETypeRegistry::isSupportedImageMIMEType(type))
- return WebCore::ObjectContentImage;
-
- if (PluginDatabase::installedPlugins()->isMIMETypeRegistered(mimeType))
- return WebCore::ObjectContentNetscapePlugin;
-
- if (MIMETypeRegistry::isSupportedNonImageMIMEType(type))
- return WebCore::ObjectContentFrame;
-
- return WebCore::ObjectContentNone;
+ return FrameLoader::defaultObjectContentType(url, mimeType);
}
String FrameLoaderClient::overrideMediaType() const
@@ -530,8 +514,8 @@ void FrameLoaderClient::windowObjectCleared()
// TODO: Consider using g_signal_has_handler_pending() to avoid the overhead
// when there are no handlers.
- JSGlobalContextRef context = toGlobalRef(coreFrame->script()->globalObject()->globalExec());
- JSObjectRef windowObject = toRef(coreFrame->script()->globalObject());
+ JSGlobalContextRef context = toGlobalRef(coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec());
+ JSObjectRef windowObject = toRef(coreFrame->script()->globalObject(mainThreadNormalWorld()));
ASSERT(windowObject);
WebKitWebView* webView = getViewFromFrame(m_frame);
@@ -847,6 +831,11 @@ void FrameLoaderClient::dispatchDidFinishLoading(WebCore::DocumentLoader* loader
GOwnPtr<gchar> identifierString(toString(identifier));
WebKitWebResource* webResource = webkit_web_view_get_resource(webView, identifierString.get());
+ // A NULL WebResource means the load has been interrupted, and
+ // replaced by another one while this resource was being loaded.
+ if (!webResource)
+ return;
+
const char* uri = webkit_web_resource_get_uri(webResource);
RefPtr<ArchiveResource> coreResource(loader->subresource(KURL(KURL(), uri)));
diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
index fef07c1..78f5543 100644
--- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
@@ -97,9 +97,17 @@ Page* InspectorClient::createPage()
g_signal_connect(m_webView, "destroy",
G_CALLBACK(notifyWebViewDestroyed), (gpointer)this);
- gchar* inspectorURI = g_filename_to_uri(DATA_DIR"/webkit-1.0/webinspector/inspector.html", NULL, NULL);
- webkit_web_view_load_uri(m_webView, inspectorURI);
- g_free(inspectorURI);
+ GOwnPtr<gchar> inspectorURI;
+
+ // Make the Web Inspector work when running tests
+ if (g_file_test("WebCore/inspector/front-end/inspector.html", G_FILE_TEST_EXISTS)) {
+ GOwnPtr<gchar> currentDirectory(g_get_current_dir());
+ GOwnPtr<gchar> fullPath(g_strdup_printf("%s/WebCore/inspector/front-end/inspector.html", currentDirectory.get()));
+ inspectorURI.set(g_filename_to_uri(fullPath.get(), NULL, NULL));
+ } else
+ inspectorURI.set(g_filename_to_uri(DATA_DIR"/webkit-1.0/webinspector/inspector.html", NULL, NULL));
+
+ webkit_web_view_load_uri(m_webView, inspectorURI.get());
gtk_widget_show(GTK_WIDGET(m_webView));
@@ -108,8 +116,18 @@ Page* InspectorClient::createPage()
String InspectorClient::localizedStringsURL()
{
+ GOwnPtr<gchar> URL;
+
+ // Make the Web Inspector work when running tests
+ if (g_file_test("WebCore/English.lproj/localizedStrings.js", G_FILE_TEST_EXISTS)) {
+ GOwnPtr<gchar> currentDirectory(g_get_current_dir());
+ GOwnPtr<gchar> fullPath(g_strdup_printf("%s/WebCore/English.lproj/localizedStrings.js", currentDirectory.get()));
+ URL.set(g_filename_to_uri(fullPath.get(), NULL, NULL));
+ } else
+ URL.set(g_filename_to_uri(DATA_DIR"/webkit-1.0/webinspector/localizedStrings.js", NULL, NULL));
+
// FIXME: support l10n of localizedStrings.js
- return String::fromUTF8(g_filename_to_uri(DATA_DIR"/webkit-1.0/webinspector/localizedStrings.js", NULL, NULL));
+ return String::fromUTF8(URL.get());
}
String InspectorClient::hiddenPanels()
diff --git a/WebKit/gtk/docs/webkitgtk-docs.sgml b/WebKit/gtk/docs/webkitgtk-docs.sgml
index ca608d4..7719336 100644
--- a/WebKit/gtk/docs/webkitgtk-docs.sgml
+++ b/WebKit/gtk/docs/webkitgtk-docs.sgml
@@ -25,6 +25,7 @@
<xi:include href="xml/webkitwebdatasource.xml"/>
<xi:include href="xml/webkitwebresource.xml"/>
<xi:include href="xml/webkitdownload.xml"/>
+ <xi:include href="xml/webkithittestresult.xml"/>
<xi:include href="xml/webkitsoupauthdialog.xml"/>
<xi:include href="xml/webkitsecurityorigin.xml"/>
<xi:include href="xml/webkitwebwindowfeatures.xml"/>
@@ -89,4 +90,7 @@
<index id="index-1.1.15" role="1.1.15">
<title>Index of new symbols in 1.1.15</title>
</index>
+ <index id="index-1.1.16" role="1.1.16">
+ <title>Index of new symbols in 1.1.16</title>
+ </index>
</book>
diff --git a/WebKit/gtk/docs/webkitgtk-sections.txt b/WebKit/gtk/docs/webkitgtk-sections.txt
index a7b636c..8bdd3b3 100644
--- a/WebKit/gtk/docs/webkitgtk-sections.txt
+++ b/WebKit/gtk/docs/webkitgtk-sections.txt
@@ -132,6 +132,7 @@ webkit_download_get_current_size
webkit_download_get_destination_uri
webkit_download_get_elapsed_time
webkit_download_get_network_request
+webkit_download_get_network_response
webkit_download_get_progress
webkit_download_get_status
webkit_download_get_suggested_filename
diff --git a/WebKit/gtk/po/ChangeLog b/WebKit/gtk/po/ChangeLog
index 68321ad..d7eee3a 100644
--- a/WebKit/gtk/po/ChangeLog
+++ b/WebKit/gtk/po/ChangeLog
@@ -1,3 +1,32 @@
+2009-10-19 Daniel Macks <dmacks@netspace.org>
+
+ Reviewed by Adam Barth.
+
+ Inconsistent handling of gettext domain can cause compile failure
+ https://bugs.webkit.org/show_bug.cgi?id=30292
+
+ * GNUmakefile.am: Use DOMAIN variable instead of hard-coded value
+
+2009-10-15 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] marshal stamp files are not cleaned after a distclean
+ https://bugs.webkit.org/show_bug.cgi?id=30156
+
+ Add stamp-po to CLEANFILES.
+
+ * GNUmakefile.am:
+
+2009-10-09 Rimas Kudelis <rq@akl.lt>
+
+ Rubber-stamped by Gustavo Noronha
+
+ https://bugs.webkit.org/show_bug.cgi?id=30054
+ Localization of WebKit GTK into Lithuanian
+
+ * lt.po: Added.
+
2009-07-18 Jorge González <aloriel@gmail.com>
Rubber-stamped by Jan Alonzo.
diff --git a/WebKit/gtk/po/GNUmakefile.am b/WebKit/gtk/po/GNUmakefile.am
index b5b0c4c..2c5ff94 100644
--- a/WebKit/gtk/po/GNUmakefile.am
+++ b/WebKit/gtk/po/GNUmakefile.am
@@ -73,7 +73,7 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/WebKit/gtk/po/POTFILES
--files-from=$(srcdir)/WebKit/gtk/po/POTFILES \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
--msgid-bugs-address="$$msgid_bugs_address" \
- --keyword=_ --keyword=N_ -o $(srcdir)/WebKit/gtk/po/webkit.pot \
+ --keyword=_ --keyword=N_ -o $(srcdir)/WebKit/gtk/po/$(DOMAIN).pot \
;; \
*) \
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(srcdir) \
@@ -83,7 +83,7 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/WebKit/gtk/po/POTFILES
--package-name="$${package_gnu}@PACKAGE@" \
--package-version='@VERSION@' \
--msgid-bugs-address="$$msgid_bugs_address" \
- --keyword=_ --keyword=N_ -o $(srcdir)/WebKit/gtk/po/webkit.pot \
+ --keyword=_ --keyword=N_ -o $(srcdir)/WebKit/gtk/po/$(DOMAIN).pot \
;; \
esac
@@ -116,8 +116,8 @@ update-po: GNUmakefile
exit 1
# clean rules
-stamp_files += \
- stamp-po
+CLEANFILES += \
+ $(top_builddir)/stamp-po
MAINTAINERCLEANFILES += \
$(MOFILES)
diff --git a/WebKit/gtk/po/lt.po b/WebKit/gtk/po/lt.po
new file mode 100644
index 0000000..a212b29
--- /dev/null
+++ b/WebKit/gtk/po/lt.po
@@ -0,0 +1,702 @@
+# Lithuanian translation for WebKit GTK.
+# This file is put in the public domain.
+# Rimas Kudelis <rq@akl.lt>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: webkit 1.1.4\n"
+"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n"
+"POT-Creation-Date: 2009-04-09 19:09-0300\n"
+"PO-Revision-Date: 2009-10-09 18:42+0200\n"
+"Last-Translator: Rimas Kudelis <rq@akl.lt>\n"
+"Language-Team: Lithuanian <komp_lt@konferencijos.lt>\n"
+"Language: lt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Virtaal 0.4.0\n"
+
+#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:425
+msgid "Upload File"
+msgstr "Failo išsiuntimas"
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139
+msgid "Input _Methods"
+msgstr "Įvesties _metodai"
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78
+msgid "LRM _Left-to-right mark"
+msgstr "Krypties iš _kairės į dešinę ženklas (LRM)"
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79
+msgid "RLM _Right-to-left mark"
+msgstr "Krypties iš _dešinės į kairę ženklas (RLM)"
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80
+msgid "LRE Left-to-right _embedding"
+msgstr "Į_terpimo iš kairės į dešinę ženklas (LRE)"
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81
+msgid "RLE Right-to-left e_mbedding"
+msgstr "Įt_erpimo iš dešinės į kairę ženklas (RLE)"
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82
+msgid "LRO Left-to-right _override"
+msgstr "_Perdengiantis iš kairės į dešinę ženklas (LRO)"
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83
+msgid "RLO Right-to-left o_verride"
+msgstr "Pe_rdengiantis iš dešinės į kairę ženklas (RLO)"
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84
+msgid "PDF _Pop directional formatting"
+msgstr "_Ankstesnio lygmens krypties ženklas (PDF)"
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85
+msgid "ZWS _Zero width space"
+msgstr "_Nulinio pločio tarpas (ZWS)"
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86
+msgid "ZWJ Zero width _joiner"
+msgstr "Nulinio pločio _jungimo ženklas (ZWJ)"
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87
+msgid "ZWNJ Zero width _non-joiner"
+msgstr "Nulinio pločio _skėlimo ženklas (ZWNJ)"
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134
+msgid "_Insert Unicode Control Character"
+msgstr "Įterpti unikodo valdymo ženklą"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:250
+#, fuzzy
+msgid "Network Request"
+msgstr "Tinklo užklausa"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:251
+#, fuzzy
+msgid "The network request for the URI that should be downloaded"
+msgstr "Tinklo užklausa parsiųstino failo universaliajam ištekliaus identifikatoriui (URI)"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:265
+msgid "Destination URI"
+msgstr "Paskirties URI"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:266
+msgid "The destination URI where to save the file"
+msgstr "Paskirties failo universalusis ištekliaus identifikatorius (URI)"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:280
+msgid "Suggested Filename"
+msgstr "Siūlomas failo vardas"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:281
+msgid "The filename suggested as default when saving"
+msgstr "Numatytasis siūlomas įrašomo failo vardas"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:294
+msgid "Progress"
+msgstr "Progresas"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:295
+#, fuzzy
+msgid "Determines the current progress of the download"
+msgstr "Nurodo atsiuntimo progresą"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:308
+msgid "Status"
+msgstr "Būsena"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:309
+#, fuzzy
+msgid "Determines the current status of the download"
+msgstr "Nurodo atsiuntimo būseną"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:324
+msgid "Current Size"
+msgstr "Esamasis dydis"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:325
+msgid "The length of the data already downloaded"
+msgstr "Jau parsiųstų duomenų kiekis"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:339
+msgid "Total Size"
+msgstr "Visas dydis"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:340
+msgid "The total size of the file"
+msgstr "Visas failo dydis"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:469
+msgid "User cancelled the download"
+msgstr "Naudotojas atsisakė siuntimo"
+
+#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244
+#, c-format
+msgid "A username and password are being requested by the site %s"
+msgstr "Svetainei %s reikalingas naudotojo vardas ir slaptažodis"
+
+#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269
+msgid "Username:"
+msgstr "Naudotojo vardas:"
+
+#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271
+msgid "Password:"
+msgstr "Slaptažodis:"
+
+#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281
+msgid "Remember password"
+msgstr "Įsiminti slaptažodį"
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:211
+msgid "Name"
+msgstr "Pavadinimas"
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:212
+msgid "The name of the frame"
+msgstr "Kadro pavadinimas"
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:218
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154
+#: WebKit/gtk/webkit/webkitwebview.cpp:1715
+msgid "Title"
+msgstr "Antraštė"
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:219
+msgid "The document title of the frame"
+msgstr "Kadre atverto tinklalapio pavadinimas"
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:225
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186
+#: WebKit/gtk/webkit/webkitwebview.cpp:1729
+msgid "URI"
+msgstr "URI"
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:226
+msgid "The current URI of the contents displayed by the frame"
+msgstr "Kadre atverto tinklalapio universalusis ištekliaus identifikatorius (URI)"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155
+msgid "The title of the history item"
+msgstr "Žurnalo įrašo pavadinimas"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170
+msgid "Alternate Title"
+msgstr "Alternatyvus pavadinimas"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171
+msgid "The alternate title of the history item"
+msgstr "Alternatyvus žurnalo įrašo pavadinimas"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187
+msgid "The URI of the history item"
+msgstr "Žurnalo įrašo universalusis ištekliaus identifikatorius (URI)"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167
+msgid "Original URI"
+msgstr "Pirminis URI"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203
+msgid "The original URI of the history item"
+msgstr "Pirminis žurnalo įrašo universalusis ištekliaus identifikatorius (URI)"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218
+msgid "Last visited Time"
+msgstr "Paskutinis apsilankymas"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219
+msgid "The time at which the history item was last visited"
+msgstr "Paskutinio apsilankymo data ir laikas"
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:260
+msgid "Web View"
+msgstr "Žiniatinklio rodinys"
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:261
+msgid "The Web View that renders the Web Inspector itself"
+msgstr "Žiniatinklio rodinys, rodantis žiniatinklio analizatorių"
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:274
+msgid "Inspected URI"
+msgstr "Analizuojamas URI"
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:275
+msgid "The URI that is currently being inspected"
+msgstr "Šiuo metu analizuojamo failo universalusi ištekliaus identifikatorius (URI)"
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:291
+msgid "Enable JavaScript profiling"
+msgstr "Įjungti „JavaScript“ profiliavimą"
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:292
+msgid "Profile the executed JavaScript."
+msgstr "Profiliuoti vykdomą „JavaScript“ kodą."
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152
+msgid "Reason"
+msgstr "Priežastis"
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153
+#, fuzzy
+msgid "The reason why this navigation is occurring"
+msgstr "Tinklalapio atvėrimo priežastis"
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168
+msgid "The URI that was requested as the target for the navigation"
+msgstr "Mėginamo atverti tinklalapio universalusis ištekliaus identifikatorius (URI)"
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180
+msgid "Button"
+msgstr "Mygtukas"
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181
+msgid "The button used to click"
+msgstr "Mygtukas, kurį galima paspausti"
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196
+msgid "Modifier state"
+msgstr "Modifikatorių būsena"
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197
+msgid "A bitmask representing the state of the modifier keys"
+msgstr "Bitų kaukė, atspindinti modifikavimo klavišų būseną"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:129
+msgid "Default Encoding"
+msgstr "Numatytoji koduotė"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:130
+msgid "The default encoding used to display text."
+msgstr "Numatytoji teksto koduotė."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:138
+msgid "Cursive Font Family"
+msgstr "Rankraštinių šriftų šeima"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:139
+msgid "The default Cursive font family used to display text."
+msgstr "Numatytoji tekstui atvaizduoti naudojama rankraštinių šriftų šeima."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:147
+msgid "Default Font Family"
+msgstr "Numatytoji šriftų šeima"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:148
+msgid "The default font family used to display text."
+msgstr "Numatytoji tekstui atvaizduoti naudojama šriftų šeima."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:156
+msgid "Fantasy Font Family"
+msgstr "Dekoratyvių šriftų šeima"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:157
+msgid "The default Fantasy font family used to display text."
+msgstr "Numatytoji tekstui atvaizduoti naudojama dekoratyvių šriftų šeima."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:165
+msgid "Monospace Font Family"
+msgstr "Lygiapločių šriftų šeima"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:166
+msgid "The default font family used to display monospace text."
+msgstr "Numatytoji tekstui atvaizduoti naudojama lygiapločių šriftų šeima"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:174
+msgid "Sans Serif Font Family"
+msgstr "Šriftų be užraitų šeima"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:175
+msgid "The default Sans Serif font family used to display text."
+msgstr "Numatytoji tekstui atvaizduoti naudojama šriftų be užraitų šeima."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:183
+msgid "Serif Font Family"
+msgstr "Šriftų su užraitais šeima"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:184
+msgid "The default Serif font family used to display text."
+msgstr "Numatytoji tekstui atvaizduoti naudojama šriftų su užraitais šeima."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:192
+msgid "Default Font Size"
+msgstr "Numatytasis šrifto dydis"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:193
+msgid "The default font size used to display text."
+msgstr "Numatytasis tekstui atvaizduoti naudojamo šrifto dydis."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:201
+msgid "Default Monospace Font Size"
+msgstr "Numatytasis lygiapločio šrifto dydis"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:202
+msgid "The default font size used to display monospace text."
+msgstr "Numatytasis tekstui atvaizduoti naudojamo lygiapločio šrifto dydis"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:210
+msgid "Minimum Font Size"
+msgstr "Minimalus šrifto dydis"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:211
+msgid "The minimum font size used to display text."
+msgstr "Mažiausias leistinas tekstui atvaizduoti naudojamo šrifto dydis."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:219
+#, fuzzy
+msgid "Minimum Logical Font Size"
+msgstr "Minimalus loginis šrifto dydis"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:220
+#, fuzzy
+msgid "The minimum logical font size used to display text."
+msgstr "Mažiausias leistinas loginis tekstui atvaizduoti naudojamo šrifto dydis."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:239
+msgid "Enforce 96 DPI"
+msgstr "Naudoti 96 tašk./colyje"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:240
+msgid "Enforce a resolution of 96 DPI"
+msgstr "Priverstinai naudoti 96 tašk./colyje skiriamąją gebą"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:248
+msgid "Auto Load Images"
+msgstr "Įkelti paveikslus"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:249
+msgid "Load images automatically."
+msgstr "Automatiškai įkelti paveikslus."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:257
+msgid "Auto Shrink Images"
+msgstr "Mažinti paveikslus"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:258
+msgid "Automatically shrink standalone images to fit."
+msgstr "Automatiškai mažinti pavienius paveikslus, kad sutilptų į langą."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:266
+msgid "Print Backgrounds"
+msgstr "Spausdinti foną"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:267
+msgid "Whether background images should be printed."
+msgstr "Ar spausdinti fono piešinius."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:275
+msgid "Enable Scripts"
+msgstr "Įjungti scenarijus"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:276
+msgid "Enable embedded scripting languages."
+msgstr "Įjungti įtaisytuosius scenarijus."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:284
+msgid "Enable Plugins"
+msgstr "Įjungti papildinius"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:285
+msgid "Enable embedded plugin objects."
+msgstr "Įjungti įtaisytuosius papildinius."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:293
+msgid "Resizable Text Areas"
+msgstr "Keičiamo dydžio teksto laukai"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:294
+msgid "Whether text areas are resizable."
+msgstr "Ar leisti keisti teksto laukų dydį."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:301
+msgid "User Stylesheet URI"
+msgstr "Naudotojo stiliaus aprašo URI"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:302
+msgid "The URI of a stylesheet that is applied to every page."
+msgstr "Visiems tinklalapiams taikytino naudotojo stiliaus aprašo failo universalusis ištekliaus identifikatorius (URI)."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:317
+msgid "Zoom Stepping Value"
+msgstr "Mastelio keitimo žingsnis"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:318
+msgid "The value by which the zoom level is changed when zooming in or out."
+msgstr "Žingsnis, kuriuo keičiamas mastelis, jį didinant ar mažinant."
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:336
+msgid "Enable Developer Extras"
+msgstr "Įjungti programuotojų įrankius"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:337
+msgid "Enables special extensions that help developers"
+msgstr "Įjungti specialius tinklalapių programuotojams skirtus įrankius"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:357
+msgid "Enable Private Browsing"
+msgstr "Įjungti privatųjį naršymą"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:358
+msgid "Enables private browsing mode"
+msgstr "Įjungti privačiojo naršymo veikseną"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1716
+msgid "Returns the @web_view's document title"
+msgstr "Grąžina @web_view objekte atverto tinklalapio pavadinimą"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1730
+msgid "Returns the current URI of the contents displayed by the @web_view"
+msgstr "Grąžina @web_view objekte atverto tinklalapio universalųjį ištekliaus identifikatorių (URI)"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1743
+msgid "Copy target list"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1744
+msgid "The list of targets this web view supports for clipboard copying"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1757
+msgid "Paste target list"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1758
+msgid "The list of targets this web view supports for clipboard pasting"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1764
+msgid "Settings"
+msgstr "Nuostatos"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1765
+msgid "An associated WebKitWebSettings instance"
+msgstr "Susietasis „WebKitWebSettings“ tipo objektas"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1778
+msgid "Web Inspector"
+msgstr "Žiniatinklio analizatorius"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1779
+msgid "The associated WebKitWebInspector instance"
+msgstr "Susietasis „WebKitWebInspector“ tipo objektas"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1799
+msgid "Editable"
+msgstr "Keičiamas"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1800
+msgid "Whether content can be modified by the user"
+msgstr "Ar turinys gali būti keičiamas naudotojo"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1806
+msgid "Transparent"
+msgstr "Permatomas"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1807
+msgid "Whether content has a transparent background"
+msgstr "Ar turinio fonas permatomas"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1820
+msgid "Zoom level"
+msgstr "Mastelis"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1821
+msgid "The level of zoom of the content"
+msgstr "Turinio rodymo mastelio dydis"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1836
+msgid "Full content zoom"
+msgstr "Taikyti mastelį visam turiniui"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1837
+msgid "Whether the full content is scaled when zooming"
+msgstr "Ar mastelis keičiamas visam tinklalapio turiniui"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1850
+msgid "Encoding"
+msgstr "Koduotė"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1851
+msgid "The default encoding of the web view"
+msgstr "Numatytoji žiniatinklio rodinio koduotė"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1864
+msgid "Custom Encoding"
+msgstr "Pasirinktinė koduotė"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:1865
+msgid "The custom encoding of the web view"
+msgstr "Pasirinktinė žiniatinklio rodinio koduotė"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56
+msgid "Submit"
+msgstr "Pateikti"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61
+msgid "Reset"
+msgstr "Atkurti"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66
+msgid "_Searchable Index"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71
+msgid "Choose File"
+msgstr "Parinkite failą"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76
+msgid "(None)"
+msgstr "(Joks)"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81
+msgid "Open Link in New _Window"
+msgstr "Atverti saistomą objektą naujame _lange"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86
+msgid "_Download Linked File"
+msgstr "At_siųsti saistomą objektą"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91
+msgid "Copy Link Loc_ation"
+msgstr "Kopijuoti saito _adresą"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96
+msgid "Open _Image in New Window"
+msgstr "Atverti _paveikslą naujame lange"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101
+msgid "Sa_ve Image As"
+msgstr "Į_rašyti paveikslą kaip"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106
+msgid "Cop_y Image"
+msgstr "_Kopijuoti paveikslą"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111
+msgid "Open _Frame in New Window"
+msgstr "_Atverti kadrą naujame lange"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162
+msgid "_Reload"
+msgstr "At_siųsti iš naujo"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179
+msgid "No Guesses Found"
+msgstr "Pasiūlymų nėra"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184
+msgid "_Ignore Spelling"
+msgstr "_Nepaisyti rašybos"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189
+msgid "_Learn Spelling"
+msgstr "Įsi_minti rašybą"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194
+msgid "_Search the Web"
+msgstr "_Ieškoti žiniatinklyje"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199
+msgid "_Look Up in Dictionary"
+msgstr "Ieškoti _žodyne"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204
+msgid "_Open Link"
+msgstr "_Atverti saistomą objektą"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209
+msgid "Ignore _Grammar"
+msgstr "Nepaisyti _gramatikos"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214
+msgid "Spelling and _Grammar"
+msgstr "Rašyba ir _gramatika"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219
+msgid "_Show Spelling and Grammar"
+msgstr "_Rodyti rašybą ir gramatiką"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219
+msgid "_Hide Spelling and Grammar"
+msgstr "_Nerodyti rašybos ir gramatikos"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224
+msgid "_Check Document Now"
+msgstr "Pa_tikrinti dokumentą dabar"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229
+msgid "Check Spelling While _Typing"
+msgstr "Tikrinti _rašybą rašant tekstą"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234
+msgid "Check _Grammar With Spelling"
+msgstr "Tikrinti _gramatiką kartu su rašyba"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239
+msgid "_Font"
+msgstr "Šri_ftas"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262
+msgid "_Outline"
+msgstr "_Kontūras"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267
+msgid "Inspect _Element"
+msgstr "Analizuoti _elementą"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272
+msgid "No recent searches"
+msgstr "Paskiausių paieškų nėra"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277
+msgid "Recent searches"
+msgstr "Paskiausios paieškos"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282
+msgid "_Clear recent searches"
+msgstr "_Valyti paskiausias paieškas"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287
+msgid "term"
+msgstr "terminas"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292
+msgid "definition"
+msgstr "apibrėžtis"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297
+msgid "press"
+msgstr "spustelėti"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302
+msgid "select"
+msgstr "pasirinkti"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307
+msgid "activate"
+msgstr "aktyvinti"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312
+msgid "uncheck"
+msgstr "nuimti žymėjimą"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317
+msgid "check"
+msgstr "pažymėti"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322
+msgid "jump"
+msgstr "šokti"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328
+msgid " files"
+msgstr " failai"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333
+msgid "Unknown"
+msgstr "Nežinoma"
+
diff --git a/WebKit/gtk/tests/testatk.c b/WebKit/gtk/tests/testatk.c
index 3910347..e47898b 100644
--- a/WebKit/gtk/tests/testatk.c
+++ b/WebKit/gtk/tests/testatk.c
@@ -50,36 +50,9 @@ static void test_get_text_function(AtkText* text_obj, AtkGetTextFunction fn, Atk
g_free(text);
}
-static void test_webkit_atk_get_text_at_offset(void)
+static void run_get_text_tests(AtkText* text_obj)
{
- WebKitWebView* webView;
- AtkObject *obj;
- GMainLoop* loop;
- AtkText* text_obj;
- char* text;
-
- webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
- g_object_ref_sink(webView);
- GtkAllocation alloc = { 0, 0, 800, 600 };
- gtk_widget_size_allocate(GTK_WIDGET(webView), &alloc);
- webkit_web_view_load_string(webView, contents, NULL, NULL, NULL);
- loop = g_main_loop_new(NULL, TRUE);
-
- g_timeout_add(100, (GSourceFunc)bail_out, loop);
- g_main_loop_run(loop);
-
- /* Get to the inner AtkText object */
- obj = gtk_widget_get_accessible(GTK_WIDGET(webView));
- g_assert(obj);
- obj = atk_object_ref_accessible_child(obj, 0);
- g_assert(obj);
- obj = atk_object_ref_accessible_child(obj, 0);
- g_assert(obj);
-
- text_obj = ATK_TEXT(obj);
- g_assert(ATK_IS_TEXT(text_obj));
-
- text = atk_text_get_text(text_obj, 0, -1);
+ char* text = atk_text_get_text(text_obj, 0, -1);
g_assert_cmpstr(text, ==, "This is a test. This is the second sentence. And this the third.");
g_free(text);
@@ -218,6 +191,70 @@ static void test_webkit_atk_get_text_at_offset(void)
/* ATK_TEXT_BOUNDARY_LINE_END */
test_get_text_function(text_obj, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END,
0, "This is a test. This is the second sentence. And this the third.", 0, 64);
+}
+
+static void test_webkit_atk_get_text_at_offset_forms(void)
+{
+ WebKitWebView* webView;
+ AtkObject* obj;
+ GMainLoop* loop;
+ AtkText* text_obj;
+
+ webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+ g_object_ref_sink(webView);
+ GtkAllocation alloc = { 0, 0, 800, 600 };
+ gtk_widget_size_allocate(GTK_WIDGET(webView), &alloc);
+ webkit_web_view_load_string(webView, contents, NULL, NULL, NULL);
+ loop = g_main_loop_new(NULL, TRUE);
+
+ g_timeout_add(100, (GSourceFunc)bail_out, loop);
+ g_main_loop_run(loop);
+
+ /* Get to the inner AtkText object */
+ obj = gtk_widget_get_accessible(GTK_WIDGET(webView));
+ g_assert(obj);
+ obj = atk_object_ref_accessible_child(obj, 0);
+ g_assert(obj);
+ obj = atk_object_ref_accessible_child(obj, 0);
+ g_assert(obj);
+
+ text_obj = ATK_TEXT(obj);
+ g_assert(ATK_IS_TEXT(text_obj));
+
+ run_get_text_tests(text_obj);
+
+ g_object_unref(webView);
+}
+
+static void test_webkit_atk_get_text_at_offset(void)
+{
+ WebKitWebView* webView;
+ AtkObject* obj;
+ GMainLoop* loop;
+ AtkText* text_obj;
+
+ webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+ g_object_ref_sink(webView);
+ GtkAllocation alloc = { 0, 0, 800, 600 };
+ gtk_widget_size_allocate(GTK_WIDGET(webView), &alloc);
+ webkit_web_view_load_string(webView, contents, NULL, NULL, NULL);
+ loop = g_main_loop_new(NULL, TRUE);
+
+ g_timeout_add(100, (GSourceFunc)bail_out, loop);
+ g_main_loop_run(loop);
+
+ /* Get to the inner AtkText object */
+ obj = gtk_widget_get_accessible(GTK_WIDGET(webView));
+ g_assert(obj);
+ obj = atk_object_ref_accessible_child(obj, 0);
+ g_assert(obj);
+ obj = atk_object_ref_accessible_child(obj, 0);
+ g_assert(obj);
+
+ text_obj = ATK_TEXT(obj);
+ g_assert(ATK_IS_TEXT(text_obj));
+
+ run_get_text_tests(text_obj);
g_object_unref(webView);
}
@@ -229,6 +266,7 @@ int main(int argc, char** argv)
g_test_bug_base("https://bugs.webkit.org/");
g_test_add_func("/webkit/atk/get_text_at_offset", test_webkit_atk_get_text_at_offset);
+ g_test_add_func("/webkit/atk/get_text_at_offset_forms", test_webkit_atk_get_text_at_offset_forms);
return g_test_run ();
}
diff --git a/WebKit/gtk/webkit/webkitapplicationcache.cpp b/WebKit/gtk/webkit/webkitapplicationcache.cpp
index 2c6b71f..e967d34 100644
--- a/WebKit/gtk/webkit/webkitapplicationcache.cpp
+++ b/WebKit/gtk/webkit/webkitapplicationcache.cpp
@@ -20,13 +20,17 @@
#include "config.h"
#include "webkitprivate.h"
+#include <wtf/UnusedParam.h>
+
#include "ApplicationCacheStorage.h"
void webkit_application_cache_set_maximum_size(unsigned long long size)
{
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
WebCore::cacheStorage().empty();
WebCore::cacheStorage().vacuumDatabaseFile();
WebCore::cacheStorage().setMaximumSize(size);
+#else
+ UNUSED_PARAM(size);
+#endif
}
-
-
diff --git a/WebKit/gtk/webkit/webkitdownload.cpp b/WebKit/gtk/webkit/webkitdownload.cpp
index 568378c..dd6629b 100644
--- a/WebKit/gtk/webkit/webkitdownload.cpp
+++ b/WebKit/gtk/webkit/webkitdownload.cpp
@@ -31,6 +31,7 @@
#include "webkitdownload.h"
#include "webkitenumtypes.h"
#include "webkitmarshal.h"
+#include "webkitnetworkresponse.h"
#include "webkitprivate.h"
#include <glib/gstdio.h>
@@ -74,7 +75,7 @@ struct _WebKitDownloadPrivate {
GFileOutputStream* outputStream;
DownloadClient* downloadClient;
WebKitNetworkRequest* networkRequest;
- ResourceResponse* networkResponse;
+ WebKitNetworkResponse* networkResponse;
RefPtr<ResourceHandle> resourceHandle;
};
@@ -95,7 +96,8 @@ enum {
PROP_PROGRESS,
PROP_STATUS,
PROP_CURRENT_SIZE,
- PROP_TOTAL_SIZE
+ PROP_TOTAL_SIZE,
+ PROP_NETWORK_RESPONSE
};
G_DEFINE_TYPE(WebKitDownload, webkit_download, G_TYPE_OBJECT);
@@ -119,6 +121,11 @@ static void webkit_download_dispose(GObject* object)
priv->networkRequest = NULL;
}
+ if (priv->networkResponse) {
+ g_object_unref(priv->networkResponse);
+ priv->networkResponse = NULL;
+ }
+
G_OBJECT_CLASS(webkit_download_parent_class)->dispose(object);
}
@@ -138,7 +145,6 @@ static void webkit_download_finalize(GObject* object)
}
delete priv->downloadClient;
- delete priv->networkResponse;
// The download object may never have _start called on it, so we
// need to make sure timer is non-NULL.
@@ -159,6 +165,9 @@ static void webkit_download_get_property(GObject* object, guint prop_id, GValue*
case PROP_NETWORK_REQUEST:
g_value_set_object(value, webkit_download_get_network_request(download));
break;
+ case PROP_NETWORK_RESPONSE:
+ g_value_set_object(value, webkit_download_get_network_response(download));
+ break;
case PROP_DESTINATION_URI:
g_value_set_string(value, webkit_download_get_destination_uri(download));
break;
@@ -191,6 +200,9 @@ static void webkit_download_set_property(GObject* object, guint prop_id, const G
case PROP_NETWORK_REQUEST:
priv->networkRequest = WEBKIT_NETWORK_REQUEST(g_value_dup_object(value));
break;
+ case PROP_NETWORK_RESPONSE:
+ priv->networkResponse = WEBKIT_NETWORK_RESPONSE(g_value_dup_object(value));
+ break;
case PROP_DESTINATION_URI:
webkit_download_set_destination_uri(download, g_value_get_string(value));
break;
@@ -252,6 +264,21 @@ static void webkit_download_class_init(WebKitDownloadClass* downloadClass)
(GParamFlags)(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));
/**
+ * WebKitDownload:network-response
+ *
+ * The #WebKitNetworkResponse instance associated with the download.
+ *
+ * Since: 1.1.16
+ */
+ g_object_class_install_property(objectClass,
+ PROP_NETWORK_RESPONSE,
+ g_param_spec_object("network-response",
+ _("Network Response"),
+ _("The network response for the URI that should be downloaded"),
+ WEBKIT_TYPE_NETWORK_RESPONSE,
+ (GParamFlags)(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));
+
+ /**
* WebKitDownload:destination-uri
*
* The URI of the save location for this download.
@@ -530,11 +557,29 @@ WebKitNetworkRequest* webkit_download_get_network_request(WebKitDownload* downlo
return priv->networkRequest;
}
+/**
+ * webkit_download_get_network_response:
+ * @download: the #WebKitDownload
+ *
+ * Retrieves the #WebKitNetworkResponse object that backs the download
+ * process.
+ *
+ * Returns: the #WebKitNetworkResponse instance
+ *
+ * Since: 1.1.16
+ */
+WebKitNetworkResponse* webkit_download_get_network_response(WebKitDownload* download)
+{
+ g_return_val_if_fail(WEBKIT_IS_DOWNLOAD(download), NULL);
+
+ WebKitDownloadPrivate* priv = download->priv;
+ return priv->networkResponse;
+}
+
static void webkit_download_set_response(WebKitDownload* download, const ResourceResponse& response)
{
- // FIXME Use WebKitNetworkResponse when it's merged.
WebKitDownloadPrivate* priv = download->priv;
- priv->networkResponse = new ResourceResponse(response);
+ priv->networkResponse = webkit_network_response_new_with_core_response(response);
if (!response.isNull() && !response.suggestedFilename().isEmpty())
webkit_download_set_suggested_filename(download, response.suggestedFilename().utf8().data());
@@ -704,10 +749,12 @@ guint64 webkit_download_get_total_size(WebKitDownload* download)
g_return_val_if_fail(WEBKIT_IS_DOWNLOAD(download), 0);
WebKitDownloadPrivate* priv = download->priv;
- if (!priv->networkResponse)
+ SoupMessage* message = priv->networkResponse ? webkit_network_response_get_message(priv->networkResponse) : NULL;
+
+ if (!message)
return 0;
- return MAX(priv->currentSize, priv->networkResponse->expectedContentLength());
+ return MAX(priv->currentSize, soup_message_headers_get_content_length(message->response_headers));
}
/**
@@ -744,9 +791,9 @@ gdouble webkit_download_get_progress(WebKitDownload* download)
WebKitDownloadPrivate* priv = download->priv;
if (!priv->networkResponse)
- return 0;
+ return 0.0;
- gdouble total_size = (gdouble)priv->networkResponse->expectedContentLength();
+ gdouble total_size = static_cast<gdouble>(webkit_download_get_total_size(download));
if (total_size == 0)
return 1.0;
@@ -803,7 +850,7 @@ static void webkit_download_received_data(WebKitDownload* download, const gchar*
g_object_notify(G_OBJECT(download), "current-size");
ASSERT(priv->networkResponse);
- if (priv->currentSize > priv->networkResponse->expectedContentLength())
+ if (priv->currentSize > webkit_download_get_total_size(download))
g_object_notify(G_OBJECT(download), "total-size");
gdouble lastProgress = webkit_download_get_progress(download);
diff --git a/WebKit/gtk/webkit/webkitdownload.h b/WebKit/gtk/webkit/webkitdownload.h
index 6e7f38b..a732a57 100644
--- a/WebKit/gtk/webkit/webkitdownload.h
+++ b/WebKit/gtk/webkit/webkitdownload.h
@@ -84,6 +84,9 @@ webkit_download_get_uri (WebKitDownload *download);
WEBKIT_API WebKitNetworkRequest*
webkit_download_get_network_request (WebKitDownload *download);
+WEBKIT_API WebKitNetworkResponse*
+webkit_download_get_network_response (WebKitDownload *download);
+
WEBKIT_API const gchar*
webkit_download_get_suggested_filename (WebKitDownload *download);
diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h
index 44dac04..088175f 100644
--- a/WebKit/gtk/webkit/webkitprivate.h
+++ b/WebKit/gtk/webkit/webkitprivate.h
@@ -224,6 +224,10 @@ extern "C" {
void
webkit_web_inspector_set_inspected_uri(WebKitWebInspector* web_inspector, const gchar* inspected_uri);
+ WEBKIT_API void
+ webkit_web_inspector_execute_script(WebKitWebInspector* inspector, long callId, const gchar* script);
+
+
WebKitWebWindowFeatures*
webkit_web_window_features_new_from_core_features (const WebCore::WindowFeatures& features);
@@ -285,6 +289,9 @@ extern "C" {
WEBKIT_API gchar*
webkit_web_frame_dump_render_tree (WebKitWebFrame* frame);
+ WEBKIT_API gchar*
+ webkit_web_frame_counter_value_for_element_by_id (WebKitWebFrame* frame, const gchar* id);
+
WEBKIT_API guint
webkit_web_frame_get_pending_unload_event_count(WebKitWebFrame* frame);
diff --git a/WebKit/gtk/webkit/webkitsecurityorigin.h b/WebKit/gtk/webkit/webkitsecurityorigin.h
index 57bcd19..24ebe06 100644
--- a/WebKit/gtk/webkit/webkitsecurityorigin.h
+++ b/WebKit/gtk/webkit/webkitsecurityorigin.h
@@ -20,7 +20,6 @@
#ifndef webkitsecurityorigin_h
#define webkitsecurityorigin_h
-#include "webkitsecurityorigin.h"
#include "webkitwebdatabase.h"
G_BEGIN_DECLS
diff --git a/WebKit/gtk/webkit/webkitwebframe.cpp b/WebKit/gtk/webkit/webkitwebframe.cpp
index 67fa632..843f923 100644
--- a/WebKit/gtk/webkit/webkitwebframe.cpp
+++ b/WebKit/gtk/webkit/webkitwebframe.cpp
@@ -683,7 +683,7 @@ JSGlobalContextRef webkit_web_frame_get_global_context(WebKitWebFrame* frame)
if (!coreFrame)
return NULL;
- return toGlobalRef(coreFrame->script()->globalObject()->globalExec());
+ return toGlobalRef(coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec());
}
/**
@@ -799,6 +799,28 @@ gchar* webkit_web_frame_dump_render_tree(WebKitWebFrame* frame)
}
/**
+ * webkit_web_frame_counter_value_for_element_by_id:
+ * @frame: a #WebKitWebFrame
+ * @id: an element ID string
+ *
+ * Return value: The counter value of element @id in @frame
+ */
+gchar* webkit_web_frame_counter_value_for_element_by_id(WebKitWebFrame* frame, const gchar* id)
+{
+ g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
+
+ Frame* coreFrame = core(frame);
+ if (!coreFrame)
+ return 0;
+
+ Element* coreElement = coreFrame->document()->getElementById(AtomicString(id));
+ if (!coreElement)
+ return 0;
+ String counterValue = counterValueForElement(coreElement);
+ return g_strdup(counterValue.utf8().data());
+}
+
+/**
* webkit_web_frame_get_pending_unload_event_count:
* @frame: a #WebKitWebFrame
*
diff --git a/WebKit/gtk/webkit/webkitwebinspector.cpp b/WebKit/gtk/webkit/webkitwebinspector.cpp
index 4e4f8de..ee2815c 100644
--- a/WebKit/gtk/webkit/webkitwebinspector.cpp
+++ b/WebKit/gtk/webkit/webkitwebinspector.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2008 Gustavo Noronha Silva
* Copyright (C) 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2009 Collabora Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -19,11 +20,18 @@
*/
#include "config.h"
+#include "webkitwebinspector.h"
+#include "FocusController.h"
+#include "Frame.h"
#include <glib/gi18n-lib.h>
-#include "webkitwebinspector.h"
-#include "webkitmarshal.h"
+#include "HitTestRequest.h"
+#include "HitTestResult.h"
#include "InspectorClientGtk.h"
+#include "IntPoint.h"
+#include "Page.h"
+#include "RenderView.h"
+#include "webkitmarshal.h"
#include "webkitprivate.h"
/**
@@ -56,6 +64,7 @@
*/
using namespace WebKit;
+using namespace WebCore;
enum {
INSPECT_WEB_VIEW,
@@ -426,3 +435,66 @@ webkit_web_inspector_set_inspector_client(WebKitWebInspector* web_inspector, Web
priv->page = page;
}
+
+/**
+ * webkit_web_inspector_inspect_coordinates:
+ * @web_inspector: the #WebKitWebInspector that will do the inspection
+ * @x: the X coordinate of the node to be inspected
+ * @y: the Y coordinate of the node to be inspected
+ *
+ * Causes the Web Inspector to inspect the node that is located at the
+ * given coordinates of the widget. The coordinates should be relative
+ * to the #WebKitWebView widget, not to the scrollable content, and
+ * may be obtained from a #GdkEvent directly.
+ *
+ * This means @x, and @y being zero doesn't guarantee you will hit the
+ * left-most top corner of the content, since the contents may have
+ * been scrolled.
+ *
+ * Since: 1.1.17
+ */
+void webkit_web_inspector_inspect_coordinates(WebKitWebInspector* webInspector, gdouble x, gdouble y)
+{
+ g_return_if_fail(WEBKIT_IS_WEB_INSPECTOR(webInspector));
+ g_return_if_fail(x >= 0 && y >= 0);
+
+ WebKitWebInspectorPrivate* priv = webInspector->priv;
+
+ Frame* frame = priv->page->focusController()->focusedOrMainFrame();
+ FrameView* view = frame->view();
+
+ if (!view)
+ return;
+
+ HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active);
+ IntPoint documentPoint = view->windowToContents(IntPoint(static_cast<int>(x), static_cast<int>(y)));
+ HitTestResult result(documentPoint);
+
+ frame->contentRenderer()->layer()->hitTest(request, result);
+ priv->page->inspectorController()->inspect(result.innerNonSharedNode());
+}
+
+/**
+ * webkit_web_inspector_close:
+ * @web_inspector: the #WebKitWebInspector that will be closed
+ *
+ * Causes the Web Inspector to be closed.
+ *
+ * Since: 1.1.17
+ */
+void webkit_web_inspector_close(WebKitWebInspector* webInspector)
+{
+ g_return_if_fail(WEBKIT_IS_WEB_INSPECTOR(webInspector));
+
+ WebKitWebInspectorPrivate* priv = webInspector->priv;
+ priv->page->inspectorController()->close();
+}
+
+void webkit_web_inspector_execute_script(WebKitWebInspector* webInspector, long callId, const gchar* script)
+{
+ g_return_if_fail(WEBKIT_IS_WEB_INSPECTOR(webInspector));
+ g_return_if_fail(script);
+
+ WebKitWebInspectorPrivate* priv = webInspector->priv;
+ priv->page->inspectorController()->evaluateForTestInFrontend(callId, script);
+}
diff --git a/WebKit/gtk/webkit/webkitwebinspector.h b/WebKit/gtk/webkit/webkitwebinspector.h
index 9010e26..94fd806 100644
--- a/WebKit/gtk/webkit/webkitwebinspector.h
+++ b/WebKit/gtk/webkit/webkitwebinspector.h
@@ -60,6 +60,12 @@ webkit_web_inspector_get_web_view(WebKitWebInspector* web_inspector);
WEBKIT_API const gchar*
webkit_web_inspector_get_inspected_uri(WebKitWebInspector* web_inspector);
+WEBKIT_API void
+webkit_web_inspector_inspect_coordinates(WebKitWebInspector* web_inspector, gdouble x, gdouble y);
+
+WEBKIT_API void
+webkit_web_inspector_close(WebKitWebInspector* webInspector);
+
G_END_DECLS
#endif /* webkitwebinspector_h */
diff --git a/WebKit/gtk/webkit/webkitwebsettings.cpp b/WebKit/gtk/webkit/webkitwebsettings.cpp
index 588d5bd..89c5233 100644
--- a/WebKit/gtk/webkit/webkitwebsettings.cpp
+++ b/WebKit/gtk/webkit/webkitwebsettings.cpp
@@ -96,6 +96,8 @@ struct _WebKitWebSettingsPrivate {
gboolean enable_offline_web_application_cache;
WebKitEditingBehavior editing_behavior;
gboolean enable_universal_access_from_file_uris;
+ gboolean enable_web_sockets;
+ gboolean enable_dom_paste;
};
#define WEBKIT_WEB_SETTINGS_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_SETTINGS, WebKitWebSettingsPrivate))
@@ -135,7 +137,9 @@ enum {
PROP_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY,
PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE,
PROP_EDITING_BEHAVIOR,
- PROP_ENABLE_UNIVERSAL_ACCESS_FROM_FILE_URIS
+ PROP_ENABLE_UNIVERSAL_ACCESS_FROM_FILE_URIS,
+ PROP_ENABLE_WEB_SOCKETS,
+ PROP_ENABLE_DOM_PASTE
};
// Create a default user agent string
@@ -647,6 +651,40 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass)
FALSE,
flags));
+ /**
+ * WebKitWebSettings:enable-web-sockets
+ *
+ * Whether to enable support for Web Sockets.
+ *
+ * Implementation of Web Sockets is currently considered experimental.
+ * Name of this property and the behavior could change in the future.
+ *
+ * Since: 1.1.16
+ */
+ g_object_class_install_property(gobject_class,
+ PROP_ENABLE_WEB_SOCKETS,
+ g_param_spec_boolean("enable-web-sockets",
+ _("Enable Web Sockets"),
+ _("Whether to enable Web Sockets"),
+ FALSE,
+ flags));
+
+ /**
+ * WebKitWebSettings:enable-dom-paste
+ *
+ * Whether to enable DOM paste. If set to %TRUE, document.execCommand("Paste")
+ * will correctly execute and paste content of the clipboard.
+ *
+ * Since: 1.1.16
+ */
+ g_object_class_install_property(gobject_class,
+ PROP_ENABLE_DOM_PASTE,
+ g_param_spec_boolean("enable-dom-paste",
+ _("Enable DOM paste"),
+ _("Whether to enable DOM paste"),
+ FALSE,
+ flags));
+
g_type_class_add_private(klass, sizeof(WebKitWebSettingsPrivate));
}
@@ -694,6 +732,7 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con
{
WebKitWebSettings* web_settings = WEBKIT_WEB_SETTINGS(object);
WebKitWebSettingsPrivate* priv = web_settings->priv;
+ EnchantBroker* broker;
SpellLanguage* lang;
GSList* spellLanguages = NULL;
@@ -787,26 +826,32 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con
case PROP_SPELL_CHECKING_LANGUAGES:
priv->spell_checking_languages = g_strdup(g_value_get_string(value));
+ broker = enchant_broker_init();
if (priv->spell_checking_languages) {
char** langs = g_strsplit(priv->spell_checking_languages, ",", -1);
for (int i = 0; langs[i]; i++) {
- lang = g_slice_new0(SpellLanguage);
- lang->config = enchant_broker_init();
- lang->speller = enchant_broker_request_dict(lang->config, langs[i]);
+ if (enchant_broker_dict_exists(broker, langs[i])) {
+ lang = g_slice_new0(SpellLanguage);
+ lang->config = enchant_broker_init();
+ lang->speller = enchant_broker_request_dict(lang->config, langs[i]);
- spellLanguages = g_slist_append(spellLanguages, lang);
+ spellLanguages = g_slist_append(spellLanguages, lang);
+ }
}
g_strfreev(langs);
} else {
const char* language = pango_language_to_string(gtk_get_default_language());
- lang = g_slice_new0(SpellLanguage);
- lang->config = enchant_broker_init();
- lang->speller = enchant_broker_request_dict(lang->config, language);
+ if (enchant_broker_dict_exists(broker, language)) {
+ lang = g_slice_new0(SpellLanguage);
+ lang->config = enchant_broker_init();
+ lang->speller = enchant_broker_request_dict(lang->config, language);
- spellLanguages = g_slist_append(spellLanguages, lang);
+ spellLanguages = g_slist_append(spellLanguages, lang);
+ }
}
+ enchant_broker_free(broker);
g_slist_foreach(priv->spell_checking_languages_list, free_spell_checking_language, NULL);
g_slist_free(priv->spell_checking_languages_list);
priv->spell_checking_languages_list = spellLanguages;
@@ -833,6 +878,12 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con
case PROP_ENABLE_UNIVERSAL_ACCESS_FROM_FILE_URIS:
priv->enable_universal_access_from_file_uris = g_value_get_boolean(value);
break;
+ case PROP_ENABLE_WEB_SOCKETS:
+ priv->enable_web_sockets = g_value_get_boolean(value);
+ break;
+ case PROP_ENABLE_DOM_PASTE:
+ priv->enable_dom_paste = g_value_get_boolean(value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
@@ -944,6 +995,12 @@ static void webkit_web_settings_get_property(GObject* object, guint prop_id, GVa
case PROP_ENABLE_UNIVERSAL_ACCESS_FROM_FILE_URIS:
g_value_set_boolean(value, priv->enable_universal_access_from_file_uris);
break;
+ case PROP_ENABLE_WEB_SOCKETS:
+ g_value_set_boolean(value, priv->enable_web_sockets);
+ break;
+ case PROP_ENABLE_DOM_PASTE:
+ g_value_set_boolean(value, priv->enable_dom_paste);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
@@ -1008,6 +1065,8 @@ WebKitWebSettings* webkit_web_settings_copy(WebKitWebSettings* web_settings)
"enable-offline-web-application-cache", priv->enable_offline_web_application_cache,
"editing-behavior", priv->editing_behavior,
"enable-universal-access-from-file-uris", priv->enable_universal_access_from_file_uris,
+ "enable-web-sockets", priv->enable_web_sockets,
+ "enable-dom-paste", priv->enable_dom_paste,
NULL));
return copy;
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index 47d7d98..9f668f4 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -2392,7 +2392,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
enableScripts, enablePlugins, enableDeveloperExtras, resizableTextAreas,
enablePrivateBrowsing, enableCaretBrowsing, enableHTML5Database, enableHTML5LocalStorage,
enableXSSAuditor, javascriptCanOpenWindows, enableOfflineWebAppCache,
- enableUniversalAccessFromFileURI;
+ enableUniversalAccessFromFileURI, enableDOMPaste;
WebKitEditingBehavior editingBehavior;
@@ -2421,6 +2421,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
"enable-offline-web-application-cache", &enableOfflineWebAppCache,
"editing-behavior", &editingBehavior,
"enable-universal-access-from-file-uris", &enableUniversalAccessFromFileURI,
+ "enable-dom-paste", &enableDOMPaste,
NULL);
settings->setDefaultTextEncodingName(defaultEncoding);
@@ -2447,6 +2448,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
settings->setOfflineWebApplicationCacheEnabled(enableOfflineWebAppCache);
settings->setEditingBehavior(core(editingBehavior));
settings->setAllowUniversalAccessFromFileURLs(enableUniversalAccessFromFileURI);
+ settings->setDOMPasteAllowed(enableDOMPaste);
g_free(defaultEncoding);
g_free(cursiveFontFamily);
@@ -2533,6 +2535,8 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar
settings->setEditingBehavior(core(static_cast<WebKitEditingBehavior>(g_value_get_enum(&value))));
else if (name == g_intern_string("enable-universal-access-from-file-uris"))
settings->setAllowUniversalAccessFromFileURLs(g_value_get_boolean(&value));
+ else if (name == g_intern_string("enable-dom-paste"))
+ settings->setDOMPasteAllowed(g_value_get_boolean(&value));
else if (!g_object_class_find_property(G_OBJECT_GET_CLASS(webSettings), name))
g_warning("Unexpected setting '%s'", name);
g_value_unset(&value);
@@ -3152,8 +3156,7 @@ void webkit_web_view_execute_script(WebKitWebView* webView, const gchar* script)
g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
g_return_if_fail(script);
- if (FrameLoader* loader = core(webView)->mainFrame()->loader())
- loader->executeScript(String::fromUTF8(script), true);
+ core(webView)->mainFrame()->script()->executeScript(String::fromUTF8(script), true);
}
/**
@@ -3894,8 +3897,12 @@ WebKitWebResource* webkit_web_view_get_resource(WebKitWebView* webView, char* id
gboolean resourceFound = g_hash_table_lookup_extended(priv->subResources, identifier, NULL, &webResource);
- // The only resource we do not store in this hash table is the main!
- g_return_val_if_fail(resourceFound || g_str_equal(identifier, priv->mainResourceIdentifier), NULL);
+ // The only resource we do not store in this hash table is the
+ // main! If we did not find a request, it probably means the load
+ // has been interrupted while while a resource was still being
+ // loaded.
+ if (!resourceFound && !g_str_equal(identifier, priv->mainResourceIdentifier))
+ return NULL;
if (!webResource)
return webkit_web_view_get_main_resource(webView);
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 63c888a..9104b89 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,553 @@
+2009-10-28 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7303145>
+ Can't exit full screen mode or restart movie after pressing command -R.
+
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController _requestExit]):
+ New, call media element's exitFullscreen method.
+ (-[WebVideoFullscreenController requestExitFullscreenWithAnimation:]):
+ Call mediaElement->exitFullscreen() after a delay as it turns around and calls
+ WebVideoFullscreenController:exitFullscreen.
+
+ * WebView/WebVideoFullscreenHUDWindowController.h:
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindow resignFirstResponder]):
+ New, don't give up responder status.
+ (-[WebVideoFullscreenHUDWindow performKeyEquivalent:]):
+ New, block all command key events.
+ (-[WebVideoFullscreenHUDWindowController exitFullscreen:]):
+ Remember when we are in the process of exiting fullscreen, don't allow recursion.
+
+ * WebView/WebView.mm:
+ (-[WebView _exitFullscreen]):
+ Early return if fullscreen controller is nil.
+
+ * WebView/WebWindowAnimation.h:
+ Correct comment about _window retain status.
+ * WebView/WebWindowAnimation.m:
+ (-[WebWindowScaleAnimation dealloc]):
+ Don't release _window, we never reatained it.
+
+2009-10-27 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Provide a way to get counter values with layoutTestContoller
+ https://bugs.webkit.org/show_bug.cgi?id=30555
+
+ Add counterValueForElement in WebFrame to call WebCore::counterValueForElement.
+
+ * Misc/WebCoreStatistics.h:
+ * Misc/WebCoreStatistics.mm:
+ (-[WebFrame counterValueForElement:]):
+
+2009-10-27 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Updated for refactoring in the date code.
+
+ * WebView/WebView.mm:
+ (aeDescFromJSValue): Since we just want a number of milliseconds, do that
+ instead of something more complicated.
+
+2009-10-26 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Move some WebView event handling code into its own file, WebViewEventHandling.mm
+
+ * WebView/WebView.mm:
+ (-[WebView _close]):
+ (-[WebView _selectedOrMainFrame]):
+ * WebView/WebViewEventHandling.mm: Added.
+ (-[WebView _closingEventHandling]):
+ (-[WebView _setMouseDownEvent:]):
+ (-[WebView mouseDown:]):
+ (-[WebView mouseUp:]):
+ (+[WebView _updateMouseoverWithEvent:]):
+ (-[WebView _updateMouseoverWithFakeEvent]):
+ (_updateMouseoverWithEvent:fakeEvent::if):
+ (-[WebView _stopAutoscrollTimer]):
+ (-[WebView _setToolTip:]):
+ * WebView/WebViewInternal.h:
+
+2009-10-26 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6988966> Hardware layers do not show up in page snapshots
+
+ * WebView/WebHTMLViewPrivate.h:
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _compositingLayersHostingView]):
+ Add a private method that returns the NSView used to host compositing layers.
+
+2009-10-23 Mark Rowe <mrowe@apple.com>
+
+ Fix engineering builds in the mysterious future.
+
+ * Configurations/DebugRelease.xcconfig:
+
+2009-10-23 Gavin Barraclough <barraclough@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@apple.com>
+
+ Reviewed by John Sullivan.
+
+ <rdar://problem/7322847>
+ Pressing space bar key in full screen mode should pause movie but doesn't
+
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindowController keyDown:]): New, toggle playback on space key.
+ (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Play button action is now called togglePlaying.
+ (-[WebVideoFullscreenHUDWindowController togglePlaying:]): Rename from playingChanged.
+
+2009-10-22 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by NOBODY (build fix).
+ Build fix following bug #30696.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
+ (WebKit::NetscapePluginInstanceProxy::evaluate):
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ (WebKit::NetscapePluginInstanceProxy::invokeDefault):
+ (WebKit::NetscapePluginInstanceProxy::construct):
+ (WebKit::NetscapePluginInstanceProxy::getProperty):
+ (WebKit::NetscapePluginInstanceProxy::setProperty):
+ (WebKit::NetscapePluginInstanceProxy::removeProperty):
+ (WebKit::NetscapePluginInstanceProxy::hasProperty):
+ (WebKit::NetscapePluginInstanceProxy::hasMethod):
+ (WebKit::NetscapePluginInstanceProxy::enumerate):
+
+2009-10-16 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig & Geoff Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30696
+ Update to incorporate support for IsolatedWorlds in JSC bindings.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _attachScriptDebugger]):
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ (-[WebFrame globalContext]):
+ * WebView/WebScriptDebugDelegate.mm:
+ (-[WebScriptCallFrame evaluateWebScript:]):
+ * WebView/WebView.mm:
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
+
+2009-10-22 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Dan Bernstein & Simon Fraser.
+
+ <rdar://problem/7297717>
+ https://bugs.webkit.org/show_bug.cgi?id=30323
+ Play/pause button in full-screen video controller does not reflect current state
+
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController setMediaElement:WebCore::]): Register for QTMovieRateDidChangeNotification
+ (-[WebVideoFullscreenController rateChanged:]): Call HUD controller when rate changes.
+
+ * WebView/WebVideoFullscreenHUDWindowController.h:
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Call updateRate so play button
+ reflects playback state.
+ (-[WebVideoFullscreenHUDWindowController updateRate]): New, set play button state according to
+ movie state.
+ (-[WebVideoFullscreenHUDWindowController playingChanged:]): Only call [self playing] once.
+
+2009-10-21 John Sullivan <sullivan@apple.com>
+
+ Rubber-stamped by Dan Bernstein.
+
+ * WebView/WebDynamicScrollBarsView.h:
+ Corrected a couple of long-obsolete comments regarding Safari's use of this class.
+
+2009-10-20 Dan Bernstein <mitz@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ <rdar://problem/7319749> REGRESSION(r49806): Contextual Menu items missing
+ https://bugs.webkit.org/show_bug.cgi?id=30568
+
+ Revert accidental change from r49806.
+
+ * WebCoreSupport/WebContextMenuClient.mm:
+ (WebContextMenuClient::getCustomMenuFromDefaultItems):
+
+2009-10-20 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by David Levin.
+
+ Removed WebSocket runtime settings.
+ https://bugs.webkit.org/show_bug.cgi?id=29896
+
+ WebSocket runtime configuration is supported by chromium/v8 only.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2009-10-19 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Update call to loadFrameRequest to match new parameters.
+
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Update call to loadFrameRequest.
+
+2009-10-19 David Kilzer <ddkilzer@apple.com>
+
+ Documentation fix for -[NSObject(WebResourceLoadDelegate) webView:resource:willSendRequest:redirectResponse:fromDataSource:]
+
+ Reviewed by Dan Bernstein.
+
+ * WebView/WebResourceLoadDelegate.h: Prepended "webView:" to the
+ @method declaration of
+ -webView:resource:willSendRequest:redirectResponse:fromDataSource:
+ which was absent before r3953 and was missed during the great
+ documentation clean up of r4269.
+
+2009-10-19 Anders Carlsson <andersca@apple.com>
+
+ Fix build.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+
+2009-10-19 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Split assertions of conjunctions into separate statements or remove
+ redundant assertions.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView setAttributeKeys:andValues:]):
+ (-[WebHostedNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView halt]):
+ (-[WebBaseNetscapePluginView resumeFromHalt]):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+ (-[WebNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
+ * WebCoreSupport/WebContextMenuClient.mm:
+ (WebContextMenuClient::getCustomMenuFromDefaultItems):
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::checkGrammarOfString):
+ (WebEditorClient::checkTextOfParagraph):
+ * WebView/WebTextCompletionController.mm:
+ (-[WebTextCompletionController _reflectSelection]):
+
+2009-10-18 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7309062> Crashes in WebCore::DocumentLoader::isStopping below WebKit::NetscapePluginInstanceProxy::loadRequest.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::loadRequest): Null-check the DocumentLoader before deferencing it.
+
+2009-10-16 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ <rdar://problem/7304575>
+
+ * Plugins/WebBaseNetscapePluginView.h: Added new boolean ivar and -hasBeenHalted instance method.
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView halt]):Update _hasBeenHalted.
+ (-[WebBaseNetscapePluginView hasBeenHalted]): Added.
+ * WebView/WebView.mm:
+ (+[WebView _hasPluginForNodeBeenHalted:]): Checks to see if a plug-in node's been halted.
+ * WebView/WebViewPrivate.h: Added -_hasPluginForNodeBeenHalted method.
+
+2009-10-16 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlson.
+
+ Small code cleanup
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (WebHaltablePlugin::halt): Just call -[WebBaseNetscapePluginView halt].
+ (WebHaltablePlugin::restart): Just call -[WebBaseNetscapePluginView resumeFromHalt]
+ (-[WebBaseNetscapePluginView halt]):
+ (-[WebBaseNetscapePluginView resumeFromHalt]):
+ * WebView/WebView.mm:
+ (_pluginViewForNode): Added a check if a render is a widget. This prevents a later assertion.
+
+2009-10-16 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlson.
+
+ Last part of:
+ <rdar://problem/7273354>
+
+ * WebView/WebView.mm:
+ (_pluginViewForNode): Added with code extracted from _isNodeHaltedPlugin
+ (+[WebView _isNodeHaltedPlugin:]): Made this a class method.
+ (+[WebView _restartHaltedPluginForNode:]): Added. Restarts a plug-in
+ * WebView/WebViewPrivate.h: Added +_restartHaltedPluginForNode to header.
+
+2009-10-16 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders.
+
+ <rdar://problem/7273354>
+
+ * Plugins/WebBaseNetscapePluginView.h: Added _isHalted ivar and three new methods: -halt, -resumeFromHalt, and -isHalted
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (WebHaltablePlugin::halt): Call -halt instead of -stop.
+ (WebHaltablePlugin::restart):Call -resumeFromHalt instead of -start.
+ (-[WebBaseNetscapePluginView halt]): Added. Stop the plug-in, update _isHalted.
+ (-[WebBaseNetscapePluginView resumeFromHalt]): Added. Start the plug-in, update _isHalted.
+ (-[WebBaseNetscapePluginView isHalted]): Added.
+ * WebView/WebView.mm:
+ (-[WebView _isNodeHaltedPlugin:]): Added. Queries a DOMNode to determine if it's a halted plug-in.
+ * WebView/WebViewPrivate.h: Added _isNodeHaltedPlugin.
+
+2009-10-15 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ <rdar://problem/7306052> Fullscreen max/min volume buttons non-functional
+
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Set volume buttons target and action.
+ (-[WebVideoFullscreenHUDWindowController decrementVolume:]): New, decrement the volume by 10%.
+ (-[WebVideoFullscreenHUDWindowController incrementVolume:]): New, increment the volume by 10%.
+
+2009-10-15 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7295738> No way to mute/unmute a movie in full screen video mode
+
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindowController setVolume:]): Unmute movie before changing volume.
+
+2009-10-14 Kevin Decker <kdecker@apple.com>
+
+ Unbreak the world.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (WebHaltablePlugin::restart):
+
+2009-10-14 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders Carlsson and Jon Honeycutt
+
+ <rdar://problem/7304295> snapshots of halted plug-ins are missing
+
+ * Plugins/WebBaseNetscapePluginView.mm: Move bodies of WebHaltablePlugin virtual functions from WebHaltablePlugin class definition.
+ (WebHaltablePlugin::halt): Provide a substitute image to the RenderWidget for the plug-in view.
+ (WebHaltablePlugin::restart): Clear the substitute image.
+
+2009-10-13 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Change the order of arguments on some methods. Split removal for user stylesheets and script into
+ separate functions based off the type of object being removed.
+
+ * WebView/WebView.mm:
+ (+[WebView _addUserScriptToGroup:worldID:source:url:whitelist:blacklist:injectionTime:]):
+ (+[WebView _addUserStyleSheetToGroup:worldID:source:url:whitelist:blacklist:]):
+ (+[WebView _removeUserScriptFromGroup:worldID:url:]):
+ (+[WebView _removeUserStyleSheetFromGroup:worldID:url:]):
+ (+[WebView _removeUserScriptsFromGroup:worldID:]):
+ (+[WebView _removeUserStyleSheetsFromGroup:worldID:]):
+ * WebView/WebViewPrivate.h:
+
+2009-10-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6660507> Add "privacy mode" to Netscape Plug-in API
+
+ Listen for WebPreferences notifications and update the _isPrivateBrowsingEnabled ivar
+ when the value changes. Also call -[WebBaseNetscapePluginView privateBrowsingModeDidChange] when the
+ value changes. In process this just calls NPP_SetValue, and OOP it sends a MIG message to the plug-in host.
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::privateBrowsingModeDidChange):
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView createPlugin]):
+ (-[WebHostedNetscapePluginView privateBrowsingModeDidChange]):
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView privateBrowsingModeDidChange]):
+ (-[WebBaseNetscapePluginView viewDidMoveToWindow]):
+ (-[WebBaseNetscapePluginView preferencesHaveChanged:]):
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView privateBrowsingModeDidChange]):
+ (-[WebNetscapePluginView getVariable:value:]):
+
+2009-10-12 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Video keeps playing after going fullscreen, then closing window
+ https://bugs.webkit.org/show_bug.cgi?id=30164
+
+ Clear the QTMovie on the QTMovieView when coming out of fullscreen,
+ to fix issue where the underlying movie keeps playing.
+
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController windowDidExitFullscreen]):
+
+2009-10-11 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7294267> REGRESSION (r48492): Gmail voice and video chat
+ doesn’t work
+ https://bugs.webkit.org/show_bug.cgi?id=30295
+
+ Test: plugins/setProperty.html
+
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::setFieldValue): Fixed a typo. The function
+ should return early if m_instanceProxy is null.
+
+2009-10-09 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Factor HistoryController out of FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=30246
+
+ Update API call.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::restoreViewState):
+ * WebView/WebView.mm:
+ (-[WebView _loadBackForwardListFromOtherView:]):
+
+2009-10-09 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ <rdar://problem/7290671> Crash after navigating away from a page with subframe containing plug-in
+
+ At the time that -stop is called on a WebBaseNetscapePluginView that is contained within a subframe
+ the WebFrame's data source has been zeroed out. This was causing -[WebBaseNetscapePluginView webFrame]
+ to return nil during -stop, preventing the plug-in view from unregistering itself from the PluginHalter.
+ We fix this by having -webFrame retrieve the frame directly rather than retrieving it from the data source.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView dataSource]): Get the data source from the WebFrame.
+ (-[WebBaseNetscapePluginView webFrame]): Get the Frame directly from the element's document rather
+ than taking a windy route through the WebDataSource.
+
+2009-10-09 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add SPI to specifically enable visited link tracking.
+
+ * History/WebHistory.mm:
+ (+[WebHistory _setVisitedLinkTrackingEnabled:]):
+ * History/WebHistoryPrivate.h:
+
+2009-10-08 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Remove the WebKitPluginHalterEnabledPreferenceKey in favor of checking
+ for the existence of a PluginHalterDelegate.
+
+ Reviewed by Dan Bernstein.
+
+ * WebCoreSupport/WebPluginHalterClient.h:
+ Add declaration for new function.
+
+ * WebCoreSupport/WebPluginHalterClient.mm:
+ (WebPluginHalterClient::enabled):
+ Check whether the UIDelegate responds to shouldHaltPlugin.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ Remove the "enabled" preference key.
+
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ Remove the initialization of the pref.
+
+ * WebView/WebPreferencesPrivate.h:
+ Remove the getter/setter for this pref.
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+ Remove propagation of the pref.
+
+2009-10-08 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move executeScript from FrameLoader to ScriptController
+ https://bugs.webkit.org/show_bug.cgi?id=30200
+
+ Update API call.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ * WebView/WebView.mm:
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
+
+2009-10-08 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Ask the History Delegate to populate the visited links hash.
+ <rdar://problem/7285293> and https://webkit.org/b/29904
+
+ * History/WebHistory.mm:
+ (+[WebHistory _removeAllVisitedLinks]):
+ * History/WebHistoryPrivate.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::populateVisitedLinks):
+ * WebView/WebDelegateImplementationCaching.h:
+ * WebView/WebDelegateImplementationCaching.mm:
+ (CallHistoryDelegate):
+ * WebView/WebHistoryDelegate.h:
+ * WebView/WebView.mm:
+ (-[WebView _cacheHistoryDelegateImplementations]):
+ (-[WebView addVisitedLinks:]):
+ * WebView/WebViewPrivate.h:
+
+2009-10-08 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove the shouldLoadMediaElementURL implementation.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ * WebView/WebPolicyDelegatePrivate.h:
+
2009-10-07 Simon Fraser <simon.fraser@apple.com>
Re-land 49269-49271 since reverting them did not fix the tests.
diff --git a/WebKit/mac/Configurations/DebugRelease.xcconfig b/WebKit/mac/Configurations/DebugRelease.xcconfig
index 50071e7..11a94ca 100644
--- a/WebKit/mac/Configurations/DebugRelease.xcconfig
+++ b/WebKit/mac/Configurations/DebugRelease.xcconfig
@@ -28,6 +28,7 @@ ARCHS_ = $(ARCHS_1040);
ARCHS_1040 = $(NATIVE_ARCH);
ARCHS_1050 = $(NATIVE_ARCH);
ARCHS_1060 = $(ARCHS_STANDARD_32_64_BIT);
+ARCHS_1070 = $(ARCHS_STANDARD_32_64_BIT);
ONLY_ACTIVE_ARCH = YES;
@@ -36,6 +37,7 @@ MACOSX_DEPLOYMENT_TARGET_ = 10.4;
MACOSX_DEPLOYMENT_TARGET_1040 = 10.4;
MACOSX_DEPLOYMENT_TARGET_1050 = 10.5;
MACOSX_DEPLOYMENT_TARGET_1060 = 10.6;
+MACOSX_DEPLOYMENT_TARGET_1070 = 10.7;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
@@ -46,3 +48,4 @@ WEBKIT_SYSTEM_INTERFACE_LIBRARY_ = WebKitSystemInterfaceTiger;
WEBKIT_SYSTEM_INTERFACE_LIBRARY_1040 = WebKitSystemInterfaceTiger;
WEBKIT_SYSTEM_INTERFACE_LIBRARY_1050 = WebKitSystemInterfaceLeopard;
WEBKIT_SYSTEM_INTERFACE_LIBRARY_1060 = WebKitSystemInterfaceSnowLeopard;
+WEBKIT_SYSTEM_INTERFACE_LIBRARY_1070 = WebKitSystemInterfaceSnowLeopard;
diff --git a/WebKit/mac/Configurations/FeatureDefines.xcconfig b/WebKit/mac/Configurations/FeatureDefines.xcconfig
index ed387aa..42aa3cf 100644
--- a/WebKit/mac/Configurations/FeatureDefines.xcconfig
+++ b/WebKit/mac/Configurations/FeatureDefines.xcconfig
@@ -31,10 +31,12 @@
ENABLE_3D_CANVAS = $(ENABLE_3D_CANVAS_$(MAC_OS_X_VERSION_MAJOR));
ENABLE_3D_CANVAS_1050 = ENABLE_3D_CANVAS;
ENABLE_3D_CANVAS_1060 = ENABLE_3D_CANVAS;
+ENABLE_3D_CANVAS_1070 = ENABLE_3D_CANVAS;
ENABLE_3D_RENDERING = $(ENABLE_3D_RENDERING_$(MAC_OS_X_VERSION_MAJOR));
ENABLE_3D_RENDERING_1050 = ENABLE_3D_RENDERING;
ENABLE_3D_RENDERING_1060 = ENABLE_3D_RENDERING;
+ENABLE_3D_RENDERING_1070 = ENABLE_3D_RENDERING;
ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
ENABLE_DATABASE = ENABLE_DATABASE;
diff --git a/WebKit/mac/Configurations/Version.xcconfig b/WebKit/mac/Configurations/Version.xcconfig
index 66d574b..fabc009 100644
--- a/WebKit/mac/Configurations/Version.xcconfig
+++ b/WebKit/mac/Configurations/Version.xcconfig
@@ -22,7 +22,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MAJOR_VERSION = 532;
-MINOR_VERSION = 2;
+MINOR_VERSION = 4;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
@@ -36,6 +36,7 @@ SYSTEM_VERSION_PREFIX_ = 4; // Some Tiger versions of Xcode don't set MAC_OS_X_V
SYSTEM_VERSION_PREFIX_1040 = 4;
SYSTEM_VERSION_PREFIX_1050 = 5;
SYSTEM_VERSION_PREFIX_1060 = 6;
+SYSTEM_VERSION_PREFIX_1070 = 7;
// The production build always uses the full version with a system version prefix.
BUNDLE_VERSION_Production = $(SYSTEM_VERSION_PREFIX)$(FULL_VERSION);
diff --git a/WebKit/mac/History/WebHistory.mm b/WebKit/mac/History/WebHistory.mm
index 6304fd2..af40a24 100644
--- a/WebKit/mac/History/WebHistory.mm
+++ b/WebKit/mac/History/WebHistory.mm
@@ -801,6 +801,16 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date)
return [_historyPrivate data];
}
++ (void)_setVisitedLinkTrackingEnabled:(BOOL)visitedLinkTrackingEnabled
+{
+ PageGroup::setShouldTrackVisitedLinks(visitedLinkTrackingEnabled);
+}
+
++ (void)_removeAllVisitedLinks
+{
+ PageGroup::removeAllVisitedLinks();
+}
+
@end
@implementation WebHistory (WebInternal)
diff --git a/WebKit/mac/History/WebHistoryPrivate.h b/WebKit/mac/History/WebHistoryPrivate.h
index 4ab0924..b93472f 100644
--- a/WebKit/mac/History/WebHistoryPrivate.h
+++ b/WebKit/mac/History/WebHistoryPrivate.h
@@ -53,5 +53,6 @@ extern NSString *WebHistoryItemsDiscardedWhileLoadingNotification;
*/
- (NSData *)_data;
-
++ (void)_setVisitedLinkTrackingEnabled:(BOOL)visitedLinkTrackingEnabled;
++ (void)_removeAllVisitedLinks;
@end
diff --git a/WebKit/mac/Misc/WebCoreStatistics.h b/WebKit/mac/Misc/WebCoreStatistics.h
index d4370bf..7a189ae 100644
--- a/WebKit/mac/Misc/WebCoreStatistics.h
+++ b/WebKit/mac/Misc/WebCoreStatistics.h
@@ -30,6 +30,8 @@
#import <WebKit/WebFrame.h>
+@class DOMElement;
+
@interface WebCoreStatistics : NSObject
{
}
@@ -81,4 +83,5 @@
@interface WebFrame (WebKitDebug)
- (NSString *)renderTreeAsExternalRepresentation;
+- (NSString *)counterValueForElement:(DOMElement*)element;
@end
diff --git a/WebKit/mac/Misc/WebCoreStatistics.mm b/WebKit/mac/Misc/WebCoreStatistics.mm
index 57b59a4..6bac46e 100644
--- a/WebKit/mac/Misc/WebCoreStatistics.mm
+++ b/WebKit/mac/Misc/WebCoreStatistics.mm
@@ -28,6 +28,7 @@
#import "WebCoreStatistics.h"
+#import "DOMElementInternal.h"
#import "WebCache.h"
#import "WebFrameInternal.h"
#import <runtime/JSLock.h>
@@ -244,4 +245,9 @@ using namespace WebCore;
return externalRepresentation(_private->coreFrame->contentRenderer());
}
+- (NSString *)counterValueForElement:(DOMElement*)element
+{
+ return counterValueForElement(core(element));
+}
+
@end
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
index a1d9bad..9e29062 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
@@ -43,7 +43,7 @@ class NetscapePluginHostManager {
public:
static NetscapePluginHostManager& shared();
- PassRefPtr<NetscapePluginInstanceProxy> instantiatePlugin(WebNetscapePluginPackage *, WebHostedNetscapePluginView *, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame);
+ PassRefPtr<NetscapePluginInstanceProxy> instantiatePlugin(WebNetscapePluginPackage *, WebHostedNetscapePluginView *, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled);
void pluginHostDied(NetscapePluginHostProxy*);
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
index 4aa290a..6b36a6d 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
@@ -211,7 +211,7 @@ void NetscapePluginHostManager::pluginHostDied(NetscapePluginHostProxy* pluginHo
}
}
-PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePlugin(WebNetscapePluginPackage *pluginPackage, WebHostedNetscapePluginView *pluginView, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame)
+PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePlugin(WebNetscapePluginPackage *pluginPackage, WebHostedNetscapePluginView *pluginView, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled)
{
NetscapePluginHostProxy* hostProxy = hostForPackage(pluginPackage);
if (!hostProxy)
@@ -235,6 +235,7 @@ PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePl
[properties.get() setObject:[sourceURL absoluteString] forKey:@"sourceURL"];
[properties.get() setObject:[NSNumber numberWithBool:fullFrame] forKey:@"fullFrame"];
+ [properties.get() setObject:[NSNumber numberWithBool:isPrivateBrowsingEnabled] forKey:@"privateBrowsingEnabled"];
NSData *data = [NSPropertyListSerialization dataFromPropertyList:properties.get() format:NSPropertyListBinaryFormat_v1_0 errorDescription:nil];
ASSERT(data);
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
index e8874cd..970f5f5 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
@@ -187,7 +187,8 @@ NetscapePluginInstanceProxy* NetscapePluginHostProxy::pluginInstance(uint32_t pl
void NetscapePluginHostProxy::deadNameNotificationCallback(CFMachPortRef port, void *msg, CFIndex size, void *info)
{
- ASSERT(msg && static_cast<mach_msg_header_t*>(msg)->msgh_id == MACH_NOTIFY_DEAD_NAME);
+ ASSERT(msg);
+ ASSERT(static_cast<mach_msg_header_t*>(msg)->msgh_id == MACH_NOTIFY_DEAD_NAME);
static_cast<NetscapePluginHostProxy*>(info)->pluginHostDied();
}
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
index 280f161..c950ab7 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
@@ -163,6 +163,7 @@ public:
void resolveURL(const char* url, const char* target, data_t& resolvedURLData, mach_msg_type_number_t& resolvedURLLength);
void didDraw();
+ void privateBrowsingModeDidChange(bool isPrivateBrowsingEnabled);
// Reply structs
struct Reply {
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
index 21f35e2..4ae0220 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
@@ -575,9 +575,10 @@ NPError NetscapePluginInstanceProxy::loadRequest(NSURLRequest *request, const ch
return NPERR_INVALID_URL;
// Don't allow requests to be loaded when the document loader is stopping all loaders.
- if ([[m_pluginView dataSource] _documentLoader]->isStopping())
+ DocumentLoader* documentLoader = [[m_pluginView dataSource] _documentLoader];
+ if (!documentLoader || documentLoader->isStopping())
return NPERR_GENERIC_ERROR;
-
+
NSString *target = nil;
if (cTarget) {
// Find the frame given the target string.
@@ -587,7 +588,7 @@ NPError NetscapePluginInstanceProxy::loadRequest(NSURLRequest *request, const ch
// don't let a plugin start any loads if it is no longer part of a document that is being
// displayed unless the loads are in the same frame as the plugin.
- if ([[m_pluginView dataSource] _documentLoader] != core([m_pluginView webFrame])->loader()->activeDocumentLoader() &&
+ if (documentLoader != core([m_pluginView webFrame])->loader()->activeDocumentLoader() &&
(!cTarget || [frame findFrameNamed:target] != frame)) {
return NPERR_GENERIC_ERROR;
}
@@ -665,7 +666,7 @@ bool NetscapePluginInstanceProxy::getWindowNPObject(uint32_t& objectID)
if (!frame->script()->isEnabled())
objectID = 0;
else
- objectID = idForObject(frame->script()->windowShell()->window());
+ objectID = idForObject(frame->script()->windowShell(pluginWorld())->window());
return true;
}
@@ -703,7 +704,7 @@ bool NetscapePluginInstanceProxy::evaluate(uint32_t objectID, const String& scri
JSLock lock(SilenceAssertionsOnly);
- ProtectedPtr<JSGlobalObject> globalObject = frame->script()->globalObject();
+ ProtectedPtr<JSGlobalObject> globalObject = frame->script()->globalObject(pluginWorld());
ExecState* exec = globalObject->globalExec();
bool oldAllowPopups = frame->script()->allowPopupsFromPlugin();
@@ -744,7 +745,7 @@ bool NetscapePluginInstanceProxy::invoke(uint32_t objectID, const Identifier& me
if (!frame)
return false;
- ExecState* exec = frame->script()->globalObject()->globalExec();
+ ExecState* exec = frame->script()->globalObject(pluginWorld())->globalExec();
JSLock lock(SilenceAssertionsOnly);
JSValue function = object->get(exec, methodName);
CallData callData;
@@ -755,7 +756,7 @@ bool NetscapePluginInstanceProxy::invoke(uint32_t objectID, const Identifier& me
MarkedArgumentBuffer argList;
demarshalValues(exec, argumentsData, argumentsLength, argList);
- ProtectedPtr<JSGlobalObject> globalObject = frame->script()->globalObject();
+ ProtectedPtr<JSGlobalObject> globalObject = frame->script()->globalObject(pluginWorld());
globalObject->globalData()->timeoutChecker.start();
JSValue value = call(exec, function, callType, callData, object, argList);
globalObject->globalData()->timeoutChecker.stop();
@@ -778,7 +779,7 @@ bool NetscapePluginInstanceProxy::invokeDefault(uint32_t objectID, data_t argume
if (!frame)
return false;
- ExecState* exec = frame->script()->globalObject()->globalExec();
+ ExecState* exec = frame->script()->globalObject(pluginWorld())->globalExec();
JSLock lock(SilenceAssertionsOnly);
CallData callData;
CallType callType = object->getCallData(callData);
@@ -788,7 +789,7 @@ bool NetscapePluginInstanceProxy::invokeDefault(uint32_t objectID, data_t argume
MarkedArgumentBuffer argList;
demarshalValues(exec, argumentsData, argumentsLength, argList);
- ProtectedPtr<JSGlobalObject> globalObject = frame->script()->globalObject();
+ ProtectedPtr<JSGlobalObject> globalObject = frame->script()->globalObject(pluginWorld());
globalObject->globalData()->timeoutChecker.start();
JSValue value = call(exec, object, callType, callData, object, argList);
globalObject->globalData()->timeoutChecker.stop();
@@ -811,7 +812,7 @@ bool NetscapePluginInstanceProxy::construct(uint32_t objectID, data_t argumentsD
if (!frame)
return false;
- ExecState* exec = frame->script()->globalObject()->globalExec();
+ ExecState* exec = frame->script()->globalObject(pluginWorld())->globalExec();
JSLock lock(SilenceAssertionsOnly);
ConstructData constructData;
@@ -822,7 +823,7 @@ bool NetscapePluginInstanceProxy::construct(uint32_t objectID, data_t argumentsD
MarkedArgumentBuffer argList;
demarshalValues(exec, argumentsData, argumentsLength, argList);
- ProtectedPtr<JSGlobalObject> globalObject = frame->script()->globalObject();
+ ProtectedPtr<JSGlobalObject> globalObject = frame->script()->globalObject(pluginWorld());
globalObject->globalData()->timeoutChecker.start();
JSValue value = JSC::construct(exec, object, constructType, constructData, argList);
globalObject->globalData()->timeoutChecker.stop();
@@ -845,7 +846,7 @@ bool NetscapePluginInstanceProxy::getProperty(uint32_t objectID, const Identifie
if (!frame)
return false;
- ExecState* exec = frame->script()->globalObject()->globalExec();
+ ExecState* exec = frame->script()->globalObject(pluginWorld())->globalExec();
JSLock lock(SilenceAssertionsOnly);
JSValue value = object->get(exec, propertyName);
@@ -864,7 +865,7 @@ bool NetscapePluginInstanceProxy::getProperty(uint32_t objectID, unsigned proper
if (!frame)
return false;
- ExecState* exec = frame->script()->globalObject()->globalExec();
+ ExecState* exec = frame->script()->globalObject(pluginWorld())->globalExec();
JSLock lock(SilenceAssertionsOnly);
JSValue value = object->get(exec, propertyName);
@@ -886,7 +887,7 @@ bool NetscapePluginInstanceProxy::setProperty(uint32_t objectID, const Identifie
if (!frame)
return false;
- ExecState* exec = frame->script()->globalObject()->globalExec();
+ ExecState* exec = frame->script()->globalObject(pluginWorld())->globalExec();
JSLock lock(SilenceAssertionsOnly);
JSValue value = demarshalValue(exec, valueData, valueLength);
@@ -910,7 +911,7 @@ bool NetscapePluginInstanceProxy::setProperty(uint32_t objectID, unsigned proper
if (!frame)
return false;
- ExecState* exec = frame->script()->globalObject()->globalExec();
+ ExecState* exec = frame->script()->globalObject(pluginWorld())->globalExec();
JSLock lock(SilenceAssertionsOnly);
JSValue value = demarshalValue(exec, valueData, valueLength);
@@ -933,7 +934,7 @@ bool NetscapePluginInstanceProxy::removeProperty(uint32_t objectID, const Identi
if (!frame)
return false;
- ExecState* exec = frame->script()->globalObject()->globalExec();
+ ExecState* exec = frame->script()->globalObject(pluginWorld())->globalExec();
if (!object->hasProperty(exec, propertyName)) {
exec->clearException();
return false;
@@ -958,7 +959,7 @@ bool NetscapePluginInstanceProxy::removeProperty(uint32_t objectID, unsigned pro
if (!frame)
return false;
- ExecState* exec = frame->script()->globalObject()->globalExec();
+ ExecState* exec = frame->script()->globalObject(pluginWorld())->globalExec();
if (!object->hasProperty(exec, propertyName)) {
exec->clearException();
return false;
@@ -983,7 +984,7 @@ bool NetscapePluginInstanceProxy::hasProperty(uint32_t objectID, const Identifie
if (!frame)
return false;
- ExecState* exec = frame->script()->globalObject()->globalExec();
+ ExecState* exec = frame->script()->globalObject(pluginWorld())->globalExec();
bool result = object->hasProperty(exec, propertyName);
exec->clearException();
@@ -1003,7 +1004,7 @@ bool NetscapePluginInstanceProxy::hasProperty(uint32_t objectID, unsigned proper
if (!frame)
return false;
- ExecState* exec = frame->script()->globalObject()->globalExec();
+ ExecState* exec = frame->script()->globalObject(pluginWorld())->globalExec();
bool result = object->hasProperty(exec, propertyName);
exec->clearException();
@@ -1023,7 +1024,7 @@ bool NetscapePluginInstanceProxy::hasMethod(uint32_t objectID, const Identifier&
if (!frame)
return false;
- ExecState* exec = frame->script()->globalObject()->globalExec();
+ ExecState* exec = frame->script()->globalObject(pluginWorld())->globalExec();
JSLock lock(SilenceAssertionsOnly);
JSValue func = object->get(exec, methodName);
exec->clearException();
@@ -1043,7 +1044,7 @@ bool NetscapePluginInstanceProxy::enumerate(uint32_t objectID, data_t& resultDat
if (!frame)
return false;
- ExecState* exec = frame->script()->globalObject()->globalExec();
+ ExecState* exec = frame->script()->globalObject(pluginWorld())->globalExec();
JSLock lock(SilenceAssertionsOnly);
PropertyNameArray propertyNames(exec);
@@ -1442,6 +1443,11 @@ void NetscapePluginInstanceProxy::resolveURL(const char* url, const char* target
memcpy(resolvedURLData, resolvedURL.data(), resolvedURLLength);
}
+void NetscapePluginInstanceProxy::privateBrowsingModeDidChange(bool isPrivateBrowsingEnabled)
+{
+ _WKPHPluginInstancePrivateBrowsingModeDidChange(m_pluginHostProxy->port(), m_pluginID, isPrivateBrowsingEnabled);
+}
+
} // namespace WebKit
#endif // USE(PLUGIN_HOST_PROCESS)
diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
index 0b3a32f..6be3953 100644
--- a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
+++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
@@ -370,7 +370,7 @@ JSC::JSValue ProxyInstance::fieldValue(ExecState* exec, const Field* field) cons
void ProxyInstance::setFieldValue(ExecState* exec, const Field* field, JSValue value) const
{
- if (m_instanceProxy)
+ if (!m_instanceProxy)
return;
uint64_t serverIdentifier = static_cast<const ProxyField*>(field)->serverIdentifier();
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
index 34a2211..8de2aa6 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
@@ -90,7 +90,8 @@ extern "C" {
- (void)setAttributeKeys:(NSArray *)keys andValues:(NSArray *)values
{
- ASSERT(!_attributeKeys && !_attributeValues);
+ ASSERT(!_attributeKeys);
+ ASSERT(!_attributeValues);
_attributeKeys.adoptNS([keys copy]);
_attributeValues.adoptNS([values copy]);
@@ -102,7 +103,8 @@ extern "C" {
NSString *userAgent = [[self webView] userAgentForURL:_baseURL.get()];
- _proxy = NetscapePluginHostManager::shared().instantiatePlugin(_pluginPackage.get(), self, _MIMEType.get(), _attributeKeys.get(), _attributeValues.get(), userAgent, _sourceURL.get(), _mode == NP_FULL);
+ _proxy = NetscapePluginHostManager::shared().instantiatePlugin(_pluginPackage.get(), self, _MIMEType.get(), _attributeKeys.get(), _attributeValues.get(), userAgent, _sourceURL.get(),
+ _mode == NP_FULL, _isPrivateBrowsingEnabled);
if (!_proxy)
return NO;
@@ -128,6 +130,12 @@ extern "C" {
[newLayer addSublayer:_pluginLayer.get()];
}
+- (void)privateBrowsingModeDidChange
+{
+ if (_proxy)
+ _proxy->privateBrowsingModeDidChange(_isPrivateBrowsingEnabled);
+}
+
- (void)loadStream
{
}
@@ -414,7 +422,7 @@ extern "C" {
ASSERT([webPluginContainerCheck isKindOfClass:[WebPluginContainerCheck class]]);
id contextInfo = [webPluginContainerCheck contextInfo];
- ASSERT(contextInfo && [contextInfo isKindOfClass:[NSNumber class]]);
+ ASSERT([contextInfo isKindOfClass:[NSNumber class]]);
if (!_proxy)
return;
diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs b/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs
index 04edf64..9882bb5 100644
--- a/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs
+++ b/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs
@@ -236,4 +236,8 @@ simpleroutine PHBooleanAndDataReply(pluginHostPort :mach_port_t;
simpleroutine PHPluginInstanceDidDraw(pluginHostPort :mach_port_t;
pluginID :uint32_t);
+simpleroutine PHPluginInstancePrivateBrowsingModeDidChange(pluginHostPort :mach_port_t;
+ pluginID :uint32_t;
+ privateBrowsingEnabled :boolean_t);
+
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
index bd05ebe..246fcf1 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
@@ -62,6 +62,9 @@ class WebHaltablePlugin;
BOOL _isStarted;
BOOL _hasFocus;
BOOL _isCompletelyObscured;
+ BOOL _isPrivateBrowsingEnabled;
+ BOOL _isHalted;
+ BOOL _hasBeenHalted;
RefPtr<WebCore::HTMLPlugInElement> _element;
RetainPtr<NSString> _MIMEType;
@@ -109,6 +112,11 @@ class WebHaltablePlugin;
- (void)start;
- (void)stop;
+- (void)halt;
+- (void)resumeFromHalt;
+- (BOOL)isHalted;
+- (BOOL)hasBeenHalted;
+
- (void)addWindowObservers;
- (void)removeWindowObservers;
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index e730419..0b4d56a 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -43,6 +43,7 @@
#import <WebCore/WebCoreObjCExtras.h>
#import <WebCore/AuthenticationMac.h>
+#import <WebCore/BitmapImage.h>
#import <WebCore/Credential.h>
#import <WebCore/CredentialStorage.h>
#import <WebCore/CString.h>
@@ -55,6 +56,7 @@
#import <WebCore/Page.h>
#import <WebCore/ProtectionSpace.h>
#import <WebCore/RenderView.h>
+#import <WebCore/RenderWidget.h>
#import <WebKit/DOMPrivate.h>
#import <runtime/InitializeThreading.h>
#import <wtf/Assertions.h>
@@ -72,13 +74,28 @@ public:
}
private:
- virtual void halt() { [m_view stop]; }
- virtual void restart() { [m_view start]; }
- virtual Node* node() const { return [m_view element]; }
+ virtual void halt();
+ virtual void restart();
+ virtual Node* node() const;
WebBaseNetscapePluginView* m_view;
};
+void WebHaltablePlugin::halt()
+{
+ [m_view halt];
+}
+
+void WebHaltablePlugin::restart()
+{
+ [m_view resumeFromHalt];
+}
+
+Node* WebHaltablePlugin::node() const
+{
+ return [m_view element];
+}
+
@implementation WebBaseNetscapePluginView
+ (void)initialize
@@ -243,6 +260,10 @@ private:
ASSERT_NOT_REACHED();
}
+- (void)privateBrowsingModeDidChange
+{
+}
+
- (void)removeTrackingRect
{
if (_trackingTag) {
@@ -455,6 +476,51 @@ private:
[self destroyPlugin];
}
+- (void)halt
+{
+ ASSERT(!_isHalted);
+ ASSERT(_isStarted);
+ Element *element = [self element];
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ CGImageRef cgImage = CGImageRetain([core([self webFrame])->nodeImage(element) CGImageForProposedRect:nil context:nil hints:nil]);
+#else
+ RetainPtr<CGImageSourceRef> imageRef(AdoptCF, CGImageSourceCreateWithData((CFDataRef)[core([self webFrame])->nodeImage(element) TIFFRepresentation], 0));
+ CGImageRef cgImage = CGImageSourceCreateImageAtIndex(imageRef.get(), 0, 0);
+#endif
+ ASSERT(cgImage);
+
+ // BitmapImage will release the passed in CGImage on destruction.
+ RefPtr<Image> nodeImage = BitmapImage::create(cgImage);
+ ASSERT(element->renderer());
+ toRenderWidget(element->renderer())->showSubstituteImage(nodeImage);
+ [self stop];
+ _isHalted = YES;
+ _hasBeenHalted = YES;
+}
+
+- (void)resumeFromHalt
+{
+ ASSERT(_isHalted);
+ ASSERT(!_isStarted);
+ [self start];
+
+ if (_isStarted)
+ _isHalted = NO;
+
+ ASSERT([self element]->renderer());
+ toRenderWidget([self element]->renderer())->showSubstituteImage(0);
+}
+
+- (BOOL)isHalted
+{
+ return _isHalted;
+}
+
+- (BOOL)hasBeenHalted
+{
+ return _hasBeenHalted;
+}
+
- (void)viewWillMoveToWindow:(NSWindow *)newWindow
{
// We must remove the tracking rect before we move to the new window.
@@ -506,6 +572,8 @@ private:
name:WebPreferencesChangedNotification
object:nil];
+ _isPrivateBrowsingEnabled = [[[self webView] preferences] privateBrowsingEnabled];
+
// View moved to an actual window. Start it if not already started.
[self start];
@@ -586,9 +654,12 @@ private:
- (void)preferencesHaveChanged:(NSNotification *)notification
{
WebPreferences *preferences = [[self webView] preferences];
- BOOL arePlugInsEnabled = [preferences arePlugInsEnabled];
+
+ if ([notification object] != preferences)
+ return;
- if ([notification object] == preferences && _isStarted != arePlugInsEnabled) {
+ BOOL arePlugInsEnabled = [preferences arePlugInsEnabled];
+ if (_isStarted != arePlugInsEnabled) {
if (arePlugInsEnabled) {
if ([self currentWindow]) {
[self start];
@@ -598,6 +669,12 @@ private:
[self invalidatePluginContentRect:[self bounds]];
}
}
+
+ BOOL isPrivateBrowsingEnabled = [preferences privateBrowsingEnabled];
+ if (isPrivateBrowsingEnabled != _isPrivateBrowsingEnabled) {
+ _isPrivateBrowsingEnabled = isPrivateBrowsingEnabled;
+ [self privateBrowsingModeDidChange];
+ }
}
- (void)renewGState
@@ -640,13 +717,12 @@ private:
- (WebDataSource *)dataSource
{
- WebFrame *webFrame = kit(_element->document()->frame());
- return [webFrame _dataSource];
+ return [[self webFrame] _dataSource];
}
- (WebFrame *)webFrame
{
- return [[self dataSource] webFrame];
+ return kit(_element->document()->frame());
}
- (WebView *)webView
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm
index 5debb97..135d45a 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm
@@ -402,7 +402,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
QDErr err = NewGWorldFromPtr(&newOffscreenGWorld,
getQDPixelFormatForBitmapContext(currentContext), &offscreenBounds, 0, 0, 0,
static_cast<char*>(offscreenData), CGBitmapContextGetBytesPerRow(currentContext));
- ASSERT(newOffscreenGWorld && !err);
+ ASSERT(newOffscreenGWorld);
+ ASSERT(!err);
if (!err) {
if (offscreenGWorld)
DisposeGWorld(offscreenGWorld);
@@ -838,6 +839,21 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
_eventHandler->syntheticKeyDownWithCommandModifier(keyCode, character);
}
+- (void)privateBrowsingModeDidChange
+{
+ if (!_isStarted)
+ return;
+
+ NPBool value = _isPrivateBrowsingEnabled;
+
+ [self willCallPlugInFunction];
+ {
+ JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
+ [_pluginPackage.get() pluginFuncs]->setvalue(plugin, NPNVprivateModeBool, &value);
+ }
+ [self didCallPlugInFunction];
+}
+
#pragma mark WEB_NETSCAPE_PLUGIN
- (BOOL)isNewWindowEqualToOldWindow
@@ -1271,7 +1287,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
{
ASSERT([webPluginContainerCheck isKindOfClass:[WebPluginContainerCheck class]]);
WebPluginContainerCheck *check = (WebPluginContainerCheck *)webPluginContainerCheck;
- ASSERT([check contextInfo] && [[check contextInfo] isKindOfClass:[WebNetscapeContainerCheckContextInfo class]]);
+ ASSERT([[check contextInfo] isKindOfClass:[WebNetscapeContainerCheckContextInfo class]]);
[self cancelCheckIfAllowedToLoadURL:[[check contextInfo] checkRequestID]];
}
@@ -2022,13 +2038,19 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
return NPERR_NO_ERROR;
}
#endif /* NP_NO_CARBON */
-
+
case NPNVsupportsCocoaBool:
{
*(NPBool *)value = TRUE;
return NPERR_NO_ERROR;
}
+ case NPNVprivateModeBool:
+ {
+ *(NPBool *)value = _isPrivateBrowsingEnabled;
+ return NPERR_NO_ERROR;
+ }
+
case WKNVBrowserContainerCheckFuncs:
{
*(WKNBrowserContainerCheckFuncs **)value = browserContainerCheckFuncs();
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index a3f004e..c107299 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -548,6 +548,15 @@ void WebChromeClient::reachedMaxAppCacheSize(int64_t spaceNeeded)
void WebChromeClient::populateVisitedLinks()
{
+ if ([m_webView historyDelegate]) {
+ WebHistoryDelegateImplementationCache* implementations = WebViewGetHistoryDelegateImplementations(m_webView);
+
+ if (implementations->populateVisitedLinksFunc)
+ CallHistoryDelegate(implementations->populateVisitedLinksFunc, m_webView, @selector(populateVisitedLinksForWebView:));
+
+ return;
+ }
+
BEGIN_BLOCK_OBJC_EXCEPTIONS;
[[WebHistory optionalSharedHistory] _addVisitedLinksToPageGroup:[m_webView page]->group()];
END_BLOCK_OBJC_EXCEPTIONS;
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.mm b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
index e8c37d5..1e03d88 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
@@ -675,7 +675,8 @@ void WebEditorClient::checkGrammarOfString(const UChar* text, int length, Vector
NSValue *detailRangeAsNSValue = [detail objectForKey:NSGrammarRange];
ASSERT(detailRangeAsNSValue);
NSRange detailNSRange = [detailRangeAsNSValue rangeValue];
- ASSERT(detailNSRange.location != NSNotFound && detailNSRange.length > 0);
+ ASSERT(detailNSRange.location != NSNotFound);
+ ASSERT(detailNSRange.length > 0);
grammarDetail.location = detailNSRange.location;
grammarDetail.length = detailNSRange.length;
grammarDetail.userDescription = [detail objectForKey:NSGrammarUserDescription];
@@ -696,7 +697,8 @@ void WebEditorClient::checkTextOfParagraph(const UChar* text, int length, uint64
for (NSTextCheckingResult *incomingResult in incomingResults) {
NSRange resultRange = [incomingResult range];
NSTextCheckingType resultType = [incomingResult resultType];
- ASSERT(resultRange.location != NSNotFound && resultRange.length > 0);
+ ASSERT(resultRange.location != NSNotFound);
+ ASSERT(resultRange.length > 0);
if (NSTextCheckingTypeSpelling == resultType && 0 != (checkingTypes & NSTextCheckingTypeSpelling)) {
TextCheckingResult result;
result.type = TextCheckingTypeSpelling;
@@ -715,7 +717,8 @@ void WebEditorClient::checkTextOfParagraph(const UChar* text, int length, uint64
NSValue *detailRangeAsNSValue = [incomingDetail objectForKey:NSGrammarRange];
ASSERT(detailRangeAsNSValue);
NSRange detailNSRange = [detailRangeAsNSValue rangeValue];
- ASSERT(detailNSRange.location != NSNotFound && detailNSRange.length > 0);
+ ASSERT(detailNSRange.location != NSNotFound);
+ ASSERT(detailNSRange.length > 0);
detail.location = detailNSRange.location;
detail.length = detailNSRange.length;
detail.userDescription = [incomingDetail objectForKey:NSGrammarUserDescription];
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
index 6259c80..6d365dd 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
@@ -208,7 +208,6 @@ private:
NSDictionary *actionDictionary(const WebCore::NavigationAction&, PassRefPtr<WebCore::FormState>) const;
virtual bool canCachePage() const;
- virtual bool shouldLoadMediaElementURL(const WebCore::KURL&) const;
RetainPtr<WebFrame> m_webFrame;
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index ec05572..bc6c8f4 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -988,7 +988,7 @@ void WebFrameLoaderClient::saveViewStateToItem(HistoryItem* item)
void WebFrameLoaderClient::restoreViewState()
{
- HistoryItem* currentItem = core(m_webFrame.get())->loader()->currentHistoryItem();
+ HistoryItem* currentItem = core(m_webFrame.get())->loader()->history()->currentItem();
ASSERT(currentItem);
// FIXME: As the ASSERT attests, it seems we should always have a currentItem here.
@@ -1738,18 +1738,7 @@ jobject WebFrameLoaderClient::javaApplet(NSView* view)
}
#endif
-bool WebFrameLoaderClient::shouldLoadMediaElementURL(const KURL& url) const {
- WebView *webView = getWebView(m_webFrame.get());
-
- if (id policyDelegate = [webView policyDelegate]) {
- if ([policyDelegate respondsToSelector:@selector(webView:shouldLoadMediaURL:inFrame:)])
- return [policyDelegate webView:webView shouldLoadMediaURL:url inFrame:m_webFrame.get()];
- }
- return true;
-}
-
@implementation WebFramePolicyListener
-
+ (void)initialize
{
JSC::initializeThreading();
diff --git a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h
index 48c655d..0bab4e3 100644
--- a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h
+++ b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h
@@ -36,6 +36,7 @@ public:
WebPluginHalterClient(WebView *);
virtual bool shouldHaltPlugin(WebCore::Node*) const;
+ virtual bool enabled() const;
private:
WebView *m_webView;
diff --git a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm
index 2384d0b..b83e4c8 100644
--- a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm
@@ -42,3 +42,8 @@ bool WebPluginHalterClient::shouldHaltPlugin(Node* pluginNode) const
ASSERT_ARG(pluginNode, pluginNode);
return CallUIDelegateReturningBoolean(NO, m_webView, @selector(webView:shouldHaltPlugin:), kit(pluginNode));
}
+
+bool WebPluginHalterClient::enabled() const
+{
+ return [[m_webView UIDelegate] respondsToSelector:@selector(webView:shouldHaltPlugin:)];
+}
diff --git a/WebKit/mac/WebView/WebDelegateImplementationCaching.h b/WebKit/mac/WebView/WebDelegateImplementationCaching.h
index 907ba42..edf3cad 100644
--- a/WebKit/mac/WebView/WebDelegateImplementationCaching.h
+++ b/WebKit/mac/WebView/WebDelegateImplementationCaching.h
@@ -86,6 +86,7 @@ struct WebHistoryDelegateImplementationCache {
IMP clientRedirectFunc;
IMP serverRedirectFunc;
IMP setTitleFunc;
+ IMP populateVisitedLinksFunc;
};
WebResourceDelegateImplementationCache* WebViewGetResourceLoadDelegateImplementations(WebView *);
@@ -130,5 +131,6 @@ id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, id, NSInteger, id
id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, id, id, id);
id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, NSInteger, id);
+id CallHistoryDelegate(IMP, WebView *, SEL);
id CallHistoryDelegate(IMP, WebView *, SEL, id, id);
id CallHistoryDelegate(IMP, WebView *, SEL, id, id, id);
diff --git a/WebKit/mac/WebView/WebDelegateImplementationCaching.mm b/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
index 7757fc7..486d094 100644
--- a/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
+++ b/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
@@ -548,6 +548,11 @@ id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id o
return CallDelegate(implementation, self, self->_private->scriptDebugDelegate, selector, object1, integer1, integer2, object2);
}
+id CallHistoryDelegate(IMP implementation, WebView *self, SEL selector)
+{
+ return CallDelegate(implementation, self, self->_private->historyDelegate, selector);
+}
+
id CallHistoryDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2)
{
return CallDelegate(implementation, self, self->_private->historyDelegate, selector, object1, object2);
diff --git a/WebKit/mac/WebView/WebDynamicScrollBarsView.h b/WebKit/mac/WebView/WebDynamicScrollBarsView.h
index 40aadc0..15ed7e4 100644
--- a/WebKit/mac/WebView/WebDynamicScrollBarsView.h
+++ b/WebKit/mac/WebView/WebDynamicScrollBarsView.h
@@ -29,8 +29,7 @@
// This is a Private header (containing SPI), despite the fact that its name
// does not contain the word Private.
-// FIXME: Does Safari really need to use this any more? AppKit added autohidesScrollers
-// in Panther, and that was the original reason we needed this view in Safari.
+// This was once used by Safari, but has not been for a long time.
// FIXME: <rdar://problem/5898985> Mail currently expects this header to define WebCoreScrollbarAlwaysOn.
extern const int WebCoreScrollbarAlwaysOn;
@@ -47,5 +46,8 @@ extern const int WebCoreScrollbarAlwaysOn;
BOOL horizontallyPinnedByPreviousWheelEvent;
unsigned inUpdateScrollersLayoutPass;
}
-- (void)setAllowsHorizontalScrolling:(BOOL)flag; // This method is used by Safari, so it cannot be removed.
+
+// This was originally added for Safari's benefit, but Safari has not used it for a long time.
+// Perhaps it can be removed.
+- (void)setAllowsHorizontalScrolling:(BOOL)flag;
@end
diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm
index 27aac67..94fe997 100644
--- a/WebKit/mac/WebView/WebFrame.mm
+++ b/WebKit/mac/WebView/WebFrame.mm
@@ -85,6 +85,7 @@
#import <WebCore/markup.h>
#import <WebCore/visible_units.h>
#import <runtime/JSLock.h>
+#import <runtime/JSObject.h>
#import <runtime/JSValue.h>
#import <wtf/CurrentTime.h>
@@ -270,11 +271,12 @@ WebView *getWebView(WebFrame *webFrame)
ScriptController* scriptController = _private->coreFrame->script();
// Calling ScriptController::globalObject() would create a window shell, and dispatch corresponding callbacks, which may be premature
- // if the script debugger is attached before a document is created.
- if (!scriptController->haveWindowShell())
+ // if the script debugger is attached before a document is created. These calls use the debuggerWorld(), we will need to pass a world
+ // to be able to debug isolated worlds.
+ if (!scriptController->existingWindowShell(debuggerWorld()))
return;
- JSGlobalObject* globalObject = scriptController->globalObject();
+ JSGlobalObject* globalObject = scriptController->globalObject(debuggerWorld());
if (!globalObject)
return;
@@ -595,7 +597,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
{
ASSERT(_private->coreFrame->document());
- JSValue result = _private->coreFrame->loader()->executeScript(string, forceUserGesture).jsValue();
+ JSValue result = _private->coreFrame->script()->executeScript(string, forceUserGesture).jsValue();
if (!_private->coreFrame) // In case the script removed our frame from the page.
return @"";
@@ -607,7 +609,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return @"";
JSLock lock(SilenceAssertionsOnly);
- return String(result.toString(_private->coreFrame->script()->globalObject()->globalExec()));
+ return String(result.toString(_private->coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec()));
}
- (NSRect)_caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity
@@ -1202,6 +1204,42 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return SecurityOrigin::canLoad(URL, String(), _private->coreFrame->document());
}
+- (NSString *)_stringByEvaluatingJavaScriptInIsolatedWorld:(unsigned)worldID WithGlobalObject:(JSObjectRef)globalObjectRef FromString:(NSString *)string
+{
+ // Start off with some guess at a frame and a global object, we'll try to do better...!
+ JSDOMWindow* anyWorldGlobalObject = _private->coreFrame->script()->globalObject(mainThreadNormalWorld());
+
+ // The global object is probably a shell object? - if so, we know how to use this!
+ JSC::JSObject* globalObjectObj = toJS(globalObjectRef);
+ if (!strcmp(globalObjectObj->classInfo()->className, "JSDOMWindowShell"))
+ anyWorldGlobalObject = static_cast<JSDOMWindowShell*>(globalObjectObj)->window();
+
+ // Get the frame frome the global object we've settled on.
+ Frame* frame = anyWorldGlobalObject->impl()->frame();
+ ASSERT(frame->document());
+ JSValue result = frame->script()->executeScriptInIsolatedWorld(worldID, string, true).jsValue();
+
+ if (!frame) // In case the script removed our frame from the page.
+ return @"";
+
+ // This bizarre set of rules matches behavior from WebKit for Safari 2.0.
+ // If you don't like it, use -[WebScriptObject evaluateWebScript:] or
+ // JSEvaluateScript instead, since they have less surprising semantics.
+ if (!result || !result.isBoolean() && !result.isString() && !result.isNumber())
+ return @"";
+
+ JSLock lock(SilenceAssertionsOnly);
+ 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
@@ -1433,7 +1471,7 @@ static NSURL *createUniqueWebDataURL()
Frame* coreFrame = _private->coreFrame;
if (!coreFrame)
return 0;
- return toGlobalRef(coreFrame->script()->globalObject()->globalExec());
+ return toGlobalRef(coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec());
}
@end
diff --git a/WebKit/mac/WebView/WebFramePrivate.h b/WebKit/mac/WebView/WebFramePrivate.h
index 7446584..be13430 100644
--- a/WebKit/mac/WebView/WebFramePrivate.h
+++ b/WebKit/mac/WebView/WebFramePrivate.h
@@ -96,6 +96,9 @@ typedef enum {
- (void)_recursive_pauseNullEventsForAllNetscapePlugins;
#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.
// This method is only intended to be used for testing the CSS animation and transition system.
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm
index 102f630..936b6d7 100644
--- a/WebKit/mac/WebView/WebHTMLView.mm
+++ b/WebKit/mac/WebView/WebHTMLView.mm
@@ -2173,6 +2173,15 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
#endif
}
+- (NSView *)_compositingLayersHostingView
+{
+#if USE(ACCELERATED_COMPOSITING)
+ return _private->layerHostingView;
+#else
+ return 0;
+#endif
+}
+
@end
@implementation NSView (WebHTMLViewFileInternal)
diff --git a/WebKit/mac/WebView/WebHTMLViewPrivate.h b/WebKit/mac/WebView/WebHTMLViewPrivate.h
index bb59a7b..cb121d8 100644
--- a/WebKit/mac/WebView/WebHTMLViewPrivate.h
+++ b/WebKit/mac/WebView/WebHTMLViewPrivate.h
@@ -117,8 +117,8 @@
- (void)_pauseNullEventsForAllNetscapePlugins;
#endif
-// SPI for DumpRenderTree
- (BOOL)_isUsingAcceleratedCompositing;
+- (NSView *)_compositingLayersHostingView;
// SPI for printing (should be converted to API someday). When the WebHTMLView isn't being printed
// directly, this method must be called before paginating, or the computed height might be incorrect.
diff --git a/WebKit/mac/WebView/WebHistoryDelegate.h b/WebKit/mac/WebView/WebHistoryDelegate.h
index 4029eb0..4415365 100644
--- a/WebKit/mac/WebView/WebHistoryDelegate.h
+++ b/WebKit/mac/WebView/WebHistoryDelegate.h
@@ -39,4 +39,6 @@
- (void)webView:(WebView *)webView updateHistoryTitle:(NSString *)title forURL:(NSString *)url;
+- (void)populateVisitedLinksForWebView:(WebView *)webView;
+
@end
diff --git a/WebKit/mac/WebView/WebPDFView.mm b/WebKit/mac/WebView/WebPDFView.mm
index dea3819..a38412e 100644
--- a/WebKit/mac/WebView/WebPDFView.mm
+++ b/WebKit/mac/WebView/WebPDFView.mm
@@ -953,7 +953,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
}
// Call to the frame loader because this is where our security checks are made.
- core([dataSource webFrame])->loader()->loadFrameRequest(ResourceRequest(URL), false, false, event.get(), 0);
+ core([dataSource webFrame])->loader()->loadFrameRequest(ResourceRequest(URL), false, false, event.get(), 0, SendReferrer);
}
- (void)PDFViewOpenPDFInNativeApplication:(PDFView *)sender
diff --git a/WebKit/mac/WebView/WebPolicyDelegatePrivate.h b/WebKit/mac/WebView/WebPolicyDelegatePrivate.h
index efdf007..45f8f45 100644
--- a/WebKit/mac/WebView/WebPolicyDelegatePrivate.h
+++ b/WebKit/mac/WebView/WebPolicyDelegatePrivate.h
@@ -49,6 +49,4 @@ typedef enum {
@interface NSObject (WebPolicyDelegatePrivate)
// Needed for <rdar://problem/3951283> can view pages from the back/forward cache that should be disallowed by Parental Controls
- (BOOL)webView:(WebView *)webView shouldGoToHistoryItem:(WebHistoryItem *)item;
-
-- (BOOL)webView:(WebView *)webView shouldLoadMediaURL:(NSURL *)url inFrame:(WebFrame *)frame;
@end
diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index d6c9d3c..4a87337 100644
--- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -56,7 +56,6 @@
#define WebKitDatabasesEnabledPreferenceKey @"WebKitDatabasesEnabledPreferenceKey"
#define WebKitLocalStorageEnabledPreferenceKey @"WebKitLocalStorageEnabledPreferenceKey"
#define WebKitExperimentalNotificationsEnabledPreferenceKey @"WebKitExperimentalNotificationsEnabledPreferenceKey"
-#define WebKitExperimentalWebSocketsEnabledPreferenceKey @"WebKitExperimentalWebSocketsEnabledPreferenceKey"
#define WebKitAllowAnimatedImagesPreferenceKey @"WebKitAllowAnimatedImagesPreferenceKey"
#define WebKitAllowAnimatedImageLoopingPreferenceKey @"WebKitAllowAnimatedImageLoopingPreferenceKey"
#define WebKitDisplayImagesKey @"WebKitDisplayImagesKey"
@@ -87,7 +86,6 @@
#define WebKitXSSAuditorEnabledPreferenceKey @"WebKitXSSAuditorEnabled"
#define WebKitAcceleratedCompositingEnabledPreferenceKey @"WebKitAcceleratedCompositingEnabled"
#define WebKitWebGLEnabledPreferenceKey @"WebKitWebGLEnabled"
-#define WebKitPluginHalterEnabledPreferenceKey @"WebKitPluginHalterEnabled"
#define WebKitPluginAllowedRunTimePreferenceKey @"WebKitPluginAllowedRunTime"
// These are private both because callers should be using the cover methods and because the
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index 2910d27..4914340 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -321,7 +321,6 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:YES], WebKitDatabasesEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitLocalStorageEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitExperimentalNotificationsEnabledPreferenceKey,
- [NSNumber numberWithBool:NO], WebKitExperimentalWebSocketsEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitAllowAnimatedImagesPreferenceKey,
[NSNumber numberWithBool:YES], WebKitAllowAnimatedImageLoopingPreferenceKey,
[NSNumber numberWithBool:YES], WebKitDisplayImagesKey,
@@ -353,7 +352,6 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:YES], WebKitXSSAuditorEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitAcceleratedCompositingEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitWebGLEnabledPreferenceKey,
- [NSNumber numberWithBool:NO], WebKitPluginHalterEnabledPreferenceKey,
[NSNumber numberWithUnsignedInt:4], WebKitPluginAllowedRunTimePreferenceKey,
nil];
@@ -1026,16 +1024,6 @@ static WebCacheModel cacheModelForMainBundle(void)
[self _setBoolValue:experimentalNotificationsEnabled forKey:WebKitExperimentalNotificationsEnabledPreferenceKey];
}
-- (BOOL)experimentalWebSocketsEnabled
-{
- return [self _boolValueForKey:WebKitExperimentalWebSocketsEnabledPreferenceKey];
-}
-
-- (void)setExperimentalWebSocketsEnabled:(BOOL)experimentalWebSocketsEnabled
-{
- [self _setBoolValue:experimentalWebSocketsEnabled forKey:WebKitExperimentalWebSocketsEnabledPreferenceKey];
-}
-
+ (WebPreferences *)_getInstanceForIdentifier:(NSString *)ident
{
LOG(Encoding, "requesting for %@\n", ident);
@@ -1173,16 +1161,6 @@ static NSString *classIBCreatorID = nil;
[self _setBoolValue:enabled forKey:WebKitWebGLEnabledPreferenceKey];
}
-- (BOOL)pluginHalterEnabled
-{
- return [self _boolValueForKey:WebKitPluginHalterEnabledPreferenceKey];
-}
-
-- (void)setPluginHalterEnabled:(BOOL)enabled
-{
- [self _setBoolValue:enabled forKey:WebKitPluginHalterEnabledPreferenceKey];
-}
-
- (unsigned)pluginAllowedRunTime
{
return [self _integerValueForKey:WebKitPluginAllowedRunTimePreferenceKey];
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index 6a25921..c558cbb 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -110,12 +110,6 @@ extern NSString *WebPreferencesRemovedNotification;
- (BOOL)experimentalNotificationsEnabled;
- (void)setExperimentalNotificationsEnabled:(BOOL)notificationsEnabled;
-- (BOOL)experimentalWebSocketsEnabled;
-- (void)setExperimentalWebSocketsEnabled:(BOOL)websocketsEnabled;
-
-- (BOOL)pluginHalterEnabled;
-- (void)setPluginHalterEnabled:(BOOL)enabled;
-
- (unsigned)pluginAllowedRunTime;
- (void)setPluginAllowedRunTime:(unsigned)allowedRunTime;
diff --git a/WebKit/mac/WebView/WebResourceLoadDelegate.h b/WebKit/mac/WebView/WebResourceLoadDelegate.h
index f92466b..77d84ad 100644
--- a/WebKit/mac/WebView/WebResourceLoadDelegate.h
+++ b/WebKit/mac/WebView/WebResourceLoadDelegate.h
@@ -67,7 +67,7 @@
- (id)webView:(WebView *)sender identifierForInitialRequest:(NSURLRequest *)request fromDataSource:(WebDataSource *)dataSource;
/*!
- @method resource:willSendRequest:redirectResponse:fromDataSource:
+ @method webView:resource:willSendRequest:redirectResponse:fromDataSource:
@discussion This message is sent before a load is initiated. The request may be modified
as necessary by the receiver.
@param webView The WebView sending the message.
diff --git a/WebKit/mac/WebView/WebScriptDebugDelegate.mm b/WebKit/mac/WebView/WebScriptDebugDelegate.mm
index 8489c9b..ef2cb67 100644
--- a/WebKit/mac/WebView/WebScriptDebugDelegate.mm
+++ b/WebKit/mac/WebView/WebScriptDebugDelegate.mm
@@ -249,7 +249,7 @@ NSString * const WebScriptErrorLineNumberKey = @"WebScriptErrorLineNumber";
}
JSValue exception;
- JSValue result = _private->debuggerCallFrame->evaluate(String(script), exception);
+ JSValue result = DebuggerCallFrame_evaluateInWorld(*_private->debuggerCallFrame, String(script), exception);
if (exception)
return [self _convertValueToObjcValue:exception];
return result ? [self _convertValueToObjcValue:result] : nil;
diff --git a/WebKit/mac/WebView/WebTextCompletionController.mm b/WebKit/mac/WebView/WebTextCompletionController.mm
index 6c37b98..4f8e6e0 100644
--- a/WebKit/mac/WebView/WebTextCompletionController.mm
+++ b/WebKit/mac/WebView/WebTextCompletionController.mm
@@ -298,7 +298,8 @@ using namespace std;
- (void)_reflectSelection
{
int selectedRow = [_tableView selectedRow];
- ASSERT(selectedRow >= 0 && selectedRow < (int)[_completions count]);
+ ASSERT(selectedRow >= 0);
+ ASSERT(selectedRow < (int)[_completions count]);
[self _insertMatch:[_completions objectAtIndex:selectedRow]];
}
diff --git a/WebKit/mac/WebView/WebVideoFullscreenController.mm b/WebKit/mac/WebView/WebVideoFullscreenController.mm
index 6592ad2..fe07f3e 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenController.mm
+++ b/WebKit/mac/WebView/WebVideoFullscreenController.mm
@@ -42,6 +42,10 @@
SOFT_LINK_FRAMEWORK(QTKit)
SOFT_LINK_CLASS(QTKit, QTMovieView)
+SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *)
+
+#define QTMovieRateDidChangeNotification getQTMovieRateDidChangeNotification()
+
@interface WebVideoFullscreenWindow : NSWindow
#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_TIGER)
<NSAnimationDelegate>
@@ -76,6 +80,7 @@ SOFT_LINK_CLASS(QTKit, QTMovieView)
{
ASSERT(!_backgroundFullscreenWindow);
ASSERT(!_fadeAnimation);
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
@@ -109,7 +114,15 @@ SOFT_LINK_CLASS(QTKit, QTMovieView)
_mediaElement = mediaElement;
if ([self isWindowLoaded]) {
QTMovieView *movieView = [[self fullscreenWindow] movieView];
- [movieView setMovie:_mediaElement->platformMedia().qtMovie];
+ QTMovie *movie = _mediaElement->platformMedia().qtMovie;
+
+ ASSERT(movieView);
+ ASSERT(movie);
+ [movieView setMovie:movie];
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(rateChanged:)
+ name:QTMovieRateDidChangeNotification
+ object:movie];
}
}
@@ -135,6 +148,9 @@ SOFT_LINK_CLASS(QTKit, QTMovieView)
- (void)windowDidExitFullscreen
{
+ // If we don't clear the movie, underlying movie data structures are leaked and the movie keeps playing <rdar://problem/7295070>
+ [[[self fullscreenWindow] movieView] setMovie:nil];
+
[self clearFadeAnimation];
[[self window] close];
[self setWindow:nil];
@@ -264,14 +280,21 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
#pragma mark -
#pragma mark Window callback
+- (void)_requestExit
+{
+ if (_mediaElement)
+ _mediaElement->exitFullscreen();
+ _forceDisableAnimation = NO;
+}
+
- (void)requestExitFullscreenWithAnimation:(BOOL)animation
{
if (_isEndingFullscreen)
return;
_forceDisableAnimation = !animation;
- _mediaElement->exitFullscreen();
- _forceDisableAnimation = NO;
+ [self performSelector:@selector(_requestExit) withObject:nil afterDelay:0];
+
}
- (void)requestExitFullscreen
@@ -283,6 +306,16 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
{
[_hudController fadeWindowIn];
}
+
+#pragma mark -
+#pragma mark QTMovie callbacks
+
+- (void)rateChanged:(NSNotification *)unusedNotification
+{
+ UNUSED_PARAM(unusedNotification);
+ [_hudController updateRate];
+}
+
@end
@implementation WebVideoFullscreenWindow
@@ -439,6 +472,7 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
[super resignKeyWindow];
[[self windowController] requestExitFullscreenWithAnimation:NO];
}
+
@end
#endif /* ENABLE(VIDEO) */
diff --git a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.h b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.h
index 8b06c1c..1ffa596 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.h
+++ b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.h
@@ -38,6 +38,7 @@
NSTrackingArea *_area;
#endif
BOOL _mouseIsInHUD;
+ BOOL _isEndingFullscreen;
NSControl *_timeline;
NSTextField *_remainingTimeText;
@@ -50,6 +51,7 @@
- (void)fadeWindowIn;
- (void)fadeWindowOut;
- (void)closeWindow;
+- (void)updateRate;
@end
diff --git a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
index 2edfccc..c61ae7c 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
+++ b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
@@ -31,11 +31,16 @@
#import "WebKitSystemInterface.h"
#import "WebTypesInternal.h"
#import <wtf/RetainPtr.h>
+#import <limits>
+
+using namespace std;
#define HAVE_MEDIA_CONTROL (!defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD))
@interface WebVideoFullscreenHUDWindowController (Private) <NSWindowDelegate>
+- (void)keyDown:(NSEvent *)event;
+
- (void)updateTime;
- (void)timelinePositionChanged:(id)sender;
- (float)currentTime;
@@ -47,7 +52,7 @@
- (double)volume;
- (void)setVolume:(double)volume;
-- (void)playingChanged:(id)sender;
+- (void)togglePlaying:(id)sender;
- (BOOL)playing;
- (void)setPlaying:(BOOL)playing;
@@ -112,6 +117,23 @@
[[self windowController] fadeWindowIn];
}
+- (BOOL)resignFirstResponder
+{
+ return NO;
+}
+
+- (BOOL)performKeyEquivalent:(NSEvent *)event
+{
+ // Block all command key events while the fullscreen window is up.
+ if ([event type] != NSKeyDown)
+ return NO;
+
+ if (!([event modifierFlags] & NSCommandKeyMask))
+ return NO;
+
+ return YES;
+}
+
@end
//
@@ -162,11 +184,19 @@ static const NSTimeInterval HUDWindowFadeOutDelay = 3;
}
#endif
+- (void)keyDown:(NSEvent *)event
+{
+ if ([[event characters] isEqualToString:@" "])
+ [_playButton performClick:self];
+ else
+ [super keyDown:event];
+}
+
- (id<WebVideoFullscreenHUDWindowControllerDelegate>)delegate
{
return _delegate;
}
-
+
- (void)setDelegate:(id<WebVideoFullscreenHUDWindowControllerDelegate>)delegate
{
_delegate = delegate;
@@ -178,6 +208,7 @@ static const NSTimeInterval HUDWindowFadeOutDelay = 3;
// First, update right away, then schedule future update
[self updateTime];
+ [self updateRate];
[_timelineUpdateTimer invalidate];
[_timelineUpdateTimer release];
@@ -311,7 +342,7 @@ static NSTextField *createTimeTextField(NSRect frame)
CGFloat center = (windowWidth - kButtonSize) / 2;
_playButton = createControlWithMediaUIControlType(WKMediaUIControlPlayPauseButton, NSMakeRect(center, top - kButtonSize, kButtonSize, kButtonSize));
[_playButton setTarget:self];
- [_playButton setAction:@selector(playingChanged:)];
+ [_playButton setAction:@selector(togglePlaying:)];
[contentView addSubview:_playButton];
CGFloat closeToRight = windowWidth - 2 * kMargin - kButtonMiniSize;
@@ -324,6 +355,8 @@ static NSTextField *createTimeTextField(NSRect frame)
CGFloat left = kMargin;
NSControl *volumeDownButton = createControlWithMediaUIControlType(WKMediaUIControlVolumeDownButton, NSMakeRect(left, top - kButtonSize / 2 - kButtonMiniSize / 2, kButtonMiniSize, kButtonMiniSize));
[contentView addSubview:volumeDownButton];
+ [volumeDownButton setTarget:self];
+ [volumeDownButton setAction:@selector(decrementVolume:)];
[volumeDownButton release];
static const int volumeSliderWidth = 50;
@@ -336,9 +369,11 @@ static NSTextField *createTimeTextField(NSRect frame)
[contentView addSubview:_volumeSlider];
left = kMargin + kButtonMiniSize + volumeSliderWidth + kButtonMiniSize / 2;
- NSControl *button = createControlWithMediaUIControlType(WKMediaUIControlVolumeUpButton, NSMakeRect(left, top - kButtonSize / 2 - kButtonMiniSize / 2, kButtonMiniSize, kButtonMiniSize));
- [contentView addSubview:button];
- [button release];
+ NSControl *volumeUpButton = createControlWithMediaUIControlType(WKMediaUIControlVolumeUpButton, NSMakeRect(left, top - kButtonSize / 2 - kButtonMiniSize / 2, kButtonMiniSize, kButtonMiniSize));
+ [volumeUpButton setTarget:self];
+ [volumeUpButton setAction:@selector(incrementVolume:)];
+ [contentView addSubview:volumeUpButton];
+ [volumeUpButton release];
static const int timeTextWidth = 50;
static const int sliderHeight = 13;
@@ -426,6 +461,24 @@ static NSTextField *createTimeTextField(NSRect frame)
[self setVolume:[_volumeSlider doubleValue]];
}
+- (void)decrementVolume:(id)sender
+{
+ if (![_delegate mediaElement])
+ return;
+
+ double volume = [self volume] - 10;
+ [self setVolume:max(volume, 0.)];
+}
+
+- (void)incrementVolume:(id)sender
+{
+ if (![_delegate mediaElement])
+ return;
+
+ double volume = [self volume] + 10;
+ [self setVolume:min(volume, [self maxVolume])];
+}
+
- (double)volume
{
return [_delegate mediaElement] ? [_delegate mediaElement]->volume() * [self maxVolume] : 0;
@@ -436,15 +489,23 @@ static NSTextField *createTimeTextField(NSRect frame)
if (![_delegate mediaElement])
return;
WebCore::ExceptionCode e;
+ if ([_delegate mediaElement]->muted())
+ [_delegate mediaElement]->setMuted(false);
[_delegate mediaElement]->setVolume(volume / [self maxVolume], e);
}
-- (void)playingChanged:(id)sender
+- (void)updateRate
{
- [self setPlaying:![self playing]];
-
+ [_playButton setIntValue:[self playing]];
+}
+
+- (void)togglePlaying:(id)sender
+{
+ BOOL nowPlaying = [self playing];
+ [self setPlaying:!nowPlaying];
+
// Keep HUD visible when paused
- if (![self playing])
+ if (!nowPlaying)
[self fadeWindowIn];
else if (!_mouseIsInHUD) {
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(fadeWindowOut) object:nil];
@@ -560,6 +621,9 @@ static NSString *stringToTimeTextAttributed(NSString *string, NSTextAlignment al
- (void)exitFullscreen:(id)sender
{
+ if (_isEndingFullscreen)
+ return;
+ _isEndingFullscreen = YES;
[_delegate requestExitFullscreen];
}
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 83c7e20..25da631 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -34,6 +34,7 @@
#import "DOMNodeInternal.h"
#import "DOMRangeInternal.h"
#import "WebBackForwardListInternal.h"
+#import "WebBaseNetscapePluginView.h"
#import "WebCache.h"
#import "WebChromeClient.h"
#import "WebContextMenuClient.h"
@@ -124,6 +125,7 @@
#import <WebCore/PageGroup.h>
#import <WebCore/PlatformMouseEvent.h>
#import <WebCore/ProgressTracker.h>
+#import <WebCore/RenderWidget.h>
#import <WebCore/ResourceHandle.h>
#import <WebCore/RuntimeApplicationChecks.h>
#import <WebCore/ScriptController.h>
@@ -158,12 +160,6 @@
#import <WebKit/WebDashboardRegion.h>
#endif
-@class NSTextInputContext;
-
-@interface NSResponder (WebNSResponderDetails)
-- (NSTextInputContext *)inputContext;
-@end
-
@interface NSSpellChecker (WebNSSpellCheckerDetails)
- (void)_preflightChosenSpellServer;
@end
@@ -330,19 +326,10 @@ macro(yankAndSelect) \
static BOOL s_didSetCacheModel;
static WebCacheModel s_cacheModel = WebCacheModelDocumentViewer;
-static WebView *lastMouseoverView;
-
#ifndef NDEBUG
static const char webViewIsOpen[] = "At least one WebView is still open.";
#endif
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
-@interface NSObject (NSTextInputContextDetails)
-- (BOOL)wantsToHandleMouseEvents;
-- (BOOL)handleMouseEvent:(NSEvent *)event;
-@end
-#endif
-
@interface NSObject (WebValidateWithoutDelegate)
- (BOOL)validateUserInterfaceItemWithoutDelegate:(id <NSValidatedUserInterfaceItem>)item;
@end
@@ -357,7 +344,6 @@ static const char webViewIsOpen[] = "At least one WebView is still open.";
@end
@interface WebView (WebFileInternal)
-- (WebFrame *)_selectedOrMainFrame;
- (BOOL)_isLoading;
- (WebFrameView *)_frameViewAtWindowPoint:(NSPoint)point;
- (WebFrame *)_focusedFrame;
@@ -985,8 +971,7 @@ static bool fastDocumentTeardownEnabled()
if (!_private || _private->closed)
return;
- if (lastMouseoverView == self)
- lastMouseoverView = nil;
+ [self _closingEventHandling];
#ifndef NDEBUG
WTF::RefCountedLeakCounter::cancelMessageSuppression(webViewIsOpen);
@@ -1187,7 +1172,7 @@ static bool fastDocumentTeardownEnabled()
// If this item is showing , save away its current scroll and form state,
// since that might have changed since loading and it is normally not saved
// until we leave that page.
- otherView->_private->page->mainFrame()->loader()->saveDocumentAndScrollState();
+ otherView->_private->page->mainFrame()->loader()->history()->saveDocumentAndScrollState();
}
RefPtr<HistoryItem> newItem = otherBackForwardList->itemAtIndex(i)->copy();
if (i == 0)
@@ -1282,7 +1267,6 @@ static bool fastDocumentTeardownEnabled()
settings->setDatabasesEnabled([preferences databasesEnabled]);
settings->setLocalStorageEnabled([preferences localStorageEnabled]);
settings->setExperimentalNotificationsEnabled([preferences experimentalNotificationsEnabled]);
- settings->setExperimentalWebSocketsEnabled([preferences experimentalWebSocketsEnabled]);
settings->setPrivateBrowsingEnabled([preferences privateBrowsingEnabled]);
settings->setSansSerifFontFamily([preferences sansSerifFontFamily]);
settings->setSerifFontFamily([preferences serifFontFamily]);
@@ -1317,7 +1301,6 @@ static bool fastDocumentTeardownEnabled()
settings->setXSSAuditorEnabled([preferences isXSSAuditorEnabled]);
settings->setEnforceCSSMIMETypeInStrictMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1));
settings->setAcceleratedCompositingEnabled([preferences acceleratedCompositingEnabled]);
- settings->setPluginHalterEnabled([preferences pluginHalterEnabled]);
settings->setPluginAllowedRunTime([preferences pluginAllowedRunTime]);
settings->setWebGLEnabled([preferences webGLEnabled]);
}
@@ -1421,6 +1404,7 @@ static inline IMP getMethod(id o, SEL s)
cache->clientRedirectFunc = getMethod(delegate, @selector(webView:didPerformClientRedirectFromURL:toURL:inFrame:));
cache->serverRedirectFunc = getMethod(delegate, @selector(webView:didPerformServerRedirectFromURL:toURL:inFrame:));
cache->setTitleFunc = getMethod(delegate, @selector(webView:updateHistoryTitle:forURL:));
+ cache->populateVisitedLinksFunc = getMethod(delegate, @selector(populateVisitedLinksForWebView:));
}
- (id)_policyDelegateForwarder
@@ -2114,6 +2098,47 @@ static inline IMP getMethod(id o, SEL s)
#endif
}
+static WebBaseNetscapePluginView *_pluginViewForNode(DOMNode *node)
+{
+ if (!node)
+ return nil;
+
+ Node* coreNode = core(node);
+ if (!coreNode)
+ return nil;
+
+ RenderObject* renderer = coreNode->renderer();
+ if (!renderer || !renderer->isWidget())
+ return nil;
+
+ Widget* widget = toRenderWidget(renderer)->widget();
+ if (!widget || !widget->platformWidget())
+ return nil;
+
+ NSView *view = widget->platformWidget();
+ if (![view isKindOfClass:[WebBaseNetscapePluginView class]])
+ return nil;
+
+ return (WebBaseNetscapePluginView *)view;
+}
+
++ (BOOL)_isNodeHaltedPlugin:(DOMNode *)node
+{
+ return [_pluginViewForNode(node) isHalted];
+}
+
++ (BOOL)_hasPluginForNodeBeenHalted:(DOMNode *)node
+{
+ return [_pluginViewForNode(node) hasBeenHalted];
+}
++ (void)_restartHaltedPluginForNode:(DOMNode *)node
+{
+ if (!node)
+ return;
+
+ [_pluginViewForNode(node) resumeFromHalt];
+}
+
- (NSPasteboard *)_insertionPasteboard
{
return _private ? _private->insertionPasteboard : nil;
@@ -2150,7 +2175,7 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
return patternsVector;
}
-+ (void)_addUserScriptToGroup:(NSString *)groupName source:(NSString *)source url:(NSURL *)url worldID:(unsigned)worldID
++ (void)_addUserScriptToGroup:(NSString *)groupName worldID:(unsigned)worldID source:(NSString *)source url:(NSURL *)url
whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist injectionTime:(WebUserScriptInjectionTime)injectionTime
{
String group(groupName);
@@ -2161,11 +2186,11 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
if (!pageGroup)
return;
- pageGroup->addUserScript(source, url, toStringVector(whitelist), toStringVector(blacklist), worldID,
- injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd);
+ pageGroup->addUserScriptToWorld(worldID, source, url, toStringVector(whitelist), toStringVector(blacklist),
+ injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd);
}
-+ (void)_addUserStyleSheetToGroup:(NSString *)groupName source:(NSString *)source url:(NSURL *)url worldID:(unsigned)worldID
++ (void)_addUserStyleSheetToGroup:(NSString *)groupName worldID:(unsigned)worldID source:(NSString *)source url:(NSURL *)url
whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist
{
String group(groupName);
@@ -2176,10 +2201,23 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
if (!pageGroup)
return;
- pageGroup->addUserStyleSheet(source, url, toStringVector(whitelist), toStringVector(blacklist), worldID);
+ pageGroup->addUserStyleSheetToWorld(worldID, source, url, toStringVector(whitelist), toStringVector(blacklist));
+}
+
++ (void)_removeUserScriptFromGroup:(NSString *)groupName worldID:(unsigned)worldID url:(NSURL *)url
+{
+ String group(groupName);
+ if (group.isEmpty())
+ return;
+
+ PageGroup* pageGroup = PageGroup::pageGroup(group);
+ if (!pageGroup)
+ return;
+
+ pageGroup->removeUserScriptFromWorld(worldID, url);
}
-+ (void)_removeUserContentFromGroup:(NSString *)groupName url:(NSURL *)url worldID:(unsigned)worldID
++ (void)_removeUserStyleSheetFromGroup:(NSString *)groupName worldID:(unsigned)worldID url:(NSURL *)url
{
String group(groupName);
if (group.isEmpty())
@@ -2189,10 +2227,10 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
if (!pageGroup)
return;
- pageGroup->removeUserContentWithURLForWorld(url, worldID);
+ pageGroup->removeUserStyleSheetFromWorld(worldID, url);
}
-+ (void)_removeUserContentFromGroup:(NSString *)groupName worldID:(unsigned)worldID
++ (void)_removeUserScriptsFromGroup:(NSString *)groupName worldID:(unsigned)worldID
{
String group(groupName);
if (group.isEmpty())
@@ -2202,7 +2240,20 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
if (!pageGroup)
return;
- pageGroup->removeUserContentForWorld(worldID);
+ pageGroup->removeUserScriptsFromWorld(worldID);
+}
+
++ (void)_removeUserStyleSheetsFromGroup:(NSString *)groupName worldID:(unsigned)worldID
+{
+ String group(groupName);
+ if (group.isEmpty())
+ return;
+
+ PageGroup* pageGroup = PageGroup::pageGroup(group);
+ if (!pageGroup)
+ return;
+
+ pageGroup->removeUserStyleSheetsFromWorld(worldID);
}
+ (void)_removeAllUserContentFromGroup:(NSString *)groupName
@@ -3569,87 +3620,6 @@ static WebFrame *incrementFrame(WebFrame *frame, BOOL forward, BOOL wrapFlag)
return [previousView previousValidKeyView];
}
-- (void)mouseDown:(NSEvent *)event
-{
- // FIXME (Viewless): This method should be shared with WebHTMLView, which needs to
- // do the same work in the usesDocumentViews case. We don't want to maintain two
- // duplicate copies of this method.
-
- if (_private->usesDocumentViews) {
- [super mouseDown:event];
- return;
- }
-
- // There's a chance that responding to this event will run a nested event loop, and
- // fetching a new event might release the old one. Retaining and then autoreleasing
- // the current event prevents that from causing a problem inside WebKit or AppKit code.
- [[event retain] autorelease];
-
- RetainPtr<WebView> protector = self;
- if ([[self inputContext] wantsToHandleMouseEvents] && [[self inputContext] handleMouseEvent:event])
- return;
-
- _private->handlingMouseDownEvent = YES;
-
- // Record the mouse down position so we can determine drag hysteresis.
- [self _setMouseDownEvent:event];
-
- NSInputManager *currentInputManager = [NSInputManager currentInputManager];
- if ([currentInputManager wantsToHandleMouseEvents] && [currentInputManager handleMouseEvent:event])
- goto done;
-
- [_private->completionController endRevertingChange:NO moveLeft:NO];
-
- // If the web page handles the context menu event and menuForEvent: returns nil, we'll get control click events here.
- // We don't want to pass them along to KHTML a second time.
- if (!([event modifierFlags] & NSControlKeyMask)) {
- _private->ignoringMouseDraggedEvents = NO;
-
- // Don't do any mouseover while the mouse is down.
- [self _cancelUpdateMouseoverTimer];
-
- // Let WebCore get a chance to deal with the event. This will call back to us
- // to start the autoscroll timer if appropriate.
- if (Frame* frame = [self _mainCoreFrame])
- frame->eventHandler()->mouseDown(event);
- }
-
-done:
- _private->handlingMouseDownEvent = NO;
-}
-
-- (void)mouseUp:(NSEvent *)event
-{
- // FIXME (Viewless): This method should be shared with WebHTMLView, which needs to
- // do the same work in the usesDocumentViews case. We don't want to maintain two
- // duplicate copies of this method.
-
- if (_private->usesDocumentViews) {
- [super mouseUp:event];
- return;
- }
-
- // There's a chance that responding to this event will run a nested event loop, and
- // fetching a new event might release the old one. Retaining and then autoreleasing
- // the current event prevents that from causing a problem inside WebKit or AppKit code.
- [[event retain] autorelease];
-
- [self _setMouseDownEvent:nil];
-
- NSInputManager *currentInputManager = [NSInputManager currentInputManager];
- if ([currentInputManager wantsToHandleMouseEvents] && [currentInputManager handleMouseEvent:event])
- return;
-
- [self retain];
-
- [self _stopAutoscrollTimer];
- if (Frame* frame = [self _mainCoreFrame])
- frame->eventHandler()->mouseUp(event);
- [self _updateMouseoverWithFakeEvent];
-
- [self release];
-}
-
@end
@implementation WebView (WebIBActions)
@@ -4051,9 +4021,8 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
JSObject* object = jsValue.getObject();
if (object->inherits(&DateInstance::info)) {
DateInstance* date = static_cast<DateInstance*>(object);
- double ms = 0;
- int tzOffset = 0;
- if (date->getTime(ms, tzOffset)) {
+ double ms = date->internalNumber();
+ if (!isnan(ms)) {
CFAbsoluteTime utcSeconds = ms / 1000 - kCFAbsoluteTimeIntervalSince1970;
LongDateTime ldt;
if (noErr == UCConvertCFAbsoluteTimeToLongDateTime(utcSeconds, &ldt))
@@ -4095,11 +4064,11 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
return nil;
if (!coreFrame->document())
return nil;
- JSValue result = coreFrame->loader()->executeScript(script, true).jsValue();
+ JSValue result = coreFrame->script()->executeScript(script, true).jsValue();
if (!result) // FIXME: pass errors
return 0;
JSLock lock(SilenceAssertionsOnly);
- return aeDescFromJSValue(coreFrame->script()->globalObject()->globalExec(), result);
+ return aeDescFromJSValue(coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec(), result);
}
- (BOOL)canMarkAllTextMatches
@@ -4257,6 +4226,24 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
return _private->page->mediaVolume();
}
+- (void)addVisitedLinks:(NSArray *)visitedLinks
+{
+ PageGroup& group = core(self)->group();
+
+ NSEnumerator *enumerator = [visitedLinks objectEnumerator];
+ while (NSString *url = [enumerator nextObject]) {
+ size_t length = [url length];
+ const UChar* characters = CFStringGetCharactersPtr(reinterpret_cast<CFStringRef>(url));
+ if (characters)
+ group.addVisitedLink(characters, length);
+ else {
+ Vector<UChar, 512> buffer(length);
+ [url getCharacters:buffer.data()];
+ group.addVisitedLink(buffer.data(), length);
+ }
+ }
+}
+
@end
@implementation WebView (WebViewPrintingPrivate)
@@ -5123,14 +5110,6 @@ static WebFrameView *containingFrameView(NSView *view)
return nil;
}
-- (WebFrame *)_selectedOrMainFrame
-{
- WebFrame *result = [self selectedFrame];
- if (result == nil)
- result = [self mainFrame];
- return result;
-}
-
- (BOOL)_isLoading
{
WebFrame *mainFrame = [self mainFrame];
@@ -5401,102 +5380,6 @@ static WebFrameView *containingFrameView(NSView *view)
_private->insertionPasteboard = pasteboard;
}
-- (void)_setMouseDownEvent:(NSEvent *)event
-{
- ASSERT(!event || [event type] == NSLeftMouseDown || [event type] == NSRightMouseDown || [event type] == NSOtherMouseDown);
-
- if (event == _private->mouseDownEvent)
- return;
-
- [event retain];
- [_private->mouseDownEvent release];
- _private->mouseDownEvent = event;
-}
-
-- (void)_cancelUpdateMouseoverTimer
-{
- if (_private->updateMouseoverTimer) {
- CFRunLoopTimerInvalidate(_private->updateMouseoverTimer);
- CFRelease(_private->updateMouseoverTimer);
- _private->updateMouseoverTimer = NULL;
- }
-}
-
-- (void)_stopAutoscrollTimer
-{
- NSTimer *timer = _private->autoscrollTimer;
- _private->autoscrollTimer = nil;
- [_private->autoscrollTriggerEvent release];
- _private->autoscrollTriggerEvent = nil;
- [timer invalidate];
- [timer release];
-}
-
-+ (void)_updateMouseoverWithEvent:(NSEvent *)event
-{
- WebView *oldView = lastMouseoverView;
-
- lastMouseoverView = nil;
-
- NSView *contentView = [[event window] contentView];
- NSPoint locationForHitTest = [[contentView superview] convertPoint:[event locationInWindow] fromView:nil];
- for (NSView *hitView = [contentView hitTest:locationForHitTest]; hitView; hitView = [hitView superview]) {
- if ([hitView isKindOfClass:[WebView class]]) {
- lastMouseoverView = static_cast<WebView *>(hitView);
- break;
- }
- }
-
- if (lastMouseoverView && lastMouseoverView->_private->hoverFeedbackSuspended)
- lastMouseoverView = nil;
-
- if (lastMouseoverView != oldView) {
- if (Frame* oldCoreFrame = [oldView _mainCoreFrame]) {
- NSEvent *oldViewEvent = [NSEvent mouseEventWithType:NSMouseMoved
- location:NSMakePoint(-1, -1)
- modifierFlags:[[NSApp currentEvent] modifierFlags]
- timestamp:[NSDate timeIntervalSinceReferenceDate]
- windowNumber:[[oldView window] windowNumber]
- context:[[NSApp currentEvent] context]
- eventNumber:0 clickCount:0 pressure:0];
- oldCoreFrame->eventHandler()->mouseMoved(oldViewEvent);
- }
- }
-
- if (!lastMouseoverView)
- return;
-
- if (Frame* coreFrame = core([lastMouseoverView mainFrame]))
- coreFrame->eventHandler()->mouseMoved(event);
-}
-
-- (void)_updateMouseoverWithFakeEvent
-{
- [self _cancelUpdateMouseoverTimer];
-
- NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved
- location:[[self window] convertScreenToBase:[NSEvent mouseLocation]]
- modifierFlags:[[NSApp currentEvent] modifierFlags]
- timestamp:[NSDate timeIntervalSinceReferenceDate]
- windowNumber:[[self window] windowNumber]
- context:[[NSApp currentEvent] context]
- eventNumber:0 clickCount:0 pressure:0];
-
- [[self class] _updateMouseoverWithEvent:fakeEvent];
-}
-
-- (void)_setToolTip:(NSString *)toolTip
-{
- if (_private->usesDocumentViews) {
- id documentView = [[[self _selectedOrMainFrame] frameView] documentView];
- if ([documentView isKindOfClass:[WebHTMLView class]])
- [documentView _setToolTip:toolTip];
- return;
- }
-
- // FIXME (Viewless): Code to handle tooltips needs to move into WebView.
-}
-
- (void)_selectionChanged
{
if (_private->usesDocumentViews) {
@@ -5514,6 +5397,14 @@ static WebFrameView *containingFrameView(NSView *view)
return (_private && _private->page) ? _private->page->mainFrame() : 0;
}
+- (WebFrame *)_selectedOrMainFrame
+{
+ WebFrame *result = [self selectedFrame];
+ if (result == nil)
+ result = [self mainFrame];
+ return result;
+}
+
#if USE(ACCELERATED_COMPOSITING)
- (BOOL)_needsOneShotDrawingSynchronization
@@ -5653,6 +5544,8 @@ static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActi
- (void)_exitFullscreen
{
+ if (!_private->fullscreenController)
+ return;
[_private->fullscreenController exitFullscreen];
[_private->fullscreenController release];
_private->fullscreenController = nil;
diff --git a/WebKit/mac/WebView/WebViewEventHandling.mm b/WebKit/mac/WebView/WebViewEventHandling.mm
new file mode 100644
index 0000000..a185667
--- /dev/null
+++ b/WebKit/mac/WebView/WebViewEventHandling.mm
@@ -0,0 +1,240 @@
+/*
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006 David Smith (catfish.man@gmail.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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE 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 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.
+ */
+
+#import "WebViewInternal.h"
+
+#import "WebFrameInternal.h"
+#import "WebHTMLView.h"
+#import "WebTextCompletionController.h"
+#import "WebViewData.h"
+#import <WebCore/Frame.h>
+
+using namespace WebCore;
+
+@class NSTextInputContext;
+
+@interface NSResponder (WebNSResponderDetails)
+- (NSTextInputContext *)inputContext;
+@end
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+@interface NSObject (NSTextInputContextDetails)
+- (BOOL)wantsToHandleMouseEvents;
+- (BOOL)handleMouseEvent:(NSEvent *)event;
+@end
+#endif
+
+@implementation WebView (WebViewEventHandling)
+
+static WebView *lastMouseoverView;
+
+- (void)_closingEventHandling
+{
+ if (lastMouseoverView == self)
+ lastMouseoverView = nil;
+}
+
+- (void)_setMouseDownEvent:(NSEvent *)event
+{
+ ASSERT(!event || [event type] == NSLeftMouseDown || [event type] == NSRightMouseDown || [event type] == NSOtherMouseDown);
+
+ if (event == _private->mouseDownEvent)
+ return;
+
+ [event retain];
+ [_private->mouseDownEvent release];
+ _private->mouseDownEvent = event;
+}
+
+- (void)mouseDown:(NSEvent *)event
+{
+ // FIXME (Viewless): This method should be shared with WebHTMLView, which needs to
+ // do the same work in the usesDocumentViews case. We don't want to maintain two
+ // duplicate copies of this method.
+
+ if (_private->usesDocumentViews) {
+ [super mouseDown:event];
+ return;
+ }
+
+ // There's a chance that responding to this event will run a nested event loop, and
+ // fetching a new event might release the old one. Retaining and then autoreleasing
+ // the current event prevents that from causing a problem inside WebKit or AppKit code.
+ [[event retain] autorelease];
+
+ RetainPtr<WebView> protector = self;
+ if ([[self inputContext] wantsToHandleMouseEvents] && [[self inputContext] handleMouseEvent:event])
+ return;
+
+ _private->handlingMouseDownEvent = YES;
+
+ // Record the mouse down position so we can determine drag hysteresis.
+ [self _setMouseDownEvent:event];
+
+ NSInputManager *currentInputManager = [NSInputManager currentInputManager];
+ if ([currentInputManager wantsToHandleMouseEvents] && [currentInputManager handleMouseEvent:event])
+ goto done;
+
+ [_private->completionController endRevertingChange:NO moveLeft:NO];
+
+ // If the web page handles the context menu event and menuForEvent: returns nil, we'll get control click events here.
+ // We don't want to pass them along to KHTML a second time.
+ if (!([event modifierFlags] & NSControlKeyMask)) {
+ _private->ignoringMouseDraggedEvents = NO;
+
+ // Don't do any mouseover while the mouse is down.
+ [self _cancelUpdateMouseoverTimer];
+
+ // Let WebCore get a chance to deal with the event. This will call back to us
+ // to start the autoscroll timer if appropriate.
+ if (Frame* frame = [self _mainCoreFrame])
+ frame->eventHandler()->mouseDown(event);
+ }
+
+done:
+ _private->handlingMouseDownEvent = NO;
+}
+
+- (void)mouseUp:(NSEvent *)event
+{
+ // FIXME (Viewless): This method should be shared with WebHTMLView, which needs to
+ // do the same work in the usesDocumentViews case. We don't want to maintain two
+ // duplicate copies of this method.
+
+ if (_private->usesDocumentViews) {
+ [super mouseUp:event];
+ return;
+ }
+
+ // There's a chance that responding to this event will run a nested event loop, and
+ // fetching a new event might release the old one. Retaining and then autoreleasing
+ // the current event prevents that from causing a problem inside WebKit or AppKit code.
+ [[event retain] autorelease];
+
+ [self _setMouseDownEvent:nil];
+
+ NSInputManager *currentInputManager = [NSInputManager currentInputManager];
+ if ([currentInputManager wantsToHandleMouseEvents] && [currentInputManager handleMouseEvent:event])
+ return;
+
+ [self retain];
+
+ [self _stopAutoscrollTimer];
+ if (Frame* frame = [self _mainCoreFrame])
+ frame->eventHandler()->mouseUp(event);
+ [self _updateMouseoverWithFakeEvent];
+
+ [self release];
+}
+
++ (void)_updateMouseoverWithEvent:(NSEvent *)event
+{
+ WebView *oldView = lastMouseoverView;
+
+ lastMouseoverView = nil;
+
+ NSView *contentView = [[event window] contentView];
+ NSPoint locationForHitTest = [[contentView superview] convertPoint:[event locationInWindow] fromView:nil];
+ for (NSView *hitView = [contentView hitTest:locationForHitTest]; hitView; hitView = [hitView superview]) {
+ if ([hitView isKindOfClass:[WebView class]]) {
+ lastMouseoverView = static_cast<WebView *>(hitView);
+ break;
+ }
+ }
+
+ if (lastMouseoverView && lastMouseoverView->_private->hoverFeedbackSuspended)
+ lastMouseoverView = nil;
+
+ if (lastMouseoverView != oldView) {
+ if (Frame* oldCoreFrame = [oldView _mainCoreFrame]) {
+ NSEvent *oldViewEvent = [NSEvent mouseEventWithType:NSMouseMoved
+ location:NSMakePoint(-1, -1)
+ modifierFlags:[[NSApp currentEvent] modifierFlags]
+ timestamp:[NSDate timeIntervalSinceReferenceDate]
+ windowNumber:[[oldView window] windowNumber]
+ context:[[NSApp currentEvent] context]
+ eventNumber:0 clickCount:0 pressure:0];
+ oldCoreFrame->eventHandler()->mouseMoved(oldViewEvent);
+ }
+ }
+
+ if (!lastMouseoverView)
+ return;
+
+ if (Frame* coreFrame = core([lastMouseoverView mainFrame]))
+ coreFrame->eventHandler()->mouseMoved(event);
+}
+
+- (void)_updateMouseoverWithFakeEvent
+{
+ [self _cancelUpdateMouseoverTimer];
+
+ NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved
+ location:[[self window] convertScreenToBase:[NSEvent mouseLocation]]
+ modifierFlags:[[NSApp currentEvent] modifierFlags]
+ timestamp:[NSDate timeIntervalSinceReferenceDate]
+ windowNumber:[[self window] windowNumber]
+ context:[[NSApp currentEvent] context]
+ eventNumber:0 clickCount:0 pressure:0];
+
+ [[self class] _updateMouseoverWithEvent:fakeEvent];
+}
+
+- (void)_cancelUpdateMouseoverTimer
+{
+ if (_private->updateMouseoverTimer) {
+ CFRunLoopTimerInvalidate(_private->updateMouseoverTimer);
+ CFRelease(_private->updateMouseoverTimer);
+ _private->updateMouseoverTimer = NULL;
+ }
+}
+
+- (void)_stopAutoscrollTimer
+{
+ NSTimer *timer = _private->autoscrollTimer;
+ _private->autoscrollTimer = nil;
+ [_private->autoscrollTriggerEvent release];
+ _private->autoscrollTriggerEvent = nil;
+ [timer invalidate];
+ [timer release];
+}
+
+- (void)_setToolTip:(NSString *)toolTip
+{
+ if (_private->usesDocumentViews) {
+ id documentView = [[[self _selectedOrMainFrame] frameView] documentView];
+ if ([documentView isKindOfClass:[WebHTMLView class]])
+ [documentView _setToolTip:toolTip];
+ return;
+ }
+
+ // FIXME (Viewless): Code to handle tooltips needs to move into WebView.
+}
+
+@end
diff --git a/WebKit/mac/WebView/WebViewInternal.h b/WebKit/mac/WebView/WebViewInternal.h
index 521aeee..15596db 100644
--- a/WebKit/mac/WebView/WebViewInternal.h
+++ b/WebKit/mac/WebView/WebViewInternal.h
@@ -65,6 +65,7 @@ namespace WebCore {
@interface WebView (WebViewInternal)
- (WebCore::Frame*)_mainCoreFrame;
+- (WebFrame *)_selectedOrMainFrame;
- (WebCore::String)_userAgentForURL:(const WebCore::KURL&)url;
- (WebCore::KeyboardUIMode)_keyboardUIMode;
@@ -76,12 +77,7 @@ namespace WebCore {
- (void)_dispatchDidReceiveIconFromWebFrame:(WebFrame *)webFrame;
#endif
-- (void)_setMouseDownEvent:(NSEvent *)event;
-- (void)_cancelUpdateMouseoverTimer;
-- (void)_stopAutoscrollTimer;
-- (void)_updateMouseoverWithFakeEvent;
- (void)_selectionChanged;
-- (void)_setToolTip:(NSString *)toolTip;
#if USE(ACCELERATED_COMPOSITING)
- (BOOL)_needsOneShotDrawingSynchronization;
@@ -95,6 +91,14 @@ namespace WebCore {
#endif
+@interface WebView (WebViewEventHandling)
+- (void)_closingEventHandling;
+- (void)_updateMouseoverWithFakeEvent;
+- (void)_cancelUpdateMouseoverTimer;
+- (void)_stopAutoscrollTimer;
+- (void)_setToolTip:(NSString *)toolTip;
+@end
+
// FIXME: Temporary way to expose methods that are in the wrong category inside WebView.
@interface WebView (WebViewOtherInternal)
diff --git a/WebKit/mac/WebView/WebViewPrivate.h b/WebKit/mac/WebView/WebViewPrivate.h
index fa5d28c..99bd5fa 100644
--- a/WebKit/mac/WebView/WebViewPrivate.h
+++ b/WebKit/mac/WebView/WebViewPrivate.h
@@ -200,6 +200,9 @@ typedef enum {
- (void)setMediaVolume:(float)volume;
- (float)mediaVolume;
+// Add visited links
+- (void)addVisitedLinks:(NSArray *)visitedLinks;
+
@end
@interface WebView (WebPrivate)
@@ -459,6 +462,11 @@ Could be worth adding to the API.
// SPI for DumpRenderTree
- (BOOL)_isUsingAcceleratedCompositing;
+// SPI for PluginHalter
++ (BOOL)_isNodeHaltedPlugin:(DOMNode *)node;
++ (BOOL)_hasPluginForNodeBeenHalted:(DOMNode *)node;
++ (void)_restartHaltedPluginForNode:(DOMNode *)node;
+
// Which pasteboard text is coming from in editing delegate methods such as shouldInsertNode.
- (NSPasteboard *)_insertionPasteboard;
@@ -471,10 +479,12 @@ Could be worth adding to the API.
// Removes all white list entries created with _whiteListAccessFromOrigin.
+ (void)_resetOriginAccessWhiteLists;
-+ (void)_addUserScriptToGroup:(NSString *)groupName source:(NSString *)source url:(NSURL *)url worldID:(unsigned)worldID whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist injectionTime:(WebUserScriptInjectionTime)injectionTime;
-+ (void)_addUserStyleSheetToGroup:(NSString *)groupName source:(NSString *)source url:(NSURL *)url worldID:(unsigned)worldID whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist;
-+ (void)_removeUserContentFromGroup:(NSString *)groupName url:(NSURL *)url worldID:(unsigned)worldID;
-+ (void)_removeUserContentFromGroup:(NSString *)groupName worldID:(unsigned)worldID;
++ (void)_addUserScriptToGroup:(NSString *)groupName worldID:(unsigned)worldID source:(NSString *)source url:(NSURL *)url whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist injectionTime:(WebUserScriptInjectionTime)injectionTime;
++ (void)_addUserStyleSheetToGroup:(NSString *)groupName worldID:(unsigned)worldID source:(NSString *)source url:(NSURL *)url whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist;
++ (void)_removeUserScriptFromGroup:(NSString *)groupName worldID:(unsigned)worldID url:(NSURL *)url;
++ (void)_removeUserStyleSheetFromGroup:(NSString *)groupName worldID:(unsigned)worldID url:(NSURL *)url;
++ (void)_removeUserScriptsFromGroup:(NSString *)groupName worldID:(unsigned)worldID;
++ (void)_removeUserStyleSheetsFromGroup:(NSString *)groupName worldID:(unsigned)worldID;
+ (void)_removeAllUserContentFromGroup:(NSString *)groupName;
/*!
diff --git a/WebKit/mac/WebView/WebWindowAnimation.h b/WebKit/mac/WebView/WebWindowAnimation.h
index c73dcce..ecf975b 100644
--- a/WebKit/mac/WebView/WebWindowAnimation.h
+++ b/WebKit/mac/WebView/WebWindowAnimation.h
@@ -46,7 +46,7 @@
@interface WebWindowFadeAnimation : NSAnimation {
@private
CGFloat _initialAlpha, _finalAlpha;
- NSWindow *_window; // (retain)
+ NSWindow *_window; // (assign)
BOOL _isStopped;
}
diff --git a/WebKit/mac/WebView/WebWindowAnimation.m b/WebKit/mac/WebView/WebWindowAnimation.m
index 3ab64bf..6eadb21 100644
--- a/WebKit/mac/WebView/WebWindowAnimation.m
+++ b/WebKit/mac/WebView/WebWindowAnimation.m
@@ -80,7 +80,6 @@ static CGFloat squaredDistance(NSPoint point1, NSPoint point2)
- (void) dealloc
{
- [_window release];
[_subAnimation release];
[super dealloc];
}
diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp
index c267745..50a0986 100644
--- a/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/WebKit/qt/Api/qgraphicswebview.cpp
@@ -1,5 +1,6 @@
/*
Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -44,14 +45,19 @@ public:
virtual void scroll(int dx, int dy, const QRect&);
virtual void update(const QRect& dirtyRect);
+ virtual void setInputMethodEnabled(bool enable);
+#if QT_VERSION >= 0x040600
+ virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable);
+#endif
#ifndef QT_NO_CURSOR
virtual QCursor cursor() const;
virtual void updateCursor(const QCursor& cursor);
#endif
+ virtual QPalette palette() const;
virtual int screenNumber() const;
- virtual WId winId() const;
+ virtual QWidget* ownerWidget() const;
virtual QObject* pluginParent() const;
@@ -96,6 +102,20 @@ void QGraphicsWebViewPrivate::update(const QRect & dirtyRect)
q->update(QRectF(dirtyRect));
}
+
+void QGraphicsWebViewPrivate::setInputMethodEnabled(bool enable)
+{
+ q->setAttribute(Qt::WA_InputMethodEnabled, enable);
+}
+#if QT_VERSION >= 0x040600
+void QGraphicsWebViewPrivate::setInputMethodHint(Qt::InputMethodHint hint, bool enable)
+{
+ if (enable)
+ q->setInputMethodHints(q->inputMethodHints() | hint);
+ else
+ q->setInputMethodHints(q->inputMethodHints() & ~hint);
+}
+#endif
#ifndef QT_NO_CURSOR
QCursor QGraphicsWebViewPrivate::cursor() const
{
@@ -108,6 +128,11 @@ void QGraphicsWebViewPrivate::updateCursor(const QCursor& cursor)
}
#endif
+QPalette QGraphicsWebViewPrivate::palette() const
+{
+ return q->palette();
+}
+
int QGraphicsWebViewPrivate::screenNumber() const
{
#if defined(Q_WS_X11)
@@ -120,14 +145,10 @@ int QGraphicsWebViewPrivate::screenNumber() const
return 0;
}
-WId QGraphicsWebViewPrivate::winId() const
+QWidget* QGraphicsWebViewPrivate::ownerWidget() const
{
const QList<QGraphicsView*> views = q->scene()->views();
-
- if (!views.isEmpty())
- return views.at(0)->winId();
-
- return 0;
+ return views.value(0);
}
QObject* QGraphicsWebViewPrivate::pluginParent() const
@@ -174,8 +195,14 @@ QGraphicsWebView::QGraphicsWebView(QGraphicsItem* parent)
*/
QGraphicsWebView::~QGraphicsWebView()
{
- if (d->page)
+ if (d->page) {
+#if QT_VERSION >= 0x040600
+ d->page->d->view.clear();
+#else
d->page->d->view = 0;
+#endif
+ d->page->d->client = 0; // unset the page client
+ }
if (d->page && d->page->parent() == this)
delete d->page;
@@ -223,26 +250,65 @@ bool QGraphicsWebView::sceneEvent(QEvent* event)
/*! \reimp
*/
+QVariant QGraphicsWebView::itemChange(GraphicsItemChange change, const QVariant& value)
+{
+ switch (change) {
+ // Differently from QWebView, it is interesting to QGraphicsWebView to handle
+ // post mouse cursor change notifications. Reason: 'ItemCursorChange' is sent
+ // as the first action in QGraphicsItem::setCursor implementation, and at that
+ // item widget's cursor has not been effectively changed yet.
+ // After cursor is properly set (at 'ItemCursorHasChanged' emission time), we
+ // fire 'CursorChange'.
+ case ItemCursorChange:
+ return value;
+ case ItemCursorHasChanged:
+ QEvent event(QEvent::CursorChange);
+ QApplication::sendEvent(this, &event);
+ return value;
+ }
+
+ return QGraphicsWidget::itemChange(change, value);
+}
+
+/*! \reimp
+*/
bool QGraphicsWebView::event(QEvent* event)
{
// Re-implemented in order to allows fixing event-related bugs in patch releases.
if (d->page) {
+#ifndef QT_NO_CONTEXTMENU
+ if (event->type() == QEvent::GraphicsSceneContextMenu) {
+ if (!isEnabled())
+ return false;
+
+ QGraphicsSceneContextMenuEvent* ev = static_cast<QGraphicsSceneContextMenuEvent*>(event);
+ QContextMenuEvent fakeEvent(QContextMenuEvent::Reason(ev->reason()), ev->pos().toPoint());
+ if (d->page->swallowContextMenuEvent(&fakeEvent)) {
+ event->accept();
+ return true;
+ }
+ d->page->updatePositionDependentActions(fakeEvent.pos());
+ } else
+#endif // QT_NO_CONTEXTMENU
+ {
#ifndef QT_NO_CURSOR
#if QT_VERSION >= 0x040400
- } else if (event->type() == QEvent::CursorChange) {
- // An unsetCursor will set the cursor to Qt::ArrowCursor.
- // Thus this cursor change might be a QWidget::unsetCursor()
- // If this is not the case and it came from WebCore, the
- // QWebPageClient already has set its cursor internally
- // to Qt::ArrowCursor, so updating the cursor is always
- // right, as it falls back to the last cursor set by
- // WebCore.
- // FIXME: Add a QEvent::CursorUnset or similar to Qt.
- if (cursor().shape() == Qt::ArrowCursor)
- d->resetCursor();
+ if (event->type() == QEvent::CursorChange) {
+ // An unsetCursor will set the cursor to Qt::ArrowCursor.
+ // Thus this cursor change might be a QWidget::unsetCursor()
+ // If this is not the case and it came from WebCore, the
+ // QWebPageClient already has set its cursor internally
+ // to Qt::ArrowCursor, so updating the cursor is always
+ // right, as it falls back to the last cursor set by
+ // WebCore.
+ // FIXME: Add a QEvent::CursorUnset or similar to Qt.
+ if (cursor().shape() == Qt::ArrowCursor)
+ d->resetCursor();
+ }
#endif
#endif
+ }
}
return QGraphicsWidget::event(event);
}
@@ -597,7 +663,6 @@ void QGraphicsWebView::hoverMoveEvent(QGraphicsSceneHoverEvent* ev)
QMouseEvent me = QMouseEvent(QEvent::MouseMove,
ev->pos().toPoint(), Qt::NoButton,
Qt::NoButton, Qt::NoModifier);
- d->page->setView(ev->widget());
d->page->event(&me);
ev->setAccepted(accepted);
}
diff --git a/WebKit/qt/Api/qgraphicswebview.h b/WebKit/qt/Api/qgraphicswebview.h
index 26f7374..43cf59a 100644
--- a/WebKit/qt/Api/qgraphicswebview.h
+++ b/WebKit/qt/Api/qgraphicswebview.h
@@ -85,6 +85,7 @@ public:
virtual void setGeometry(const QRectF& rect);
virtual void updateGeometry();
virtual void paint(QPainter*, const QStyleOptionGraphicsItem* options, QWidget* widget = 0);
+ virtual QVariant itemChange(GraphicsItemChange change, const QVariant& value);
virtual bool event(QEvent*);
public Q_SLOTS:
diff --git a/WebKit/qt/Api/qwebelement.cpp b/WebKit/qt/Api/qwebelement.cpp
index 939d881..6305d10 100644
--- a/WebKit/qt/Api/qwebelement.cpp
+++ b/WebKit/qt/Api/qwebelement.cpp
@@ -30,12 +30,14 @@
#include "Document.h"
#include "DocumentFragment.h"
#include "FrameView.h"
+#include "GraphicsContext.h"
#include "HTMLElement.h"
#include "JSGlobalObject.h"
#include "JSHTMLElement.h"
#include "JSObject.h"
#include "NodeList.h"
#include "PropertyNameArray.h"
+#include "RenderImage.h"
#include "ScriptFunctionCall.h"
#include "StaticNodeList.h"
#include "qt_runtime.h"
@@ -45,6 +47,8 @@
#include <parser/SourceCode.h>
#include <wtf/Vector.h>
+#include <QPainter>
+
using namespace WebCore;
class QWebElementPrivate {
@@ -198,23 +202,9 @@ bool QWebElement::isNull() const
\sa findFirst()
*/
-QList<QWebElement> QWebElement::findAll(const QString &selectorQuery) const
+QWebElementCollection QWebElement::findAll(const QString &selectorQuery) const
{
- QList<QWebElement> elements;
- if (!m_element)
- return elements;
-
- ExceptionCode exception = 0; // ###
- RefPtr<NodeList> nodes = m_element->querySelectorAll(selectorQuery, exception);
- if (!nodes)
- return elements;
-
- for (unsigned i = 0; i < nodes->length(); ++i) {
- WebCore::Node* n = nodes->item(i);
- elements.append(QWebElement(static_cast<Element*>(n)));
- }
-
- return elements;
+ return QWebElementCollection(*this, selectorQuery);
}
/*!
@@ -678,7 +668,7 @@ static bool setupScriptContext(WebCore::Element* element, JSC::JSValue& thisValu
if (!scriptController)
return false;
- state = scriptController->globalObject()->globalExec();
+ state = scriptController->globalObject(mainThreadNormalWorld())->globalExec();
if (!state)
return false;
@@ -1133,7 +1123,7 @@ QWebElement QWebElement::clone() const
The element is still valid after removal, and can be inserted into other
parts of the document.
- \sa removeChildren(), removeFromDocument()
+ \sa removeAllChildren(), removeFromDocument()
*/
QWebElement &QWebElement::takeFromDocument()
{
@@ -1149,7 +1139,7 @@ QWebElement &QWebElement::takeFromDocument()
/*!
Removes this element from the document and makes it a null element.
- \sa removeChildren(), takeFromDocument()
+ \sa removeAllChildren(), takeFromDocument()
*/
void QWebElement::removeFromDocument()
{
@@ -1167,7 +1157,7 @@ void QWebElement::removeFromDocument()
\sa removeFromDocument(), takeFromDocument()
*/
-void QWebElement::removeChildren()
+void QWebElement::removeAllChildren()
{
if (!m_element)
return;
@@ -1411,3 +1401,426 @@ QWebElement QWebElement::enclosingElement(WebCore::Node* node)
Returns true if this element points to a different underlying DOM object
than \a o; otherwise returns false.
*/
+
+
+/*!
+ Render the element into \a painter .
+*/
+void QWebElement::render(QPainter* painter)
+{
+ WebCore::Element* e = m_element;
+ Document* doc = e ? e->document() : 0;
+ if (!doc)
+ return;
+
+ Frame* frame = doc->frame();
+ if (!frame || !frame->view() || !frame->contentRenderer())
+ return;
+
+ FrameView* view = frame->view();
+
+ view->layoutIfNeededRecursive();
+
+ IntRect rect = e->getRect();
+
+ if (rect.size().isEmpty())
+ return;
+
+ GraphicsContext context(painter);
+
+ context.save();
+ context.translate(-rect.x(), -rect.y());
+ view->setNodeToDraw(e);
+ view->paintContents(&context, rect);
+ view->setNodeToDraw(0);
+ context.restore();
+}
+
+class QWebElementCollectionPrivate : public QSharedData
+{
+public:
+ static QWebElementCollectionPrivate* create(const PassRefPtr<Node> &context, const QString &query);
+
+ RefPtr<NodeList> m_result;
+
+private:
+ inline QWebElementCollectionPrivate() {}
+};
+
+QWebElementCollectionPrivate* QWebElementCollectionPrivate::create(const PassRefPtr<Node> &context, const QString &query)
+{
+ if (!context)
+ return 0;
+
+ // Let WebKit do the hard work hehehe
+ ExceptionCode exception = 0; // ###
+ RefPtr<NodeList> nodes = context->querySelectorAll(query, exception);
+ if (!nodes)
+ return 0;
+
+ QWebElementCollectionPrivate* priv = new QWebElementCollectionPrivate;
+ priv->m_result = nodes;
+ return priv;
+}
+
+/*!
+ \class QWebElementCollection
+ \since 4.6
+ \brief The QWebElementCollection class represents a collection of web elements.
+ \preliminary
+
+ Elements in a document can be selected using QWebElement::findAll() or using the
+ QWebElement constructor. The collection is composed by choosing all elements in the
+ document that match a specified CSS selector expression.
+
+ The number of selected elements is provided through the count() property. Individual
+ elements can be retrieved by index using at().
+
+ It is also possible to iterate through all elements in the collection using Qt's foreach
+ macro:
+
+ \code
+ QWebElementCollection collection = document.findAll("p");
+ foreach (QWebElement paraElement, collection) {
+ ...
+ }
+ \endcode
+*/
+
+/*!
+ Constructs an empty collection.
+*/
+QWebElementCollection::QWebElementCollection()
+{
+}
+
+/*!
+ Constructs a copy of \a other.
+*/
+QWebElementCollection::QWebElementCollection(const QWebElementCollection &other)
+ : d(other.d)
+{
+}
+
+/*!
+ Constructs a collection of elements from the list of child elements of \a contextElement that
+ match the specified CSS selector \a query.
+*/
+QWebElementCollection::QWebElementCollection(const QWebElement &contextElement, const QString &query)
+{
+ d = QExplicitlySharedDataPointer<QWebElementCollectionPrivate>(QWebElementCollectionPrivate::create(contextElement.m_element, query));
+}
+
+/*!
+ Assigns \a other to this collection and returns a reference to this collection.
+*/
+QWebElementCollection &QWebElementCollection::operator=(const QWebElementCollection &other)
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ Destroys the collection.
+*/
+QWebElementCollection::~QWebElementCollection()
+{
+}
+
+/*! \fn QWebElementCollection &QWebElementCollection::operator+=(const QWebElementCollection &other)
+
+ Appends the items of the \a other list to this list and returns a
+ reference to this list.
+
+ \sa operator+(), append()
+*/
+
+/*!
+ Returns a collection that contains all the elements of this collection followed
+ by all the elements in the \a other collection. Duplicates may occur in the result.
+
+ \sa operator+=()
+*/
+QWebElementCollection QWebElementCollection::operator+(const QWebElementCollection &other) const
+{
+ QWebElementCollection n = *this; n.d.detach(); n += other; return n;
+}
+
+/*!
+ Extends the collection by appending all items of \a other.
+
+ The resulting collection may include duplicate elements.
+
+ \sa operator+=()
+*/
+void QWebElementCollection::append(const QWebElementCollection &other)
+{
+ if (!d) {
+ *this = other;
+ return;
+ }
+ if (!other.d)
+ return;
+ Vector<RefPtr<Node> > nodes;
+ RefPtr<NodeList> results[] = { d->m_result, other.d->m_result };
+ nodes.reserveInitialCapacity(results[0]->length() + results[1]->length());
+
+ for (int i = 0; i < 2; ++i) {
+ int j = 0;
+ Node* n = results[i]->item(j);
+ while (n) {
+ nodes.append(n);
+ n = results[i]->item(++j);
+ }
+ }
+
+ d->m_result = StaticNodeList::adopt(nodes);
+}
+
+/*!
+ Returns the number of elements in the collection.
+*/
+int QWebElementCollection::count() const
+{
+ if (!d)
+ return 0;
+ return d->m_result->length();
+}
+
+/*!
+ Returns the element at index position \a i in the collection.
+*/
+QWebElement QWebElementCollection::at(int i) const
+{
+ if (!d)
+ return QWebElement();
+ Node* n = d->m_result->item(i);
+ return QWebElement(static_cast<Element*>(n));
+}
+
+/*!
+ \fn const QWebElement QWebElementCollection::operator[](int position) const
+
+ Returns the element at the specified \a position in the collection.
+*/
+
+/*! \fn QWebElement QWebElementCollection::first() const
+
+ Returns the first element in the collection.
+
+ \sa last(), operator[](), at(), count()
+*/
+
+/*! \fn QWebElement QWebElementCollection::last() const
+
+ Returns the last element in the collection.
+
+ \sa first(), operator[](), at(), count()
+*/
+
+/*!
+ Returns a QList object with the elements contained in this collection.
+*/
+QList<QWebElement> QWebElementCollection::toList() const
+{
+ if (!d)
+ return QList<QWebElement>();
+ QList<QWebElement> elements;
+ int i = 0;
+ Node* n = d->m_result->item(i);
+ while (n) {
+ if (n->isElementNode())
+ elements.append(QWebElement(static_cast<Element*>(n)));
+ n = d->m_result->item(++i);
+ }
+ return elements;
+}
+
+/*!
+ \fn QWebElementCollection::const_iterator QWebElementCollection::begin() const
+
+ Returns an STL-style iterator pointing to the first element in the collection.
+
+ \sa end()
+*/
+
+/*!
+ \fn QWebElementCollection::const_iterator QWebElementCollection::end() const
+
+ Returns an STL-style iterator pointing to the imaginary element after the
+ last element in the list.
+
+ \sa begin()
+*/
+
+/*!
+ \class QWebElementCollection::const_iterator
+ \since 4.6
+ \brief The QWebElementCollection::const_iterator class provides an STL-style const iterator for QWebElementCollection.
+
+ QWebElementCollection provides STL style const iterators for fast low-level access to the elements.
+
+ QWebElementCollection::const_iterator allows you to iterate over a QWebElementCollection.
+
+ The default QWebElementCollection::const_iterator constructors creates an uninitialized iterator. You must initialize
+ it using a QWebElementCollection function like QWebElementCollection::begin() or QWebElementCollection::end() before you
+ can start iterating.
+*/
+
+/*!
+ \fn QWebElementCollection::const_iterator::const_iterator()
+
+ Constructs an uninitialized iterator.
+
+ Functions like operator*() and operator++() should not be called on
+ an uninitialized iterator. Use operator=() to assign a value
+ to it before using it.
+
+ \sa QWebElementCollection::begin()
+*/
+
+/*!
+ \fn QWebElementCollection::const_iterator::const_iterator(const const_iterator &other)
+
+ Constructs a copy of \a other.
+*/
+
+/*!
+ \fn QWebElementCollection::const_iterator::const_iterator(const QWebElementCollection *collection, int index)
+ \internal
+*/
+
+/*!
+ \fn const QWebElement QWebElementCollection::const_iterator::operator*() const
+
+ Returns the current element.
+*/
+
+/*!
+ \fn bool QWebElementCollection::const_iterator::operator==(const const_iterator &other) const
+
+ Returns true if \a other points to the same item as this iterator;
+ otherwise returns false.
+
+ \sa operator!=()
+*/
+
+/*!
+ \fn bool QWebElementCollection::const_iterator::operator!=(const const_iterator &other) const
+
+ Returns true if \a other points to a different element than this;
+ iterator; otherwise returns false.
+
+ \sa operator==()
+*/
+
+/*!
+ \fn QWebElementCollection::const_iterator &QWebElementCollection::const_iterator::operator++()
+
+ The prefix ++ operator (\c{++it}) advances the iterator to the next element in the collection
+ and returns an iterator to the new current element.
+
+ Calling this function on QWebElementCollection::end() leads to undefined results.
+
+ \sa operator--()
+*/
+
+/*!
+ \fn QWebElementCollection::const_iterator QWebElementCollection::const_iterator::operator++(int)
+
+ \overload
+
+ The postfix ++ operator (\c{it++}) advances the iterator to the next element in the collection
+ and returns an iterator to the previously current element.
+
+ Calling this function on QWebElementCollection::end() leads to undefined results.
+*/
+
+/*!
+ \fn QWebElementCollection::const_iterator &QWebElementCollection::const_iterator::operator--()
+
+ The prefix -- operator (\c{--it}) makes the preceding element current and returns an
+ iterator to the new current element.
+
+ Calling this function on QWebElementCollection::begin() leads to undefined results.
+
+ \sa operator++()
+*/
+
+/*!
+ \fn QWebElementCollection::const_iterator QWebElementCollection::const_iterator::operator--(int)
+
+ \overload
+
+ The postfix -- operator (\c{it--}) makes the preceding element current and returns
+ an iterator to the previously current element.
+*/
+
+/*!
+ \fn QWebElementCollection::const_iterator &QWebElementCollection::const_iterator::operator+=(int j)
+
+ Advances the iterator by \a j elements. If \a j is negative, the iterator goes backward.
+
+ \sa operator-=(), operator+()
+*/
+
+/*!
+ \fn QWebElementCollection::const_iterator &QWebElementCollection::const_iterator::operator-=(int j)
+
+ Makes the iterator go back by \a j elements. If \a j is negative, the iterator goes forward.
+
+ \sa operator+=(), operator-()
+*/
+
+/*!
+ \fn QWebElementCollection::const_iterator QWebElementCollection::const_iterator::operator+(int j) const
+
+ Returns an iterator to the element at \a j positions forward from this iterator. If \a j
+ is negative, the iterator goes backward.
+
+ \sa operator-(), operator+=()
+*/
+
+/*!
+ \fn QWebElementCollection::const_iterator QWebElementCollection::const_iterator::operator-(int j) const
+
+ Returns an iterator to the element at \a j positiosn backward from this iterator.
+ If \a j is negative, the iterator goes forward.
+
+ \sa operator+(), operator-=()
+*/
+
+/*!
+ \fn int QWebElementCollection::const_iterator::operator-(const_iterator other) const
+
+ Returns the number of elements between the item point to by \a other
+ and the element pointed to by this iterator.
+*/
+
+/*!
+ \fn bool QWebElementCollection::const_iterator::operator<(const const_iterator &other) const
+
+ Returns true if the element pointed to by this iterator is less than the element pointed to
+ by the \a other iterator.
+*/
+
+/*!
+ \fn bool QWebElementCollection::const_iterator::operator<=(const const_iterator &other) const
+
+ Returns true if the element pointed to by this iterator is less than or equal to the
+ element pointed to by the \a other iterator.
+*/
+
+/*!
+ \fn bool QWebElementCollection::const_iterator::operator>(const const_iterator &other) const
+
+ Returns true if the element pointed to by this iterator is greater than the element pointed to
+ by the \a other iterator.
+*/
+
+/*!
+ \fn bool QWebElementCollection::const_iterator::operator>=(const const_iterator &other) const
+
+ Returns true if the element pointed to by this iterator is greater than or equal to the
+ element pointed to by the \a other iterator.
+*/
diff --git a/WebKit/qt/Api/qwebelement.h b/WebKit/qt/Api/qwebelement.h
index 3db4637..a18d262 100644
--- a/WebKit/qt/Api/qwebelement.h
+++ b/WebKit/qt/Api/qwebelement.h
@@ -31,7 +31,12 @@ namespace WebCore {
class Node;
}
+QT_BEGIN_NAMESPACE
+class QPainter;
+QT_END_NAMESPACE
+
class QWebFrame;
+class QWebElementCollection;
class QWebElementPrivate;
class QWEBKIT_EXPORT QWebElement {
@@ -46,8 +51,8 @@ public:
bool isNull() const;
- QList<QWebElement> findAll(const QString& selectorQuery) const;
- QWebElement findFirst(const QString& selectorQuery) const;
+ QWebElementCollection findAll(const QString &selectorQuery) const;
+ QWebElement findFirst(const QString &selectorQuery) const;
void setPlainText(const QString& text);
QString toPlainText() const;
@@ -92,7 +97,7 @@ public:
QWebElement document() const;
QWebFrame *webFrame() const;
- // TODO: Add QList<QWebElement> overloads
+ // TODO: Add QWebElementCollection overloads
// docs need example snippet
void appendInside(const QString& markup);
void appendInside(const QWebElement& element);
@@ -121,7 +126,7 @@ public:
QWebElement clone() const;
QWebElement& takeFromDocument();
void removeFromDocument();
- void removeChildren();
+ void removeAllChildren();
QVariant evaluateJavaScript(const QString& scriptSource);
@@ -133,6 +138,8 @@ public:
QString styleProperty(const QString& name, StyleResolveStrategy strategy) const;
void setStyleProperty(const QString& name, const QString& value);
+ void render(QPainter* painter);
+
private:
explicit QWebElement(WebCore::Element*);
explicit QWebElement(WebCore::Node*);
@@ -140,6 +147,7 @@ private:
static QWebElement enclosingElement(WebCore::Node*);
friend class QWebFrame;
+ friend class QWebElementCollection;
friend class QWebHitTestResult;
friend class QWebHitTestResultPrivate;
friend class QWebPage;
@@ -148,4 +156,70 @@ private:
WebCore::Element* m_element;
};
+class QWebElementCollectionPrivate;
+
+class QWEBKIT_EXPORT QWebElementCollection
+{
+public:
+ QWebElementCollection();
+ QWebElementCollection(const QWebElement &contextElement, const QString &query);
+ QWebElementCollection(const QWebElementCollection &);
+ QWebElementCollection &operator=(const QWebElementCollection &);
+ ~QWebElementCollection();
+
+ QWebElementCollection operator+(const QWebElementCollection &other) const;
+ inline QWebElementCollection &operator+=(const QWebElementCollection &other)
+ {
+ append(other); return *this;
+ }
+
+ void append(const QWebElementCollection &collection);
+
+ int count() const;
+ QWebElement at(int i) const;
+
+ inline QWebElement first() const { return at(0); }
+ inline QWebElement last() const { return at(count() - 1); }
+
+ QList<QWebElement> toList() const;
+
+ class const_iterator {
+ public:
+ int i;
+ const QWebElementCollection *s;
+
+ inline const_iterator(const QWebElementCollection *collection, int index) : i(index), s(collection) {}
+ inline const_iterator(const const_iterator &o) : i(o.i), s(o.s) {}
+
+ inline const QWebElement operator*() const { return s->at(i); }
+
+ inline bool operator==(const const_iterator& o) const { return i == o.i && s == o.s; }
+ inline bool operator!=(const const_iterator& o) const { return i != o.i || s != o.s; }
+ inline bool operator<(const const_iterator& o) const { return i < o.i; }
+ inline bool operator<=(const const_iterator& o) const { return i <= o.i; }
+ inline bool operator>(const const_iterator& o) const { return i > o.i; }
+ inline bool operator>=(const const_iterator& o) const { return i >= o.i; }
+
+ inline const_iterator &operator++() { ++i; return *this; }
+ inline const_iterator operator++(int) { const_iterator n(s, i); ++i; return n; }
+ inline const_iterator &operator--() { i--; return *this; }
+ inline const_iterator operator--(int) { const_iterator n(s, i); i--; return n; }
+ inline const_iterator &operator+=(int j) { i += j; return *this; }
+ inline const_iterator &operator-=(int j) { i -= j; return *this; }
+ inline const_iterator operator+(int j) const { return const_iterator(s, i + j); }
+ inline const_iterator operator-(int j) const { return const_iterator(s, i - j); }
+ inline int operator-(const_iterator j) const { return i - j.i; }
+ private:
+ inline const_iterator() : i(0), s(0) {}
+ };
+ friend class const_iterator;
+
+ inline const_iterator begin() const { return const_iterator(this, 0); }
+ inline const_iterator end() const { return const_iterator(this, count()); }
+ inline QWebElement operator[](int i) const { return at(i); }
+
+private:
+ QExplicitlySharedDataPointer<QWebElementCollectionPrivate> d;
+};
+
#endif // QWEBELEMENT_H
diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp
index 1777cc8..606dae4 100644
--- a/WebKit/qt/Api/qwebframe.cpp
+++ b/WebKit/qt/Api/qwebframe.cpp
@@ -185,6 +185,17 @@ void QWEBKIT_EXPORT qt_drt_garbageCollector_collectOnAlternateThread(bool waitUn
gcController().garbageCollectOnAlternateThreadForDebugging(waitUntilDone);
}
+// Returns the value of counter in the element specified by \a id.
+QString QWEBKIT_EXPORT qt_drt_counterValueForElementById(QWebFrame* qFrame, const QString& id)
+{
+ Frame* frame = QWebFramePrivate::core(qFrame);
+ if (Document* document = frame->document()) {
+ Element* element = document->getElementById(id);
+ return WebCore::counterValueForElement(element);
+ }
+ return QString();
+}
+
QWebFrameData::QWebFrameData(WebCore::Page* parentPage, WebCore::Frame* parentFrame,
WebCore::HTMLFrameOwnerElement* ownerFrameElement,
const WebCore::String& frameName)
@@ -232,7 +243,7 @@ WebCore::Scrollbar* QWebFramePrivate::verticalScrollBar() const
return frame->view()->verticalScrollbar();
}
-void QWebFramePrivate::renderPrivate(QPainter *painter, const QRegion &clip)
+void QWebFramePrivate::renderPrivate(QPainter *painter, QWebFrame::RenderLayer layer, const QRegion &clip)
{
if (!frame->view() || !frame->contentRenderer())
return;
@@ -241,24 +252,58 @@ void QWebFramePrivate::renderPrivate(QPainter *painter, const QRegion &clip)
if (vector.isEmpty())
return;
- WebCore::FrameView* view = frame->view();
- view->layoutIfNeededRecursive();
-
GraphicsContext context(painter);
+ if (context.paintingDisabled() && !context.updatingControlTints())
+ return;
- if (clipRenderToViewport)
- view->paint(&context, vector.first());
- else
- view->paintContents(&context, vector.first());
+ WebCore::FrameView* view = frame->view();
+ view->layoutIfNeededRecursive();
- for (int i = 1; i < vector.size(); ++i) {
+ for (int i = 0; i < vector.size(); ++i) {
const QRect& clipRect = vector.at(i);
+ QRect intersectedRect = clipRect.intersected(view->frameRect());
+
painter->save();
painter->setClipRect(clipRect, Qt::IntersectClip);
- if (clipRenderToViewport)
- view->paint(&context, clipRect);
- else
- view->paintContents(&context, clipRect);
+
+ int x = view->x();
+ int y = view->y();
+
+ if (layer & QWebFrame::ContentsLayer) {
+ context.save();
+
+ int scrollX = view->scrollX();
+ int scrollY = view->scrollY();
+
+ QRect rect = intersectedRect;
+ context.translate(x, y);
+ rect.translate(-x, -y);
+ context.translate(-scrollX, -scrollY);
+ rect.translate(scrollX, scrollY);
+ context.clip(view->visibleContentRect());
+
+ view->paintContents(&context, rect);
+
+ context.restore();
+ }
+
+ if (layer & QWebFrame::ScrollBarLayer
+ && !view->scrollbarsSuppressed()
+ && (view->horizontalScrollbar() || view->verticalScrollbar())) {
+ context.save();
+
+ QRect rect = intersectedRect;
+ context.translate(x, y);
+ rect.translate(-x, -y);
+
+ view->paintScrollbars(&context, rect);
+
+ context.restore();
+ }
+
+ if (layer & QWebFrame::PanIconLayer)
+ view->paintPanScrollIcon(&context);
+
painter->restore();
}
}
@@ -386,7 +431,7 @@ void QWebFrame::addToJavaScriptWindowObject(const QString &name, QObject *object
return;
JSC::JSLock lock(JSC::SilenceAssertionsOnly);
- JSDOMWindow* window = toJSDOMWindow(d->frame);
+ JSDOMWindow* window = toJSDOMWindow(d->frame, mainThreadNormalWorld());
JSC::Bindings::RootObject* root = d->frame->script()->bindingRootObject();
if (!window) {
qDebug() << "Warning: couldn't get window object";
@@ -540,15 +585,26 @@ QUrl QWebFrame::url() const
*/
QUrl QWebFrame::requestedUrl() const
{
- // In the following edge cases (where the failing document
- // loader does not get commited by the frame loader) it is
- // safer to rely on outgoingReferrer than originalRequest.
- if (!d->frame->loader()->activeDocumentLoader()
- || (!d->frameLoaderClient->m_loadError.isNull()
- && !d->frame->loader()->outgoingReferrer().isEmpty()))
- return QUrl(d->frame->loader()->outgoingReferrer());
+ // There are some possible edge cases to be handled here,
+ // apart from checking if activeDocumentLoader is valid:
+ //
+ // * Method can be called while processing an unsucessful load.
+ // In this case, frameLoaderClient will hold the current error
+ // (m_loadError), and we will make use of it to recover the 'failingURL'.
+ // * If the 'failingURL' holds a null'ed string though, we fallback
+ // to 'outgoingReferrer' (it yet is safer than originalRequest).
+ FrameLoader* loader = d->frame->loader();
+ FrameLoaderClientQt* loaderClient = d->frameLoaderClient;
+
+ if (!loader->activeDocumentLoader()
+ || !loaderClient->m_loadError.isNull()) {
+ if (!loaderClient->m_loadError.failingURL().isNull())
+ return QUrl(loaderClient->m_loadError.failingURL());
+ else if (!loader->outgoingReferrer().isEmpty())
+ return QUrl(loader->outgoingReferrer());
+ }
- return d->frame->loader()->originalRequest().url();
+ return loader->originalRequest().url();
}
/*!
\since 4.6
@@ -935,44 +991,37 @@ void QWebFrame::setScrollPosition(const QPoint &pos)
}
/*!
- Render the frame into \a painter clipping to \a clip.
+ \since 4.6
+ Render the \a layer of the frame using \a painter clipping to \a clip.
\sa print()
*/
-void QWebFrame::render(QPainter *painter, const QRegion &clip)
-{
- d->renderPrivate(painter, clip);
-}
-/*!
- Render the frame into \a painter.
-*/
-void QWebFrame::render(QPainter *painter)
+void QWebFrame::render(QPainter* painter, RenderLayer layer, const QRegion& clip)
{
- if (!d->frame->view())
- return;
-
- d->renderPrivate(painter, QRegion(d->frame->view()->frameRect()));
+ if (!clip.isEmpty())
+ d->renderPrivate(painter, layer, clip);
+ else if (d->frame->view())
+ d->renderPrivate(painter, layer, QRegion(d->frame->view()->frameRect()));
}
/*!
- \since 4.6
- \property QWebFrame::clipRenderToViewport
-
- Returns true if render will clip content to viewport; otherwise returns false.
+ Render the frame into \a painter clipping to \a clip.
*/
-bool QWebFrame::clipRenderToViewport() const
+void QWebFrame::render(QPainter *painter, const QRegion &clip)
{
- return d->clipRenderToViewport;
+ d->renderPrivate(painter, AllLayers, clip);
}
/*!
- \since 4.6
- Sets whether the content of a frame will be clipped to viewport when rendered.
+ Render the frame into \a painter.
*/
-void QWebFrame::setClipRenderToViewport(bool clipRenderToViewport)
+void QWebFrame::render(QPainter *painter)
{
- d->clipRenderToViewport = clipRenderToViewport;
+ if (!d->frame->view())
+ return;
+
+ d->renderPrivate(painter, AllLayers, QRegion(d->frame->view()->frameRect()));
}
/*!
@@ -1103,7 +1152,7 @@ QWebElement QWebFrame::documentElement() const
\sa QWebElement::findAll()
*/
-QList<QWebElement> QWebFrame::findAllElements(const QString &selectorQuery) const
+QWebElementCollection QWebFrame::findAllElements(const QString &selectorQuery) const
{
return documentElement().findAll(selectorQuery);
}
@@ -1251,9 +1300,9 @@ QVariant QWebFrame::evaluateJavaScript(const QString& scriptSource)
ScriptController *proxy = d->frame->script();
QVariant rc;
if (proxy) {
- JSC::JSValue v = d->frame->loader()->executeScript(ScriptSourceCode(scriptSource)).jsValue();
+ JSC::JSValue v = d->frame->script()->executeScript(ScriptSourceCode(scriptSource)).jsValue();
int distance = 0;
- rc = JSC::Bindings::convertValueToQVariant(proxy->globalObject()->globalExec(), v, QMetaType::Void, &distance);
+ rc = JSC::Bindings::convertValueToQVariant(proxy->globalObject(mainThreadNormalWorld())->globalExec(), v, QMetaType::Void, &distance);
}
return rc;
}
@@ -1391,7 +1440,6 @@ QWebHitTestResultPrivate::QWebHitTestResultPrivate(const WebCore::HitTestResult
if (!hitTest.innerNode())
return;
pos = hitTest.point();
- boundingRect = hitTest.boundingBox();
WebCore::TextDirection dir;
title = hitTest.title(dir);
linkText = hitTest.textContent();
@@ -1401,6 +1449,7 @@ QWebHitTestResultPrivate::QWebHitTestResultPrivate(const WebCore::HitTestResult
imageUrl = hitTest.absoluteImageURL();
innerNode = hitTest.innerNode();
innerNonSharedNode = hitTest.innerNonSharedNode();
+ boundingRect = innerNonSharedNode ? innerNonSharedNode->renderer()->absoluteBoundingBoxRect(true) : IntRect();
WebCore::Image *img = hitTest.image();
if (img) {
QPixmap *pix = img->nativeImageForCurrentFrame();
@@ -1648,4 +1697,3 @@ QWebFrame *QWebHitTestResult::frame() const
return 0;
return d->frame;
}
-
diff --git a/WebKit/qt/Api/qwebframe.h b/WebKit/qt/Api/qwebframe.h
index 55c73b4..08285f8 100644
--- a/WebKit/qt/Api/qwebframe.h
+++ b/WebKit/qt/Api/qwebframe.h
@@ -50,6 +50,7 @@ class QWebHitTestResult;
class QWebHistoryItem;
class QWebSecurityOrigin;
class QWebElement;
+class QWebElementCollection;
namespace WebCore {
class WidgetPrivate;
@@ -112,7 +113,6 @@ class QWEBKIT_EXPORT QWebFrame : public QObject {
Q_PROPERTY(QIcon icon READ icon)
Q_PROPERTY(QSize contentsSize READ contentsSize)
Q_PROPERTY(QPoint scrollPosition READ scrollPosition WRITE setScrollPosition)
- Q_PROPERTY(bool clipRenderToViewport READ clipRenderToViewport WRITE setClipRenderToViewport)
Q_PROPERTY(bool focus READ hasFocus)
private:
QWebFrame(QWebPage *parent, QWebFrameData *frameData);
@@ -165,10 +165,17 @@ public:
QPoint scrollPosition() const;
void setScrollPosition(const QPoint &pos);
- void render(QPainter *painter, const QRegion &clip);
- void render(QPainter *painter);
- bool clipRenderToViewport() const;
- void setClipRenderToViewport(bool clipRenderToViewport);
+ enum RenderLayer {
+ ContentsLayer = 0x10,
+ ScrollBarLayer = 0x20,
+ PanIconLayer = 0x40,
+
+ AllLayers = 0xff
+ };
+
+ void render(QPainter*);
+ void render(QPainter*, const QRegion& clip);
+ void render(QPainter*, RenderLayer layer, const QRegion& clip = QRegion());
void setTextSizeMultiplier(qreal factor);
qreal textSizeMultiplier() const;
@@ -184,7 +191,7 @@ public:
QSize contentsSize() const;
QWebElement documentElement() const;
- QList<QWebElement> findAllElements(const QString &selectorQuery) const;
+ QWebElementCollection findAllElements(const QString &selectorQuery) const;
QWebElement findFirstElement(const QString &selectorQuery) const;
QWebHitTestResult hitTestContent(const QPoint &pos) const;
diff --git a/WebKit/qt/Api/qwebframe_p.h b/WebKit/qt/Api/qwebframe_p.h
index 632f83a..081e65d 100644
--- a/WebKit/qt/Api/qwebframe_p.h
+++ b/WebKit/qt/Api/qwebframe_p.h
@@ -70,7 +70,6 @@ public:
, allowsScrolling(true)
, marginWidth(-1)
, marginHeight(-1)
- , clipRenderToViewport(true)
{}
void init(QWebFrame* qframe, QWebFrameData* frameData);
@@ -82,7 +81,7 @@ public:
static WebCore::Frame* core(QWebFrame*);
static QWebFrame* kit(WebCore::Frame*);
- void renderPrivate(QPainter *painter, const QRegion &clip);
+ void renderPrivate(QPainter*, QWebFrame::RenderLayer, const QRegion& clip);
QWebFrame *q;
Qt::ScrollBarPolicy horizontalScrollBarPolicy;
@@ -94,7 +93,6 @@ public:
bool allowsScrolling;
int marginWidth;
int marginHeight;
- bool clipRenderToViewport;
};
class QWebHitTestResultPrivate {
diff --git a/WebKit/qt/Api/qwebhistory.cpp b/WebKit/qt/Api/qwebhistory.cpp
index 5752d66..f765daa 100644
--- a/WebKit/qt/Api/qwebhistory.cpp
+++ b/WebKit/qt/Api/qwebhistory.cpp
@@ -31,6 +31,11 @@
#include <QSharedData>
#include <QDebug>
+enum {
+ InitialHistoryVersion = 1,
+ DefaultHistoryVersion = InitialHistoryVersion
+};
+
/*!
\class QWebHistoryItem
\since 4.4
@@ -226,7 +231,8 @@ bool QWebHistoryItem::isValid() const
number of items is given by count(), and the history can be cleared with the
clear() function.
- QWebHistory's state can be saved with saveState() and loaded with restoreState().
+ QWebHistory's state can be saved to a QDataStream using the >> operator and loaded
+ by using the << operator.
\sa QWebHistoryItem, QWebHistoryInterface, QWebPage
*/
@@ -475,135 +481,82 @@ void QWebHistory::setMaximumItemCount(int count)
}
/*!
- \enum QWebHistory::HistoryStateVersion
+ \since 4.6
+ \fn QDataStream& operator<<(QDataStream& stream, const QWebHistory& history)
+ \relates QWebHistory
- This enum describes the versions available for QWebHistory's saveState() function:
+ \brief The operator<< function streams a history into a data stream.
- \value HistoryVersion_1 Version 1 (Qt 4.6)
- \value DefaultHistoryVersion The current default version in 1.
+ It saves the \a history into the specified \a stream.
*/
+QDataStream& operator<<(QDataStream& target, const QWebHistory& history)
+{
+ QWebHistoryPrivate* d = history.d;
+
+ QByteArray buffer;
+ QDataStream stream(&buffer, QIODevice::WriteOnly);
+
+ int version = DefaultHistoryVersion;
+
+ stream << version;
+ stream << history.count() << history.currentItemIndex();
+
+ const WebCore::HistoryItemVector &items = d->lst->entries();
+ for (unsigned i = 0; i < items.size(); i++)
+ items[i].get()->saveState(stream, version);
+
+ if (stream.status() != QDataStream::Ok)
+ buffer = QByteArray(); // make buffer isNull()==true and isEmpty()==true
+
+ return target << buffer;
+}
+
/*!
+ \fn QDataStream& operator>>(QDataStream& stream, QWebHistory& history)
+ \relates QWebHistory
\since 4.6
- Restores the state of QWebHistory from the given \a buffer. Returns true
- if the history was successfully restored; otherwise returns false.
+ \brief The operator>> function loads a history from a data stream.
- \sa saveState()
+ Loads a QWebHistory from the specified \a stream into the given \a history.
*/
-bool QWebHistory::restoreState(const QByteArray& buffer)
+
+QDataStream& operator>>(QDataStream& source, QWebHistory& history)
{
+ QWebHistoryPrivate* d = history.d;
+
+ QByteArray buffer;
+ source >> buffer;
+
QDataStream stream(buffer);
int version;
- bool result = false;
+
stream >> version;
- switch (version) {
- case HistoryVersion_1: {
+ if (version == 1) {
int count;
int currentIndex;
stream >> count >> currentIndex;
- clear();
+ history.clear();
// only if there are elements
if (count) {
// after clear() is new clear HistoryItem (at the end we had to remove it)
- WebCore::HistoryItem *nullItem = d->lst->currentItem();
- for (int i = 0;i < count;i++) {
+ WebCore::HistoryItem* nullItem = d->lst->currentItem();
+ for (int i = 0; i < count; i++) {
WTF::PassRefPtr<WebCore::HistoryItem> item = WebCore::HistoryItem::create();
item->restoreState(stream, version);
d->lst->addItem(item);
}
d->lst->removeItem(nullItem);
- goToItem(itemAt(currentIndex));
- result = stream.status() == QDataStream::Ok;
+ history.goToItem(history.itemAt(currentIndex));
}
- break;
- }
- default: {} // result is false;
}
d->page()->updateNavigationActions();
- return result;
-};
-
-/*!
- \since 4.6
- Saves the state of this QWebHistory into a QByteArray.
-
- Saves the current state of this QWebHistory. The version number, \a version, is
- stored as part of the data.
-
- To restore the saved state, pass the return value to restoreState().
-
- \sa restoreState()
-*/
-QByteArray QWebHistory::saveState(HistoryStateVersion version) const
-{
- QByteArray buffer;
- QDataStream stream(&buffer, QIODevice::WriteOnly);
- stream << version;
-
- switch (version) {
- case HistoryVersion_1: {
- stream << count() << currentItemIndex();
-
- const WebCore::HistoryItemVector &items = d->lst->entries();
- for (unsigned i = 0; i < items.size(); i++)
- items[i].get()->saveState(stream, version);
-
- if (stream.status() != QDataStream::Ok)
- buffer = QByteArray(); // make buffer isNull()==true and isEmpty()==true
- break;
- }
- default:
- buffer.clear();
-
- }
-
- return buffer;
-}
-
-/*!
- \since 4.6
- \fn QDataStream& operator<<(QDataStream& stream, const QWebHistory& history)
- \relates QWebHistory
-
- \brief The operator<< function streams a history into a data stream.
-
- It saves the \a history into the specified \a stream. This is a
- convenience function and is equivalent to calling the saveState()
- method.
-
- \sa QWebHistory::saveState()
-*/
-
-QDataStream& operator<<(QDataStream& stream, const QWebHistory& history)
-{
- return stream << history.saveState();
-}
-
-/*!
- \fn QDataStream& operator>>(QDataStream& stream, QWebHistory& history)
- \relates QWebHistory
- \since 4.6
-
- \brief The operator>> function loads a history from a data stream.
-
- Loads a QWebHistory from the specified \a stream into the given \a history.
- This is a convenience function and it is equivalent to calling the restoreState()
- method.
-
- \sa QWebHistory::restoreState()
-*/
-
-QDataStream& operator>>(QDataStream& stream, QWebHistory& history)
-{
- QByteArray buffer;
- stream >> buffer;
- history.restoreState(buffer);
- return stream;
+ return source;
}
QWebPagePrivate* QWebHistoryPrivate::page()
diff --git a/WebKit/qt/Api/qwebhistory.h b/WebKit/qt/Api/qwebhistory.h
index e46f124..cce4553 100644
--- a/WebKit/qt/Api/qwebhistory.h
+++ b/WebKit/qt/Api/qwebhistory.h
@@ -42,9 +42,6 @@ public:
QWebHistoryItem &operator=(const QWebHistoryItem &other);
~QWebHistoryItem();
- //bool restoreState(QByteArray& buffer);
- //QByteArray saveState(QWebHistory::HistoryStateVersion version = DefaultHistoryVersion) const;
-
QUrl originalUrl() const;
QUrl url() const;
@@ -69,22 +66,10 @@ private:
QExplicitlySharedDataPointer<QWebHistoryItemPrivate> d;
};
-//QWEBKIT_EXPORT QDataStream & operator<<(QDataStream& out,const QWebHistoryItem& hist);
-//QWEBKIT_EXPORT QDataStream & operator>>(QDataStream& in,QWebHistoryItem& hist);
-
class QWebHistoryPrivate;
class QWEBKIT_EXPORT QWebHistory {
public:
- enum HistoryStateVersion {
- HistoryVersion_1,
- /*, HistoryVersion_2, */
- DefaultHistoryVersion = HistoryVersion_1
- };
-
- bool restoreState(const QByteArray& buffer);
- QByteArray saveState(HistoryStateVersion version = DefaultHistoryVersion) const;
-
void clear();
QList<QWebHistoryItem> items() const;
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 0acec48..0b122b4 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -77,6 +77,7 @@
#include "LocalizedStrings.h"
#include "Cache.h"
#include "runtime/InitializeThreading.h"
+#include "PageGroup.h"
#include <QApplication>
#include <QBasicTimer>
@@ -262,7 +263,9 @@ static inline Qt::DropAction dragOpToDropAction(unsigned actions)
QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
: q(qq)
, client(0)
+#if QT_VERSION < 0x040600
, view(0)
+#endif
, inspectorFrontend(0)
, inspector(0)
, inspectorIsInternalOnly(false)
@@ -279,9 +282,6 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
page = new Page(chromeClient, contextMenuClient, editorClient,
new DragClientQt(q), new InspectorClientQt(q), 0);
- // ### should be configurable
- page->settings()->setDefaultTextEncodingName("iso-8859-1");
-
settings = new QWebSettings(page->settings());
#ifndef QT_NO_UNDOSTACK
@@ -305,6 +305,8 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
history.d = new QWebHistoryPrivate(page->backForwardList());
memset(actions, 0, sizeof(actions));
+
+ PageGroup::setShouldTrackVisitedLinks(true);
}
QWebPagePrivate::~QWebPagePrivate()
@@ -381,7 +383,7 @@ static QWebPage::WebAction webActionForContextMenuAction(WebCore::ContextMenuAct
QMenu *QWebPagePrivate::createContextMenu(const WebCore::ContextMenu *webcoreMenu,
const QList<WebCore::ContextMenuItem> *items, QBitArray *visitedWebActions)
{
- QMenu* menu = new QMenu(view);
+ QMenu* menu = new QMenu(q->view());
for (int i = 0; i < items->count(); ++i) {
const ContextMenuItem &item = items->at(i);
switch (item.type()) {
@@ -584,8 +586,6 @@ void QWebPagePrivate::timerEvent(QTimerEvent *ev)
void QWebPagePrivate::mouseMoveEvent(QGraphicsSceneMouseEvent* ev)
{
- q->setView(ev->widget());
-
WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
if (!frame->view())
return;
@@ -606,8 +606,6 @@ void QWebPagePrivate::mouseMoveEvent(QMouseEvent *ev)
void QWebPagePrivate::mousePressEvent(QGraphicsSceneMouseEvent* ev)
{
- q->setView(ev->widget());
-
WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
if (!frame->view())
return;
@@ -663,8 +661,6 @@ void QWebPagePrivate::mousePressEvent(QMouseEvent *ev)
void QWebPagePrivate::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *ev)
{
- q->setView(ev->widget());
-
WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
if (!frame->view())
return;
@@ -750,8 +746,6 @@ void QWebPagePrivate::handleClipboard(QEvent* ev, Qt::MouseButton button)
void QWebPagePrivate::mouseReleaseEvent(QGraphicsSceneMouseEvent* ev)
{
- q->setView(ev->widget());
-
WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
if (!frame->view())
return;
@@ -770,13 +764,13 @@ void QWebPagePrivate::mouseReleaseEvent(QGraphicsSceneMouseEvent* ev)
void QWebPagePrivate::handleSoftwareInputPanel(Qt::MouseButton button)
{
#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
- if (view && view->testAttribute(Qt::WA_InputMethodEnabled)
+ if (q->view() && q->view()->testAttribute(Qt::WA_InputMethodEnabled)
&& button == Qt::LeftButton && qApp->autoSipEnabled()) {
QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel(
- view->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel));
+ q->view()->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel));
if (!clickCausedFocus || behavior == QStyle::RSIP_OnMouseClick) {
QEvent event(QEvent::RequestSoftwareInputPanel);
- QApplication::sendEvent(view, &event);
+ QApplication::sendEvent(q->view(), &event);
}
}
@@ -833,8 +827,6 @@ QMenu *QWebPage::createStandardContextMenu()
#ifndef QT_NO_WHEELEVENT
void QWebPagePrivate::wheelEvent(QGraphicsSceneWheelEvent* ev)
{
- q->setView(ev->widget());
-
WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
if (!frame->view())
return;
@@ -922,8 +914,8 @@ void QWebPagePrivate::keyPressEvent(QKeyEvent *ev)
if (!handled) {
handled = true;
QFont defaultFont;
- if (view)
- defaultFont = view->font();
+ if (q->view())
+ defaultFont = q->view()->font();
QFontMetrics fm(defaultFont);
if (!handleScrolling(ev, frame)) {
switch (ev->key()) {
@@ -990,8 +982,6 @@ void QWebPagePrivate::focusOutEvent(QFocusEvent*)
void QWebPagePrivate::dragEnterEvent(QGraphicsSceneDragDropEvent* ev)
{
- q->setView(ev->widget());
-
#ifndef QT_NO_DRAGANDDROP
DragData dragData(ev->mimeData(), ev->pos().toPoint(),
QCursor::pos(), dropActionToDragOp(ev->possibleActions()));
@@ -1016,8 +1006,6 @@ void QWebPagePrivate::dragEnterEvent(QDragEnterEvent* ev)
void QWebPagePrivate::dragLeaveEvent(QGraphicsSceneDragDropEvent* ev)
{
- q->setView(ev->widget());
-
#ifndef QT_NO_DRAGANDDROP
DragData dragData(0, IntPoint(), QCursor::pos(), DragOperationNone);
page->dragController()->dragExited(&dragData);
@@ -1036,8 +1024,6 @@ void QWebPagePrivate::dragLeaveEvent(QDragLeaveEvent* ev)
void QWebPagePrivate::dragMoveEvent(QGraphicsSceneDragDropEvent* ev)
{
- q->setView(ev->widget());
-
#ifndef QT_NO_DRAGANDDROP
DragData dragData(ev->mimeData(), ev->pos().toPoint(),
QCursor::pos(), dropActionToDragOp(ev->possibleActions()));
@@ -1684,7 +1670,7 @@ QWebHistory *QWebPage::history() const
*/
void QWebPage::setView(QWidget *view)
{
- if (d->view != view) {
+ if (this->view() != view) {
d->view = view;
setViewportSize(view ? view->size() : QSize(0, 0));
}
@@ -1697,7 +1683,11 @@ void QWebPage::setView(QWidget *view)
*/
QWidget *QWebPage::view() const
{
+#if QT_VERSION < 0x040600
return d->view;
+#else
+ return d->view.data();
+#endif
}
/*!
@@ -1724,7 +1714,7 @@ void QWebPage::javaScriptAlert(QWebFrame *frame, const QString& msg)
{
Q_UNUSED(frame)
#ifndef QT_NO_MESSAGEBOX
- QMessageBox::information(d->view, tr("JavaScript Alert - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Ok);
+ QMessageBox::information(view(), tr("JavaScript Alert - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Ok);
#endif
}
@@ -1740,7 +1730,7 @@ bool QWebPage::javaScriptConfirm(QWebFrame *frame, const QString& msg)
#ifdef QT_NO_MESSAGEBOX
return true;
#else
- return QMessageBox::Yes == QMessageBox::information(d->view, tr("JavaScript Confirm - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Yes, QMessageBox::No);
+ return QMessageBox::Yes == QMessageBox::information(view(), tr("JavaScript Confirm - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Yes, QMessageBox::No);
#endif
}
@@ -1758,7 +1748,7 @@ bool QWebPage::javaScriptPrompt(QWebFrame *frame, const QString& msg, const QStr
Q_UNUSED(frame)
bool ok = false;
#ifndef QT_NO_INPUTDIALOG
- QString x = QInputDialog::getText(d->view, tr("JavaScript Prompt - %1").arg(mainFrame()->url().host()), msg, QLineEdit::Normal, defaultValue, &ok);
+ QString x = QInputDialog::getText(view(), tr("JavaScript Prompt - %1").arg(mainFrame()->url().host()), msg, QLineEdit::Normal, defaultValue, &ok);
if (ok && result)
*result = x;
#endif
@@ -1783,7 +1773,7 @@ bool QWebPage::shouldInterruptJavaScript()
#ifdef QT_NO_MESSAGEBOX
return false;
#else
- return QMessageBox::Yes == QMessageBox::information(d->view, tr("JavaScript Problem - %1").arg(mainFrame()->url().host()), tr("The script on this page appears to have a problem. Do you want to stop the script?"), QMessageBox::Yes, QMessageBox::No);
+ return QMessageBox::Yes == QMessageBox::information(view(), tr("JavaScript Problem - %1").arg(mainFrame()->url().host()), tr("The script on this page appears to have a problem. Do you want to stop the script?"), QMessageBox::Yes, QMessageBox::No);
#endif
}
@@ -1800,7 +1790,7 @@ bool QWebPage::shouldInterruptJavaScript()
*/
QWebPage *QWebPage::createWindow(WebWindowType type)
{
- QWebView *webView = qobject_cast<QWebView *>(d->view);
+ QWebView *webView = qobject_cast<QWebView *>(view());
if (webView) {
QWebView *newView = webView->createWindow(type);
if (newView)
@@ -1863,7 +1853,7 @@ void QWebPage::triggerAction(WebAction action, bool)
WTF::RefPtr<WebCore::Frame> wcFrame = targetFrame->d->frame;
targetFrame->d->frame->loader()->loadFrameRequest(frameLoadRequest(d->hitTestResult.linkUrl(), wcFrame.get()),
/*lockHistory*/ false, /*lockBackForwardList*/ false, /*event*/ 0,
- /*FormState*/ 0);
+ /*FormState*/ 0, SendReferrer);
break;
}
// fall through
@@ -1975,7 +1965,7 @@ void QWebPage::setViewportSize(const QSize &size) const
}
}
-QSize QWebPage::fixedContentsSize() const
+QSize QWebPage::preferredContentsSize() const
{
QWebFrame* frame = d->mainFrame;
if (frame) {
@@ -1988,7 +1978,7 @@ QSize QWebPage::fixedContentsSize() const
}
/*!
- \property QWebPage::fixedContentsSize
+ \property QWebPage::preferredContentsSize
\since 4.6
\brief the size of the fixed layout
@@ -1996,7 +1986,7 @@ QSize QWebPage::fixedContentsSize() const
1024x768 for example then webkit will layout the page as if the viewport were that size
rather than something different.
*/
-void QWebPage::setFixedContentsSize(const QSize &size) const
+void QWebPage::setPreferredContentsSize(const QSize &size) const
{
d->fixedLayoutSize = size;
@@ -2766,7 +2756,7 @@ bool QWebPage::extension(Extension extension, const ExtensionOption *option, Ext
if (extension == ChooseMultipleFilesExtension) {
// FIXME: do not ignore suggestedFiles
QStringList suggestedFiles = static_cast<const ChooseMultipleFilesExtensionOption*>(option)->suggestedFileNames;
- QStringList names = QFileDialog::getOpenFileNames(d->view, QString::null);
+ QStringList names = QFileDialog::getOpenFileNames(view(), QString::null);
static_cast<ChooseMultipleFilesExtensionReturn*>(output)->fileNames = names;
return true;
}
@@ -2848,7 +2838,7 @@ QString QWebPage::chooseFile(QWebFrame *parentFrame, const QString& suggestedFil
{
Q_UNUSED(parentFrame)
#ifndef QT_NO_FILEDIALOG
- return QFileDialog::getOpenFileName(d->view, QString::null, suggestedFile);
+ return QFileDialog::getOpenFileName(view(), QString::null, suggestedFile);
#else
return QString::null;
#endif
@@ -2887,6 +2877,9 @@ QNetworkProxy QWebPage::networkProxy() const
Sets the QNetworkAccessManager \a manager responsible for serving network requests for this
QWebPage.
+ \note It is currently not supported to change the network access manager after the
+ QWebPage has used it. The results of doing this are undefined.
+
\sa networkAccessManager()
*/
void QWebPage::setNetworkAccessManager(QNetworkAccessManager *manager)
@@ -3108,8 +3101,8 @@ QString QWebPage::userAgentForUrl(const QUrl& url) const
// Language
QLocale locale;
- if (d->view)
- locale = d->view->locale();
+ if (view())
+ locale = view()->locale();
QString name = locale.name();
name[2] = QLatin1Char('-');
ua.append(name);
diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h
index d77656c..f2bbde0 100644
--- a/WebKit/qt/Api/qwebpage.h
+++ b/WebKit/qt/Api/qwebpage.h
@@ -67,7 +67,7 @@ class QWEBKIT_EXPORT QWebPage : public QObject {
Q_PROPERTY(bool modified READ isModified)
Q_PROPERTY(QString selectedText READ selectedText)
Q_PROPERTY(QSize viewportSize READ viewportSize WRITE setViewportSize)
- Q_PROPERTY(QSize fixedContentsSize READ fixedContentsSize WRITE setFixedContentsSize)
+ Q_PROPERTY(QSize preferredContentsSize READ preferredContentsSize WRITE setPreferredContentsSize)
Q_PROPERTY(bool forwardUnsupportedContent READ forwardUnsupportedContent WRITE setForwardUnsupportedContent)
Q_PROPERTY(LinkDelegationPolicy linkDelegationPolicy READ linkDelegationPolicy WRITE setLinkDelegationPolicy)
Q_PROPERTY(QPalette palette READ palette WRITE setPalette)
@@ -237,8 +237,8 @@ public:
QSize viewportSize() const;
void setViewportSize(const QSize &size) const;
- QSize fixedContentsSize() const;
- void setFixedContentsSize(const QSize &size) const;
+ QSize preferredContentsSize() const;
+ void setPreferredContentsSize(const QSize &size) const;
virtual bool event(QEvent*);
bool focusNextPrevChild(bool next);
diff --git a/WebKit/qt/Api/qwebpage_p.h b/WebKit/qt/Api/qwebpage_p.h
index b9571fa..f0f842d 100644
--- a/WebKit/qt/Api/qwebpage_p.h
+++ b/WebKit/qt/Api/qwebpage_p.h
@@ -135,7 +135,12 @@ public:
#ifndef QT_NO_UNDOSTACK
QUndoStack *undoStack;
#endif
+
+#if QT_VERSION >= 0x040600
+ QWeakPointer<QWidget> view;
+#else
QWidget* view;
+#endif
bool insideOpenCall;
quint64 m_totalBytes;
diff --git a/WebKit/qt/Api/qwebsecurityorigin.cpp b/WebKit/qt/Api/qwebsecurityorigin.cpp
index 7c44e37..2a225c5 100644
--- a/WebKit/qt/Api/qwebsecurityorigin.cpp
+++ b/WebKit/qt/Api/qwebsecurityorigin.cpp
@@ -30,6 +30,16 @@
using namespace WebCore;
+void QWEBKIT_EXPORT qt_drt_whiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains)
+{
+ SecurityOrigin::whiteListAccessFromOrigin(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains);
+}
+
+void QWEBKIT_EXPORT qt_drt_resetOriginAccessWhiteLists()
+{
+ SecurityOrigin::resetOriginAccessWhiteLists();
+}
+
/*!
\class QWebSecurityOrigin
\since 4.5
@@ -239,21 +249,3 @@ QStringList QWebSecurityOrigin::localSchemes()
}
return list;
}
-
-/*!
- \since 4.6
- \internal
-*/
-void QWebSecurityOrigin::whiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains)
-{
- SecurityOrigin::whiteListAccessFromOrigin(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains);
-}
-
-/*!
- \since 4.6
- \internal
-*/
-void QWebSecurityOrigin::resetOriginAccessWhiteLists()
-{
- SecurityOrigin::resetOriginAccessWhiteLists();
-}
diff --git a/WebKit/qt/Api/qwebsecurityorigin.h b/WebKit/qt/Api/qwebsecurityorigin.h
index 94b96f0..16f8bc1 100644
--- a/WebKit/qt/Api/qwebsecurityorigin.h
+++ b/WebKit/qt/Api/qwebsecurityorigin.h
@@ -40,8 +40,6 @@ public:
static void addLocalScheme(const QString& scheme);
static void removeLocalScheme(const QString& scheme);
static QStringList localSchemes();
- static void whiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains);
- static void resetOriginAccessWhiteLists();
~QWebSecurityOrigin();
diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp
index abd7036..ffa21e4 100644
--- a/WebKit/qt/Api/qwebsettings.cpp
+++ b/WebKit/qt/Api/qwebsettings.cpp
@@ -62,6 +62,8 @@ public:
QString localStoragePath;
QString offlineWebApplicationCachePath;
qint64 offlineStorageDefaultQuota;
+ float printingMinimumShrinkFactor;
+ float printingMaximumShrinkFactor;
void apply();
WebCore::Settings* settings;
@@ -174,6 +176,12 @@ void QWebSettingsPrivate::apply()
QString storagePath = !localStoragePath.isEmpty() ? localStoragePath : global->localStoragePath;
settings->setLocalStorageDatabasePath(storagePath);
+ float minimumShrinkFactor = printingMinimumShrinkFactor > 0.0f ? printingMinimumShrinkFactor : global->printingMinimumShrinkFactor;
+ settings->setPrintingMinimumShrinkFactor(minimumShrinkFactor);
+
+ float maximumShrinkFactor = printingMaximumShrinkFactor > 0.0f ? printingMaximumShrinkFactor : global->printingMaximumShrinkFactor;
+ settings->setPrintingMaximumShrinkFactor(maximumShrinkFactor);
+
value = attributes.value(QWebSettings::ZoomTextOnly,
global->attributes.value(QWebSettings::ZoomTextOnly));
settings->setZoomsTextOnly(value);
@@ -377,6 +385,9 @@ QWebSettings::QWebSettings()
d->attributes.insert(QWebSettings::LocalContentCanAccessRemoteUrls, false);
d->attributes.insert(QWebSettings::SessionStorageEnabled, true);
d->offlineStorageDefaultQuota = 5 * 1024 * 1024;
+ d->defaultTextEncoding = QLatin1String("iso-8859-1");
+ d->printingMinimumShrinkFactor = 0.0f;
+ d->printingMaximumShrinkFactor = 0.0f;
}
/*!
@@ -491,6 +502,60 @@ QString QWebSettings::defaultTextEncoding() const
}
/*!
+ \since 4.7
+ Specifies minimum shrink fator allowed for printing. If set to 0 a
+ default value is used.
+
+ When printing, content will be shrunk to reduce page usage, it
+ will reduced by a factor between printingMinimumShrinkFactor and
+ printingMaximumShrinkFactor.
+
+ \sa printingMinimumShrinkFactor()
+ \sa setPrintingMaximumShrinkFactor()
+ \sa printingMaximumShrinkFactor()
+*/
+void QWebSettings::setPrintingMinimumShrinkFactor(float printingMinimumShrinkFactor)
+{
+ d->printingMinimumShrinkFactor = printingMinimumShrinkFactor;
+ d->apply();
+}
+
+/*!
+ \since 4.7
+ returns the minimum shrink factor used for printing.
+
+ \sa setPrintingMinimumShrinkFactor()
+*/
+float QWebSettings::printingMinimumShrinkFactor() const
+{
+ return d->printingMinimumShrinkFactor;
+}
+
+/*!
+ \since 4.7
+ Specifies maximum shrink fator allowed for printing. If set to 0 a
+ default value is used.
+
+ \sa setPrintingMinimumShrinkFactor()
+*/
+void QWebSettings::setPrintingMaximumShrinkFactor(float printingMaximumShrinkFactor)
+{
+ d->printingMaximumShrinkFactor = printingMaximumShrinkFactor;
+ d->apply();
+}
+
+/*!
+ \since 4.7
+ returns the maximum shrink factor used for printing.
+
+ \sa setPrintingMinimumShrinkFactor()
+*/
+float QWebSettings::printingMaximumShrinkFactor() const
+{
+ return d->printingMaximumShrinkFactor;
+}
+
+/*!
Sets the path of the icon database to \a path. The icon database is used
to store "favicons" associated with web sites.
diff --git a/WebKit/qt/Api/qwebsettings.h b/WebKit/qt/Api/qwebsettings.h
index 4790823..e68ea53 100644
--- a/WebKit/qt/Api/qwebsettings.h
+++ b/WebKit/qt/Api/qwebsettings.h
@@ -103,6 +103,12 @@ public:
void setDefaultTextEncoding(const QString &encoding);
QString defaultTextEncoding() const;
+ void setPrintingMinimumShrinkFactor(float printingMinimumShrinkFactor);
+ float printingMinimumShrinkFactor() const;
+
+ void setPrintingMaximumShrinkFactor(float printingMaximimShrinkFactor);
+ float printingMaximumShrinkFactor() const;
+
static void setIconDatabasePath(const QString &location);
static QString iconDatabasePath();
static void clearIconDatabase();
diff --git a/WebKit/qt/Api/qwebview.cpp b/WebKit/qt/Api/qwebview.cpp
index ce8b923..4fa073d 100644
--- a/WebKit/qt/Api/qwebview.cpp
+++ b/WebKit/qt/Api/qwebview.cpp
@@ -1,6 +1,7 @@
/*
Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
Copyright (C) 2008 Holger Hans Peter Freyther
+ Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -47,14 +48,19 @@ public:
virtual void scroll(int dx, int dy, const QRect&);
virtual void update(const QRect& dirtyRect);
+ virtual void setInputMethodEnabled(bool enable);
+#if QT_VERSION >= 0x040600
+ virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable);
+#endif
#ifndef QT_NO_CURSOR
virtual QCursor cursor() const;
virtual void updateCursor(const QCursor& cursor);
#endif
+ virtual QPalette palette() const;
virtual int screenNumber() const;
- virtual WId winId() const;
+ virtual QWidget* ownerWidget() const;
virtual QObject* pluginParent() const;
@@ -76,6 +82,19 @@ void QWebViewPrivate::update(const QRect & dirtyRect)
view->update(dirtyRect);
}
+void QWebViewPrivate::setInputMethodEnabled(bool enable)
+{
+ view->setAttribute(Qt::WA_InputMethodEnabled, enable);
+}
+#if QT_VERSION >= 0x040600
+void QWebViewPrivate::setInputMethodHint(Qt::InputMethodHint hint, bool enable)
+{
+ if (enable)
+ view->setInputMethodHints(view->inputMethodHints() | hint);
+ else
+ view->setInputMethodHints(view->inputMethodHints() & ~hint);
+}
+#endif
#ifndef QT_NO_CURSOR
QCursor QWebViewPrivate::cursor() const
{
@@ -88,6 +107,11 @@ void QWebViewPrivate::updateCursor(const QCursor& cursor)
}
#endif
+QPalette QWebViewPrivate::palette() const
+{
+ return view->palette();
+}
+
int QWebViewPrivate::screenNumber() const
{
#if defined(Q_WS_X11)
@@ -98,12 +122,9 @@ int QWebViewPrivate::screenNumber() const
return 0;
}
-WId QWebViewPrivate::winId() const
+QWidget* QWebViewPrivate::ownerWidget() const
{
- if (view)
- return view->winId();
-
- return 0;
+ return view;
}
QObject* QWebViewPrivate::pluginParent() const
@@ -224,8 +245,14 @@ QWebView::QWebView(QWidget *parent)
*/
QWebView::~QWebView()
{
- if (d->page)
+ if (d->page) {
+#if QT_VERSION >= 0x040600
+ d->page->d->view.clear();
+#else
d->page->d->view = 0;
+#endif
+ d->page->d->client = 0;
+ }
if (d->page && d->page->parent() == this)
delete d->page;
@@ -661,24 +688,38 @@ qreal QWebView::textSizeMultiplier() const
return page()->mainFrame()->textSizeMultiplier();
}
-#if !defined(Q_OS_SYMBIAN)
/*!
\property QWebView::renderHints
\since 4.6
\brief the default render hints for the view
- These hints are used to initialize QPainter before painting the web page.
+ These hints are used to initialize QPainter before painting the Web page.
QPainter::TextAntialiasing is enabled by default.
+ \note This property is not available on Symbian. However, the getter and
+ setter functions can still be used directly.
+
+ \sa QPainter::renderHints()
+*/
+
+/*!
+ \since 4.6
+ Returns the render hints used by the view to render content.
+
\sa QPainter::renderHints()
*/
-#endif
QPainter::RenderHints QWebView::renderHints() const
{
return d->renderHints;
}
+/*!
+ \since 4.6
+ Sets the render hints used by the view to the specified \a hints.
+
+ \sa QPainter::setRenderHints()
+*/
void QWebView::setRenderHints(QPainter::RenderHints hints)
{
if (hints == d->renderHints)
@@ -688,11 +729,11 @@ void QWebView::setRenderHints(QPainter::RenderHints hints)
}
/*!
- If \a enabled is true, the render hint \a hint is enabled; otherwise it
- is disabled.
-
\since 4.6
- \sa renderHints
+ If \a enabled is true, enables the specified render \a hint; otherwise
+ disables it.
+
+ \sa renderHints, QPainter::renderHints()
*/
void QWebView::setRenderHint(QPainter::RenderHint hint, bool enabled)
{
diff --git a/WebKit/qt/Api/qwebview.h b/WebKit/qt/Api/qwebview.h
index 15b5836..b63a593 100644
--- a/WebKit/qt/Api/qwebview.h
+++ b/WebKit/qt/Api/qwebview.h
@@ -53,9 +53,8 @@ class QWEBKIT_EXPORT QWebView : public QWidget {
// FIXME: temporary work around for elftran issue that it couldn't find the QPainter::staticMetaObject
// symbol from Qt lib; it should be reverted after the right symbol is exported.
-// remember to revert the qdoc \property comment as well.
// See bug: http://qt.nokia.com/developer/task-tracker/index_html?method=entry&id=258893
-#if !defined(Q_OS_SYMBIAN)
+#if defined(Q_QDOC) || !defined(Q_OS_SYMBIAN)
Q_PROPERTY(QPainter::RenderHints renderHints READ renderHints WRITE setRenderHints)
#endif
Q_FLAGS(QPainter::RenderHints)
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 5aff018..67cf7f3 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,823 @@
+2009-10-28 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] WebFrame::counterValueForElementById must not be exposed
+ https://bugs.webkit.org/show_bug.cgi?id=30882
+
+ * Api/qwebframe.cpp:
+ (qt_drt_counterValueForElementById):
+ * Api/qwebframe.h:
+
+2009-10-27 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Provide a way to get counter values with layoutTestContoller
+ https://bugs.webkit.org/show_bug.cgi?id=30555
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::counterValueForElementById):
+ (QWebHitTestResult::frame):
+ * Api/qwebframe.h:
+
+2009-10-28 Antonio Gomes <tonikitoo@webkit.org>
+
+ Pushing missing WebKit/qt/tests/qwebframe/resources/ dir from bug 29248.
+
+ [Qt] [API] Make it possible to have 'invisible' loads
+ https://bugs.webkit.org/show_bug.cgi?id=29248
+
+ * tests/qwebframe/resources/image2.png: Copied from WebKit/qt/tests/qwebelement/image.png.
+
+2009-10-28 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] QWebHistory::saveState() is inconsistent with the Qt API
+ https://bugs.webkit.org/show_bug.cgi?id=30710
+
+ Make the versioning internal and enforce it in the WebCore
+ part. Adjust the comments, as well as remove now dead code.
+
+ * Api/qwebhistory.cpp:
+ (operator<<):
+ (operator>>):
+ * Api/qwebhistory.h:
+
+2009-10-28 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] QWebHistory::saveState() is inconsistent with the Qt API
+ https://bugs.webkit.org/show_bug.cgi?id=30710
+
+ Remove the QWebHistory::saveState() and ::restoreState() as
+ they are inconsistent with the Qt API.
+
+ Update unittests to reflect the change.
+
+ * Api/qwebhistory.cpp:
+ (operator<<):
+ (operator>>):
+ * Api/qwebhistory.h:
+ * tests/qwebhistory/tst_qwebhistory.cpp:
+ (saveHistory):
+ (restoreHistory):
+ (tst_QWebHistory::saveAndRestore_crash_1):
+ (tst_QWebHistory::saveAndRestore_crash_2):
+ (tst_QWebHistory::saveAndRestore_crash_3):
+ (tst_QWebHistory::clear):
+
+2009-10-27 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ Complementary fix to bug 30779.
+
+ By mistake I used QWeakPointer's toStrongRef() method which docs
+ explicitly say to not be used in this situation (when the tracked
+ pointer is devired from QObject). Instead QWeakPointer's data()
+ is recommended.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::view):
+
+2009-10-27 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Fraser.
+
+ Change HitTestResult methods to use (3d) transformation aware methods
+ https://bugs.webkit.org/show_bug.cgi?id=27347
+
+ The HitTestResult::boundingBox method was removed. The
+ RenderObject must be used directly. In contrast to the
+ old HitTestResult::boundingBox method this code must use
+ a (3d) transformation aware method to not run into an
+ assert in SVGRenderBase::mapLocalToContainer.
+
+ * Api/qwebframe.cpp:
+ (QWebHitTestResultPrivate::QWebHitTestResultPrivate):
+
+2009-10-27 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Rubberstamped by Oliver Hunt.
+
+ Change two methods to be internal for DRT use only.
+
+ Part of [Qt] Review all new API in Qt 4.6
+ https://bugs.webkit.org/show_bug.cgi?id=29843#c11
+
+ * Api/qwebsecurityorigin.cpp:
+ (qt_drt_whiteListAccessFromOrigin):
+ (qt_drt_resetOriginAccessWhiteLists):
+ (QWebSecurityOrigin::localSchemes):
+ * Api/qwebsecurityorigin.h:
+
+2009-10-27 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Make sure that initiating a rotation while rotating won't make
+ it end up at rotation positions that are not a multiply of
+ 180 degrees.
+
+ * QGVLauncher/main.cpp:
+ (MainView::animatedFlip):
+
+2009-10-27 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Unreviewed Qt build fix.
+
+ Update the tests as well to the new API change.
+
+ * tests/qwebelement/tst_qwebelement.cpp:
+ (tst_QWebElement::clear):
+
+2009-10-27 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Rubberstamped by Tor Arne Vestbø.
+
+ [Qt] QWebElement::removeChildren() should be
+ QWebElement::removeAllChildren()
+ https://bugs.webkit.org/show_bug.cgi?id=30630
+
+ * Api/qwebelement.cpp:
+ (QWebElement::removeAllChildren):
+ * Api/qwebelement.h:
+
+2009-10-27 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Antti Koivisto and Holger Freyther.
+
+ Make QWebPagePrivate's (QWidget) view to be a QWeakPointer.
+ https://bugs.webkit.org/show_bug.cgi?id=30779
+
+ The fact that it was been set from external objects of qwebpage
+ and not being deleted internally can lead to dangling references.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebView::~QGraphicsWebView):
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ (QWebPagePrivate::createContextMenu):
+ (QWebPagePrivate::handleSoftwareInputPanel):
+ (QWebPagePrivate::keyPressEvent):
+ (QWebPage::setView):
+ (QWebPage::view):
+ (QWebPage::javaScriptAlert):
+ (QWebPage::javaScriptConfirm):
+ (QWebPage::javaScriptPrompt):
+ (QWebPage::shouldInterruptJavaScript):
+ (QWebPage::createWindow):
+ (QWebPage::extension):
+ (QWebPage::chooseFile):
+ (QWebPage::userAgentForUrl):
+ * Api/qwebpage_p.h:
+ * Api/qwebview.cpp:
+ (QWebView::~QWebView):
+
+2009-10-26 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Unreviewed documentation fix from David Boddie (Qt Doc Team)
+
+ Removes the check around the RenderHints property documentation
+ that was clearly added to synchronize the source and header files
+ when the #if !defined(Q_OS_SYMBIAN) guards was added to the
+ property.
+
+ The documentation has also been updated to ensure that Symbian
+ users know that there is no actual RenderHints property on their
+ platform.
+
+ * Api/qwebview.cpp:
+
+2009-10-26 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Unreviewed documentation fix from David Boddie (Qt Doc Team)
+
+ Ensure that qdoc will always see the RenderHints property.
+
+ The property was only defined in the header file if the Q_OS_SYMBIAN
+ symbol was not defined, resulting in the property not showing up
+ in the Qt documentation just because one platform doesn't support it.
+
+ A follow up commit will improve the documentation for the property
+ and note that it is not supported on the Symbiam platform.
+
+ * Api/qwebview.h:
+
+2009-10-26 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Reintroduce QWebElementCollection
+
+ Revert the patch that has replaced QWebElementCollection
+ with QList<QWebElement>. Update the tests accordingly.
+
+ Remove the constness of the return type of QWebElement operator[].
+
+ https://bugs.webkit.org/show_bug.cgi?id=30767
+
+ * Api/qwebelement.cpp:
+ (QWebElement::findAll):
+ (QWebElementCollectionPrivate::QWebElementCollectionPrivate):
+ (QWebElementCollectionPrivate::create):
+ (QWebElementCollection::QWebElementCollection):
+ (QWebElementCollection::operator=):
+ (QWebElementCollection::~QWebElementCollection):
+ (QWebElementCollection::operator+):
+ (QWebElementCollection::append):
+ (QWebElementCollection::count):
+ (QWebElementCollection::at):
+ (QWebElementCollection::toList):
+ * Api/qwebelement.h:
+ (const_iterator::begin):
+ (const_iterator::end):
+ (const_iterator::operator[]):
+ * Api/qwebframe.cpp:
+ (QWebFrame::findAllElements):
+ * Api/qwebframe.h:
+ * QtLauncher/main.cpp:
+ (MainWindow::selectElements):
+ * tests/qwebelement/tst_qwebelement.cpp:
+ (tst_QWebElement::simpleCollection):
+ (tst_QWebElement::iteration):
+ (tst_QWebElement::emptyCollection):
+ (tst_QWebElement::appendCollection):
+ (tst_QWebElement::nullSelect):
+ (tst_QWebElement::hasSetFocus):
+ (tst_QWebElement::render):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::inputMethods):
+
+2009-10-24 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] [Symbian] Set the capability and memory required to run QtWebKit for Symbian
+ https://bugs.webkit.org/show_bug.cgi?id=30476
+
+ Assign ReadUserData WriteUserData NetworkServices Symbian capabilities
+ to all QtWebkit executables.
+
+ * QGVLauncher/QGVLauncher.pro:
+ * QtLauncher/QtLauncher.pro:
+ * tests/benchmarks/loading/tst_loading.pro:
+ * tests/benchmarks/painting/tst_painting.pro:
+ * tests/qgraphicswebview/qgraphicswebview.pro:
+ * tests/qwebelement/qwebelement.pro:
+ * tests/qwebframe/qwebframe.pro:
+ * tests/qwebhistory/qwebhistory.pro:
+ * tests/qwebhistoryinterface/qwebhistoryinterface.pro:
+ * tests/qwebpage/qwebpage.pro:
+ * tests/qwebplugindatabase/qwebplugindatabase.pro:
+ * tests/qwebview/qwebview.pro:
+
+2009-10-22 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by NOBODY (speculative build fix - qt is currently already broken!)
+ Build fix following bug #30696.
+
+ * Api/qwebelement.cpp:
+ (setupScriptContext):
+ * Api/qwebframe.cpp:
+ (QWebFrame::evaluateJavaScript):
+
+2009-10-22 Shu Chang <Chang.Shu@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Enable track visited links in QWebPage
+ https://bugs.webkit.org/show_bug.cgi?id=30574
+
+ Test: fast/history/clicked-link-is-visited.html
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+
+2009-10-22 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Add Print Shortcut to QtLauncher
+
+ https://bugs.webkit.org/show_bug.cgi?id=30682
+
+ * QtLauncher/main.cpp:
+ (MainWindow::setupUI):
+
+2009-10-22 Antonio Gomes <tonikitoo@webkit.org>
+
+ Rubberstamped by Tor Arne Vestbø.
+
+ Code standarlization for QGVLauncher.
+
+ 1) Made member initilization lists in constructors
+ to be per line.
+ 2) Made applyProxy method inline as all other methods in
+ WebPage class.
+
+ * QGVLauncher/main.cpp:
+ (WebPage::WebPage):
+ (WebPage::applyProxy):
+ (MainView::MainView):
+ (MainWindow::MainWindow):
+ (MainWindow::init):
+
+2009-10-22 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Add a Y-Axis rotation to QGVLauncher.
+
+ It uses the QStateMachine API from Qt 4.6.
+
+ * QGVLauncher/main.cpp:
+ (WebView::WebView):
+ (WebView::setYRotation):
+ (WebView::yRotation):
+ (MainView::flip):
+ (MainView::animatedYFlip):
+ (SharedScene::SharedScene):
+ (SharedScene::webView):
+ (MainWindow::init):
+ (MainWindow::animatedYFlip):
+ (MainWindow::buildUI):
+
+2009-10-20 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed By Adam Barth.
+
+ Add some actions to the menu for cursor debugging.
+
+ GraphicsView based launcher only.
+
+ * QGVLauncher/main.cpp:
+ (MainView::setWaitCursor):
+ (MainView::resetCursor):
+ (MainView::flip):
+ (MainWindow::setWaitCursor):
+ (MainWindow::resetCursor):
+ (MainWindow::buildUI):
+
+2009-10-20 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Rubberstamped by Adam Barth.
+
+ Remove clipRenderToViewport as agreed upon in
+ https://bugs.webkit.org/show_bug.cgi?id=29843
+
+ * Api/qwebframe.cpp:
+ * Api/qwebframe.h:
+ * Api/qwebframe_p.h:
+ (QWebFramePrivate::QWebFramePrivate):
+
+2009-10-20 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Update the tests to test the new render functionality, and take
+ into consideration that render() clips to the frame itself as well
+ as the viewport.
+
+ QWebFrame::render() now always clips, so the old tests were bogus.
+
+ Rendering pure contents (no scrollbars etc) without clipping can now
+ be accomplished using QWebFrame::documentElement()->render(...)
+
+ * Api/qwebframe.cpp:
+ * Api/qwebframe.h:
+ * Api/qwebframe_p.h:
+ (QWebFramePrivate::QWebFramePrivate):
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2009-10-20 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Rubberstamped by Adam Barth.
+
+ As we do not support rendering a QWebFrame without it being clipped
+ the the frame as well as the viewport, we now set the viewport size
+ to the size of the contents.
+
+ Rendering pure contents (no scrollbars etc) without clipping can be
+ acomplished using QWebFrame::documentElement()->render(...)
+
+ * tests/qwebelement/tst_qwebelement.cpp:
+ (tst_QWebElement::render):
+
+2009-10-20 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Add menu item to dump the plugin list to the console,
+ which can be handy for debugging.
+
+ * QtLauncher/main.cpp:
+ (MainWindow::dumpPlugins):
+ (MainWindow::setupUI):
+
+2009-10-19 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Introduce new render method on QWebFrame, which supports specifying
+ which layers to render (scrollbars, contents, pan-icon).
+
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::renderPrivate):
+ (QWebFrame::render):
+ * Api/qwebframe.h:
+ * Api/qwebframe_p.h:
+
+2009-10-19 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Infinite loop (leading to crash) when setting cursor in QGraphicsWebView
+ https://bugs.webkit.org/show_bug.cgi?id=30549
+
+ Patch reimplements QGraphicsItem's itemChange method, and make
+ CursorChange event to be emitted after cursor has already been
+ set.
+
+ QWidget::setCursor send the event just after it sets the cursor,
+ then patch makes both behaviors compatible.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebView::itemChange):
+ * Api/qgraphicswebview.h:
+
+2009-10-19 Nate Chapin <japhet@chromium.org>
+
+ Unreviewed, build fix.
+
+ Update call to FrameLoader::loadFrameRequest().
+
+ * Api/qwebpage.cpp:
+ (QWebPage::triggerAction):
+
+2009-10-19 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ Add QWebElement::render API which allows rendering of single
+ element.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::render):
+ * Api/qwebelement.h:
+ * tests/qwebelement/tst_qwebelement.cpp:
+ (tst_QWebElement::render):
+ * tests/qwebelement/qwebelement.qrc:
+ * tests/qwebelement/image.png: Added.
+
+2009-10-19 Markus Goetz <Markus.Goetz@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ QWebPage: Doc: setNetworkAccessManager should only be called once.
+
+ * Api/qwebpage.cpp:
+
+2009-10-19 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Tor Arne.
+
+ Wrong ifdef combination in QGraphicsWebView's event method.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebView::event):
+
+2009-10-19 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Windowed Plugins: Don't crash when client is 0.
+
+ Client is 0 when we use QWebPage without a QWebView or QGraphicsWebView.
+ In addition, setFrameRect()/updatePluginWidget() is called even if the
+ plugin was not succesfully loaded. updatePluginWidget() updates the
+ window rect which is, in theory, useful to draw something that indicates
+ that we didn't load successfully.
+
+ So, a status check is added to setNPWindowIfNeeded.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30380
+
+ * tests/qwebpage/qwebpage.pro:
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (takeScreenshot):
+ (tst_QWebPage::screenshot_data):
+ (tst_QWebPage::screenshot):
+ * tests/resources/test.swf: Copied from LayoutTests/fast/replaced/resources/test.swf.
+
+2009-10-19 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Windowed Plugins: Fix crash when QWebPage is deleted after QWebView.
+
+ Fixes various sources of crashes:
+ 1. The PluginContainer is a child of QWebView. When the view gets deleted,
+ the PluginView is not notified about the deletion of PluginContainer.
+ 2. QWebView destructor does not set client to 0.
+ 3. Sometimes pending paint events are sent after the plugin has died, so add
+ a check in PluginView::setNPWindowIfNeeded.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30354
+
+ * Api/qwebview.cpp:
+ (QWebView::~QWebView):
+ * tests/qwebview/qwebview.pro:
+ * tests/qwebview/tst_qwebview.cpp:
+ (tst_QWebView::reusePage_data):
+ (tst_QWebView::reusePage):
+
+2009-10-19 Jakob Truelsen <antialize@gmail.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29042
+
+ Allow one to costumize the minimal and maximal shrink factors,
+ Added methods setPrintingMinimumShrinkFactor, printingMinimumShrinkFactor,
+ setPrintingMaximumShrinkFactor, printingMaximumShrinkFactor to QWebSettings.
+
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ (QWebSettings::QWebSettings):
+ (QWebSettings::setPrintingMinimumShrinkFactor):
+ (QWebSettings::printingMinimumShrinkFactor):
+ (QWebSettings::setPrintingMaximumShrinkFactor):
+ (QWebSettings::printingMaximumShrinkFactor):
+ * Api/qwebsettings.h:
+
+2009-10-18 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Rename fixedContentsSize property to preferredContentsSize as
+ agreed upon with Simon Hausmann and Matthias Ettrich.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::preferredContentsSize):
+ (QWebPage::setPreferredContentsSize):
+ * Api/qwebpage.h:
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage):
+
+2009-10-16 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] QGLauncher leaks WebPage object
+ https://bugs.webkit.org/show_bug.cgi?id=30465
+
+ Make 'SharedScene' to own 'WebPage' reference and delete it at its destructor.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::view):
+ * Api/qwebpage_p.h:
+ * QGVLauncher/main.cpp:
+ (SharedScene::SharedScene):
+ (SharedScene::~SharedScene):
+
+2009-10-16 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] "dangling" pointer to qwebpage's view object can leads QGLauncher to crash
+ https://bugs.webkit.org/show_bug.cgi?id=30459
+
+ Remove all setView(ev->widget()) calls in QWebPage and QGWV event handling methods,
+ since QWebPageClient would do the trick.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebView::hoverMoveEvent):
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::mouseMoveEvent):
+ (QWebPagePrivate::mousePressEvent):
+ (QWebPagePrivate::mouseDoubleClickEvent):
+ (QWebPagePrivate::mouseReleaseEvent):
+ (QWebPagePrivate::wheelEvent):
+ (QWebPagePrivate::dragEnterEvent):
+ (QWebPagePrivate::dragLeaveEvent):
+ (QWebPagePrivate::dragMoveEvent):
+
+2009-10-16 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Pull out r49676 as it caused build breakges on Symbian
+
+ * Api/qwebpage.cpp:
+
+2009-10-16 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Need a way to inform the application when a Netscape plugin is created or deleted
+ https://bugs.webkit.org/show_bug.cgi?id=30179
+
+ Added "c" style static methods for the application to hook up for
+ receiving notifications when a plugin is created or destroyed.
+
+ * Api/qwebpage.cpp:
+
+2009-10-15 Antonio Gomes <tonikitoo@webkit.org>
+
+ Rubberstamped by Tor Arne.
+
+ Make QGLauncher's WebPage class constructor to get a QObject* as parent (not QWidget*).
+
+ * QGVLauncher/main.cpp:
+ (WebPage::WebPage):
+
+2009-10-15 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Tor Arne.
+
+ [Qt] QGLauncher crashes while closing a window
+ https://bugs.webkit.org/show_bug.cgi?id=30385
+
+ Set page's pageClient reference to '0' at QGWV deletion.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebView::~QGraphicsWebView):
+ * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
+ (WebPage::WebPage):
+ (WebPage::aborting):
+ (tst_QGraphicsWebView::crashOnViewlessWebPages):
+
+2009-10-13 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Make context menu to work in QGraphicsWebView
+ https://bugs.webkit.org/show_bug.cgi?id=30336
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebView::event):
+
+2009-10-13 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Plugins : Remove all traces of winId. Use ownerWidget() instead.
+
+ This is a bug for two reasons:
+ 1. Everytime we use winId(), we end up creating a native widget. This causes an
+ unnecessary copy of contents from the backing store to the native widget.
+ 2. Neither windowed nor windowless plugins require the winId of the QWebView or
+ QGraphicsView.
+
+ Introduce ownerWidget() which returns a QWidget * without creating a native widget
+ (as opposed to QWidget::find(winId)).
+
+ https://bugs.webkit.org/show_bug.cgi?id=30170
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::ownerWidget):
+ * Api/qwebview.cpp:
+ (QWebViewPrivate::ownerWidget):
+
+2009-10-13 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Add some initial autotests for QWebPage's ErrorPageExtention
+ https://bugs.webkit.org/show_bug.cgi?id=30296
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (ErrorPage::ErrorPage):
+ (ErrorPage::supportsExtension):
+ (ErrorPage::extension):
+ (tst_QWebPage::errorPageExtension):
+
+2009-10-13 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] better handle possible edge cases on qwebframe::requestedUrl use
+ https://bugs.webkit.org/show_bug.cgi?id=30216
+
+ QWebFrame::requestedUrl can be called at any time during the load
+ process, including:
+
+ * An error handling (whereas an alternate error page for unsuccessful
+ load is being set);
+ * A ssl error exception call;
+ * During navigation notifications/callbacks (titleChanged, urlChanged,
+ progresses, addHistoryEntry, etc);
+ * Among others.
+
+ This patch makes requestedUrl calls to fallback to FrameLoaderClient
+ m_loadError's failingURL when an error has occurred, unless it is
+ null/empty.
+
+ Also, m_loadError is now being reset at each the main frame starts a
+ load, in order to avoid previous load errors footprints.
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::requestedUrl):
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::postProgressStartedNotification):
+
+2009-10-12 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Missing default value for the default text encoding.
+ https://bugs.webkit.org/show_bug.cgi?id=30311
+
+ QtWebKit has provided a default, hardcoded value for default charset but since
+ the addition of the defaultTextEncoding setting in QWebSettings, that hardcoded
+ value has had no effect.
+
+ Added a regression test and unskipped fast/dom/Document/document-charset.html,
+ which is passing now.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ * Api/qwebsettings.cpp:
+ (QWebSettings::QWebSettings):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::defaultTextEncoding):
+
+2009-10-12 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Implement the new palette() methods on the page clients
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::palette):
+ * Api/qwebview.cpp:
+ (QWebViewPrivate::palette):
+
+2009-10-12 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ QWebPage's createViewlessPlugin autotest crash fix.
+
+ It is possible that plugins that are QWidgets or QGraphicsWidgets
+ are created before a view has been assigned to a QWebPage. The
+ plug-ins won't be fully functional, as by design, they should
+ visualise something, but they won't crash and will stay in memory.
+
+ An autotest that covers this use-case, is included.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30118
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createPlugin):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (PluginTrackedPageWidget::PluginTrackedPageWidget):
+ (PluginTrackedPageGraphicsWidget::PluginTrackedPageGraphicsWidget):
+ (PluginTrackedPageGraphicsWidget::createPlugin):
+ (tst_QWebPage::destroyPlugin):
+ (tst_QWebPage::createViewlessPlugin):
+
+2009-10-09 Joe Ligman <joseph.ligman@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Sets Qt::WA_InputMethodEnabled and Qt::ImhHiddenText for password fields in EditorClientQt
+ setInputMethodState. This change is needed so widgets such as the s60 software
+ input panel can receive input method events for password fields.
+ It's up to the Qt platform to determine which widget will receive input method
+ events when these flags are set.
+ Also added implementation for setInputMethodEnabled and setInputMethodHint
+ to QGraphicsWebViewPrivate and QWebViewPrivate. This change removes the direct
+ dependency on QWebView and uses QWebPageClient.
+ Added autotest to tst_qwebpage.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=30023
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::setInputMethodEnabled):
+ (QGraphicsWebViewPrivate::setInputMethodHint):
+ * Api/qwebview.cpp:
+ (QWebViewPrivate::setInputMethodEnabled):
+ (QWebViewPrivate::setInputMethodHint):
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::setInputMethodState):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::inputMethods):
+
+2009-10-08 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move executeScript from FrameLoader to ScriptController
+ https://bugs.webkit.org/show_bug.cgi?id=30200
+
+ Update API call.
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::evaluateJavaScript):
+
2009-10-08 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Simon Hausmann.
diff --git a/WebKit/qt/QGVLauncher/QGVLauncher.pro b/WebKit/qt/QGVLauncher/QGVLauncher.pro
index dec1c9b..059ec1a 100644
--- a/WebKit/qt/QGVLauncher/QGVLauncher.pro
+++ b/WebKit/qt/QGVLauncher/QGVLauncher.pro
@@ -10,4 +10,7 @@ QT += network
macx:QT+=xml
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-symbian:TARGET.UID3 = 0xA000E544
+symbian {
+ TARGET.UID3 = 0xA000E544
+ TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
+}
diff --git a/WebKit/qt/QGVLauncher/main.cpp b/WebKit/qt/QGVLauncher/main.cpp
index 1d67c35..3632a33 100644
--- a/WebKit/qt/QGVLauncher/main.cpp
+++ b/WebKit/qt/QGVLauncher/main.cpp
@@ -50,28 +50,71 @@
#include <qwebsettings.h>
#include <qwebview.h>
+class WebView : public QGraphicsWebView {
+ Q_OBJECT
+ Q_PROPERTY(qreal yRotation READ yRotation WRITE setYRotation)
+
+public:
+ WebView(QGraphicsItem* parent = 0)
+ : QGraphicsWebView(parent)
+ {
+ }
+ void setYRotation(qreal angle)
+ {
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ QRectF r = boundingRect();
+ setTransform(QTransform()
+ .translate(r.width() / 2, r.height() / 2)
+ .rotate(angle, Qt::YAxis)
+ .translate(-r.width() / 2, -r.height() / 2));
+#endif
+ m_yRotation = angle;
+ }
+ qreal yRotation() const
+ {
+ return m_yRotation;
+ }
+
+private:
+ qreal m_yRotation;
+};
+
class WebPage : public QWebPage {
Q_OBJECT
public:
- WebPage(QWidget* parent = 0) : QWebPage(parent)
+ WebPage(QObject* parent = 0)
+ : QWebPage(parent)
{
applyProxy();
}
virtual QWebPage* createWindow(QWebPage::WebWindowType);
private:
- void applyProxy();
+ void applyProxy()
+ {
+ QUrl proxyUrl = QWebView::guessUrlFromString(qgetenv("http_proxy"));
+
+ if (proxyUrl.isValid() && !proxyUrl.host().isEmpty()) {
+ int proxyPort = (proxyUrl.port() > 0) ? proxyUrl.port() : 8080;
+ networkAccessManager()->setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, proxyUrl.host(), proxyPort));
+ }
+ }
};
class MainView : public QGraphicsView {
Q_OBJECT
public:
- MainView(QWidget* parent) : QGraphicsView(parent), m_mainWidget(0)
+ MainView(QWidget* parent)
+ : QGraphicsView(parent)
+ , m_mainWidget(0)
{
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+
+ setFrameShape(QFrame::NoFrame);
+ setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
}
void setMainWidget(QGraphicsWidget* widget)
@@ -90,6 +133,16 @@ public:
m_mainWidget->setGeometry(rect);
}
+ void setWaitCursor()
+ {
+ m_mainWidget->setCursor(Qt::WaitCursor);
+ }
+
+ void resetCursor()
+ {
+ m_mainWidget->unsetCursor();
+ }
+
public slots:
void flip()
{
@@ -111,11 +164,24 @@ public slots:
QPropertyAnimation* animation = new QPropertyAnimation(m_mainWidget, "rotation", this);
animation->setDuration(1000);
- animation->setStartValue(m_mainWidget->rotation());
- animation->setEndValue(m_mainWidget->rotation() + 180);
+
+ int rotation = int(m_mainWidget->rotation());
+
+ animation->setStartValue(rotation);
+ animation->setEndValue(rotation + 180 - (rotation % 180));
+
animation->start(QAbstractAnimation::DeleteWhenStopped);
#endif
}
+
+ void animatedYFlip()
+ {
+ emit flipRequest();
+ }
+
+signals:
+ void flipRequest();
+
private:
QGraphicsWidget* m_mainWidget;
};
@@ -125,9 +191,8 @@ public:
SharedScene()
{
m_scene = new QGraphicsScene;
-
- m_item = new QGraphicsWebView;
- m_item->setPage(new WebPage());
+ m_item = new WebView;
+ m_item->setPage((m_page = new WebPage));
m_scene->addItem(m_item);
m_scene->setActiveWindow(m_item);
@@ -137,29 +202,34 @@ public:
{
delete m_item;
delete m_scene;
+ delete m_page;
}
QGraphicsScene* scene() const { return m_scene; }
- QGraphicsWebView* webView() const { return m_item; }
+ WebView* webView() const { return m_item; }
private:
QGraphicsScene* m_scene;
- QGraphicsWebView* m_item;
+ WebView* m_item;
+ WebPage* m_page;
};
-
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow(QExplicitlySharedDataPointer<SharedScene> other)
- : QMainWindow(), view(new MainView(this)), scene(other)
+ : QMainWindow()
+ , view(new MainView(this))
+ , scene(other)
{
init();
}
MainWindow()
- : QMainWindow(), view(new MainView(this)), scene(new SharedScene())
+ : QMainWindow()
+ , view(new MainView(this))
+ , scene(new SharedScene())
{
init();
}
@@ -169,8 +239,7 @@ public:
setAttribute(Qt::WA_DeleteOnClose);
view->setScene(scene->scene());
- view->setFrameShape(QFrame::NoFrame);
- view->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+
setCentralWidget(view);
view->setMainWidget(scene->webView());
@@ -179,6 +248,30 @@ public:
connect(scene->webView(), SIGNAL(titleChanged(const QString&)), this, SLOT(setWindowTitle(const QString&)));
connect(scene->webView()->page(), SIGNAL(windowCloseRequested()), this, SLOT(close()));
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ QStateMachine *machine = new QStateMachine(this);
+ QState *s0 = new QState(machine);
+ s0->assignProperty(scene->webView(), "yRotation", 0);
+
+ QState *s1 = new QState(machine);
+ s1->assignProperty(scene->webView(), "yRotation", 90);
+
+ QAbstractTransition *t1 = s0->addTransition(view, SIGNAL(flipRequest()), s1);
+ QPropertyAnimation *yRotationAnim = new QPropertyAnimation(scene->webView(), "yRotation", this);
+ yRotationAnim->setDuration(1000);
+ t1->addAnimation(yRotationAnim);
+
+ QState *s2 = new QState(machine);
+ s2->assignProperty(scene->webView(), "yRotation", -90);
+ s1->addTransition(s1, SIGNAL(polished()), s2);
+
+ QAbstractTransition *t2 = s2->addTransition(s0);
+ t2->addAnimation(yRotationAnim);
+
+ machine->setInitialState(s0);
+ machine->start();
+#endif
+
resize(640, 480);
buildUI();
}
@@ -245,6 +338,16 @@ public slots:
mw->show();
}
+ void setWaitCursor()
+ {
+ view->setWaitCursor();
+ }
+
+ void resetCursor()
+ {
+ view->resetCursor();
+ }
+
void flip()
{
view->flip();
@@ -254,6 +357,12 @@ public slots:
{
view->animatedFlip();
}
+
+ void animatedYFlip()
+ {
+ view->animatedYFlip();
+ }
+
private:
void buildUI()
{
@@ -278,9 +387,14 @@ private:
viewMenu->addAction(page->action(QWebPage::Stop));
viewMenu->addAction(page->action(QWebPage::Reload));
+ QMenu* testMenu = menuBar()->addMenu("&Tests");
+ testMenu->addAction("Set Wait Cursor", this, SLOT(setWaitCursor()), QKeySequence("Ctrl+W"));
+ testMenu->addAction("Reset Cursor", this, SLOT(resetCursor()), QKeySequence("Ctrl+Shift+W"));
+
QMenu* fxMenu = menuBar()->addMenu("&Effects");
fxMenu->addAction("Flip", this, SLOT(flip()));
- fxMenu->addAction("Animated Flip", this, SLOT(animatedFlip()));
+ fxMenu->addAction("Animated Flip", this, SLOT(animatedFlip()), QKeySequence("Ctrl+R"));
+ fxMenu->addAction("Animated Y-Flip", this, SLOT(animatedYFlip()), QKeySequence("Ctrl+Y"));
}
private:
@@ -297,16 +411,6 @@ QWebPage* WebPage::createWindow(QWebPage::WebWindowType)
return mw->page();
}
-void WebPage::applyProxy()
-{
- QUrl proxyUrl = QWebView::guessUrlFromString(qgetenv("http_proxy"));
-
- if (proxyUrl.isValid() && !proxyUrl.host().isEmpty()) {
- int proxyPort = (proxyUrl.port() > 0) ? proxyUrl.port() : 8080;
- networkAccessManager()->setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, proxyUrl.host(), proxyPort));
- }
-}
-
int main(int argc, char** argv)
{
QApplication app(argc, argv);
diff --git a/WebKit/qt/QtLauncher/QtLauncher.pro b/WebKit/qt/QtLauncher/QtLauncher.pro
index 5b10dea..133869c 100644
--- a/WebKit/qt/QtLauncher/QtLauncher.pro
+++ b/WebKit/qt/QtLauncher/QtLauncher.pro
@@ -10,4 +10,7 @@ QT += network
macx:QT+=xml
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-symbian:TARGET.UID3 = 0xA000E543
+symbian {
+ TARGET.UID3 = 0xA000E543
+ TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
+}
diff --git a/WebKit/qt/QtLauncher/main.cpp b/WebKit/qt/QtLauncher/main.cpp
index 8cc8a09..e3c6116 100644
--- a/WebKit/qt/QtLauncher/main.cpp
+++ b/WebKit/qt/QtLauncher/main.cpp
@@ -34,6 +34,7 @@
#include <qwebview.h>
#include <qwebframe.h>
#include <qwebsettings.h>
+#include <qwebplugindatabase.h>
#include <qwebelement.h>
#include <qwebinspector.h>
@@ -232,6 +233,16 @@ protected slots:
formatMenuAction->setVisible(on);
}
+ void dumpPlugins() {
+ QList<QWebPluginInfo> plugins = QWebSettings::pluginDatabase()->plugins();
+ foreach (const QWebPluginInfo plugin, plugins) {
+ qDebug() << "Plugin:" << plugin.name();
+ foreach (const QWebPluginInfo::MimeType mime, plugin.mimeTypes()) {
+ qDebug() << " " << mime.name;
+ }
+ }
+ }
+
void dumpHtml() {
qDebug() << "HTML: " << view->page()->mainFrame()->toHtml();
}
@@ -242,7 +253,7 @@ protected slots:
QLineEdit::Normal, "a", &ok);
if (ok && !str.isEmpty()) {
- QList<QWebElement> result = view->page()->mainFrame()->findAllElements(str);
+ QWebElementCollection result = view->page()->mainFrame()->findAllElements(str);
foreach (QWebElement e, result)
e.setStyleProperty("background-color", "yellow");
statusBar()->showMessage(QString("%1 element(s) selected").arg(result.count()), 5000);
@@ -292,7 +303,7 @@ private:
QMenu *fileMenu = menuBar()->addMenu("&File");
QAction *newWindow = fileMenu->addAction("New Window", this, SLOT(newWindow()));
#if QT_VERSION >= 0x040400
- fileMenu->addAction(tr("Print"), this, SLOT(print()));
+ fileMenu->addAction(tr("Print"), this, SLOT(print()), QKeySequence::Print);
#endif
QAction* screenshot = fileMenu->addAction("Screenshot", this, SLOT(screenshot()));
fileMenu->addAction("Close", this, SLOT(close()));
@@ -320,6 +331,7 @@ private:
zoomTextOnly->setChecked(false);
viewMenu->addSeparator();
viewMenu->addAction("Dump HTML", this, SLOT(dumpHtml()));
+ viewMenu->addAction("Dump plugins", this, SLOT(dumpPlugins()));
QMenu *formatMenu = new QMenu("F&ormat", this);
formatMenuAction = menuBar()->addMenu(formatMenu);
diff --git a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index 5d5df97..34241f0 100644
--- a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -41,6 +41,7 @@
#include "FocusController.h"
#include "Frame.h"
#include "HTMLElement.h"
+#include "HTMLInputElement.h"
#include "HTMLNames.h"
#include "KeyboardCodes.h"
#include "KeyboardEvent.h"
@@ -48,6 +49,7 @@
#include "Page.h"
#include "Page.h"
#include "PlatformKeyboardEvent.h"
+#include "QWebPageClient.h"
#include "Range.h"
#include <stdio.h>
@@ -596,10 +598,26 @@ bool EditorClientQt::isEditing() const
void EditorClientQt::setInputMethodState(bool active)
{
- QWidget *view = m_page->view();
- if (view)
- view->setAttribute(Qt::WA_InputMethodEnabled, active);
-
+ QWebPageClient* webPageClient = m_page->d->client;
+ if (webPageClient) {
+#if QT_VERSION >= 0x040600
+ bool isPasswordField = false;
+ if (!active) {
+ // Setting the Qt::WA_InputMethodEnabled attribute true and Qt::ImhHiddenText flag
+ // for password fields. The Qt platform is responsible for determining which widget
+ // will receive input method events for password fields.
+ Frame* frame = m_page->d->page->focusController()->focusedOrMainFrame();
+ if (frame && frame->document() && frame->document()->focusedNode()) {
+ if (frame->document()->focusedNode()->hasTagName(HTMLNames::inputTag)) {
+ HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(frame->document()->focusedNode());
+ active = isPasswordField = inputElement->isPasswordField();
+ }
+ }
+ }
+ webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField);
+#endif
+ webPageClient->setInputMethodEnabled(active);
+ }
emit m_page->microFocusChanged();
}
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 665f16a..81ccbe8 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -214,12 +214,12 @@ void FrameLoaderClientQt::transitionToCommittedForNewPage()
QColor backgroundColor = brush.style() == Qt::SolidPattern ? brush.color() : QColor();
QWebPage* page = m_webFrame->page();
- const QSize fixedLayoutSize = page->fixedContentsSize();
+ const QSize preferredLayoutSize = page->preferredContentsSize();
m_frame->createView(m_webFrame->page()->viewportSize(),
backgroundColor, !backgroundColor.alpha(),
- fixedLayoutSize.isValid() ? IntSize(fixedLayoutSize) : IntSize(),
- fixedLayoutSize.isValid(),
+ preferredLayoutSize.isValid() ? IntSize(preferredLayoutSize) : IntSize(),
+ preferredLayoutSize.isValid(),
(ScrollbarMode)m_webFrame->scrollBarPolicy(Qt::Horizontal),
(ScrollbarMode)m_webFrame->scrollBarPolicy(Qt::Vertical));
}
@@ -378,7 +378,8 @@ void FrameLoaderClientQt::dispatchDidFinishLoad()
if (dumpFrameLoaderCallbacks)
printf("%s - didFinishLoadForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
- m_loadError = ResourceError(); // clears the previous error
+ // Clears the previous error.
+ m_loadError = ResourceError();
if (!m_webFrame)
return;
@@ -432,6 +433,8 @@ void FrameLoaderClientQt::revertToProvisionalState(DocumentLoader*)
void FrameLoaderClientQt::postProgressStartedNotification()
{
if (m_webFrame && m_frame->page()) {
+ // A new load starts, so lets clear the previous error.
+ m_loadError = ResourceError();
emit loadStarted();
postProgressEstimateChangedNotification();
}
@@ -1230,9 +1233,12 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
if (object) {
QWidget* widget = qobject_cast<QWidget*>(object);
if (widget) {
- QWidget* parentWidget = qobject_cast<QWidget*>(m_webFrame->page()->d->client->pluginParent());
- if (parentWidget)
- widget->setParent(parentWidget);
+ QWidget* parentWidget;
+ if (m_webFrame->page()->d->client)
+ parentWidget = qobject_cast<QWidget*>(m_webFrame->page()->d->client->pluginParent());
+ else
+ parentWidget = 0; // The plug-in won't be fully functional because the QWebView doesn't exist.
+ widget->setParent(parentWidget);
RefPtr<QtPluginWidget> w = adoptRef(new QtPluginWidget());
w->setPlatformWidget(widget);
// Make sure it's invisible until properly placed into the layout
@@ -1242,8 +1248,13 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
#if QT_VERSION >= 0x040600
QGraphicsWidget* graphicsWidget = qobject_cast<QGraphicsWidget*>(object);
if (graphicsWidget) {
+ QGraphicsObject* parentWidget;
+ if (m_webFrame->page()->d->client)
+ parentWidget = qobject_cast<QGraphicsObject*>(m_webFrame->page()->d->client->pluginParent());
+ else
+ parentWidget = 0; // The plug-in won't be fully functional because the QWebView doesn't exist.
graphicsWidget->hide();
- graphicsWidget->setParentItem(qobject_cast<QGraphicsObject*>(m_webFrame->page()->d->client->pluginParent()));
+ graphicsWidget->setParentItem(parentWidget);
RefPtr<QtPluginGraphicsWidget> w = QtPluginGraphicsWidget::create(graphicsWidget);
// Make sure it's invisible until properly placed into the layout
w->setFrameRect(IntRect(0, 0, 0, 0));
diff --git a/WebKit/qt/tests/benchmarks/loading/tst_loading.pro b/WebKit/qt/tests/benchmarks/loading/tst_loading.pro
index 80717c2..bc5e75f 100644
--- a/WebKit/qt/tests/benchmarks/loading/tst_loading.pro
+++ b/WebKit/qt/tests/benchmarks/loading/tst_loading.pro
@@ -5,4 +5,7 @@ SOURCES += tst_loading.cpp
QT += testlib network
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-symbian:TARGET.UID3 = 0xA000E541
+symbian {
+ TARGET.UID3 = 0xA000E541
+ TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
+}
diff --git a/WebKit/qt/tests/benchmarks/painting/tst_painting.pro b/WebKit/qt/tests/benchmarks/painting/tst_painting.pro
index f45d804..48c7072 100644
--- a/WebKit/qt/tests/benchmarks/painting/tst_painting.pro
+++ b/WebKit/qt/tests/benchmarks/painting/tst_painting.pro
@@ -5,4 +5,7 @@ SOURCES += tst_painting.cpp
QT += testlib network
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-symbian:TARGET.UID3 = 0xA000E542
+symbian {
+ TARGET.UID3 = 0xA000E542
+ TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
+}
diff --git a/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro b/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro
index cba6f11..57b4437 100644
--- a/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro
+++ b/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro
@@ -4,3 +4,7 @@ include(../../../../WebKit.pri)
SOURCES += tst_qgraphicswebview.cpp
QT += testlib network
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
+
+symbian {
+ TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
+}
diff --git a/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp b/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
index 1a57286..4bdb7f5 100644
--- a/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
+++ b/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
@@ -19,7 +19,33 @@
#include <QtTest/QtTest>
+#include <QGraphicsView>
#include <qgraphicswebview.h>
+#include <qwebpage.h>
+#include <qwebframe.h>
+
+/**
+ * Starts an event loop that runs until the given signal is received.
+ * Optionally the event loop
+ * can return earlier on a timeout.
+ *
+ * \return \p true if the requested signal was received
+ * \p false on timeout
+ */
+static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000)
+{
+ QEventLoop loop;
+ QObject::connect(obj, signal, &loop, SLOT(quit()));
+ QTimer timer;
+ QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
+ if (timeout > 0) {
+ QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
+ timer.setSingleShot(true);
+ timer.start(timeout);
+ }
+ loop.exec();
+ return timeoutSpy.isEmpty();
+}
class tst_QGraphicsWebView : public QObject
{
@@ -27,6 +53,7 @@ class tst_QGraphicsWebView : public QObject
private slots:
void qgraphicswebview();
+ void crashOnViewlessWebPages();
};
void tst_QGraphicsWebView::qgraphicswebview()
@@ -53,6 +80,55 @@ void tst_QGraphicsWebView::qgraphicswebview()
item.setContent(QByteArray());
}
+class WebPage : public QWebPage
+{
+ Q_OBJECT
+
+public:
+ WebPage(QObject* parent = 0): QWebPage(parent)
+ {
+ }
+
+ QGraphicsWebView* webView;
+
+private slots:
+ // Force a webview deletion during the load.
+ // It should not cause WebPage to crash due to
+ // it accessing invalid pageClient pointer.
+ void aborting()
+ {
+ delete webView;
+ }
+};
+
+void tst_QGraphicsWebView::crashOnViewlessWebPages()
+{
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+
+ QGraphicsWebView* webView = new QGraphicsWebView;
+ WebPage* page = new WebPage;
+ webView->setPage(page);
+ page->webView = webView;
+ connect(page->mainFrame(), SIGNAL(initialLayoutCompleted()), page, SLOT(aborting()));
+
+ scene.addItem(webView);
+
+ view.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ view.resize(600, 480);
+ webView->resize(view.geometry().size());
+ QTest::qWait(200);
+ view.show();
+
+ page->mainFrame()->setHtml(QString("data:text/html,"
+ "<frameset cols=\"25%,75%\">"
+ "<frame src=\"data:text/html,foo \">"
+ "<frame src=\"data:text/html,bar\">"
+ "</frameset>"));
+
+ QVERIFY(::waitForSignal(page, SIGNAL(loadFinished(bool))));
+}
+
QTEST_MAIN(tst_QGraphicsWebView)
#include "tst_qgraphicswebview.moc"
diff --git a/WebKit/qt/tests/qwebelement/image.png b/WebKit/qt/tests/qwebelement/image.png
new file mode 100644
index 0000000..8d70364
--- /dev/null
+++ b/WebKit/qt/tests/qwebelement/image.png
Binary files differ
diff --git a/WebKit/qt/tests/qwebelement/qwebelement.pro b/WebKit/qt/tests/qwebelement/qwebelement.pro
index 0a140ad..c45a9ac 100644
--- a/WebKit/qt/tests/qwebelement/qwebelement.pro
+++ b/WebKit/qt/tests/qwebelement/qwebelement.pro
@@ -6,4 +6,7 @@ RESOURCES += qwebelement.qrc
QT += testlib network
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-symbian:TARGET.UID3 = 0xA000E53A
+symbian {
+ TARGET.UID3 = 0xA000E53A
+ TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
+}
diff --git a/WebKit/qt/tests/qwebelement/qwebelement.qrc b/WebKit/qt/tests/qwebelement/qwebelement.qrc
index ed01440..28b9d7b 100644
--- a/WebKit/qt/tests/qwebelement/qwebelement.qrc
+++ b/WebKit/qt/tests/qwebelement/qwebelement.qrc
@@ -2,5 +2,6 @@
<qresource prefix="/">
<file>style.css</file>
<file>style2.css</file>
+<file>image.png</file>
</qresource>
</RCC>
diff --git a/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp b/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
index 00783d1..cf83fe8 100644
--- a/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
+++ b/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
@@ -70,7 +70,10 @@ private slots:
void attributesNS();
void classes();
void namespaceURI();
+ void iteration();
void foreachManipulation();
+ void emptyCollection();
+ void appendCollection();
void evaluateJavaScript();
void documentElement();
void frame();
@@ -87,6 +90,7 @@ private slots:
void firstChildNextSibling();
void lastChildPreviousSibling();
void hasSetFocus();
+ void render();
private:
QWebView* m_view;
@@ -133,7 +137,7 @@ void tst_QWebElement::simpleCollection()
m_mainFrame->setHtml(html);
QWebElement body = m_mainFrame->documentElement();
- QList<QWebElement> list = body.findAll("p");
+ QWebElementCollection list = body.findAll("p");
QCOMPARE(list.count(), 2);
QCOMPARE(list.at(0).toPlainText(), QString("first para"));
QCOMPARE(list.at(1).toPlainText(), QString("second para"));
@@ -266,6 +270,41 @@ void tst_QWebElement::namespaceURI()
}
+void tst_QWebElement::iteration()
+{
+ QString html = "<body><p>first para</p><p>second para</p></body>";
+ m_mainFrame->setHtml(html);
+ QWebElement body = m_mainFrame->documentElement();
+
+ QWebElementCollection paras = body.findAll("p");
+ QList<QWebElement> referenceList = paras.toList();
+
+ QList<QWebElement> foreachList;
+ foreach(QWebElement p, paras) {
+ foreachList.append(p);
+ }
+ QVERIFY(foreachList.count() == 2);
+ QCOMPARE(foreachList.count(), referenceList.count());
+ QCOMPARE(foreachList.at(0), referenceList.at(0));
+ QCOMPARE(foreachList.at(1), referenceList.at(1));
+
+ QList<QWebElement> forLoopList;
+ for (int i = 0; i < paras.count(); ++i) {
+ forLoopList.append(paras.at(i));
+ }
+ QVERIFY(foreachList.count() == 2);
+ QCOMPARE(foreachList.count(), referenceList.count());
+ QCOMPARE(foreachList.at(0), referenceList.at(0));
+ QCOMPARE(foreachList.at(1), referenceList.at(1));
+
+ for (int i = 0; i < paras.count(); ++i) {
+ QCOMPARE(paras.at(i), paras[i]);
+ }
+
+ QCOMPARE(paras.at(0), paras.first());
+ QCOMPARE(paras.at(1), paras.last());
+}
+
void tst_QWebElement::foreachManipulation()
{
QString html = "<body><p>first para</p><p>second para</p></body>";
@@ -279,6 +318,43 @@ void tst_QWebElement::foreachManipulation()
QCOMPARE(body.findAll("div").count(), 4);
}
+void tst_QWebElement::emptyCollection()
+{
+ QWebElementCollection emptyCollection;
+ QCOMPARE(emptyCollection.count(), 0);
+}
+
+void tst_QWebElement::appendCollection()
+{
+ QString html = "<body><span class='a'>aaa</span><p>first para</p><div>foo</div>"
+ "<span class='b'>bbb</span><p>second para</p><div>bar</div></body>";
+ m_mainFrame->setHtml(html);
+ QWebElement body = m_mainFrame->documentElement();
+
+ QWebElementCollection collection = body.findAll("p");
+ QCOMPARE(collection.count(), 2);
+
+ collection.append(body.findAll("div"));
+ QCOMPARE(collection.count(), 4);
+
+ collection += body.findAll("span.a");
+ QCOMPARE(collection.count(), 5);
+
+ QWebElementCollection all = collection + body.findAll("span.b");
+ QCOMPARE(all.count(), 6);
+ QCOMPARE(collection.count(), 5);
+
+ all += collection;
+ QCOMPARE(all.count(), 11);
+
+ QCOMPARE(collection.count(), 5);
+ QWebElementCollection test;
+ test.append(collection);
+ QCOMPARE(test.count(), 5);
+ test.append(QWebElementCollection());
+ QCOMPARE(test.count(), 5);
+}
+
void tst_QWebElement::evaluateJavaScript()
{
QVariant result;
@@ -628,7 +704,7 @@ void tst_QWebElement::clear()
QCOMPARE(body.findAll("div").count(), 1);
QCOMPARE(body.findAll("p").count(), 3);
- body.findFirst("div").removeChildren();
+ body.findFirst("div").removeAllChildren();
QCOMPARE(body.findAll("div").count(), 1);
QCOMPARE(body.findAll("p").count(), 2);
}
@@ -772,7 +848,7 @@ void tst_QWebElement::nullSelect()
{
m_mainFrame->setHtml("<body><p>Test");
- QList<QWebElement> collection = m_mainFrame->findAllElements("invalid{syn(tax;;%#$f223e>>");
+ QWebElementCollection collection = m_mainFrame->findAllElements("invalid{syn(tax;;%#$f223e>>");
QVERIFY(collection.count() == 0);
}
@@ -814,7 +890,7 @@ void tst_QWebElement::hasSetFocus()
"<input type='text' id='input2'/>" \
"</body></html>");
- QList<QWebElement> inputs = m_mainFrame->documentElement().findAll("input");
+ QWebElementCollection inputs = m_mainFrame->documentElement().findAll("input");
QWebElement input1 = inputs.at(0);
input1.setFocus();
QVERIFY(input1.hasFocus());
@@ -825,5 +901,81 @@ void tst_QWebElement::hasSetFocus()
QVERIFY(input2.hasFocus());
}
+void tst_QWebElement::render()
+{
+ QString html( "<html>"
+ "<head><style>"
+ "body, iframe { margin: 0px; border: none; }"
+ "</style></head>"
+ "<body><table width='300px' height='300px' border='1'>"
+ "<tr>"
+ "<td>test"
+ "</td>"
+ "<td><img src='qrc:///image.png'>"
+ "</td>"
+ "</tr>"
+ "</table>"
+ "</body>"
+ "</html>"
+ );
+
+ QWebPage page;
+ QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
+ page.mainFrame()->setHtml(html);
+
+ waitForSignal(&page, SIGNAL(loadFinished(bool)));
+ QCOMPARE(loadSpy.count(), 1);
+
+ QSize size = page.mainFrame()->contentsSize();
+ page.setViewportSize(size);
+
+ QWebElementCollection imgs = page.mainFrame()->findAllElements("img");
+ QCOMPARE(imgs.count(), 1);
+
+ QImage resource(":/image.png");
+ QRect imageRect(0, 0, resource.width(), resource.height());
+
+ QImage testImage(resource.width(), resource.height(), QImage::Format_ARGB32);
+ QPainter painter0(&testImage);
+ painter0.fillRect(imageRect, Qt::white);
+ painter0.drawImage(0, 0, resource);
+ painter0.end();
+
+ QImage image1(resource.width(), resource.height(), QImage::Format_ARGB32);
+ QPainter painter1(&image1);
+ painter1.fillRect(imageRect, Qt::white);
+ imgs[0].render(&painter1);
+ painter1.end();
+
+ QVERIFY(image1 == testImage);
+
+ // render image 2nd time to make sure that cached rendering works fine
+ QImage image2(resource.width(), resource.height(), QImage::Format_ARGB32);
+ QPainter painter2(&image2);
+ painter2.fillRect(imageRect, Qt::white);
+ imgs[0].render(&painter2);
+ painter2.end();
+
+ QVERIFY(image2 == testImage);
+
+ // compare table rendered through QWebElement::render to whole page table rendering
+ QRect tableRect(0, 0, 300, 300);
+ QWebElementCollection tables = page.mainFrame()->findAllElements("table");
+ QCOMPARE(tables.count(), 1);
+
+ QImage image3(300, 300, QImage::Format_ARGB32);
+ QPainter painter3(&image3);
+ painter3.fillRect(tableRect, Qt::white);
+ tables[0].render(&painter3);
+ painter3.end();
+
+ QImage image4(300, 300, QImage::Format_ARGB32);
+ QPainter painter4(&image4);
+ page.mainFrame()->render(&painter4, tableRect);
+ painter4.end();
+
+ QVERIFY(image3 == image4);
+}
+
QTEST_MAIN(tst_QWebElement)
#include "tst_qwebelement.moc"
diff --git a/WebKit/qt/tests/qwebframe/qwebframe.pro b/WebKit/qt/tests/qwebframe/qwebframe.pro
index 4c92e91..0e540e5 100644
--- a/WebKit/qt/tests/qwebframe/qwebframe.pro
+++ b/WebKit/qt/tests/qwebframe/qwebframe.pro
@@ -7,4 +7,7 @@ QT += testlib network
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
DEFINES += SRCDIR=\\\"$$PWD/resources\\\"
-symbian:TARGET.UID3 = 0xA000E53D
+symbian {
+ TARGET.UID3 = 0xA000E53D
+ TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
+}
diff --git a/WebKit/qt/tests/qwebframe/resources/image2.png b/WebKit/qt/tests/qwebframe/resources/image2.png
new file mode 100644
index 0000000..8d70364
--- /dev/null
+++ b/WebKit/qt/tests/qwebframe/resources/image2.png
Binary files differ
diff --git a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index 80c9d72..7cc62b0 100644
--- a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -2691,26 +2691,24 @@ void tst_QWebFrame::render()
QPicture picture;
- // render clipping to Viewport
- frame->setClipRenderToViewport(true);
+ QSize size = page.mainFrame()->contentsSize();
+ page.setViewportSize(size);
+
+ // render contents layer only (the iframe is smaller than the image, so it will have scrollbars)
QPainter painter1(&picture);
- frame->render(&painter1);
+ frame->render(&painter1, QWebFrame::ContentsLayer);
painter1.end();
- QSize size = page.mainFrame()->contentsSize();
- page.setViewportSize(size);
- QCOMPARE(size.width(), picture.boundingRect().width()); // 100px
- QCOMPARE(size.height(), picture.boundingRect().height()); // 100px
+ QCOMPARE(size.width(), picture.boundingRect().width() + frame->scrollBarGeometry(Qt::Vertical).width());
+ QCOMPARE(size.height(), picture.boundingRect().height() + frame->scrollBarGeometry(Qt::Horizontal).height());
- // render without clipping to Viewport
- frame->setClipRenderToViewport(false);
+ // render everything, should be the size of the iframe
QPainter painter2(&picture);
- frame->render(&painter2);
+ frame->render(&painter2, QWebFrame::AllLayers);
painter2.end();
- QImage resource(":/image.png");
- QCOMPARE(resource.width(), picture.boundingRect().width()); // resource width: 128px
- QCOMPARE(resource.height(), picture.boundingRect().height()); // resource height: 128px
+ QCOMPARE(size.width(), picture.boundingRect().width()); // width: 100px
+ QCOMPARE(size.height(), picture.boundingRect().height()); // height: 100px
}
void tst_QWebFrame::scrollPosition()
diff --git a/WebKit/qt/tests/qwebhistory/qwebhistory.pro b/WebKit/qt/tests/qwebhistory/qwebhistory.pro
index 8ee63cc..7445e3b 100644
--- a/WebKit/qt/tests/qwebhistory/qwebhistory.pro
+++ b/WebKit/qt/tests/qwebhistory/qwebhistory.pro
@@ -6,4 +6,7 @@ RESOURCES += tst_qwebhistory.qrc
QT += testlib network
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-symbian:TARGET.UID3 = 0xA000E53B
+symbian {
+ TARGET.UID3 = 0xA000E53B
+ TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
+}
diff --git a/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp b/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
index 4f4d3c4..ec2d497 100644
--- a/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
+++ b/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
@@ -56,9 +56,6 @@ private slots:
void serialize_1(); //QWebHistory countity
void serialize_2(); //QWebHistory index
void serialize_3(); //QWebHistoryItem
- void saveAndRestore_1(); //simple checks saveState and restoreState
- void saveAndRestore_2(); //bad parameters saveState and restoreState
- void saveAndRestore_3(); //try use different version
void saveAndRestore_crash_1();
void saveAndRestore_crash_2();
void saveAndRestore_crash_3();
@@ -294,67 +291,40 @@ void tst_QWebHistory::serialize_3()
QVERIFY(load.atEnd());
}
-/** Simple checks should be a bit redundant to streaming operators */
-void tst_QWebHistory::saveAndRestore_1()
+static void saveHistory(QWebHistory* history, QByteArray* in)
{
- QAction* actionBack = page->action(QWebPage::Back);
- hist->back();
- waitForLoadFinished.exec();
- QVERIFY(actionBack->isEnabled());
- QByteArray buffer(hist->saveState());
- hist->clear();
- QVERIFY(!actionBack->isEnabled());
- QVERIFY(hist->count() == 1);
- hist->restoreState(buffer);
-
- //check only few values, do not make full test
- //because most of the code is shared with streaming operators
- //and these are checked before
- QCOMPARE(hist->count(), histsize);
- QCOMPARE(hist->currentItemIndex(), histsize - 2);
- QCOMPARE(hist->itemAt(0).title(), QString("page1"));
- QCOMPARE(hist->itemAt(histsize - 1).title(), QString("page") + QString::number(histsize));
- QVERIFY(actionBack->isEnabled());
+ in->clear();
+ QDataStream save(in, QIODevice::WriteOnly);
+ save << *history;
}
-/** Check returns value if there are bad parameters. Actually, result
- * is no so importent. The test shouldn't crash :-) */
-void tst_QWebHistory::saveAndRestore_2()
+static void restoreHistory(QWebHistory* history, QByteArray* out)
{
- QByteArray buffer;
- hist->restoreState(buffer);
- QVERIFY(hist->count() == 1);
- QVERIFY(hist->itemAt(0).isValid());
-}
-
-/** Try to use bad version value */
-void tst_QWebHistory::saveAndRestore_3()
-{
- QByteArray tmp = hist->saveState((QWebHistory::HistoryStateVersion)29999);
- QVERIFY(hist->saveState((QWebHistory::HistoryStateVersion)29999).isEmpty());
- QVERIFY(hist->count() == histsize);
- QVERIFY(hist->itemAt(3).isValid());
+ QDataStream load(out, QIODevice::ReadOnly);
+ load >> *history;
}
/** The test shouldn't crash */
void tst_QWebHistory::saveAndRestore_crash_1()
{
- QByteArray tmp = hist->saveState();
- for (unsigned i = 0; i < 5; i++){
- hist->restoreState(tmp);
- hist->saveState();
+ QByteArray buffer;
+ saveHistory(hist, &buffer);
+ for (unsigned i = 0; i < 5; i++) {
+ restoreHistory(hist, &buffer);
+ saveHistory(hist, &buffer);
}
}
/** The test shouldn't crash */
void tst_QWebHistory::saveAndRestore_crash_2()
{
- QByteArray tmp = hist->saveState();
+ QByteArray buffer;
+ saveHistory(hist, &buffer);
QWebPage* page2 = new QWebPage(this);
QWebHistory* hist2 = page2->history();
- for (unsigned i = 0; i < 5; i++){
- hist2->restoreState(tmp);
- hist2->saveState();
+ for (unsigned i = 0; i < 5; i++) {
+ restoreHistory(hist2, &buffer);
+ saveHistory(hist2, &buffer);
}
delete page2;
}
@@ -362,17 +332,18 @@ void tst_QWebHistory::saveAndRestore_crash_2()
/** The test shouldn't crash */
void tst_QWebHistory::saveAndRestore_crash_3()
{
- QByteArray tmp = hist->saveState();
+ QByteArray buffer;
+ saveHistory(hist, &buffer);
QWebPage* page2 = new QWebPage(this);
QWebHistory* hist1 = hist;
QWebHistory* hist2 = page2->history();
- for (unsigned i = 0; i < 5; i++){
- hist1->restoreState(tmp);
- hist2->restoreState(tmp);
+ for (unsigned i = 0; i < 5; i++) {
+ restoreHistory(hist1, &buffer);
+ restoreHistory(hist2, &buffer);
QVERIFY(hist1->count() == hist2->count());
QVERIFY(hist1->count() == histsize);
hist2->back();
- tmp = hist2->saveState();
+ saveHistory(hist2, &buffer);
hist2->clear();
}
delete page2;
@@ -381,15 +352,16 @@ void tst_QWebHistory::saveAndRestore_crash_3()
/** ::clear */
void tst_QWebHistory::clear()
{
+ QByteArray buffer;
+
QAction* actionBack = page->action(QWebPage::Back);
QVERIFY(actionBack->isEnabled());
- hist->saveState();
+ saveHistory(hist, &buffer);
QVERIFY(hist->count() > 1);
hist->clear();
QVERIFY(hist->count() == 1); // Leave current item.
QVERIFY(!actionBack->isEnabled());
-
QWebPage* page2 = new QWebPage(this);
QWebHistory* hist2 = page2->history();
QVERIFY(hist2->count() == 0);
diff --git a/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro b/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro
index 53e1afe..764f806 100644
--- a/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro
+++ b/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro
@@ -5,4 +5,7 @@ SOURCES += tst_qwebhistoryinterface.cpp
QT += testlib network
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-symbian:TARGET.UID3 = 0xA000E53C
+symbian {
+ TARGET.UID3 = 0xA000E53C
+ TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
+}
diff --git a/WebKit/qt/tests/qwebpage/qwebpage.pro b/WebKit/qt/tests/qwebpage/qwebpage.pro
index 82ffac6..6b28efd 100644
--- a/WebKit/qt/tests/qwebpage/qwebpage.pro
+++ b/WebKit/qt/tests/qwebpage/qwebpage.pro
@@ -5,5 +5,9 @@ SOURCES += tst_qwebpage.cpp
RESOURCES += tst_qwebpage.qrc
QT += testlib network
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
+DEFINES += SRCDIR=\\\"$$PWD/\\\"
-symbian:TARGET.UID3 = 0xA000E53E
+symbian {
+ TARGET.UID3 = 0xA000E53E
+ TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
+}
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index a9f9f16..0cf85ee 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -1,5 +1,6 @@
/*
Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -23,6 +24,7 @@
#include <qwebelement.h>
#include <qwebpage.h>
#include <qwidget.h>
+#include <QGraphicsWidget>
#include <qwebview.h>
#include <qwebframe.h>
#include <qwebhistory.h>
@@ -33,6 +35,7 @@
#include <qwebsecurityorigin.h>
#include <qwebdatabase.h>
#include <QPushButton>
+#include <QDir>
// Will try to wait for the condition while allowing event processing
#define QTRY_COMPARE(__expr, __expected) \
@@ -101,7 +104,9 @@ private slots:
void contextMenuCrash();
void database();
void createPlugin();
+ void destroyPlugin_data();
void destroyPlugin();
+ void createViewlessPlugin_data();
void createViewlessPlugin();
void multiplePageGroupsAndLocalStorage();
void cursorMovements();
@@ -116,9 +121,14 @@ private slots:
void testEnablePersistentStorage();
void consoleOutput();
void inputMethods();
+ void defaultTextEncoding();
+ void errorPageExtension();
void crashTests_LazyInitializationOfMainFrame();
+ void screenshot_data();
+ void screenshot();
+
private:
QWebView* m_view;
QWebPage* m_page;
@@ -621,50 +631,93 @@ void tst_QWebPage::createPlugin()
QCOMPARE(newPage->calls.count(), 0);
}
-class PluginTrackedPage : public QWebPage
-{
+
+// Standard base class for template PluginTracerPage. In tests it is used as interface.
+class PluginCounterPage : public QWebPage {
public:
+ int m_count;
+ QPointer<QObject> m_widget;
+ PluginCounterPage(QObject* parent = 0) : QWebPage(parent), m_count(0), m_widget(0)
+ {
+ settings()->setAttribute(QWebSettings::PluginsEnabled, true);
+ }
+};
- int count;
- QPointer<QWidget> widget;
+template<class T>
+class PluginTracerPage : public PluginCounterPage {
+public:
+ PluginTracerPage(QObject* parent = 0) : PluginCounterPage(parent) {}
+ virtual QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&)
+ {
+ m_count++;
+ return m_widget = new T();
+ }
+};
- PluginTrackedPage(QWidget *parent = 0) : QWebPage(parent), count(0) {
- settings()->setAttribute(QWebSettings::PluginsEnabled, true);
+class PluginFactory {
+public:
+ enum FactoredType {QWidgetType, QGraphicsWidgetType};
+ static PluginCounterPage* create(FactoredType type, QObject* parent = 0)
+ {
+ PluginCounterPage* result = 0;
+ switch (type) {
+ case QWidgetType:
+ result = new PluginTracerPage<QWidget>(parent);
+ break;
+ case QGraphicsWidgetType:
+ result = new PluginTracerPage<QGraphicsWidget>(parent);
+ break;
+ default: {/*Oops*/};
+ }
+ return result;
}
- virtual QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&) {
- count++;
- QWidget *w = new QWidget;
- widget = w;
- return w;
+ static void prepareTestData()
+ {
+ QTest::addColumn<int>("type");
+ QTest::newRow("QWidget") << (int)PluginFactory::QWidgetType;
+ QTest::newRow("QGraphicsWidget") << (int)PluginFactory::QGraphicsWidgetType;
}
};
+void tst_QWebPage::destroyPlugin_data()
+{
+ PluginFactory::prepareTestData();
+}
+
void tst_QWebPage::destroyPlugin()
{
- PluginTrackedPage* page = new PluginTrackedPage(m_view);
+ QFETCH(int, type);
+ PluginCounterPage* page = PluginFactory::create((PluginFactory::FactoredType)type, m_view);
m_view->setPage(page);
// we create the plugin, so the widget should be constructed
QString content("<html><body><object type=\"application/x-qt-plugin\" classid=\"QProgressBar\"></object></body></html>");
m_view->setHtml(content);
- QVERIFY(page->widget != 0);
- QCOMPARE(page->count, 1);
+ QVERIFY(page->m_widget);
+ QCOMPARE(page->m_count, 1);
// navigate away, the plugin widget should be destructed
m_view->setHtml("<html><body>Hi</body></html>");
QTestEventLoop::instance().enterLoop(1);
- QVERIFY(page->widget == 0);
+ QVERIFY(!page->m_widget);
+}
+
+void tst_QWebPage::createViewlessPlugin_data()
+{
+ PluginFactory::prepareTestData();
}
void tst_QWebPage::createViewlessPlugin()
{
- PluginTrackedPage* page = new PluginTrackedPage;
+ QFETCH(int, type);
+ PluginCounterPage* page = PluginFactory::create((PluginFactory::FactoredType)type);
QString content("<html><body><object type=\"application/x-qt-plugin\" classid=\"QProgressBar\"></object></body></html>");
page->mainFrame()->setHtml(content);
- QCOMPARE(page->count, 1);
- QVERIFY(page->widget != 0);
+ QCOMPARE(page->m_count, 1);
+ QVERIFY(page->m_widget);
delete page;
+
}
// import private API
@@ -1212,11 +1265,12 @@ void tst_QWebPage::frameAt()
void tst_QWebPage::inputMethods()
{
m_view->page()->mainFrame()->setHtml("<html><body>" \
- "<input type='text' id='input1' style='font-family: serif' value='' maxlength='20'/>" \
+ "<input type='text' id='input1' style='font-family: serif' value='' maxlength='20'/><br>" \
+ "<input type='password'/>" \
"</body></html>");
m_view->page()->mainFrame()->setFocus();
- QList<QWebElement> inputs = m_view->page()->mainFrame()->documentElement().findAll("input");
+ QWebElementCollection inputs = m_view->page()->mainFrame()->documentElement().findAll("input");
QMouseEvent evpres(QEvent::MouseButtonPress, inputs.at(0).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
m_view->page()->event(&evpres);
@@ -1295,6 +1349,21 @@ void tst_QWebPage::inputMethods()
value = variant.value<QString>();
QCOMPARE(value, QString("QtWebKit"));
#endif
+
+ //ImhHiddenText
+ QMouseEvent evpresPassword(QEvent::MouseButtonPress, inputs.at(1).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
+ m_view->page()->event(&evpresPassword);
+ QMouseEvent evrelPassword(QEvent::MouseButtonRelease, inputs.at(1).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
+ m_view->page()->event(&evrelPassword);
+
+ QVERIFY(m_view->testAttribute(Qt::WA_InputMethodEnabled));
+#if QT_VERSION >= 0x040600
+ QVERIFY(m_view->inputMethodHints() & Qt::ImhHiddenText);
+
+ m_view->page()->event(&evpres);
+ m_view->page()->event(&evrel);
+ QVERIFY(!(m_view->inputMethodHints() & Qt::ImhHiddenText));
+#endif
}
// import a little DRT helper function to trigger the garbage collector
@@ -1400,6 +1469,79 @@ void tst_QWebPage::testEnablePersistentStorage()
QVERIFY(!webPage.settings()->iconDatabasePath().isEmpty());
}
+void tst_QWebPage::defaultTextEncoding()
+{
+ QWebFrame* mainFrame = m_page->mainFrame();
+
+ QString defaultCharset = mainFrame->evaluateJavaScript("document.defaultCharset").toString();
+ QVERIFY(!defaultCharset.isEmpty());
+ QCOMPARE(QWebSettings::globalSettings()->defaultTextEncoding(), defaultCharset);
+
+ m_page->settings()->setDefaultTextEncoding(QString("utf-8"));
+ QString charset = mainFrame->evaluateJavaScript("document.defaultCharset").toString();
+ QCOMPARE(charset, QString("utf-8"));
+ QCOMPARE(m_page->settings()->defaultTextEncoding(), charset);
+
+ m_page->settings()->setDefaultTextEncoding(QString());
+ charset = mainFrame->evaluateJavaScript("document.defaultCharset").toString();
+ QVERIFY(!charset.isEmpty());
+ QCOMPARE(charset, defaultCharset);
+
+ QWebSettings::globalSettings()->setDefaultTextEncoding(QString("utf-8"));
+ charset = mainFrame->evaluateJavaScript("document.defaultCharset").toString();
+ QCOMPARE(charset, QString("utf-8"));
+ QCOMPARE(QWebSettings::globalSettings()->defaultTextEncoding(), charset);
+}
+
+class ErrorPage : public QWebPage
+{
+public:
+
+ ErrorPage(QWidget* parent = 0): QWebPage(parent)
+ {
+ }
+
+ virtual bool supportsExtension(Extension extension) const
+ {
+ return extension == ErrorPageExtension;
+ }
+
+ virtual bool extension(Extension, const ExtensionOption* option, ExtensionReturn* output)
+ {
+ const ErrorPageExtensionOption* info = static_cast<const ErrorPageExtensionOption*>(option);
+ ErrorPageExtensionReturn* errorPage = static_cast<ErrorPageExtensionReturn*>(output);
+
+ if (info->frame == mainFrame()) {
+ errorPage->content = "data:text/html,error";
+ return true;
+ }
+
+ return false;
+ }
+};
+
+void tst_QWebPage::errorPageExtension()
+{
+ ErrorPage* page = new ErrorPage;
+ m_view->setPage(page);
+
+ QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool)));
+
+ page->mainFrame()->load(QUrl("qrc:///frametest/index.html"));
+ QTRY_COMPARE(spyLoadFinished.count(), 1);
+
+ page->mainFrame()->setUrl(QUrl("http://non.existent/url"));
+ QTest::qWait(2000);
+ QTRY_COMPARE(spyLoadFinished.count(), 2);
+ QCOMPARE(page->mainFrame()->toPlainText(), QString("data:text/html,error"));
+ QCOMPARE(page->history()->count(), 2);
+ QCOMPARE(page->history()->currentItem().url(), QUrl("http://non.existent/url"));
+ QCOMPARE(page->history()->canGoBack(), true);
+ QCOMPARE(page->history()->canGoForward(), false);
+
+ m_view->setPage(0);
+}
+
void tst_QWebPage::crashTests_LazyInitializationOfMainFrame()
{
{
@@ -1420,6 +1562,52 @@ void tst_QWebPage::crashTests_LazyInitializationOfMainFrame()
}
}
+static void takeScreenshot(QWebPage* page)
+{
+ QWebFrame* mainFrame = page->mainFrame();
+ page->setViewportSize(mainFrame->contentsSize());
+ QImage image(page->viewportSize(), QImage::Format_ARGB32);
+ QPainter painter(&image);
+ mainFrame->render(&painter);
+ painter.end();
+}
+
+void tst_QWebPage::screenshot_data()
+{
+ QTest::addColumn<QString>("html");
+ QTest::newRow("WithoutPlugin") << "<html><body id='b'>text</body></html>";
+ QTest::newRow("WindowedPlugin") << QString("<html><body id='b'>text<embed src='resources/test.swf'></embed></body></html>");
+ QTest::newRow("WindowlessPlugin") << QString("<html><body id='b'>text<embed src='resources/test.swf' wmode='transparent'></embed></body></html>");
+}
+
+void tst_QWebPage::screenshot()
+{
+ QDir::setCurrent(SRCDIR);
+
+ QFETCH(QString, html);
+ QWebPage* page = new QWebPage;
+ page->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
+ QWebFrame* mainFrame = page->mainFrame();
+ mainFrame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath()));
+ if (html.contains("</embed>")) {
+ // some reasonable time for the PluginStream to feed test.swf to flash and start painting
+ QTest::qWait(2000);
+ }
+
+ // take screenshot without a view
+ takeScreenshot(page);
+
+ QWebView* view = new QWebView;
+ view->setPage(page);
+
+ // take screenshot when attached to a view
+ takeScreenshot(page);
+
+ delete page;
+ delete view;
+
+ QDir::setCurrent(QApplication::applicationDirPath());
+}
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"
diff --git a/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro b/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro
index 1376ca5..569146a 100644
--- a/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro
+++ b/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro
@@ -5,4 +5,7 @@ SOURCES += tst_qwebplugindatabase.cpp
QT += testlib network
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-symbian:TARGET.UID3 = 0xA000E540
+symbian {
+ TARGET.UID3 = 0xA000E540
+ TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
+}
diff --git a/WebKit/qt/tests/qwebview/qwebview.pro b/WebKit/qt/tests/qwebview/qwebview.pro
index d9d122c..e67bb7a 100644
--- a/WebKit/qt/tests/qwebview/qwebview.pro
+++ b/WebKit/qt/tests/qwebview/qwebview.pro
@@ -4,5 +4,9 @@ include(../../../../WebKit.pri)
SOURCES += tst_qwebview.cpp
QT += testlib network
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
+DEFINES += SRCDIR=\\\"$$PWD/\\\"
-symbian:TARGET.UID3 = 0xA000E53F
+symbian {
+ TARGET.UID3 = 0xA000E53F
+ TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
+}
diff --git a/WebKit/qt/tests/qwebview/tst_qwebview.cpp b/WebKit/qt/tests/qwebview/tst_qwebview.cpp
index 01d0e92..9204223 100644
--- a/WebKit/qt/tests/qwebview/tst_qwebview.cpp
+++ b/WebKit/qt/tests/qwebview/tst_qwebview.cpp
@@ -1,6 +1,7 @@
/*
Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
Copyright (C) 2009 Torch Mobile Inc.
+ Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -26,6 +27,7 @@
#include <qnetworkrequest.h>
#include <qdiriterator.h>
#include <qwebkitversion.h>
+#include <qwebframe.h>
class tst_QWebView : public QObject
{
@@ -42,6 +44,9 @@ private slots:
void guessUrlFromString_data();
void guessUrlFromString();
void getWebKitVersion();
+
+ void reusePage_data();
+ void reusePage();
};
// This will be called before the first test function is executed.
@@ -167,6 +172,46 @@ void tst_QWebView::getWebKitVersion()
QVERIFY(qWebKitVersion().toDouble() > 0);
}
+void tst_QWebView::reusePage_data()
+{
+ QTest::addColumn<QString>("html");
+ QTest::newRow("WithoutPlugin") << "<html><body id='b'>text</body></html>";
+ QTest::newRow("WindowedPlugin") << QString("<html><body id='b'>text<embed src='resources/test.swf'></embed></body></html>");
+ QTest::newRow("WindowlessPlugin") << QString("<html><body id='b'>text<embed src='resources/test.swf' wmode=\"transparent\"></embed></body></html>");
+}
+
+void tst_QWebView::reusePage()
+{
+ QDir::setCurrent(SRCDIR);
+
+ QFETCH(QString, html);
+ QWebView* view1 = new QWebView;
+ QPointer<QWebPage> page = new QWebPage;
+ view1->setPage(page);
+ page->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
+ QWebFrame* mainFrame = page->mainFrame();
+ mainFrame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath()));
+ if (html.contains("</embed>")) {
+ // some reasonable time for the PluginStream to feed test.swf to flash and start painting
+ QTest::qWait(2000);
+ }
+
+ view1->show();
+ QTest::qWait(2000);
+ delete view1;
+ QVERIFY(page != 0); // deleting view must not have deleted the page, since it's not a child of view
+
+ QWebView *view2 = new QWebView;
+ view2->setPage(page);
+ view2->show(); // in Windowless mode, you should still be able to see the plugin here
+ QTest::qWait(2000);
+ delete view2;
+
+ delete page; // must not crash
+
+ QDir::setCurrent(QApplication::applicationDirPath());
+}
+
QTEST_MAIN(tst_QWebView)
#include "tst_qwebview.moc"
diff --git a/WebKit/qt/tests/resources/test.swf b/WebKit/qt/tests/resources/test.swf
new file mode 100644
index 0000000..8952982
--- /dev/null
+++ b/WebKit/qt/tests/resources/test.swf
Binary files differ
diff --git a/WebKit/win/AccessibleBase.cpp b/WebKit/win/AccessibleBase.cpp
index d02ec7e..55cbab3 100644
--- a/WebKit/win/AccessibleBase.cpp
+++ b/WebKit/win/AccessibleBase.cpp
@@ -27,7 +27,8 @@
#include "WebKitDLL.h"
#include "AccessibleBase.h"
-#include <oleacc.h>
+#include "AccessibleImage.h"
+#include "WebView.h"
#include <WebCore/AccessibilityObject.h>
#include <WebCore/AXObjectCache.h>
#include <WebCore/BString.h>
@@ -43,7 +44,7 @@
#include <WebCore/RenderFrame.h>
#include <WebCore/RenderObject.h>
#include <WebCore/RenderView.h>
-#include "WebView.h"
+#include <oleacc.h>
#include <wtf/RefPtr.h>
using namespace WebCore;
@@ -68,6 +69,9 @@ AccessibleBase* AccessibleBase::createInstance(AccessibilityObject* obj)
{
ASSERT_ARG(obj, obj);
+ if (obj->isImage())
+ return new AccessibleImage(obj);
+
return new AccessibleBase(obj);
}
diff --git a/WebKit/win/AccessibleImage.cpp b/WebKit/win/AccessibleImage.cpp
new file mode 100644
index 0000000..ee1d505
--- /dev/null
+++ b/WebKit/win/AccessibleImage.cpp
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2009 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. ``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
+ * 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.
+ */
+
+#include "config.h"
+#include "AccessibleImage.h"
+
+#include <WebCore/AccessibilityRenderObject.h>
+#include <WebCore/HTMLNames.h>
+
+using namespace WebCore;
+using namespace WebCore::HTMLNames;
+
+AccessibleImage::AccessibleImage(AccessibilityObject* obj)
+ : AccessibleBase(obj)
+{
+ ASSERT_ARG(obj, obj->isImage());
+ ASSERT_ARG(obj, obj->isAccessibilityRenderObject());
+}
+
+String AccessibleImage::name() const
+{
+ if (!m_object->isAccessibilityRenderObject())
+ return AccessibleBase::name();
+
+ AccessibilityRenderObject* obj = static_cast<AccessibilityRenderObject*>(m_object);
+
+ String ariaLabel = obj->ariaLabeledByAttribute();
+ if (!ariaLabel.isEmpty())
+ return ariaLabel;
+
+ const AtomicString& altText = obj->getAttribute(HTMLNames::altAttr);
+ if (!altText.isEmpty())
+ return altText;
+
+ return AccessibleBase::name();
+}
diff --git a/WebKit/win/AccessibleImage.h b/WebKit/win/AccessibleImage.h
new file mode 100644
index 0000000..0c111e2
--- /dev/null
+++ b/WebKit/win/AccessibleImage.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2009 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. ``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
+ * 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 AccessibleImage_h
+#define AccessibleImage_h
+
+#include "AccessibleBase.h"
+
+class AccessibleImage : public AccessibleBase
+{
+public:
+ AccessibleImage(WebCore::AccessibilityObject*);
+ virtual ~AccessibleImage() { }
+
+private:
+ virtual WebCore::String name() const;
+};
+
+#endif // AccessibleImage_h
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 354f82f..6253010 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,538 @@
+2009-10-28 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Sam "Horatio" Weinig.
+
+ Should not generate/build COM DOM bindings
+ https://bugs.webkit.org/show_bug.cgi?id=30880
+
+ * Interfaces/WebKit.idl: Remove generated interfaces.
+ * WebKit.vcproj/InterfacesGenerated.vcproj: Removed.
+ * WebKit.vcproj/WebKit.sln: Remove InterfacesGenerated.vcproj.
+ * WebKit.vcproj/WebKit.submit.sln: Remove InterfacesGenerated.vcproj.
+ * WebKit.vcproj/WebKit.vcproj: Remove generated interfaces.
+
+2009-10-27 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Provide a way to get counter values with layoutTestContoller
+ https://bugs.webkit.org/show_bug.cgi?id=30555
+
+ * Interfaces/IWebFramePrivate.idl:
+ * WebFrame.cpp:
+ (WebFrame::counterValueForElementById):
+ * WebFrame.h:
+
+2009-10-28 Joe Mason <jmason@rim.com>
+
+ Reviewed by Adam Treat.
+
+ Call the shared FrameLoader::defaultObjectContentType instead of
+ copying code into FrameLoaderClient::objectContentType. This causes no
+ behavioural change.
+
+ * WebFrame.cpp:
+ (WebFrame::objectContentType):
+
+2009-10-28 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Speculative build-fix for WebElementPropertyBag.cpp
+
+ * WebElementPropertyBag.cpp: Include RenderObject.h
+
+2009-10-27 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Fraser.
+
+ Change HitTestResult methods to use (3d) transformation aware methods
+ https://bugs.webkit.org/show_bug.cgi?id=27347
+
+ The HitTestResult::boundingBox method was removed. The
+ RenderObject must be used directly. In contrast to the
+ old HitTestResult::boundingBox method this code must use
+ a (3d) transformation aware method to not run into an
+ assert in SVGRenderBase::mapLocalToContainer.
+
+ * WebElementPropertyBag.cpp:
+ (WebElementPropertyBag::Read): Replace HitTestResult::boundingBox()
+
+2009-10-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Make .rc files compile on Windows without depending on MFC headers
+ https://bugs.webkit.org/show_bug.cgi?id=30750
+
+ * WebKit.vcproj/WebKit.rc: Use winresrc.h because it exists even
+ when MFC is not installed, and is all that's needed here.
+
+2009-10-26 Sam Weinig <sam@webkit.org>
+
+ Rubber-stamped by Darin Adler.
+
+ Rollout r50041-50043. The HTML5 spec changed to make HTMLOptionsCollection
+ inherit from HTMLCollection.
+
+ * DOMCreateInstance.cpp:
+
+2009-10-25 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Add contextForWorldID to the IWebFramePrivate interface.
+
+ * Interfaces/IWebFramePrivate.idl:
+ * WebFrame.h:
+
+2009-10-25 Sam Weinig <sam@webkit.org>
+
+ Another try at fixing windows.
+
+ * DOMCreateInstance.cpp:
+
+2009-10-25 Sam Weinig <sam@webkit.org>
+
+ Touch WebKit.idl in an effort to try and regenerate the COM bindings.
+
+ * Interfaces/WebKit.idl:
+
+2009-10-23 Mark Rowe <mrowe@apple.com>
+
+ Build fix. Include config.h before including other files.
+
+ * AccessibleImage.cpp:
+
+2009-10-23 Gavin Barraclough <barraclough@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@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Pan-scrolling pointer shows up in other tabs or windows, can't "fix" it.
+ <http://webkit.org/b/30732> and <rdar://7332018>.
+
+ Turns off pan-scrolling on a WebView when it is about to lose focus.
+
+ * WebView.cpp:
+ (WebViewWndProc):
+
+2009-10-23 Jon Honeycutt <jhoneycutt@apple.com>
+
+ MSAA: Name for image elements should use alt attribute text
+
+ https://bugs.webkit.org/show_bug.cgi?id=30727
+ <rdar://problem/7328291>
+
+ Reviewed by Alice Liu.
+
+ * AccessibleBase.cpp:
+ (AccessibleBase::createInstance):
+ If the AccessibilityObject is an image, return an AccessibleImage.
+
+ * AccessibleImage.cpp: Added.
+ (AccessibleImage::AccessibleImage):
+ Call the base constructor.
+ (AccessibleImage::name):
+ If the object is not an AccessibilityRenderObject, return the base's
+ name(). Look first for an ARIA "labeled-by" attribute, then look for an
+ alternate text attribute. Fall back to the base's name().
+
+ * AccessibleImage.h: Added.
+ (AccessibleImage::~AccessibleImage):
+
+ * WebKit.vcproj/WebKit.vcproj:
+ Add AccessibleImage to the project.
+
+2009-10-23 Sam Weinig <sam@webkit.org>
+
+ Try and fix the windows build.
+
+ * Interfaces/WebKit.idl:
+
+2009-10-22 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig & Geoff Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30696
+ Update to incorporate support for IsolatedWorlds in JSC bindings.
+
+ * Interfaces/IWebFramePrivate.idl:
+ * WebFrame.cpp:
+ (WebFrame::globalContext):
+ (WebFrame::windowObjectCleared):
+ (WebFrame::stringByEvaluatingJavaScriptInIsolatedWorld):
+ * WebFrame.h:
+
+2009-10-20 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by David Levin.
+
+ Removed WebSocket runtime settings.
+ https://bugs.webkit.org/show_bug.cgi?id=29896
+
+ WebSocket runtime configuration is supported by chromium/v8 only.
+
+ * Interfaces/IWebPreferencesPrivate.idl:
+ * WebPreferenceKeysPrivate.h:
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings):
+ (WebPreferences::experimentalNotificationsEnabled):
+ * WebPreferences.h:
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged):
+
+2009-10-19 Adam Roben <aroben@apple.com>
+
+ Fix crashes/assertions when calling WebLocalizedString from multiple
+ threads concurrently
+
+ Fixes <http://webkit.org/b/30534> WebLocalizedString asserts if called
+ from multiple threads concurrently
+
+ Reviewed by John Sullivan.
+
+ * WebLocalizableStrings.cpp:
+ (mainBundleLocStringsMutex):
+ (frameworkLocStringsMutex):
+ Added these new getters.
+
+ (findCachedString):
+ (cacheString):
+ Lock the relevant mutex before accessing each string map. Otherwise
+ bad things could happen if two threads end up here at the same time.
+
+2009-10-19 Adam Roben <aroben@apple.com>
+
+ Get rid of a few static initializers/exit-time destructors in
+ WebLocalizableStrings
+
+ Reviewed by Dan Bernstein.
+
+ * WebLocalizableStrings.cpp:
+ (mainBundleLocStrings):
+ (frameworkLocStrings):
+ Added these functions instead of file-scope variables.
+
+ (findCachedString):
+ (cacheString):
+ Updated to use the new functions.
+
+2009-10-19 Nate Chapin <japhet@chromium.org>
+
+ Unreviewed, build fix.
+
+ Update call to FrameLoader::urlSelected().
+
+ * WebCoreSupport/WebContextMenuClient.cpp:
+ (WebContextMenuClient::searchWithGoogle):
+
+2009-10-16 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30456
+ Fixes for new Debug_All Windows build configuration.
+
+ * WebKitClassFactory.cpp: Use new DEBUG_ALL preprocessor define for library naming.
+
+2009-10-16 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Add SPI to determine whether a plug-in has ever been halted.
+
+ Part of <rdar://problem/7312158>.
+
+ Reviewed by Dan Bernstein.
+
+ * Interfaces/IWebViewPrivate.idl:
+ Add hasPluginForNodeBeenHalted().
+
+ * WebView.cpp:
+ (pluginViewForNode):
+ Code factored out of isNodeHaltedPlugin().
+ (WebView::isNodeHaltedPlugin):
+ Remove STDMETHODCALLTYPE, as it has no use at the definition. Use
+ pluginViewForNode().
+ (WebView::restartHaltedPluginForNode):
+ Ditto.
+ (WebView::hasPluginForNodeBeenHalted):
+ Get the PluginView for the given node. Return the result of
+ PluginView::hasBeenHalted().
+
+ * WebView.h:
+ Declare hasPluginForNodeBeenHalted().
+
+2009-10-16 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Add a Debug_All configuration to build entire stack as debug.
+ Change Debug_Internal to:
+ - stop using _debug suffix for all WebKit/Safari binaries
+ - not use _debug as a DLL naming suffix
+ - use non-debug C runtime lib.
+
+ * WebKit.vcproj/InterfacesGenerated.vcproj: Renamed single configuration from "Release" to "all".
+ * WebKit.vcproj/WebKit.make: Debug build in makefile should build Debug_All.
+ * WebKit.vcproj/WebKit.sln: Add Debug_All configuration.
+ * WebKit.vcproj/WebKit.submit.sln: Add Debug_All configuration.
+ * WebKit.vcproj/WebKit.vcproj:
+ Remove extraneous OutputDirectory/IntermediateDirectory in Debug_Cairo.
+ Add Debug_All configuration.
+ * WebKit.vcproj/WebKitGUID.vcproj: Add Debug_All configuration.
+
+2009-10-15 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Add SPI to restart a halted plug-in.
+
+ Part of <rdar://problem/7273354> Halted plug-ins should restart on
+ mouseover
+
+ https://bugs.webkit.org/show_bug.cgi?id=30151
+
+ Reviewed by Kevin Decker.
+
+ * Interfaces/IWebViewPrivate.idl:
+ Add restartHaltedPluginForNode().
+
+ * WebView.cpp:
+ (WebView::restartHaltedPluginForNode):
+ From the IDOMNode, query for the DOMNode. From the DOMNode, get the
+ WebCore::Node. Get the node's renderer, and check whether it is a
+ RenderWidget. If so, get its Widget, and check whether it's a
+ PluginView. If so, call PluginView::restart().
+
+ * WebView.h:
+ Declare restartHaltedPluginForNode().
+
+2009-10-14 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Add SPI to determine whether a node is a halted plug-in.
+
+ Part of <rdar://problem/7273354> Halted plug-ins should restart on
+ mouseover
+
+ https://bugs.webkit.org/show_bug.cgi?id=30151
+
+ Reviewed by Darin Adler.
+
+ * Interfaces/IWebViewPrivate.idl:
+ Add isNodehaltedPlugin().
+
+ * WebView.cpp:
+ (WebView::isNodeHaltedPlugin):
+ From the IDOMNode, query for the DOMNode. From the DOMNode, get the
+ WebCore::Node. Get the node's renderer, and check whether it is a
+ RenderWidget. If so, get its Widget, and check whether it's a
+ PluginView. If so, return the result of PluginView::isHalted().
+
+ * WebView.h:
+ Declare isNodeHaltedPlugin().
+
+2009-10-15 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24731
+ And
+ rdar://problem/5015961
+
+ Implements support for DHTML drag-and-drop operations (i.e. ondragstart, ondragend)
+ in the Windows build so that it conforms to the Mac OS X build. Hence, dropEffect is
+ correctly set.
+
+ The WebView and WebDropSource drag-and-drop functions, as called by function
+ DoDragDrop in its event loop, neither used the drop effect as specified by
+ event.dataTransfer.dropEffect nor respected event.dataTransfer.effectsAllowed.
+ Instead, these functions defaulted to some hardcoded drop effect and set of
+ allowed drop effects, respectively.
+
+ Tests: fast/events/drag-and-drop.html
+
+ * WebCoreSupport/WebDragClient.cpp:
+ (WebDragClient::startDrag):
+ * WebDropSource.cpp:
+ (WebDropSource::QueryContinueDrag): Moved call to EventHandler::dragSourceEndedAt
+ into method WebDragClient::startDrag.
+ * WebDropSource.h:
+ * WebView.cpp:
+ (WebView::keyStateToDragOperation): Fixes <rdar://problem/5015961>. Determines
+ appropriate drop effect from state of keyboard and allowed effects
+ m_page->dragController()->sourceDragOperation().
+ (WebView::DragEnter):
+ (WebView::DragOver):
+ (WebView::Drop):
+ * WebView.h:
+
+2009-10-14 Adam Roben <aroben@apple.com>
+
+ Windows build fix
+
+ * WebKit.vcproj/Interfaces.vcproj: Exclude IWebHistoryDelegate and
+ IWebNavigationData from the build (they get #imported via WebKit.idl).
+
+2009-10-14 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKit Win API should provide a delegate interface for global history.
+ https://bugs.webkit.org/show_bug.cgi?id=29905
+
+ -Add IWebHistoryDelegate for clients to implement.
+ -Add (I)WebNavigationData for the history delegate's use.
+ -When it exists, call the history delegate instead of using WebHistory.
+
+ * Interfaces/IWebHistoryDelegate.idl: Added.
+ * Interfaces/IWebHistoryPrivate.idl:
+ * Interfaces/IWebNavigationData.idl: Added.
+ * Interfaces/IWebViewPrivate.idl:
+ * Interfaces/WebKit.idl:
+
+ * WebKit.vcproj/Interfaces.vcproj:
+ * WebKit.vcproj/WebKit.vcproj:
+
+ * WebCoreSupport/WebChromeClient.cpp:
+ (WebChromeClient::populateVisitedLinks):
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::updateGlobalHistory):
+ (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
+ (WebFrameLoaderClient::setTitle):
+
+ * WebView.cpp:
+ (WebView::close):
+ (WebView::mainFrameURL):
+ (WebView::setHistoryDelegate):
+ (WebView::historyDelegate):
+ (WebView::addVisitedLinks):
+ * WebView.h:
+
+ * WebHistory.cpp:
+ (WebHistory::setVisitedLinkTrackingEnabled):
+ (WebHistory::removeAllVisitedLinks):
+ * WebHistory.h:
+
+ * WebNavigationData.cpp: Added.
+ (WebNavigationData::QueryInterface):
+ (WebNavigationData::AddRef):
+ (WebNavigationData::Release):
+ (WebNavigationData::WebNavigationData):
+ (WebNavigationData::~WebNavigationData):
+ (WebNavigationData::createInstance):
+ (WebNavigationData::url):
+ (WebNavigationData::title):
+ (WebNavigationData::originalRequest):
+ (WebNavigationData::response):
+ (WebNavigationData::hasSubstituteData):
+ (WebNavigationData::clientRedirectSource):
+ * WebNavigationData.h: Added.
+
+2009-10-13 Dave Hyatt <hyatt@apple.com>
+
+ Fix more WebView bustage.
+
+ * WebView.cpp:
+ (WebView::addUserScriptToGroup):
+ (WebView::addUserStyleSheetToGroup):
+ (WebView::removeUserScriptsFromGroup):
+ (WebView::removeUserStyleSheetsFromGroup):
+
+2009-10-13 Dave Hyatt <hyatt@apple.com>
+
+ Fix build bustage on Windows.
+
+ * WebView.cpp:
+ (WebView::addUserScriptToGroup):
+ (WebView::addUserStyleSheetToGroup):
+ (WebView::removeUserScriptsFromGroup):
+ (WebView::removeUserStyleSheetsFromGroup):
+
+2009-10-13 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben..
+
+ Split removal functions for user scripts and stylehseets based on type.
+
+ * Interfaces/IWebViewPrivate.idl:
+ * WebView.cpp:
+ (WebView::removeUserScriptFromGroup):
+ (WebView::removeUserStyleSheetFromGroup):
+ * WebView.h:
+
+2009-10-09 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Factor HistoryController out of FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=30246
+
+ Update API call.
+
+ * WebView.cpp:
+ (WebView::loadBackForwardListFromOtherView):
+
+2009-10-08 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Remove the WebKitPluginHalterEnabledPreferenceKey in favor of checking
+ for the existence of a PluginHalterDelegate.
+
+ Reviewed by Dan Bernstein.
+
+ * Interfaces/IWebPreferencesPrivate.idl:
+ Remove the getter and setter.
+
+ * WebCoreSupport/WebPluginHalterClient.cpp:
+ (WebPluginHalterClient::enabled):
+ Return true if the delegate exists.
+
+ * WebCoreSupport/WebPluginHalterClient.h:
+ Declare implementation of enabled().
+
+ * WebPreferenceKeysPrivate.h:
+ Removed the pref key.
+
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings):
+ Removed initialization of the pref.
+
+ * WebPreferences.h:
+ Removed declaration of the getter/setter.
+
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged):
+ Don't propagate the pref.
+
+2009-10-08 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move executeScript from FrameLoader to ScriptController
+ https://bugs.webkit.org/show_bug.cgi?id=30200
+
+ Update API call.
+
+ * WebView.cpp:
+ (WebView::stringByEvaluatingJavaScriptFromString):
+
+2009-10-08 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove the shouldLoadMediaElementURL implementation.
+
+ * Interfaces/IWebPolicyDelegatePrivate.idl:
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::shouldUsePluginDocument):
+ * WebCoreSupport/WebFrameLoaderClient.h:
+
2009-10-08 Adam Roben <aroben@apple.com>
Make IWebInspectorPrivate be accessed in a more standard way
diff --git a/WebKit/win/Interfaces/IWebFramePrivate.idl b/WebKit/win/Interfaces/IWebFramePrivate.idl
index a3366da..d56239b 100755
--- a/WebKit/win/Interfaces/IWebFramePrivate.idl
+++ b/WebKit/win/Interfaces/IWebFramePrivate.idl
@@ -57,6 +57,7 @@ typedef enum {
interface IWebFramePrivate : IUnknown
{
HRESULT renderTreeAsExternalRepresentation([out, retval] BSTR* result);
+ HRESULT counterValueForElementById([in] BSTR id, [out, retval] BSTR* result);
HRESULT scrollOffset([out, retval] SIZE* offset);
// FIXME: This shouldn't be needed once IWebDocumentView is implemented.
@@ -93,4 +94,8 @@ interface IWebFramePrivate : IUnknown
HRESULT isDisplayingStandaloneImage([out, retval] BOOL* result);
HRESULT allowsFollowingLink([in] BSTR url, [out, retval] BOOL* result);
+
+ HRESULT stringByEvaluatingJavaScriptInIsolatedWorld([in] unsigned worldID, [in] OLE_HANDLE jsGlobalObject, [in] BSTR script, [out, retval] BSTR* result);
+
+ [local] JSGlobalContextRef contextForWorldID([in] unsigned worldID);
}
diff --git a/WebKit/win/Interfaces/IWebHistoryDelegate.idl b/WebKit/win/Interfaces/IWebHistoryDelegate.idl
new file mode 100644
index 0000000..6233208
--- /dev/null
+++ b/WebKit/win/Interfaces/IWebHistoryDelegate.idl
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2009 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 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 DO_NO_IMPORTS
+import "oaidl.idl";
+import "ocidl.idl";
+import "IWebNavigationData.idl";
+#endif
+
+interface IWebFrame;
+interface IWebNavigationData;
+interface IWebView;
+
+[
+ object,
+ oleautomation,
+ uuid(16AF211F-7C00-4f7f-A8DB-B1219FEABF3B),
+ pointer_default(unique)
+]
+interface IWebHistoryDelegate : IUnknown
+{
+ HRESULT didNavigateWithNavigationData([in] IWebView* webView, [in] IWebNavigationData* navigationData, [in] IWebFrame* webFrame);
+ HRESULT didPerformClientRedirectFromURL([in] IWebView* webView, [in] BSTR sourceURL, [in] BSTR destinationURL, [in] IWebFrame* webFrame);
+ HRESULT didPerformServerRedirectFromURL([in] IWebView* webView, [in] BSTR sourceURL, [in] BSTR destinationURL, [in] IWebFrame* webFrame);
+ HRESULT updateHistoryTitle([in] IWebView* webView, [in] BSTR title, [in] BSTR url);
+ HRESULT populateVisitedLinksForWebView([in] IWebView* webView);
+}
diff --git a/WebKit/win/Interfaces/IWebHistoryPrivate.idl b/WebKit/win/Interfaces/IWebHistoryPrivate.idl
index 6ad08c9..af6c27a 100644
--- a/WebKit/win/Interfaces/IWebHistoryPrivate.idl
+++ b/WebKit/win/Interfaces/IWebHistoryPrivate.idl
@@ -36,4 +36,6 @@ interface IWebHistoryPrivate : IUnknown
{
HRESULT allItems([in, out] int* count, [out, retval] IWebHistoryItem** items);
HRESULT data([out, retval] IStream**);
+ HRESULT setVisitedLinkTrackingEnabled([in] BOOL visitedLinkTrackingEnable);
+ HRESULT removeAllVisitedLinks();
}
diff --git a/WebKit/win/Interfaces/IWebNavigationData.idl b/WebKit/win/Interfaces/IWebNavigationData.idl
new file mode 100644
index 0000000..cd39159
--- /dev/null
+++ b/WebKit/win/Interfaces/IWebNavigationData.idl
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2009 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 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 DO_NO_IMPORTS
+import "oaidl.idl";
+import "ocidl.idl";
+import "IWebURLRequest.idl";
+import "IWebURLResponse.idl";
+#endif
+
+interface IWebURLRequest;
+interface IWebURLResponse;
+
+[
+ object,
+ oleautomation,
+ hidden,
+ uuid(1F162644-73D1-4de1-A20C-295FB68BF048),
+ pointer_default(unique)
+]
+interface IWebNavigationData : IUnknown
+{
+ HRESULT url([out, retval] BSTR*);
+ HRESULT title([out, retval] BSTR*);
+ HRESULT originalRequest([out, retval] IWebURLRequest**);
+ HRESULT response([out, retval] IWebURLResponse**);
+ HRESULT hasSubstituteData([out, retval] BOOL*);
+ HRESULT clientRedirectSource([out, retval] BSTR*);
+}
diff --git a/WebKit/win/Interfaces/IWebPolicyDelegatePrivate.idl b/WebKit/win/Interfaces/IWebPolicyDelegatePrivate.idl
index 4bb052c..f77fdb5 100644
--- a/WebKit/win/Interfaces/IWebPolicyDelegatePrivate.idl
+++ b/WebKit/win/Interfaces/IWebPolicyDelegatePrivate.idl
@@ -41,5 +41,4 @@ interface IWebFrame;
]
interface IWebPolicyDelegatePrivate : IUnknown
{
- HRESULT shouldLoadMediaURL([in] IWebView* webView, [in] BSTR url, [in] IWebFrame* frame, [out, retval] BOOL* retval);
}
diff --git a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
index d994211..bec70e2 100644
--- a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
+++ b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
@@ -82,9 +82,6 @@ interface IWebPreferencesPrivate : IUnknown
HRESULT experimentalNotificationsEnabled([out, retval] BOOL *enabled);
HRESULT setExperimentalNotificationsEnabled([in] BOOL enabled);
- HRESULT experimentalWebSocketsEnabled([out, retval] BOOL *enabled);
- HRESULT setExperimentalWebSocketsEnabled([in] BOOL enabled);
-
HRESULT setShouldUseHighResolutionTimers([in] BOOL useHighResolutionTimers);
HRESULT shouldUseHighResolutionTimers([out, retval] BOOL* useHighResolutionTimers);
@@ -92,9 +89,6 @@ interface IWebPreferencesPrivate : IUnknown
// Used by DumpRenderTree.
HRESULT setPreferenceForTest([in] BSTR key, [in] BSTR value);
- HRESULT setPluginHalterEnabled([in] BOOL enabled);
- HRESULT pluginHalterEnabled([out, retval] BOOL* enabled);
-
HRESULT setPluginAllowedRunTime([in] UINT allowedRunTime);
HRESULT pluginAllowedRunTime([out, retval] UINT* allowedRunTime);
}
diff --git a/WebKit/win/Interfaces/IWebViewPrivate.idl b/WebKit/win/Interfaces/IWebViewPrivate.idl
index 465d804..d95f92b 100644
--- a/WebKit/win/Interfaces/IWebViewPrivate.idl
+++ b/WebKit/win/Interfaces/IWebViewPrivate.idl
@@ -28,6 +28,7 @@ import "oaidl.idl";
import "ocidl.idl";
import "IWebFormDelegate.idl";
import "IWebFrameLoadDelegatePrivate.idl";
+import "IWebHistoryDelegate.idl";
import "IWebInspector.idl";
import "IWebInspectorPrivate.idl";
#endif
@@ -38,6 +39,7 @@ cpp_quote("#define WebViewWillCloseNotification L\"WebViewWillCloseNotification\
interface IEnumTextMatches;
interface IWebFormDelegate;
interface IWebFrameLoadDelegatePrivate;
+interface IWebHistoryDelegate;
interface IWebInspector;
interface IWebInspectorPrivate;
interface IWebPluginHalterDelegate;
@@ -190,8 +192,10 @@ interface IWebViewPrivate : IUnknown
HRESULT addUserStyleSheetToGroup([in] BSTR groupName, [in] unsigned worldID, [in] BSTR source, [in] BSTR url,
[in] unsigned whitelistCount, [in, size_is(whitelistCount)] BSTR* whitelist,
[in] unsigned blacklistCount, [in, size_is(blacklistCount)] BSTR* blacklist);
- HRESULT removeUserContentWithURLFromGroup([in] BSTR groupName, [in] unsigned worldID, [in] BSTR url);
- HRESULT removeUserContentFromGroup([in] BSTR groupName, [in] unsigned worldID);
+ HRESULT removeUserScriptFromGroup([in] BSTR groupName, [in] unsigned worldID, [in] BSTR url);
+ HRESULT removeUserStyleSheetFromGroup([in] BSTR groupName, [in] unsigned worldID, [in] BSTR url);
+ HRESULT removeUserScriptsFromGroup([in] BSTR groupName, [in] unsigned worldID);
+ HRESULT removeUserStyleSheetsFromGroup([in] BSTR groupName, [in] unsigned worldID);
HRESULT removeAllUserContentFromGroup([in] BSTR groupName);
HRESULT setPluginHalterDelegate([in] IWebPluginHalterDelegate* d);
@@ -208,4 +212,12 @@ interface IWebViewPrivate : IUnknown
// Removes all white list entries created with whiteListAccessFromOrigin.
HRESULT resetOriginAccessWhiteLists();
+
+ HRESULT setHistoryDelegate([in] IWebHistoryDelegate* historyDelegate);
+ HRESULT historyDelegate([out,retval] IWebHistoryDelegate** historyDelegate);
+ HRESULT addVisitedLinks([in] BSTR* visitedURLs, [in] unsigned visitedURLCount);
+
+ HRESULT isNodeHaltedPlugin([in] IDOMNode*, [retval, out] BOOL*);
+ HRESULT restartHaltedPluginForNode([in] IDOMNode*);
+ HRESULT hasPluginForNodeBeenHalted([in] IDOMNode*, [retval, out] BOOL*);
}
diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl
index c9b33cc..cdd24b3 100644
--- a/WebKit/win/Interfaces/WebKit.idl
+++ b/WebKit/win/Interfaces/WebKit.idl
@@ -24,7 +24,7 @@
*/
cpp_quote("/*")
-cpp_quote(" * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.")
+cpp_quote(" * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.")
cpp_quote(" *")
cpp_quote(" * Redistribution and use in source and binary forms, with or without")
cpp_quote(" * modification, are permitted provided that the following conditions")
@@ -90,6 +90,7 @@ import "ocidl.idl";
#include "IWebHTMLRepresentation.idl"
#include "IWebHTTPURLResponse.idl"
#include "IWebHistory.idl"
+#include "IWebHistoryDelegate.idl"
#include "IWebHistoryItem.idl"
#include "IWebHistoryItemPrivate.idl"
#include "IWebHistoryPrivate.idl"
@@ -100,6 +101,7 @@ import "ocidl.idl";
#include "IWebJavaScriptCollector.idl"
#include "IWebKitStatistics.idl"
#include "IWebMutableURLRequestPrivate.idl"
+#include "IWebNavigationData.idl"
#include "IWebNotification.idl"
#include "IWebNotificationCenter.idl"
#include "IWebNotificationObserver.idl"
@@ -129,106 +131,6 @@ import "ocidl.idl";
#include "IWebViewPrivate.idl"
#include "IWebWorkersPrivate.idl"
-#include "IGEN_DOMObject.idl"
-#include "IGEN_DOMCharacterData.idl"
-#include "IGEN_DOMText.idl"
-#include "IGEN_DOMAttr.idl"
-#include "IGEN_DOMCDATASection.idl"
-#include "IGEN_DOMCSSCharsetRule.idl"
-#include "IGEN_DOMCSSFontFaceRule.idl"
-#include "IGEN_DOMCSSImportRule.idl"
-#include "IGEN_DOMCSSMediaRule.idl"
-#include "IGEN_DOMCSSPageRule.idl"
-#include "IGEN_DOMCSSPrimitiveValue.idl"
-#include "IGEN_DOMCSSRule.idl"
-#include "IGEN_DOMCSSRuleList.idl"
-#include "IGEN_DOMCSSStyleDeclaration.idl"
-#include "IGEN_DOMCSSStyleRule.idl"
-#include "IGEN_DOMCSSStyleSheet.idl"
-#include "IGEN_DOMCSSUnknownRule.idl"
-#include "IGEN_DOMCSSValue.idl"
-#include "IGEN_DOMCSSValueList.idl"
-#include "IGEN_DOMComment.idl"
-#include "IGEN_DOMCounter.idl"
-#include "IGEN_DOMDOMImplementation.idl"
-#include "IGEN_DOMDocument.idl"
-#include "IGEN_DOMDocumentFragment.idl"
-#include "IGEN_DOMDocumentType.idl"
-#include "IGEN_DOMElement.idl"
-#include "IGEN_DOMEntity.idl"
-#include "IGEN_DOMEntityReference.idl"
-#include "IGEN_DOMEvent.idl"
-#include "IGEN_DOMEventListener.idl"
-#include "IGEN_DOMEventTarget.idl"
-#include "IGEN_DOMHTMLAnchorElement.idl"
-#include "IGEN_DOMHTMLAppletElement.idl"
-#include "IGEN_DOMHTMLAreaElement.idl"
-#include "IGEN_DOMHTMLBRElement.idl"
-#include "IGEN_DOMHTMLBaseElement.idl"
-#include "IGEN_DOMHTMLBaseFontElement.idl"
-#include "IGEN_DOMHTMLBlockquoteElement.idl"
-#include "IGEN_DOMHTMLBodyElement.idl"
-#include "IGEN_DOMHTMLButtonElement.idl"
-#include "IGEN_DOMHTMLCollection.idl"
-#include "IGEN_DOMHTMLDListElement.idl"
-#include "IGEN_DOMHTMLDirectoryElement.idl"
-#include "IGEN_DOMHTMLDivElement.idl"
-#include "IGEN_DOMHTMLDocument.idl"
-#include "IGEN_DOMHTMLElement.idl"
-#include "IGEN_DOMHTMLEmbedElement.idl"
-#include "IGEN_DOMHTMLFieldSetElement.idl"
-#include "IGEN_DOMHTMLFontElement.idl"
-#include "IGEN_DOMHTMLFormElement.idl"
-#include "IGEN_DOMHTMLFrameElement.idl"
-#include "IGEN_DOMHTMLFrameSetElement.idl"
-#include "IGEN_DOMHTMLHRElement.idl"
-#include "IGEN_DOMHTMLHeadElement.idl"
-#include "IGEN_DOMHTMLHeadingElement.idl"
-#include "IGEN_DOMHTMLHtmlElement.idl"
-#include "IGEN_DOMHTMLIFrameElement.idl"
-#include "IGEN_DOMHTMLImageElement.idl"
-#include "IGEN_DOMHTMLInputElement.idl"
-#include "IGEN_DOMHTMLIsIndexElement.idl"
-#include "IGEN_DOMHTMLLIElement.idl"
-#include "IGEN_DOMHTMLLabelElement.idl"
-#include "IGEN_DOMHTMLLegendElement.idl"
-#include "IGEN_DOMHTMLLinkElement.idl"
-#include "IGEN_DOMHTMLMapElement.idl"
-#include "IGEN_DOMHTMLMarqueeElement.idl"
-#include "IGEN_DOMHTMLMenuElement.idl"
-#include "IGEN_DOMHTMLMetaElement.idl"
-#include "IGEN_DOMHTMLModElement.idl"
-#include "IGEN_DOMHTMLOListElement.idl"
-#include "IGEN_DOMHTMLObjectElement.idl"
-#include "IGEN_DOMHTMLOptGroupElement.idl"
-#include "IGEN_DOMHTMLOptionElement.idl"
-#include "IGEN_DOMHTMLOptionsCollection.idl"
-#include "IGEN_DOMHTMLParagraphElement.idl"
-#include "IGEN_DOMHTMLParamElement.idl"
-#include "IGEN_DOMHTMLPreElement.idl"
-#include "IGEN_DOMHTMLQuoteElement.idl"
-#include "IGEN_DOMHTMLScriptElement.idl"
-#include "IGEN_DOMHTMLSelectElement.idl"
-#include "IGEN_DOMHTMLStyleElement.idl"
-#include "IGEN_DOMHTMLTableCaptionElement.idl"
-#include "IGEN_DOMHTMLTableCellElement.idl"
-#include "IGEN_DOMHTMLTableColElement.idl"
-#include "IGEN_DOMHTMLTableElement.idl"
-#include "IGEN_DOMHTMLTableRowElement.idl"
-#include "IGEN_DOMHTMLTableSectionElement.idl"
-#include "IGEN_DOMHTMLTextAreaElement.idl"
-#include "IGEN_DOMHTMLTitleElement.idl"
-#include "IGEN_DOMHTMLUListElement.idl"
-#include "IGEN_DOMMediaList.idl"
-#include "IGEN_DOMNamedNodeMap.idl"
-#include "IGEN_DOMNode.idl"
-#include "IGEN_DOMNodeList.idl"
-#include "IGEN_DOMNotation.idl"
-#include "IGEN_DOMProcessingInstruction.idl"
-#include "IGEN_DOMRect.idl"
-#include "IGEN_DOMStyleSheet.idl"
-#include "IGEN_DOMStyleSheetList.idl"
-
#define __TYPELIB_VERSION__ __BUILD_NUMBER_MAJOR__##.##__BUILD_NUMBER_MINOR__
cpp_quote("void shutDownWebKit();")
@@ -370,4 +272,3 @@ library WebKit
[default] interface IWebWorkersPrivate;
}
}
-
diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.cpp b/WebKit/win/WebCoreSupport/WebChromeClient.cpp
index 5d39452..0bae1ae 100644
--- a/WebKit/win/WebCoreSupport/WebChromeClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebChromeClient.cpp
@@ -571,6 +571,13 @@ void WebChromeClient::reachedMaxAppCacheSize(int64_t spaceNeeded)
void WebChromeClient::populateVisitedLinks()
{
+ COMPtr<IWebHistoryDelegate> historyDelegate;
+ m_webView->historyDelegate(&historyDelegate);
+ if (historyDelegate) {
+ historyDelegate->populateVisitedLinksForWebView(m_webView);
+ return;
+ }
+
WebHistory* history = WebHistory::sharedHistory();
if (!history)
return;
diff --git a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
index e42b4cf..ca3a6c4 100644
--- a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
@@ -143,7 +143,7 @@ void WebContextMenuClient::searchWithGoogle(const Frame* frame)
ResourceRequest request = ResourceRequest(url);
if (Page* page = frame->page())
- page->mainFrame()->loader()->urlSelected(request, String(), 0, false, false, true);
+ page->mainFrame()->loader()->urlSelected(request, String(), 0, false, false, true, SendReferrer);
}
void WebContextMenuClient::lookUpInDictionary(Frame*)
diff --git a/WebKit/win/WebCoreSupport/WebDragClient.cpp b/WebKit/win/WebCoreSupport/WebDragClient.cpp
index 840fca1..8451bd6 100644
--- a/WebKit/win/WebCoreSupport/WebDragClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebDragClient.cpp
@@ -172,16 +172,27 @@ void WebDragClient::startDrag(DragImageRef image, const IntPoint& imageOrigin, c
}
DWORD okEffect = draggingSourceOperationMaskToDragCursors(m_webView->page()->dragController()->sourceDragOperation());
- DWORD effect;
+ DWORD effect = DROPEFFECT_NONE;
COMPtr<IWebUIDelegate> ui;
+ HRESULT hr = E_NOTIMPL;
if (SUCCEEDED(m_webView->uiDelegate(&ui))) {
COMPtr<IWebUIDelegatePrivate> uiPrivate;
if (SUCCEEDED(ui->QueryInterface(IID_IWebUIDelegatePrivate, (void**)&uiPrivate)))
- if (SUCCEEDED(uiPrivate->doDragDrop(m_webView, dataObject.get(), source.get(), okEffect, &effect)))
- return;
+ hr = uiPrivate->doDragDrop(m_webView, dataObject.get(), source.get(), okEffect, &effect);
}
-
- DoDragDrop(dataObject.get(), source.get(), okEffect, &effect);
+ if (hr == E_NOTIMPL)
+ hr = DoDragDrop(dataObject.get(), source.get(), okEffect, &effect);
+
+ DragOperation operation = DragOperationNone;
+ if (hr == DRAGDROP_S_DROP) {
+ if (effect & DROPEFFECT_COPY)
+ operation = DragOperationCopy;
+ else if (effect & DROPEFFECT_LINK)
+ operation = DragOperationLink;
+ else if (effect & DROPEFFECT_MOVE)
+ operation = DragOperationMove;
+ }
+ frame->eventHandler()->dragSourceEndedAt(generateMouseEvent(m_webView, false), operation);
}
}
diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
index 1281420..2a3bf3c 100644
--- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -43,6 +43,7 @@
#include "WebHistory.h"
#include "WebHistoryItem.h"
#include "WebMutableURLRequest.h"
+#include "WebNavigationData.h"
#include "WebNotificationCenter.h"
#include "WebSecurityOrigin.h"
#include "WebURLAuthenticationChallenge.h"
@@ -493,34 +494,70 @@ void WebFrameLoaderClient::finishedLoading(DocumentLoader* loader)
void WebFrameLoaderClient::updateGlobalHistory()
{
+ DocumentLoader* loader = core(m_webFrame)->loader()->documentLoader();
+ WebView* webView = m_webFrame->webView();
+ COMPtr<IWebHistoryDelegate> historyDelegate;
+ webView->historyDelegate(&historyDelegate);
+
+ if (historyDelegate) {
+ BString url(loader->urlForHistory());
+ BString title(loader->title());
+ BString redirectSource(loader->clientRedirectSourceForHistory());
+ COMPtr<IWebURLResponse> urlResponse(AdoptCOM, WebURLResponse::createInstance(loader->response()));
+ COMPtr<IWebURLRequest> urlRequest(AdoptCOM, WebMutableURLRequest::createInstance(loader->originalRequestCopy()));
+
+ COMPtr<IWebNavigationData> navigationData(AdoptCOM, WebNavigationData::createInstance(
+ url, title, urlRequest.get(), urlResponse.get(), loader->substituteData().isValid(), redirectSource));
+
+ historyDelegate->didNavigateWithNavigationData(webView, navigationData.get(), m_webFrame);
+ return;
+ }
+
WebHistory* history = WebHistory::sharedHistory();
if (!history)
return;
- DocumentLoader* loader = core(m_webFrame)->loader()->documentLoader();
history->visitedURL(loader->urlForHistory(), loader->title(), loader->originalRequestCopy().httpMethod(), loader->urlForHistoryReflectsFailure(), !loader->clientRedirectSourceForHistory());
}
void WebFrameLoaderClient::updateGlobalHistoryRedirectLinks()
{
+ WebView* webView = m_webFrame->webView();
+ COMPtr<IWebHistoryDelegate> historyDelegate;
+ webView->historyDelegate(&historyDelegate);
+
WebHistory* history = WebHistory::sharedHistory();
- if (!history)
- return;
DocumentLoader* loader = core(m_webFrame)->loader()->documentLoader();
ASSERT(loader->unreachableURL().isEmpty());
if (!loader->clientRedirectSourceForHistory().isNull()) {
- if (COMPtr<IWebHistoryItem> iWebHistoryItem = history->itemForURLString(loader->clientRedirectSourceForHistory())) {
- COMPtr<WebHistoryItem> webHistoryItem(Query, iWebHistoryItem);
- webHistoryItem->historyItem()->addRedirectURL(loader->clientRedirectDestinationForHistory());
+ if (historyDelegate) {
+ BString sourceURL(loader->clientRedirectSourceForHistory());
+ BString destURL(loader->clientRedirectDestinationForHistory());
+ historyDelegate->didPerformClientRedirectFromURL(webView, sourceURL, destURL, m_webFrame);
+ } else {
+ if (history) {
+ if (COMPtr<IWebHistoryItem> iWebHistoryItem = history->itemForURLString(loader->clientRedirectSourceForHistory())) {
+ COMPtr<WebHistoryItem> webHistoryItem(Query, iWebHistoryItem);
+ webHistoryItem->historyItem()->addRedirectURL(loader->clientRedirectDestinationForHistory());
+ }
+ }
}
}
if (!loader->serverRedirectSourceForHistory().isNull()) {
- if (COMPtr<IWebHistoryItem> iWebHistoryItem = history->itemForURLString(loader->serverRedirectSourceForHistory())) {
- COMPtr<WebHistoryItem> webHistoryItem(Query, iWebHistoryItem);
- webHistoryItem->historyItem()->addRedirectURL(loader->serverRedirectDestinationForHistory());
+ if (historyDelegate) {
+ BString sourceURL(loader->serverRedirectSourceForHistory());
+ BString destURL(loader->serverRedirectDestinationForHistory());
+ historyDelegate->didPerformServerRedirectFromURL(webView, sourceURL, destURL, m_webFrame);
+ } else {
+ if (history) {
+ if (COMPtr<IWebHistoryItem> iWebHistoryItem = history->itemForURLString(loader->serverRedirectSourceForHistory())) {
+ COMPtr<WebHistoryItem> webHistoryItem(Query, iWebHistoryItem);
+ webHistoryItem->historyItem()->addRedirectURL(loader->serverRedirectDestinationForHistory());
+ }
+ }
}
}
}
@@ -572,6 +609,16 @@ PassRefPtr<DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const Reso
void WebFrameLoaderClient::setTitle(const String& title, const KURL& url)
{
+ WebView* webView = m_webFrame->webView();
+ COMPtr<IWebHistoryDelegate> historyDelegate;
+ webView->historyDelegate(&historyDelegate);
+ if (historyDelegate) {
+ BString titleBSTR(title);
+ BString urlBSTR(url.string());
+ historyDelegate->updateHistoryTitle(webView, titleBSTR, urlBSTR);
+ return;
+ }
+
BOOL privateBrowsingEnabled = FALSE;
COMPtr<IWebPreferences> preferences;
if (SUCCEEDED(m_webFrame->webView()->preferences(&preferences)))
@@ -795,24 +842,3 @@ bool WebFrameLoaderClient::shouldUsePluginDocument(const String& mimeType) const
return webView->shouldUseEmbeddedView(mimeType);
}
-
-bool WebFrameLoaderClient::shouldLoadMediaElementURL(const KURL& url) const
-{
- WebView* webView = m_webFrame->webView();
- if (!webView)
- return true;
-
- COMPtr<IWebPolicyDelegate> policyDelegate;
- if (FAILED(webView->policyDelegate(&policyDelegate)) || !policyDelegate)
- return true;
-
- COMPtr<IWebPolicyDelegatePrivate> policyDelegatePrivate(Query, policyDelegate);
- if (!policyDelegatePrivate)
- return true;
-
- BOOL retval;
- if (FAILED(policyDelegatePrivate->shouldLoadMediaURL(webView, BString(url), m_webFrame, &retval)))
- return true;
-
- return retval;
-}
diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
index a215cf9..921ae91 100644
--- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
+++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
@@ -112,7 +112,6 @@ public:
virtual bool shouldUsePluginDocument(const WebCore::String& mimeType) const;
virtual void dispatchDidFailToStartPlugin(const WebCore::PluginView*) const;
- virtual bool shouldLoadMediaElementURL(const WebCore::KURL&) const;
protected:
WebFrameLoaderClient(WebFrame*);
diff --git a/WebKit/win/WebCoreSupport/WebPluginHalterClient.cpp b/WebKit/win/WebCoreSupport/WebPluginHalterClient.cpp
index aef313b..78daf8d 100644
--- a/WebKit/win/WebCoreSupport/WebPluginHalterClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebPluginHalterClient.cpp
@@ -56,3 +56,12 @@ bool WebPluginHalterClient::shouldHaltPlugin(WebCore::Node* n) const
return shouldHalt;
}
+
+bool WebPluginHalterClient::enabled() const
+{
+ IWebPluginHalterDelegate* d;
+ if (FAILED(m_webView->pluginHalterDelegate(&d)) || !d)
+ return false;
+
+ return true;
+}
diff --git a/WebKit/win/WebCoreSupport/WebPluginHalterClient.h b/WebKit/win/WebCoreSupport/WebPluginHalterClient.h
index 1752444..7d05fe9 100644
--- a/WebKit/win/WebCoreSupport/WebPluginHalterClient.h
+++ b/WebKit/win/WebCoreSupport/WebPluginHalterClient.h
@@ -39,6 +39,7 @@ public:
WebPluginHalterClient(WebView* webView);
virtual bool shouldHaltPlugin(WebCore::Node* n) const;
+ virtual bool enabled() const;
private:
WebView* m_webView;
diff --git a/WebKit/win/WebDropSource.cpp b/WebKit/win/WebDropSource.cpp
index 63465e2..5c26b37 100644
--- a/WebKit/win/WebDropSource.cpp
+++ b/WebKit/win/WebDropSource.cpp
@@ -106,10 +106,6 @@ STDMETHODIMP WebDropSource::QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyS
{
if (fEscapePressed || !(grfKeyState & (MK_LBUTTON|MK_RBUTTON))) {
m_dropped = !fEscapePressed;
- if (Page* page = m_webView->page())
- if (Frame* frame = page->mainFrame())
- //FIXME: We need to figure out how to find out what actually happened in the drag <rdar://problem/5015961>
- frame->eventHandler()->dragSourceEndedAt(generateMouseEvent(m_webView.get(), false), fEscapePressed ? DragOperationNone : DragOperationCopy);
return fEscapePressed? DRAGDROP_S_CANCEL : DRAGDROP_S_DROP;
} else if (Page* page = m_webView->page())
if (Frame* frame = page->mainFrame())
diff --git a/WebKit/win/WebDropSource.h b/WebKit/win/WebDropSource.h
index 4a969ef..5f06355 100644
--- a/WebKit/win/WebDropSource.h
+++ b/WebKit/win/WebDropSource.h
@@ -32,6 +32,12 @@
class WebView;
+namespace WebCore {
+ class PlatformMouseEvent;
+}
+
+WebCore::PlatformMouseEvent generateMouseEvent(WebView*, bool isDrag);
+
class WebDropSource : public IDropSource
{
public:
diff --git a/WebKit/win/WebElementPropertyBag.cpp b/WebKit/win/WebElementPropertyBag.cpp
index 151c9e1..e68b92e 100644
--- a/WebKit/win/WebElementPropertyBag.cpp
+++ b/WebKit/win/WebElementPropertyBag.cpp
@@ -37,6 +37,7 @@
#include <WebCore/FrameLoader.h>
#include <WebCore/Image.h>
#include <WebCore/KURL.h>
+#include <WebCore/RenderObject.h>
#pragma warning(pop)
using namespace WebCore;
@@ -145,7 +146,9 @@ HRESULT STDMETHODCALLTYPE WebElementPropertyBag::Read(LPCOLESTR pszPropName, VAR
return S_OK;
} else if (isEqual(WebElementImageRectKey, key)) {
V_VT(pVar) = VT_ARRAY;
- V_ARRAY(pVar) = MarshallingHelpers::intRectToSafeArray(m_result->boundingBox());
+ IntRect boundingBox = m_result->innerNonSharedNode() && m_result->innerNonSharedNode()->renderer() ?
+ m_result->innerNonSharedNode()->renderer()->absoluteBoundingBoxRect(true) : IntRect();
+ V_ARRAY(pVar) = MarshallingHelpers::intRectToSafeArray(boundingBox);
return S_OK;
} else if (isEqual(WebElementImageURLKey, key))
return convertStringToVariant(pVar, m_result->absoluteImageURL().string());
diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp
index 6bdf51e..0a1f6d0 100644
--- a/WebKit/win/WebFrame.cpp
+++ b/WebKit/win/WebFrame.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) Research In Motion Limited 2009. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -77,7 +78,6 @@
#include <WebCore/HTMLPlugInElement.h>
#include <WebCore/JSDOMWindow.h>
#include <WebCore/KeyboardEvent.h>
-#include <WebCore/MIMETypeRegistry.h>
#include <WebCore/MouseRelatedEvent.h>
#include <WebCore/NotImplemented.h>
#include <WebCore/Page.h>
@@ -96,6 +96,9 @@
#include <WebCore/ScriptController.h>
#include <WebCore/SecurityOrigin.h>
#include <JavaScriptCore/APICast.h>
+#include <JavaScriptCore/JSLock.h>
+#include <JavaScriptCore/JSObject.h>
+#include <JavaScriptCore/JSValue.h>
#include <wtf/MathExtras.h>
#pragma warning(pop)
@@ -116,6 +119,11 @@ extern "C" {
using namespace WebCore;
using namespace HTMLNames;
+using JSC::JSGlobalObject;
+using JSC::JSLock;
+using JSC::JSValue;
+using JSC::SilenceAssertionsOnly;
+
#define FLASH_REDRAW 0
@@ -479,7 +487,17 @@ JSGlobalContextRef STDMETHODCALLTYPE WebFrame::globalContext()
if (!coreFrame)
return 0;
- return toGlobalRef(coreFrame->script()->globalObject()->globalExec());
+ 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(
@@ -806,6 +824,25 @@ HRESULT STDMETHODCALLTYPE WebFrame::renderTreeAsExternalRepresentation(
return S_OK;
}
+HRESULT STDMETHODCALLTYPE WebFrame::counterValueForElementById(
+ /* [in] */ BSTR id, /* [retval][out] */ BSTR *result)
+{
+ if (!result)
+ return E_POINTER;
+
+ Frame* coreFrame = core(this);
+ if (!coreFrame)
+ return E_FAIL;
+
+ String coreId = String(id, SysStringLen(id));
+
+ Element* element = coreFrame->document()->getElementById(coreId);
+ if (!element)
+ return E_FAIL;
+ *result = BString(counterValueForElement(element)).release();
+ return S_OK;
+}
+
HRESULT STDMETHODCALLTYPE WebFrame::scrollOffset(
/* [retval][out] */ SIZE* offset)
{
@@ -1664,25 +1701,9 @@ PassRefPtr<Widget> WebFrame::createJavaAppletWidget(const IntSize& pluginSize, H
return pluginView;
}
-ObjectContentType WebFrame::objectContentType(const KURL& url, const String& mimeTypeIn)
+ObjectContentType WebFrame::objectContentType(const KURL& url, const String& mimeType)
{
- String mimeType = mimeTypeIn;
- if (mimeType.isEmpty())
- mimeType = MIMETypeRegistry::getMIMETypeForExtension(url.path().substring(url.path().reverseFind('.') + 1));
-
- if (mimeType.isEmpty())
- return ObjectContentFrame; // Go ahead and hope that we can display the content.
-
- if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType))
- return WebCore::ObjectContentImage;
-
- if (PluginDatabase::installedPlugins()->isMIMETypeRegistered(mimeType))
- return WebCore::ObjectContentNetscapePlugin;
-
- if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType))
- return WebCore::ObjectContentFrame;
-
- return WebCore::ObjectContentNone;
+ return WebCore::FrameLoader::defaultObjectContentType(url, mimeType);
}
String WebFrame::overrideMediaType() const
@@ -1702,8 +1723,8 @@ void WebFrame::windowObjectCleared()
COMPtr<IWebFrameLoadDelegate> frameLoadDelegate;
if (SUCCEEDED(d->webView->frameLoadDelegate(&frameLoadDelegate))) {
- JSContextRef context = toRef(coreFrame->script()->globalObject()->globalExec());
- JSObjectRef windowObject = toRef(coreFrame->script()->globalObject());
+ JSContextRef context = toRef(coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec());
+ JSObjectRef windowObject = toRef(coreFrame->script()->globalObject(mainThreadNormalWorld()));
ASSERT(windowObject);
if (FAILED(frameLoadDelegate->didClearWindowObject(d->webView, context, windowObject, this)))
@@ -2148,6 +2169,49 @@ HRESULT STDMETHODCALLTYPE WebFrame::isDescendantOfFrame(
return S_OK;
}
+HRESULT STDMETHODCALLTYPE WebFrame::stringByEvaluatingJavaScriptInIsolatedWorld(
+ /* [in] */ unsigned int worldID,
+ /* [in] */ OLE_HANDLE jsGlobalObject,
+ /* [in] */ BSTR script,
+ /* [retval][out] */ BSTR* evaluationResult)
+{
+ if (!evaluationResult)
+ return E_POINTER;
+ *evaluationResult = 0;
+
+ Frame* coreFrame = core(this);
+ JSObjectRef globalObjectRef = reinterpret_cast<JSObjectRef>(jsGlobalObject);
+ String string = String(script, SysStringLen(script));
+
+ // Start off with some guess at a frame and a global object, we'll try to do better...!
+ JSDOMWindow* anyWorldGlobalObject = coreFrame->script()->globalObject(mainThreadNormalWorld());
+
+ // The global object is probably a shell object? - if so, we know how to use this!
+ JSC::JSObject* globalObjectObj = toJS(globalObjectRef);
+ if (!strcmp(globalObjectObj->classInfo()->className, "JSDOMWindowShell"))
+ anyWorldGlobalObject = static_cast<JSDOMWindowShell*>(globalObjectObj)->window();
+
+ // Get the frame frome the global object we've settled on.
+ Frame* frame = anyWorldGlobalObject->impl()->frame();
+ ASSERT(frame->document());
+ JSValue result = frame->script()->executeScriptInIsolatedWorld(worldID, string, true).jsValue();
+
+ if (!frame) // In case the script removed our frame from the page.
+ return S_OK;
+
+ // This bizarre set of rules matches behavior from WebKit for Safari 2.0.
+ // If you don't like it, use -[WebScriptObject evaluateWebScript:] or
+ // JSEvaluateScript instead, since they have less surprising semantics.
+ if (!result || !result.isBoolean() && !result.isString() && !result.isNumber())
+ return S_OK;
+
+ JSLock lock(SilenceAssertionsOnly);
+ String resultString = String(result.toString(anyWorldGlobalObject->globalExec()));
+ *evaluationResult = BString(resultString).release();
+
+ return S_OK;
+}
+
void WebFrame::unmarkAllMisspellings()
{
Frame* coreFrame = core(this);
diff --git a/WebKit/win/WebFrame.h b/WebKit/win/WebFrame.h
index 8edc81a..d0f6adf 100644
--- a/WebKit/win/WebFrame.h
+++ b/WebKit/win/WebFrame.h
@@ -158,6 +158,10 @@ public:
virtual HRESULT STDMETHODCALLTYPE renderTreeAsExternalRepresentation(
/* [retval][out] */ BSTR *result);
+ virtual HRESULT STDMETHODCALLTYPE counterValueForElementById(
+ /* [in] */ BSTR id,
+ /* [retval][out] */ BSTR *result);
+
virtual HRESULT STDMETHODCALLTYPE scrollOffset(
/* [retval][out] */ SIZE* offset);
@@ -244,6 +248,15 @@ public:
/* [in] */ BSTR url,
/* [retval][out] */ BOOL* result);
+ virtual HRESULT STDMETHODCALLTYPE stringByEvaluatingJavaScriptInIsolatedWorld(
+ /* [in] */ unsigned int worldID,
+ /* [in] */ OLE_HANDLE jsGlobalObject,
+ /* [in] */ BSTR script,
+ /* [retval][out] */ BSTR* evaluationResult);
+
+ virtual /* [local] */ JSGlobalContextRef STDMETHODCALLTYPE contextForWorldID(
+ /* [in] */ unsigned worldID);
+
// IWebDocumentText
virtual HRESULT STDMETHODCALLTYPE supportsTextEncoding(
/* [retval][out] */ BOOL* result);
diff --git a/WebKit/win/WebHistory.cpp b/WebKit/win/WebHistory.cpp
index 854031a..deb75e5 100644
--- a/WebKit/win/WebHistory.cpp
+++ b/WebKit/win/WebHistory.cpp
@@ -577,6 +577,18 @@ HRESULT WebHistory::data(IStream** stream)
return result.copyRefTo(stream);
}
+HRESULT WebHistory::setVisitedLinkTrackingEnabled(BOOL visitedLinkTrackingEnabled)
+{
+ PageGroup::setShouldTrackVisitedLinks(visitedLinkTrackingEnabled);
+ return S_OK;
+}
+
+HRESULT WebHistory::removeAllVisitedLinks()
+{
+ PageGroup::removeAllVisitedLinks();
+ return S_OK;
+}
+
HRESULT STDMETHODCALLTYPE WebHistory::setHistoryItemLimit(
/* [in] */ int limit)
{
diff --git a/WebKit/win/WebHistory.h b/WebKit/win/WebHistory.h
index 96e1404..9d8acb3 100644
--- a/WebKit/win/WebHistory.h
+++ b/WebKit/win/WebHistory.h
@@ -116,6 +116,9 @@ public:
virtual HRESULT STDMETHODCALLTYPE data(IStream**);
+ virtual HRESULT STDMETHODCALLTYPE setVisitedLinkTrackingEnabled(BOOL visitedLinkTrackingEnable);
+ virtual HRESULT STDMETHODCALLTYPE removeAllVisitedLinks();
+
// WebHistory
static WebHistory* sharedHistory();
void visitedURL(const WebCore::KURL&, const WebCore::String& title, const WebCore::String& httpMethod, bool wasFailure, bool increaseVisitCount);
diff --git a/WebKit/win/WebKit.vcproj/Interfaces.vcproj b/WebKit/win/WebKit.vcproj/Interfaces.vcproj
index cbc8231..75c7c11 100644
--- a/WebKit/win/WebKit.vcproj/Interfaces.vcproj
+++ b/WebKit/win/WebKit.vcproj/Interfaces.vcproj
@@ -784,6 +784,26 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\Interfaces\IWebHistoryDelegate.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\Interfaces\IWebHistoryItem.idl"
>
<FileConfiguration
@@ -1044,6 +1064,26 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\Interfaces\IWebNavigationData.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\Interfaces\IWebNotification.idl"
>
<FileConfiguration
diff --git a/WebKit/win/WebKit.vcproj/InterfacesGenerated.vcproj b/WebKit/win/WebKit.vcproj/InterfacesGenerated.vcproj
deleted file mode 100644
index f6cc1d4..0000000
--- a/WebKit/win/WebKit.vcproj/InterfacesGenerated.vcproj
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="InterfacesGenerated"
- ProjectGUID="{62C897BE-E207-4BC4-B37D-6F9F9116F166}"
- Keyword="MakeFileProj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(WebKitOutputDir)\lib"
- IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
- ConfigurationType="0"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;bash build-generated-files.sh &quot;$(WebKitOutputDir)&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
- ReBuildCommandLine="echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;del /s /q &quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;&#x0D;&#x0A;%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;bash build-generated-files.sh &quot;$(WebKitOutputDir)&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
- CleanCommandLine="del /s /q &quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
- Output=""
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath=".\build-generated-files.sh"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/WebKit/win/WebKit.vcproj/WebKit.make b/WebKit/win/WebKit.vcproj/WebKit.make
index 29802a7..072d724 100755
--- a/WebKit/win/WebKit.vcproj/WebKit.make
+++ b/WebKit/win/WebKit.vcproj/WebKit.make
@@ -1,7 +1,7 @@
!IF !defined(BUILDSTYLE)
BUILDSTYLE=Release
!ELSEIF "$(BUILDSTYLE)"=="DEBUG"
-BUILDSTYLE=Debug_Internal
+BUILDSTYLE=Debug_All
!ENDIF
install:
diff --git a/WebKit/win/WebKit.vcproj/WebKit.rc b/WebKit/win/WebKit.vcproj/WebKit.rc
index a7cbfd3..3d00011 100644
--- a/WebKit/win/WebKit.vcproj/WebKit.rc
+++ b/WebKit/win/WebKit.vcproj/WebKit.rc
@@ -2,7 +2,7 @@
//
#include "resource.h"
#include "autoversion.h"
-#include "winres.h"
+#include "winresrc.h"
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
diff --git a/WebKit/win/WebKit.vcproj/WebKit.sln b/WebKit/win/WebKit.vcproj/WebKit.sln
index 79dff87..433bf4c 100644
--- a/WebKit/win/WebKit.vcproj/WebKit.sln
+++ b/WebKit/win/WebKit.vcproj/WebKit.sln
@@ -13,7 +13,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitGUID", "WebKitGUID.vc
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Interfaces", "Interfaces.vcproj", "{91762BE2-87EF-4F5A-A480-48B90EB3F406}"
ProjectSection(ProjectDependencies) = postProject
- {62C897BE-E207-4BC4-B37D-6F9F9116F166} = {62C897BE-E207-4BC4-B37D-6F9F9116F166}
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCore", "..\..\..\WebCore\WebCore.vcproj\WebCore.vcproj", "{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}"
@@ -58,11 +58,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageDiff", "..\..\..\WebKi
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCoreGenerated", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore\JavaScriptCoreGenerated.vcproj", "{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InterfacesGenerated", "InterfacesGenerated.vcproj", "{62C897BE-E207-4BC4-B37D-6F9F9116F166}"
- ProjectSection(ProjectDependencies) = postProject
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}
- EndProjectSection
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCoreGenerated", "..\..\..\WebCore\WebCore.vcproj\WebCoreGenerated.vcproj", "{0A324352-B3B6-496C-9E5B-4C7E923E628B}"
ProjectSection(ProjectDependencies) = postProject
{011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}
@@ -87,6 +82,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "record-memory-win", "..\..\
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug_All|Win32 = Debug_All|Win32
Debug_Cairo|Win32 = Debug_Cairo|Win32
Debug_Internal|Win32 = Debug_Internal|Win32
Debug|Win32 = Debug|Win32
@@ -94,6 +90,8 @@ Global
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_All|Win32.Build.0 = Debug_All|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
@@ -104,6 +102,8 @@ Global
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.ActiveCfg = Release|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.Build.0 = Release|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Debug_All|Win32.Build.0 = Debug_All|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug_Cairo|Win32.Build.0 = Debug|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
@@ -114,6 +114,8 @@ Global
{B8437A41-67BC-4769-9452-45203827F821}.Release_Cairo|Win32.Build.0 = Release|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.ActiveCfg = Release|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.Build.0 = Release|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_All|Win32.ActiveCfg = Debug|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_All|Win32.Build.0 = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Cairo|Win32.Build.0 = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Internal|Win32.ActiveCfg = Debug|Win32
@@ -124,6 +126,8 @@ Global
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release_Cairo|Win32.Build.0 = Release|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.ActiveCfg = Release|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.Build.0 = Release|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_All|Win32.Build.0 = Debug_All|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
@@ -134,6 +138,8 @@ Global
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.ActiveCfg = Release|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.Build.0 = Release|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_All|Win32.Build.0 = Debug_All|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
@@ -144,6 +150,8 @@ Global
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.ActiveCfg = Release|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.Build.0 = Release|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_All|Win32.Build.0 = Debug_All|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
@@ -154,6 +162,8 @@ Global
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_Cairo|Win32.Build.0 = Release|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.ActiveCfg = Release|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.Build.0 = Release|Win32
+ {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.Build.0 = Debug_All|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
@@ -164,6 +174,8 @@ Global
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.ActiveCfg = Release|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.Build.0 = Release|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.Build.0 = Debug_All|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
@@ -174,6 +186,8 @@ Global
{C59E5129-B453-49B7-A52B-1E104715F76E}.Release_Cairo|Win32.Build.0 = Release|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.ActiveCfg = Release|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.Build.0 = Release|Win32
+ {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_All|Win32.Build.0 = Debug_All|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo|Win32.Build.0 = Debug|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
@@ -184,16 +198,20 @@ Global
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_Cairo|Win32.Build.0 = Release|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release|Win32.ActiveCfg = Release|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release|Win32.Build.0 = Release|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.ActiveCfg = Release|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.Build.0 = Release|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.ActiveCfg = Release|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.Build.0 = Release|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.ActiveCfg = Release|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = Release|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.ActiveCfg = Release|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.Build.0 = Release|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = Release|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = Release|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = all|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.Build.0 = Debug_All|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Cairo|Win32.Build.0 = Debug|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.ActiveCfg = Debug|Win32
@@ -204,36 +222,32 @@ Global
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_Cairo|Win32.Build.0 = Release|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.ActiveCfg = Release|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.Build.0 = Release|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo|Win32.ActiveCfg = Release|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo|Win32.Build.0 = Release|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Internal|Win32.ActiveCfg = Release|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Internal|Win32.Build.0 = Release|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.ActiveCfg = Release|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.Build.0 = Release|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo|Win32.ActiveCfg = Release|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo|Win32.Build.0 = Release|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.ActiveCfg = Release|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.Build.0 = Release|Win32
- {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug_Cairo|Win32.ActiveCfg = Release|Win32
- {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug_Cairo|Win32.Build.0 = Release|Win32
- {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug_Internal|Win32.ActiveCfg = Release|Win32
- {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug_Internal|Win32.Build.0 = Release|Win32
- {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug|Win32.ActiveCfg = Release|Win32
- {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug|Win32.Build.0 = Release|Win32
- {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Release_Cairo|Win32.ActiveCfg = Release|Win32
- {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Release_Cairo|Win32.Build.0 = Release|Win32
- {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Release|Win32.ActiveCfg = Release|Win32
- {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Release|Win32.Build.0 = Release|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.ActiveCfg = Release|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.Build.0 = Release|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Internal|Win32.ActiveCfg = Release|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Internal|Win32.Build.0 = Release|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug|Win32.ActiveCfg = Release|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug|Win32.Build.0 = Release|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.ActiveCfg = Release|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.Build.0 = Release|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.ActiveCfg = Release|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.Build.0 = Release|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.ActiveCfg = all|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.Build.0 = all|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo|Win32.ActiveCfg = all|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo|Win32.Build.0 = all|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Internal|Win32.ActiveCfg = all|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Internal|Win32.Build.0 = all|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.ActiveCfg = all|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.Build.0 = all|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo|Win32.ActiveCfg = all|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo|Win32.Build.0 = all|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.ActiveCfg = all|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.Build.0 = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_All|Win32.ActiveCfg = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_All|Win32.Build.0 = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.ActiveCfg = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.Build.0 = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Internal|Win32.ActiveCfg = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Internal|Win32.Build.0 = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug|Win32.ActiveCfg = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug|Win32.Build.0 = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.ActiveCfg = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.Build.0 = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.ActiveCfg = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.Build.0 = all|Win32
+ {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_All|Win32.Build.0 = Debug_All|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
@@ -242,16 +256,20 @@ Global
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release|Win32.ActiveCfg = Release|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release|Win32.Build.0 = Release|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_All|Win32.Build.0 = Debug_All|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Internal|Win32.ActiveCfg = Debug|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Internal|Win32.Build.0 = Debug|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug|Win32.ActiveCfg = Debug|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug|Win32.Build.0 = Debug|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Release_Cairo|Win32.Build.0 = Release|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.ActiveCfg = Release|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.Build.0 = Release|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_All|Win32.Build.0 = Debug_All|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
@@ -262,6 +280,8 @@ Global
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release|Win32.ActiveCfg = Release|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release|Win32.Build.0 = Release|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_All|Win32.ActiveCfg = Release|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_All|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Cairo|Win32.ActiveCfg = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Cairo|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Internal|Win32.ActiveCfg = Release|Win32
diff --git a/WebKit/win/WebKit.vcproj/WebKit.submit.sln b/WebKit/win/WebKit.vcproj/WebKit.submit.sln
index c3c2bb9..dbbc8e0 100644
--- a/WebKit/win/WebKit.vcproj/WebKit.submit.sln
+++ b/WebKit/win/WebKit.vcproj/WebKit.submit.sln
@@ -1,57 +1,51 @@

Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual C++ Express 2005
+# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKit", "WebKit.vcproj", "{0662A8A9-82A3-4638-97D8-EC425D8D87C9}"
ProjectSection(ProjectDependencies) = postProject
- {62C897BE-E207-4BC4-B37D-6F9F9116F166} = {62C897BE-E207-4BC4-B37D-6F9F9116F166}
- {B8437A41-67BC-4769-9452-45203827F821} = {B8437A41-67BC-4769-9452-45203827F821}
{91762BE2-87EF-4F5A-A480-48B90EB3F406} = {91762BE2-87EF-4F5A-A480-48B90EB3F406}
+ {B8437A41-67BC-4769-9452-45203827F821} = {B8437A41-67BC-4769-9452-45203827F821}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitGUID", "WebKitGUID.vcproj", "{B8437A41-67BC-4769-9452-45203827F821}"
ProjectSection(ProjectDependencies) = postProject
- {62C897BE-E207-4BC4-B37D-6F9F9116F166} = {62C897BE-E207-4BC4-B37D-6F9F9116F166}
{91762BE2-87EF-4F5A-A480-48B90EB3F406} = {91762BE2-87EF-4F5A-A480-48B90EB3F406}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Interfaces", "Interfaces.vcproj", "{91762BE2-87EF-4F5A-A480-48B90EB3F406}"
- ProjectSection(ProjectDependencies) = postProject
- {62C897BE-E207-4BC4-B37D-6F9F9116F166} = {62C897BE-E207-4BC4-B37D-6F9F9116F166}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InterfacesGenerated", "InterfacesGenerated.vcproj", "{62C897BE-E207-4BC4-B37D-6F9F9116F166}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug_All|Win32 = Debug_All|Win32
Debug_Internal|Win32 = Debug_Internal|Win32
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_All|Win32.Build.0 = Debug_All|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug|Win32.ActiveCfg = Debug|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug|Win32.Build.0 = Debug|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.ActiveCfg = Release|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.Build.0 = Release|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Debug_All|Win32.Build.0 = Debug_All|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug|Win32.ActiveCfg = Debug|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug|Win32.Build.0 = Debug|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.ActiveCfg = Release|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.Build.0 = Release|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_All|Win32.ActiveCfg = Debug|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_All|Win32.Build.0 = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Internal|Win32.ActiveCfg = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Internal|Win32.Build.0 = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug|Win32.ActiveCfg = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug|Win32.Build.0 = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.ActiveCfg = Release|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.Build.0 = Release|Win32
- {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug_Internal|Win32.ActiveCfg = Release|Win32
- {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug_Internal|Win32.Build.0 = Release|Win32
- {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug|Win32.ActiveCfg = Release|Win32
- {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Debug|Win32.Build.0 = Release|Win32
- {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Release|Win32.ActiveCfg = Release|Win32
- {62C897BE-E207-4BC4-B37D-6F9F9116F166}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/WebKit/win/WebKit.vcproj/WebKit.vcproj b/WebKit/win/WebKit.vcproj/WebKit.vcproj
index 021dc94..121f773 100644
--- a/WebKit/win/WebKit.vcproj/WebKit.vcproj
+++ b/WebKit/win/WebKit.vcproj/WebKit.vcproj
@@ -247,8 +247,6 @@
</Configuration>
<Configuration
Name="Debug_Cairo|Win32"
- OutputDirectory="$(WebKitOutputDir)\bin"
- IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_wincairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\cURL.vsprops"
CharacterSet="1"
@@ -403,6 +401,83 @@
CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebLocalizableStrings.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitGraphics.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitCOMAPI.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebPreferenceKeysPrivate.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npfunctions.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npapi.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime_internal.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\$(ProjectName).resources\*&quot; &quot;$(OutDir)\$(ProjectName).resources&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\..\English.lproj\Localizable.strings&quot; &quot;$(OutDir)\WebKit.resources\en.lproj\&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
/>
</Configuration>
+ <Configuration
+ Name="Debug_All|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;touch &quot;$(WebKitOutputDir)\tmp.cpp&quot;&#x0D;&#x0A;cl /analyze /nologo /c &quot;$(WebKitOutputDir)\tmp.cpp&quot; /Fo&quot;$(IntDir)\tmp.obj&quot; 2&gt;&amp;1 | findstr D9040&#x0D;&#x0A;if ERRORLEVEL 1 (set EnablePREfast=&quot;true&quot;) else (set EnablePREfast=&quot;false&quot;)&#x0D;&#x0A;if ERRORLEVEL 1 (set AnalyzeWithLargeStack=&quot;/analyze:65536&quot;) else (set AnalyzeWithLargeStack=&quot;&quot;)&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\include\JavaScriptCore\*&quot; &quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;&#x0D;&#x0A;&#x0D;&#x0A;bash &quot;$(WebKitLibrariesDir)\tools\scripts\auto-version.sh&quot; &quot;$(IntDir)&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\icu&quot;;&quot;$(WebKitLibrariesDir)\Include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..\WebCoreSupport&quot;;&quot;$(IntDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_RUBY;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_VIDEO;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="WebKitPrefix.h"
+ Detect64BitPortabilityProblems="false"
+ DisableSpecificWarnings="4819"
+ ForcedIncludeFiles="WebKitPrefix.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="$(WebKitOutputDir)\obj\WebKit\"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitDLLConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib winmm.lib rpcrt4.lib comsuppw.lib"
+ OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
+ AdditionalLibraryDirectories=""
+ ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebLocalizableStrings.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitGraphics.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitCOMAPI.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebPreferenceKeysPrivate.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npfunctions.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npapi.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime_internal.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\$(ProjectName).resources\*&quot; &quot;$(OutDir)\$(ProjectName).resources&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\..\English.lproj\Localizable.strings&quot; &quot;$(OutDir)\WebKit.resources\en.lproj\&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ />
+ </Configuration>
</Configurations>
<References>
</References>
@@ -451,6 +526,10 @@
>
</File>
<File
+ RelativePath="..\AccessibleImage.h"
+ >
+ </File>
+ <File
RelativePath=".\autoversion.h"
>
</File>
@@ -679,6 +758,10 @@
>
</File>
<File
+ RelativePath="..\WebNavigationData.h"
+ >
+ </File>
+ <File
RelativePath="..\WebNodeHighlight.h"
>
</File>
@@ -763,6 +846,10 @@
>
</File>
<File
+ RelativePath="..\AccessibleImage.cpp"
+ >
+ </File>
+ <File
RelativePath="..\CFDictionaryPropertyBag.cpp"
>
</File>
@@ -865,6 +952,14 @@
Name="VCCLCompilerTool"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\WebCoreStatistics.cpp"
@@ -933,6 +1028,14 @@
Name="VCCLCompilerTool"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\WebDropSource.cpp"
@@ -995,6 +1098,10 @@
>
</File>
<File
+ RelativePath="..\WebNavigationData.cpp"
+ >
+ </File>
+ <File
RelativePath="..\WebNotification.cpp"
>
</File>
@@ -1081,6 +1188,14 @@
Name="VCCLCompilerTool"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\WebURLCredential.cpp"
@@ -1181,6 +1296,14 @@
AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\lib&quot;;&quot;$(WebKitOutputDir)\obj\$(ProjectName)\Interfaces&quot;"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\lib&quot;;&quot;$(WebKitOutputDir)\obj\$(ProjectName)\Interfaces&quot;"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath=".\zoomInCursor.png"
@@ -1232,814 +1355,6 @@
</File>
</Filter>
<Filter
- Name="DOM"
- >
- <File
- RelativePath="..\DOMCreateInstance.cpp"
- >
- </File>
- <File
- RelativePath="..\DOMCreateInstance.h"
- >
- </File>
- <File
- RelativePath="..\GEN_DOMObject.cpp"
- >
- </File>
- <File
- RelativePath="..\GEN_DOMObject.h"
- >
- </File>
- <Filter
- Name="DerivedSources"
- >
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMAttr.cpp"
- >
- <FileConfiguration
- Name="Debug_Internal|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ShowIncludes="false"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMAttr.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCDATASection.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCDATASection.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCharacterData.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCharacterData.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMComment.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMComment.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCounter.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCounter.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSCharsetRule.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSCharsetRule.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSFontFaceRule.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSFontFaceRule.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSImportRule.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSImportRule.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSMediaRule.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSMediaRule.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSPageRule.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSPageRule.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSPrimitiveValue.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSPrimitiveValue.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSRule.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSRule.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSRuleList.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSRuleList.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSStyleDeclaration.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSStyleDeclaration.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSStyleRule.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSStyleRule.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSStyleSheet.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSStyleSheet.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSUnknownRule.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSUnknownRule.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSValue.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSValue.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSValueList.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMCSSValueList.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMDocument.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMDocument.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMDocumentFragment.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMDocumentFragment.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMDocumentType.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMDocumentType.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMDOMImplementation.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMDOMImplementation.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMEntity.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMEntity.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMEntityReference.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMEntityReference.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMEvent.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMEvent.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMEventListener.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMEventTarget.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLAnchorElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLAnchorElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLAppletElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLAppletElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLAreaElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLAreaElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLBaseElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLBaseElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLBaseFontElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLBaseFontElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLBlockquoteElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLBlockquoteElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLBodyElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLBodyElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLBRElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLBRElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLButtonElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLButtonElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLCollection.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLCollection.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLDirectoryElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLDirectoryElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLDivElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLDivElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLDListElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLDListElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLDocument.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLDocument.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLEmbedElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLEmbedElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLFieldSetElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLFieldSetElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLFontElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLFontElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLFormElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLFormElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLFrameElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLFrameElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLFrameSetElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLFrameSetElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLHeadElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLHeadElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLHeadingElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLHeadingElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLHRElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLHRElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLHtmlElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLHtmlElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLIFrameElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLIFrameElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLImageElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLImageElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLInputElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLInputElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLIsIndexElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLIsIndexElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLLabelElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLLabelElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLLegendElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLLegendElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLLIElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLLIElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLLinkElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLLinkElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLMapElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLMapElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLMarqueeElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLMarqueeElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLMenuElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLMenuElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLMetaElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLMetaElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLModElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLModElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLObjectElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLObjectElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLOListElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLOListElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLOptGroupElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLOptGroupElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLOptionElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLOptionElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLOptionsCollection.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLOptionsCollection.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLParagraphElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLParagraphElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLParamElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLParamElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLPreElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLPreElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLQuoteElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLQuoteElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLScriptElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLScriptElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLSelectElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLSelectElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLStyleElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLStyleElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLTableCaptionElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLTableCaptionElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLTableCellElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLTableCellElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLTableColElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLTableColElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLTableElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLTableElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLTableRowElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLTableRowElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLTableSectionElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLTableSectionElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLTextAreaElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLTextAreaElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLTitleElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLTitleElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLUListElement.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMHTMLUListElement.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMMediaList.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMMediaList.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMNamedNodeMap.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMNamedNodeMap.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMNode.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMNode.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMNodeList.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMNodeList.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMNotation.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMNotation.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMProcessingInstruction.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMProcessingInstruction.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMRect.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMRect.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMStyleSheet.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMStyleSheet.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMStyleSheetList.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMStyleSheetList.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMText.cpp"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\DerivedSources\GEN_DOMText.h"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
Name="WebCoreSupport"
>
<File
@@ -2171,6 +1486,15 @@
UsePrecompiledHeader="1"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="WebKitPrefix.h"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\WebKitPrefix.h"
diff --git a/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj b/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj
index 309a021..ab7a0b2 100644
--- a/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj
+++ b/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj
@@ -196,6 +196,66 @@
CommandLine="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;"
/>
</Configuration>
+ <Configuration
+ Name="Debug_All|Win32"
+ OutputDirectory="$(WebKitOutputDir)\lib"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ AdditionalIncludeDirectories="Interfaces"
+ OutputDirectory="Debug"
+ HeaderFileName="$(InputName).h"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(WebKitOutputDir)\$(ConfigurationName)\WebKit"
+ PreprocessorDefinitions="_USRDLL;WEBKITGUID_EXPORTS"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;"
+ />
+ </Configuration>
</Configurations>
<References>
</References>
diff --git a/WebKit/win/WebKitClassFactory.cpp b/WebKit/win/WebKitClassFactory.cpp
index d1c4b72..c2143b5 100644
--- a/WebKit/win/WebKitClassFactory.cpp
+++ b/WebKit/win/WebKitClassFactory.cpp
@@ -61,7 +61,7 @@
// WebKitClassFactory ---------------------------------------------------------
#if USE(SAFARI_THEME)
-#if !defined(NDEBUG) && defined(USE_DEBUG_SAFARI_THEME)
+#ifdef DEBUG_ALL
SOFT_LINK_DEBUG_LIBRARY(SafariTheme)
#else
SOFT_LINK_LIBRARY(SafariTheme)
diff --git a/WebKit/win/WebLocalizableStrings.cpp b/WebKit/win/WebLocalizableStrings.cpp
index e2da4cb..69675e2 100644
--- a/WebKit/win/WebLocalizableStrings.cpp
+++ b/WebKit/win/WebLocalizableStrings.cpp
@@ -37,6 +37,7 @@
#include <wtf/Assertions.h>
#include <wtf/HashMap.h>
#include <wtf/RetainPtr.h>
+#include <wtf/StdLibExtras.h>
#include <CoreFoundation/CoreFoundation.h>
class LocalizedString;
@@ -45,8 +46,31 @@ using namespace WebCore;
WebLocalizableStringsBundle WebKitLocalizableStringsBundle = { "com.apple.WebKit", 0 };
-static HashMap<String, LocalizedString*> mainBundleLocStrings;
-static HashMap<String, LocalizedString*> frameworkLocStrings;
+typedef HashMap<String, LocalizedString*> LocalizedStringMap;
+
+static Mutex& mainBundleLocStringsMutex()
+{
+ DEFINE_STATIC_LOCAL(Mutex, mutex, ());
+ return mutex;
+}
+
+static LocalizedStringMap& mainBundleLocStrings()
+{
+ DEFINE_STATIC_LOCAL(LocalizedStringMap, map, ());
+ return map;
+}
+
+static Mutex& frameworkLocStringsMutex()
+{
+ DEFINE_STATIC_LOCAL(Mutex, mutex, ());
+ return mutex;
+}
+
+static LocalizedStringMap frameworkLocStrings()
+{
+ DEFINE_STATIC_LOCAL(LocalizedStringMap, map, ());
+ return map;
+}
class LocalizedString : public Noncopyable {
public:
@@ -156,11 +180,15 @@ static CFStringRef copyLocalizedStringFromBundle(WebLocalizableStringsBundle* st
static LocalizedString* findCachedString(WebLocalizableStringsBundle* stringsBundle, const String& key)
{
- if (!stringsBundle)
- return mainBundleLocStrings.get(key);
+ if (!stringsBundle) {
+ MutexLocker lock(mainBundleLocStringsMutex());
+ return mainBundleLocStrings().get(key);
+ }
- if (stringsBundle->bundle == WebKitLocalizableStringsBundle.bundle)
- return frameworkLocStrings.get(key);
+ if (stringsBundle->bundle == WebKitLocalizableStringsBundle.bundle) {
+ MutexLocker lock(frameworkLocStringsMutex());
+ return frameworkLocStrings().get(key);
+ }
return 0;
}
@@ -168,11 +196,13 @@ static LocalizedString* findCachedString(WebLocalizableStringsBundle* stringsBun
static void cacheString(WebLocalizableStringsBundle* stringsBundle, const String& key, LocalizedString* value)
{
if (!stringsBundle) {
- mainBundleLocStrings.set(key, value);
+ MutexLocker lock(mainBundleLocStringsMutex());
+ mainBundleLocStrings().set(key, value);
return;
}
- frameworkLocStrings.set(key, value);
+ MutexLocker lock(frameworkLocStringsMutex());
+ frameworkLocStrings().set(key, value);
}
static const LocalizedString& localizedString(WebLocalizableStringsBundle* stringsBundle, const String& key)
diff --git a/WebKit/win/WebNavigationData.cpp b/WebKit/win/WebNavigationData.cpp
new file mode 100644
index 0000000..1ae3fe5
--- /dev/null
+++ b/WebKit/win/WebNavigationData.cpp
@@ -0,0 +1,144 @@
+/*
+ * Copyright (C) 2009 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 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.
+ */
+
+#include "config.h"
+#include "WebKitDLL.h"
+#include "WebNavigationData.h"
+
+#include <WebCore/BString.h>
+using WebCore::BString;
+
+// IUnknown -------------------------------------------------------------------
+
+HRESULT STDMETHODCALLTYPE WebNavigationData::QueryInterface(REFIID riid, void** ppvObject)
+{
+ *ppvObject = 0;
+ if (IsEqualGUID(riid, IID_IUnknown))
+ *ppvObject = static_cast<IWebNavigationData*>(this);
+ else if (IsEqualGUID(riid, IID_IWebNavigationData))
+ *ppvObject = static_cast<IWebNavigationData*>(this);
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+
+ULONG STDMETHODCALLTYPE WebNavigationData::AddRef(void)
+{
+ return ++m_refCount;
+}
+
+ULONG STDMETHODCALLTYPE WebNavigationData::Release(void)
+{
+ ULONG newRef = --m_refCount;
+ if (!newRef)
+ delete(this);
+
+ return newRef;
+}
+
+// WebNavigationData -------------------------------------------------------------------
+
+WebNavigationData::WebNavigationData(BSTR url, BSTR title, IWebURLRequest* request, IWebURLResponse* response, bool hasSubstituteData, BSTR clientRedirectSource)
+ : m_refCount(0)
+ , m_request(request)
+ , m_response(response)
+ , m_hasSubstituteData(hasSubstituteData)
+
+{
+ gClassCount++;
+ gClassNameCount.add("WebNavigationData");
+
+ m_url.adoptBSTR(url);
+ m_title.adoptBSTR(title);
+ m_clientRedirectSource.adoptBSTR(clientRedirectSource);
+}
+
+WebNavigationData::~WebNavigationData()
+{
+ gClassCount--;
+ gClassNameCount.remove("WebNavigationData");
+}
+
+WebNavigationData* WebNavigationData::createInstance(BSTR url, BSTR title, IWebURLRequest* request, IWebURLResponse* response, bool hasSubstituteData, BSTR clientRedirectSource)
+{
+ WebNavigationData* instance = new WebNavigationData(url, title, request, response, hasSubstituteData, clientRedirectSource);
+ instance->AddRef();
+ return instance;
+}
+
+// IWebNavigationData -------------------------------------------------------------------
+
+HRESULT WebNavigationData::url(BSTR* url)
+{
+ if (!url)
+ return E_POINTER;
+ *url = BString(m_url).release();
+ return S_OK;
+}
+
+HRESULT WebNavigationData::title(BSTR* title)
+{
+ if (!title)
+ return E_POINTER;
+ *title = BString(m_title).release();
+ return S_OK;
+}
+
+HRESULT WebNavigationData::originalRequest(IWebURLRequest** request)
+{
+ if (!request)
+ return E_POINTER;
+ *request = m_request.get();
+ m_request->AddRef();
+ return S_OK;
+}
+
+HRESULT WebNavigationData::response(IWebURLResponse** response)
+{
+ if (!response)
+ return E_POINTER;
+ *response = m_response.get();
+ m_response->AddRef();
+ return S_OK;
+}
+
+HRESULT WebNavigationData::hasSubstituteData(BOOL* hasSubstituteData)
+{
+ if (!hasSubstituteData)
+ return E_POINTER;
+ *hasSubstituteData = m_hasSubstituteData;
+ return S_OK;
+}
+
+HRESULT WebNavigationData::clientRedirectSource(BSTR* clientRedirectSource)
+{
+ if (!clientRedirectSource)
+ return E_POINTER;
+
+ *clientRedirectSource = BString(m_clientRedirectSource).release();
+ return S_OK;
+}
diff --git a/WebKit/win/WebNavigationData.h b/WebKit/win/WebNavigationData.h
new file mode 100644
index 0000000..0443fd7
--- /dev/null
+++ b/WebKit/win/WebNavigationData.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2009 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 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 WebNavigationData_h
+#define WebNavigationData_h
+
+#include "WebKit.h"
+
+#include "COMPtr.h"
+#include <WebCore/BString.h>
+
+class WebNavigationData : public IWebNavigationData {
+public:
+ static WebNavigationData* createInstance(BSTR, BSTR, IWebURLRequest*, IWebURLResponse*, bool, BSTR);
+private:
+ WebNavigationData(BSTR url, BSTR title, IWebURLRequest*, IWebURLResponse*, bool hasSubstituteData, BSTR clientRedirectSource);
+ ~WebNavigationData();
+
+public:
+ // IUnknown
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef(void);
+ virtual ULONG STDMETHODCALLTYPE Release(void);
+
+ // IWebNavigationData
+ virtual HRESULT STDMETHODCALLTYPE url(
+ /* [retval][out] */ BSTR*);
+
+ virtual HRESULT STDMETHODCALLTYPE title(
+ /* [retval][out] */ BSTR*);
+
+ virtual HRESULT STDMETHODCALLTYPE originalRequest(
+ /* [retval][out] */ IWebURLRequest**);
+
+ virtual HRESULT STDMETHODCALLTYPE response(
+ /* [retval][out] */ IWebURLResponse**);
+
+ virtual HRESULT STDMETHODCALLTYPE hasSubstituteData(
+ /* [retval][out] */ BOOL*);
+
+ virtual HRESULT STDMETHODCALLTYPE clientRedirectSource(
+ /* [retval][out] */ BSTR*);
+
+private:
+ ULONG m_refCount;
+ WebCore::BString m_url;
+ WebCore::BString m_title;
+ COMPtr<IWebURLRequest> m_request;
+ COMPtr<IWebURLResponse> m_response;
+ bool m_hasSubstituteData;
+ WebCore::BString m_clientRedirectSource;
+
+};
+
+#endif // WebNavigationData_h
diff --git a/WebKit/win/WebPreferenceKeysPrivate.h b/WebKit/win/WebPreferenceKeysPrivate.h
index e0c2b6f..09aeaff 100644
--- a/WebKit/win/WebPreferenceKeysPrivate.h
+++ b/WebKit/win/WebPreferenceKeysPrivate.h
@@ -54,7 +54,6 @@
#define WebKitDatabasesEnabledPreferenceKey "WebKitDatabasesEnabled"
#define WebKitLocalStorageEnabledPreferenceKey "WebKitLocalStorageEnabled"
#define WebKitExperimentalNotificationsEnabledPreferenceKey "WebKitExperimentalNotificationsEnabled"
-#define WebKitExperimentalWebSocketsEnabledPreferenceKey "WebKitExperimentalWebSocketsEnabled"
#define WebKitAllowAnimatedImagesPreferenceKey "WebKitAllowAnimatedImagesPreferenceKey"
#define WebKitAllowAnimatedImageLoopingPreferenceKey "WebKitAllowAnimatedImageLoopingPreferenceKey"
#define WebKitDisplayImagesKey "WebKitDisplayImagesKey"
@@ -129,6 +128,4 @@
#define WebKitUseHighResolutionTimersPreferenceKey "WebKitUseHighResolutionTimers"
-#define WebKitPluginHalterEnabledPreferenceKey "WebKitPluginHalterEnabled"
-
#define WebKitPluginAllowedRunTimePreferenceKey "WebKitPluginAllowedRunTime"
diff --git a/WebKit/win/WebPreferences.cpp b/WebKit/win/WebPreferences.cpp
index e37177e..652e619 100644
--- a/WebKit/win/WebPreferences.cpp
+++ b/WebKit/win/WebPreferences.cpp
@@ -213,7 +213,6 @@ void WebPreferences::initializeDefaultSettings()
CFDictionaryAddValue(defaults, CFSTR(WebKitDatabasesEnabledPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitLocalStorageEnabledPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitExperimentalNotificationsEnabledPreferenceKey), kCFBooleanFalse);
- CFDictionaryAddValue(defaults, CFSTR(WebKitExperimentalWebSocketsEnabledPreferenceKey), kCFBooleanFalse);
CFDictionaryAddValue(defaults, CFSTR(WebKitAllowAnimatedImagesPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitAllowAnimatedImageLoopingPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitDisplayImagesKey), kCFBooleanTrue);
@@ -253,8 +252,6 @@ void WebPreferences::initializeDefaultSettings()
CFDictionaryAddValue(defaults, CFSTR(WebKitUseHighResolutionTimersPreferenceKey), kCFBooleanTrue);
- CFDictionaryAddValue(defaults, CFSTR(WebKitPluginHalterEnabledPreferenceKey), kCFBooleanFalse);
-
RetainPtr<CFStringRef> pluginAllowedRunTime(AdoptCF, CFStringCreateWithFormat(0, 0, CFSTR("%u"), numeric_limits<unsigned>::max()));
CFDictionaryAddValue(defaults, CFSTR(WebKitPluginAllowedRunTimePreferenceKey), pluginAllowedRunTime.get());
@@ -1312,18 +1309,6 @@ HRESULT STDMETHODCALLTYPE WebPreferences::experimentalNotificationsEnabled(BOOL*
return S_OK;
}
-HRESULT STDMETHODCALLTYPE WebPreferences::setExperimentalWebSocketsEnabled(BOOL enabled)
-{
- setBoolValue(CFSTR(WebKitExperimentalWebSocketsEnabledPreferenceKey), enabled);
- return S_OK;
-}
-
-HRESULT STDMETHODCALLTYPE WebPreferences::experimentalWebSocketsEnabled(BOOL* enabled)
-{
- *enabled = boolValueForKey(CFSTR(WebKitExperimentalWebSocketsEnabledPreferenceKey));
- return S_OK;
-}
-
HRESULT WebPreferences::setZoomsTextOnly(BOOL zoomsTextOnly)
{
setBoolValue(CFSTR(WebKitZoomsTextOnlyPreferenceKey), zoomsTextOnly);
@@ -1348,19 +1333,6 @@ HRESULT STDMETHODCALLTYPE WebPreferences::shouldUseHighResolutionTimers(BOOL* us
return S_OK;
}
-
-HRESULT STDMETHODCALLTYPE WebPreferences::setPluginHalterEnabled(BOOL enabled)
-{
- setBoolValue(CFSTR(WebKitPluginHalterEnabledPreferenceKey), enabled);
- return S_OK;
-}
-
-HRESULT STDMETHODCALLTYPE WebPreferences::pluginHalterEnabled(BOOL* enabled)
-{
- *enabled = boolValueForKey(CFSTR(WebKitPluginHalterEnabledPreferenceKey));
- return S_OK;
-}
-
HRESULT WebPreferences::setPluginAllowedRunTime(UINT allowedRunTime)
{
setIntegerValue(CFSTR(WebKitPluginAllowedRunTimePreferenceKey), allowedRunTime);
diff --git a/WebKit/win/WebPreferences.h b/WebKit/win/WebPreferences.h
index 14035d0..2a89269 100644
--- a/WebKit/win/WebPreferences.h
+++ b/WebKit/win/WebPreferences.h
@@ -332,12 +332,6 @@ public:
virtual HRESULT STDMETHODCALLTYPE setExperimentalNotificationsEnabled(
/* [in] */ BOOL enabled);
- virtual HRESULT STDMETHODCALLTYPE experimentalWebSocketsEnabled(
- /* [retval][out] */ BOOL *enabled);
-
- virtual HRESULT STDMETHODCALLTYPE setExperimentalWebSocketsEnabled(
- /* [in] */ BOOL enabled);
-
virtual HRESULT STDMETHODCALLTYPE setShouldPaintNativeControls(
/* [in] */ BOOL shouldPaint);
@@ -380,12 +374,6 @@ public:
virtual HRESULT STDMETHODCALLTYPE shouldUseHighResolutionTimers(
/* [retval][out] */ BOOL* useHighResolutionTimers);
- virtual HRESULT STDMETHODCALLTYPE setPluginHalterEnabled(
- /* [in] */ BOOL enabled);
-
- virtual HRESULT STDMETHODCALLTYPE pluginHalterEnabled(
- /* [retval][out] */ BOOL* enabled);
-
virtual HRESULT STDMETHODCALLTYPE setPluginAllowedRunTime(
/* [in] */ UINT allowedRunTime);
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index 85b2ac2..e2f3fae 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -100,6 +100,7 @@
#include <WebCore/ProgressTracker.h>
#include <WebCore/RenderTheme.h>
#include <WebCore/RenderView.h>
+#include <WebCore/RenderWidget.h>
#include <WebCore/ResourceHandle.h>
#include <WebCore/ResourceHandleClient.h>
#include <WebCore/ScriptValue.h>
@@ -639,6 +640,7 @@ HRESULT STDMETHODCALLTYPE WebView::close()
setEditingDelegate(0);
setFrameLoadDelegate(0);
setFrameLoadDelegatePrivate(0);
+ setHistoryDelegate(0);
setPolicyDelegate(0);
setResourceLoadDelegate(0);
setUIDelegate(0);
@@ -1983,6 +1985,10 @@ static LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, L
// Send blur events unless we're losing focus to a child of ours.
if (!IsChild(hWnd, newFocusWnd))
focusController->setFocused(false);
+
+ // If we are pan-scrolling when we lose focus, stop the pan scrolling.
+ frame->eventHandler()->stopAutoscrollTimer();
+
break;
}
case WM_WINDOWPOSCHANGED:
@@ -2865,7 +2871,7 @@ HRESULT STDMETHODCALLTYPE WebView::stringByEvaluatingJavaScriptFromString(
if (!coreFrame)
return E_FAIL;
- JSC::JSValue scriptExecutionResult = coreFrame->loader()->executeScript(WebCore::String(script), true).jsValue();
+ JSC::JSValue scriptExecutionResult = coreFrame->script()->executeScript(WebCore::String(script), true).jsValue();
if (!scriptExecutionResult)
return E_FAIL;
else if (scriptExecutionResult.isString()) {
@@ -3360,10 +3366,34 @@ HRESULT STDMETHODCALLTYPE WebView::setMainFrameURL(
}
HRESULT STDMETHODCALLTYPE WebView::mainFrameURL(
- /* [retval][out] */ BSTR* /*urlString*/)
+ /* [retval][out] */ BSTR* urlString)
{
- ASSERT_NOT_REACHED();
- return E_NOTIMPL;
+ if (!urlString)
+ return E_POINTER;
+
+ if (!m_mainFrame)
+ return E_FAIL;
+
+ COMPtr<IWebDataSource> dataSource;
+
+ if (FAILED(m_mainFrame->provisionalDataSource(&dataSource))) {
+ if (FAILED(m_mainFrame->dataSource(&dataSource)))
+ return E_FAIL;
+ }
+
+ if (!dataSource) {
+ *urlString = 0;
+ return S_OK;
+ }
+
+ COMPtr<IWebMutableURLRequest> request;
+ if (FAILED(dataSource->request(&request)) || !request)
+ return E_FAIL;
+
+ if (FAILED(request->URL(urlString)))
+ return E_FAIL;
+
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE WebView::mainFrameDocument(
@@ -4409,11 +4439,6 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
return hr;
settings->setExperimentalNotificationsEnabled(enabled);
- hr = prefsPrivate->experimentalWebSocketsEnabled(&enabled);
- if (FAILED(hr))
- return hr;
- settings->setExperimentalWebSocketsEnabled(enabled);
-
hr = prefsPrivate->isWebSecurityEnabled(&enabled);
if (FAILED(hr))
return hr;
@@ -4441,11 +4466,6 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
return hr;
settings->setShouldUseHighResolutionTimers(enabled);
- hr = prefsPrivate->pluginHalterEnabled(&enabled);
- if (FAILED(hr))
- return hr;
- settings->setPluginHalterEnabled(enabled);
-
UINT runTime;
hr = prefsPrivate->pluginAllowedRunTime(&runTime);
if (FAILED(hr))
@@ -4624,11 +4644,25 @@ static DWORD dragOperationToDragCursor(DragOperation op) {
return res;
}
-static DragOperation keyStateToDragOperation(DWORD) {
- //FIXME: This is currently very simple, it may need to actually
- //work out an appropriate DragOperation in future -- however this
- //behaviour appears to match FireFox
- return (DragOperation)(DragOperationCopy | DragOperationLink);
+DragOperation WebView::keyStateToDragOperation(DWORD grfKeyState) const
+{
+ if (!m_page)
+ return DragOperationNone;
+
+ // Conforms to Microsoft's key combinations as documented for
+ // IDropTarget::DragOver. Note, grfKeyState is the current
+ // state of the keyboard modifier keys on the keyboard. See:
+ // <http://msdn.microsoft.com/en-us/library/ms680129(VS.85).aspx>.
+ DragOperation operation = m_page->dragController()->sourceDragOperation();
+
+ if ((grfKeyState & (MK_CONTROL | MK_SHIFT)) == (MK_CONTROL | MK_SHIFT))
+ operation = DragOperationLink;
+ else if ((grfKeyState & MK_CONTROL) == MK_CONTROL)
+ operation = DragOperationCopy;
+ else if ((grfKeyState & MK_SHIFT) == MK_SHIFT)
+ operation = DragOperationGeneric;
+
+ return operation;
}
HRESULT STDMETHODCALLTYPE WebView::DragEnter(
@@ -4645,6 +4679,7 @@ HRESULT STDMETHODCALLTYPE WebView::DragEnter(
IntPoint(pt.x, pt.y), keyStateToDragOperation(grfKeyState));
*pdwEffect = dragOperationToDragCursor(m_page->dragController()->dragEntered(&data));
+ m_lastDropEffect = *pdwEffect;
m_dragData = pDataObject;
return S_OK;
@@ -4665,6 +4700,7 @@ HRESULT STDMETHODCALLTYPE WebView::DragOver(
} else
*pdwEffect = DROPEFFECT_NONE;
+ m_lastDropEffect = *pdwEffect;
return S_OK;
}
@@ -4689,7 +4725,7 @@ HRESULT STDMETHODCALLTYPE WebView::Drop(
m_dropTargetHelper->Drop(pDataObject, (POINT*)&pt, *pdwEffect);
m_dragData = 0;
- *pdwEffect = DROPEFFECT_NONE;
+ *pdwEffect = m_lastDropEffect;
POINTL localpt = pt;
::ScreenToClient(m_viewWindow, (LPPOINT)&localpt);
DragData data(pDataObject, IntPoint(localpt.x, localpt.y),
@@ -4815,7 +4851,7 @@ HRESULT STDMETHODCALLTYPE WebView::loadBackForwardListFromOtherView(
// If this item is showing , save away its current scroll and form state,
// since that might have changed since loading and it is normally not saved
// until we leave that page.
- otherWebView->m_page->mainFrame()->loader()->saveDocumentAndScrollState();
+ otherWebView->m_page->mainFrame()->loader()->history()->saveDocumentAndScrollState();
}
RefPtr<HistoryItem> newItem = otherBackForwardList->itemAtIndex(i)->copy();
if (!i)
@@ -5458,9 +5494,9 @@ HRESULT WebView::addUserScriptToGroup(BSTR groupName, unsigned worldID, BSTR sou
if (!pageGroup)
return E_FAIL;
- pageGroup->addUserScript(String(source, SysStringLen(source)), KURL(KURL(), String(url, SysStringLen(url))),
- toStringVector(whitelistCount, whitelist), toStringVector(blacklistCount, blacklist), worldID,
- injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd);
+ pageGroup->addUserScriptToWorld(worldID, String(source, SysStringLen(source)), KURL(KURL(), String(url, SysStringLen(url))),
+ toStringVector(whitelistCount, whitelist), toStringVector(blacklistCount, blacklist),
+ injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd);
return S_OK;
}
@@ -5478,13 +5514,13 @@ HRESULT WebView::addUserStyleSheetToGroup(BSTR groupName, unsigned worldID, BSTR
if (!pageGroup)
return E_FAIL;
- pageGroup->addUserStyleSheet(String(source, SysStringLen(source)), KURL(KURL(), String(url, SysStringLen(url))),
- toStringVector(whitelistCount, whitelist), toStringVector(blacklistCount, blacklist), worldID);
+ pageGroup->addUserStyleSheetToWorld(worldID, String(source, SysStringLen(source)), KURL(KURL(), String(url, SysStringLen(url))),
+ toStringVector(whitelistCount, whitelist), toStringVector(blacklistCount, blacklist));
return S_OK;
}
-HRESULT WebView::removeUserContentWithURLFromGroup(BSTR groupName, unsigned worldID, BSTR url)
+HRESULT WebView::removeUserScriptFromGroup(BSTR groupName, unsigned worldID, BSTR url)
{
String group(groupName, SysStringLen(groupName));
if (group.isEmpty() || !worldID || worldID == numeric_limits<unsigned>::max())
@@ -5495,12 +5531,43 @@ HRESULT WebView::removeUserContentWithURLFromGroup(BSTR groupName, unsigned worl
if (!pageGroup)
return E_FAIL;
- pageGroup->removeUserContentWithURLForWorld(KURL(KURL(), String(url, SysStringLen(url))), worldID);
+ pageGroup->removeUserScriptFromWorld(worldID, KURL(KURL(), String(url, SysStringLen(url))));
+
+ return S_OK;
+}
+
+HRESULT WebView::removeUserStyleSheetFromGroup(BSTR groupName, unsigned worldID, BSTR url)
+{
+ String group(groupName, SysStringLen(groupName));
+ if (group.isEmpty() || !worldID || worldID == numeric_limits<unsigned>::max())
+ return E_INVALIDARG;
+
+ PageGroup* pageGroup = PageGroup::pageGroup(group);
+ ASSERT(pageGroup);
+ if (!pageGroup)
+ return E_FAIL;
+
+ pageGroup->removeUserStyleSheetFromWorld(worldID, KURL(KURL(), String(url, SysStringLen(url))));
+
+ return S_OK;
+}
+
+HRESULT WebView::removeUserScriptsFromGroup(BSTR groupName, unsigned worldID)
+{
+ String group(groupName, SysStringLen(groupName));
+ if (group.isEmpty() || !worldID || worldID == numeric_limits<unsigned>::max())
+ return E_INVALIDARG;
+
+ PageGroup* pageGroup = PageGroup::pageGroup(group);
+ ASSERT(pageGroup);
+ if (!pageGroup)
+ return E_FAIL;
+ pageGroup->removeUserScriptsFromWorld(worldID);
return S_OK;
}
-HRESULT WebView::removeUserContentFromGroup(BSTR groupName, unsigned worldID)
+HRESULT WebView::removeUserStyleSheetsFromGroup(BSTR groupName, unsigned worldID)
{
String group(groupName, SysStringLen(groupName));
if (group.isEmpty() || !worldID || worldID == numeric_limits<unsigned>::max())
@@ -5511,7 +5578,7 @@ HRESULT WebView::removeUserContentFromGroup(BSTR groupName, unsigned worldID)
if (!pageGroup)
return E_FAIL;
- pageGroup->removeUserContentForWorld(worldID);
+ pageGroup->removeUserStyleSheetsFromWorld(worldID);
return S_OK;
}
@@ -5560,6 +5627,33 @@ HRESULT WebView::resetOriginAccessWhiteLists()
SecurityOrigin::resetOriginAccessWhiteLists();
return S_OK;
}
+
+HRESULT WebView::setHistoryDelegate(IWebHistoryDelegate* historyDelegate)
+{
+ m_historyDelegate = historyDelegate;
+ return S_OK;
+}
+
+HRESULT WebView::historyDelegate(IWebHistoryDelegate** historyDelegate)
+{
+ if (!historyDelegate)
+ return E_POINTER;
+
+ return m_historyDelegate.copyRefTo(historyDelegate);
+}
+
+HRESULT WebView::addVisitedLinks(BSTR* visitedURLs, unsigned visitedURLCount)
+{
+ PageGroup& group = core(this)->group();
+
+ for (unsigned i = 0; i < visitedURLCount; ++i) {
+ BSTR url = visitedURLs[i];
+ unsigned length = SysStringLen(url);
+ group.addVisitedLink(url, length);
+ }
+
+ return S_OK;
+}
void WebView::downloadURL(const KURL& url)
{
@@ -5587,6 +5681,70 @@ HRESULT STDMETHODCALLTYPE WebView::pluginHalterDelegate(IWebPluginHalterDelegate
return m_pluginHalterDelegate.copyRefTo(d);
}
+static PluginView* pluginViewForNode(IDOMNode* domNode)
+{
+ COMPtr<DOMNode> webKitDOMNode(Query, domNode);
+ if (!webKitDOMNode)
+ return 0;
+
+ Node* node = webKitDOMNode->node();
+ if (!node)
+ return 0;
+
+ RenderObject* renderer = node->renderer();
+ if (!renderer || !renderer->isWidget())
+ return 0;
+
+ Widget* widget = toRenderWidget(renderer)->widget();
+ if (!widget || !widget->isPluginView())
+ return 0;
+
+ return static_cast<PluginView*>(widget);
+}
+
+HRESULT WebView::isNodeHaltedPlugin(IDOMNode* domNode, BOOL* result)
+{
+ if (!domNode || !result)
+ return E_POINTER;
+
+ *result = FALSE;
+
+ PluginView* view = pluginViewForNode(domNode);
+ if (!view)
+ return E_FAIL;
+
+ *result = view->isHalted();
+ return S_OK;
+}
+
+HRESULT WebView::restartHaltedPluginForNode(IDOMNode* domNode)
+{
+ if (!domNode)
+ return E_POINTER;
+
+ PluginView* view = pluginViewForNode(domNode);
+ if (!view)
+ return E_FAIL;
+
+ view->restart();
+ return S_OK;
+}
+
+HRESULT WebView::hasPluginForNodeBeenHalted(IDOMNode* domNode, BOOL* result)
+{
+ if (!domNode || !result)
+ return E_POINTER;
+
+ *result = FALSE;
+
+ PluginView* view = pluginViewForNode(domNode);
+ if (!view)
+ return E_FAIL;
+
+ *result = view->hasBeenHalted();
+ return S_OK;
+}
+
class EnumTextMatches : public IEnumTextMatches
{
long m_ref;
diff --git a/WebKit/win/WebView.h b/WebKit/win/WebView.h
index 3f20c69..b4c1239 100644
--- a/WebKit/win/WebView.h
+++ b/WebKit/win/WebView.h
@@ -11,7 +11,7 @@
* 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
+ * EXPRESS OR IMPLIED WARRANTIES, INCfLUDING, 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,
@@ -747,8 +747,10 @@ public:
virtual HRESULT STDMETHODCALLTYPE addUserStyleSheetToGroup(BSTR groupName, unsigned worldID, BSTR source, BSTR url,
unsigned whitelistCount, BSTR* whitelist,
unsigned blacklistCount, BSTR* blacklist);
- virtual HRESULT STDMETHODCALLTYPE removeUserContentWithURLFromGroup(BSTR groupName, unsigned worldID, BSTR url);
- virtual HRESULT STDMETHODCALLTYPE removeUserContentFromGroup(BSTR groupName, unsigned worldID);
+ virtual HRESULT STDMETHODCALLTYPE removeUserScriptFromGroup(BSTR groupName, unsigned worldID, BSTR url);
+ virtual HRESULT STDMETHODCALLTYPE removeUserStyleSheetFromGroup(BSTR groupName, unsigned worldID, BSTR url);
+ virtual HRESULT STDMETHODCALLTYPE removeUserScriptsFromGroup(BSTR groupName, unsigned worldID);
+ virtual HRESULT STDMETHODCALLTYPE removeUserStyleSheetsFromGroup(BSTR groupName, unsigned worldID);
virtual HRESULT STDMETHODCALLTYPE removeAllUserContentFromGroup(BSTR groupName);
virtual HRESULT STDMETHODCALLTYPE setPluginHalterDelegate(IWebPluginHalterDelegate*);
@@ -759,6 +761,15 @@ public:
virtual HRESULT STDMETHODCALLTYPE whiteListAccessFromOrigin(BSTR sourceOrigin, BSTR destinationProtocol, BSTR destinationHost, BOOL allowDestinationSubdomains);
virtual HRESULT STDMETHODCALLTYPE resetOriginAccessWhiteLists();
+
+ virtual HRESULT STDMETHODCALLTYPE setHistoryDelegate(IWebHistoryDelegate* historyDelegate);
+ virtual HRESULT STDMETHODCALLTYPE historyDelegate(IWebHistoryDelegate** historyDelegate);
+ virtual HRESULT STDMETHODCALLTYPE addVisitedLinks(BSTR* visitedURLs, unsigned visitedURLCount);
+
+ virtual HRESULT STDMETHODCALLTYPE isNodeHaltedPlugin(IDOMNode*, BOOL*);
+ virtual HRESULT STDMETHODCALLTYPE restartHaltedPluginForNode(IDOMNode*);
+ virtual HRESULT STDMETHODCALLTYPE hasPluginForNodeBeenHalted(IDOMNode*, BOOL*);
+
// WebView
bool shouldUseEmbeddedView(const WebCore::String& mimeType) const;
@@ -865,6 +876,14 @@ private:
void paintIntoBackingStore(WebCore::FrameView*, HDC bitmapDC, const WebCore::IntRect& dirtyRect, WindowsToPaint);
void updateBackingStore(WebCore::FrameView*, HDC = 0, bool backingStoreCompletelyDirty = false, WindowsToPaint = PaintWebViewOnly);
+ WebCore::DragOperation keyStateToDragOperation(DWORD grfKeyState) const;
+
+ // FIXME: This variable is part of a workaround. The drop effect (pdwEffect) passed to Drop is incorrect.
+ // We set this variable in DragEnter and DragOver so that it can be used in Drop to set the correct drop effect.
+ // Thus, on return from DoDragDrop we have the correct pdwEffect for the drag-and-drop operation.
+ // (see https://bugs.webkit.org/show_bug.cgi?id=29264)
+ DWORD m_lastDropEffect;
+
protected:
HIMC getIMMContext();
void releaseIMMContext(HIMC);
@@ -904,6 +923,7 @@ protected:
COMPtr<IWebPolicyDelegate> m_policyDelegate;
COMPtr<IWebResourceLoadDelegate> m_resourceLoadDelegate;
COMPtr<IWebDownloadDelegate> m_downloadDelegate;
+ COMPtr<IWebHistoryDelegate> m_historyDelegate;
COMPtr<WebPreferences> m_preferences;
COMPtr<WebInspector> m_webInspector;
COMPtr<IWebPluginHalterDelegate> m_pluginHalterDelegate;
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index 76f4533..f2cc27f 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,92 @@
+2009-10-23 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix. Update the globalObject calls after changes.
+
+ * WebFrame.cpp:
+ (wxWebFrame::RunScript):
+ * WebKitSupport/FrameLoaderClientWx.cpp:
+ (WebCore::FrameLoaderClientWx::windowObjectCleared):
+
+2009-10-21 Pedro Romano <pmcnr72@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Include 'WebFrame.h' declared classes in wxPython bindings.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30504
+
+ * bindings/python/webview.i:
+
+2009-10-18 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Add the ability to specify a proxy for wxWebKit.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30446
+
+ * WebView.cpp:
+ (curlProxyType):
+ (wxWebView::SetProxyInfo):
+ * WebView.h:
+
+2009-10-18 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Add basic database support to wx API
+
+ https://bugs.webkit.org/show_bug.cgi?id=30445
+
+ * WebKitSupport/ChromeClientWx.cpp:
+ (WebCore::ChromeClientWx::exceededDatabaseQuota):
+ * WebView.cpp:
+ (wxWebView::Create):
+ (wxWebView::SetDatabaseDirectory):
+ (wxWebView::GetDatabaseDirectory):
+ * WebView.h:
+
+2009-10-16 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Optionally allow the user to zoom text using the mouse wheel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30444
+
+ * WebView.cpp:
+ (wxWebView::wxWebView):
+ (wxWebView::OnMouseEvents):
+ * WebView.h:
+
+2009-10-16 Kevin Ollivier <kevino@theolliviers.com>
+
+ wxMSW non-precomp headers build fix.
+
+ * WebView.cpp:
+
+2009-10-15 Robin Dunn <robin@alldunn.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Update the wxPython simple.py sample to match current wxWebKit API.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30406
+
+ * bindings/python/samples/simple.py:
+
+2009-10-08 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move executeScript from FrameLoader to ScriptController
+ https://bugs.webkit.org/show_bug.cgi?id=30200
+
+ Update API call.
+
+ * WebFrame.cpp:
+ (wxWebFrame::RunScript):
+
2009-10-07 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
diff --git a/WebKit/wx/WebFrame.cpp b/WebKit/wx/WebFrame.cpp
index f205152..9018d37 100644
--- a/WebKit/wx/WebFrame.cpp
+++ b/WebKit/wx/WebFrame.cpp
@@ -188,9 +188,9 @@ wxString wxWebFrame::RunScript(const wxString& javascript)
{
wxString returnValue = wxEmptyString;
if (m_impl->frame) {
- JSC::JSValue result = m_impl->frame->loader()->executeScript(javascript, true).jsValue();
+ JSC::JSValue result = m_impl->frame->script()->executeScript(javascript, true).jsValue();
if (result)
- returnValue = wxString(result.toString(m_impl->frame->script()->globalObject()->globalExec()).UTF8String().c_str(), wxConvUTF8);
+ returnValue = wxString(result.toString(m_impl->frame->script()->globalObject(WebCore::mainThreadNormalWorld())->globalExec()).UTF8String().c_str(), wxConvUTF8);
}
return returnValue;
}
diff --git a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
index 9b2f264..629463f 100644
--- a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
+++ b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
@@ -28,8 +28,12 @@
#include "config.h"
#include "ChromeClientWx.h"
#include "Console.h"
+#if ENABLE(DATABASE)
+#include "DatabaseTracker.h"
+#endif
#include "FileChooser.h"
#include "FloatRect.h"
+#include "Frame.h"
#include "FrameLoadRequest.h"
#include "NotImplemented.h"
#include "PlatformString.h"
@@ -381,7 +385,13 @@ void ChromeClientWx::print(Frame*)
#if ENABLE(DATABASE)
void ChromeClientWx::exceededDatabaseQuota(Frame*, const String&)
{
- notImplemented();
+ unsigned long long quota = 5 * 1024 * 1024;
+
+ if (wxWebFrame* webFrame = m_webView->GetMainFrame())
+ if (Frame* frame = webFrame->GetFrame())
+ if (Document* document = frame->document())
+ if (!DatabaseTracker::tracker().hasEntryForOrigin(document->securityOrigin()))
+ DatabaseTracker::tracker().setQuota(document->securityOrigin(), quota);
}
#endif
diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
index 0a5eeaf..9d12ca7 100644
--- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
+++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
@@ -836,8 +836,8 @@ void FrameLoaderClientWx::windowObjectCleared()
if (m_webView) {
wxWebViewWindowObjectClearedEvent wkEvent(m_webView);
Frame* coreFrame = m_webView->GetMainFrame()->GetFrame();
- JSGlobalContextRef context = toGlobalRef(coreFrame->script()->globalObject()->globalExec());
- JSObjectRef windowObject = toRef(coreFrame->script()->globalObject());
+ JSGlobalContextRef context = toGlobalRef(coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec());
+ JSObjectRef windowObject = toRef(coreFrame->script()->globalObject(mainThreadNormalWorld()));
wkEvent.SetJSContext(context);
wkEvent.SetWindowObject(windowObject);
m_webView->GetEventHandler()->ProcessEvent(wkEvent);
diff --git a/WebKit/wx/WebView.cpp b/WebKit/wx/WebView.cpp
index 88b5990..1b27cde 100644
--- a/WebKit/wx/WebView.cpp
+++ b/WebKit/wx/WebView.cpp
@@ -39,6 +39,7 @@
#include "FrameLoader.h"
#include "FrameView.h"
#include "GraphicsContext.h"
+#include "HTMLFormElement.h"
#include "Logging.h"
#include "markup.h"
#include "Page.h"
@@ -49,6 +50,7 @@
#include "PluginHalterClient.h"
#include "RenderObject.h"
#include "RenderView.h"
+#include "ResourceHandleManager.h"
#include "Scrollbar.h"
#include "SelectionController.h"
#include "Settings.h"
@@ -67,6 +69,10 @@
#include <runtime/JSValue.h>
#include <runtime/UString.h>
+#if ENABLE(DATABASE)
+#include "DatabaseTracker.h"
+#endif
+
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
@@ -268,6 +274,7 @@ wxWebView::wxWebView() :
m_isEditable(false),
m_isInitialized(false),
m_beingDestroyed(false),
+ m_mouseWheelZooms(false),
m_title(wxEmptyString)
{
}
@@ -278,6 +285,7 @@ wxWebView::wxWebView(wxWindow* parent, int id, const wxPoint& position,
m_isEditable(false),
m_isInitialized(false),
m_beingDestroyed(false),
+ m_mouseWheelZooms(false),
m_title(wxEmptyString)
{
Create(parent, id, position, size, style, name);
@@ -327,6 +335,10 @@ bool wxWebView::Create(wxWindow* parent, int id, const wxPoint& position,
settings->setStandardFontFamily("Times New Roman");
settings->setJavaScriptEnabled(true);
+#if ENABLE(DATABASE)
+ settings->setDatabasesEnabled(true);
+#endif
+
m_isInitialized = true;
return true;
@@ -591,8 +603,16 @@ void wxWebView::OnMouseEvents(wxMouseEvent& event)
wxEventType type = event.GetEventType();
if (type == wxEVT_MOUSEWHEEL) {
- WebCore::PlatformWheelEvent wkEvent(event, globalPoint);
- frame->eventHandler()->handleWheelEvent(wkEvent);
+ if (m_mouseWheelZooms && event.ControlDown() && !event.AltDown() && !event.ShiftDown()) {
+ if (event.GetWheelRotation() < 0)
+ DecreaseTextSize();
+ else if (event.GetWheelRotation() > 0)
+ IncreaseTextSize();
+ } else {
+ WebCore::PlatformWheelEvent wkEvent(event, globalPoint);
+ frame->eventHandler()->handleWheelEvent(wkEvent);
+ }
+
return;
}
@@ -887,3 +907,47 @@ bool wxWebView::ShouldClose() const
return true;
}
+
+/* static */
+void wxWebView::SetDatabaseDirectory(const wxString& databaseDirectory)
+{
+#if ENABLE(DATABASE)
+ WebCore::DatabaseTracker::tracker().setDatabaseDirectoryPath(databaseDirectory);
+#endif
+}
+
+/* static */
+wxString wxWebView::GetDatabaseDirectory()
+{
+#if ENABLE(DATABASE)
+ return WebCore::DatabaseTracker::tracker().databaseDirectoryPath();
+#else
+ return wxEmptyString;
+#endif
+}
+
+static WebCore::ResourceHandleManager::ProxyType curlProxyType(wxProxyType type)
+{
+ switch (type) {
+ case HTTP: return WebCore::ResourceHandleManager::HTTP;
+ case Socks4: return WebCore::ResourceHandleManager::Socks4;
+ case Socks4A: return WebCore::ResourceHandleManager::Socks4A;
+ case Socks5: return WebCore::ResourceHandleManager::Socks5;
+ case Socks5Hostname: return WebCore::ResourceHandleManager::Socks5Hostname;
+ default:
+ ASSERT_NOT_REACHED();
+ return WebCore::ResourceHandleManager::HTTP;
+ }
+}
+
+/* static */
+void wxWebView::SetProxyInfo(const wxString& host,
+ unsigned long port,
+ wxProxyType type,
+ const wxString& username,
+ const wxString& password)
+{
+ using WebCore::ResourceHandleManager;
+ if (ResourceHandleManager* mgr = ResourceHandleManager::sharedInstance())
+ mgr->setProxyInfo(host, port, curlProxyType(type), username, password);
+}
diff --git a/WebKit/wx/WebView.h b/WebKit/wx/WebView.h
index e83c420..9b1cfab 100644
--- a/WebKit/wx/WebView.h
+++ b/WebKit/wx/WebView.h
@@ -105,6 +105,14 @@ enum {
WebKitErrorJavaUnavailable = 202,
};
+enum wxProxyType {
+ HTTP,
+ Socks4,
+ Socks4A,
+ Socks5,
+ Socks5Hostname
+};
+
class WXDLLIMPEXP_WEBKIT wxWebView : public wxWindow
{
// ChromeClientWx needs to get the Page* stored by the wxWebView
@@ -194,6 +202,18 @@ public:
static void SetCachePolicy(const wxWebViewCachePolicy& cachePolicy);
static wxWebViewCachePolicy GetCachePolicy();
+ void SetMouseWheelZooms(bool mouseWheelZooms) { m_mouseWheelZooms = mouseWheelZooms; }
+ bool GetMouseWheelZooms() const { return m_mouseWheelZooms; }
+
+ static void SetDatabaseDirectory(const wxString& databaseDirectory);
+ static wxString GetDatabaseDirectory();
+
+ static void SetProxyInfo(const wxString& host = wxEmptyString,
+ unsigned long port = 0,
+ wxProxyType type = HTTP,
+ const wxString& username = wxEmptyString,
+ const wxString& password = wxEmptyString);
+
protected:
// event handlers (these functions should _not_ be virtual)
@@ -216,6 +236,7 @@ private:
bool m_isEditable;
bool m_isInitialized;
bool m_beingDestroyed;
+ bool m_mouseWheelZooms;
WebViewPrivate* m_impl;
wxWebFrame* m_mainFrame;
wxString m_title;
diff --git a/WebKit/wx/bindings/python/samples/simple.py b/WebKit/wx/bindings/python/samples/simple.py
index 52d4e1b..2756760 100644
--- a/WebKit/wx/bindings/python/samples/simple.py
+++ b/WebKit/wx/bindings/python/samples/simple.py
@@ -92,11 +92,11 @@ class TestPanel(wx.Panel):
def OnStateChanged(self, event):
statusbar = self.GetParent().GetStatusBar()
if statusbar:
- if event.GetState() == wx.webview.WEBVIEW_STATE_NEGOTIATING:
+ if event.GetState() == wx.webview.WEBVIEW_LOAD_NEGOTIATING:
statusbar.SetStatusText("Contacting " + event.GetURL())
- elif event.GetState() == wx.webview.WEBVIEW_STATE_TRANSFERRING:
+ elif event.GetState() == wx.webview.WEBVIEW_LOAD_TRANSFERRING:
statusbar.SetStatusText("Loading " + event.GetURL())
- elif event.GetState() == wx.webview.WEBVIEW_STATE_STOP:
+ elif event.GetState() == wx.webview.WEBVIEW_LOAD_DOC_COMPLETED:
statusbar.SetStatusText("")
self.location.SetValue(event.GetURL())
self.GetParent().SetTitle("wxWebView - " + self.webview.GetPageTitle())
diff --git a/WebKit/wx/bindings/python/webview.i b/WebKit/wx/bindings/python/webview.i
index 44b38ab..410191a 100644
--- a/WebKit/wx/bindings/python/webview.i
+++ b/WebKit/wx/bindings/python/webview.i
@@ -28,6 +28,7 @@
%{
#include "wx/wxPython/wxPython.h"
#include "wx/wxPython/pyclasses.h"
+#include "WebFrame.h"
#include "WebView.h"
#include "WebBrowserShell.h"
%}
@@ -38,9 +39,11 @@
MAKE_CONST_WXSTRING(WebViewNameStr);
+MustHaveApp(wxWebFrame);
MustHaveApp(wxWebView);
MustHaveApp(wxWebBrowserShell);
+%include WebFrame.h
%include WebView.h
%include WebBrowserShell.h