diff options
Diffstat (limited to 'WebKit')
207 files changed, 6822 insertions, 1522 deletions
diff --git a/WebKit/CMakeLists.txt b/WebKit/CMakeLists.txt index 6bc5100..7de8686 100644 --- a/WebKit/CMakeLists.txt +++ b/WebKit/CMakeLists.txt @@ -1,6 +1,7 @@ SET(WebKit_INCLUDE_DIRECTORIES "${WEBKIT_DIR}" "${WEBCORE_DIR}" + "${WEBCORE_DIR}/accessibility" "${WEBCORE_DIR}/bindings/js" "${WEBCORE_DIR}/bindings" "${WEBCORE_DIR}/bridge" diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog index c6da648..0126336 100644 --- a/WebKit/ChangeLog +++ b/WebKit/ChangeLog @@ -1,3 +1,20 @@ +2010-09-22 Lucas De Marchi <lucas.demarchi@profusion.mobi> + + Unreviewed, EFL build fix. + + * CMakeLists.txt: + +2010-09-20 Philippe Normand <pnormand@igalia.com> + + Reviewed by Eric Carlson. + + [GTK] enhanced context menu for media elements + https://bugs.webkit.org/show_bug.cgi?id=45021 + + Updated localizable strings. + + * English.lproj/Localizable.strings: + 2010-09-17 David Kilzer <ddkilzer@apple.com> <http://webkit.org/b/45989> Add WebArchiveInternal.h to Xcode project diff --git a/WebKit/English.lproj/Localizable.strings b/WebKit/English.lproj/Localizable.strings Binary files differindex 615dc9a..3d09f86 100644 --- a/WebKit/English.lproj/Localizable.strings +++ b/WebKit/English.lproj/Localizable.strings diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog index dd23f6f..a28517a 100644 --- a/WebKit/chromium/ChangeLog +++ b/WebKit/chromium/ChangeLog @@ -1,3 +1,820 @@ +2010-09-28 Vangelis Kokkevis <vangelis@chromium.org> + + Reviewed by Kenneth Russell. + + [chromium] Keep the accelerated compositor around even after a page is + done using it to avoid startup costs in pages that frequently switch + the compositor on and off. + https://bugs.webkit.org/show_bug.cgi?id=45845 + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): + +2010-09-28 Nat Duca <nduca@chromium.org> + + Reviewed by James Robinson. + + [chromium] invalidateRootLayerRect needs to schedule compositor + https://bugs.webkit.org/show_bug.cgi?id=46219 + + Make sure setRootLayerNedsDisplay is called by root invalidation. + To avoid confusion about root-layer versus non-root-layer + behavior, move the root layer damage state to the WebView. + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::setRootLayerNeedsDisplay): + (WebKit::WebViewImpl::scrollRootLayerRect): + (WebKit::WebViewImpl::invalidateRootLayerRect): + (WebKit::WebViewImpl::doComposite): + * src/WebViewImpl.h: + +2010-09-28 Jenn Braithwaite <jennb@chromium.org> + + Reviewed by Dmitry Titov. + + Added oldPage param to FrameLoaderClient::didTransferChildFrameToNewDocument. + https://bugs.webkit.org/show_bug.cgi?id=46663 + + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::didTransferChildFrameToNewDocument): + * src/FrameLoaderClientImpl.h: + +2010-09-28 Andrei Popescu <andreip@google.com> + + Reviewed by Jeremy Orlow. + + [Chromium] Linking error due to wrong guard in WebIDBTransaction.h + https://bugs.webkit.org/show_bug.cgi?id=46710 + + Remove the wrong guard. + + * public/WebIDBTransaction.h: + (WebKit::WebIDBTransaction::getIDBTransactionBackendInterface): + +2010-09-27 Alpha Lam <hclam@chromium.org> + + Build fix. Not reviewed. + + Use if instead of switch to avoid compilation error. + + * src/VideoFrameChromiumImpl.cpp: + (WebKit::VideoFrameChromiumImpl::requiredTextureSize): + +2010-09-27 Alpha Lam <hclam@chromium.org> + + Build fix. Not reviewed. + + Remove constant definitions from this file. + + * src/VideoFrameChromiumImpl.cpp: + +2010-09-27 Alpha Lam <hclam@chromium.org> + + Build fix. Not reviewed. + + Fix warnings again. + + * src/VideoFrameChromiumImpl.cpp: + (WebKit::VideoFrameChromiumImpl::requiredTextureSize): + +2010-09-27 Alpha Lam <hclam@chromium.org> + + Build fix. Not reviewed. + + Add a default for unhandled cases for switch statement. + + * src/VideoFrameChromiumImpl.cpp: + (WebKit::VideoFrameChromiumImpl::requiredTextureSize): + +2010-09-27 Victoria Kirst <vrk@google.com> + + Reviewed by James Robinson. + + Fixing constants in VideoFrameChromiumImpl so that it overloads the + VideoFrameChromium const declarations. Also adding logic such that a + VideoFrameChromium understands what size its texture should be based + on frame format. + https://bugs.webkit.org/show_bug.cgi?id=45069 + + * src/VideoFrameChromiumImpl.cpp: + +2010-09-27 Vangelis Kokkevis <vangelis@chromium.org> + + Reviewed by James Robinson. + + [chromium] WebViewImpl now holds a ref counted pointer to the LayerRendererChromium + to ensure that the compositor does not get destroyed before the layers used + by it do. This was done to ensure that layers properly clean up their texture + resources on destruction. + https://bugs.webkit.org/show_bug.cgi?id=46139 + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): + * src/WebViewImpl.h: + +2010-09-24 Zhenyao Mo <zmo@google.com> + + Reviewed by Kenneth Russell. + + Hook up ANGLE with chromium --in-process-webgl port + https://bugs.webkit.org/show_bug.cgi?id=44309 + + * WebKit.gyp: Add angle dependency. + * src/WebGraphicsContext3DDefaultImpl.cpp: Using angle for shader validation and translation. + (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl): + (WebKit::WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl): + (WebKit::WebGraphicsContext3DDefaultImpl::initialize): + (WebKit::WebGraphicsContext3DDefaultImpl::compileShader): + (WebKit::WebGraphicsContext3DDefaultImpl::getIntegerv): Using defined const instead. + (WebKit::WebGraphicsContext3DDefaultImpl::getShaderiv): + (WebKit::WebGraphicsContext3DDefaultImpl::getShaderInfoLog): + (WebKit::WebGraphicsContext3DDefaultImpl::getShaderSource): + (WebKit::WebGraphicsContext3DDefaultImpl::shaderSource): + (WebKit::WebGraphicsContext3DDefaultImpl::createShader): + (WebKit::WebGraphicsContext3DDefaultImpl::deleteShader): + (WebKit::WebGraphicsContext3DDefaultImpl::angleCreateCompilers): + (WebKit::WebGraphicsContext3DDefaultImpl::angleDestroyCompilers): + (WebKit::WebGraphicsContext3DDefaultImpl::angleValidateShaderSource): + * src/WebGraphicsContext3DDefaultImpl.h: Add necessary data and functions for angle stuff. + (WebKit::WebGraphicsContext3DDefaultImpl::ShaderSourceEntry::ShaderSourceEntry): + (WebKit::WebGraphicsContext3DDefaultImpl::ShaderSourceEntry::~ShaderSourceEntry): + +2010-09-27 Kinuko Yasuda <kinuko@chromium.org> + + Reviewed by Adam Barth. + + [Cleanup] Add create method to FileSystemCallbacks to get rid of naked new's + https://bugs.webkit.org/show_bug.cgi?id=46561 + + Also cleanup the callbacks layering to pass AsyncFileSystemCallbacks + object to LocalFileSystem::requestFileSystem (rather than + FileSystemCallback and ErrorCallback) so that all the callbacks class + we pass from WebCore to WebKit/chromium/src will be + AsyncFileSystemCallbacks. + + * src/LocalFileSystemChromium.cpp: + (WebCore::LocalFileSystem::requestFileSystem): Changed to take + AsyncFileSystemCallbacks as (a) callback argument(s). + +2010-09-24 Tony Chang <tony@chromium.org> + + Reviewed by Kent Tamura. + + [chromium] remove unused gtk WebScreenInfoFactory + https://bugs.webkit.org/show_bug.cgi?id=46526 + + AFAICT these files aren't referenced in code or by gyp. + + * WebKit.gyp: Remove duplicate filename. + * public/gtk/WebScreenInfoFactory.h: Removed. + * src/gtk/WebScreenInfoFactory.cpp: Removed. + +2010-09-26 Mihai Parparita <mihaip@chromium.org> + + Reviewed by Adam Barth. + + [Chromium] Remove no longer used WebView member functions + https://bugs.webkit.org/show_bug.cgi?id=46515 + + With http://crrev.com/60526 there's no longer any Chromium code calling + the non-static versions of addUserScript and addUserStyleSheet. + + * public/WebView.h: + +2010-09-25 Nicolas Weber <thakis@chromium.org> + + Reviewed by James Robinson. + + [chromium] Fix clang warning/error. + https://bugs.webkit.org/show_bug.cgi?id=46552 + + * src/WorkerFileSystemCallbacksBridge.h: + +2010-09-24 Mihai Parparita <mihaip@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Unnecessary blob dependency in WebKit.gyp + https://bugs.webkit.org/show_bug.cgi?id=46488 + + r66322 shouldn't have added a blob dependency by hand to targets in + WebKit.gyp, instead blob should be a dependency of webkit_support. + http://crrev.com/59406 did that, so we can now remove these deps. + + * WebKit.gyp: + +2010-09-24 Ryosuke Niwa <rniwa@webkit.org> + + Reviewed by Tony Chang. + + [chromium] Implement TextInputController::firstRectForCharacterRange + https://bugs.webkit.org/show_bug.cgi?id=38100 + + Implemented TextInputController::firstRectForCharacterRange for chromium platform. + Because the function needs to return an array of integers, added makeIntArray to WebBindings. + makeIntArray does not take Vector because WebBindings.h is included in plugin glue code + where it cannot find wtf/Vector.h. + + No new tests are added since we need to implement the same feature in chromium side + in order to enable any tests that uses this function. + + * public/WebBindings.h: + * public/WebFrame.h: + * src/WebBindings.cpp: + (WebKit::makeIntArrayImpl): Added. + (WebKit::WebBindings::makeIntArray): Added. + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::firstRectForCharacterRange): Added. + * src/WebFrameImpl.h: + +2010-09-24 Tony Chang <tony@chromium.org> + + Unreviewed, fix chromium compile after r68276 which renamed + Render*::minPrefWidth to minPreferredLogicalWidth. + + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::contentsPreferredWidth): + +2010-09-24 Eric Uhrhane <ericu@chromium.org> + + Reviewed by David Levin. + + Remove unnecessary parameter from AsyncFileWriterClient::didTruncate + https://bugs.webkit.org/show_bug.cgi?id=46390 + + * public/WebFileWriterClient.h: + * src/AsyncFileWriterChromium.cpp: + * src/AsyncFileWriterChromium.h: + +2010-09-24 Chris Guillory <chris.guillory@google.com> + + Reviewed by Chris Fleizach. + + Send webkit accessibility notifications to Chromium. + https://bugs.webkit.org/show_bug.cgi?id=45156 + + * public/WebAccessibilityCache.h: + * public/WebViewClient.h: + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::focusedNodeChanged): + (WebKit::ChromeClientImpl::getPopupMenuInfo): + * src/ChromeClientImpl.h: + * src/WebAccessibilityCache.cpp: + (WebKit::WebAccessibilityCache::accessibilityEnabled): + +2010-09-23 Kent Tamura <tkent@chromium.org> + + Reviewed by Dimitri Glazkov. + + [Chromium] Fix some IndexedDB tests for DRT + https://bugs.webkit.org/show_bug.cgi?id=46444 + + * DEPS: Roll Chromium revision to 60394, which added + WebKitClient::createIDBKeysFromSerializedValuesAndKeyPath() implementation. + +2010-09-23 Kinuko Yasuda <kinuko@chromium.org> + + Unreviewed, another attempt to fix build. The code didn't have proper if-defs. + + * src/WebWorkerBase.cpp: + (WebKit::WebWorkerBase::openFileSystem): + * src/WebWorkerBase.h: + * src/WorkerFileSystemCallbacksBridge.h: + +2010-09-23 Kinuko Yasuda <kinuko@chromium.org> + + Unreviewed; build fix attempt. + + * src/WebWorkerBase.cpp: + (WebKit::WebWorkerBase::openFileSystem): + * src/WorkerFileSystemCallbacksBridge.h: + +2010-09-23 Kinuko Yasuda <kinuko@chromium.org> + + Reviewed by David Levin. + + Add Worker support for FileSystem API + https://bugs.webkit.org/show_bug.cgi?id=45808 + + Added WebWorkerBase::openFileSystem and WebCommonWorkerClient:: + openFileSystem to call in to the browser via Worker stub/proxy + in the chromium. + + Also added WorkerFileSystemCallbacksBridge class that proxies + requests and callbacks between from/to worker thread to/from the + main thread. + + * public/WebCommonWorkerClient.h: + (WebKit::WebCommonWorkerClient::openFileSystem): Added. + * src/LocalFileSystemChromium.cpp: + (WebCore::LocalFileSystem::localFileSystem): Added. + (WebCore::LocalFileSystem::requestFileSystem): Added implementation + for workers. In worker case this calls WebWorkerBase::openFileSystem. + * src/WebWorkerBase.cpp: + (WebKit::WebWorkerBase::openFileSystem): Added. This is called from + LocalFileSystem::requestFileSystem on the worker thread and creates + a bridge to call WebCommonWorkerClient::openFileSystem on the main + thread. + * src/WebWorkerBase.h: + * src/WebWorkerClientImpl.h: + (WebKit::WebWorkerClientImpl::openFileSystem): Added. + * src/WorkerFileSystemCallbacksBridge.cpp: Added. + * src/WorkerFileSystemCallbacksBridge.h: Added. + +2010-09-23 Tony Chang <tony@chromium.org> + + Reviewed by Dimitri Glazkov. + + [chromium] implement layoutTestController.sampleSVGAnimationForElementAtTime + https://bugs.webkit.org/show_bug.cgi?id=46426 + + * public/WebFrame.h: + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::pauseSVGAnimation): + * src/WebFrameImpl.h: + +2010-09-23 Tony Chang <tony@chromium.org> + + Reviewed by David Levin. + + [chromium] add caretBrowsingEnabled to WebSettings and DRT + https://bugs.webkit.org/show_bug.cgi?id=46388 + + * public/WebSettings.h: + * src/WebSettingsImpl.cpp: + (WebKit::WebSettingsImpl::setCaretBrowsingEnabled): + * src/WebSettingsImpl.h: + +2010-09-23 Eric Uhrhane <ericu@chromium.org> + + Reviewed by David Levin. + + Rename FileWriterClient to AsyncFileWriterClient. + https://bugs.webkit.org/show_bug.cgi?id=46325 + + * src/AsyncFileSystemChromium.cpp: + * src/AsyncFileSystemChromium.h: + * src/AsyncFileWriterChromium.cpp: + * src/AsyncFileWriterChromium.h: + +2010-09-23 Nate Chapin <japhet@chromium.org> + + Reviewed by Darin Fisher. + + Add hyperlink auditing settings (i.e., <a ping>). + https://bugs.webkit.org/show_bug.cgi?id=30458 + + * public/WebSettings.h: + * src/WebSettingsImpl.cpp: + (WebKit::WebSettingsImpl::setHyperlinkAuditingEnabled): + * src/WebSettingsImpl.h: + +2010-09-23 Andrey Kosyakov <caseq@chromium.org> + + Unreviewed build fix ("WTF/" -> "wtf/" in include, broke Arm build) + + * src/AsyncFileWriterChromium.h: + +2010-09-08 Tony Gentilcore <tonyg@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] Add chromium port API for accessing Web Timing information + https://bugs.webkit.org/show_bug.cgi?id=45428 + + * WebKit.gyp: + * public/WebFrame.h: + * public/WebPerformance.h: Added. + (WebKit::WebPerformance::WebPerformance): + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::performance): + * src/WebFrameImpl.h: + * src/WebPerformance.cpp: Added. + (WebKit::WebPerformance::WebPerformance): + (WebKit::WebPerformance::~WebPerformance): + (WebKit::WebPerformance::operator=): + (WebKit::WebPerformance::navigationType): + (WebKit::WebPerformance::navigationStart): + (WebKit::WebPerformance::unloadEventEnd): + (WebKit::WebPerformance::redirectStart): + (WebKit::WebPerformance::redirectEnd): + (WebKit::WebPerformance::redirectCount): + (WebKit::WebPerformance::fetchStart): + (WebKit::WebPerformance::domainLookupStart): + (WebKit::WebPerformance::domainLookupEnd): + (WebKit::WebPerformance::connectStart): + (WebKit::WebPerformance::connectEnd): + (WebKit::WebPerformance::requestStart): + (WebKit::WebPerformance::requestEnd): + (WebKit::WebPerformance::responseStart): + (WebKit::WebPerformance::responseEnd): + (WebKit::WebPerformance::loadEventStart): + (WebKit::WebPerformance::loadEventEnd): + (WebKit::WebPerformance::operator PassRefPtr<Performance>): + +2010-09-23 Andrei Popescu <andreip@google.com> + + Reviewed by Jeremy Orlow. + + IDBObjectStore::get should run in a transaction. + https://bugs.webkit.org/show_bug.cgi?id=44700 + + * public/WebIDBFactory.h: + * public/WebIDBObjectStore.h: + * public/WebIDBTransaction.h: + (WebKit::WebIDBTransaction::didCompleteTaskEvents): + (WebKit::WebIDBTransaction::getIDBTransactionBackendInterface): + * src/IDBDatabaseProxy.h: + * src/IDBFactoryBackendProxy.cpp: + * src/IDBFactoryBackendProxy.h: + * src/IDBObjectStoreProxy.cpp: + (WebCore::IDBObjectStoreProxy::get): + * src/IDBObjectStoreProxy.h: + * src/IDBTransactionBackendProxy.cpp: + (WebCore::IDBTransactionBackendProxy::scheduleTask): + (WebCore::IDBTransactionBackendProxy::didCompleteTaskEvents): + * src/IDBTransactionBackendProxy.h: + (WebCore::IDBTransactionBackendProxy::getWebIDBTransaction): + * src/WebIDBFactoryImpl.cpp: + * src/WebIDBFactoryImpl.h: + * src/WebIDBObjectStoreImpl.cpp: + (WebKit::WebIDBObjectStoreImpl::get): + * src/WebIDBObjectStoreImpl.h: + * src/WebIDBTransactionImpl.cpp: + (WebKit::WebIDBTransactionImpl::didCompleteTaskEvents): + (WebKit::WebIDBTransactionImpl::getIDBTransactionBackendInterface): + * src/WebIDBTransactionImpl.h: + +2010-09-23 Jeremy Orlow <jorlow@chromium.org> + + Unreviewed small fix for my last patch. + + * public/WebIDBTransaction.h: + (WebKit::WebIDBTransaction::id): + +2010-09-22 Mihai Parparita <mihaip@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] User style layout tests don't pass on Chromium + https://bugs.webkit.org/show_bug.cgi?id=46069 + + Expose UserStyleInjectionTime in WebView. + + * public/WebView.h: + * src/WebViewImpl.cpp: + (WebKit::WebView::addUserStyleSheet): + +2010-09-22 James Robinson <jamesr@chromium.org> + + [chromium] Re-synchronizes features.gypi with upstream feature_overrides.gypi. + + * features.gypi: + +2010-09-22 Ruben <chromium@hybridsource.org> + + Reviewed by Tony Chang. + + [chromium] added ifdefs for FreeBSD support + https://bugs.webkit.org/show_bug.cgi?id=46316 + + * WebKit.gyp: + * features.gypi: + * src/ChromiumBridge.cpp: + * src/WebFrameImpl.cpp: + (WebKit::ChromePrintContext::spoolPage): + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::mouseDown): + (WebKit::WebViewImpl::mouseUp): + (WebKit::WebViewImpl::keyEvent): + (WebKit::WebViewImpl::setScrollbarColors): + (WebKit::WebViewImpl::setSelectionColors): + +2010-09-22 Eric Uhrhane <ericu@chromium.org> + + Reviewed by Dumitru Daniliuc. + + Add Chromium implementation for FileWriter + https://bugs.webkit.org/show_bug.cgi?id=44361 + + No new tests; the implementation's not yet far enough along for that. + + This makes a chain of construction-and-linking-up for various sorts of + FileWriter interfaces to call through to Chromium, and for various + sorts of FileWriterClients to call back, with object ownership always + pointing towards the Chromium API. That is, the DOM object owns an + AsyncFileWriter, which owns its implementation object, and the reverse + (client) direction is raw pointers. + + File metadata is looked up before the FileWriter is returned, so that + we know the file exists and can cache its length. + + The WebKit/chromium interface here is modeled after that of the + FileSystem. + + * public/WebFileInfo.h: + (WebKit::WebFileInfo::WebFileInfo): + * src/AsyncFileSystemChromium.cpp: + (WebCore::FileWriterHelperCallbacks::FileWriterHelperCallbacks): + (WebCore::FileWriterHelperCallbacks::didSucceed): + (WebCore::FileWriterHelperCallbacks::didReadMetadata): + (WebCore::FileWriterHelperCallbacks::didReadDirectory): + (WebCore::FileWriterHelperCallbacks::didOpenFileSystem): + (WebCore::FileWriterHelperCallbacks::didCreateFileWriter): + (WebCore::FileWriterHelperCallbacks::didFail): + (WebCore::AsyncFileSystemChromium::createWriter): + * src/AsyncFileSystemChromium.h: + * src/AsyncFileWriterChromium.cpp: + (WebCore::AsyncFileWriterChromium::setWebFileWriter): + (WebCore::AsyncFileWriterChromium::write): + (WebCore::AsyncFileWriterChromium::didFail): + * src/AsyncFileWriterChromium.h: + * src/WebFileSystemCallbacksImpl.h: + +2010-09-22 Kenneth Russell <kbr@google.com> + + Unreviewed, Chromium build fix. Fix build when accelerated + compositing is not enabled at compile time. + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::resize): + +2010-09-22 Matt Perry <mpcomplete@chromium.org> + + Reviewed by Darin Fisher. + + Trying to reland a version of r67749: + Have V8DOMWindowShell ask the embedder whether to run a V8 extension + in a particular script context. + https://bugs.webkit.org/show_bug.cgi?id=45721 + + * public/WebFrameClient.h: + (WebKit::WebFrameClient::allowScriptExtension): + * public/WebScriptController.h: + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::allowScriptExtension): + * src/FrameLoaderClientImpl.h: + * src/WebScriptController.cpp: + (WebKit::WebScriptController::registerExtension): + +2010-09-22 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Change WebKit API for IDBTransaciton to new style + https://bugs.webkit.org/show_bug.cgi?id=46263 + + * public/WebIDBIndex.h: + (WebKit::WebIDBIndex::openObjectCursor): + (WebKit::WebIDBIndex::openCursor): + (WebKit::WebIDBIndex::getObject): + (WebKit::WebIDBIndex::get): + * public/WebIDBObjectStore.h: + (WebKit::WebIDBObjectStore::get): + (WebKit::WebIDBObjectStore::put): + (WebKit::WebIDBObjectStore::remove): + (WebKit::WebIDBObjectStore::openCursor): + * src/WebIDBIndexImpl.cpp: + (WebKit::WebIDBIndexImpl::openCursor): + (WebKit::WebIDBIndexImpl::openObjectCursor): + (WebKit::WebIDBIndexImpl::getObject): + (WebKit::WebIDBIndexImpl::get): + * src/WebIDBIndexImpl.h: + * src/WebIDBObjectStoreImpl.cpp: + (WebKit::WebIDBObjectStoreImpl::get): + (WebKit::WebIDBObjectStoreImpl::put): + (WebKit::WebIDBObjectStoreImpl::remove): + (WebKit::WebIDBObjectStoreImpl::openCursor): + * src/WebIDBObjectStoreImpl.h: + +2010-09-22 Pavel Podivilov <podivilov@chromium.org> + + Reviewed by Pavel Feldman. + + Web Inspector: implement pausing on XHR + https://bugs.webkit.org/show_bug.cgi?id=46086 + + * src/js/DevTools.js: + (): + +2010-09-21 Brett Wilson <brettw@chromium.org> + + Reviewed by Darin Fisher. + + Add caps log and num lock toggle state to WebInputEvent. + https://bugs.webkit.org/show_bug.cgi?id=46229 + + * public/WebInputEvent.h: + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::handleInputEvent): + * src/WebViewImpl.h: + * src/gtk/WebInputEventFactory.cpp: + (WebKit::gdkStateToWebEventModifiers): + * src/win/WebInputEventFactory.cpp: + (WebKit::SetToggleKeyState): + (WebKit::WebInputEventFactory::keyboardEvent): + (WebKit::WebInputEventFactory::mouseEvent): + (WebKit::WebInputEventFactory::mouseWheelEvent): + +2010-09-21 James Robinson <jamesr@chromium.org> + + Reviewed by Kenneth Russell. + + [chromium] Check if the acceleratedCompositingEnabled setting is active in WebViewImpl::graphicsContext3D() + https://bugs.webkit.org/show_bug.cgi?id=46239 + + This adds a check for whether acceleratedCompositingEnabled is true on the Page's Settings + object before creating and vending a GraphicsContext3D object. This is needed because when + an offscreen WebGraphicsContext3DCommandBufferImpl is initialized it first asks the WebViewImpl + for the compositor context. WebGraphicsContext3DCommandBufferImpl::initialize checks if the + disable accelerated compositing command line switch is set, but this is insufficient as sometimes + the Setting object does not agree exactly with the command line switches. For example, + we explicitly toggle accelerated compositing for some chrome UI URLs regardless of what the + flag says. + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::graphicsContext3D): + +2010-09-21 Kent Tamura <tkent@chromium.org> + + Reviewed by David Levin. + + [Chromium] Remove WebInputElement::InputType and inputType() + https://bugs.webkit.org/show_bug.cgi?id=46238 + + * DEPS: Roll Chromium revision to 60132, which removed all usage of inputType(). + * public/WebInputElement.h: Remove InputType and inputType(). + * src/AssertMatchingEnums.cpp: Remove WebInputElement::InputType - + HTMLInputElement::InputType matching tests. + * src/WebInputElement.cpp: Remove inputType(). + +2010-09-21 Andrew Wilson <atwilson@chromium.org> + + Unreviewed, rolling out r67982. + http://trac.webkit.org/changeset/67982 + https://bugs.webkit.org/show_bug.cgi?id=45156 + + Causes crashes on chromium testshell + + * public/WebAccessibilityCache.h: + * public/WebViewClient.h: + (WebKit::WebViewClient::didChangeAccessibilityObjectState): + (WebKit::WebViewClient::didChangeAccessibilityObjectChildren): + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::focusedNodeChanged): + (WebKit::ChromeClientImpl::didChangeAccessibilityObjectState): + (WebKit::ChromeClientImpl::didChangeAccessibilityObjectChildren): + * src/ChromeClientImpl.h: + * src/WebAccessibilityCache.cpp: + +2010-09-21 Kenneth Russell <kbr@google.com> + + Reviewed by James Robinson. + + [chromium] Remove GLES2Context and WebGLES2Context + https://bugs.webkit.org/show_bug.cgi?id=46131 + + Removed now-obsolete GLES2Context and WebGLES2Context classes, and + dependency on command buffer client code from WebCore. Built and + tested 3D CSS and WebGL content on Mac OS X to test. + + * WebKit.gyp: + * public/WebGLES2Context.h: Removed. + * public/WebGraphicsContext3D.h: + * public/WebKitClient.h: + * public/WebView.h: + * src/ChromeClientImpl.cpp: + * src/GLES2Context.cpp: Removed. + * src/GLES2ContextInternal.cpp: Removed. + * src/GLES2ContextInternal.h: Removed. + * src/WebGraphicsContext3DDefaultImpl.cpp: + * src/WebGraphicsContext3DDefaultImpl.h: + * src/WebViewImpl.cpp: + * src/WebViewImpl.h: + +2010-09-21 Kenneth Russell <kbr@google.com> + + Reviewed by James Robinson. + + [chromium] Roll forward Chromium DEPS to pick up removal of WebGLES2Context dependencies + https://bugs.webkit.org/show_bug.cgi?id=46231 + + Ran build-webkit --chromium --debug on Mac OS X to test the roll-forward. + + * DEPS: + +2010-09-21 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Nate Chapin. + + [Chromium] Plumb the IDBTransansaction's id + https://bugs.webkit.org/show_bug.cgi?id=46197 + + Next step, add the plumbing to Chromium. Then we add code to WebKit + that uses it (and take out the default IDBTransaction param). + + * public/WebIDBCursor.h: + (WebKit::WebIDBCursor::key): + (WebKit::WebIDBCursor::value): + * public/WebIDBFactory.h: + (WebKit::WebIDBFactory::open): + * public/WebIDBIndex.h: + (WebKit::WebIDBIndex::openObjectCursor): + (WebKit::WebIDBIndex::openCursor): + (WebKit::WebIDBIndex::getObject): + (WebKit::WebIDBIndex::get): + * public/WebIDBObjectStore.h: + (WebKit::WebIDBObjectStore::get): + (WebKit::WebIDBObjectStore::put): + (WebKit::WebIDBObjectStore::remove): + (WebKit::WebIDBObjectStore::createIndex): + (WebKit::WebIDBObjectStore::removeIndex): + (WebKit::WebIDBObjectStore::openCursor): + * src/WebIDBIndexImpl.cpp: + (WebKit::WebIDBIndexImpl::openCursor): + (WebKit::WebIDBIndexImpl::openObjectCursor): + (WebKit::WebIDBIndexImpl::getObject): + (WebKit::WebIDBIndexImpl::get): + * src/WebIDBIndexImpl.h: + * src/WebIDBObjectStoreImpl.cpp: + (WebKit::WebIDBObjectStoreImpl::get): + (WebKit::WebIDBObjectStoreImpl::put): + (WebKit::WebIDBObjectStoreImpl::remove): + (WebKit::WebIDBObjectStoreImpl::openCursor): + * src/WebIDBObjectStoreImpl.h: + +2010-09-21 Chris Guillory <chris.guillory@google.com> + + Reviewed by Chris Fleizach. + + Send webkit accessibility notifications to Chromium. + https://bugs.webkit.org/show_bug.cgi?id=45156 + + * public/WebAccessibilityCache.h: + * public/WebViewClient.h: + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::focusedNodeChanged): + (WebKit::ChromeClientImpl::getPopupMenuInfo): + * src/ChromeClientImpl.h: + * src/WebAccessibilityCache.cpp: + (WebKit::WebAccessibilityCache::accessibilityEnabled): + +2010-09-21 Steve Block <steveblock@google.com> + + Reviewed by Jeremy Orlow. + + DeviceOrientationClient and DeviceMotionClient should have controllerDestroyed() methods + https://bugs.webkit.org/show_bug.cgi?id=45891 + + Implements DeviceOrientationClientProxy::deviceOrientationControllerDestroyed() as a no-op, + as the client's lifetime is determined by the WebViewImpl. + + * src/DeviceOrientationClientProxy.cpp: + (WebKit::DeviceOrientationClientProxy::deviceOrientationControllerDestroyed): + * src/DeviceOrientationClientProxy.h: + +2010-09-21 Jochen Eisinger <jochen@chromium.org> + + Reviewed by Jeremy Orlow. + + [chromium] expose the filename used for a given indexed DB + https://bugs.webkit.org/show_bug.cgi?id=46090 + + * WebKit.gyp: + * public/WebIDBFactory.h: + * src/WebIDBFactory.cpp: + (WebKit::WebIDBFactory::databaseFileName): + +2010-09-20 Philippe Normand <pnormand@igalia.com> + + Reviewed by Eric Carlson. + + [GTK] enhanced context menu for media elements + https://bugs.webkit.org/show_bug.cgi?id=45021 + + New localized strings for the media element context-menu. + + * src/LocalizedStrings.cpp: + (WebCore::contextMenuItemTagOpenVideoInNewWindow): + (WebCore::contextMenuItemTagOpenAudioInNewWindow): + (WebCore::contextMenuItemTagCopyVideoLinkToClipboard): + (WebCore::contextMenuItemTagCopyAudioLinkToClipboard): + (WebCore::contextMenuItemTagToggleMediaControls): + (WebCore::contextMenuItemTagToggleMediaLoop): + (WebCore::contextMenuItemTagEnterVideoFullscreen): + (WebCore::contextMenuItemTagMediaPlay): + (WebCore::contextMenuItemTagMediaPause): + (WebCore::contextMenuItemTagMediaMute): + +2010-09-20 Nico Weber <thakis@chromium.org> + + Reviewed by James Robinson. + + [chromium] Trivial clang warning fix + https://bugs.webkit.org/show_bug.cgi?id=46143 + + * src/WebFileSystemCallbacksImpl.h: + 2010-09-20 Darin Adler <darin@apple.com> Reviewed by James Robinson. diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS index 17cf7b5..722dd94 100644 --- a/WebKit/chromium/DEPS +++ b/WebKit/chromium/DEPS @@ -32,7 +32,7 @@ vars = { 'chromium_svn': 'http://src.chromium.org/svn/trunk/src', - 'chromium_rev': '59961', + 'chromium_rev': '60394', } deps = { diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp index 3523f21..5b953e3 100644 --- a/WebKit/chromium/WebKit.gyp +++ b/WebKit/chromium/WebKit.gyp @@ -76,6 +76,7 @@ '<(chromium_src_dir)/app/app.gyp:app_base', # For GLContext '<(chromium_src_dir)/skia/skia.gyp:skia', '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi', + '<(chromium_src_dir)/third_party/angle/src/build_angle.gyp:translator_glsl', ], 'export_dependent_settings': [ '<(chromium_src_dir)/skia/skia.gyp:skia', @@ -84,6 +85,7 @@ 'include_dirs': [ 'public', 'src', + '<(chromium_src_dir)/third_party/angle/include', ], 'defines': [ 'WEBKIT_IMPLEMENTATION=1', @@ -170,7 +172,6 @@ 'public/WebGeolocationServiceBridge.h', 'public/WebGeolocationServiceMock.h', 'public/WebGlyphCache.h', - 'public/WebGLES2Context.h', 'public/WebGraphicsContext3D.h', 'public/WebHistoryItem.h', 'public/WebHTTPBody.h', @@ -216,6 +217,7 @@ 'public/WebPageSerializerClient.h', 'public/WebPasswordAutocompleteListener.h', 'public/WebPasswordFormData.h', + 'public/WebPerformance.h', 'public/WebPlugin.h', 'public/WebPluginContainer.h', 'public/WebPluginDocument.h', @@ -277,7 +279,6 @@ 'public/win/WebInputEventFactory.h', 'public/win/WebSandboxSupport.h', 'public/win/WebScreenInfoFactory.h', - 'public/win/WebScreenInfoFactory.h', 'src/ApplicationCacheHost.cpp', 'src/ApplicationCacheHostInternal.h', 'src/AssertMatchingEnums.cpp', @@ -323,9 +324,6 @@ 'src/FrameLoaderClientImpl.cpp', 'src/FrameLoaderClientImpl.h', 'src/FrameNetworkingContextImpl.h', - 'src/GLES2Context.cpp', - 'src/GLES2ContextInternal.cpp', - 'src/GLES2ContextInternal.h', 'src/GraphicsContext3D.cpp', 'src/GraphicsContext3DInternal.h', 'src/gtk/WebFontInfo.cpp', @@ -447,6 +445,7 @@ 'src/WebIDBDatabaseError.cpp', 'src/WebIDBDatabaseImpl.cpp', 'src/WebIDBDatabaseImpl.h', + 'src/WebIDBFactory.cpp', 'src/WebIDBFactoryImpl.cpp', 'src/WebIDBFactoryImpl.h', 'src/WebIDBIndexImpl.cpp', @@ -484,6 +483,7 @@ 'src/WebPasswordFormData.cpp', 'src/WebPasswordFormUtils.cpp', 'src/WebPasswordFormUtils.h', + 'src/WebPerformance.cpp', 'src/WebPluginContainerImpl.h', 'src/WebPluginContainerImpl.cpp', 'src/WebPluginDocument.cpp', @@ -533,6 +533,8 @@ 'src/WebWorkerClientImpl.h', 'src/WebWorkerImpl.cpp', 'src/WebWorkerImpl.h', + 'src/WorkerFileSystemCallbacksBridge.cpp', + 'src/WorkerFileSystemCallbacksBridge.h', 'src/WrappedResourceRequest.h', 'src/WrappedResourceResponse.h', 'src/win/WebInputEventFactory.cpp', @@ -550,7 +552,6 @@ 'dependencies': [ '../../WebCore/WebCore.gyp/WebCore.gyp:webcore_bindings', '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl', - '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib', '<(chromium_src_dir)/third_party/icu/icu.gyp:*', '<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp:libjpeg', '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng', @@ -730,8 +731,6 @@ '<(chromium_src_dir)/base/base.gyp:base', '<(chromium_src_dir)/base/base.gyp:base_i18n', '<(chromium_src_dir)/base/base.gyp:test_support_base', - '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib', - '<(chromium_src_dir)/webkit/support/webkit_support.gyp:blob', '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support', ], 'include_dirs': [ @@ -769,7 +768,7 @@ 'tests/DragImageTest.cpp', ], }], - ['OS=="linux"', { + ['OS=="linux" or OS=="freebsd"', { 'sources': [ 'tests/WebInputEventFactoryTestGtk.cpp', ], @@ -787,7 +786,6 @@ 'dependencies': [ 'webkit', '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf', - '<(chromium_src_dir)/webkit/support/webkit_support.gyp:blob', '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support', ], 'include_dirs': [ @@ -812,7 +810,6 @@ '<(chromium_src_dir)/webkit/support/webkit_support.gyp:blob', '<(chromium_src_dir)/webkit/support/webkit_support.gyp:copy_npapi_layout_test_plugin', '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support', - '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib' ], 'include_dirs': [ '.', diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi index df277d6..900bb7a 100644 --- a/WebKit/chromium/features.gypi +++ b/WebKit/chromium/features.gypi @@ -40,6 +40,8 @@ # features_override.gypi inline documentation for more details. 'feature_defines': [ 'ENABLE_3D_CANVAS=1', + 'ENABLE_3D_RENDERING=1', + 'ENABLE_ACCELERATED_2D_CANVAS=1', 'ENABLE_BLOB=1', 'ENABLE_BLOB_SLICE=1', 'ENABLE_CHANNEL_MESSAGING=1', @@ -84,15 +86,7 @@ 'ENABLE_XHR_RESPONSE_BLOB=1', 'ENABLE_XPATH=1', 'ENABLE_XSLT=1', - ], - - 'conditions': [ - ['OS=="win" or OS=="linux" or OS=="mac"', { - 'feature_defines': [ - 'WTF_USE_ACCELERATED_COMPOSITING=1', - 'ENABLE_3D_RENDERING=1', - ], - }], + 'WTF_USE_ACCELERATED_COMPOSITING=1', ], 'use_accelerated_compositing%': 1, diff --git a/WebKit/chromium/public/WebAccessibilityCache.h b/WebKit/chromium/public/WebAccessibilityCache.h index 52e438c..c9aec1f 100644 --- a/WebKit/chromium/public/WebAccessibilityCache.h +++ b/WebKit/chromium/public/WebAccessibilityCache.h @@ -45,6 +45,7 @@ public: WEBKIT_API static WebAccessibilityCache* create(); WEBKIT_API static void enableAccessibility(); + WEBKIT_API static bool accessibilityEnabled(); virtual void initialize(WebView* view) = 0; virtual bool isInitialized() const = 0; diff --git a/WebKit/chromium/public/WebBindings.h b/WebKit/chromium/public/WebBindings.h index bca4095..147ce45 100644 --- a/WebKit/chromium/public/WebBindings.h +++ b/WebKit/chromium/public/WebBindings.h @@ -32,6 +32,7 @@ #define WebBindings_h #include "WebCommon.h" +#include "WebVector.h" #include <bindings/npruntime.h> namespace WebKit { @@ -144,6 +145,8 @@ public: // If so, return that element as a WebElement object. WEBKIT_API static bool getElement(NPObject* element, WebElement*); + WEBKIT_API static NPObject* makeIntArray(const WebVector<int>&); + // Exceptions ------------------------------------------------------------- typedef void (ExceptionHandler)(void* data, const NPUTF8* message); diff --git a/WebKit/chromium/public/WebCommonWorkerClient.h b/WebKit/chromium/public/WebCommonWorkerClient.h index cea6471..39d8aa9 100644 --- a/WebKit/chromium/public/WebCommonWorkerClient.h +++ b/WebKit/chromium/public/WebCommonWorkerClient.h @@ -31,6 +31,9 @@ #ifndef WebCommonWorkerClient_h #define WebCommonWorkerClient_h +#include "WebCommon.h" +#include "WebFileSystem.h" + namespace WebKit { class WebApplicationCacheHost; @@ -83,6 +86,12 @@ public: // Called on the main webkit thread before opening a web database. virtual bool allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize) = 0; + // Called on the main webkit thread before opening a file system. + virtual void openFileSystem(WebFileSystem::Type, long long size, WebFileSystemCallbacks*) + { + WEBKIT_ASSERT_NOT_REACHED(); + } + protected: ~WebCommonWorkerClient() { } }; diff --git a/WebKit/chromium/public/WebFileInfo.h b/WebKit/chromium/public/WebFileInfo.h index 4590a30..be0b3e4 100644 --- a/WebKit/chromium/public/WebFileInfo.h +++ b/WebKit/chromium/public/WebFileInfo.h @@ -38,7 +38,19 @@ struct WebFileInfo { // The value 0.0 means that the time is not set. double modificationTime; - WebFileInfo() : modificationTime(0.0) { } + // The length of the file in bytes. + // The value -1 means that the length is not set. + long long length; + + enum Type { + TypeUnknown = 0, + TypeFile, + TypeDirectory + }; + + Type type; + + WebFileInfo() : modificationTime(0.0), length(-1), type(TypeUnknown) { } }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebFileWriterClient.h b/WebKit/chromium/public/WebFileWriterClient.h index d371582..46ff153 100644 --- a/WebKit/chromium/public/WebFileWriterClient.h +++ b/WebKit/chromium/public/WebFileWriterClient.h @@ -43,7 +43,7 @@ public: virtual void didWrite(long long bytes, bool complete) = 0; // Called once when the truncate completes successfully. - virtual void didTruncate(long long length) = 0; + virtual void didTruncate() = 0; // Called if the write or truncate fails, or if it is cancelled before the write or truncate completes. Completion of an operation will be signalled exactly once, either by didFail, didTruncate, or didWrite(..., true). virtual void didFail(WebFileError) = 0; diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h index 6725f58..5d41d10 100644 --- a/WebKit/chromium/public/WebFrame.h +++ b/WebKit/chromium/public/WebFrame.h @@ -56,6 +56,7 @@ class WebFormElement; class WebHistoryItem; class WebInputElement; class WebPasswordAutocompleteListener; +class WebPerformance; class WebRange; class WebSecurityOrigin; class WebString; @@ -193,6 +194,8 @@ public: virtual WebAnimationController* animationController() = 0; + virtual WebPerformance performance() const = 0; + // Scripting ---------------------------------------------------------- @@ -352,6 +355,8 @@ public: virtual WebRange markedRange() const = 0; + virtual bool firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const = 0; + // Supports commands like Undo, Redo, Cut, Copy, Paste, SelectAll, // Unselect, etc. See EditorCommand.cpp for the full list of supported // commands. @@ -536,6 +541,12 @@ public: // Only for testing purpose: // Returns true if selection.anchorNode has a marker on range from |from| with |length|. virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const = 0; + + // Pauses and samples an SVG animation. Returns false if there's no svg + // animation to pause. This is only for testing. + virtual bool pauseSVGAnimation(const WebString& animationId, + double time, + const WebString& elementId) = 0; protected: ~WebFrame() { } }; diff --git a/WebKit/chromium/public/WebFrameClient.h b/WebKit/chromium/public/WebFrameClient.h index 699325d..a72e2fd 100644 --- a/WebKit/chromium/public/WebFrameClient.h +++ b/WebKit/chromium/public/WebFrameClient.h @@ -301,6 +301,13 @@ public: // scripts. virtual void didCreateIsolatedScriptContext(WebFrame*) { } + // Controls whether the given script extension should run in a new script + // context in this frame. If extensionGroup is 0, the script context is the + // frame's main context. Otherwise, it is a context created by + // WebFrame::executeScriptInIsolatedWorld with that same extensionGroup + // value. + virtual bool allowScriptExtension(WebFrame*, const WebString& extensionName, int extensionGroup) { return true; } + // Geometry notifications ---------------------------------------------- diff --git a/WebKit/chromium/public/WebGLES2Context.h b/WebKit/chromium/public/WebGLES2Context.h deleted file mode 100644 index 45184aa..0000000 --- a/WebKit/chromium/public/WebGLES2Context.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebGLES2Context_h -#define WebGLES2Context_h - -#include "WebCommon.h" -#include "WebNonCopyable.h" - -namespace WebKit { - -struct WebSize; -class WebView; - -// This interface abstracts the creation and management of an -// OpenGL ES 2.0 context. - -class WebGLES2Context : public WebNonCopyable { -public: - virtual ~WebGLES2Context() {} - - virtual bool initialize(WebView*, WebGLES2Context* parent) = 0; - virtual bool makeCurrent() = 0; - virtual bool destroy() = 0; - virtual bool swapBuffers() = 0; - - // The follow two functions are for managing a context that renders offscreen. - - // Resizes the backing store used for offscreen rendering. - virtual void resizeOffscreenContent(const WebSize&) = 0; - - // Returns the ID of the texture used for offscreen rendering in the context of the parent. - virtual unsigned getOffscreenContentParentTextureId() = 0; - - // The following function is used only on Mac OS X and is needed - // in order to report window size changes. -#if defined(__APPLE__) - virtual void resizeOnscreenContent(const WebSize&) = 0; -#endif -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebGraphicsContext3D.h b/WebKit/chromium/public/WebGraphicsContext3D.h index 9857174..15e6365 100644 --- a/WebKit/chromium/public/WebGraphicsContext3D.h +++ b/WebKit/chromium/public/WebGraphicsContext3D.h @@ -85,11 +85,6 @@ public: // on newly-constructed instances. Returns true on success. virtual bool initialize(Attributes, WebView*, bool renderDirectlyToWebView) = 0; - // Initializes the graphics context; should be the first operation performed - // on newly-constructed instances. Returns true on success. - // FIXME: remove this entry point once the compositor is switched to use GraphicsContext3D. - virtual bool initialize(Attributes, WebView*) = 0; - // Makes the OpenGL context current on the current thread. Returns true on // success. virtual bool makeContextCurrent() = 0; diff --git a/WebKit/chromium/public/WebIDBCursor.h b/WebKit/chromium/public/WebIDBCursor.h index f47a44c..05bd51a 100644 --- a/WebKit/chromium/public/WebIDBCursor.h +++ b/WebKit/chromium/public/WebIDBCursor.h @@ -49,21 +49,8 @@ public: WEBKIT_ASSERT_NOT_REACHED(); return WebIDBKey::createInvalid(); } - // FIXME: Remove the legacy version of value() (the first version) as soon as a WebKit roll happens. - virtual WebSerializedScriptValue value() const - { - WebSerializedScriptValue serializedScriptValue; - WebIDBKey idbKey; - value(serializedScriptValue, idbKey); - WEBKIT_ASSERT(!serializedScriptValue.isNull()); - WEBKIT_ASSERT(idbKey.type() == WebIDBKey::InvalidType); - return serializedScriptValue; - } // One or the other will set, depending on what type of cursor this is. - virtual void value(WebSerializedScriptValue& serializedScriptValue, WebIDBKey& idbKey) const - { - serializedScriptValue = value(); - } + virtual void value(WebSerializedScriptValue& serializedScriptValue, WebIDBKey& idbKey) const { WEBKIT_ASSERT_NOT_REACHED(); } virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } diff --git a/WebKit/chromium/public/WebIDBFactory.h b/WebKit/chromium/public/WebIDBFactory.h index ab05b06..cb5d369 100755 --- a/WebKit/chromium/public/WebIDBFactory.h +++ b/WebKit/chromium/public/WebIDBFactory.h @@ -52,17 +52,10 @@ public: virtual ~WebIDBFactory() { } // The WebKit implementation of open ignores the WebFrame* parameter. - virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame, const WebString& dataDir) - { - open(name, description, callbacks, origin, webFrame); - } - // FIXME: Delete soon. Compatability hack. - virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame) - { - open(name, description, callbacks, origin, webFrame, "/tmp/temporary-indexed-db-files"); - } + virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame, const WebString& dataDir) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void abortPendingTransactions(const WebVector<int>& pendingIDs) { WEBKIT_ASSERT_NOT_REACHED(); } + // The file name that would be used for persisting a given indexed database on the file system. + WEBKIT_API static WebString databaseFileName(const WebString& name, const WebSecurityOrigin&); }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebIDBIndex.h b/WebKit/chromium/public/WebIDBIndex.h index e03fc58..b4ba1f4 100644 --- a/WebKit/chromium/public/WebIDBIndex.h +++ b/WebKit/chromium/public/WebIDBIndex.h @@ -26,6 +26,7 @@ #ifndef WebIDBIndex_h #define WebIDBIndex_h +#include "WebIDBTransaction.h" #include "WebString.h" namespace WebKit { @@ -60,10 +61,43 @@ public: return false; } - virtual void openObjectCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void openCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void getObject(const WebIDBKey&, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void get(const WebIDBKey&, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } + // FIXME: Remove the versions without transaction parameters. + virtual void openObjectCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction&) + { + openObjectCursor(range, direction, callbacks); + } + virtual void openObjectCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks) + { + WebIDBTransaction transaction; + openObjectCursor(range, direction, callbacks, transaction); + } + virtual void openCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction&) + { + openCursor(range, direction, callbacks); + } + virtual void openCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks) + { + WebIDBTransaction transaction; + openCursor(range, direction, callbacks, transaction); + } + virtual void getObject(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction&) + { + getObject(key, callbacks); + } + virtual void getObject(const WebIDBKey& key, WebIDBCallbacks* callbacks) + { + WebIDBTransaction transaction; + getObject(key, callbacks, transaction); + } + virtual void get(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction&) + { + get(key, callbacks); + } + virtual void get(const WebIDBKey& key, WebIDBCallbacks* callbacks) + { + WebIDBTransaction transaction; + get(key, callbacks, transaction); + } }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebIDBObjectStore.h b/WebKit/chromium/public/WebIDBObjectStore.h index 7452be9..19efd48 100755 --- a/WebKit/chromium/public/WebIDBObjectStore.h +++ b/WebKit/chromium/public/WebIDBObjectStore.h @@ -29,11 +29,13 @@ #include "WebCommon.h" #include "WebDOMStringList.h" #include "WebIDBCallbacks.h" +#include "WebIDBTransaction.h" #include "WebString.h" namespace WebKit { class WebIDBKeyRange; +class WebIDBTransaction; // See comment in WebIndexedDatabase for a high level overview these classes. class WebIDBObjectStore { @@ -55,35 +57,51 @@ public: WEBKIT_ASSERT_NOT_REACHED(); return WebDOMStringList(); } - virtual void get(const WebIDBKey& key, WebIDBCallbacks*) + + // FIXME: Remove the default parameters for transactionIds. + virtual void get(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction&) { - WEBKIT_ASSERT_NOT_REACHED(); + get(key, callbacks); } - virtual void put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks*) + virtual void get(const WebIDBKey& key, WebIDBCallbacks* callbacks) { - WEBKIT_ASSERT_NOT_REACHED(); + WebIDBTransaction transaction; + get(key, callbacks, transaction); } - virtual void remove(const WebIDBKey& key, WebIDBCallbacks*) + virtual void put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks* callbacks, const WebIDBTransaction&) { - WEBKIT_ASSERT_NOT_REACHED(); + put(value, key, addOnly, callbacks); } - virtual void createIndex(const WebString& name, const WebString& keyPath, bool unique, WebIDBCallbacks*) + virtual void put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks* callbacks) { - WEBKIT_ASSERT_NOT_REACHED(); + WebIDBTransaction transaction; + put(value, key, addOnly, callbacks, transaction); } + virtual void remove(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction&) + { + remove(key, callbacks); + } + virtual void remove(const WebIDBKey& key, WebIDBCallbacks* callbacks) + { + WebIDBTransaction transaction; + remove(key, callbacks, transaction); + } + virtual void createIndex(const WebString& name, const WebString& keyPath, bool unique, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } // Transfers ownership of the WebIDBIndex to the caller. virtual WebIDBIndex* index(const WebString& name) { WEBKIT_ASSERT_NOT_REACHED(); return 0; } - virtual void removeIndex(const WebString& name, WebIDBCallbacks*) + virtual void removeIndex(const WebString& name, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } + virtual void openCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction&) { - WEBKIT_ASSERT_NOT_REACHED(); + openCursor(range, direction, callbacks); } - virtual void openCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*) + virtual void openCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks) { - WEBKIT_ASSERT_NOT_REACHED(); + WebIDBTransaction transaction; + openCursor(range, direction, callbacks, transaction); } // FIXME: finish. }; diff --git a/WebKit/chromium/public/WebIDBTransaction.h b/WebKit/chromium/public/WebIDBTransaction.h index 0369b89..7b51b97 100644 --- a/WebKit/chromium/public/WebIDBTransaction.h +++ b/WebKit/chromium/public/WebIDBTransaction.h @@ -28,6 +28,8 @@ #include "WebString.h" +namespace WebCore { class IDBTransactionBackendInterface; } + namespace WebKit { class WebIDBObjectStore; @@ -49,12 +51,22 @@ public: return 0; } virtual void abort() { WEBKIT_ASSERT_NOT_REACHED(); } + virtual void didCompleteTaskEvents() { WEBKIT_ASSERT_NOT_REACHED(); } virtual int id() const { - WEBKIT_ASSERT_NOT_REACHED(); + // FIXME: Uncomment this after the next Chromium WebKit roll. + //WEBKIT_ASSERT_NOT_REACHED(); return 0; } virtual void setCallbacks(WebIDBTransactionCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } + + // FIXME: this is never called from WebCore. Find a cleaner solution. + virtual WebCore::IDBTransactionBackendInterface* getIDBTransactionBackendInterface() const + { + WEBKIT_ASSERT_NOT_REACHED(); + return 0; + } + }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h index 3ef92de..8fea4fa 100644 --- a/WebKit/chromium/public/WebInputElement.h +++ b/WebKit/chromium/public/WebInputElement.h @@ -52,33 +52,6 @@ namespace WebKit { } WEBKIT_API void assign(const WebInputElement& e) { WebFormControlElement::assign(e); } - enum InputType { - Text = 0, - Password, - IsIndex, - CheckBox, - Radio, - Submit, - Reset, - File, - Hidden, - Image, - Button, - Search, - Range, - Email, - Number, - Telephone, - URL, - Color, - Date, - DateTime, - DateTimeLocal, - Month, - Time, - Week - }; - // This returns true for all of textfield-looking types such as text, // password, search, email, url, and number. WEBKIT_API bool isTextField() const; @@ -89,8 +62,6 @@ namespace WebKit { WEBKIT_API bool autoComplete() const; WEBKIT_API bool isReadOnly() const; WEBKIT_API bool isEnabledFormControl() const; - // Deperated. - WEBKIT_API InputType inputType() const; WEBKIT_API int maxLength() const; WEBKIT_API bool isActivatedSubmit() const; WEBKIT_API void setActivatedSubmit(bool); diff --git a/WebKit/chromium/public/WebInputEvent.h b/WebKit/chromium/public/WebInputEvent.h index f8b057b..26e41a4 100644 --- a/WebKit/chromium/public/WebInputEvent.h +++ b/WebKit/chromium/public/WebInputEvent.h @@ -122,6 +122,12 @@ public: LeftButtonDown = 1 << 6, MiddleButtonDown = 1 << 7, RightButtonDown = 1 << 8, + + // Toggle modifiers for all events. Danger: these are not reflected + // into WebCore, so round-tripping from WebInputEvent to a WebCore + // event and back will not preserve these flags. + CapsLockOn = 1 << 9, + NumLockOn = 1 << 10, }; unsigned size; // The size of this structure, for serialization. diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h index 0f282e0..09c79c5 100644 --- a/WebKit/chromium/public/WebKitClient.h +++ b/WebKit/chromium/public/WebKitClient.h @@ -53,7 +53,6 @@ class WebClipboard; class WebCookieJar; class WebFileSystem; class WebFileUtilities; -class WebGLES2Context; class WebGraphicsContext3D; class WebIDBFactory; class WebIDBKey; @@ -270,12 +269,6 @@ public: // Returns newly allocated WebGraphicsContext3D instance. virtual WebGraphicsContext3D* createGraphicsContext3D() { return 0; } - // GLES2 -------------------------------------------------------------- - - // Returns newly allocated WebGLES2Context instance. - // May return null if it fails to create the context. - virtual WebGLES2Context* createGLES2Context() { return 0; } - // FileSystem ---------------------------------------------------------- // Must return non-null. diff --git a/WebKit/chromium/public/WebPerformance.h b/WebKit/chromium/public/WebPerformance.h new file mode 100644 index 0000000..012f2fd --- /dev/null +++ b/WebKit/chromium/public/WebPerformance.h @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebPerformance_h +#define WebPerformance_h + +#include "WebCommon.h" +#include "WebNavigationType.h" +#include "WebPrivatePtr.h" + +namespace WebCore { class Performance; } + +namespace WebKit { + +class WebPerformance { +public: + ~WebPerformance() { reset(); } + + WebPerformance() { } + + WebPerformance(const WebPerformance& p) { assign(p); } + + WebPerformance& operator=(const WebPerformance& p) + { + assign(p); + return *this; + } + + WEBKIT_API void reset(); + WEBKIT_API void assign(const WebPerformance&); + + // This only returns one of {Other|Reload|BackForward}. + // Form submits and link clicks all fall under other. + WEBKIT_API WebNavigationType navigationType() const; + + WEBKIT_API double navigationStart() const; + WEBKIT_API double unloadEventEnd() const; + WEBKIT_API double redirectStart() const; + WEBKIT_API double redirectEnd() const; + WEBKIT_API unsigned short redirectCount() const; + WEBKIT_API double fetchStart() const; + WEBKIT_API double domainLookupStart() const; + WEBKIT_API double domainLookupEnd() const; + WEBKIT_API double connectStart() const; + WEBKIT_API double connectEnd() const; + WEBKIT_API double requestStart() const; + WEBKIT_API double requestEnd() const; + WEBKIT_API double responseStart() const; + WEBKIT_API double responseEnd() const; + WEBKIT_API double loadEventStart() const; + WEBKIT_API double loadEventEnd() const; + +#if WEBKIT_IMPLEMENTATION + WebPerformance(const WTF::PassRefPtr<WebCore::Performance>&); + WebPerformance& operator=(const WTF::PassRefPtr<WebCore::Performance>&); + operator WTF::PassRefPtr<WebCore::Performance>() const; +#endif + +private: + WebPrivatePtr<WebCore::Performance> m_private; +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebScriptController.h b/WebKit/chromium/public/WebScriptController.h index 54bb08a..5c360b2 100644 --- a/WebKit/chromium/public/WebScriptController.h +++ b/WebKit/chromium/public/WebScriptController.h @@ -51,6 +51,8 @@ public: // matching group. // Will only affect v8 contexts initialized after this call. Takes ownership // of the v8::Extension object passed. + // FIXME: remove the latter 2 versions in phase 3 of multipart checkin: + // https://bugs.webkit.org/show_bug.cgi?id=45721 WEBKIT_API static void registerExtension(v8::Extension*); WEBKIT_API static void registerExtension(v8::Extension*, const WebString& schemeRestriction); diff --git a/WebKit/chromium/public/WebSettings.h b/WebKit/chromium/public/WebSettings.h index 0bef045..6a37e08 100644 --- a/WebKit/chromium/public/WebSettings.h +++ b/WebKit/chromium/public/WebSettings.h @@ -93,6 +93,8 @@ public: virtual void setAcceleratedCompositingEnabled(bool) = 0; virtual void setAccelerated2dCanvasEnabled(bool) = 0; virtual void setMemoryInfoEnabled(bool) = 0; + virtual void setHyperlinkAuditingEnabled(bool) = 0; + virtual void setCaretBrowsingEnabled(bool) = 0; protected: ~WebSettings() { } diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h index d162f26..7a8a4af 100644 --- a/WebKit/chromium/public/WebView.h +++ b/WebKit/chromium/public/WebView.h @@ -44,7 +44,6 @@ class WebDevToolsAgentClient; class WebDragData; class WebFrame; class WebFrameClient; -class WebGLES2Context; class WebGraphicsContext3D; class WebNode; class WebSettings; @@ -66,6 +65,13 @@ public: UserContentInjectInAllFrames, UserContentInjectInTopFrameOnly }; + + // Controls which documents user styles are injected into. + enum UserStyleInjectionTime { + UserStyleInjectInExistingDocuments, + UserStyleInjectInSubsequentDocuments + }; + // Initialization ------------------------------------------------------ @@ -311,25 +317,14 @@ public: unsigned inactiveForegroundColor) = 0; // User scripts -------------------------------------------------------- - // FIXME: These two methods are DEPRECATED. Remove once Chromium has been rolled. - virtual void addUserScript(const WebString& sourceCode, bool runAtStart) - { - addUserScript(sourceCode, WebVector<WebString>(), - runAtStart ? UserScriptInjectAtDocumentStart : UserScriptInjectAtDocumentEnd, - UserContentInjectInAllFrames); - } - virtual void addUserStyleSheet(const WebString& sourceCode) - { - addUserStyleSheet(sourceCode, WebVector<WebString>(), UserContentInjectInAllFrames); - } - WEBKIT_API static void addUserScript(const WebString& sourceCode, const WebVector<WebString>& patterns, UserScriptInjectAt injectAt, UserContentInjectIn injectIn); WEBKIT_API static void addUserStyleSheet(const WebString& sourceCode, const WebVector<WebString>& patterns, - UserContentInjectIn injectIn); + UserContentInjectIn injectIn, + UserStyleInjectionTime injectionTime = UserStyleInjectInSubsequentDocuments); WEBKIT_API static void removeAllUserContent(); // Modal dialog support ------------------------------------------------ @@ -341,12 +336,6 @@ public: // GPU acceleration support -------------------------------------------- - // Returns the GLES2Context associated with this WebView. One will be - // created if it doesn't already exist. - // FIXME: remove this method once the compositor is fully switched - // over to GraphicsContext3D. - virtual WebGLES2Context* gles2Context() = 0; - // Returns the (on-screen) WebGraphicsContext3D associated with // this WebView. One will be created if it doesn't already exist. // This is used to set up sharing between this context (which is diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h index f686419..3b0e47a 100644 --- a/WebKit/chromium/public/WebViewClient.h +++ b/WebKit/chromium/public/WebViewClient.h @@ -276,12 +276,6 @@ public: // accessibility object. virtual void focusAccessibilityObject(const WebAccessibilityObject&) { } - // Notifies embedder that the state of an accessibility object has changed. - virtual void didChangeAccessibilityObjectState(const WebAccessibilityObject&) { } - - // Notifies embedder that the children of an accessibility object has changed. - virtual void didChangeAccessibilityObjectChildren(const WebAccessibilityObject&) { } - // Notifies embedder about an accessibility notification. virtual void postAccessibilityNotification(const WebAccessibilityObject&, WebAccessibilityNotification) { } diff --git a/WebKit/chromium/public/gtk/WebScreenInfoFactory.h b/WebKit/chromium/public/gtk/WebScreenInfoFactory.h deleted file mode 100644 index c964741..0000000 --- a/WebKit/chromium/public/gtk/WebScreenInfoFactory.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebScreenInfoFactory_h -#define WebScreenInfoFactory_h - -#include "../WebCommon.h" - -typedef struct _GtkWidget GtkWidget; - -namespace WebKit { - -struct WebScreenInfo; - -class WebScreenInfoFactory { -public: - WEBKIT_API static WebScreenInfo screenInfo(GtkWidget*); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp index ac3aad3..f3b8f5a 100644 --- a/WebKit/chromium/src/AssertMatchingEnums.cpp +++ b/WebKit/chromium/src/AssertMatchingEnums.cpp @@ -49,6 +49,7 @@ #include "TextAffinity.h" #include "UserContentTypes.h" #include "UserScriptTypes.h" +#include "UserStyleSheetTypes.h" #include "VideoFrameChromium.h" #include "WebAccessibilityObject.h" #include "WebApplicationCacheHost.h" @@ -273,31 +274,6 @@ COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight900, FontWeight900); COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::WeightNormal, FontWeightNormal); COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::WeightBold, FontWeightBold); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Text, HTMLInputElement::TEXT); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Password, HTMLInputElement::PASSWORD); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::IsIndex, HTMLInputElement::ISINDEX); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::CheckBox, HTMLInputElement::CHECKBOX); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Radio, HTMLInputElement::RADIO); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Submit, HTMLInputElement::SUBMIT); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Reset, HTMLInputElement::RESET); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::File, HTMLInputElement::FILE); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Hidden, HTMLInputElement::HIDDEN); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Image, HTMLInputElement::IMAGE); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Button, HTMLInputElement::BUTTON); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Search, HTMLInputElement::SEARCH); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Range, HTMLInputElement::RANGE); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Email, HTMLInputElement::EMAIL); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Number, HTMLInputElement::NUMBER); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Telephone, HTMLInputElement::TELEPHONE); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::URL, HTMLInputElement::URL); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Color, HTMLInputElement::COLOR); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Date, HTMLInputElement::DATE); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::DateTime, HTMLInputElement::DATETIME); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::DateTimeLocal, HTMLInputElement::DATETIMELOCAL); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Month, HTMLInputElement::MONTH); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Time, HTMLInputElement::TIME); -COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Week, HTMLInputElement::WEEK); - COMPILE_ASSERT_MATCHING_ENUM(WebNode::ElementNode, Node::ELEMENT_NODE); COMPILE_ASSERT_MATCHING_ENUM(WebNode::AttributeNode, Node::ATTRIBUTE_NODE); COMPILE_ASSERT_MATCHING_ENUM(WebNode::TextNode, Node::TEXT_NODE); @@ -378,6 +354,8 @@ COMPILE_ASSERT_MATCHING_ENUM(WebView::UserScriptInjectAtDocumentStart, InjectAtD COMPILE_ASSERT_MATCHING_ENUM(WebView::UserScriptInjectAtDocumentEnd, InjectAtDocumentEnd); COMPILE_ASSERT_MATCHING_ENUM(WebView::UserContentInjectInAllFrames, InjectInAllFrames); COMPILE_ASSERT_MATCHING_ENUM(WebView::UserContentInjectInTopFrameOnly, InjectInTopFrameOnly); +COMPILE_ASSERT_MATCHING_ENUM(WebView::UserStyleInjectInExistingDocuments, InjectInExistingDocuments); +COMPILE_ASSERT_MATCHING_ENUM(WebView::UserStyleInjectInSubsequentDocuments, InjectInSubsequentDocuments); COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NullType, IDBKey::NullType); COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::StringType, IDBKey::StringType); diff --git a/WebKit/chromium/src/AsyncFileSystemChromium.cpp b/WebKit/chromium/src/AsyncFileSystemChromium.cpp index 08fcea6..db65bbd 100644 --- a/WebKit/chromium/src/AsyncFileSystemChromium.cpp +++ b/WebKit/chromium/src/AsyncFileSystemChromium.cpp @@ -33,9 +33,11 @@ #if ENABLE(FILE_SYSTEM) #include "AsyncFileSystemCallbacks.h" -#include "FileSystem.h" +#include "AsyncFileWriterChromium.h" +#include "WebFileInfo.h" #include "WebFileSystem.h" #include "WebFileSystemCallbacksImpl.h" +#include "WebFileWriter.h" #include "WebKit.h" #include "WebKitClient.h" @@ -43,6 +45,11 @@ namespace WebCore { +bool AsyncFileSystem::isAvailable() +{ + return true; +} + AsyncFileSystemChromium::AsyncFileSystemChromium(const String& rootPath) : AsyncFileSystem(rootPath) , m_webFileSystem(WebKit::webKitClient()->fileSystem()) @@ -99,6 +106,65 @@ void AsyncFileSystemChromium::readDirectory(const String& path, PassOwnPtr<Async m_webFileSystem->readDirectory(path, new WebKit::WebFileSystemCallbacksImpl(callbacks)); } +class FileWriterHelperCallbacks : public WebKit::WebFileSystemCallbacks { +public: + FileWriterHelperCallbacks(AsyncFileWriterClient* client, const String& path, WebKit::WebFileSystem* webFileSystem, PassOwnPtr<WebCore::AsyncFileSystemCallbacks> callbacks) + : m_client(client) + , m_path(path) + , m_webFileSystem(webFileSystem) + , m_callbacks(callbacks) + { + } + + virtual void didSucceed() + { + ASSERT_NOT_REACHED(); + delete this; + } + virtual void didReadMetadata(const WebKit::WebFileInfo& info) + { + ASSERT(m_callbacks); + if (info.type != WebKit::WebFileInfo::TypeFile || info.length < 0) + m_callbacks->didFail(WebKit::WebFileErrorInvalidState); + else { + OwnPtr<AsyncFileWriterChromium> asyncFileWriterChromium = adoptPtr(new AsyncFileWriterChromium(m_client)); + OwnPtr<WebKit::WebFileWriter> webFileWriter = adoptPtr(m_webFileSystem->createFileWriter(m_path, asyncFileWriterChromium.get())); + asyncFileWriterChromium->setWebFileWriter(webFileWriter.release()); + m_callbacks->didCreateFileWriter(asyncFileWriterChromium.release(), info.length); + } + delete this; + } + + virtual void didReadDirectory(const WebKit::WebVector<WebKit::WebFileSystemEntry>& entries, bool hasMore) + { + ASSERT_NOT_REACHED(); + delete this; + } + virtual void didOpenFileSystem(const WebKit::WebString& name, const WebKit::WebString& rootPath) + { + ASSERT_NOT_REACHED(); + delete this; + } + + virtual void didFail(WebKit::WebFileError error) + { + ASSERT(m_callbacks); + m_callbacks->didFail(error); + delete this; + } + +private: + AsyncFileWriterClient* m_client; + String m_path; + WebKit::WebFileSystem* m_webFileSystem; + OwnPtr<WebCore::AsyncFileSystemCallbacks> m_callbacks; +}; + +void AsyncFileSystemChromium::createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) +{ + m_webFileSystem->readMetadata(path, new FileWriterHelperCallbacks(client, path, m_webFileSystem, callbacks)); +} + } // namespace WebCore #endif diff --git a/WebKit/chromium/src/AsyncFileSystemChromium.h b/WebKit/chromium/src/AsyncFileSystemChromium.h index f46f78c..d8698d5 100644 --- a/WebKit/chromium/src/AsyncFileSystemChromium.h +++ b/WebKit/chromium/src/AsyncFileSystemChromium.h @@ -58,6 +58,7 @@ public: virtual void fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); virtual void directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); virtual void readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); + virtual void createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); private: WebKit::WebFileSystem* m_webFileSystem; diff --git a/WebKit/chromium/src/AsyncFileWriterChromium.cpp b/WebKit/chromium/src/AsyncFileWriterChromium.cpp index 4bfc988..8969094 100644 --- a/WebKit/chromium/src/AsyncFileWriterChromium.cpp +++ b/WebKit/chromium/src/AsyncFileWriterChromium.cpp @@ -33,30 +33,31 @@ #if ENABLE(FILE_SYSTEM) +#include "AsyncFileWriterClient.h" #include "Blob.h" -#include "FileWriterClient.h" #include "WebFileWriter.h" #include "WebURL.h" -using namespace WebCore; +namespace WebCore { -namespace WebKit { - -AsyncFileWriterChromium::AsyncFileWriterChromium(FileWriterClient* client) +AsyncFileWriterChromium::AsyncFileWriterChromium(AsyncFileWriterClient* client) : m_client(client) { } -void AsyncFileWriterChromium::setWebFileWriter(WebFileWriter* writer) +AsyncFileWriterChromium::~AsyncFileWriterChromium() +{ +} + +void AsyncFileWriterChromium::setWebFileWriter(PassOwnPtr<WebKit::WebFileWriter> writer) { - ASSERT(!m_writer); m_writer = writer; } void AsyncFileWriterChromium::write(long long position, Blob* data) { ASSERT(m_writer); - m_writer->write(position, WebURL(data->url())); + m_writer->write(position, WebKit::WebURL(data->url())); } void AsyncFileWriterChromium::truncate(long long length) @@ -77,12 +78,12 @@ void AsyncFileWriterChromium::didWrite(long long bytes, bool complete) m_client->didWrite(bytes, complete); } -void AsyncFileWriterChromium::didTruncate(long long length) +void AsyncFileWriterChromium::didTruncate() { - m_client->didTruncate(length); + m_client->didTruncate(); } -void AsyncFileWriterChromium::didFail(WebFileError error) +void AsyncFileWriterChromium::didFail(WebKit::WebFileError error) { m_client->didFail(error); } diff --git a/WebKit/chromium/src/AsyncFileWriterChromium.h b/WebKit/chromium/src/AsyncFileWriterChromium.h index 92743ca..71a2f18 100644 --- a/WebKit/chromium/src/AsyncFileWriterChromium.h +++ b/WebKit/chromium/src/AsyncFileWriterChromium.h @@ -36,35 +36,37 @@ #include "AsyncFileWriter.h" #include "WebFileError.h" #include "WebFileWriterClient.h" +#include <wtf/PassOwnPtr.h> -namespace WebCore { -class Blob; -class FileWriterClient; +namespace WebKit { +class WebFileWriter; } -namespace WebKit { +namespace WebCore { -class WebFileWriter; +class Blob; +class AsyncFileWriterClient; -class AsyncFileWriterChromium : public WebCore::AsyncFileWriter, public WebFileWriterClient { +class AsyncFileWriterChromium : public AsyncFileWriter, public WebKit::WebFileWriterClient { public: - AsyncFileWriterChromium(WebCore::FileWriterClient* client); - - void setWebFileWriter(WebFileWriter* writer); + AsyncFileWriterChromium(AsyncFileWriterClient* client); + ~AsyncFileWriterChromium(); + + void setWebFileWriter(PassOwnPtr<WebKit::WebFileWriter> writer); // FileWriter - virtual void write(long long position, WebCore::Blob* data); + virtual void write(long long position, Blob* data); virtual void truncate(long long length); virtual void abort(); // WebFileWriterClient virtual void didWrite(long long bytes, bool complete); - virtual void didTruncate(long long length); - virtual void didFail(WebFileError); + virtual void didTruncate(); + virtual void didFail(WebKit::WebFileError); private: - OwnPtr<WebFileWriter> m_writer; - WebCore::FileWriterClient* m_client; + OwnPtr<WebKit::WebFileWriter> m_writer; + AsyncFileWriterClient* m_client; }; } // namespace diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp index 8c13cbb..5f702e0 100644 --- a/WebKit/chromium/src/ChromeClientImpl.cpp +++ b/WebKit/chromium/src/ChromeClientImpl.cpp @@ -44,7 +44,6 @@ #include "FloatRect.h" #include "FrameLoadRequest.h" #include "FrameView.h" -#include "GLES2Context.h" #include "Geolocation.h" #include "GeolocationService.h" #include "GeolocationServiceChromium.h" @@ -257,7 +256,9 @@ void ChromeClientImpl::focusedNodeChanged(Node* node) if (!document) { ASSERT_NOT_REACHED(); return; - } + } + + // TODO: Remove once the FocusedUIElementChanged notification is handled downstream. if (document && document->axObjectCache()->accessibilityEnabled()) { // Retrieve the focused AccessibilityObject. AccessibilityObject* focusedAccObj = @@ -760,20 +761,6 @@ void ChromeClientImpl::getPopupMenuInfo(PopupContainer* popupContainer, info->rightAligned = popupContainer->menuStyle().textDirection() == RTL; } -void ChromeClientImpl::didChangeAccessibilityObjectState(AccessibilityObject* obj) -{ - // Alert assistive technology about the accessibility object state change - if (obj) - m_webView->client()->didChangeAccessibilityObjectState(WebAccessibilityObject(obj)); -} - -void ChromeClientImpl::didChangeAccessibilityObjectChildren(WebCore::AccessibilityObject* obj) -{ - // Alert assistive technology about the accessibility object children change - if (obj) - m_webView->client()->didChangeAccessibilityObjectChildren(WebAccessibilityObject(obj)); -} - void ChromeClientImpl::postAccessibilityNotification(AccessibilityObject* obj, AXObjectCache::AXNotification notification) { // Alert assistive technology about the accessibility object notification. diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h index fbaac87..02f1de6 100644 --- a/WebKit/chromium/src/ChromeClientImpl.h +++ b/WebKit/chromium/src/ChromeClientImpl.h @@ -166,8 +166,6 @@ public: const WebCore::IntRect& bounds, bool handleExternally); virtual void popupClosed(WebCore::PopupContainer* popupContainer); - virtual void didChangeAccessibilityObjectState(WebCore::AccessibilityObject*); - virtual void didChangeAccessibilityObjectChildren(WebCore::AccessibilityObject*); virtual void postAccessibilityNotification(WebCore::AccessibilityObject*, WebCore::AXObjectCache::AXNotification); // ChromeClientImpl: diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp index 3ced7b8..b906575 100644 --- a/WebKit/chromium/src/ChromiumBridge.cpp +++ b/WebKit/chromium/src/ChromiumBridge.cpp @@ -66,7 +66,7 @@ #include "WebThemeEngine.h" #endif -#if OS(LINUX) +#if OS(LINUX) || OS(FREEBSD) #include "WebFontInfo.h" #include "WebFontRenderStyle.h" #endif @@ -422,7 +422,7 @@ bool ChromiumBridge::ensureFontLoaded(HFONT font) } #endif -#if OS(LINUX) +#if OS(LINUX) || OS(FREEBSD) String ChromiumBridge::getFontFamilyForCharacters(const UChar* characters, size_t numCharacters) { if (webKitClient()->sandboxSupport()) diff --git a/WebKit/chromium/src/DeviceOrientationClientProxy.cpp b/WebKit/chromium/src/DeviceOrientationClientProxy.cpp index f4a0dd9..29b43ba 100644 --- a/WebKit/chromium/src/DeviceOrientationClientProxy.cpp +++ b/WebKit/chromium/src/DeviceOrientationClientProxy.cpp @@ -71,4 +71,9 @@ WebCore::DeviceOrientation* DeviceOrientationClientProxy::lastOrientation() cons return m_lastOrientation.get(); } +void DeviceOrientationClientProxy::deviceOrientationControllerDestroyed() +{ + // Our lifetime is bound to the WebViewImpl. +} + } // namespace WebKit diff --git a/WebKit/chromium/src/DeviceOrientationClientProxy.h b/WebKit/chromium/src/DeviceOrientationClientProxy.h index 2d3a7dc..e90d77f 100644 --- a/WebKit/chromium/src/DeviceOrientationClientProxy.h +++ b/WebKit/chromium/src/DeviceOrientationClientProxy.h @@ -48,6 +48,7 @@ public: void startUpdating(); void stopUpdating(); WebCore::DeviceOrientation* lastOrientation() const; + virtual void deviceOrientationControllerDestroyed(); private: WebDeviceOrientationClient* m_client; diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp index 61d43df..ba9c8fd 100644 --- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp +++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp @@ -147,6 +147,14 @@ void FrameLoaderClientImpl::didCreateIsolatedScriptContext() m_webFrame->client()->didCreateIsolatedScriptContext(m_webFrame); } +bool FrameLoaderClientImpl::allowScriptExtension(const String& extensionName, + int extensionGroup) +{ + if (m_webFrame->client()) + return m_webFrame->client()->allowScriptExtension(m_webFrame, extensionName, extensionGroup); + return false; +} + void FrameLoaderClientImpl::didPerformFirstNavigation() const { } @@ -1360,7 +1368,7 @@ PassRefPtr<Frame> FrameLoaderClientImpl::createFrame( return m_webFrame->createChildFrame(frameRequest, ownerElement); } -void FrameLoaderClientImpl::didTransferChildFrameToNewDocument() +void FrameLoaderClientImpl::didTransferChildFrameToNewDocument(Page*) { ASSERT(m_webFrame->frame()->ownerElement()); diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.h b/WebKit/chromium/src/FrameLoaderClientImpl.h index 57105de..0b15db6 100644 --- a/WebKit/chromium/src/FrameLoaderClientImpl.h +++ b/WebKit/chromium/src/FrameLoaderClientImpl.h @@ -69,6 +69,10 @@ public: // in garbage collection. virtual void didCreateIsolatedScriptContext(); + // Returns true if we should allow the given V8 extension to be added to + // the script context at the currently loading page and given extension group. + virtual bool allowScriptExtension(const String& extensionName, int extensionGroup); + virtual bool hasWebView() const; virtual bool hasFrameView() const; virtual void makeRepresentation(WebCore::DocumentLoader*); @@ -175,7 +179,7 @@ public: WebCore::HTMLFrameOwnerElement* ownerElement, const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); - virtual void didTransferChildFrameToNewDocument(); + virtual void didTransferChildFrameToNewDocument(WebCore::Page*); virtual PassRefPtr<WebCore::Widget> createPlugin( const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WTF::String>&, const Vector<WTF::String>&, diff --git a/WebKit/chromium/src/GLES2Context.cpp b/WebKit/chromium/src/GLES2Context.cpp deleted file mode 100644 index b4b4bb2..0000000 --- a/WebKit/chromium/src/GLES2Context.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#include "GLES2Context.h" -#include "GLES2ContextInternal.h" -#include "IntSize.h" -#include "WebGLES2Context.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebViewImpl.h" -#include <wtf/OwnPtr.h> - -// There are two levels of delegation in this file: -// -// 1. GLES2Context delegates to GLES2ContextInternal. This is done -// so that we have some place to store data members common among -// implementations. -// -// 2. GLES2ContextInternal delegates to an implementation of -// WebGLES2Context. This is done so we have a place to inject an -// implementation which creates the GL ES context. - -using namespace WebKit; - -namespace WebCore { - -PassOwnPtr<GLES2ContextInternal> GLES2ContextInternal::create(WebGLES2Context* impl, bool owns) -{ - PassOwnPtr<GLES2ContextInternal> result = new GLES2ContextInternal(impl, owns); - return result; -} - -PassOwnPtr<GLES2Context> GLES2Context::create(PassOwnPtr<GLES2ContextInternal> internal) -{ - PassOwnPtr<GLES2Context> result = new GLES2Context(); - result->m_internal = internal; - return result; -} - -GLES2Context::GLES2Context() -{ -} - -GLES2Context::~GLES2Context() -{ -} - -bool GLES2Context::makeCurrent() -{ - WebGLES2Context* webContext = m_internal->getWebGLES2Context(); - if (!webContext) - return false; - return webContext->makeCurrent(); -} - -bool GLES2Context::destroy() -{ - WebGLES2Context* webContext = m_internal->getWebGLES2Context(); - if (!webContext) - return false; - return webContext->destroy(); -} - -bool GLES2Context::swapBuffers() -{ - WebGLES2Context* webContext = m_internal->getWebGLES2Context(); - if (!webContext) - return false; - return webContext->swapBuffers(); -} - -void GLES2Context::resizeOffscreenContent(const IntSize& size) -{ - WebGLES2Context* webContext = m_internal->getWebGLES2Context(); - ASSERT(webContext); - webContext->resizeOffscreenContent(size); -} - -unsigned GLES2Context::getOffscreenContentParentTextureId() -{ - WebGLES2Context* webContext = m_internal->getWebGLES2Context(); - ASSERT(webContext); - return webContext->getOffscreenContentParentTextureId(); -} - -} // namespace WebCore diff --git a/WebKit/chromium/src/GLES2ContextInternal.h b/WebKit/chromium/src/GLES2ContextInternal.h deleted file mode 100644 index 4668311..0000000 --- a/WebKit/chromium/src/GLES2ContextInternal.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <wtf/PassOwnPtr.h> - -namespace WebKit { -class WebGLES2Context; -} - -namespace WebCore { - -class GLES2ContextInternal { -public: - // If 'owns' is set to true, this GLES2ContextInternal takes ownership of the passed in WebKit::WebGLES2Context. - static PassOwnPtr<GLES2ContextInternal> create(WebKit::WebGLES2Context* impl, bool owns); - - WebKit::WebGLES2Context* getWebGLES2Context() { return m_impl; } - - ~GLES2ContextInternal(); - -private: - GLES2ContextInternal(WebKit::WebGLES2Context* impl, bool owns); - - WebKit::WebGLES2Context* m_impl; - bool m_owns; -}; - -} diff --git a/WebKit/chromium/src/IDBDatabaseProxy.h b/WebKit/chromium/src/IDBDatabaseProxy.h index 42a7d7e..fffd23e 100644 --- a/WebKit/chromium/src/IDBDatabaseProxy.h +++ b/WebKit/chromium/src/IDBDatabaseProxy.h @@ -47,7 +47,7 @@ public: virtual String version() const; virtual PassRefPtr<DOMStringList> objectStores() const; - // FIXME: Add transaction and setVersion. + // FIXME: Add setVersion. virtual void createObjectStore(const String& name, const String& keyPath, bool autoIncrement, PassRefPtr<IDBCallbacks>); virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name, unsigned short mode); diff --git a/WebKit/chromium/src/IDBFactoryBackendProxy.cpp b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp index 18101e4..d43e787 100755 --- a/WebKit/chromium/src/IDBFactoryBackendProxy.cpp +++ b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp @@ -65,14 +65,6 @@ void IDBFactoryBackendProxy::open(const String& name, const String& description, m_webIDBFactory->open(name, description, new WebIDBCallbacksImpl(callbacks), origin, webFrame, dataDir); } -void IDBFactoryBackendProxy::abortPendingTransactions(const Vector<int>& pendingIDs) -{ - ASSERT(pendingIDs.size()); - WebKit::WebVector<int> ids = pendingIDs; - - m_webIDBFactory->abortPendingTransactions(ids); -} - } // namespace WebCore #endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/IDBFactoryBackendProxy.h b/WebKit/chromium/src/IDBFactoryBackendProxy.h index ac30cf2..6371686 100755 --- a/WebKit/chromium/src/IDBFactoryBackendProxy.h +++ b/WebKit/chromium/src/IDBFactoryBackendProxy.h @@ -46,7 +46,6 @@ public: PassRefPtr<DOMStringList> databases(void) const; virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, const String& dataDir); - virtual void abortPendingTransactions(const Vector<int>& pendingIDs); private: IDBFactoryBackendProxy(); diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.cpp b/WebKit/chromium/src/IDBObjectStoreProxy.cpp index ad27fa3..82ca5f6 100755 --- a/WebKit/chromium/src/IDBObjectStoreProxy.cpp +++ b/WebKit/chromium/src/IDBObjectStoreProxy.cpp @@ -30,11 +30,13 @@ #include "IDBCallbacks.h" #include "IDBIndexBackendProxy.h" #include "IDBKeyRange.h" +#include "IDBTransactionBackendProxy.h" #include "WebIDBCallbacksImpl.h" #include "WebIDBKeyRange.h" #include "WebIDBIndex.h" #include "WebIDBKey.h" #include "WebIDBObjectStore.h" +#include "WebIDBTransactionImpl.h" #include "WebSerializedScriptValue.h" #if ENABLE(INDEXED_DATABASE) @@ -70,9 +72,12 @@ PassRefPtr<DOMStringList> IDBObjectStoreProxy::indexNames() const return m_webIDBObjectStore->indexNames(); } -void IDBObjectStoreProxy::get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks) +void IDBObjectStoreProxy::get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction) { - m_webIDBObjectStore->get(key, new WebIDBCallbacksImpl(callbacks)); + // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer, + // all implementations of IDB interfaces are proxy objects. + IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction); + m_webIDBObjectStore->get(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction()); } void IDBObjectStoreProxy::put(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, bool addOnly, PassRefPtr<IDBCallbacks> callbacks) diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.h b/WebKit/chromium/src/IDBObjectStoreProxy.h index a334572..13dfe23 100755 --- a/WebKit/chromium/src/IDBObjectStoreProxy.h +++ b/WebKit/chromium/src/IDBObjectStoreProxy.h @@ -46,7 +46,7 @@ public: String keyPath() const; PassRefPtr<DOMStringList> indexNames() const; - void get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks>); + void get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*); void put(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, bool addOnly, PassRefPtr<IDBCallbacks>); void remove(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks>); diff --git a/WebKit/chromium/src/IDBTransactionBackendProxy.cpp b/WebKit/chromium/src/IDBTransactionBackendProxy.cpp index be6b058..59e88d8 100644 --- a/WebKit/chromium/src/IDBTransactionBackendProxy.cpp +++ b/WebKit/chromium/src/IDBTransactionBackendProxy.cpp @@ -69,11 +69,17 @@ void IDBTransactionBackendProxy::abort() m_webIDBTransaction->abort(); } -void IDBTransactionBackendProxy::scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>) +bool IDBTransactionBackendProxy::scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>) { // This should never be reached as it's the impl objects who get to // execute tasks in the browser process. ASSERT_NOT_REACHED(); + return false; +} + +void IDBTransactionBackendProxy::didCompleteTaskEvents() +{ + m_webIDBTransaction->didCompleteTaskEvents(); } int IDBTransactionBackendProxy::id() const diff --git a/WebKit/chromium/src/IDBTransactionBackendProxy.h b/WebKit/chromium/src/IDBTransactionBackendProxy.h index d62b8ff..3daf73e 100644 --- a/WebKit/chromium/src/IDBTransactionBackendProxy.h +++ b/WebKit/chromium/src/IDBTransactionBackendProxy.h @@ -45,10 +45,13 @@ public: virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name); virtual unsigned short mode() const; virtual void abort(); - virtual void scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>); + virtual bool scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>); + virtual void didCompleteTaskEvents(); virtual int id() const; virtual void setCallbacks(IDBTransactionCallbacks*); + WebKit::WebIDBTransaction* getWebIDBTransaction() const { return m_webIDBTransaction.get(); } + private: IDBTransactionBackendProxy(PassOwnPtr<WebKit::WebIDBTransaction>); diff --git a/WebKit/chromium/src/LocalFileSystemChromium.cpp b/WebKit/chromium/src/LocalFileSystemChromium.cpp index 45365ef..7bf4335 100644 --- a/WebKit/chromium/src/LocalFileSystemChromium.cpp +++ b/WebKit/chromium/src/LocalFileSystemChromium.cpp @@ -42,25 +42,33 @@ #include "WebFileSystemCallbacksImpl.h" #include "WebFrameClient.h" #include "WebFrameImpl.h" +#include "WebWorkerImpl.h" +#include "WorkerContext.h" +#include "WorkerThread.h" +#include <wtf/Threading.h> using namespace WebKit; namespace WebCore { -PassRefPtr<LocalFileSystem> LocalFileSystem::create(const String& path) +LocalFileSystem& LocalFileSystem::localFileSystem() { - return adoptRef(new LocalFileSystem(path)); + AtomicallyInitializedStatic(LocalFileSystem*, localFileSystem = new LocalFileSystem("")); + return *localFileSystem; } -void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long size, PassRefPtr<FileSystemCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback) +void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) { ASSERT(context); if (context->isDocument()) { Document* document = static_cast<Document*>(context); WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); - webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, new WebFileSystemCallbacksImpl(new FileSystemCallbacks(successCallback, errorCallback, context))); + webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, new WebFileSystemCallbacksImpl(callbacks)); } else { - // FIXME: Add implementation for workers. + WorkerContext* workerContext = static_cast<WorkerContext*>(context); + WorkerLoaderProxy* workerLoaderProxy = &workerContext->thread()->workerLoaderProxy(); + WebWorkerBase* webWorker = static_cast<WebWorkerBase*>(workerLoaderProxy); + webWorker->openFileSystem(static_cast<WebFileSystem::Type>(type), size, new WebFileSystemCallbacksImpl(callbacks)); } } diff --git a/WebKit/chromium/src/LocalizedStrings.cpp b/WebKit/chromium/src/LocalizedStrings.cpp index 74ff699..3354c30 100644 --- a/WebKit/chromium/src/LocalizedStrings.cpp +++ b/WebKit/chromium/src/LocalizedStrings.cpp @@ -265,6 +265,16 @@ String contextMenuItemTagInspectElement() { return String(); } String contextMenuItemTagShowSpellingPanel(bool show) { return String(); } String mediaElementLiveBroadcastStateText() { return String(); } String mediaElementLoadingStateText() { return String(); } +String contextMenuItemTagOpenVideoInNewWindow() { return String(); } +String contextMenuItemTagOpenAudioInNewWindow() { return String(); } +String contextMenuItemTagCopyVideoLinkToClipboard() { return String(); } +String contextMenuItemTagCopyAudioLinkToClipboard() { return String(); } +String contextMenuItemTagToggleMediaControls() { return String(); } +String contextMenuItemTagToggleMediaLoop() { return String(); } +String contextMenuItemTagEnterVideoFullscreen() { return String(); } +String contextMenuItemTagMediaPlay() { return String(); } +String contextMenuItemTagMediaPause() { return String(); } +String contextMenuItemTagMediaMute() { return String(); } String localizedMediaControlElementString(const String& /*name*/) { diff --git a/WebKit/chromium/src/VideoFrameChromiumImpl.cpp b/WebKit/chromium/src/VideoFrameChromiumImpl.cpp index 2b98320..a60fe28 100644 --- a/WebKit/chromium/src/VideoFrameChromiumImpl.cpp +++ b/WebKit/chromium/src/VideoFrameChromiumImpl.cpp @@ -38,14 +38,6 @@ using namespace WebCore; namespace WebKit { -const unsigned cMaxPlanes = 3; -const unsigned cNumRGBPlanes = 1; -const unsigned cRGBPlane = 0; -const unsigned cNumYUVPlanes = 3; -const unsigned cYPlane = 0; -const unsigned cUPlane = 1; -const unsigned cVPlane = 2; - WebVideoFrame* VideoFrameChromiumImpl::toWebVideoFrame(VideoFrameChromium* videoFrame) { VideoFrameChromiumImpl* wrappedFrame = static_cast<VideoFrameChromiumImpl*>(videoFrame); @@ -108,4 +100,22 @@ const void* VideoFrameChromiumImpl::data(unsigned plane) const return 0; } +const IntSize VideoFrameChromiumImpl::requiredTextureSize(unsigned plane) const +{ + switch (format()) { + case RGBA: + return IntSize(stride(plane), height()); + case YV12: + if (plane == static_cast<unsigned>(yPlane)) + return IntSize(stride(plane), height()); + else if (plane == static_cast<unsigned>(uPlane)) + return IntSize(stride(plane), height() / 2); + else if (plane == static_cast<unsigned>(vPlane)) + return IntSize(stride(plane), height() / 2); + default: + break; + } + return IntSize(); +} + } // namespace WebKit diff --git a/WebKit/chromium/src/VideoFrameChromiumImpl.h b/WebKit/chromium/src/VideoFrameChromiumImpl.h index 3ad424c..042cd7e 100644 --- a/WebKit/chromium/src/VideoFrameChromiumImpl.h +++ b/WebKit/chromium/src/VideoFrameChromiumImpl.h @@ -56,6 +56,7 @@ public: virtual unsigned planes() const; virtual int stride(unsigned plane) const; virtual const void* data(unsigned plane) const; + virtual const IntSize requiredTextureSize(unsigned plane) const; private: WebVideoFrame* m_webVideoFrame; diff --git a/WebKit/chromium/src/WebAccessibilityCache.cpp b/WebKit/chromium/src/WebAccessibilityCache.cpp index 8a3f697..ab8f814 100644 --- a/WebKit/chromium/src/WebAccessibilityCache.cpp +++ b/WebKit/chromium/src/WebAccessibilityCache.cpp @@ -42,4 +42,9 @@ void WebAccessibilityCache::enableAccessibility() AXObjectCache::enableAccessibility(); } +bool WebAccessibilityCache::accessibilityEnabled() +{ + return AXObjectCache::accessibilityEnabled(); +} + } diff --git a/WebKit/chromium/src/WebBindings.cpp b/WebKit/chromium/src/WebBindings.cpp index 4bb9022..c25c31b 100644 --- a/WebKit/chromium/src/WebBindings.cpp +++ b/WebKit/chromium/src/WebBindings.cpp @@ -312,6 +312,17 @@ static bool getElementImpl(NPObject* npObj, WebElement* webElement) return true; } +static NPObject* makeIntArrayImpl(const WebVector<int>& data) +{ + v8::HandleScope handleScope; + v8::Handle<v8::Array> result = v8::Array::New(data.size()); + for (size_t i = 0; i < data.size(); i++) + result->Set(i, v8::Number::New(data[i])); + + WebCore::DOMWindow* window = WebCore::V8Proxy::retrieveWindow(WebCore::V8Proxy::currentContext()); + return npCreateV8ScriptObject(0, result, window); +} + #endif bool WebBindings::getDragData(NPObject* event, int* eventId, WebDragData* data) @@ -350,6 +361,16 @@ bool WebBindings::getElement(NPObject* element, WebElement* webElement) #endif } +NPObject* WebBindings::makeIntArray(const WebVector<int> & data) +{ +#if USE(V8) + return makeIntArrayImpl(data); +#else + // Not supported on other ports (JSC, etc.). + return 0; +#endif +} + void WebBindings::pushExceptionHandler(ExceptionHandler handler, void* data) { WebCore::pushExceptionHandler(handler, data); diff --git a/WebKit/chromium/src/WebFileSystemCallbacksImpl.h b/WebKit/chromium/src/WebFileSystemCallbacksImpl.h index b9c825b..36ab9ff 100644 --- a/WebKit/chromium/src/WebFileSystemCallbacksImpl.h +++ b/WebKit/chromium/src/WebFileSystemCallbacksImpl.h @@ -43,7 +43,7 @@ class AsyncFileSystemCallbacks; namespace WebKit { struct WebFileInfo; -class WebFileSystemEntry; +struct WebFileSystemEntry; class WebString; class WebFileSystemCallbacksImpl : public WebFileSystemCallbacks { diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp index 2d42f4b..1b64e5a 100644 --- a/WebKit/chromium/src/WebFrameImpl.cpp +++ b/WebKit/chromium/src/WebFrameImpl.cpp @@ -99,6 +99,7 @@ #include "HistoryItem.h" #include "InspectorController.h" #include "Page.h" +#include "Performance.h" #include "PlatformContextSkia.h" #include "PluginDocument.h" #include "PrintContext.h" @@ -109,6 +110,7 @@ #include "ReplaceSelectionCommand.h" #include "ResourceHandle.h" #include "ResourceRequest.h" +#include "SVGSMILElement.h" #include "ScriptController.h" #include "ScriptSourceCode.h" #include "ScriptValue.h" @@ -130,6 +132,7 @@ #include "WebHistoryItem.h" #include "WebInputElement.h" #include "WebPasswordAutocompleteListener.h" +#include "WebPerformance.h" #include "WebPlugin.h" #include "WebPluginContainerImpl.h" #include "WebRange.h" @@ -151,7 +154,7 @@ #include "LocalCurrentGraphicsContext.h" #endif -#if OS(LINUX) +#if OS(LINUX) || OS(FREEBSD) #include <gdk/gdk.h> #endif @@ -307,7 +310,7 @@ public: float scale = m_printedPageWidth / pageRect.width(); ctx.save(); -#if OS(LINUX) +#if OS(LINUX) || OS(FREEBSD) ctx.scale(WebCore::FloatSize(scale, scale)); #endif ctx.translate(static_cast<float>(-pageRect.x()), @@ -550,7 +553,7 @@ WebSize WebFrameImpl::contentsSize() const int WebFrameImpl::contentsPreferredWidth() const { if (m_frame->document() && m_frame->document()->renderView()) - return m_frame->document()->renderView()->minPrefWidth(); + return m_frame->document()->renderView()->minPreferredLogicalWidth(); return 0; } @@ -692,6 +695,14 @@ WebAnimationController* WebFrameImpl::animationController() return &m_animationController; } +WebPerformance WebFrameImpl::performance() const +{ + if (!m_frame || !m_frame->domWindow()) + return WebPerformance(); + + return WebPerformance(m_frame->domWindow()->webkitPerformance()); +} + WebSecurityOrigin WebFrameImpl::securityOrigin() const { if (!m_frame || !m_frame->document()) @@ -1071,6 +1082,22 @@ WebRange WebFrameImpl::markedRange() const return frame()->editor()->compositionRange(); } +bool WebFrameImpl::firstRectForCharacterRange(unsigned location, unsigned length, WebRect& rect) const +{ + if ((location + length < location) && (location + length)) + length = 0; + + Element* selectionRoot = frame()->selection()->rootEditableElement(); + Element* scope = selectionRoot ? selectionRoot : frame()->document()->documentElement(); + RefPtr<Range> range = TextIterator::rangeFromLocationAndLength(scope, location, length); + if (!range) + return false; + IntRect intRect = frame()->editor()->firstRectForRange(range.get()); + rect = WebRect(intRect.x(), intRect.y(), intRect.width(), intRect.height()); + + return true; +} + bool WebFrameImpl::executeCommand(const WebString& name) { ASSERT(frame()); @@ -1712,6 +1739,26 @@ bool WebFrameImpl::selectionStartHasSpellingMarkerFor(int from, int length) cons return m_frame->editor()->selectionStartHasSpellingMarkerFor(from, length); } +bool WebFrameImpl::pauseSVGAnimation(const WebString& animationId, double time, const WebString& elementId) +{ +#if !ENABLE(SVG) + return false; +#else + if (!m_frame) + return false; + + Document* document = m_frame->document(); + if (!document || !document->svgExtensions()) + return false; + + Node* coreNode = document->getElementById(animationId); + if (!coreNode || !SVGSMILElement::isSMILElement(coreNode)) + return false; + + return document->accessSVGExtensions()->sampleAnimationAtTime(elementId, static_cast<SVGSMILElement*>(coreNode), time); +#endif +} + // WebFrameImpl public --------------------------------------------------------- PassRefPtr<WebFrameImpl> WebFrameImpl::create(WebFrameClient* client) diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h index 25e7004..d93254b 100644 --- a/WebKit/chromium/src/WebFrameImpl.h +++ b/WebKit/chromium/src/WebFrameImpl.h @@ -56,6 +56,7 @@ class WebDataSourceImpl; class WebInputElement; class WebFrameClient; class WebPasswordAutocompleteListener; +class WebPerformance; class WebPluginContainerImpl; class WebView; class WebViewImpl; @@ -90,6 +91,7 @@ public: virtual WebDocument document() const; virtual void forms(WebVector<WebFormElement>&) const; virtual WebAnimationController* animationController(); + virtual WebPerformance performance() const; virtual WebSecurityOrigin securityOrigin() const; virtual void grantUniversalAccess(); virtual NPObject* windowObject() const; @@ -135,6 +137,7 @@ public: virtual void unmarkText(); virtual bool hasMarkedText() const; virtual WebRange markedRange() const; + virtual bool firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const; virtual bool executeCommand(const WebString&); virtual bool executeCommand(const WebString&, const WebString& value); virtual bool isCommandEnabled(const WebString&) const; @@ -183,6 +186,9 @@ public: virtual WebRect selectionBoundsRect() const; virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const; + virtual bool pauseSVGAnimation(const WebString& animationId, + double time, + const WebString& elementId); static PassRefPtr<WebFrameImpl> create(WebFrameClient* client); ~WebFrameImpl(); diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp index 24dcf9a..45bc2ee 100644 --- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp +++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp @@ -38,12 +38,21 @@ #include "app/gfx/gl/gl_context.h" #include "NotImplemented.h" #include <wtf/PassOwnPtr.h> +#include <wtf/text/CString.h> #include <stdio.h> #include <string.h> namespace WebKit { +enum { + IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B, + IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A, + MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB, + MAX_VARYING_VECTORS = 0x8DFC, + MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD +}; + WebGraphicsContext3DDefaultImpl::VertexAttribPointerState::VertexAttribPointerState() : enabled(false) , buffer(0) @@ -69,6 +78,8 @@ WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl() , m_scanline(0) #endif , m_boundArrayBuffer(0) + , m_fragmentCompiler(0) + , m_vertexCompiler(0) { } @@ -94,6 +105,8 @@ WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl() glDeleteFramebuffersEXT(1, &m_fbo); m_glContext->Destroy(); + + angleDestroyCompilers(); } } @@ -115,15 +128,16 @@ bool WebGraphicsContext3DDefaultImpl::initialize(WebGraphicsContext3D::Attribute validateAttributes(); glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); + + if (!angleCreateCompilers()) { + angleDestroyCompilers(); + return false; + } + m_initialized = true; return true; } -bool WebGraphicsContext3DDefaultImpl::initialize(WebGraphicsContext3D::Attributes attributes, WebView* webView) -{ - return initialize(attributes, webView, false); -} - void WebGraphicsContext3DDefaultImpl::validateAttributes() { const char* extensions = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS)); @@ -657,7 +671,33 @@ DELEGATE_TO_GL_1(clearStencil, ClearStencil, long) DELEGATE_TO_GL_4(colorMask, ColorMask, bool, bool, bool, bool) -DELEGATE_TO_GL_1(compileShader, CompileShader, WebGLId) +void WebGraphicsContext3DDefaultImpl::compileShader(WebGLId shader) +{ + makeContextCurrent(); + + ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader); + if (result == m_shaderSourceMap.end()) { + // Passing down to gl driver to generate the correct error; or the case + // where the shader deletion is delayed when it's attached to a program. + glCompileShader(shader); + return; + } + ShaderSourceEntry& entry = result->second; + + if (!angleValidateShaderSource(entry)) + return; // Shader didn't validate, don't move forward with compiling translated source + + int shaderLength = entry.translatedSource ? strlen(entry.translatedSource) : 0; + glShaderSource(shader, 1, const_cast<const char**>(&entry.translatedSource), &shaderLength); + glCompileShader(shader); + +#ifndef NDEBUG + int compileStatus; + glGetShaderiv(shader, GL_COMPILE_STATUS, &compileStatus); + // ASSERT that ANGLE generated GLSL will be accepted by OpenGL + ASSERT(compileStatus == GL_TRUE); +#endif +} void WebGraphicsContext3DDefaultImpl::copyTexImage2D(unsigned long target, long level, unsigned long internalformat, long x, long y, unsigned long width, unsigned long height, long border) @@ -871,21 +911,21 @@ void WebGraphicsContext3DDefaultImpl::getIntegerv(unsigned long pname, int* valu // Therefore, the value returned by desktop GL needs to be divided by 4. makeContextCurrent(); switch (pname) { - case 0x8B9B: // IMPLEMENTATION_COLOR_READ_FORMAT + case IMPLEMENTATION_COLOR_READ_FORMAT: *value = GL_RGB; break; - case 0x8B9A: // IMPLEMENTATION_COLOR_READ_TYPE + case IMPLEMENTATION_COLOR_READ_TYPE: *value = GL_UNSIGNED_BYTE; break; - case 0x8DFD: // MAX_FRAGMENT_UNIFORM_VECTORS + case MAX_FRAGMENT_UNIFORM_VECTORS: glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, value); *value /= 4; break; - case 0x8DFB: // MAX_VERTEX_UNIFORM_VECTORS + case MAX_VERTEX_UNIFORM_VECTORS: glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, value); *value /= 4; break; - case 0x8DFC: // MAX_VARYING_VECTORS + case MAX_VARYING_VECTORS: glGetIntegerv(GL_MAX_VARYING_FLOATS, value); *value /= 4; break; @@ -916,14 +956,57 @@ WebString WebGraphicsContext3DDefaultImpl::getProgramInfoLog(WebGLId program) DELEGATE_TO_GL_3(getRenderbufferParameteriv, GetRenderbufferParameterivEXT, unsigned long, unsigned long, int*) -DELEGATE_TO_GL_3(getShaderiv, GetShaderiv, WebGLId, unsigned long, int*) +void WebGraphicsContext3DDefaultImpl::getShaderiv(WebGLId shader, unsigned long pname, int* value) +{ + makeContextCurrent(); + + ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader); + if (result != m_shaderSourceMap.end()) { + ShaderSourceEntry& entry = result->second; + switch (pname) { + case GL_COMPILE_STATUS: + if (!entry.isValid) { + *value = 0; + return; + } + break; + case GL_INFO_LOG_LENGTH: + if (!entry.isValid) { + *value = entry.log ? strlen(entry.log) : 0; + if (*value) + (*value)++; + return; + } + break; + case GL_SHADER_SOURCE_LENGTH: + *value = entry.source ? strlen(entry.source) : 0; + if (*value) + (*value)++; + return; + } + } + + glGetShaderiv(shader, pname, value); +} WebString WebGraphicsContext3DDefaultImpl::getShaderInfoLog(WebGLId shader) { makeContextCurrent(); - GLint logLength; + + ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader); + if (result != m_shaderSourceMap.end()) { + ShaderSourceEntry& entry = result->second; + if (!entry.isValid) { + if (!entry.log) + return WebString(); + WebString res = WebString::fromUTF8(entry.log, strlen(entry.log)); + return res; + } + } + + GLint logLength = 0; glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &logLength); - if (!logLength) + if (logLength <= 1) return WebString(); GLchar* log = 0; if (!tryFastMalloc(logLength * sizeof(GLchar)).getValue(log)) @@ -939,9 +1022,19 @@ WebString WebGraphicsContext3DDefaultImpl::getShaderInfoLog(WebGLId shader) WebString WebGraphicsContext3DDefaultImpl::getShaderSource(WebGLId shader) { makeContextCurrent(); - GLint logLength; + + ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader); + if (result != m_shaderSourceMap.end()) { + ShaderSourceEntry& entry = result->second; + if (!entry.source) + return WebString(); + WebString res = WebString::fromUTF8(entry.source, strlen(entry.source)); + return res; + } + + GLint logLength = 0; glGetShaderiv(shader, GL_SHADER_SOURCE_LENGTH, &logLength); - if (!logLength) + if (logLength <= 1) return WebString(); GLchar* log = 0; if (!tryFastMalloc(logLength * sizeof(GLchar)).getValue(log)) @@ -1061,8 +1154,19 @@ DELEGATE_TO_GL_4(scissor, Scissor, long, long, unsigned long, unsigned long) void WebGraphicsContext3DDefaultImpl::shaderSource(WebGLId shader, const char* string) { makeContextCurrent(); - GLint length = strlen(string); - glShaderSource(shader, 1, &string, &length); + GLint length = string ? strlen(string) : 0; + ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader); + if (result != m_shaderSourceMap.end()) { + ShaderSourceEntry& entry = result->second; + if (entry.source) { + fastFree(entry.source); + entry.source = 0; + } + if (!tryFastMalloc((length + 1) * sizeof(char)).getValue(entry.source)) + return; // FIXME: generate an error? + memcpy(entry.source, string, (length + 1) * sizeof(char)); + } else + glShaderSource(shader, 1, &string, &length); } DELEGATE_TO_GL_3(stencilFunc, StencilFunc, unsigned long, long, unsigned long) @@ -1201,7 +1305,18 @@ unsigned WebGraphicsContext3DDefaultImpl::createRenderbuffer() return o; } -DELEGATE_TO_GL_1R(createShader, CreateShader, unsigned long, unsigned); +unsigned WebGraphicsContext3DDefaultImpl::createShader(unsigned long shaderType) +{ + makeContextCurrent(); + ASSERT(shaderType == GL_VERTEX_SHADER || shaderType == GL_FRAGMENT_SHADER); + unsigned shader = glCreateShader(shaderType); + if (shader) { + ShaderSourceEntry entry; + entry.type = shaderType; + m_shaderSourceMap.set(shader, entry); + } + return shader; +} unsigned WebGraphicsContext3DDefaultImpl::createTexture() { @@ -1239,6 +1354,7 @@ void WebGraphicsContext3DDefaultImpl::deleteShader(unsigned shader) { makeContextCurrent(); glDeleteShader(shader); + m_shaderSourceMap.remove(shader); } void WebGraphicsContext3DDefaultImpl::deleteTexture(unsigned texture) @@ -1247,6 +1363,92 @@ void WebGraphicsContext3DDefaultImpl::deleteTexture(unsigned texture) glDeleteTextures(1, &texture); } +bool WebGraphicsContext3DDefaultImpl::angleCreateCompilers() +{ + if (!ShInitialize()) + return false; + + TBuiltInResource resource; + resource.MaxVertexAttribs = 0; + getIntegerv(GL_MAX_VERTEX_ATTRIBS, &resource.MaxVertexAttribs); + resource.MaxVertexUniformVectors = 0; + getIntegerv(MAX_VERTEX_UNIFORM_VECTORS, + &resource.MaxVertexUniformVectors); + resource.MaxVaryingVectors = 0; + getIntegerv(MAX_VARYING_VECTORS, + &resource.MaxVaryingVectors); + resource.MaxVertexTextureImageUnits = 0; + getIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &resource.MaxVertexTextureImageUnits); + resource.MaxCombinedTextureImageUnits = 0; + getIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &resource.MaxCombinedTextureImageUnits); + resource.MaxTextureImageUnits = 0; + getIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &resource.MaxTextureImageUnits); + resource.MaxFragmentUniformVectors = 0; + getIntegerv(MAX_FRAGMENT_UNIFORM_VECTORS, + &resource.MaxFragmentUniformVectors); + // Always set to 1 for OpenGL ES. + resource.MaxDrawBuffers = 1; + + m_fragmentCompiler = ShConstructCompiler(EShLangFragment, EShSpecWebGL, &resource); + m_vertexCompiler = ShConstructCompiler(EShLangVertex, EShSpecWebGL, &resource); + return (m_fragmentCompiler && m_vertexCompiler); +} + +void WebGraphicsContext3DDefaultImpl::angleDestroyCompilers() +{ + if (m_fragmentCompiler) { + ShDestruct(m_fragmentCompiler); + m_fragmentCompiler = 0; + } + if (m_vertexCompiler) { + ShDestruct(m_vertexCompiler); + m_vertexCompiler = 0; + } +} + +bool WebGraphicsContext3DDefaultImpl::angleValidateShaderSource(ShaderSourceEntry& entry) +{ + entry.isValid = false; + if (entry.translatedSource) { + fastFree(entry.translatedSource); + entry.translatedSource = 0; + } + if (entry.log) { + fastFree(entry.log); + entry.log = 0; + } + + ShHandle compiler = 0; + switch (entry.type) { + case GL_FRAGMENT_SHADER: + compiler = m_fragmentCompiler; + break; + case GL_VERTEX_SHADER: + compiler = m_vertexCompiler; + break; + } + if (!compiler) + return false; + + if (!ShCompile(compiler, &entry.source, 1, EShOptObjectCode)) { + int logSize = 0; + ShGetInfo(compiler, SH_INFO_LOG_LENGTH, &logSize); + if (logSize > 1 && tryFastMalloc(logSize * sizeof(char)).getValue(entry.log)) + ShGetInfoLog(compiler, entry.log); + return false; + } + + int length = 0; + ShGetInfo(compiler, SH_OBJECT_CODE_LENGTH, &length); + if (length > 1) { + if (!tryFastMalloc(length * sizeof(char)).getValue(entry.translatedSource)) + return false; + ShGetObjectCode(compiler, entry.translatedSource); + } + entry.isValid = true; + return true; +} + } // namespace WebKit #endif // ENABLE(3D_CANVAS) diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h index 5bf439a..319d9d8 100644 --- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h +++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h @@ -33,8 +33,10 @@ #if ENABLE(3D_CANVAS) +#include "GLSLANG/ShaderLang.h" #include "WebGraphicsContext3D.h" +#include <wtf/HashMap.h> #include <wtf/ListHashSet.h> #include <wtf/OwnPtr.h> @@ -60,8 +62,6 @@ public: //---------------------------------------------------------------------- // WebGraphicsContext3D methods virtual bool initialize(WebGraphicsContext3D::Attributes attributes, WebView*, bool); - // FIXME: remove once compositor is switched over to GraphicsContext3D. - virtual bool initialize(WebGraphicsContext3D::Attributes attributes, WebView*); virtual bool makeContextCurrent(); virtual int width(); @@ -302,8 +302,7 @@ private: // need to in order to verify that all enabled vertex arrays have // a valid buffer bound -- to avoid crashes on certain cards. unsigned int m_boundArrayBuffer; - class VertexAttribPointerState { - public: + struct VertexAttribPointerState { VertexAttribPointerState(); bool enabled; @@ -325,6 +324,44 @@ private: ListHashSet<unsigned long> m_syntheticErrors; OwnPtr<gfx::GLContext> m_glContext; + + // ANGLE related. + struct ShaderSourceEntry { + ShaderSourceEntry() + : type(0) + , source(0) + , log(0) + , translatedSource(0) + , isValid(false) + { + } + + ~ShaderSourceEntry() + { + if (source) + fastFree(source); + if (log) + fastFree(log); + if (translatedSource) + fastFree(translatedSource); + } + + unsigned long type; + char* source; + char* log; + char* translatedSource; + bool isValid; + }; + + bool angleCreateCompilers(); + void angleDestroyCompilers(); + bool angleValidateShaderSource(ShaderSourceEntry& entry); + + typedef HashMap<WebGLId, ShaderSourceEntry> ShaderSourceMap; + ShaderSourceMap m_shaderSourceMap; + + ShHandle m_fragmentCompiler; + ShHandle m_vertexCompiler; }; } // namespace WebKit diff --git a/WebKit/chromium/src/GLES2ContextInternal.cpp b/WebKit/chromium/src/WebIDBFactory.cpp index 33eb602..b186b68 100644..100755 --- a/WebKit/chromium/src/GLES2ContextInternal.cpp +++ b/WebKit/chromium/src/WebIDBFactory.cpp @@ -29,24 +29,24 @@ */ #include "config.h" +#include "WebIDBFactory.h" -#include "GLES2ContextInternal.h" +#if ENABLE(INDEXED_DATABASE) -#include "WebGLES2Context.h" +#include "IDBFactoryBackendImpl.h" +#include "SecurityOrigin.h" -namespace WebCore { +using namespace WebCore; -GLES2ContextInternal::GLES2ContextInternal(WebKit::WebGLES2Context* impl, bool owns) - : m_impl(impl) - , m_owns(owns) -{ -} +namespace WebKit { -GLES2ContextInternal::~GLES2ContextInternal() +WebString WebIDBFactory::databaseFileName(const WebString& name, const WebSecurityOrigin& origin) { - if (m_owns) - delete m_impl; + RefPtr<SecurityOrigin> securityOrigin; + securityOrigin = origin; + return IDBFactoryBackendImpl::databaseFileName(name, securityOrigin.get()); } -} // namespace WebCore +} +#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/WebIDBFactoryImpl.cpp b/WebKit/chromium/src/WebIDBFactoryImpl.cpp index 3c8d459..7147cf0 100755 --- a/WebKit/chromium/src/WebIDBFactoryImpl.cpp +++ b/WebKit/chromium/src/WebIDBFactoryImpl.cpp @@ -63,15 +63,6 @@ void WebIDBFactoryImpl::open(const WebString& name, const WebString& description m_idbFactoryBackend->open(name, description, IDBCallbacksProxy::create(callbacks), origin, 0, dataDir); } -void WebIDBFactoryImpl::abortPendingTransactions(const WebVector<int>& pendingIDs) -{ - WTF::Vector<int> ids(pendingIDs.size()); - for (size_t i = 0; i < pendingIDs.size(); ++i) - ids[i] = pendingIDs[i]; - - m_idbFactoryBackend->abortPendingTransactions(ids); -} - } // namespace WebKit #endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/WebIDBFactoryImpl.h b/WebKit/chromium/src/WebIDBFactoryImpl.h index 4dc0a10..a0a4d7d 100755 --- a/WebKit/chromium/src/WebIDBFactoryImpl.h +++ b/WebKit/chromium/src/WebIDBFactoryImpl.h @@ -43,7 +43,6 @@ public: virtual ~WebIDBFactoryImpl(); virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, const WebString& dataDir); - virtual void abortPendingTransactions(const WebVector<int>& pendingIDs); private: WTF::RefPtr<WebCore::IDBFactoryBackendInterface> m_idbFactoryBackend; diff --git a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp index 1ad1d9f..36d8ace 100755 --- a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp +++ b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp @@ -33,6 +33,7 @@ #include "WebIDBIndexImpl.h" #include "WebIDBKey.h" #include "WebIDBKeyRange.h" +#include "WebIDBTransaction.h" #include "WebSerializedScriptValue.h" #if ENABLE(INDEXED_DATABASE) @@ -65,9 +66,9 @@ WebDOMStringList WebIDBObjectStoreImpl::indexNames() const return m_objectStore->indexNames(); } -void WebIDBObjectStoreImpl::get(const WebIDBKey& key, WebIDBCallbacks* callbacks) +void WebIDBObjectStoreImpl::get(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction) { - m_objectStore->get(key, IDBCallbacksProxy::create(callbacks)); + m_objectStore->get(key, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface()); } void WebIDBObjectStoreImpl::put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks* callbacks) diff --git a/WebKit/chromium/src/WebIDBObjectStoreImpl.h b/WebKit/chromium/src/WebIDBObjectStoreImpl.h index 9f31369..a9f1200 100755 --- a/WebKit/chromium/src/WebIDBObjectStoreImpl.h +++ b/WebKit/chromium/src/WebIDBObjectStoreImpl.h @@ -47,7 +47,7 @@ public: WebString keyPath() const; WebDOMStringList indexNames() const; - void get(const WebIDBKey& key, WebIDBCallbacks*); + void get(const WebIDBKey& key, WebIDBCallbacks*, const WebIDBTransaction&); void put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks*); void remove(const WebIDBKey& key, WebIDBCallbacks*); diff --git a/WebKit/chromium/src/WebIDBTransactionImpl.cpp b/WebKit/chromium/src/WebIDBTransactionImpl.cpp index 0dc9702..f5d8748 100644 --- a/WebKit/chromium/src/WebIDBTransactionImpl.cpp +++ b/WebKit/chromium/src/WebIDBTransactionImpl.cpp @@ -64,6 +64,11 @@ void WebIDBTransactionImpl::abort() m_backend->abort(); } +void WebIDBTransactionImpl::didCompleteTaskEvents() +{ + m_backend->didCompleteTaskEvents(); +} + int WebIDBTransactionImpl::id() const { return m_backend->id(); @@ -75,6 +80,11 @@ void WebIDBTransactionImpl::setCallbacks(WebIDBTransactionCallbacks* callbacks) m_backend->setCallbacks(idbCallbacks.get()); } +IDBTransactionBackendInterface* WebIDBTransactionImpl::getIDBTransactionBackendInterface() const +{ + return m_backend.get(); +} + } // namespace WebKit #endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/WebIDBTransactionImpl.h b/WebKit/chromium/src/WebIDBTransactionImpl.h index a9bde68..24bab91 100644 --- a/WebKit/chromium/src/WebIDBTransactionImpl.h +++ b/WebKit/chromium/src/WebIDBTransactionImpl.h @@ -33,8 +33,6 @@ #include <wtf/PassRefPtr.h> #include <wtf/RefPtr.h> -namespace WebCore { class IDBTransactionBackendInterface; } - namespace WebKit { // See comment in WebIndexedDatabase for a high level overview these classes. @@ -46,9 +44,12 @@ public: virtual int mode() const; virtual WebIDBObjectStore* objectStore(const WebString& name); virtual void abort(); + virtual void didCompleteTaskEvents(); virtual int id() const; virtual void setCallbacks(WebIDBTransactionCallbacks*); + virtual WebCore::IDBTransactionBackendInterface* getIDBTransactionBackendInterface() const; + private: WTF::RefPtr<WebCore::IDBTransactionBackendInterface> m_backend; }; diff --git a/WebKit/chromium/src/WebInputElement.cpp b/WebKit/chromium/src/WebInputElement.cpp index 25d484c..7779dbc 100644 --- a/WebKit/chromium/src/WebInputElement.cpp +++ b/WebKit/chromium/src/WebInputElement.cpp @@ -75,11 +75,6 @@ bool WebInputElement::isEnabledFormControl() const return constUnwrap<HTMLInputElement>()->isEnabledFormControl(); } -WebInputElement::InputType WebInputElement::inputType() const -{ - return static_cast<InputType>(constUnwrap<HTMLInputElement>()->deprecatedInputType()); -} - int WebInputElement::maxLength() const { return constUnwrap<HTMLInputElement>()->maxLength(); diff --git a/WebKit/chromium/src/WebPerformance.cpp b/WebKit/chromium/src/WebPerformance.cpp new file mode 100644 index 0000000..f019793 --- /dev/null +++ b/WebKit/chromium/src/WebPerformance.cpp @@ -0,0 +1,160 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebPerformance.h" + +#include "Performance.h" + +using namespace WebCore; + +namespace WebKit { + +void WebPerformance::reset() +{ + m_private.reset(); +} + +void WebPerformance::assign(const WebPerformance& other) +{ + m_private = other.m_private; +} + +WebNavigationType WebPerformance::navigationType() const +{ + switch (m_private->navigation()->type()) { + case Navigation::NAVIGATE: + return WebNavigationTypeOther; + case Navigation::RELOAD: + return WebNavigationTypeReload; + case Navigation::BACK_FORWARD: + return WebNavigationTypeBackForward; + } + ASSERT_NOT_REACHED(); + return WebNavigationTypeOther; +} + +double WebPerformance::navigationStart() const +{ + return static_cast<double>(m_private->timing()->navigationStart()); +} + +double WebPerformance::unloadEventEnd() const +{ + return static_cast<double>(m_private->timing()->unloadEventEnd()); +} + +double WebPerformance::redirectStart() const +{ + return static_cast<double>(m_private->timing()->redirectStart()); +} + +double WebPerformance::redirectEnd() const +{ + return static_cast<double>(m_private->timing()->redirectEnd()); +} + +unsigned short WebPerformance::redirectCount() const +{ + return m_private->navigation()->redirectCount(); +} + +double WebPerformance::fetchStart() const +{ + return static_cast<double>(m_private->timing()->fetchStart()); +} + +double WebPerformance::domainLookupStart() const +{ + return static_cast<double>(m_private->timing()->domainLookupStart()); +} + +double WebPerformance::domainLookupEnd() const +{ + return static_cast<double>(m_private->timing()->domainLookupEnd()); +} + +double WebPerformance::connectStart() const +{ + return static_cast<double>(m_private->timing()->connectStart()); +} + +double WebPerformance::connectEnd() const +{ + return static_cast<double>(m_private->timing()->connectEnd()); +} + +double WebPerformance::requestStart() const +{ + return static_cast<double>(m_private->timing()->requestStart()); +} + +double WebPerformance::requestEnd() const +{ + return static_cast<double>(m_private->timing()->requestEnd()); +} + +double WebPerformance::responseStart() const +{ + return static_cast<double>(m_private->timing()->responseStart()); +} + +double WebPerformance::responseEnd() const +{ + return static_cast<double>(m_private->timing()->responseEnd()); +} + +double WebPerformance::loadEventStart() const +{ + return static_cast<double>(m_private->timing()->loadEventStart()); +} + +double WebPerformance::loadEventEnd() const +{ + return static_cast<double>(m_private->timing()->loadEventEnd()); +} + +WebPerformance::WebPerformance(const PassRefPtr<Performance>& performance) + : m_private(performance) +{ +} + +WebPerformance& WebPerformance::operator=(const PassRefPtr<Performance>& performance) +{ + m_private = performance; + return *this; +} + +WebPerformance::operator PassRefPtr<Performance>() const +{ + return m_private.get(); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebScriptController.cpp b/WebKit/chromium/src/WebScriptController.cpp index d2c168d..8877ba0 100644 --- a/WebKit/chromium/src/WebScriptController.cpp +++ b/WebKit/chromium/src/WebScriptController.cpp @@ -43,7 +43,7 @@ namespace WebKit { void WebScriptController::registerExtension(v8::Extension* extension) { - V8Proxy::registerExtension(extension, WebString()); + V8Proxy::registerExtension(extension); } void WebScriptController::registerExtension(v8::Extension* extension, diff --git a/WebKit/chromium/src/WebSettingsImpl.cpp b/WebKit/chromium/src/WebSettingsImpl.cpp index 329027c..9953b5c 100644 --- a/WebKit/chromium/src/WebSettingsImpl.cpp +++ b/WebKit/chromium/src/WebSettingsImpl.cpp @@ -289,4 +289,14 @@ void WebSettingsImpl::setMemoryInfoEnabled(bool enabled) m_settings->setMemoryInfoEnabled(enabled); } +void WebSettingsImpl::setHyperlinkAuditingEnabled(bool enabled) +{ + m_settings->setHyperlinkAuditingEnabled(enabled); +} + +void WebSettingsImpl::setCaretBrowsingEnabled(bool enabled) +{ + m_settings->setCaretBrowsingEnabled(enabled); +} + } // namespace WebKit diff --git a/WebKit/chromium/src/WebSettingsImpl.h b/WebKit/chromium/src/WebSettingsImpl.h index 0120dbc..6d40b4f 100644 --- a/WebKit/chromium/src/WebSettingsImpl.h +++ b/WebKit/chromium/src/WebSettingsImpl.h @@ -89,6 +89,8 @@ public: virtual void setAcceleratedCompositingEnabled(bool); virtual void setAccelerated2dCanvasEnabled(bool); virtual void setMemoryInfoEnabled(bool); + virtual void setHyperlinkAuditingEnabled(bool); + virtual void setCaretBrowsingEnabled(bool); private: WebCore::Settings* m_settings; diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp index a1c6578..c3df0c7 100644 --- a/WebKit/chromium/src/WebViewImpl.cpp +++ b/WebKit/chromium/src/WebViewImpl.cpp @@ -125,7 +125,7 @@ #if OS(WINDOWS) #include "RenderThemeChromiumWin.h" #else -#if OS(LINUX) +#if OS(LINUX) || OS(FREEBSD) #include "RenderThemeChromiumLinux.h" #endif #include "RenderTheme.h" @@ -429,7 +429,7 @@ void WebViewImpl::mouseDown(const WebMouseEvent& event) || (event.button == WebMouseEvent::ButtonLeft && event.modifiers & WebMouseEvent::ControlKey)) mouseContextMenu(event); -#elif OS(LINUX) +#elif OS(LINUX) || OS(FREEBSD) if (event.button == WebMouseEvent::ButtonRight) mouseContextMenu(event); #endif @@ -468,7 +468,7 @@ void WebViewImpl::mouseUp(const WebMouseEvent& event) if (!mainFrameImpl() || !mainFrameImpl()->frameView()) return; -#if OS(LINUX) +#if OS(LINUX) || OS(FREEBSD) // If the event was a middle click, attempt to copy text into the focused // frame. We execute this before we let the page have a go at the event // because the page may change what is focused during in its event handler. @@ -552,11 +552,11 @@ bool WebViewImpl::keyEvent(const WebKeyboardEvent& event) if (!handler) return keyEventDefault(event); -#if OS(WINDOWS) || OS(LINUX) +#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD) const WebInputEvent::Type contextMenuTriggeringEventType = #if OS(WINDOWS) WebInputEvent::KeyUp; -#elif OS(LINUX) +#elif OS(LINUX) || OS(FREEBSD) WebInputEvent::RawKeyDown; #endif @@ -700,7 +700,7 @@ bool WebViewImpl::touchEvent(const WebTouchEvent& event) } #endif -#if OS(WINDOWS) || OS(LINUX) +#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD) // Mac has no way to open a context menu based on a keyboard event. bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event) { @@ -925,7 +925,7 @@ void WebViewImpl::resize(const WebSize& newSize) m_client->didInvalidateRect(damagedRect); } -#if OS(DARWIN) +#if USE(ACCELERATED_COMPOSITING) && OS(DARWIN) if (m_layerRenderer) { m_layerRenderer->resizeOnscreenContent(WebCore::IntSize(std::max(1, m_size.width), std::max(1, m_size.height))); @@ -1041,8 +1041,6 @@ void WebViewImpl::composite(bool finish) #endif } -// FIXME: m_currentInputEvent should be removed once ChromeClient::show() can -// get the current-event information from WebCore. const WebInputEvent* WebViewImpl::m_currentInputEvent = 0; bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent) @@ -1057,6 +1055,8 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent) if (m_ignoreInputEvents) return true; + m_currentInputEvent = &inputEvent; + if (m_mouseCaptureNode.get() && WebInputEvent::isMouseEventType(inputEvent.type)) { // Save m_mouseCaptureNode since mouseCaptureLost() will clear it. RefPtr<Node> node = m_mouseCaptureNode; @@ -1086,17 +1086,10 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent) node->dispatchMouseEvent( PlatformMouseEventBuilder(mainFrameImpl()->frameView(), *static_cast<const WebMouseEvent*>(&inputEvent)), eventType); + m_currentInputEvent = 0; return true; } - // FIXME: Remove m_currentInputEvent. - // This only exists to allow ChromeClient::show() to know which mouse button - // triggered a window.open event. - // Safari must perform a similar hack, ours is in our WebKit glue layer - // theirs is in the application. This should go when WebCore can be fixed - // to pass more event information to ChromeClient::show() - m_currentInputEvent = &inputEvent; - bool handled = true; // FIXME: WebKit seems to always return false on mouse events processing @@ -1984,7 +1977,7 @@ void WebViewImpl::setDomainRelaxationForbidden(bool forbidden, const WebString& void WebViewImpl::setScrollbarColors(unsigned inactiveColor, unsigned activeColor, unsigned trackColor) { -#if OS(LINUX) +#if OS(LINUX) || OS(FREEBSD) PlatformThemeChromiumGtk::setScrollbarColors(inactiveColor, activeColor, trackColor); @@ -1995,7 +1988,7 @@ void WebViewImpl::setSelectionColors(unsigned activeBackgroundColor, unsigned activeForegroundColor, unsigned inactiveBackgroundColor, unsigned inactiveForegroundColor) { -#if OS(LINUX) +#if OS(LINUX) || OS(FREEBSD) RenderThemeChromiumLinux::setSelectionColors(activeBackgroundColor, activeForegroundColor, inactiveBackgroundColor, @@ -2022,7 +2015,8 @@ void WebView::addUserScript(const WebString& sourceCode, void WebView::addUserStyleSheet(const WebString& sourceCode, const WebVector<WebString>& patternsIn, - WebView::UserContentInjectIn injectIn) + WebView::UserContentInjectIn injectIn, + WebView::UserStyleInjectionTime injectionTime) { OwnPtr<Vector<String> > patterns(new Vector<String>); for (size_t i = 0; i < patternsIn.size(); ++i) @@ -2037,7 +2031,8 @@ void WebView::addUserStyleSheet(const WebString& sourceCode, // FIXME: It would be nice to populate the URL correctly, instead of passing an empty URL. pageGroup->addUserStyleSheetToWorld(world.get(), sourceCode, WebURL(), patterns.release(), 0, static_cast<UserContentInjectedFrames>(injectIn), - UserStyleSheet::AuthorLevel); + UserStyleAuthorLevel, + static_cast<WebCore::UserStyleInjectionTime>(injectionTime)); } void WebView::removeAllUserContent() @@ -2206,8 +2201,6 @@ void WebViewImpl::setRootGraphicsLayer(WebCore::PlatformLayer* layer) void WebViewImpl::setRootLayerNeedsDisplay() { - if (m_layerRenderer) - m_layerRenderer->setNeedsDisplay(); m_client->scheduleComposite(); // FIXME: To avoid breaking the downstream Chrome render_widget while downstream // changes land, we also have to pass a 1x1 invalidate up to the client @@ -2247,7 +2240,7 @@ void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect& // rects allows us to intermix invalidates with scrolls. IntRect damagedContentsRect; if (scrollDelta.width()) { - float dx = static_cast<float>(scrollDelta.width()); + int dx = scrollDelta.width(); damagedContentsRect.setY(contentRect.y()); damagedContentsRect.setHeight(contentRect.height()); if (dx > 0) { @@ -2258,7 +2251,7 @@ void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect& damagedContentsRect.setWidth(-dx); } } else { - float dy = static_cast<float>(scrollDelta.height()); + int dy = scrollDelta.height(); damagedContentsRect.setX(contentRect.x()); damagedContentsRect.setWidth(contentRect.width()); if (dy > 0) { @@ -2270,7 +2263,7 @@ void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect& } } - m_scrollDamage.unite(damagedContentsRect); + m_rootLayerScrollDamage.unite(damagedContentsRect); setRootLayerNeedsDisplay(); } @@ -2289,10 +2282,12 @@ void WebViewImpl::invalidateRootLayerRect(const IntRect& rect) // rect is in viewport space. Convert to content space // so that invalidations and scroll invalidations play well with one-another. - FloatRect contentRect = view->windowToContents(rect); + IntRect contentRect = view->windowToContents(rect); - // FIXME: add a smarter damage aggregation logic? Right now, LayerChromium does simple union-ing. - m_layerRenderer->rootLayer()->setNeedsDisplay(contentRect); + // FIXME: add a smarter damage aggregation logic and/or unify with + // LayerChromium's damage logic + m_rootLayerDirtyRect.unite(contentRect); + setRootLayerNeedsDisplay(); } @@ -2301,23 +2296,29 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active) if (m_isAcceleratedCompositingActive == active) return; - if (active) { - OwnPtr<GraphicsContext3D> context = m_temporaryOnscreenGraphicsContext3D.release(); - if (!context) { - context = GraphicsContext3D::create(GraphicsContext3D::Attributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow); - if (context) - context->reshape(std::max(1, m_size.width), std::max(1, m_size.height)); - } - m_layerRenderer = LayerRendererChromium::create(context.release()); - if (m_layerRenderer) { - m_isAcceleratedCompositingActive = true; - } else { - m_isAcceleratedCompositingActive = false; - m_compositorCreationFailed = true; - } + if (!active) { + m_isAcceleratedCompositingActive = false; + return; + } + + if (m_layerRenderer) { + m_isAcceleratedCompositingActive = true; + return; + } + + OwnPtr<GraphicsContext3D> context = m_temporaryOnscreenGraphicsContext3D.release(); + if (!context) { + context = GraphicsContext3D::create(GraphicsContext3D::Attributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow); + if (context) + context->reshape(std::max(1, m_size.width), std::max(1, m_size.height)); + } + m_layerRenderer = LayerRendererChromium::create(context.release()); + if (m_layerRenderer) { + m_isAcceleratedCompositingActive = true; + m_compositorCreationFailed = false; } else { - m_layerRenderer = 0; m_isAcceleratedCompositingActive = false; + m_compositorCreationFailed = true; } } @@ -2391,14 +2392,14 @@ void WebViewImpl::doComposite() m_layerRenderer->prepareToDrawLayers(visibleRect, contentRect, IntPoint(view->scrollX(), view->scrollY())); // Draw the contents of the root layer. - Vector<FloatRect> damageRects; - damageRects.append(m_scrollDamage); - damageRects.append(m_layerRenderer->rootLayer()->dirtyRect()); + Vector<IntRect> damageRects; + damageRects.append(m_rootLayerScrollDamage); + damageRects.append(m_rootLayerDirtyRect); for (size_t i = 0; i < damageRects.size(); ++i) { // The damage rect for the root layer is in content space [e.g. unscrolled]. // Convert from content space to viewPort space. - const FloatRect damagedContentRect = damageRects[i]; - IntRect damagedRect = view->contentsToWindow(IntRect(damagedContentRect)); + const IntRect damagedContentRect = damageRects[i]; + IntRect damagedRect = view->contentsToWindow(damagedContentRect); // Intersect this rectangle with the viewPort. damagedRect.intersect(viewPort); @@ -2409,8 +2410,8 @@ void WebViewImpl::doComposite() m_layerRenderer->updateRootLayerTextureRect(damagedRect); } } - m_layerRenderer->rootLayer()->resetNeedsDisplay(); - m_scrollDamage = WebRect(); + m_rootLayerDirtyRect = IntRect(); + m_rootLayerScrollDamage = IntRect(); // Draw the actual layers... m_layerRenderer->drawLayers(visibleRect, contentRect); @@ -2431,32 +2432,28 @@ SharedGraphicsContext3D* WebViewImpl::getSharedGraphicsContext3D() return m_sharedContext3D.get(); } -WebGLES2Context* WebViewImpl::gles2Context() -{ - return 0; -} - WebGraphicsContext3D* WebViewImpl::graphicsContext3D() { #if USE(ACCELERATED_COMPOSITING) - GraphicsContext3D* context = 0; - if (m_layerRenderer) - context = m_layerRenderer->context(); - else if (m_temporaryOnscreenGraphicsContext3D) - context = m_temporaryOnscreenGraphicsContext3D.get(); - else { - GraphicsContext3D::Attributes attributes; - m_temporaryOnscreenGraphicsContext3D = GraphicsContext3D::create(GraphicsContext3D::Attributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow); + if (m_page->settings()->acceleratedCompositingEnabled() && allowsAcceleratedCompositing()) { + GraphicsContext3D* context = 0; + if (m_layerRenderer) + context = m_layerRenderer->context(); + else if (m_temporaryOnscreenGraphicsContext3D) + context = m_temporaryOnscreenGraphicsContext3D.get(); + else { + GraphicsContext3D::Attributes attributes; + m_temporaryOnscreenGraphicsContext3D = GraphicsContext3D::create(GraphicsContext3D::Attributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow); #if OS(DARWIN) - if (m_temporaryOnscreenGraphicsContext3D) - m_temporaryOnscreenGraphicsContext3D->reshape(std::max(1, m_size.width), std::max(1, m_size.height)); + if (m_temporaryOnscreenGraphicsContext3D) + m_temporaryOnscreenGraphicsContext3D->reshape(std::max(1, m_size.width), std::max(1, m_size.height)); #endif - context = m_temporaryOnscreenGraphicsContext3D.get(); + context = m_temporaryOnscreenGraphicsContext3D.get(); + } + return GraphicsContext3DInternal::extractWebGraphicsContext3D(context); } - return GraphicsContext3DInternal::extractWebGraphicsContext3D(context); -#else - return 0; #endif + return 0; } } // namespace WebKit diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h index bbd25a2..9db914d 100644 --- a/WebKit/chromium/src/WebViewImpl.h +++ b/WebKit/chromium/src/WebViewImpl.h @@ -317,9 +317,8 @@ public: void hideAutoFillPopup(); - // HACK: currentInputEvent() is for ChromeClientImpl::show(), until we can - // fix WebKit to pass enough information up into ChromeClient::show() so we - // can decide if the window.open event was caused by a middle-mouse click + // Returns the input event we're currently processing. This is used in some + // cases where the WebCore DOM event doesn't have the information we need. static const WebInputEvent* currentInputEvent() { return m_currentInputEvent; @@ -332,9 +331,6 @@ public: void scrollRootLayerRect(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& clipRect); void invalidateRootLayerRect(const WebCore::IntRect&); #endif - // FIXME: remove this method once the compositor is fully switched - // over to GraphicsContext3D. - virtual WebGLES2Context* gles2Context(); // Returns the onscreen 3D context used by the compositor. This is // used by the renderer's code to set up resource sharing between @@ -526,8 +522,9 @@ private: RefPtr<WebCore::Node> m_mouseCaptureNode; #if USE(ACCELERATED_COMPOSITING) - WebCore::IntRect m_scrollDamage; - OwnPtr<WebCore::LayerRendererChromium> m_layerRenderer; + WebCore::IntRect m_rootLayerDirtyRect; + WebCore::IntRect m_rootLayerScrollDamage; + RefPtr<WebCore::LayerRendererChromium> m_layerRenderer; bool m_isAcceleratedCompositingActive; bool m_compositorCreationFailed; #endif diff --git a/WebKit/chromium/src/WebWorkerBase.cpp b/WebKit/chromium/src/WebWorkerBase.cpp index 42f41d2..622f5c2 100644 --- a/WebKit/chromium/src/WebWorkerBase.cpp +++ b/WebKit/chromium/src/WebWorkerBase.cpp @@ -37,6 +37,7 @@ #include "PlatformMessagePortChannel.h" #include "WebDataSourceImpl.h" +#include "WebFileError.h" #include "WebFrameClient.h" #include "WebFrameImpl.h" #include "WebMessagePortChannel.h" @@ -45,6 +46,8 @@ #include "WebView.h" #include "WebWorkerClient.h" +#include "WorkerContext.h" +#include "WorkerFileSystemCallbacksBridge.h" #include "WorkerScriptController.h" #include "WorkerThread.h" #include <wtf/MainThread.h> @@ -56,6 +59,7 @@ namespace WebKit { #if ENABLE(WORKERS) static const char allowDatabaseMode[] = "allowDatabaseMode"; +static const char openFileSystemMode[] = "openFileSystemMode"; namespace { @@ -114,6 +118,7 @@ private: WebWorkerBase* m_worker; WTF::String m_mode; }; + } // This function is called on the main thread to force to initialize some static @@ -231,6 +236,17 @@ bool WebWorkerBase::allowDatabase(WebFrame*, const WebString& name, const WebStr return bridge->result(); } +#if ENABLE(FILE_SYSTEM) +void WebWorkerBase::openFileSystem(WebFileSystem::Type type, long long size, WebFileSystemCallbacks* callbacks) +{ + WorkerScriptController* controller = WorkerScriptController::controllerForContext(); + WorkerContext* workerContext = controller->workerContext(); + + RefPtr<WorkerFileSystemCallbacksBridge> bridge = WorkerFileSystemCallbacksBridge::create(this, workerContext, callbacks); + bridge->postOpenFileSystemToMainThread(commonClient(), type, size, openFileSystemMode); +} +#endif + // WorkerObjectProxy ----------------------------------------------------------- void WebWorkerBase::postMessageToWorkerObject(PassRefPtr<SerializedScriptValue> message, diff --git a/WebKit/chromium/src/WebWorkerBase.h b/WebKit/chromium/src/WebWorkerBase.h index 22711f9..1f4bc03 100644 --- a/WebKit/chromium/src/WebWorkerBase.h +++ b/WebKit/chromium/src/WebWorkerBase.h @@ -91,6 +91,11 @@ public: // Controls whether access to Web Databases is allowed for this worker. virtual bool allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize); +#if ENABLE(FILE_SYSTEM) + // Requests to open a file system for this worker. (Note that this is not the implementation for WebFrameClient::openFileSystem.) + void openFileSystem(WebFileSystem::Type, long long size, WebFileSystemCallbacks*); +#endif + // Executes the given task on the main thread. static void dispatchTaskToMainThread(PassOwnPtr<WebCore::ScriptExecutionContext::Task>); diff --git a/WebKit/chromium/src/WebWorkerClientImpl.h b/WebKit/chromium/src/WebWorkerClientImpl.h index 741d606..0604823 100644 --- a/WebKit/chromium/src/WebWorkerClientImpl.h +++ b/WebKit/chromium/src/WebWorkerClientImpl.h @@ -33,8 +33,8 @@ #if ENABLE(WORKERS) +#include "WebFileSystem.h" #include "WebWorkerClient.h" - #include "WorkerContextProxy.h" #include <wtf/PassOwnPtr.h> #include <wtf/RefPtr.h> @@ -99,6 +99,10 @@ public: ASSERT_NOT_REACHED(); return true; } + virtual void openFileSystem(WebFrame*, WebFileSystem::Type, long long size, WebFileSystemCallbacks*) + { + ASSERT_NOT_REACHED(); + } private: virtual ~WebWorkerClientImpl(); diff --git a/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp b/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp new file mode 100644 index 0000000..d112886 --- /dev/null +++ b/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp @@ -0,0 +1,190 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WorkerFileSystemCallbacksBridge.h" + +#if ENABLE(FILE_SYSTEM) + +#include "CrossThreadTask.h" +#include "WebCommonWorkerClient.h" +#include "WebFileSystemCallbacks.h" +#include "WebString.h" +#include "WebWorkerBase.h" +#include "WorkerContext.h" +#include "WorkerScriptController.h" +#include "WorkerThread.h" +#include <wtf/MainThread.h> +#include <wtf/Threading.h> + +using namespace WebCore; + +namespace WebKit { + +// FileSystemCallbacks that are to be dispatched on the main thread. +class MainThreadFileSystemCallbacks : public WebFileSystemCallbacks { +public: + static PassOwnPtr<MainThreadFileSystemCallbacks> create(PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, const String& mode) + { + return adoptPtr(new MainThreadFileSystemCallbacks(bridge, mode)); + } + + virtual ~MainThreadFileSystemCallbacks() + { + } + + virtual void didOpenFileSystem(const WebString& name, const WebString& path) + { + m_bridge->didOpenFileSystemOnMainThread(name, path, m_mode); + delete this; + } + + virtual void didFail(WebFileError error) + { + m_bridge->didFailOnMainThread(error, m_mode); + delete this; + } + + virtual void didSucceed() + { + WEBKIT_ASSERT_NOT_REACHED(); + } + + virtual void didReadMetadata(const WebFileInfo& info) + { + WEBKIT_ASSERT_NOT_REACHED(); + } + + virtual void didReadDirectory(const WebVector<WebFileSystemEntry>& entries, bool hasMore) + { + WEBKIT_ASSERT_NOT_REACHED(); + } + +private: + MainThreadFileSystemCallbacks(PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, const String& mode) + : m_bridge(bridge) + , m_mode(mode) + { + ASSERT(m_bridge.get()); + } + + friend class WorkerFileSystemCallbacksBridge; + RefPtr<WorkerFileSystemCallbacksBridge> m_bridge; + const String m_mode; +}; + +void WorkerFileSystemCallbacksBridge::stop() +{ + ASSERT(m_workerContext->isContextThread()); + MutexLocker locker(m_mutex); + m_worker = 0; + + if (m_callbacksOnWorkerThread) { + m_callbacksOnWorkerThread->didFail(WebFileErrorAbort); + m_callbacksOnWorkerThread = 0; + } +} + +void WorkerFileSystemCallbacksBridge::postOpenFileSystemToMainThread(WebCommonWorkerClient* commonClient, WebFileSystem::Type type, long long size, const String& mode) +{ + m_selfRef = this; + ASSERT(m_workerContext->isContextThread()); + ASSERT(m_worker); + m_worker->dispatchTaskToMainThread(createCallbackTask(&openFileSystemOnMainThread, commonClient, type, size, this, mode)); +} + +void WorkerFileSystemCallbacksBridge::openFileSystemOnMainThread(ScriptExecutionContext*, WebCommonWorkerClient* commonClient, WebFileSystem::Type type, long long size, WorkerFileSystemCallbacksBridge* bridge, const String& mode) +{ + ASSERT(isMainThread()); + if (!commonClient) + bridge->didFailOnMainThread(WebFileErrorAbort, mode); + else { + // MainThreadFileSystemCallbacks is self-destructed, so we leak ptr here. + commonClient->openFileSystem(type, size, MainThreadFileSystemCallbacks::create(bridge, mode).leakPtr()); + } +} + +void WorkerFileSystemCallbacksBridge::didFailOnMainThread(WebFileError error, const String& mode) +{ + ASSERT(isMainThread()); + mayPostTaskToWorker(createCallbackTask(&didFailOnWorkerThread, m_selfRef, error), mode); +} + +void WorkerFileSystemCallbacksBridge::didOpenFileSystemOnMainThread(const String& name, const String& rootPath, const String& mode) +{ + ASSERT(isMainThread()); + mayPostTaskToWorker(createCallbackTask(&didOpenFileSystemOnWorkerThread, m_selfRef, name, rootPath), mode); +} + +WorkerFileSystemCallbacksBridge::WorkerFileSystemCallbacksBridge(WebWorkerBase* worker, ScriptExecutionContext* scriptExecutionContext, WebFileSystemCallbacks* callbacks) + : WorkerContext::Observer(static_cast<WorkerContext*>(scriptExecutionContext)) + , m_worker(worker) + , m_workerContext(scriptExecutionContext) + , m_callbacksOnWorkerThread(callbacks) +{ + ASSERT(m_workerContext->isContextThread()); +} + +WorkerFileSystemCallbacksBridge::~WorkerFileSystemCallbacksBridge() +{ + ASSERT(!m_callbacksOnWorkerThread); +} + +void WorkerFileSystemCallbacksBridge::didFailOnWorkerThread(ScriptExecutionContext*, PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, WebFileError error) +{ + if (bridge->m_callbacksOnWorkerThread) { + ASSERT(bridge->m_workerContext->isContextThread()); + bridge->m_callbacksOnWorkerThread->didFail(error); + bridge->m_callbacksOnWorkerThread = 0; + } +} + +void WorkerFileSystemCallbacksBridge::didOpenFileSystemOnWorkerThread(ScriptExecutionContext*, PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, const String& name, const String& rootPath) +{ + if (bridge->m_callbacksOnWorkerThread) { + ASSERT(bridge->m_workerContext->isContextThread()); + bridge->m_callbacksOnWorkerThread->didOpenFileSystem(name, rootPath); + bridge->m_callbacksOnWorkerThread = 0; + } +} + +void WorkerFileSystemCallbacksBridge::mayPostTaskToWorker(PassOwnPtr<ScriptExecutionContext::Task> task, const String& mode) +{ + { // Let go of the mutex before possibly deleting this due to m_selfRef.clear(). + MutexLocker locker(m_mutex); + if (m_worker) + m_worker->postTaskForModeToWorkerContext(task, mode); + } + m_selfRef.clear(); +} + +} // namespace WebCore + +#endif // ENABLE(FILE_SYSTEM) diff --git a/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h b/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h new file mode 100644 index 0000000..899127e --- /dev/null +++ b/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h @@ -0,0 +1,122 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WorkerFileSystemCallbacksBridge_h +#define WorkerFileSystemCallbacksBridge_h + +#if ENABLE(FILE_SYSTEM) + +#include "PlatformString.h" +#include "ScriptExecutionContext.h" +#include "WebFileError.h" +#include "WebFileSystem.h" +#include "WebVector.h" +#include "WorkerContext.h" +#include <wtf/PassOwnPtr.h> +#include <wtf/PassRefPtr.h> +#include <wtf/Threading.h> + +namespace WebKit { + +class AsyncFileSystem; +class MainThreadFileSystemCallbacks; +class ThreadableCallbacksBridgeWrapper; +class WebCommonWorkerClient; +class WebFileSystemCallbacks; +class WebWorkerBase; +struct WebFileInfo; +struct WebFileSystemEntry; + +// This class is used to post a openFileSystem request to the main thread and get called back for the request. This must be destructed on the worker thread. +// +// A typical flow for openFileSystem would look like this: +// Bridge::postOpenFileSystemToMainThread() on WorkerThread +// --> Bridge::openFileSystemOnMainThread() is called on MainThread +// This makes an IPC with a MainThreadFileSystemCallbacks instance +// [actual operation is down in the browser] +// --> MainThreadFileSystemCallbacks::didXxx is called on MainThread +// --> Bridge::didXxxOnMainThread is called on MainThread +// --> Bridge::didXxxOnWorkerThread is called on WorkerThread +// This calls the original callbacks (m_callbacksOnWorkerThread) and +// releases a self-reference to the bridge. +class WorkerFileSystemCallbacksBridge : public ThreadSafeShared<WorkerFileSystemCallbacksBridge>, public WebCore::WorkerContext::Observer { +public: + static PassRefPtr<WorkerFileSystemCallbacksBridge> create(WebWorkerBase* worker, WebCore::ScriptExecutionContext* workerContext, WebFileSystemCallbacks* callbacks) + { + return WTF::adoptRef(new WorkerFileSystemCallbacksBridge(worker, workerContext, callbacks)); + } + ~WorkerFileSystemCallbacksBridge(); + + // WorkerContext::Observer method. + virtual void notifyStop() + { + stop(); + } + + void stop(); + + // Posts an initial request task to the main thread. It is supposed to be called immediately after the bridge is constructed. (It doesn't check if the context has been stopped or not.) + void postOpenFileSystemToMainThread(WebCommonWorkerClient*, WebFileSystem::Type, long long size, const String& mode); + + // Callback methods that are called on the main thread. + void didFailOnMainThread(WebFileError, const String& mode); + void didOpenFileSystemOnMainThread(const String& name, const String& rootPath, const String& mode); + +private: + WorkerFileSystemCallbacksBridge(WebWorkerBase*, WebCore::ScriptExecutionContext*, WebFileSystemCallbacks*); + + // Method that is to be called on the main thread. + static void openFileSystemOnMainThread(WebCore::ScriptExecutionContext*, WebCommonWorkerClient*, WebFileSystem::Type, long long size, WorkerFileSystemCallbacksBridge*, const String& mode); + + friend class MainThreadFileSystemCallbacks; + + // Methods that dispatch WebFileSystemCallbacks on the worker threads. + // They release a selfRef of the WorkerFileSystemCallbacksBridge. + static void didFailOnWorkerThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileSystemCallbacksBridge>, WebFileError); + static void didOpenFileSystemOnWorkerThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileSystemCallbacksBridge>, const String& name, const String& rootPath); + + void mayPostTaskToWorker(PassOwnPtr<WebCore::ScriptExecutionContext::Task>, const String& mode); + + // m_selfRef keeps a reference to itself until a task is created for the worker thread (at which point the task holds the reference). + RefPtr<WorkerFileSystemCallbacksBridge> m_selfRef; + + Mutex m_mutex; + WebWorkerBase* m_worker; + WebCore::ScriptExecutionContext* m_workerContext; + + // This is self-destructed and must be fired on the worker thread. + WebFileSystemCallbacks* m_callbacksOnWorkerThread; +}; + +} // namespace WebCore + +#endif + +#endif // WorkerFileSystemCallbacksBridge_h diff --git a/WebKit/chromium/src/gtk/WebInputEventFactory.cpp b/WebKit/chromium/src/gtk/WebInputEventFactory.cpp index f8a1386..0d55c43 100644 --- a/WebKit/chromium/src/gtk/WebInputEventFactory.cpp +++ b/WebKit/chromium/src/gtk/WebInputEventFactory.cpp @@ -85,6 +85,10 @@ static int gdkStateToWebEventModifiers(guint state) modifiers |= WebInputEvent::MiddleButtonDown; if (state & GDK_BUTTON3_MASK) modifiers |= WebInputEvent::RightButtonDown; + if (state & GDK_LOCK_MASK) + modifiers |= WebInputEvent::CapsLockOn; + if (state & GDK_MOD2_MASK) + modifiers |= WebInputEvent::NumLockOn; return modifiers; } diff --git a/WebKit/chromium/src/gtk/WebScreenInfoFactory.cpp b/WebKit/chromium/src/gtk/WebScreenInfoFactory.cpp deleted file mode 100644 index 081daa2..0000000 --- a/WebKit/chromium/src/gtk/WebScreenInfoFactory.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebScreenInfoFactory.h" - -#include "WebScreenInfo.h" -#include <gtk/gtk.h> - -namespace WebKit { - -WebScreenInfo WebScreenInfoFactory::screenInfo(GtkWidget* widget) -{ - WebScreenInfo results; - results.depth = 32; - results.depthPerComponent = 8; - results.isMonochrome = false; - - if (!widget) - return results; - - GdkScreen* screen = gtk_widget_get_screen(widget); - - results.rect = WebRect( - 0, 0, gdk_screen_get_width(screen), gdk_screen_get_height(screen)); - - // I don't know of a way to query the "maximize" size of the window (e.g. - // screen size less sidebars etc) since this is something which only the - // window manager knows. - results.availableRect = results.rect; - - return results; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js index 0c7241d..a66e174 100644 --- a/WebKit/chromium/src/js/DevTools.js +++ b/WebKit/chromium/src/js/DevTools.js @@ -45,7 +45,7 @@ var context = {}; // Used by WebCore's inspector routines. Preferences.profilerAlwaysEnabled = true; Preferences.canEditScriptSource = true; Preferences.onlineDetectionEnabled = false; - Preferences.domBreakpointsEnabled = true; + Preferences.nativeInstrumentationEnabled = true; })(); var devtools = devtools || {}; diff --git a/WebKit/chromium/src/win/WebInputEventFactory.cpp b/WebKit/chromium/src/win/WebInputEventFactory.cpp index d1d5869..c71a3b6 100644 --- a/WebKit/chromium/src/win/WebInputEventFactory.cpp +++ b/WebKit/chromium/src/win/WebInputEventFactory.cpp @@ -86,6 +86,16 @@ static bool isKeyPad(WPARAM wparam, LPARAM lparam) return keypad; } +// Loads the state for toggle keys into the event. +static void SetToggleKeyState(WebInputEvent* event) +{ + // Low bit set from GetKeyState indicates "toggled". + if (::GetKeyState(VK_NUMLOCK) & 1) + event->modifiers |= WebInputEvent::NumLockOn; + if (::GetKeyState(VK_CAPITAL) & 1) + event->modifiers |= WebInputEvent::CapsLockOn; +} + WebKeyboardEvent WebInputEventFactory::keyboardEvent(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { @@ -144,6 +154,7 @@ WebKeyboardEvent WebInputEventFactory::keyboardEvent(HWND hwnd, UINT message, if (isKeyPad(wparam, lparam)) result.modifiers |= WebInputEvent::IsKeyPad; + SetToggleKeyState(&result); return result; } @@ -289,6 +300,7 @@ WebMouseEvent WebInputEventFactory::mouseEvent(HWND hwnd, UINT message, if (wparam & MK_RBUTTON) result.modifiers |= WebInputEvent::RightButtonDown; + SetToggleKeyState(&result); return result; } @@ -386,6 +398,8 @@ WebMouseWheelEvent WebInputEventFactory::mouseWheelEvent(HWND hwnd, UINT message if (keyState & MK_RBUTTON) result.modifiers |= WebInputEvent::RightButtonDown; + SetToggleKeyState(&result); + // Set coordinates by translating event coordinates from screen to client. POINT clientPoint = { result.globalX, result.globalY }; MapWindowPoints(0, hwnd, &clientPoint, 1); diff --git a/WebKit/efl/CMakeListsEfl.txt b/WebKit/efl/CMakeListsEfl.txt index 8b77260..c154b66 100644 --- a/WebKit/efl/CMakeListsEfl.txt +++ b/WebKit/efl/CMakeListsEfl.txt @@ -88,8 +88,11 @@ IF (WTF_USE_CURL) LIST(APPEND WebKit_LIBRARIES ${CURL_LIBRARIES}) ENDIF () -FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/WebKit/efl/DefaultTheme) -SET(WebKit_THEME ${CMAKE_BINARY_DIR}/WebKit/efl/DefaultTheme/default.edj) +SET(BUILD_DATA_DIR ${CMAKE_BINARY_DIR}/WebKit/efl/DefaultTheme) +SET(BUILD_DATA_DIR ${BUILD_DATA_DIR} PARENT_SCOPE) +FILE(MAKE_DIRECTORY ${BUILD_DATA_DIR}) + +SET(WebKit_THEME ${BUILD_DATA_DIR}/default.edj) ADD_CUSTOM_COMMAND( OUTPUT ${WebKit_THEME} COMMAND ${EDJE_CC_EXECUTABLE} -v -id ${WEBKIT_DIR}/efl/DefaultTheme ${WEBKIT_DIR}/efl/DefaultTheme/default.edc ${WebKit_THEME} diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog index 879a1af..7c6afe9 100644 --- a/WebKit/efl/ChangeLog +++ b/WebKit/efl/ChangeLog @@ -1,3 +1,66 @@ +2010-09-28 Jenn Braithwaite <jennb@chromium.org> + + Reviewed by Dmitry Titov. + + Added oldPage param to FrameLoaderClient::didTransferChildFrameToNewDocument. + https://bugs.webkit.org/show_bug.cgi?id=46663 + + * WebCoreSupport/FrameLoaderClientEfl.cpp: + (WebCore::FrameLoaderClientEfl::didTransferChildFrameToNewDocument): + * WebCoreSupport/FrameLoaderClientEfl.h: + +2010-09-26 Gyuyoung Kim <gyuyoung.kim@samsung.com> + + Reviewed by Antonio Gomes. + + [EFL] Add setting API to set a local storage database path. + https://bugs.webkit.org/show_bug.cgi?id=45446 + + Add a setting API to set local storage database path. + + * ewk/ewk_view.cpp: + (_ewk_view_priv_new): + (_ewk_view_priv_del): + (ewk_view_setting_local_storage_database_path_get): Added. + (ewk_view_setting_local_storage_database_path_set): Added. + * ewk/ewk_view.h: + +2010-09-23 Lucas De Marchi <lucas.demarchi@profusion.mobi> + + Reviewed by Csaba Osztrogonác. + + [EFL] Fix warnings during build + https://bugs.webkit.org/show_bug.cgi?id=46354 + + * ewk/ewk_frame.cpp: + (ewk_frame_text_matches_nth_pos_get): Change argument type because + it's meant to be always positive. + * ewk/ewk_frame.h: Ditto. + * ewk/ewk_view.cpp: + (ewk_view_exceeded_database_quota): Add missing "%" causing warning about number of + arguments to printf-like function. + * ewk/ewk_view.h: Add missing initialization. + +2010-09-21 Lucas De Marchi <lucas.demarchi@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + [EFL] Get fresh theme when running EWebLauncher + https://bugs.webkit.org/show_bug.cgi?id=46210 + + If user tried to run EWebLauncher outside of the build tree, it would + not find the theme and fallback to the installed one. However, since + EWebLauncher is not installed, we always want to take the theme from + the just compiled source code. If user had never installed WebKit's + EFL port it could even receive a segv since no theme would be found. + + Now EWebLauncher does not fallback to the installed theme and CMake + gives as DATA_DIR the directory of the theme it has just built. + + + * CMakeListsEfl.txt: export DATA_DIR to parent CMakeLists.txt in order + to be used by EWebLauncher. + 2010-09-17 Darin Adler <darin@apple.com> Reviewed by Sam Weinig. diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp index 056687c..2d452d8 100644 --- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp +++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp @@ -46,6 +46,7 @@ #include "Language.h" #include "MIMETypeRegistry.h" #include "NotImplemented.h" +#include "Page.h" #include "PluginDatabase.h" #include "ProgressTracker.h" #include "RenderPart.h" @@ -379,7 +380,7 @@ PassRefPtr<Frame> FrameLoaderClientEfl::createFrame(const KURL& url, const Strin return ewk_view_frame_create(m_view, m_frame, name, ownerElement, url, referrer); } -void FrameLoaderClientEfl::didTransferChildFrameToNewDocument() +void FrameLoaderClientEfl::didTransferChildFrameToNewDocument(Page*) { } diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h index 68f145d..2b4414a 100644 --- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h +++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h @@ -137,7 +137,7 @@ class FrameLoaderClientEfl : public FrameLoaderClient { virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); - virtual void didTransferChildFrameToNewDocument(); + virtual void didTransferChildFrameToNewDocument(Page*); virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const WTF::Vector<String>&, const WTF::Vector<String>&, const String&, bool); virtual void redirectDataToPlugin(Widget* pluginWidget); diff --git a/WebKit/efl/ewk/ewk_frame.cpp b/WebKit/efl/ewk/ewk_frame.cpp index 038e105..1395fa5 100644 --- a/WebKit/efl/ewk/ewk_frame.cpp +++ b/WebKit/efl/ewk/ewk_frame.cpp @@ -847,7 +847,7 @@ static bool _ewk_frame_rect_is_negative_value(const WebCore::IntRect& i) * @return @c EINA_TRUE on success, @c EINA_FALSE for failure - when no matches found or * n bigger than search results. */ -Eina_Bool ewk_frame_text_matches_nth_pos_get(Evas_Object* o, int n, int* x, int* y) +Eina_Bool ewk_frame_text_matches_nth_pos_get(Evas_Object* o, size_t n, int* x, int* y) { EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); diff --git a/WebKit/efl/ewk/ewk_frame.h b/WebKit/efl/ewk/ewk_frame.h index 9394446..156bd82 100644 --- a/WebKit/efl/ewk/ewk_frame.h +++ b/WebKit/efl/ewk/ewk_frame.h @@ -160,7 +160,7 @@ EAPI unsigned int ewk_frame_text_matches_mark(Evas_Object *o, const char *string EAPI Eina_Bool ewk_frame_text_matches_unmark_all(Evas_Object *o); EAPI Eina_Bool ewk_frame_text_matches_highlight_set(Evas_Object *o, Eina_Bool highlight); EAPI Eina_Bool ewk_frame_text_matches_highlight_get(const Evas_Object *o); -EAPI Eina_Bool ewk_frame_text_matches_nth_pos_get(Evas_Object *o, int n, int *x, int *y); +EAPI Eina_Bool ewk_frame_text_matches_nth_pos_get(Evas_Object *o, size_t n, int *x, int *y); EAPI Eina_Bool ewk_frame_stop(Evas_Object *o); EAPI Eina_Bool ewk_frame_reload(Evas_Object *o); diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp index 76e4bf5..19efbfa 100644 --- a/WebKit/efl/ewk/ewk_view.cpp +++ b/WebKit/efl/ewk/ewk_view.cpp @@ -91,6 +91,7 @@ struct _Ewk_View_Private_Data { const char* encoding_custom; const char* cache_directory; const char* theme; + const char* local_storage_database_path; int font_minimum_size; int font_minimum_logical_size; int font_default_size; @@ -579,6 +580,9 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd) priv->settings.cache_directory = eina_stringshare_add (WebCore::cacheStorage().cacheDirectory().utf8().data()); + s = priv->page_settings->localStorageDatabasePath(); + priv->settings.local_storage_database_path = eina_stringshare_add(s.string().utf8().data()); + priv->settings.font_minimum_size = priv->page_settings->minimumFontSize(); priv->settings.font_minimum_logical_size = priv->page_settings->minimumLogicalFontSize(); priv->settings.font_default_size = priv->page_settings->defaultFontSize(); @@ -662,6 +666,7 @@ static void _ewk_view_priv_del(Ewk_View_Private_Data* priv) eina_stringshare_del(priv->settings.font_fantasy); eina_stringshare_del(priv->settings.font_serif); eina_stringshare_del(priv->settings.font_sans_serif); + eina_stringshare_del(priv->settings.local_storage_database_path); if (priv->animated_zoom.animator) ecore_animator_del(priv->animated_zoom.animator); @@ -2784,6 +2789,36 @@ Eina_Bool ewk_view_setting_page_cache_set(Evas_Object* o, Eina_Bool enable) return EINA_TRUE; } +/* + * Gets the local storage database path. + * + * @param o view object to get the local storage database path. + * @return the local storage database path. + */ +const char* ewk_view_setting_local_storage_database_path_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + return priv->settings.local_storage_database_path; +} + +/** + * Sets the local storage database path. + * + * @param o view object to set the local storage database path. + * @return @c EINA_TRUE on success and @c EINA_FALSE on failure + */ +Eina_Bool ewk_view_setting_local_storage_database_path_set(Evas_Object* o, const char* path) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + if (eina_stringshare_replace(&priv->settings.local_storage_database_path, path)) { + WTF::AtomicString s = WTF::String::fromUTF8(path); + priv->page_settings->setLocalStorageDatabasePath(s); + } + return EINA_TRUE; +} + /** * Similar to evas_object_smart_data_get(), but does type checking. * @@ -3769,7 +3804,7 @@ uint64_t ewk_view_exceeded_database_quota(Evas_Object* o, Evas_Object* frame, co if (!sd->api->exceeded_database_quota) return 0; - INF("current_size=%"PRIu64" expected_size="PRIu64, current_size, expected_size); + INF("current_size=%"PRIu64" expected_size=%"PRIu64, current_size, expected_size); return sd->api->exceeded_database_quota(sd, frame, databaseName, current_size, expected_size); } diff --git a/WebKit/efl/ewk/ewk_view.h b/WebKit/efl/ewk/ewk_view.h index be27f68..26bf97c 100644 --- a/WebKit/efl/ewk/ewk_view.h +++ b/WebKit/efl/ewk/ewk_view.h @@ -151,7 +151,7 @@ struct _Ewk_View_Smart_Class { * @see EWK_VIEW_SMART_CLASS_INIT_VERSION * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION */ -#define EWK_VIEW_SMART_CLASS_INIT(smart_class_init) {smart_class_init, EWK_VIEW_SMART_CLASS_VERSION, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +#define EWK_VIEW_SMART_CLASS_INIT(smart_class_init) {smart_class_init, EWK_VIEW_SMART_CLASS_VERSION, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} /** * Initializer to zero a whole Ewk_View_Smart_Class structure. @@ -449,6 +449,8 @@ EAPI Eina_Bool ewk_view_setting_spatial_navigation_set(Evas_Object* o, Eina_B EAPI Eina_Bool ewk_view_setting_local_storage_get(Evas_Object* o); EAPI Eina_Bool ewk_view_setting_local_storage_set(Evas_Object* o, Eina_Bool enable); +EAPI const char *ewk_view_setting_local_storage_database_path_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_local_storage_database_path_set(Evas_Object *o, const char *path); EAPI Eina_Bool ewk_view_setting_page_cache_get(Evas_Object* o); EAPI Eina_Bool ewk_view_setting_page_cache_set(Evas_Object* o, Eina_Bool enable); diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog index 16f4063..c602ac1 100644 --- a/WebKit/gtk/ChangeLog +++ b/WebKit/gtk/ChangeLog @@ -1,3 +1,192 @@ +2010-09-28 Jenn Braithwaite <jennb@chromium.org> + + Reviewed by Dmitry Titov. + + Added oldPage param to FrameLoaderClient::didTransferChildFrameToNewDocument. + https://bugs.webkit.org/show_bug.cgi?id=46663 + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::didTransferChildFrameToNewDocument): + * WebCoreSupport/FrameLoaderClientGtk.h: + +2010-09-27 Mario Sanchez Prada <msanchez@igalia.com> + + Reviewed by Chris Fleizach. + + [Gtk] Adjust atk_text_get_text_at_offset to account for bullets/numbers in list items + https://bugs.webkit.org/show_bug.cgi?id=45381 + + Updated test to match the new exposure of list item markers. + + Also, added some extra assertions in that test to make sure the + accessible objects associated to the items implement AtkText. + + * tests/testatk.c: + (testWebkitAtkListsOfItems): + (main): + +2010-09-27 Philippe Normand <pnormand@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Doesn't build with gtk+ 2.14 + https://bugs.webkit.org/show_bug.cgi?id=46565 + + Fixed the build for GTK+ 2.14. Don't use gdk_window_get_cursor() + for that GTK+ version as I found no acceptable way to work-around + its absence. + + * WebCoreSupport/FullscreenVideoController.cpp: + (FullscreenVideoController::showHud): + (FullscreenVideoController::hideHud): + (FullscreenVideoController::enterFullscreen): + +2010-09-26 Jenn Braithwaite <jennb@chromium.org> + + Reviewed by Adam Barth. + + GTK client needs updating when live iframe element is moved + between pages. + https://bugs.webkit.org/show_bug.cgi?id=46300 + + Test: fast/frames/iframe-reparenting-adopt-node.html + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::didTransferChildFrameToNewDocument): + Update the webView for the frame to match the parent frame's + webView. + +2010-09-24 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Gustavo Noronha Silva. + + [GTK] opening local files on win32 + https://bugs.webkit.org/show_bug.cgi?id=31066 + + Add tests that check the mime type returned by local files loaded via file URLs. + + * tests/testmimehandling.c: + (testRemoteMimeType): Added. + (testLocalMimeType): Added. + (main): Run tests by using g_test_add_data_func with either + testRemoteMimeType or testLocalMimeType. + +2010-09-23 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Nate Chapin. + + [GTK] Some tests from r68174 fail on the GTK+ bots + https://bugs.webkit.org/show_bug.cgi?id=46396 + + Fix since version number in this new WebKitWebSettings property. + + * webkit/webkitwebsettings.cpp: + (webkit_web_settings_class_init): Fix the since version number. + +2010-09-23 Nate Chapin <japhet@chromium.org> + + Unreviewed, build fix. + + Add a missing comma in webkitwebsettings.cpp. + + * webkit/webkitwebsettings.cpp: + +2010-09-23 Nate Chapin <japhet@chromium.org> + + Reviewed by Darin Fisher. + + Add hyperlink auditing settings (i.e., <a ping>). + https://bugs.webkit.org/show_bug.cgi?id=30458 + + * 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): + +2010-09-22 Mario Sanchez Prada <msanchez@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Replace instances of g_timeout_add() with g_idle_add() in testatk.c + https://bugs.webkit.org/show_bug.cgi?id=46284 + + Use g_idle_add() whenever g_timeout_add() was being used. + + This is desired because it's better to rely on the main loop to + decide when it's a good moment to execute the task (when idle) + than manually setting a timeout, which also sets a minimum amount + of time needed to get the function executed. + + * tests/testatk.c: + (testWekitAtkTextSelections): + (testWebkitAtkGetExtents): + (testWebkitAtkListsOfItems): + (main): + +2010-09-22 Mario Sanchez Prada <msanchez@igalia.com> + + Reviewed by Martin Robinson. + + [Gtk] object:text-changed events should be emitted for entries and password text + https://bugs.webkit.org/show_bug.cgi?id=25898 + + New unit test to make sure text-changed signals are emitted + + * tests/testatk.c: + (textChangedCb): New. Signal handler for the + text-changed::insert and text-changed::delete signals. + (checkTextChangesAndBailOut): New. Source function to check + the global result of the test and quit from the main loop. + (testWebkitAtkTextChangedNotifications): New test. + (main): + +2010-09-22 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Xan Lopez. + + Added information about drop shadow improvements to the NEWS file. + + * NEWS: Added information about drop shadow improvements. + +2010-09-21 Xan Lopez <xlopez@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Fix transfer annotations for WebKitGTK+ static API + https://bugs.webkit.org/show_bug.cgi?id=46244 + + Deal with all the warnings related to transfer issues. Mostly the + problem was the transfer being missing, but there were also typos + in the function name or missing ':' at the end of the function + name in the gtk-doc. + + * webkit/webkitdownload.cpp: + * webkit/webkitnetworkrequest.cpp: + * webkit/webkitnetworkresponse.cpp: + * webkit/webkitsecurityorigin.cpp: + * webkit/webkitwebdatabase.cpp: + * webkit/webkitwebdatasource.cpp: + * webkit/webkitwebframe.cpp: + * webkit/webkitwebhistoryitem.cpp: + * webkit/webkitwebinspector.cpp: + * webkit/webkitwebresource.cpp: + * webkit/webkitwebsettings.cpp: + * webkit/webkitwebview.cpp: + (webkit_web_view_class_init): + (webkit_web_view_get_main_frame): + +2010-09-21 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Update for 1.3.4 release. + + * NEWS: + 2010-09-17 Darin Adler <darin@apple.com> Reviewed by Sam Weinig. diff --git a/WebKit/gtk/NEWS b/WebKit/gtk/NEWS index 402c07c..ebeb699 100644 --- a/WebKit/gtk/NEWS +++ b/WebKit/gtk/NEWS @@ -4,13 +4,31 @@ WebKitGTK+ 1.3.4 What's new in WebKitGTK+ 1.3.4? - - Fixes to compile with latest GTK+ changes. - File reader/writer APIs are now enabled. - The javascript JIT is now enabled by default on ARM. - Clipboard data is no longer lost when the process exists. - Image DnD support. - GSettings support to save/restore Web Inspector settings. + - Add WebSocket support, now enabled by default. + - Added WebKitWebView::frame-created signal, emitted when a frame + other than the main frame is created in a view. + - Added WebKitWebView::view-mode, holding information about how the + view is being presented. See the property documentation and + http://www.w3.org/TR/view-mode/ for details. - Fullscreen support for HTML5 media player. + - Identify as WebKit/Safari in Google domains when + enable-site-specific-quirks is activated. Otherwise we'll get a + degraded user experience due to their poor UA detection + algorihtms. + - Added simple media playback options in the context menu for the + media elements. + - Update (and require) to work with gobjet-introspection 0.9.5. + - Updated to work with GTK+ 3.x 2.90.7 when in GTK+ 3.x mode. + - Make --disable-jit actually work. + - Add --enable-opcode-stats configure flag. When enabled, statistics + about opcode generation will be printed by JSC. + - Many a11y fixes, particularly in the AtkText interface. + - CSS box shadows render much faster in many cases. - Many other bugfixes. ================ diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp index 93b4cc2..13401f5 100644 --- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp @@ -601,8 +601,21 @@ PassRefPtr<Frame> FrameLoaderClient::createFrame(const KURL& url, const String& return childFrame.release(); } -void FrameLoaderClient::didTransferChildFrameToNewDocument() +void FrameLoaderClient::didTransferChildFrameToNewDocument(WebCore::Page*) { + ASSERT(m_frame); + + // Update the frame's webview to the new parent's webview. + Frame* coreFrame = core(m_frame); + WebKitWebView* webView = getViewFromFrame(m_frame); + + Frame* parentCoreFrame = coreFrame->tree()->parent(); + WebKitWebFrame* parentKitFrame = kit(parentCoreFrame); + WebKitWebView* parentWebView = getViewFromFrame(parentKitFrame); + if (webView != parentWebView) + m_frame->priv->webView = parentWebView; + + ASSERT(core(getViewFromFrame(m_frame)) == coreFrame->page()); } void FrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget) diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h index c5ffc6a..206e780 100644 --- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h +++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h @@ -114,7 +114,7 @@ namespace WebKit { virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); - virtual void didTransferChildFrameToNewDocument(); + virtual void didTransferChildFrameToNewDocument(WebCore::Page*); virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const WTF::Vector<WTF::String>&, const WTF::Vector<WTF::String>&, const WTF::String&, bool); virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues); diff --git a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp index cf9a548..01bc03a 100644 --- a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp +++ b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp @@ -175,7 +175,7 @@ void FullscreenVideoController::showHud(bool autoHide) // Show the cursor. GdkWindow* window = gtk_widget_get_window(m_window); - gdk_window_set_cursor(window, m_cursor.get()); + gdk_window_set_cursor(window, 0); // Update the progress bar immediately before showing the window. updateHudProgressBar(); @@ -210,7 +210,7 @@ void FullscreenVideoController::hideHud() } GdkWindow* window = gtk_widget_get_window(m_window); - GdkCursor* cursor = gdk_cursor_new(GDK_BLANK_CURSOR); + GdkCursor* cursor = blankCursor(); gdk_window_set_cursor(window, cursor); gtk_widget_hide_all(m_hudWindow); @@ -283,8 +283,7 @@ void FullscreenVideoController::enterFullscreen() gtk_widget_show_all(m_window); GdkWindow* window = gtk_widget_get_window(m_window); - GdkCursor* cursor = gdk_cursor_new(GDK_BLANK_CURSOR); - m_cursor = gdk_window_get_cursor(window); + GdkCursor* cursor = blankCursor(); gdk_window_set_cursor(window, cursor); gdk_cursor_unref(cursor); diff --git a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h index 9ff1e6a..d4bbea2 100644 --- a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h +++ b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h @@ -82,7 +82,6 @@ private: guint m_volumeUpdateId; bool m_seekLock; GtkWidget* m_window; - PlatformRefPtr<GdkCursor> m_cursor; GtkWidget* m_hudWindow; GtkAction* m_playPauseAction; GtkAction* m_exitFullscreenAction; diff --git a/WebKit/gtk/po/ChangeLog b/WebKit/gtk/po/ChangeLog index 3665005..19e86ae 100644 --- a/WebKit/gtk/po/ChangeLog +++ b/WebKit/gtk/po/ChangeLog @@ -1,3 +1,12 @@ +2010-09-29 Reinout van Schouwen <reinouts@gnome.org> + + Reviewed by Gustavo Noronha. + + [GTK] Updated Dutch translation + https://bugs.webkit.org/show_bug.cgi?id=46050 + + * nl.po: + 2010-08-31 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r66519. diff --git a/WebKit/gtk/po/nl.po b/WebKit/gtk/po/nl.po index aa2da82..e33e284 100644 --- a/WebKit/gtk/po/nl.po +++ b/WebKit/gtk/po/nl.po @@ -1,1074 +1,1355 @@ # Dutch translation of webkit-gtk # Released under the same license as webkit-gtk -# Reinout van Schouwen <reinouts@gnome.org>, 2009 +# Reinout van Schouwen <reinouts@gnome.org>, 2009, 2010 # msgid "" msgstr "" "Project-Id-Version: webkit 1.1.10\n" -"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2010-02-16 15:01-0200\n" -"PO-Revision-Date: 2010-03-22 00:27+0100\n" +"Report-Msgid-Bugs-To: http://bugs.webkit.org\n" +"POT-Creation-Date: 2010-09-08 03:26+0000\n" +"PO-Revision-Date: 2010-09-19 17:01+0100\n" "Last-Translator: Reinout van Schouwen <reinouts@gnome.org>\n" "Language-Team: Dutch <vertaling@vrijschrift.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 +#: ../WebCoreSupport/ChromeClientGtk.cpp:569 msgid "Upload File" msgstr "Bestand uploaden" -#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 +#: ../WebCoreSupport/ContextMenuClientGtk.cpp:61 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" msgstr "Invoer_methoden" -#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78 +#: ../WebCoreSupport/ContextMenuClientGtk.cpp:78 msgid "LRM _Left-to-right mark" msgstr "LRM _Links-naar-rechts markering" -#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79 +#: ../WebCoreSupport/ContextMenuClientGtk.cpp:79 msgid "RLM _Right-to-left mark" msgstr "RLM _Rechts-naar-links markering" -#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80 +#: ../WebCoreSupport/ContextMenuClientGtk.cpp:80 msgid "LRE Left-to-right _embedding" msgstr "LRE Links-naar-rechts _inbedding" -#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81 +#: ../WebCoreSupport/ContextMenuClientGtk.cpp:81 msgid "RLE Right-to-left e_mbedding" msgstr "RLE Rechts-naar-links i_nbedding" -#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82 +#: ../WebCoreSupport/ContextMenuClientGtk.cpp:82 msgid "LRO Left-to-right _override" msgstr "LRO Links-naar-rechts _tenietdoen" -#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83 +#: ../WebCoreSupport/ContextMenuClientGtk.cpp:83 msgid "RLO Right-to-left o_verride" msgstr "RLO Rechts-naar-links t_enietdoen" -#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84 +#: ../WebCoreSupport/ContextMenuClientGtk.cpp:84 msgid "PDF _Pop directional formatting" msgstr "PDF _Pop richtingsformattering" -#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85 +#: ../WebCoreSupport/ContextMenuClientGtk.cpp:85 msgid "ZWS _Zero width space" msgstr "ZWS Spatie _zonder breedte" -#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86 +#: ../WebCoreSupport/ContextMenuClientGtk.cpp:86 msgid "ZWJ Zero width _joiner" msgstr "ZWJ _koppelaar zonder breedte" -#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87 +#: ../WebCoreSupport/ContextMenuClientGtk.cpp:87 msgid "ZWNJ Zero width _non-joiner" msgstr "ZWNJ Niet-k_oppelaar zonder breedte" -#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 +#: ../WebCoreSupport/ContextMenuClientGtk.cpp:109 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" msgstr "_Unicode controleteken invoegen " -#: WebKit/gtk/webkit/webkitdownload.cpp:262 +#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1038 +msgid "Load request cancelled" +msgstr "Laadaanvraag geannuleerd" + +#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1044 +msgid "Not allowed to use restricted network port" +msgstr "Gebruik van beperkte netwerkpoort niet toegestaan" + +#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1050 +msgid "URL cannot be shown" +msgstr "Kan URL niet tonen" + +#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1056 +msgid "Frame load was interrupted" +msgstr "Laden van het frame onderbroken" + +#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1062 +msgid "Content with the specified MIME type cannot be shown" +msgstr "Kan inhoud met het aangegeven MIME-type niet tonen" + +#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1068 +msgid "File does not exist" +msgstr "Bestand bestaat niet" + +#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1074 +msgid "Plugin will handle load" +msgstr "Plug-in handelt het laden af" + +#: ../WebCoreSupport/FullscreenVideoController.cpp:385 +#| msgid "play" +msgid "Play" +msgstr "Afspelen" + +#: ../WebCoreSupport/FullscreenVideoController.cpp:387 +#| msgid "pause" +msgid "Pause" +msgstr "Pauzeren" + +#: ../WebCoreSupport/FullscreenVideoController.cpp:533 +msgid "Play / Pause" +msgstr "Afspelen / pauzeren" + +#: ../WebCoreSupport/FullscreenVideoController.cpp:533 +msgid "Play or pause the media" +msgstr "De media afspelen of pauzeren" + +#: ../WebCoreSupport/FullscreenVideoController.cpp:541 +msgid "Time:" +msgstr "Tijd:" + +#: ../WebCoreSupport/FullscreenVideoController.cpp:565 +msgid "Exit Fullscreen" +msgstr "Volledig scherm verlaten" + +#: ../WebCoreSupport/FullscreenVideoController.cpp:565 +msgid "Exit from fullscreen mode" +msgstr "Volledig scherm verlaten" + +#: ../webkit/webkitdownload.cpp:272 msgid "Network Request" msgstr "Netwerkaanvraag" -#: WebKit/gtk/webkit/webkitdownload.cpp:263 +#: ../webkit/webkitdownload.cpp:273 msgid "The network request for the URI that should be downloaded" msgstr "De netwerkaanvraag voor de te downloaden URI" -#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#: ../webkit/webkitdownload.cpp:287 msgid "Network Response" msgstr "Netwerkantwoord" -#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#: ../webkit/webkitdownload.cpp:288 msgid "The network response for the URI that should be downloaded" msgstr "Het netwerkantwoord voor de te downloaden URI" -#: WebKit/gtk/webkit/webkitdownload.cpp:292 +#: ../webkit/webkitdownload.cpp:302 msgid "Destination URI" msgstr "Bestemmings-URI" -#: WebKit/gtk/webkit/webkitdownload.cpp:293 +#: ../webkit/webkitdownload.cpp:303 msgid "The destination URI where to save the file" msgstr "De bestemmings-URI waar dit bestand opgeslagen moet worden" -#: WebKit/gtk/webkit/webkitdownload.cpp:307 +#: ../webkit/webkitdownload.cpp:317 msgid "Suggested Filename" msgstr "Gesuggereerde bestandsnaam" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: ../webkit/webkitdownload.cpp:318 msgid "The filename suggested as default when saving" msgstr "De standaard gesuggereerde bestandsnaam bij het opslaan" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: ../webkit/webkitdownload.cpp:335 msgid "Progress" msgstr "Voortgang" -#: WebKit/gtk/webkit/webkitdownload.cpp:326 +#: ../webkit/webkitdownload.cpp:336 msgid "Determines the current progress of the download" msgstr "Bepaalt de huidige voortgang van de download" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: ../webkit/webkitdownload.cpp:349 msgid "Status" msgstr "Status" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: ../webkit/webkitdownload.cpp:350 msgid "Determines the current status of the download" msgstr "Bepaalt de huidige status van de download" -#: WebKit/gtk/webkit/webkitdownload.cpp:355 +#: ../webkit/webkitdownload.cpp:365 msgid "Current Size" msgstr "Huidige grootte" -#: WebKit/gtk/webkit/webkitdownload.cpp:356 +#: ../webkit/webkitdownload.cpp:366 msgid "The length of the data already downloaded" msgstr "De hoeveelheid reeds gedownloade data" -#: WebKit/gtk/webkit/webkitdownload.cpp:370 +#: ../webkit/webkitdownload.cpp:380 msgid "Total Size" msgstr "Totale grootte" -#: WebKit/gtk/webkit/webkitdownload.cpp:371 +#: ../webkit/webkitdownload.cpp:381 msgid "The total size of the file" msgstr "De totale grootte van het bestand" -#: WebKit/gtk/webkit/webkitdownload.cpp:522 +#: ../webkit/webkitdownload.cpp:532 msgid "User cancelled the download" msgstr "Downloaden door gebruiker gestopt" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#: ../webkit/webkithittestresult.cpp:148 +msgid "Context" +msgstr "Context" + +#: ../webkit/webkithittestresult.cpp:149 +msgid "Flags indicating the kind of target that received the event." +msgstr "Markeringen die het soort doel beschrijven voor ontvangst van de gebeurtenis." + +#: ../webkit/webkithittestresult.cpp:163 +msgid "Link URI" +msgstr "Verwijzings-URI" + +#: ../webkit/webkithittestresult.cpp:164 +msgid "The URI to which the target that received the event points, if any." +msgstr "De URI waarnaar het doel wijst dat de gebeurtenispunten ontvangen heeft, indien aanwezig." + +#: ../webkit/webkithittestresult.cpp:177 +msgid "Image URI" +msgstr "Afbeeldings-URI" + +#: ../webkit/webkithittestresult.cpp:178 +msgid "" +"The URI of the image that is part of the target that received the event, if " +"any." +msgstr "" +"De URI van de afbeelding die onderdeel is van het doel voor gebeurtenisontvangst, indien aanwezig." + +#: ../webkit/webkithittestresult.cpp:191 +msgid "Media URI" +msgstr "Media-URI" + +#: ../webkit/webkithittestresult.cpp:192 +msgid "" +"The URI of the media that is part of the target that received the event, if " +"any." +msgstr "" +"De URI van de media die onderdeel zijn van het doel voor gebeurtenisontvangst, indien aanwezig." + +#: ../webkit/webkithittestresult.cpp:213 +msgid "Inner node" +msgstr "Ingesloten node" + +#: ../webkit/webkithittestresult.cpp:214 +msgid "The inner DOM node associated with the hit test result." +msgstr "De ingesloten DOM-node die geassocieerd is met het hittestresultaat." + +#: ../webkit/webkitnetworkrequest.cpp:136 +#: ../webkit/webkitnetworkresponse.cpp:134 ../webkit/webkitwebframe.cpp:315 +#: ../webkit/webkitwebhistoryitem.cpp:178 ../webkit/webkitwebresource.cpp:126 +#: ../webkit/webkitwebview.cpp:2653 +msgid "URI" +msgstr "URI" + +#: ../webkit/webkitnetworkrequest.cpp:137 +msgid "The URI to which the request will be made." +msgstr "De URI waarnaar de aanvraag gestuurd wordt." + +#: ../webkit/webkitnetworkrequest.cpp:150 +#: ../webkit/webkitnetworkresponse.cpp:148 +msgid "Message" +msgstr "Bericht" + +#: ../webkit/webkitnetworkrequest.cpp:151 +msgid "The SoupMessage that backs the request." +msgstr "De SoupMessage die achter de aanvraag zit." + +#: ../webkit/webkitnetworkresponse.cpp:135 +msgid "The URI to which the response will be made." +msgstr "De URI waarnaar het antwoord verstuurd wordt." + +#: ../webkit/webkitnetworkresponse.cpp:149 +msgid "The SoupMessage that backs the response." +msgstr "De SoupMessage die achter het antwoord zit." + +#: ../webkit/webkitsecurityorigin.cpp:151 +msgid "Protocol" +msgstr "Protocol" + +#: ../webkit/webkitsecurityorigin.cpp:152 +msgid "The protocol of the security origin" +msgstr "Het protocol van de beveiligingsbron" + +#: ../webkit/webkitsecurityorigin.cpp:165 +msgid "Host" +msgstr "Hostcomputer" + +#: ../webkit/webkitsecurityorigin.cpp:166 +msgid "The host of the security origin" +msgstr "De hostcomputer van de beveiligingsbron" + +#: ../webkit/webkitsecurityorigin.cpp:179 +msgid "Port" +msgstr "Poort" + +#: ../webkit/webkitsecurityorigin.cpp:180 +msgid "The port of the security origin" +msgstr "De poort van de beveiligingsbron" + +#: ../webkit/webkitsecurityorigin.cpp:193 +msgid "Web Database Usage" +msgstr "Web-databasegebruik" + +#: ../webkit/webkitsecurityorigin.cpp:194 +msgid "The cumulative size of all web databases in the security origin" +msgstr "De opgetelde grootte van alle webdatabases in de beveiligingsbron" + +#: ../webkit/webkitsecurityorigin.cpp:206 +msgid "Web Database Quota" +msgstr "Webdatabase-quota" + +#: ../webkit/webkitsecurityorigin.cpp:207 +msgid "The web database quota of the security origin in bytes" +msgstr "De webdatabase-quota voor de beveiligingsbron in bytes" + +#: ../webkit/webkitsoupauthdialog.c:251 #, c-format msgid "A username and password are being requested by the site %s" msgstr "De site %s vraagt een gebruikersnaam en wachtwoord" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +#: ../webkit/webkitsoupauthdialog.c:281 +msgid "Server message:" +msgstr "Serverbericht:" + +#: ../webkit/webkitsoupauthdialog.c:294 msgid "Username:" msgstr "Gebruikersnaam:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +#: ../webkit/webkitsoupauthdialog.c:296 msgid "Password:" msgstr "Wachtwoord:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#: ../webkit/webkitsoupauthdialog.c:305 msgid "_Remember password" msgstr "_Wachtwoord onthouden" -#: WebKit/gtk/webkit/webkitwebframe.cpp:298 +#: ../webkit/webkitwebdatabase.cpp:176 +msgid "Security Origin" +msgstr "Beveiligingsbron" + +#: ../webkit/webkitwebdatabase.cpp:177 +msgid "The security origin of the database" +msgstr "De beveiligingsbron van de database" + +#: ../webkit/webkitwebdatabase.cpp:190 ../webkit/webkitwebframe.cpp:301 msgid "Name" msgstr "Naam" -#: WebKit/gtk/webkit/webkitwebframe.cpp:299 +#: ../webkit/webkitwebdatabase.cpp:191 +msgid "The name of the Web Database database" +msgstr "De naam van de Web Database-database" + +#: ../webkit/webkitwebdatabase.cpp:204 +msgid "Display Name" +msgstr "Weergavenaam" + +#: ../webkit/webkitwebdatabase.cpp:205 +msgid "The display name of the Web Storage database" +msgstr "De weergavenaam van de Web Storage-database" + +#: ../webkit/webkitwebdatabase.cpp:218 +msgid "Expected Size" +msgstr "Verwachte grootte" + +#: ../webkit/webkitwebdatabase.cpp:219 +msgid "The expected size of the Web Database database" +msgstr "De verwachte grootte van de Web Database-database" + +#: ../webkit/webkitwebdatabase.cpp:231 +msgid "Size" +msgstr "Grootte" + +#: ../webkit/webkitwebdatabase.cpp:232 +msgid "The current size of the Web Database database" +msgstr "De huidige grootte van de Web Database-database" + +#: ../webkit/webkitwebdatabase.cpp:244 +msgid "Filename" +msgstr "Bestandsnaam" + +#: ../webkit/webkitwebdatabase.cpp:245 +msgid "The absolute filename of the Web Storage database" +msgstr "De absolute bestandsnaam van de Web Storage-database" + +#: ../webkit/webkitwebframe.cpp:302 msgid "The name of the frame" msgstr "Naam van het frame" -#: WebKit/gtk/webkit/webkitwebframe.cpp:305 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 -#: WebKit/gtk/webkit/webkitwebview.cpp:2315 +#: ../webkit/webkitwebframe.cpp:308 ../webkit/webkitwebhistoryitem.cpp:146 +#: ../webkit/webkitwebview.cpp:2639 msgid "Title" msgstr "Titel" -#: WebKit/gtk/webkit/webkitwebframe.cpp:306 +#: ../webkit/webkitwebframe.cpp:309 msgid "The document title of the frame" msgstr "De titel van het huidige frame" -#: WebKit/gtk/webkit/webkitwebframe.cpp:312 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 -#: WebKit/gtk/webkit/webkitwebview.cpp:2329 -msgid "URI" -msgstr "URI" - -#: WebKit/gtk/webkit/webkitwebframe.cpp:313 +#: ../webkit/webkitwebframe.cpp:316 msgid "The current URI of the contents displayed by the frame" msgstr "De huidige URI van de in het frame weergegeven inhoud" -#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +#: ../webkit/webkitwebframe.cpp:347 msgid "Horizontal Scrollbar Policy" msgstr "Beleid voor horizontale schuifbalk" -#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +#: ../webkit/webkitwebframe.cpp:348 msgid "" "Determines the current policy for the horizontal scrollbar of the frame." -msgstr "" -"Bepaalt het beleid voor de horizontale schuifbalk van het frame" +msgstr "Bepaalt het beleid voor de horizontale schuifbalk van het frame" -#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +#: ../webkit/webkitwebframe.cpp:365 msgid "Vertical Scrollbar Policy" msgstr "Beleid voor verticale schuifbalk" -#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +#: ../webkit/webkitwebframe.cpp:366 msgid "Determines the current policy for the vertical scrollbar of the frame." msgstr "Bepaalt het huidige beleid voor de verticale schuifbalk van het frame." -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 +#: ../webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" msgstr "De titel van het geschiedenis-item" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 +#: ../webkit/webkitwebhistoryitem.cpp:162 msgid "Alternate Title" msgstr "Alternatieve titel" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 +#: ../webkit/webkitwebhistoryitem.cpp:163 msgid "The alternate title of the history item" msgstr "De alternatieve titel van het geschiedenis-item" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 +#: ../webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" msgstr "De URI van het geschiedenis-item" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 +#: ../webkit/webkitwebhistoryitem.cpp:194 +#: ../webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" msgstr "Originele URI" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 +#: ../webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" msgstr "De originele URI van het geschiedenis-item" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 +#: ../webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" msgstr "Laatst bezocht op" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 +#: ../webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" msgstr "De tijd waarop het geschiedenis-item het laatst is bezocht" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 +#: ../webkit/webkitwebinspector.cpp:269 msgid "Web View" msgstr "Webweergave" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 +#: ../webkit/webkitwebinspector.cpp:270 msgid "The Web View that renders the Web Inspector itself" msgstr "De webweergave die die Webinspector zelf weergeeft" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 +#: ../webkit/webkitwebinspector.cpp:283 msgid "Inspected URI" msgstr "Geïnspecteerde URI" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 +#: ../webkit/webkitwebinspector.cpp:284 msgid "The URI that is currently being inspected" msgstr "De URI die momenteel geïnspecteerd wordt" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 +#: ../webkit/webkitwebinspector.cpp:300 msgid "Enable JavaScript profiling" msgstr "JavaScript-profilering inschakelen" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 +#: ../webkit/webkitwebinspector.cpp:301 msgid "Profile the executed JavaScript." msgstr "De uitgevoerde JavaScript profileren." -#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +#: ../webkit/webkitwebinspector.cpp:316 msgid "Enable Timeline profiling" msgstr "Tijdslijn-profilering inschakelen" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +#: ../webkit/webkitwebinspector.cpp:317 msgid "Profile the WebCore instrumentation." msgstr "De instrumentering van WebCore profileren." -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 +#: ../webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "Reden" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 +#: ../webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" msgstr "De reden waarom deze navigatie optreedt" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 +#: ../webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" msgstr "De URI die werd aangevraagd als bestemming voor de navigatie" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 +#: ../webkit/webkitwebnavigationaction.cpp:188 msgid "Button" msgstr "Knop" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 +#: ../webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" msgstr "De knop voor het klikken" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 +#: ../webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" msgstr "Staat van de optietoets" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 +#: ../webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" msgstr "Een bitmask dat de staat van de optietoets representeert" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +#: ../webkit/webkitwebnavigationaction.cpp:220 msgid "Target frame" msgstr "Doelframe" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +#: ../webkit/webkitwebnavigationaction.cpp:221 msgid "The target frame for the navigation" msgstr "Het doelframe voor de navigatie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 +#: ../webkit/webkitwebresource.cpp:127 +msgid "The uri of the resource" +msgstr "De URI van de bron" + +#: ../webkit/webkitwebresource.cpp:141 +msgid "MIME Type" +msgstr "MIME-type" + +#: ../webkit/webkitwebresource.cpp:142 +msgid "The MIME type of the resource" +msgstr "De MIME-type van de bron" + +#: ../webkit/webkitwebresource.cpp:156 ../webkit/webkitwebview.cpp:2774 +msgid "Encoding" +msgstr "Codering" + +#: ../webkit/webkitwebresource.cpp:157 +msgid "The text encoding name of the resource" +msgstr "De tekstcoderingsnaam van de bron" + +#: ../webkit/webkitwebresource.cpp:172 +msgid "Frame Name" +msgstr "Framenaam" + +#: ../webkit/webkitwebresource.cpp:173 +msgid "The frame name of the resource" +msgstr "Naam van het frame van de bron" + +#: ../webkit/webkitwebsettings.cpp:241 msgid "Default Encoding" msgstr "Standaardcodering" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 +#: ../webkit/webkitwebsettings.cpp:242 msgid "The default encoding used to display text." msgstr "De standaardcodering om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 +#: ../webkit/webkitwebsettings.cpp:250 msgid "Cursive Font Family" msgstr "Cursive-lettertypefamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 +#: ../webkit/webkitwebsettings.cpp:251 msgid "The default Cursive font family used to display text." msgstr "De standaard Cursive-lettertypefamilie om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 +#: ../webkit/webkitwebsettings.cpp:259 msgid "Default Font Family" msgstr "Standaard lettertypefamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 +#: ../webkit/webkitwebsettings.cpp:260 msgid "The default font family used to display text." msgstr "De standaard lettertypefamilie om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 +#: ../webkit/webkitwebsettings.cpp:268 msgid "Fantasy Font Family" msgstr "Fantasy-lettertypefamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 +#: ../webkit/webkitwebsettings.cpp:269 msgid "The default Fantasy font family used to display text." msgstr "De standaard Fantasy-lettertypefamilie om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 +#: ../webkit/webkitwebsettings.cpp:277 msgid "Monospace Font Family" msgstr "Monospace-lettertypefamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 +#: ../webkit/webkitwebsettings.cpp:278 msgid "The default font family used to display monospace text." msgstr "De standaard lettertypefamilie om vaste-breedte-tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 +#: ../webkit/webkitwebsettings.cpp:286 msgid "Sans Serif Font Family" msgstr "Sans Serif-lettertypefamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 +#: ../webkit/webkitwebsettings.cpp:287 msgid "The default Sans Serif font family used to display text." msgstr "De standaard Sans Serif-lettertypefamilie om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 +#: ../webkit/webkitwebsettings.cpp:295 msgid "Serif Font Family" msgstr "Serif-lettertypefamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 +#: ../webkit/webkitwebsettings.cpp:296 msgid "The default Serif font family used to display text." msgstr "De standaard Serif-lettertypefamilie om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 +#: ../webkit/webkitwebsettings.cpp:304 msgid "Default Font Size" msgstr "Standaard korpsgrootte" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 +#: ../webkit/webkitwebsettings.cpp:305 msgid "The default font size used to display text." msgstr "De standaard korpsgrootte om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 +#: ../webkit/webkitwebsettings.cpp:313 msgid "Default Monospace Font Size" msgstr "Standaard Monospace-lettergrootte" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 +#: ../webkit/webkitwebsettings.cpp:314 msgid "The default font size used to display monospace text." msgstr "De standaard lettergrootte om vaste-breedte-tekst weer te geven." # Korpsgrootte/lettergrootte? -#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 +#: ../webkit/webkitwebsettings.cpp:322 msgid "Minimum Font Size" msgstr "Minimum korpsgrootte" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 +#: ../webkit/webkitwebsettings.cpp:323 msgid "The minimum font size used to display text." msgstr "De minimum lettergrootte om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 +#: ../webkit/webkitwebsettings.cpp:331 msgid "Minimum Logical Font Size" msgstr "Minimum logische korpsgrootte" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 +#: ../webkit/webkitwebsettings.cpp:332 msgid "The minimum logical font size used to display text." msgstr "De minimum logische korpsgrootte om tekst weer te geven." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 +#: ../webkit/webkitwebsettings.cpp:351 msgid "Enforce 96 DPI" msgstr "96 DPI afdwingen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 +#: ../webkit/webkitwebsettings.cpp:352 msgid "Enforce a resolution of 96 DPI" msgstr "Een resolutie van 96 DPI afdwingen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 +#: ../webkit/webkitwebsettings.cpp:360 msgid "Auto Load Images" msgstr "Afbeeldingen automatisch laden" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 +#: ../webkit/webkitwebsettings.cpp:361 msgid "Load images automatically." msgstr "Automatisch afbeeldingen laden." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 +#: ../webkit/webkitwebsettings.cpp:369 msgid "Auto Shrink Images" msgstr "Afbeeldingen automatisch verkleinen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 +#: ../webkit/webkitwebsettings.cpp:370 msgid "Automatically shrink standalone images to fit." msgstr "Automatisch losstaande afbeeldingen passend maken." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 +#: ../webkit/webkitwebsettings.cpp:378 msgid "Print Backgrounds" msgstr "Achtergronden afdrukken" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 +#: ../webkit/webkitwebsettings.cpp:379 msgid "Whether background images should be printed." msgstr "Of achtergrondafbeeldingen afgedrukt moeten worden." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 +#: ../webkit/webkitwebsettings.cpp:387 msgid "Enable Scripts" msgstr "Scripts inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 +#: ../webkit/webkitwebsettings.cpp:388 msgid "Enable embedded scripting languages." msgstr "Ingebedde scripttalen inschakelen." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 +#: ../webkit/webkitwebsettings.cpp:396 msgid "Enable Plugins" msgstr "Plugins inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 +#: ../webkit/webkitwebsettings.cpp:397 msgid "Enable embedded plugin objects." msgstr "Ingebedde plugin-objecten inschakelen." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 +#: ../webkit/webkitwebsettings.cpp:405 msgid "Resizable Text Areas" msgstr "Tekstgebieden van grootte veranderbaar" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 +#: ../webkit/webkitwebsettings.cpp:406 msgid "Whether text areas are resizable." msgstr "Of de grootte van tekstgebieden gewijzigd kan worden." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 +#: ../webkit/webkitwebsettings.cpp:413 msgid "User Stylesheet URI" msgstr "URI van gebruikersstijlblad" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 +#: ../webkit/webkitwebsettings.cpp:414 msgid "The URI of a stylesheet that is applied to every page." msgstr "De URI van een stijlblad dat wordt toegepast op elke pagina." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 +#: ../webkit/webkitwebsettings.cpp:429 msgid "Zoom Stepping Value" msgstr "Stapgrootte voor in- en uitzoomen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 +#: ../webkit/webkitwebsettings.cpp:430 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "" "De hoeveelheid waarmee het zoomniveau verandert bij het in- en uitzoomen." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 +#: ../webkit/webkitwebsettings.cpp:448 msgid "Enable Developer Extras" msgstr "Extraatjes voor ontwikkelaars" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 +#: ../webkit/webkitwebsettings.cpp:449 msgid "Enables special extensions that help developers" msgstr "Schakelt speciale uitbreidingen in die ontwikkelaars helpen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 +#: ../webkit/webkitwebsettings.cpp:469 msgid "Enable Private Browsing" msgstr "Privé-browsen inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 +#: ../webkit/webkitwebsettings.cpp:470 msgid "Enables private browsing mode" msgstr "Schakelt de stand voor privé-browsen in" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +#: ../webkit/webkitwebsettings.cpp:485 msgid "Enable Spell Checking" msgstr "Spellingcontrole inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#: ../webkit/webkitwebsettings.cpp:486 msgid "Enables spell checking while typing" msgstr "Schakelt spellingcontrole tijdens het typen in" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +#: ../webkit/webkitwebsettings.cpp:509 msgid "Languages to use for spell checking" msgstr "Te gebruiken talen bij spellingcontrole" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +#: ../webkit/webkitwebsettings.cpp:510 msgid "Comma separated list of languages to use for spell checking" msgstr "Kommagescheiden lijst van talen voor spellingcontrole" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#: ../webkit/webkitwebsettings.cpp:524 msgid "Enable Caret Browsing" msgstr "Cursor-browsen inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +#: ../webkit/webkitwebsettings.cpp:525 msgid "Whether to enable accesibility enhanced keyboard navigation" -msgstr "Of toegankelijkheidsgeoptimaliseerde toetsenbordnavigatie is ingeschakeld" +msgstr "" +"Of toegankelijkheidsgeoptimaliseerde toetsenbordnavigatie is ingeschakeld" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +#: ../webkit/webkitwebsettings.cpp:540 msgid "Enable HTML5 Database" msgstr "HTML5-database inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +#: ../webkit/webkitwebsettings.cpp:541 msgid "Whether to enable HTML5 database support" msgstr "Of HTML5-databaseondersteuning is ingeschakeld" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +#: ../webkit/webkitwebsettings.cpp:556 msgid "Enable HTML5 Local Storage" msgstr "HTML5-lokale opslag inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +#: ../webkit/webkitwebsettings.cpp:557 msgid "Whether to enable HTML5 Local Storage support" msgstr "Of HTML5-lokale opslag ingeschakeld moet zijn" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#: ../webkit/webkitwebsettings.cpp:571 msgid "Enable XSS Auditor" msgstr "XSS-auditor inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 -msgid "Whether to enable teh XSS auditor" +#: ../webkit/webkitwebsettings.cpp:572 +msgid "Whether to enable the XSS auditor" msgstr "Of de XSS-auditor is ingeschakeld" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +#: ../webkit/webkitwebsettings.cpp:590 +msgid "Enable Spatial Navigation" +msgstr "Ruimtelijke navigatie inschakelen" + +#: ../webkit/webkitwebsettings.cpp:591 +msgid "Whether to enable Spatial Navigation" +msgstr "Of ruimtelijke navigatie is ingeschakeld" + +#: ../webkit/webkitwebsettings.cpp:608 msgid "User Agent" msgstr "User-agent" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +#: ../webkit/webkitwebsettings.cpp:609 msgid "The User-Agent string used by WebKitGtk" msgstr "De User-Agent-tekenreeks die WebKitGtk gebruikt" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +#: ../webkit/webkitwebsettings.cpp:624 msgid "JavaScript can open windows automatically" msgstr "JavaScript kan automatisch vensters openen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +#: ../webkit/webkitwebsettings.cpp:625 msgid "Whether JavaScript can open windows automatically" msgstr "Of JavaScript automatisch vensters kan openen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +#: ../webkit/webkitwebsettings.cpp:639 +msgid "JavaScript can access Clipboard" +msgstr "JavaScript heeft toegang tot klembord" + +#: ../webkit/webkitwebsettings.cpp:640 +msgid "Whether JavaScript can access Clipboard" +msgstr "Of JavaScript het klembord kan benaderen" + +#: ../webkit/webkitwebsettings.cpp:656 msgid "Enable offline web application cache" msgstr "Offline webapplicatiebuffer inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +#: ../webkit/webkitwebsettings.cpp:657 msgid "Whether to enable offline web application cache" msgstr "Of de offline webapplicatiebuffer is ingeschakeld" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +#: ../webkit/webkitwebsettings.cpp:684 msgid "Editing behavior" msgstr "Gedrag bij bewerken" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +#: ../webkit/webkitwebsettings.cpp:685 msgid "The behavior mode to use in editing mode" msgstr "De gedragsmodus in de bewerkingsstand" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +#: ../webkit/webkitwebsettings.cpp:701 msgid "Enable universal access from file URIs" msgstr "Universele toegang vanaf bestands-URI's inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +#: ../webkit/webkitwebsettings.cpp:702 msgid "Whether to allow universal access from file URIs" msgstr "Of universele toegang vanaf bestands-URI's is ingeschakeld" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#: ../webkit/webkitwebsettings.cpp:717 msgid "Enable DOM paste" msgstr "DOM-plakken inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +#: ../webkit/webkitwebsettings.cpp:718 msgid "Whether to enable DOM paste" msgstr "Of plakken vanuit het DOM is ingeschakeld" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +#: ../webkit/webkitwebsettings.cpp:736 msgid "Tab key cycles through elements" msgstr "Tab-toets wandelt door elementen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +#: ../webkit/webkitwebsettings.cpp:737 msgid "Whether the tab key cycles through elements on the page." msgstr "Of de tab-toets door de elementen op de pagina wandelt." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +#: ../webkit/webkitwebsettings.cpp:757 msgid "Enable Default Context Menu" msgstr "Standaard-contextmenu inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +#: ../webkit/webkitwebsettings.cpp:758 msgid "" "Enables the handling of right-clicks for the creation of the default context " "menu" msgstr "" -"Schakelt het afhandelen van klikken met de tweede muisknop in voor het creëren " -"van het standaard contextmenu" +"Schakelt het afhandelen van klikken met de tweede muisknop in voor het " +"creëren van het standaard contextmenu" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +#: ../webkit/webkitwebsettings.cpp:778 msgid "Enable Site Specific Quirks" msgstr "Site-specifieke eigenaardigheden inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +#: ../webkit/webkitwebsettings.cpp:779 msgid "Enables the site-specific compatibility workarounds" msgstr "Schakelt omzeilingen in voor compatibiliteit met specifieke websites" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +#: ../webkit/webkitwebsettings.cpp:801 msgid "Enable page cache" msgstr "Paginabuffer inschakelen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#: ../webkit/webkitwebsettings.cpp:802 msgid "Whether the page cache should be used" msgstr "Of de paginabuffer gebruikt moet worden" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +#: ../webkit/webkitwebsettings.cpp:822 msgid "Auto Resize Window" msgstr "Venstergrootte automatisch aanpassen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +#: ../webkit/webkitwebsettings.cpp:823 msgid "Automatically resize the toplevel window when a page requests it" -msgstr "Grootte van topniveauvenster automatisch aanpassen wanneer pagina hierom vraagt" +msgstr "" +"Grootte van topniveauvenster automatisch aanpassen wanneer pagina hierom " +"vraagt" + +#: ../webkit/webkitwebsettings.cpp:855 +msgid "Enable Java Applet" +msgstr "Java-applet inschakelen" + +#: ../webkit/webkitwebsettings.cpp:856 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "Of ondersteuning voor Java-applets via <applet> ingeschakeld is" -#: WebKit/gtk/webkit/webkitwebview.cpp:2316 +#: ../webkit/webkitwebview.cpp:2640 msgid "Returns the @web_view's document title" msgstr "Geeft de documenttitel van de @web_view terug" -#: WebKit/gtk/webkit/webkitwebview.cpp:2330 +#: ../webkit/webkitwebview.cpp:2654 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "Geeft de huidige URI terug van de inhoud die de @web_view weergeeft" -#: WebKit/gtk/webkit/webkitwebview.cpp:2343 +#: ../webkit/webkitwebview.cpp:2667 msgid "Copy target list" msgstr "Kopieerdoellijst" -#: WebKit/gtk/webkit/webkitwebview.cpp:2344 +#: ../webkit/webkitwebview.cpp:2668 msgid "The list of targets this web view supports for clipboard copying" msgstr "" "De lijst met targets die deze webweergave ondersteunt voor het kopiëren van " "het klembord" -#: WebKit/gtk/webkit/webkitwebview.cpp:2357 +#: ../webkit/webkitwebview.cpp:2681 msgid "Paste target list" msgstr "Plakdoellijst" -#: WebKit/gtk/webkit/webkitwebview.cpp:2358 +#: ../webkit/webkitwebview.cpp:2682 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" "De lijst met targets die deze webview ondersteunt voor het plakken van het " "klembord" -#: WebKit/gtk/webkit/webkitwebview.cpp:2364 +#: ../webkit/webkitwebview.cpp:2688 msgid "Settings" msgstr "Instellingen" -#: WebKit/gtk/webkit/webkitwebview.cpp:2365 +#: ../webkit/webkitwebview.cpp:2689 msgid "An associated WebKitWebSettings instance" msgstr "Een geassocieerde instantie van WebKitWebSettings" -#: WebKit/gtk/webkit/webkitwebview.cpp:2378 +#: ../webkit/webkitwebview.cpp:2702 msgid "Web Inspector" msgstr "Web-inspector" -#: WebKit/gtk/webkit/webkitwebview.cpp:2379 +#: ../webkit/webkitwebview.cpp:2703 msgid "The associated WebKitWebInspector instance" msgstr "De geassocieerde instantie van WebKitWebInspector" -#: WebKit/gtk/webkit/webkitwebview.cpp:2399 +#: ../webkit/webkitwebview.cpp:2723 msgid "Editable" msgstr "Bewerkbaar" -#: WebKit/gtk/webkit/webkitwebview.cpp:2400 +#: ../webkit/webkitwebview.cpp:2724 msgid "Whether content can be modified by the user" msgstr "Of de tekst gewijzigd kan worden door de gebruiker" -#: WebKit/gtk/webkit/webkitwebview.cpp:2406 +#: ../webkit/webkitwebview.cpp:2730 msgid "Transparent" msgstr "Transparant" -#: WebKit/gtk/webkit/webkitwebview.cpp:2407 +#: ../webkit/webkitwebview.cpp:2731 msgid "Whether content has a transparent background" msgstr "Of de inhoud een transparante achtergrond heeft" -#: WebKit/gtk/webkit/webkitwebview.cpp:2420 +#: ../webkit/webkitwebview.cpp:2744 msgid "Zoom level" msgstr "Zoomniveau" -#: WebKit/gtk/webkit/webkitwebview.cpp:2421 +#: ../webkit/webkitwebview.cpp:2745 msgid "The level of zoom of the content" msgstr "Zoomfactor van de inhoud" -#: WebKit/gtk/webkit/webkitwebview.cpp:2436 +#: ../webkit/webkitwebview.cpp:2760 msgid "Full content zoom" msgstr "Zoomen op volledige inhoud" -#: WebKit/gtk/webkit/webkitwebview.cpp:2437 +#: ../webkit/webkitwebview.cpp:2761 msgid "Whether the full content is scaled when zooming" msgstr "Of de volledige inhoud op schaal wordt gebracht bij het zoomen" -#: WebKit/gtk/webkit/webkitwebview.cpp:2450 -msgid "Encoding" -msgstr "Codering" - -#: WebKit/gtk/webkit/webkitwebview.cpp:2451 +#: ../webkit/webkitwebview.cpp:2775 msgid "The default encoding of the web view" msgstr "Standaard codering van de webweergave" -#: WebKit/gtk/webkit/webkitwebview.cpp:2464 +#: ../webkit/webkitwebview.cpp:2788 msgid "Custom Encoding" msgstr "Aangepaste codering" -#: WebKit/gtk/webkit/webkitwebview.cpp:2465 +#: ../webkit/webkitwebview.cpp:2789 msgid "The custom encoding of the web view" msgstr "De aangepaste codering van de webweergave" -#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +#: ../webkit/webkitwebview.cpp:2841 msgid "Icon URI" msgstr "Pictogram-URI" -#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +#: ../webkit/webkitwebview.cpp:2842 msgid "The URI for the favicon for the #WebKitWebView." msgstr "De URI voor het favicon van de #WebKitWebView." -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 msgid "Submit" msgstr "Indienen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 msgid "Reset" msgstr "Herinitialiseren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 -msgid "_Searchable Index" -msgstr "Door_zoekbare index" +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 +msgid "This is a searchable index. Enter search keywords: " +msgstr "Dit is een doorzoekbare index. Voer zoekwoorden in: " -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" msgstr "Kies een bestand" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 msgid "(None)" msgstr "(Geen)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 msgid "Open Link in New _Window" msgstr "Verwijzing openen in _nieuw venster" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 msgid "_Download Linked File" msgstr "Bestand _downloaden" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 msgid "Copy Link Loc_ation" msgstr "Verwijzings_adres kopiëren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 msgid "Open _Image in New Window" msgstr "Af_beelding openen in nieuw venster" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 msgid "Sa_ve Image As" msgstr "Afbeelding opslaan _als…" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 msgid "Cop_y Image" msgstr "Afbeelding _kopiëren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 msgid "Open _Frame in New Window" msgstr "_Deelvenster openen in nieuw venster" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 msgid "_Reload" msgstr "Ve_rversen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 msgid "No Guesses Found" msgstr "Geen suggesties gevonden" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 msgid "_Ignore Spelling" msgstr "Spelling _negeren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 msgid "_Learn Spelling" msgstr "_Spelling leren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 msgid "_Search the Web" msgstr "Het web door_zoeken" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 msgid "_Look Up in Dictionary" msgstr "O_pzoeken in woordenboek" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 msgid "_Open Link" msgstr "Koppeling _openen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 msgid "Ignore _Grammar" msgstr "_Grammatica negeren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 msgid "Spelling and _Grammar" msgstr "Spelling en _grammatica" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Show Spelling and Grammar" msgstr "Spelling en grammatica _tonen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Hide Spelling and Grammar" msgstr "Spelling en grammatica ver_bergen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 msgid "_Check Document Now" msgstr "Het document nu _controleren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 msgid "Check Spelling While _Typing" msgstr "_Spelling controleren tijdens het typen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 msgid "Check _Grammar With Spelling" msgstr "_Grammatica controleren naast spelling" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 msgid "_Font" msgstr "_Lettertype" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 msgid "_Outline" msgstr "_Omtrek" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 msgid "Inspect _Element" msgstr "_Element inspecteren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" msgstr "Geen recente zoekopdrachten" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" msgstr "Recente zoekopdrachten" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" msgstr "Recente zoekopdrachten _wissen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" msgstr "term" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" msgstr "definitie" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" msgstr "druk" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" msgstr "selecteren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 msgid "activate" msgstr "activeren" # check / uncheck is aankruisen / deselecteren? -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" msgstr "deselecteren" # check / uncheck is aankruisen / deselecteren? -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" msgstr "aankruisen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" msgstr "springen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:341 +msgid "Missing Plug-in" +msgstr "Ontbrekende plug-in" + +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 +msgid "Plug-in Failure" +msgstr "Fout in plug-in" + +#. FIXME: If this file gets localized, this should really be localized as one string with a wildcard for the number. +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:353 msgid " files" msgstr " bestanden" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:358 msgid "Unknown" msgstr "Onbekend" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:363 +#, c-format +msgctxt "Title string for images" +msgid "%s (%dx%d pixels)" +msgstr "%s (%d×%d pixels)" + +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 msgid "Loading..." msgstr "Laden…" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:380 msgid "Live Broadcast" msgstr "Live-uitzending" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:386 msgid "audio element controller" msgstr "besturing audio-element" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:388 msgid "video element controller" msgstr "besturing video-element" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:390 msgid "mute" msgstr "dempen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:392 msgid "unmute" msgstr "geluid aan" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:394 msgid "play" msgstr "afspelen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:396 msgid "pause" msgstr "pauze" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:398 msgid "movie time" msgstr "afspeelduur" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:400 msgid "timeline slider thumb" -msgstr "" +msgstr "tijdschuifbalk-miniatuur" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:402 msgid "back 30 seconds" msgstr "30 seconden terug" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:404 msgid "return to realtime" msgstr "terug naar realtime" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:406 msgid "elapsed time" msgstr "verstreken tijd" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:408 msgid "remaining time" msgstr "tijd te gaan" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:410 msgid "status" msgstr "status" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:412 msgid "fullscreen" msgstr "volledig scherm" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:414 msgid "fast forward" msgstr "snel vooruit" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:416 msgid "fast reverse" msgstr "snel achteruit" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 msgid "show closed captions" msgstr "ondertiteling tonen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 msgid "hide closed captions" msgstr "ondertiteling verbergen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:429 msgid "audio element playback controls and status display" msgstr "afspeelbesturing en statusweergave audio-element" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:431 msgid "video element playback controls and status display" msgstr "afspeelbesturing en statusweergave video-element" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:433 msgid "mute audio tracks" msgstr "audiosporen dempen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:435 msgid "unmute audio tracks" msgstr "audiosporen laten horen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:437 msgid "begin playback" msgstr "afspelen beginnen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:439 msgid "pause playback" msgstr "afspelen pauzeren" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:441 msgid "movie time scrubber" -msgstr "" +msgstr "filmtijdscrubber" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:443 msgid "movie time scrubber thumb" -msgstr "" +msgstr "filmtijdscrubber-miniatuur" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:445 msgid "seek movie back 30 seconds" msgstr "30 seconden terugzoeken in film" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:447 msgid "return streaming movie to real time" msgstr "terugkeren naar realtime in streamende film" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:449 msgid "current movie time in seconds" msgstr "huidige filmtijd in seconden" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:451 msgid "number of seconds of movie remaining" msgstr "aantal seconden film te gaan" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:453 msgid "current movie status" msgstr "huidige filmstatus" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:455 msgid "seek quickly back" msgstr "snel achteruit zoeken" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:457 msgid "seek quickly forward" msgstr "snel vooruit zoeken" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:459 msgid "Play movie in fullscreen mode" msgstr "Film afspelen in volledig scherm" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 msgid "start displaying closed captions" msgstr "beginnen met tonen van ondertiteling" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:463 msgid "stop displaying closed captions" msgstr "stoppen met tonen van ondertiteling" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:472 msgid "indefinite time" msgstr "onbepaalde tijd" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 msgid "value missing" msgstr "waarde ontbreekt" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:508 msgid "type mismatch" msgstr "type komt niet overeen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:513 msgid "pattern mismatch" msgstr "patroon komt niet overeen" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:518 msgid "too long" msgstr "te lang" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:523 msgid "range underflow" msgstr "onder bereik" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:528 msgid "range overflow" msgstr "over bereik" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:533 msgid "step mismatch" msgstr "stap komt niet overeen" + +#~ msgid "_Searchable Index" +#~ msgstr "Door_zoekbare index" diff --git a/WebKit/gtk/tests/testatk.c b/WebKit/gtk/tests/testatk.c index 9ca7c05..c8df4ef 100644 --- a/WebKit/gtk/tests/testatk.c +++ b/WebKit/gtk/tests/testatk.c @@ -44,6 +44,8 @@ static const char* contentsInTable = "<html><body><table><tr><td>foo</td><td>bar static const char* contentsInTableWithHeaders = "<html><body><table><tr><th>foo</th><th>bar</th><th colspan='2'>baz</th></tr><tr><th>qux</th><td>1</td><td>2</td><td>3</td></tr><tr><th rowspan='2'>quux</th><td>4</td><td>5</td><td>6</td></tr><tr><td>6</td><td>7</td><td>8</td></tr><tr><th>corge</th><td>9</td><td>10</td><td>11</td></tr></table><table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table></body></html>"; +static const char* formWithTextInputs = "<html><body><form><input type='text' name='entry' /></form></body></html>"; + static const char* listsOfItems = "<html><body><ul><li>text only</li><li><a href='foo'>link only</a></li><li>text and a <a href='bar'>link</a></li></ul><ol><li>text only</li><li><a href='foo'>link only</a></li><li>text and a <a href='bar'>link</a></li></ol></body></html>"; static const char* textForSelections = "<html><body><p>A paragraph with plain text</p><p>A paragraph with <a href='http://webkit.org'>a link</a> in the middle</p></body></html>"; @@ -761,7 +763,7 @@ static void testWekitAtkTextSelections(void) webkit_web_view_load_string(webView, textForSelections, NULL, NULL, NULL); loop = g_main_loop_new(NULL, TRUE); - g_timeout_add(100, (GSourceFunc)bail_out, loop); + g_idle_add((GSourceFunc)bail_out, loop); g_main_loop_run(loop); obj = gtk_widget_get_accessible(GTK_WIDGET(webView)); @@ -859,7 +861,7 @@ static void testWekitAtkTextSelections(void) g_object_unref(webView); } -static void test_webkit_atk_get_extents(void) +static void testWebkitAtkGetExtents(void) { WebKitWebView* webView; AtkObject* obj; @@ -872,7 +874,7 @@ static void test_webkit_atk_get_extents(void) webkit_web_view_load_string(webView, centeredContents, NULL, NULL, NULL); loop = g_main_loop_new(NULL, TRUE); - g_timeout_add(100, (GSourceFunc)bail_out, loop); + g_idle_add((GSourceFunc)bail_out, loop); g_main_loop_run(loop); obj = gtk_widget_get_accessible(GTK_WIDGET(webView)); @@ -964,38 +966,32 @@ static void test_webkit_atk_get_extents(void) static void testWebkitAtkListsOfItems(void) { - WebKitWebView* webView; - AtkObject* obj; - AtkObject* uList; - AtkObject* oList; - AtkObject* item1; - AtkObject* item2; - AtkObject* item3; - GMainLoop* loop; - - webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); + WebKitWebView* 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, listsOfItems, NULL, NULL, NULL); - loop = g_main_loop_new(NULL, TRUE); + GMainLoop* loop = g_main_loop_new(NULL, TRUE); - g_timeout_add(100, (GSourceFunc)bail_out, loop); + g_idle_add((GSourceFunc)bail_out, loop); g_main_loop_run(loop); - obj = gtk_widget_get_accessible(GTK_WIDGET(webView)); + AtkObject* obj = gtk_widget_get_accessible(GTK_WIDGET(webView)); g_assert(obj); // Unordered list - uList = atk_object_ref_accessible_child(obj, 0); + AtkObject* uList = atk_object_ref_accessible_child(obj, 0); g_assert(ATK_OBJECT(uList)); g_assert(atk_object_get_role(uList) == ATK_ROLE_LIST); g_assert_cmpint(atk_object_get_n_accessible_children(uList), ==, 3); - item1 = atk_object_ref_accessible_child(uList, 0); - item2 = atk_object_ref_accessible_child(uList, 1); - item3 = atk_object_ref_accessible_child(uList, 2); + AtkObject* item1 = atk_object_ref_accessible_child(uList, 0); + g_assert(ATK_IS_TEXT(item1)); + AtkObject* item2 = atk_object_ref_accessible_child(uList, 1); + g_assert(ATK_IS_TEXT(item2)); + AtkObject* item3 = atk_object_ref_accessible_child(uList, 2); + g_assert(ATK_IS_TEXT(item3)); g_assert_cmpint(atk_object_get_n_accessible_children(item1), ==, 0); g_assert_cmpint(atk_object_get_n_accessible_children(item2), ==, 1); @@ -1011,18 +1007,21 @@ static void testWebkitAtkListsOfItems(void) // Ordered list - oList = atk_object_ref_accessible_child(obj, 1); + AtkObject* oList = atk_object_ref_accessible_child(obj, 1); g_assert(ATK_OBJECT(oList)); g_assert(atk_object_get_role(oList) == ATK_ROLE_LIST); g_assert_cmpint(atk_object_get_n_accessible_children(oList), ==, 3); item1 = atk_object_ref_accessible_child(oList, 0); + g_assert(ATK_IS_TEXT(item1)); item2 = atk_object_ref_accessible_child(oList, 1); + g_assert(ATK_IS_TEXT(item2)); item3 = atk_object_ref_accessible_child(oList, 2); + g_assert(ATK_IS_TEXT(item3)); - g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item1), 0, -1), ==, "1 text only"); - g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item2), 0, -1), ==, "2 link only"); - g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item3), 0, -1), ==, "3 text and a link"); + g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item1), 0, -1), ==, "1. text only"); + g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item2), 0, -1), ==, "2. link only"); + g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item3), 0, -1), ==, "3. text and a link"); g_assert_cmpint(atk_object_get_n_accessible_children(item1), ==, 0); g_assert_cmpint(atk_object_get_n_accessible_children(item2), ==, 1); @@ -1037,6 +1036,68 @@ static void testWebkitAtkListsOfItems(void) g_object_unref(webView); } +static gboolean textInserted = FALSE; +static gboolean textDeleted = FALSE; + +static void textChangedCb(AtkText* text, gint pos, gint len, const gchar* detail) +{ + g_assert(text && ATK_IS_OBJECT(text)); + + if (!g_strcmp0(detail, "insert")) + textInserted = TRUE; + else if (!g_strcmp0(detail, "delete")) + textDeleted = TRUE; +} + +static gboolean checkTextChanges(gpointer unused) +{ + g_assert_cmpint(textInserted, ==, TRUE); + g_assert_cmpint(textDeleted, ==, TRUE); + return FALSE; +} + +static void testWebkitAtkTextChangedNotifications(void) +{ + WebKitWebView* 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, formWithTextInputs, 0, 0, 0); + + // Manually spin the main context to get the accessible objects + while (g_main_context_pending(0)) + g_main_context_iteration(0, TRUE); + + AtkObject* obj = gtk_widget_get_accessible(GTK_WIDGET(webView)); + g_assert(obj); + + AtkObject* form = atk_object_ref_accessible_child(obj, 0); + g_assert(ATK_IS_OBJECT(form)); + + AtkObject* textEntry = atk_object_ref_accessible_child(form, 0); + g_assert(ATK_IS_EDITABLE_TEXT(textEntry)); + g_assert(atk_object_get_role(ATK_OBJECT(textEntry)) == ATK_ROLE_ENTRY); + + g_signal_connect(textEntry, "text-changed::insert", + G_CALLBACK(textChangedCb), + (gpointer)"insert"); + g_signal_connect(textEntry, "text-changed::delete", + G_CALLBACK(textChangedCb), + (gpointer)"delete"); + + gint pos = 0; + atk_editable_text_insert_text(ATK_EDITABLE_TEXT(textEntry), "foo bar baz", 11, &pos); + atk_editable_text_delete_text(ATK_EDITABLE_TEXT(textEntry), 4, 7); + textInserted = FALSE; + textDeleted = FALSE; + + g_idle_add((GSourceFunc)checkTextChanges, 0); + + g_object_unref(form); + g_object_unref(textEntry); + g_object_unref(webView); +} + int main(int argc, char** argv) { g_thread_init(NULL); @@ -1054,8 +1115,9 @@ int main(int argc, char** argv) g_test_add_func("/webkit/atk/getHeadersInTable", testWebkitAtkGetHeadersInTable); g_test_add_func("/webkit/atk/textAttributes", testWebkitAtkTextAttributes); g_test_add_func("/webkit/atk/textSelections", testWekitAtkTextSelections); - g_test_add_func("/webkit/atk/get_extents", test_webkit_atk_get_extents); + g_test_add_func("/webkit/atk/getExtents", testWebkitAtkGetExtents); g_test_add_func("/webkit/atk/listsOfItems", testWebkitAtkListsOfItems); + g_test_add_func("/webkit/atk/textChangedNotifications", testWebkitAtkTextChangedNotifications); return g_test_run (); } diff --git a/WebKit/gtk/tests/testmimehandling.c b/WebKit/gtk/tests/testmimehandling.c index 3a0eded..2d6c623 100644 --- a/WebKit/gtk/tests/testmimehandling.c +++ b/WebKit/gtk/tests/testmimehandling.c @@ -134,8 +134,9 @@ static gboolean mime_type_policy_decision_requested_cb(WebKitWebView* view, WebK return FALSE; } -static void test_mime_type(const char* name) +static void testRemoteMimeType(const void* data) { + const char* name = (const char*) data; WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new()); g_object_ref_sink(G_OBJECT(view)); @@ -155,24 +156,31 @@ static void test_mime_type(const char* name) g_object_unref(view); } -static void test_mime_pdf() +static void testLocalMimeType(const void* data) { - test_mime_type("pdf"); -} + const char* typeName = (const char*) data; + WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new()); + g_object_ref_sink(G_OBJECT(view)); -static void test_mime_html() -{ - test_mime_type("html"); -} + loop = g_main_loop_new(NULL, TRUE); -static void test_mime_text() -{ - test_mime_type("text"); -} + g_object_connect(G_OBJECT(view), + "signal::notify::load-status", idle_quit_loop_cb, NULL, + "signal::mime-type-policy-decision-requested", mime_type_policy_decision_requested_cb, g_strdup(typeName), + NULL); -static void test_mime_ogg() -{ - test_mime_type("ogg"); + gchar* filename = g_strdup_printf("test.%s", typeName); + GFile* file = g_file_new_for_path(filename); + g_free(filename); + + gchar* fileURI = g_file_get_uri(file); + g_object_unref(file); + + webkit_web_view_load_uri(view, fileURI); + g_free(fileURI); + + g_main_loop_run(loop); + g_object_unref(view); } int main(int argc, char** argv) @@ -198,10 +206,14 @@ int main(int argc, char** argv) soup_uri_free(soup_uri); g_test_bug_base("https://bugs.webkit.org/"); - g_test_add_func("/webkit/mime/PDF", test_mime_pdf); - g_test_add_func("/webkit/mime/HTML", test_mime_html); - g_test_add_func("/webkit/mime/TEXT", test_mime_text); - g_test_add_func("/webkit/mime/OGG", test_mime_ogg); + g_test_add_data_func("/webkit/mime/remote-PDF", "pdf", testRemoteMimeType); + g_test_add_data_func("/webkit/mime/remote-HTML", "html", testRemoteMimeType); + g_test_add_data_func("/webkit/mime/remote-TEXT", "text", testRemoteMimeType); + g_test_add_data_func("/webkit/mime/remote-OGG", "ogg", testRemoteMimeType); + g_test_add_data_func("/webkit/mime/local-PDF", "pdf", testLocalMimeType); + g_test_add_data_func("/webkit/mime/local-HTML", "html", testLocalMimeType); + g_test_add_data_func("/webkit/mime/local-TEXT", "text", testLocalMimeType); + g_test_add_data_func("/webkit/mime/local-OGG", "ogg", testLocalMimeType); return g_test_run(); } diff --git a/WebKit/gtk/webkit/webkitdownload.cpp b/WebKit/gtk/webkit/webkitdownload.cpp index 1e45250..1472cb5 100644 --- a/WebKit/gtk/webkit/webkitdownload.cpp +++ b/WebKit/gtk/webkit/webkitdownload.cpp @@ -559,7 +559,7 @@ const gchar* webkit_download_get_uri(WebKitDownload* download) * Retrieves the #WebKitNetworkRequest object that backs the download * process. * - * Returns: the #WebKitNetworkRequest instance + * Returns: (transfer none): the #WebKitNetworkRequest instance * * Since: 1.1.2 */ @@ -578,7 +578,7 @@ WebKitNetworkRequest* webkit_download_get_network_request(WebKitDownload* downlo * Retrieves the #WebKitNetworkResponse object that backs the download * process. * - * Returns: the #WebKitNetworkResponse instance + * Returns: (transfer none): the #WebKitNetworkResponse instance * * Since: 1.1.16 */ diff --git a/WebKit/gtk/webkit/webkitnetworkrequest.cpp b/WebKit/gtk/webkit/webkitnetworkrequest.cpp index 8b50948..6180efa 100644 --- a/WebKit/gtk/webkit/webkitnetworkrequest.cpp +++ b/WebKit/gtk/webkit/webkitnetworkrequest.cpp @@ -241,7 +241,7 @@ G_CONST_RETURN gchar* webkit_network_request_get_uri(WebKitNetworkRequest* reque } /** - * webkit_network_request_get_soup_message: + * webkit_network_request_get_message: * @request: a #WebKitNetworkRequest * * Obtains the #SoupMessage held and used by the given request. Notice @@ -249,7 +249,7 @@ G_CONST_RETURN gchar* webkit_network_request_get_uri(WebKitNetworkRequest* reque * handlers is only supported (as in, will only affect what is * actually sent to the server) where explicitly documented. * - * Returns: the #SoupMessage + * Returns: (transfer none): the #SoupMessage * Since: 1.1.9 */ SoupMessage* webkit_network_request_get_message(WebKitNetworkRequest* request) diff --git a/WebKit/gtk/webkit/webkitnetworkresponse.cpp b/WebKit/gtk/webkit/webkitnetworkresponse.cpp index d4dd562..0aca6d8 100644 --- a/WebKit/gtk/webkit/webkitnetworkresponse.cpp +++ b/WebKit/gtk/webkit/webkitnetworkresponse.cpp @@ -241,14 +241,14 @@ G_CONST_RETURN gchar* webkit_network_response_get_uri(WebKitNetworkResponse* res } /** - * webkit_network_response_get_soup_message: + * webkit_network_response_get_message: * @response: a #WebKitNetworkResponse * * Obtains the #SoupMessage that represents the given response. Notice * that only the response side of the HTTP conversation is * represented. * - * Returns: the #SoupMessage + * Returns: (transfer none): the #SoupMessage * Since: 1.1.14 */ SoupMessage* webkit_network_response_get_message(WebKitNetworkResponse* response) diff --git a/WebKit/gtk/webkit/webkitsecurityorigin.cpp b/WebKit/gtk/webkit/webkitsecurityorigin.cpp index de074ae..67ad0cf 100644 --- a/WebKit/gtk/webkit/webkitsecurityorigin.cpp +++ b/WebKit/gtk/webkit/webkitsecurityorigin.cpp @@ -353,7 +353,8 @@ void webkit_security_origin_set_web_database_quota(WebKitSecurityOrigin* securit * * Returns a list of all Web Databases in the security origin. * - * Returns: a #GList of databases in the security origin. + * Returns: (transfer container) (element-type WebKitWebDatabase): a + * #GList of databases in the security origin. * * Since: 1.1.14 **/ diff --git a/WebKit/gtk/webkit/webkitwebdatabase.cpp b/WebKit/gtk/webkit/webkitwebdatabase.cpp index d4f6198..cd85e73 100644 --- a/WebKit/gtk/webkit/webkitwebdatabase.cpp +++ b/WebKit/gtk/webkit/webkitwebdatabase.cpp @@ -284,7 +284,7 @@ static void webkit_web_database_set_name(WebKitWebDatabase* webDatabase, const g * * Returns the security origin of the #WebKitWebDatabase. * - * Returns: the security origin of the database + * Returns: (transfer none): the security origin of the database * * Since: 1.1.14 **/ diff --git a/WebKit/gtk/webkit/webkitwebdatasource.cpp b/WebKit/gtk/webkit/webkitwebdatasource.cpp index 9b755ad..38c9c48 100644 --- a/WebKit/gtk/webkit/webkitwebdatasource.cpp +++ b/WebKit/gtk/webkit/webkitwebdatasource.cpp @@ -194,14 +194,15 @@ WebKitWebDataSource* webkit_web_data_source_new_with_request(WebKitNetworkReques } /** - * webkit_web_data_source_get_web_frame + * webkit_web_data_source_get_web_frame: * @data_source: a #WebKitWebDataSource * * Returns the #WebKitWebFrame that represents this data source * - * Return value: the #WebKitWebFrame that represents the @data_source. The - * #WebKitWebFrame is owned by WebKit and should not be freed or destroyed. - * This will return %NULL of the @data_source is not attached to a frame. + * Return value: (transfer none): the #WebKitWebFrame that represents + * the @data_source. The #WebKitWebFrame is owned by WebKit and should + * not be freed or destroyed. This will return %NULL if the + * @data_source is not attached to a frame. * * Since: 1.1.14 */ @@ -227,7 +228,7 @@ WebKitWebFrame* webkit_web_data_source_get_web_frame(WebKitWebDataSource* webDat * prior to the "committed" load state. See webkit_web_data_source_get_request * for getting the "committed" request. * - * Return value: the original #WebKitNetworkRequest + * Return value: (transfer none): the original #WebKitNetworkRequest * * Since: 1.1.14 */ @@ -254,9 +255,9 @@ WebKitNetworkRequest* webkit_web_data_source_get_initial_request(WebKitWebDataSo * the request that was "committed", and hence, different from the request you * get from the webkit_web_data_source_get_initial_request method. * - * Return value: the #WebKitNetworkRequest that created the @data_source or - * %NULL if the @data_source is not attached to the frame or the frame hasn't - * been loaded. + * Return value: (transfer none): the #WebKitNetworkRequest that + * created the @data_source or %NULL if the @data_source is not + * attached to the frame or the frame hasn't been loaded. * * Since: 1.1.14 */ @@ -333,8 +334,9 @@ gboolean webkit_web_data_source_is_loading(WebKitWebDataSource* webDataSource) * frame hasn't loaded any data. Use webkit_web_data_source_is_loading to test * if data source is in the process of loading. * - * Return value: a #GString which contains the raw data that represents the @data_source or %NULL if the - * @data_source hasn't loaded any data. + * Return value: (transfer none): a #GString which contains the raw + * data that represents the @data_source or %NULL if the @data_source + * hasn't loaded any data. * * Since: 1.1.14 */ @@ -364,8 +366,8 @@ GString* webkit_web_data_source_get_data(WebKitWebDataSource* webDataSource) * * Returns the main resource of the @data_source * - * Return value: a new #WebKitWebResource representing the main resource of - * the @data_source. + * Return value: (transfer none): a new #WebKitWebResource + * representing the main resource of the @data_source. * * Since: 1.1.14 */ @@ -414,14 +416,15 @@ G_CONST_RETURN gchar* webkit_web_data_source_get_unreachable_uri(WebKitWebDataSo } /** - * webkit_web_data_source_get_subresources + * webkit_web_data_source_get_subresources: * @data_source: a #WebKitWebDataSource * * Gives you a #GList of #WebKitWebResource objects that compose the * #WebKitWebView to which this #WebKitWebDataSource is attached. * - * Return value: a #GList of #WebKitWebResource objects; the objects are - * owned by WebKit, but the GList must be freed. + * Return value: (element-type WebKitWebResource) (transfer container): + * a #GList of #WebKitWebResource objects; the objects are owned by + * WebKit, but the GList must be freed. * * Since: 1.1.15 */ diff --git a/WebKit/gtk/webkit/webkitwebframe.cpp b/WebKit/gtk/webkit/webkitwebframe.cpp index 88f0bb7..c581ce6 100644 --- a/WebKit/gtk/webkit/webkitwebframe.cpp +++ b/WebKit/gtk/webkit/webkitwebframe.cpp @@ -449,7 +449,7 @@ G_CONST_RETURN gchar* webkit_web_frame_get_uri(WebKitWebFrame* frame) * The #WebKitWebView returned manages the entire hierarchy of #WebKitWebFrame * objects that contains @frame. * - * Return value: the #WebKitWebView that manages @frame + * Return value: (transfer none): the #WebKitWebView that manages @frame */ WebKitWebView* webkit_web_frame_get_web_view(WebKitWebFrame* frame) { @@ -491,7 +491,7 @@ G_CONST_RETURN gchar* webkit_web_frame_get_name(WebKitWebFrame* frame) * * Returns the @frame's parent frame, or %NULL if it has none. * - * Return value: the parent #WebKitWebFrame or %NULL in case there is none + * Return value: (transfer none): the parent #WebKitWebFrame or %NULL in case there is none */ WebKitWebFrame* webkit_web_frame_get_parent(WebKitWebFrame* frame) { @@ -662,7 +662,7 @@ void webkit_web_frame_reload(WebKitWebFrame* frame) * hierarchy, this function will search for a matching frame in other main * frame hierarchies. Returns %NULL if no match is found. * - * Return value: the found #WebKitWebFrame or %NULL in case none is found + * Return value: (transfer none): the found #WebKitWebFrame or %NULL in case none is found */ WebKitWebFrame* webkit_web_frame_find_frame(WebKitWebFrame* frame, const gchar* name) { @@ -684,7 +684,7 @@ WebKitWebFrame* webkit_web_frame_find_frame(WebKitWebFrame* frame, const gchar* * Gets the global JavaScript execution context. Use this function to bridge * between the WebKit and JavaScriptCore APIs. * - * Return value: the global JavaScript context + * Return value: (transfer none): the global JavaScript context */ JSGlobalContextRef webkit_web_frame_get_global_context(WebKitWebFrame* frame) { @@ -703,7 +703,7 @@ JSGlobalContextRef webkit_web_frame_get_global_context(WebKitWebFrame* frame) * * Returns the committed data source. * - * Return value: the committed #WebKitWebDataSource. + * Return value: (transfer none): the committed #WebKitWebDataSource. * * Since: 1.1.14 */ @@ -724,7 +724,7 @@ WebKitWebDataSource* webkit_web_frame_get_data_source(WebKitWebFrame* frame) * transition to a committed data source once any data has been received. Use * webkit_web_frame_get_data_source to get the committed data source. * - * Return value: the provisional #WebKitWebDataSource or %NULL if a load + * Return value: (transfer none): the provisional #WebKitWebDataSource or %NULL if a load * request is not in progress. * * Since: 1.1.14 @@ -1199,7 +1199,7 @@ GtkPolicyType webkit_web_frame_get_vertical_scrollbar_policy(WebKitWebFrame* fra * * Returns the @frame's security origin. * - * Return value: the security origin of @frame + * Return value: (transfer none): the security origin of @frame * * Since: 1.1.14 */ @@ -1241,7 +1241,7 @@ void webkit_web_frame_layout(WebKitWebFrame* frame) * frame was not created by a load. You must unref the object when you * are done with it. * - * Return value: a #WebKitNetworkResponse object + * Return value: (transfer full): a #WebKitNetworkResponse object * * Since: 1.1.18 */ diff --git a/WebKit/gtk/webkit/webkitwebhistoryitem.cpp b/WebKit/gtk/webkit/webkitwebhistoryitem.cpp index 8a9153c..ce30704 100644 --- a/WebKit/gtk/webkit/webkitwebhistoryitem.cpp +++ b/WebKit/gtk/webkit/webkitwebhistoryitem.cpp @@ -433,14 +433,14 @@ gdouble webkit_web_history_item_get_last_visited_time(WebKitWebHistoryItem* webH } /** - * webkit_web_history_item_copy : + * webkit_web_history_item_copy: * @web_history_item: a #WebKitWebHistoryItem * * Makes a copy of the item for use with other WebView objects. * * Since: 1.1.18 * - * Return value: the new #WebKitWebHistoryItem. + * Return value: (transfer full): the new #WebKitWebHistoryItem. */ WebKitWebHistoryItem* webkit_web_history_item_copy(WebKitWebHistoryItem* self) { diff --git a/WebKit/gtk/webkit/webkitwebinspector.cpp b/WebKit/gtk/webkit/webkitwebinspector.cpp index 2dc9315..ee3c8cd 100644 --- a/WebKit/gtk/webkit/webkitwebinspector.cpp +++ b/WebKit/gtk/webkit/webkitwebinspector.cpp @@ -426,8 +426,8 @@ void webkit_web_inspector_set_web_view(WebKitWebInspector *web_inspector, WebKit * that this method may return %NULL if the user hasn't inspected * anything. * - * Returns: the #WebKitWebView instance that is used to render the - * inspector or %NULL if it is not yet created. + * Returns: (transfer none): the #WebKitWebView instance that is used + * to render the inspector or %NULL if it is not yet created. * * Since: 1.0.3 **/ diff --git a/WebKit/gtk/webkit/webkitwebresource.cpp b/WebKit/gtk/webkit/webkitwebresource.cpp index ba9c3af..fb0acfc 100644 --- a/WebKit/gtk/webkit/webkitwebresource.cpp +++ b/WebKit/gtk/webkit/webkitwebresource.cpp @@ -285,8 +285,9 @@ WebKitWebResource* webkit_web_resource_new(const gchar* data, * * Returns the data of the @webResource. * - * Return value: a #GString containing the character data of the @webResource. - * The string is owned by WebKit and should not be freed or destroyed. + * Return value: (transfer none): a #GString containing the character + * data of the @webResource. The string is owned by WebKit and should + * not be freed or destroyed. * * Since: 1.1.14 */ diff --git a/WebKit/gtk/webkit/webkitwebsettings.cpp b/WebKit/gtk/webkit/webkitwebsettings.cpp index 767fce1..8a207d9 100644 --- a/WebKit/gtk/webkit/webkitwebsettings.cpp +++ b/WebKit/gtk/webkit/webkitwebsettings.cpp @@ -108,6 +108,7 @@ struct _WebKitWebSettingsPrivate { gboolean enable_page_cache; gboolean auto_resize_window; gboolean enable_java_applet; + gboolean enable_hyperlink_auditing; }; #define WEBKIT_WEB_SETTINGS_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_SETTINGS, WebKitWebSettingsPrivate)) @@ -157,7 +158,8 @@ enum { PROP_ENABLE_SITE_SPECIFIC_QUIRKS, PROP_ENABLE_PAGE_CACHE, PROP_AUTO_RESIZE_WINDOW, - PROP_ENABLE_JAVA_APPLET + PROP_ENABLE_JAVA_APPLET, + PROP_ENABLE_HYPERLINK_AUDITING }; // Create a default user agent string @@ -863,6 +865,21 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass) TRUE, flags)); + /** + * WebKitWebSettings:enable-hyperlink-auditing: + * + * Enable or disable support for <a ping>. + * + * Since: 1.2.5 + */ + g_object_class_install_property(gobject_class, + PROP_ENABLE_HYPERLINK_AUDITING, + g_param_spec_boolean("enable-hyperlink-auditing", + _("Enable Hyperlink Auditing"), + _("Whether <a ping> should be able to send pings"), + FALSE, + flags)); + g_type_class_add_private(klass, sizeof(WebKitWebSettingsPrivate)); } @@ -1083,6 +1100,9 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con case PROP_ENABLE_JAVA_APPLET: priv->enable_java_applet = g_value_get_boolean(value); break; + case PROP_ENABLE_HYPERLINK_AUDITING: + priv->enable_hyperlink_auditing = g_value_get_boolean(value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; @@ -1224,6 +1244,9 @@ static void webkit_web_settings_get_property(GObject* object, guint prop_id, GVa case PROP_ENABLE_JAVA_APPLET: g_value_set_boolean(value, priv->enable_java_applet); break; + case PROP_ENABLE_HYPERLINK_AUDITING: + g_value_set_boolean(value, priv->enable_hyperlink_auditing); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; @@ -1248,7 +1271,7 @@ WebKitWebSettings* webkit_web_settings_new() * * Copies an existing #WebKitWebSettings instance. * - * Returns: a new #WebKitWebSettings instance + * Returns: (transfer full): a new #WebKitWebSettings instance **/ WebKitWebSettings* webkit_web_settings_copy(WebKitWebSettings* web_settings) { @@ -1297,6 +1320,7 @@ WebKitWebSettings* webkit_web_settings_copy(WebKitWebSettings* web_settings) "enable-page-cache", priv->enable_page_cache, "auto-resize-window", priv->auto_resize_window, "enable-java-applet", priv->enable_java_applet, + "enable-hyperlink-auditing", priv->enable_hyperlink_auditing, NULL)); return copy; diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp index 3212450..762888a 100644 --- a/WebKit/gtk/webkit/webkitwebview.cpp +++ b/WebKit/gtk/webkit/webkitwebview.cpp @@ -1503,7 +1503,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) * the new #WebKitWebView. The widget to which the widget is added will * handle that. * - * Return value: a newly allocated #WebKitWebView, or %NULL + * Return value: (transfer full): a newly allocated #WebKitWebView, or %NULL * * Since: 1.0.3 */ @@ -2264,7 +2264,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) * to set the property value of "webkit-widget-is-selected". This can * be used to draw a visual indicator of the selection. * - * Return value: a new #GtkWidget, or %NULL + * Return value: (transfer full): a new #GtkWidget, or %NULL * * Since: 1.1.8 */ @@ -2853,7 +2853,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView) javaScriptCanAccessClipboard, enableOfflineWebAppCache, enableUniversalAccessFromFileURI, enableFileAccessFromFileURI, enableDOMPaste, tabKeyCyclesThroughElements, - enableSiteSpecificQuirks, usePageCache, enableJavaApplet; + enableSiteSpecificQuirks, usePageCache, enableJavaApplet, enableHyperlinkAuditing; WebKitEditingBehavior editingBehavior; @@ -2890,6 +2890,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView) "enable-site-specific-quirks", &enableSiteSpecificQuirks, "enable-page-cache", &usePageCache, "enable-java-applet", &enableJavaApplet, + "enable-hyperlink-auditing", &enableHyperlinkAuditing, NULL); settings->setDefaultTextEncodingName(defaultEncoding); @@ -2925,6 +2926,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView) settings->setNeedsSiteSpecificQuirks(enableSiteSpecificQuirks); settings->setUsesPageCache(usePageCache); settings->setJavaEnabled(enableJavaApplet); + settings->setHyperlinkAuditingEnabled(enableHyperlinkAuditing); Page* page = core(webView); if (page) @@ -3036,6 +3038,8 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar settings->setUsesPageCache(g_value_get_boolean(&value)); else if (name == g_intern_string("enable-java-applet")) settings->setJavaEnabled(g_value_get_boolean(&value)); + else if (name == g_intern_string("enable-hyperlink-auditing")) + settings->setHyperlinkAuditingEnabled(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); @@ -3217,7 +3221,7 @@ static void webkit_web_view_set_window_features(WebKitWebView* webView, WebKitWe } /** - * webkit_web_view_get_window_features + * webkit_web_view_get_window_features: * @web_view: a #WebKitWebView * * Returns the instance of #WebKitWebWindowFeatures held by the given @@ -3642,12 +3646,19 @@ void webkit_web_view_unmark_text_matches(WebKitWebView* webView) return core(webView)->unmarkAllTextMatches(); } +/** + * webkit_web_view_get_main_frame: + * @webView: a #WebKitWebView + * + * Returns the main frame for the @webView. + * + * Return value: (transfer none): the main #WebKitWebFrame for @webView + */ WebKitWebFrame* webkit_web_view_get_main_frame(WebKitWebView* webView) { g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), NULL); - WebKitWebViewPrivate* priv = webView->priv; - return priv->mainFrame; + return webView->priv->mainFrame; } /** @@ -3656,7 +3667,7 @@ WebKitWebFrame* webkit_web_view_get_main_frame(WebKitWebView* webView) * * Returns the frame that has focus or an active text selection. * - * Return value: The focused #WebKitWebFrame or %NULL if no frame is focused + * Return value: (transfer none): The focused #WebKitWebFrame or %NULL if no frame is focused */ WebKitWebFrame* webkit_web_view_get_focused_frame(WebKitWebView* webView) { @@ -4532,7 +4543,7 @@ void webkit_web_view_set_tooltip_text(WebKitWebView* webView, const char* toolti * Does a 'hit test' in the coordinates specified by @event to figure * out context information about that position in the @webView. * - * Returns: a newly created #WebKitHitTestResult with the context of the + * Returns: (transfer none): a newly created #WebKitHitTestResult with the context of the * specified position. * * Since: 1.1.15 @@ -4574,7 +4585,7 @@ G_CONST_RETURN gchar* webkit_web_view_get_icon_uri(WebKitWebView* webView) * webkit_web_view_get_dom_document: * @webView: a #WebKitWebView * - * Returns: the #WebKitDOMDocument currently loaded in the @webView + * Returns: (transfer none): the #WebKitDOMDocument currently loaded in the @webView * * Since: 1.3.1 **/ diff --git a/WebKit/haiku/ChangeLog b/WebKit/haiku/ChangeLog index 718c4c3..d55ce71 100644 --- a/WebKit/haiku/ChangeLog +++ b/WebKit/haiku/ChangeLog @@ -1,3 +1,14 @@ +2010-09-28 Jenn Braithwaite <jennb@chromium.org> + + Reviewed by Dmitry Titov. + + Added oldPage param to FrameLoaderClient::didTransferChildFrameToNewDocument. + https://bugs.webkit.org/show_bug.cgi?id=46663 + + * WebCoreSupport/FrameLoaderClientHaiku.cpp: + (WebCore::FrameLoaderClientHaiku::didTransferChildFrameToNewDocument): + * WebCoreSupport/FrameLoaderClientHaiku.h: + 2010-09-13 Enrica Casucci <enrica@apple.com> Reviewed by Sam Weinig. diff --git a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp index 705a333..cae0ed1 100644 --- a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp +++ b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp @@ -741,7 +741,7 @@ PassRefPtr<Frame> FrameLoaderClientHaiku::createFrame(const KURL& url, const Str return 0; } -void FrameLoaderClientHaiku::didTransferChildFrameToNewDocument() +void FrameLoaderClientHaiku::didTransferChildFrameToNewDocument(Page*) { } @@ -854,4 +854,3 @@ void FrameLoaderClientHaiku::transitionToCommittedForNewPage() } } // namespace WebCore - diff --git a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h index eafbfc3..1701cb0 100644 --- a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h +++ b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h @@ -221,7 +221,7 @@ namespace WebCore { virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement*, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); - virtual void didTransferChildFrameToNewDocument(); + virtual void didTransferChildFrameToNewDocument(WebCore::Page*); virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually); @@ -252,4 +252,3 @@ namespace WebCore { } // namespace WebCore #endif // FrameLoaderClientHaiku_h - diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog index a43b4c5..d707720 100644 --- a/WebKit/mac/ChangeLog +++ b/WebKit/mac/ChangeLog @@ -1,3 +1,261 @@ +2010-09-28 Johnny Ding <jnd@chromium.org> + + Reviewed by Adam Barth. + + https://bugs.webkit.org/show_bug.cgi?id=41292 + Some windowed plugins did not handle events through EventHandler, so we + never set right gesture state for those events. + This change is to set right allowPopupsFromPlugin flag to current + execution frame, so WeKit can always get right gesture state on Mac. + From Mac Snow Leopard, the plugin is run under "WebKitPluginHost,app" + process, that process passes the allowPopupsFromPlugin flag to + WKPCEvaluate(in NetscapePluginHostProxy.mm), then flag is set in + NetscapePluginInstanceProxy::evaluate. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView sendEvent:isDrawRect:]): + +2010-09-28 Jenn Braithwaite <jennb@chromium.org> + + Reviewed by Dmitry Titov. + + Added oldPage param to FrameLoaderClient::didTransferChildFrameToNewDocument. + https://bugs.webkit.org/show_bug.cgi?id=46663 + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::didTransferChildFrameToNewDocument): + +2010-09-26 Antonio Gomes <agomes@rim.com> + + Reviewed by Kenneth Rohde Christiansen. + + DRT/Mac nodesFromRect support + + [Mac][DRT] Implement LayoutTestController::nodesFromRect + https://bugs.webkit.org/show_bug.cgi?id=46580 + + Implement nodesFromRect as a private method to access non-exposed Document + methods, similarly to computedStyleIncludingVisitedInfo. + + * WebView/WebView.mm: Added JSDocument.h and JSNodeList.h to the include list. + These headers makes it possible to: + 1) Get a Document off of a JSDocument; + 2) Call toJS function, defined in JSNodeList.cpp|h so we can convert RefPtr<NodeList> + gotten from Document::nodesFromRect to JS bindings. + (-[WebView _nodesFromRect:forDocument:x:y:hPadding:vPadding:ignoreClipping:]): + * WebView/WebViewPrivate.h: Added nodesFromRect method to access methods of the + Document class not exposed to JavaScript. It works similarly to computedStyleIncludingVisitedInfo. + +2010-09-24 Jia Pu <jpu@apple.com> + + Reviewed by Dan Bernstein. + + automaticSpellingCorrectionEnabled isn't updated. + https://bugs.webkit.org/show_bug.cgi?id=46486 + <rdar://problem/8475212> + + * WebView/WebView.mm: + (+[WebView initialize]): Should update "automaticSpellingCorrectionEnabled" + instead of "automaticTextReplacementEnabled". + +2010-09-23 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=46380 + REGRESSION: Crash when downloading a file + + Downloading cannot be tested in DRT. + + * Misc/WebNSFileManagerExtras.m: (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): + Don't copy null strings. + +2010-09-24 Ilya Tikhonovsky <loislo@chromium.org> + + Reviewed by Yury Semikhatsky. + + Web Inspector: CRASH at node highlight on MAC Safari. + 1) run-safari --debug + 2) open inspector + 3) open elements panel + 4) hover mouse over elements panel items multiple times + 5) CRASH + Looks like it is a race condition. WebNodeHighlightView doesn't check + the pointer to WebNodeHighligh object and it can be nil. + + https://bugs.webkit.org/show_bug.cgi?id=46261 + + * WebInspector/WebNodeHighlightView.mm: + (-[WebNodeHighlightView drawRect:]): + +2010-09-23 Andy Estes <aestes@apple.com> + + Reviewed by Darin Adler. + + REGRESSION (r61285): some Dashboard widgets are always invisible due to + HTML parser changes. + https://bugs.webkit.org/show_bug.cgi?id=46435 + + Enable pre-HTML5 parser quirks if Dashboard is in backward compatibility + mode. + + * WebView/WebView.mm: + (-[WebView _needsPreHTML5ParserQuirks]): Renamed from + shouldUsePreHTML5ParserQuirks(). Return true if + WebCore::Settings::usesDashboardCompatibilityMode() is true. + (-[WebView _preferencesChangedNotification:]): + (-[WebView _setDashboardBehavior:to:]): Enable pre-HTML5 parser quirks + if Dashboard behavior is set to backward compatibility mode. + +2010-09-23 Matthew Delaney <mdelaney@apple.com> + + Reviewed by Simon Fraser. + + Reduce minimum DOMTimer interval + https://bugs.webkit.org/show_bug.cgi?id=45362 + + * WebView/WebView.mm: + Updating set interval call to use Settings' static version inside + one time init block. + +2010-09-22 Andy Estes <aestes@apple.com> + + Reviewed by Darin Adler. + + REGRESSION (r61285): Microsoft Entourage 2008 does not invoke My Day window + https://bugs.webkit.org/show_bug.cgi?id=46334 + + Microsoft My Day loads scripts using self-closing script tags, markup + which is incompatible with the HTML5 parser. Enable parser quirks for + this application. + + * WebView/WebView.mm: + (shouldUsePreHTML5ParserQuirks): Return true if the application is + Microsoft My Day and was linked against a version of WebKit prior to the + introduction of the HTML5 parser. + +2010-09-23 Nate Chapin <japhet@chromium.org> + + Reviewed by Darin Fisher. + + Add hyperlink auditing settings (i.e., <a ping>). + https://bugs.webkit.org/show_bug.cgi?id=30458 + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + (-[WebPreferences setMemoryInfoEnabled:]): + (-[WebPreferences hyperlinkAuditingEnabled]): + (-[WebPreferences setHyperlinkAuditingEnabled:]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2010-09-22 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Anders Carlsson. + + https://bugs.webkit.org/show_bug.cgi?id=43667 + ASSERT failure in NetscapePluginInstanceProxy::disconnectStream + + Test: plugins/get-javascript-url.html + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript): Add the stream to m_streams, just + like any other one. + +2010-09-21 Darin Adler <darin@apple.com> + + Reviewed by Anders Carlsson. + + Fix some Objective-C GC problems and use RetainPtr instead of HardRetain/Release + https://bugs.webkit.org/show_bug.cgi?id=46220 + + * Misc/WebNSFileManagerExtras.m: + (setMetaData): Use CFRelease instead of HardRelease. + (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Use CFStringCreateCopy + instead of -[NSObject copy] combined with HardRetainWithNSRelease. + +2010-09-22 Balazs Kelemen <kb@inf.u-szeged.hu> + + Reviewed by Kenneth Rohde Christiansen. + + PluginStrategy should satisfy the needs of Qt + https://bugs.webkit.org/show_bug.cgi?id=45857 + No new functionality so no new tests. + + * WebCoreSupport/WebPlatformStrategies.h: + * WebCoreSupport/WebPlatformStrategies.mm: + (WebPlatformStrategies::getPluginInfo): + +2010-09-22 Paul Knight <pknight@apple.com> + + Reviewed by Simon Fraser. + + -[WebView _scheduleCompositingLayerSync] should wake the run loop + https://bugs.webkit.org/show_bug.cgi?id=46226 + + Call CFRunLoopWakeUp to make sure the run loop is not sleeping, which could delay layer painting. + + * WebView/WebView.mm: + (-[WebView _scheduleCompositingLayerSync]): + +2010-09-21 Andy Estes <aestes@apple.com> + + Reviewed by Darin Adler. + + REGRESSION (r61285): AIM 2.1.296: Code rendered as text in Welcome screen + https://bugs.webkit.org/show_bug.cgi?id=46134 + + AIM clients linked against versions of WebKit prior to the introduction + of the HTML5 parser contain markup incompatible with the new parser. + Enable parser quirks in this case to remain compatible with these + clients. + + * WebView/WebView.mm: + (shouldUsePreHTML5ParserQuirks): Returns true if the embedding + application is AIM and was linked against a version of WebKit prior to + the introduction of the HTML5 parser, or if the + WebKitPreHTML5ParserQuirks WebPreference is enabled. + (-[WebView _preferencesChangedNotification:]): Call + WebCore::Settings::setUsePreHTML5ParserQuirks(). + +2010-09-21 Steve Block <steveblock@google.com> + + Reviewed by Jeremy Orlow. + + DeviceOrientationClient and DeviceMotionClient should have controllerDestroyed() methods + https://bugs.webkit.org/show_bug.cgi?id=45891 + + Implements WebDeviceOrientationClient::deviceOrientationControllerDestroyed to delete the client. + + * WebCoreSupport/WebDeviceOrientationClient.h: + * WebCoreSupport/WebDeviceOrientationClient.mm: + (WebDeviceOrientationClient::deviceOrientationControllerDestroyed): + +2010-09-20 Philippe Normand <pnormand@igalia.com> + + Reviewed by Eric Carlson. + + [GTK] enhanced context menu for media elements + https://bugs.webkit.org/show_bug.cgi?id=45021 + + New localized strings for the media element context-menu. + + * WebCoreSupport/WebPlatformStrategies.h: + * WebCoreSupport/WebPlatformStrategies.mm: + (WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow): + (WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow): + (WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard): + (WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard): + (WebPlatformStrategies::contextMenuItemTagToggleMediaControls): + (WebPlatformStrategies::contextMenuItemTagToggleMediaLoop): + (WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen): + (WebPlatformStrategies::contextMenuItemTagMediaPlay): + (WebPlatformStrategies::contextMenuItemTagMediaPause): + (WebPlatformStrategies::contextMenuItemTagMediaMute): + 2010-09-20 Andy Estes <aestes@apple.com> Reviewed by Adam Barth. diff --git a/WebKit/mac/Configurations/Version.xcconfig b/WebKit/mac/Configurations/Version.xcconfig index 67bf769..13dd8c0 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 = 534; -MINOR_VERSION = 9; +MINOR_VERSION = 10; TINY_VERSION = 0; FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION); diff --git a/WebKit/mac/Misc/WebKitVersionChecks.h b/WebKit/mac/Misc/WebKitVersionChecks.h index 94286d6..4bf2c83 100644 --- a/WebKit/mac/Misc/WebKitVersionChecks.h +++ b/WebKit/mac/Misc/WebKitVersionChecks.h @@ -54,6 +54,7 @@ #define WEBKIT_FIRST_VERSION_WITHOUT_BUMPERCAR_BACK_FORWARD_QUIRK 0x02120700 // 530.7.0 #define WEBKIT_FIRST_VERSION_WITHOUT_CONTENT_SNIFFING_FOR_FILE_URLS 0x02120A00 // 530.10.0 #define WEBKIT_FIRST_VERSION_WITHOUT_LINK_ELEMENT_TEXT_CSS_QUIRK 0x02130200 // 531.2.0 +#define WEBKIT_FIRST_VERSION_WITH_HTML5_PARSER 0x02160900 // 534.9.0 #ifdef __cplusplus extern "C" { diff --git a/WebKit/mac/Misc/WebNSFileManagerExtras.m b/WebKit/mac/Misc/WebNSFileManagerExtras.m index f10781b..ad48fb8 100644 --- a/WebKit/mac/Misc/WebNSFileManagerExtras.m +++ b/WebKit/mac/Misc/WebNSFileManagerExtras.m @@ -31,7 +31,6 @@ #import "WebKitNSStringExtras.h" #import "WebNSURLExtras.h" #import <JavaScriptCore/Assertions.h> -#import <WebCore/FoundationExtras.h> #import <WebKitSystemInterface.h> #import <sys/stat.h> @@ -87,19 +86,22 @@ typedef struct MetaDataInfo { - NSString *URLString; - NSString *referrer; - NSString *path; + CFStringRef URLString; + CFStringRef referrer; + CFStringRef path; } MetaDataInfo; static void *setMetaData(void* context) { MetaDataInfo *info = (MetaDataInfo *)context; - WKSetMetadataURL(info->URLString, info->referrer, info->path); - - HardRelease(info->URLString); - HardRelease(info->referrer); - HardRelease(info->path); + WKSetMetadataURL((NSString *)info->URLString, (NSString *)info->referrer, (NSString *)info->path); + + if (info->URLString) + CFRelease(info->URLString); + if (info->referrer) + CFRelease(info->referrer); + if (info->path) + CFRelease(info->path); free(info); return 0; @@ -124,9 +126,9 @@ static void *setMetaData(void* context) MetaDataInfo *info = malloc(sizeof(MetaDataInfo)); - info->URLString = HardRetainWithNSRelease([URLString copy]); - info->referrer = HardRetainWithNSRelease([referrer copy]); - info->path = HardRetainWithNSRelease([path copy]); + info->URLString = URLString ? CFStringCreateCopy(0, (CFStringRef)URLString) : 0; + info->referrer = referrer ? CFStringCreateCopy(0, (CFStringRef)referrer) : 0; + info->path = path ? CFStringCreateCopy(0, (CFStringRef)path) : 0; pthread_create(&tid, &attr, setMetaData, info); pthread_attr_destroy(&attr); diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm index c0c480b..e03bc27 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm @@ -704,6 +704,7 @@ void NetscapePluginInstanceProxy::evaluateJavaScript(PluginRequest* pluginReques NSData *JSData = [result dataUsingEncoding:NSUTF8StringEncoding]; RefPtr<HostedNetscapePluginStream> stream = HostedNetscapePluginStream::create(this, pluginRequest->requestID(), pluginRequest->request()); + m_streams.add(stream->streamID(), stream); RetainPtr<NSURLResponse> response(AdoptNS, [[NSURLResponse alloc] initWithURL:URL MIMEType:@"text/plain" diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm index 3d5d7a1..ff0ca77 100644 --- a/WebKit/mac/Plugins/WebNetscapePluginView.mm +++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm @@ -661,13 +661,19 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) // Temporarily retain self in case the plug-in view is released while sending an event. [[self retain] autorelease]; - + BOOL acceptedEvent; [self willCallPlugInFunction]; + // Set the pluginAllowPopup flag. + ASSERT(_eventHandler); + bool oldAllowPopups = frame->script()->allowPopupsFromPlugin(); + frame->script()->setAllowPopupsFromPlugin(_eventHandler->currentEventIsUserGesture()); { JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); acceptedEvent = [_pluginPackage.get() pluginFuncs]->event(plugin, event); } + // Restore the old pluginAllowPopup flag. + frame->script()->setAllowPopupsFromPlugin(oldAllowPopups); [self didCallPlugInFunction]; if (portState) { diff --git a/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.h b/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.h index 1cbc8e2..8e1c274 100644 --- a/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.h +++ b/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.h @@ -47,6 +47,7 @@ public: virtual void startUpdating(); virtual void stopUpdating(); virtual WebCore::DeviceOrientation* lastOrientation() const; + virtual void deviceOrientationControllerDestroyed(); private: id<WebDeviceOrientationProvider> getProvider() const; diff --git a/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.mm b/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.mm index 278e835..f0c624d 100644 --- a/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.mm +++ b/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.mm @@ -60,6 +60,11 @@ DeviceOrientation* WebDeviceOrientationClient::lastOrientation() const return core([getProvider() lastOrientation]); } +void WebDeviceOrientationClient::deviceOrientationControllerDestroyed() +{ + delete this; +} + id<WebDeviceOrientationProvider> WebDeviceOrientationClient::getProvider() const { if (!m_provider) { diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h index 447c515..0baa55c 100644 --- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h +++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h @@ -193,7 +193,7 @@ private: virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement*, const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); - virtual void didTransferChildFrameToNewDocument(); + virtual void didTransferChildFrameToNewDocument(WebCore::Page* oldPage); virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WTF::String>&, const Vector<WTF::String>&, const WTF::String&, bool); virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm index a398ef7..cef552b 100644 --- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm +++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm @@ -1382,8 +1382,13 @@ PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const Strin return 0; } -void WebFrameLoaderClient::didTransferChildFrameToNewDocument() +void WebFrameLoaderClient::didTransferChildFrameToNewDocument(Page* oldPage) { + if (oldPage == core(m_webFrame.get())->page()) + return; + + // Update resource tracking now that frame is in a different page. + // TODO(jennb): update resource tracking [bug 44713] } ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const String& mimeType) diff --git a/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h b/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h index 53f39f8..fab7eee 100644 --- a/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h +++ b/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h @@ -45,7 +45,7 @@ private: // WebCore::PluginStrategy virtual void refreshPlugins(); - virtual void getPluginInfo(Vector<WebCore::PluginInfo>&); + virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&); // WebCore::LocalizationStrategy virtual WTF::String inputElementAltText(); @@ -113,6 +113,16 @@ private: virtual WTF::String contextMenuItemTagCapitalize(); virtual WTF::String contextMenuItemTagChangeBack(const WTF::String& replacedString); virtual WTF::String contextMenuItemTagInspectElement(); + virtual WTF::String contextMenuItemTagOpenVideoInNewWindow(); + virtual WTF::String contextMenuItemTagOpenAudioInNewWindow(); + virtual WTF::String contextMenuItemTagCopyVideoLinkToClipboard(); + virtual WTF::String contextMenuItemTagCopyAudioLinkToClipboard(); + virtual WTF::String contextMenuItemTagToggleMediaControls(); + virtual WTF::String contextMenuItemTagToggleMediaLoop(); + virtual WTF::String contextMenuItemTagEnterVideoFullscreen(); + virtual WTF::String contextMenuItemTagMediaPlay(); + virtual WTF::String contextMenuItemTagMediaPause(); + virtual WTF::String contextMenuItemTagMediaMute(); #endif // ENABLE(CONTEXT_MENUS) virtual WTF::String searchMenuNoRecentSearchesText(); virtual WTF::String searchMenuRecentSearchesText(); diff --git a/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm b/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm index 2900ccf..9d8fd11 100644 --- a/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm +++ b/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm @@ -72,7 +72,7 @@ void WebPlatformStrategies::refreshPlugins() [[WebPluginDatabase sharedDatabase] refresh]; } -void WebPlatformStrategies::getPluginInfo(Vector<WebCore::PluginInfo>& plugins) +void WebPlatformStrategies::getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>& plugins) { BEGIN_BLOCK_OBJC_EXCEPTIONS; @@ -156,6 +156,56 @@ String WebPlatformStrategies::contextMenuItemTagCopyImageToClipboard() return UI_STRING("Copy Image", "Copy Image context menu item"); } +String WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow() +{ + return UI_STRING("Open Video in New Window", "Open Video in New Window context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow() +{ + return UI_STRING("Open Audio in New Window", "Open Audio in New Window context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard() +{ + return UI_STRING("Copy Video Address", "Copy Video Address Location context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard() +{ + return UI_STRING("Copy Audio Address", "Copy Audio Address Location context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagToggleMediaControls() +{ + return UI_STRING("Controls", "Media Controls context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagToggleMediaLoop() +{ + return UI_STRING("Loop", "Media Loop context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen() +{ + return UI_STRING("Enter Fullscreen", "Video Enter Fullscreen context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagMediaPlay() +{ + return UI_STRING("Play", "Media Play context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagMediaPause() +{ + return UI_STRING("Pause", "Media Pause context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagMediaMute() +{ + return UI_STRING("Mute", "Media Mute context menu item"); +} + String WebPlatformStrategies::contextMenuItemTagOpenFrameInNewWindow() { return UI_STRING("Open Frame in New Window", "Open Frame in New Window context menu item"); diff --git a/WebKit/mac/WebInspector/WebNodeHighlightView.mm b/WebKit/mac/WebInspector/WebNodeHighlightView.mm index b3cd69e..7fc3cf4 100644 --- a/WebKit/mac/WebInspector/WebNodeHighlightView.mm +++ b/WebKit/mac/WebInspector/WebNodeHighlightView.mm @@ -67,14 +67,15 @@ using namespace WebCore; - (void)drawRect:(NSRect)rect { - [NSGraphicsContext saveGraphicsState]; + if (_webNodeHighlight) { + [NSGraphicsContext saveGraphicsState]; - ASSERT([[NSGraphicsContext currentContext] isFlipped]); + ASSERT([[NSGraphicsContext currentContext] isFlipped]); - GraphicsContext context((PlatformGraphicsContext*)[[NSGraphicsContext currentContext] graphicsPort]); - [_webNodeHighlight inspectorController]->drawNodeHighlight(context); - - [NSGraphicsContext restoreGraphicsState]; + GraphicsContext context((PlatformGraphicsContext*)[[NSGraphicsContext currentContext] graphicsPort]); + [_webNodeHighlight inspectorController]->drawNodeHighlight(context); + [NSGraphicsContext restoreGraphicsState]; + } } - (WebNodeHighlight *)webNodeHighlight diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h index 17c8e4d..8119649 100644 --- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h +++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h @@ -100,6 +100,7 @@ #define WebKitDNSPrefetchingEnabledPreferenceKey @"WebKitDNSPrefetchingEnabled" #define WebKitFullScreenEnabledPreferenceKey @"WebKitFullScreenEnabled" #define WebKitMemoryInfoEnabledPreferenceKey @"WebKitMemoryInfoEnabled" +#define WebKitHyperlinkAuditingEnabledPreferenceKey @"WebKitHyperlinkAuditingEnabled" // These are private both because callers should be using the cover methods and because the // cover methods themselves are private. diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm index 87284bb..2ddd8b3 100644 --- a/WebKit/mac/WebView/WebPreferences.mm +++ b/WebKit/mac/WebView/WebPreferences.mm @@ -368,6 +368,7 @@ static WebCacheModel cacheModelForMainBundle(void) [NSNumber numberWithBool:YES], WebKitDNSPrefetchingEnabledPreferenceKey, [NSNumber numberWithBool:NO], WebKitFullScreenEnabledPreferenceKey, [NSNumber numberWithBool:NO], WebKitMemoryInfoEnabledPreferenceKey, + [NSNumber numberWithBool:NO], WebKitHyperlinkAuditingEnabledPreferenceKey, [NSNumber numberWithBool:NO], WebKitUsePreHTML5ParserQuirksKey, [NSNumber numberWithLongLong:WebCore::ApplicationCacheStorage::noQuota()], WebKitApplicationCacheTotalQuota, [NSNumber numberWithLongLong:WebCore::ApplicationCacheStorage::noQuota()], WebKitApplicationCacheDefaultOriginQuota, @@ -1332,6 +1333,16 @@ static NSString *classIBCreatorID = nil; [self _setBoolValue:flag forKey:WebKitMemoryInfoEnabledPreferenceKey]; } +- (BOOL)hyperlinkAuditingEnabled +{ + return [self _boolValueForKey:WebKitHyperlinkAuditingEnabledPreferenceKey]; +} + +- (void)setHyperlinkAuditingEnabled:(BOOL)flag +{ + [self _setBoolValue:flag forKey:WebKitHyperlinkAuditingEnabledPreferenceKey]; +} + - (WebKitEditingBehavior)editingBehavior { return static_cast<WebKitEditingBehavior>([self _integerValueForKey:WebKitEditingBehaviorPreferenceKey]); diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h index 3bd5e24..bb525cd 100644 --- a/WebKit/mac/WebView/WebPreferencesPrivate.h +++ b/WebKit/mac/WebView/WebPreferencesPrivate.h @@ -196,6 +196,9 @@ extern NSString *WebPreferencesRemovedNotification; - (BOOL)memoryInfoEnabled; - (void)setMemoryInfoEnabled:(BOOL)enabled; +- (BOOL)hyperlinkAuditingEnabled; +- (void)setHyperlinkAuditingEnabled:(BOOL)enabled; + // Other private methods - (void)_postPreferencesChangesNotification; + (WebPreferences *)_getInstanceForIdentifier:(NSString *)identifier; diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm index 20f6e24..1fca8d1 100644 --- a/WebKit/mac/WebView/WebView.mm +++ b/WebKit/mac/WebView/WebView.mm @@ -133,9 +133,12 @@ #import <WebCore/HistoryItem.h> #import <WebCore/IconDatabase.h> #import <WebCore/JSCSSStyleDeclaration.h> +#import <WebCore/JSDocument.h> #import <WebCore/JSElement.h> +#import <WebCore/JSNodeList.h> #import <WebCore/Logging.h> #import <WebCore/MIMETypeRegistry.h> +#import <WebCore/NodeList.h> #import <WebCore/Page.h> #import <WebCore/PageCache.h> #import <WebCore/PageGroup.h> @@ -675,6 +678,7 @@ static bool shouldEnableLoadDeferring() // Initialize our platform strategies. WebPlatformStrategies::initialize(); + Settings::setMinDOMTimerInterval(0.004); didOneTimeInitialization = true; } @@ -696,7 +700,6 @@ static bool shouldEnableLoadDeferring() _private->page->setCanStartMedia([self window]); _private->page->settings()->setLocalStorageDatabasePath([[self preferences] _localStorageDatabasePath]); - _private->page->settings()->setMinDOMTimerInterval(0.004); [WebFrame _createMainFrameWithPage:_private->page frameName:frameName frameView:frameView]; @@ -1358,6 +1361,27 @@ static bool fastDocumentTeardownEnabled() return needsQuirk; } + +- (BOOL)_needsPreHTML5ParserQuirks +{ + // AOL Instant Messenger and Microsoft My Day contain markup incompatible + // with the new HTML5 parser. If these applications were linked against a + // version of WebKit prior to the introduction of the HTML5 parser, enable + // parser quirks to maintain compatibility. For details, see + // <https://bugs.webkit.org/show_bug.cgi?id=46134> and + // <https://bugs.webkit.org/show_bug.cgi?id=46334>. + static bool isApplicationNeedingParserQuirks = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_HTML5_PARSER) + && (applicationIsAOLInstantMessenger() || applicationIsMicrosoftMyDay()); + + return isApplicationNeedingParserQuirks +#if ENABLE(DASHBOARD_SUPPORT) + // Pre-HTML5 parser quirks are required to remain compatible with many + // Dashboard widgets. See <rdar://problem/8175982>. + || (_private->page && _private->page->settings()->usesDashboardBackwardCompatibilityMode()) +#endif + || [[self preferences] usePreHTML5ParserQuirks]; +} + - (void)_preferencesChangedNotification:(NSNotification *)notification { WebPreferences *preferences = (WebPreferences *)[notification object]; @@ -1453,7 +1477,8 @@ static bool fastDocumentTeardownEnabled() settings->setFullScreenEnabled([preferences fullScreenEnabled]); #endif settings->setMemoryInfoEnabled([preferences memoryInfoEnabled]); - settings->setUsePreHTML5ParserQuirks([preferences usePreHTML5ParserQuirks]); + settings->setHyperlinkAuditingEnabled([preferences hyperlinkAuditingEnabled]); + settings->setUsePreHTML5ParserQuirks([self _needsPreHTML5ParserQuirks]); // Application Cache Preferences are stored on the global cache storage manager, not in Settings. [WebApplicationCache setDefaultOriginQuota:[preferences applicationCacheDefaultOriginQuota]]; @@ -1983,6 +2008,11 @@ static inline IMP getMethod(id o, SEL s) break; } } + + // Pre-HTML5 parser quirks should be enabled if Dashboard is in backward + // compatibility mode. See <rdar://problem/8175982>. + if (_private->page) + _private->page->settings()->setUsePreHTML5ParserQuirks([self _needsPreHTML5ParserQuirks]); } - (BOOL)_dashboardBehavior:(WebDashboardBehavior)behavior @@ -2649,7 +2679,7 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns) if (![[NSUserDefaults standardUserDefaults] objectForKey:WebAutomaticTextReplacementEnabled]) automaticTextReplacementEnabled = [NSSpellChecker isAutomaticTextReplacementEnabled]; if (![[NSUserDefaults standardUserDefaults] objectForKey:WebAutomaticSpellingCorrectionEnabled]) - automaticTextReplacementEnabled = [NSSpellChecker isAutomaticSpellingCorrectionEnabled]; + automaticSpellingCorrectionEnabled = [NSSpellChecker isAutomaticSpellingCorrectionEnabled]; #endif } @@ -5859,6 +5889,11 @@ static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActi - (void)_scheduleCompositingLayerSync { + CFRunLoopRef currentRunLoop = CFRunLoopGetCurrent(); + + // Make sure we wake up the loop or the observer could be delayed until some other source fires. + CFRunLoopWakeUp(currentRunLoop); + if (_private->layerSyncRunLoopObserver) return; @@ -5874,7 +5909,7 @@ static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActi kCFRunLoopBeforeWaiting | kCFRunLoopExit, true /* repeats */, runLoopOrder, layerSyncRunLoopObserverCallBack, &context); - CFRunLoopAddObserver(CFRunLoopGetCurrent(), _private->layerSyncRunLoopObserver, kCFRunLoopCommonModes); + CFRunLoopAddObserver(currentRunLoop, _private->layerSyncRunLoopObserver, kCFRunLoopCommonModes); } #endif @@ -6020,6 +6055,25 @@ static void glibContextIterationCallback(CFRunLoopObserverRef, CFRunLoopActivity @end +@implementation WebView (WebViewPrivateNodesFromRect) + +- (JSValueRef)_nodesFromRect:(JSContextRef)context forDocument:(JSValueRef)value x:(int)x y:(int)y top:(unsigned)top right:(unsigned)right bottom:(unsigned)bottom left:(unsigned)left ignoreClipping:(BOOL)ignoreClipping +{ + JSLock lock(SilenceAssertionsOnly); + ExecState* exec = toJS(context); + if (!value) + return JSValueMakeUndefined(context); + JSValue jsValue = toJS(exec, value); + if (!jsValue.inherits(&JSDocument::s_info)) + return JSValueMakeUndefined(context); + JSDocument* jsDocument = static_cast<JSDocument*>(asObject(jsValue)); + Document* document = jsDocument->impl(); + RefPtr<NodeList> nodes = document->nodesFromRect(x, y, top, right, bottom, left, ignoreClipping); + return toRef(exec, toJS(exec, jsDocument->globalObject(), nodes.get())); +} + +@end + #ifdef BUILDING_ON_LEOPARD static IMP originalRecursivelyRemoveMailAttributesImp; diff --git a/WebKit/mac/WebView/WebViewPrivate.h b/WebKit/mac/WebView/WebViewPrivate.h index aeb36c7..749eeb3 100644 --- a/WebKit/mac/WebView/WebViewPrivate.h +++ b/WebKit/mac/WebView/WebViewPrivate.h @@ -630,6 +630,10 @@ Could be worth adding to the API. - (JSValueRef)_computedStyleIncludingVisitedInfo:(JSContextRef)context forElement:(JSValueRef)value; @end +@interface WebView (WebViewPrivateNodesFromRect) +- (JSValueRef)_nodesFromRect:(JSContextRef)context forDocument:(JSValueRef)value x:(int)x y:(int)y top:(unsigned)top right:(unsigned)right bottom:(unsigned)bottom left:(unsigned)left ignoreClipping:(BOOL)ignoreClipping; +@end + @interface NSObject (WebFrameLoadDelegatePrivate) - (void)webView:(WebView *)sender didFirstLayoutInFrame:(WebFrame *)frame; diff --git a/WebKit/qt/Api/DerivedSources.pro b/WebKit/qt/Api/DerivedSources.pro index 6fb52f2..d8bd1db 100644 --- a/WebKit/qt/Api/DerivedSources.pro +++ b/WebKit/qt/Api/DerivedSources.pro @@ -10,7 +10,7 @@ DESTDIR = ../../../include/QtWebKit QUOTE = "" DOUBLE_ESCAPED_QUOTE = "" ESCAPE = "" -win32-msvc* | (contains(QMAKE_HOST.os, "Windows"):isEmpty(QMAKE_SH)) { +win32-msvc* | wince* | contains(QMAKE_HOST.os, "Windows"):isEmpty(QMAKE_SH) { # MinGW's make will run makefile commands using sh, even if make # was run from the Windows shell, if it finds sh in the path. ESCAPE = "^" diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp index 7f66d98..36d4326 100644 --- a/WebKit/qt/Api/qgraphicswebview.cpp +++ b/WebKit/qt/Api/qgraphicswebview.cpp @@ -75,7 +75,6 @@ public: QGraphicsWebView* q; QWebPage* page; bool resizesToContents; - QSize deviceSize; // Just a convenience to avoid using page->client->overlay always QSharedPointer<QGraphicsItemOverlay> overlay; @@ -131,13 +130,8 @@ void QGraphicsWebViewPrivate::updateResizesToContentsForPage() if (!page->preferredContentsSize().isValid()) page->setPreferredContentsSize(QSize(960, 800)); -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) QObject::connect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)), q, SLOT(_q_contentsSizeChanged(const QSize&)), Qt::UniqueConnection); -#else - QObject::connect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)), - q, SLOT(_q_contentsSizeChanged(const QSize&))); -#endif } else { QObject::disconnect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)), q, SLOT(_q_contentsSizeChanged(const QSize&))); @@ -243,14 +237,10 @@ QGraphicsWebView::QGraphicsWebView(QGraphicsItem* parent) : QGraphicsWidget(parent) , d(new QGraphicsWebViewPrivate(this)) { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true); -#endif setAcceptDrops(true); setAcceptHoverEvents(true); -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) setAcceptTouchEvents(true); -#endif setFocusPolicy(Qt::StrongFocus); setFlag(QGraphicsItem::ItemClipsChildrenToShape, true); #if ENABLE(TILED_BACKING_STORE) @@ -316,7 +306,6 @@ bool QGraphicsWebView::sceneEvent(QEvent* event) { // Re-implemented in order to allows fixing event-related bugs in patch releases. -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) if (d->page && (event->type() == QEvent::TouchBegin || event->type() == QEvent::TouchEnd || event->type() == QEvent::TouchUpdate)) { @@ -325,7 +314,6 @@ bool QGraphicsWebView::sceneEvent(QEvent* event) // Always return true so that we'll receive also TouchUpdate and TouchEnd events return true; } -#endif return QGraphicsWidget::sceneEvent(event); } @@ -419,11 +407,7 @@ void QGraphicsWebViewPrivate::detachCurrentPage() if (!page) return; -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) page->d->view.clear(); -#else - page->d->view = 0; -#endif // The client has always to be deleted. delete page->d->client; @@ -555,24 +539,6 @@ QIcon QGraphicsWebView::icon() const } /*! - \property QGraphicsWebView::deviceSize - \brief the size of the device using the web view - - The device size is used by the DOM window object methods - otherHeight(), otherWidth() as well as a page for the viewport - meta tag attributes device-width and device-height. -*/ -void QGraphicsWebView::setDeviceSize(const QSize& size) -{ - d->deviceSize = size; -} - -QSize QGraphicsWebView::deviceSize() const -{ - return d->deviceSize; -} - -/*! \property QGraphicsWebView::zoomFactor \brief the zoom factor for the view */ diff --git a/WebKit/qt/Api/qgraphicswebview.h b/WebKit/qt/Api/qgraphicswebview.h index 77f0359..8620ac5 100644 --- a/WebKit/qt/Api/qgraphicswebview.h +++ b/WebKit/qt/Api/qgraphicswebview.h @@ -41,7 +41,6 @@ class QWEBKIT_EXPORT QGraphicsWebView : public QGraphicsWidget { Q_PROPERTY(QString title READ title NOTIFY titleChanged) Q_PROPERTY(QIcon icon READ icon NOTIFY iconChanged) Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor) - Q_PROPERTY(QSize deviceSize READ deviceSize WRITE setDeviceSize) Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged) @@ -65,9 +64,6 @@ public: qreal zoomFactor() const; void setZoomFactor(qreal); - QSize deviceSize() const; - void setDeviceSize(const QSize&); - bool isModified() const; void load(const QUrl& url); diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp index 46580bb..1791096 100644 --- a/WebKit/qt/Api/qwebframe.cpp +++ b/WebKit/qt/Api/qwebframe.cpp @@ -230,6 +230,14 @@ void QWebFramePrivate::init(QWebFrame *qframe, QWebFrameData *frameData) frame->init(); } +WebCore::ViewportArguments QWebFramePrivate::viewportArguments() +{ + if (!frame || !frame->document()) + return WebCore::ViewportArguments(); + + return frame->document()->viewportArguments(); +} + void QWebFramePrivate::setPage(QWebPage* newPage) { if (page == newPage) @@ -781,11 +789,9 @@ void QWebFrame::load(const QNetworkRequest &req, case QNetworkAccessManager::PostOperation: request.setHTTPMethod("POST"); break; -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) case QNetworkAccessManager::DeleteOperation: request.setHTTPMethod("DELETE"); break; -#endif case QNetworkAccessManager::UnknownOperation: // eh? break; diff --git a/WebKit/qt/Api/qwebframe_p.h b/WebKit/qt/Api/qwebframe_p.h index 6d6eca1..5ba3f52 100644 --- a/WebKit/qt/Api/qwebframe_p.h +++ b/WebKit/qt/Api/qwebframe_p.h @@ -90,6 +90,8 @@ public: void renderFromTiledBackingStore(WebCore::GraphicsContext*, const QRegion& clip); #endif + WebCore::ViewportArguments viewportArguments(); + QWebFrame *q; Qt::ScrollBarPolicy horizontalScrollBarPolicy; Qt::ScrollBarPolicy verticalScrollBarPolicy; @@ -101,7 +103,6 @@ public: int marginWidth; int marginHeight; bool zoomTextOnly; - WebCore::ViewportArguments viewportArguments; }; class QWebHitTestResultPrivate { diff --git a/WebKit/qt/Api/qwebinspector.cpp b/WebKit/qt/Api/qwebinspector.cpp index 802ea98..27148f7 100644 --- a/WebKit/qt/Api/qwebinspector.cpp +++ b/WebKit/qt/Api/qwebinspector.cpp @@ -196,6 +196,31 @@ void QWebInspectorPrivate::setFrontend(QWidget* newFrontend) } } +/*! + * \internal + */ +void QWebInspectorPrivate::attachAndReplaceRemoteFrontend(QObject* newRemoteFrontend) +{ + if (remoteFrontend) + remoteFrontend->setParent(0); + + remoteFrontend = newRemoteFrontend; + + if (remoteFrontend) + remoteFrontend->setParent(q); +} + +/*! + * \internal + */ +void QWebInspectorPrivate::detachRemoteFrontend() +{ + if (remoteFrontend) { + remoteFrontend->deleteLater(); + remoteFrontend = 0; + } +} + void QWebInspectorPrivate::adjustFrontendSize(const QSize& size) { if (frontend) diff --git a/WebKit/qt/Api/qwebinspector_p.h b/WebKit/qt/Api/qwebinspector_p.h index 4d327cc..3099eb1 100644 --- a/WebKit/qt/Api/qwebinspector_p.h +++ b/WebKit/qt/Api/qwebinspector_p.h @@ -33,14 +33,18 @@ public: : q(qq) , page(0) , frontend(0) + , remoteFrontend(0) {} void setFrontend(QWidget* newFrontend); + void attachAndReplaceRemoteFrontend(QObject* newRemoteFrontend); + void detachRemoteFrontend(); void adjustFrontendSize(const QSize& size); QWebInspector* q; QWebPage* page; QWidget* frontend; + QObject* remoteFrontend; }; #endif diff --git a/WebKit/qt/Api/qwebkitplatformplugin.h b/WebKit/qt/Api/qwebkitplatformplugin.h index 76496c5..a851d56 100644 --- a/WebKit/qt/Api/qwebkitplatformplugin.h +++ b/WebKit/qt/Api/qwebkitplatformplugin.h @@ -84,9 +84,13 @@ Q_SIGNALS: void notificationClicked(); }; -class QWebHapticFeedbackPlayer +class QWebHapticFeedbackPlayer: public QObject { + Q_OBJECT public: + QWebHapticFeedbackPlayer() {} + virtual ~QWebHapticFeedbackPlayer() {} + enum HapticStrength { None, Weak, Medium, Strong }; @@ -110,12 +114,9 @@ public: }; virtual bool supportsExtension(Extension extension) const = 0; - virtual QWebSelectMethod* createSelectInputMethod() const = 0; - virtual QWebNotificationPresenter* createNotificationPresenter() const = 0; - virtual QWebHapticFeedbackPlayer* createHapticFeedbackPlayer() const = 0; - + virtual QObject* createExtension(Extension extension) const = 0; }; -Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.4"); +Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.5"); #endif // QWEBKITPLATFORMPLUGIN_H diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp index 181b3a6..932103d 100644 --- a/WebKit/qt/Api/qwebpage.cpp +++ b/WebKit/qt/Api/qwebpage.cpp @@ -21,6 +21,7 @@ #include "config.h" #include "qwebpage.h" + #include "qwebview.h" #include "qwebframe.h" #include "qwebpage_p.h" @@ -77,6 +78,7 @@ #include "HTMLInputElement.h" #include "HTMLNames.h" #include "HitTestResult.h" +#include "InspectorServerQt.h" #include "WindowFeatures.h" #include "WebPlatformStrategies.h" #include "LocalizedStrings.h" @@ -86,6 +88,7 @@ #include "GeolocationPermissionClientQt.h" #include "NotificationPresenterClientQt.h" #include "PageClientQt.h" +#include "PlatformTouchEvent.h" #include "WorkerThread.h" #include "wtf/Threading.h" @@ -93,6 +96,7 @@ #include <QBasicTimer> #include <QBitArray> #include <QDebug> +#include <QDesktopWidget> #include <QDragEnterEvent> #include <QDragLeaveEvent> #include <QDragMoveEvent> @@ -112,16 +116,13 @@ #include <QSysInfo> #include <QTextCharFormat> #include <QTextDocument> +#include <QTouchEvent> #include <QNetworkAccessManager> #include <QNetworkRequest> #if defined(Q_WS_X11) #include <QX11Info> #endif -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) -#include <QTouchEvent> -#include "PlatformTouchEvent.h" -#endif using namespace WebCore; @@ -254,12 +255,29 @@ static inline Qt::DropAction dragOpToDropAction(unsigned actions) QWebPagePrivate::QWebPagePrivate(QWebPage *qq) : q(qq) + , page(0) , client(0) -#if QT_VERSION < QT_VERSION_CHECK(4, 6, 0) - , view(0) + , mainFrame(0) +#ifndef QT_NO_UNDOSTACK + , undoStack(0) #endif + , insideOpenCall(false) + , m_totalBytes(0) + , m_bytesReceived() , clickCausedFocus(false) + , networkManager(0) + , forwardUnsupportedContent(false) + , smartInsertDeleteEnabled(true) + , selectTrailingWhitespaceEnabled(false) + , linkPolicy(QWebPage::DontDelegateLinks) , viewportSize(QSize(0, 0)) +#ifndef QT_NO_CONTEXTMENU + , currentContextMenu(0) +#endif + , settings(0) + , editable(false) + , useFixedLayout(false) + , pluginFactory(0) , inspectorFrontend(0) , inspector(0) , inspectorIsInternalOnly(false) @@ -272,7 +290,7 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq) WebCore::Font::setCodePath(WebCore::Font::Complex); #endif - WebPlatformStrategies::initialize(qq); + WebPlatformStrategies::initialize(); Page::PageClients pageClients; pageClients.chromeClient = new ChromeClientQt(q); @@ -284,23 +302,6 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq) settings = new QWebSettings(page->settings()); -#ifndef QT_NO_UNDOSTACK - undoStack = 0; -#endif - mainFrame = 0; - networkManager = 0; - pluginFactory = 0; - insideOpenCall = false; - forwardUnsupportedContent = false; - editable = false; - useFixedLayout = false; - linkPolicy = QWebPage::DontDelegateLinks; -#ifndef QT_NO_CONTEXTMENU - currentContextMenu = 0; -#endif - smartInsertDeleteEnabled = true; - selectTrailingWhitespaceEnabled = false; - history.d = new QWebHistoryPrivate(page->backForwardList()); memset(actions, 0, sizeof(actions)); @@ -793,7 +794,6 @@ void QWebPagePrivate::mouseReleaseEvent(QGraphicsSceneMouseEvent* ev) void QWebPagePrivate::handleSoftwareInputPanel(Qt::MouseButton button) { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) Frame* frame = page->focusController()->focusedFrame(); if (!frame) return; @@ -810,7 +810,6 @@ void QWebPagePrivate::handleSoftwareInputPanel(Qt::MouseButton button) } clickCausedFocus = false; -#endif } void QWebPagePrivate::mouseReleaseEvent(QMouseEvent *ev) @@ -1136,9 +1135,7 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev) { WebCore::Frame *frame = page->focusController()->focusedOrMainFrame(); WebCore::Editor *editor = frame->editor(); -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) QInputMethodEvent::Attribute selection(QInputMethodEvent::Selection, 0, 0, QVariant()); -#endif if (!editor->canEdit()) { ev->ignore(); @@ -1177,13 +1174,11 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev) } break; } -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) case QInputMethodEvent::Selection: { selection = a; hasSelection = true; break; } -#endif } } @@ -1195,7 +1190,6 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev) // 3. populated preedit with a selection attribute, and start/end of 0 or non-0 updates selection of supplied preedit text // 4. otherwise event is updating supplied pre-edit text QString preedit = ev->preeditString(); -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) if (hasSelection) { QString text = (renderTextControl) ? QString(renderTextControl->text()) : QString(); if (preedit.isEmpty() && selection.start + selection.length > 0) @@ -1203,10 +1197,8 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev) editor->setComposition(preedit, underlines, (selection.length < 0) ? selection.start + selection.length : selection.start, (selection.length < 0) ? selection.start : selection.start + selection.length); - } else -#endif - if (!preedit.isEmpty()) - editor->setComposition(preedit, underlines, preedit.length(), 0); + } else if (!preedit.isEmpty()) + editor->setComposition(preedit, underlines, preedit.length(), 0); } ev->accept(); @@ -1302,6 +1294,10 @@ void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* ev frame->tiledBackingStore()->setKeepAndCoverAreaMultipliers(keepMultiplier, coverMultiplier); } #endif + else if (event->propertyName() == "_q_webInspectorServerPort") { + InspectorServerQt* inspectorServer = InspectorServerQt::server(); + inspectorServer->listen(inspectorServerPort()); + } } #endif @@ -1391,7 +1387,6 @@ bool QWebPagePrivate::handleScrolling(QKeyEvent *ev, Frame *frame) return frame->eventHandler()->scrollRecursively(direction, granularity); } -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) bool QWebPagePrivate::touchEvent(QTouchEvent* event) { WebCore::Frame* frame = QWebFramePrivate::core(mainFrame); @@ -1404,7 +1399,6 @@ bool QWebPagePrivate::touchEvent(QTouchEvent* event) // Return whether the default action was cancelled in the JS event handler return frame->eventHandler()->handleTouchEvent(PlatformTouchEvent(event)); } -#endif /*! This method is used by the input method to query a set of properties of the page @@ -1479,7 +1473,6 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const return QVariant(); } -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) case Qt::ImAnchorPosition: { if (renderTextControl) { if (editor->hasComposition()) { @@ -1502,7 +1495,6 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const } return QVariant(0); } -#endif default: return QVariant(); } @@ -1559,6 +1551,14 @@ InspectorController* QWebPagePrivate::inspectorController() #endif } +quint16 QWebPagePrivate::inspectorServerPort() +{ +#if ENABLE(INSPECTOR) && !defined(QT_NO_PROPERTIES) + if (q && q->property("_q_webInspectorServerPort").isValid()) + return q->property("_q_webInspectorServerPort").toInt(); +#endif + return 0; +} /*! \enum QWebPage::FindFlag @@ -1987,11 +1987,7 @@ void QWebPage::setView(QWidget* view) */ QWidget *QWebPage::view() const { -#if QT_VERSION < QT_VERSION_CHECK(4, 6, 0) - return d->view; -#else return d->view.data(); -#endif } /*! @@ -2325,19 +2321,67 @@ void QWebPage::setViewportSize(const QSize &size) const } } -QWebPage::ViewportConfiguration QWebPage::viewportConfigurationForSize(QSize availableSize) const +static int getintenv(const char* variable) +{ + bool ok; + int value = qgetenv(variable).toInt(&ok); + return (ok) ? value : -1; +} + +static QSize queryDeviceSizeForScreenContainingWidget(const QWidget* widget) +{ + QDesktopWidget* desktop = QApplication::desktop(); + if (!desktop) + return QSize(); + + QSize size; + + if (widget) { + // Returns the available geometry of the screen which contains widget. + // NOTE: this must be the the full screen size including any fixed status areas etc. + size = desktop->availableGeometry(widget).size(); + } else + size = desktop->availableGeometry().size(); + + // This must be in portrait mode, adjust if not. + if (size.width() > size.height()) { + int width = size.width(); + size.setWidth(size.height()); + size.setHeight(width); + } + + return size; +} + +/*! + Computes the optimal viewport configuration given the \a availableSize, when + user interface components are disregarded. + + The configuration is also dependent on the device screen size which is obtained + automatically. For testing purposes the size can be overridden by setting two + environment variables QTWEBKIT_DEVICE_WIDTH and QTWEBKIT_DEVICE_HEIGHT, which + both needs to be set. +*/ + +QWebPage::ViewportConfiguration QWebPage::viewportConfigurationForSize(const QSize& availableSize) const { static int desktopWidth = 980; static int deviceDPI = 160; - FloatRect rect = d->page->chrome()->windowRect(); + ViewportConfiguration result; - int deviceWidth = rect.width(); - int deviceHeight = rect.height(); + int deviceWidth = getintenv("QTWEBKIT_DEVICE_WIDTH"); + int deviceHeight = getintenv("QTWEBKIT_DEVICE_HEIGHT"); - WebCore::ViewportConfiguration conf = WebCore::findConfigurationForViewportData(mainFrame()->d->viewportArguments, desktopWidth, deviceWidth, deviceHeight, deviceDPI, availableSize); + // Both environment variables need to be set - or they will be ignored. + if (deviceWidth < 0 && deviceHeight < 0) { + QSize size = queryDeviceSizeForScreenContainingWidget((d->client) ? d->client->ownerWidget() : 0); + deviceWidth = size.width(); + deviceHeight = size.height(); + } - ViewportConfiguration result; + WebCore::ViewportConfiguration conf = WebCore::findConfigurationForViewportData(mainFrame()->d->viewportArguments(), + desktopWidth, deviceWidth, deviceHeight, deviceDPI, availableSize); result.m_isValid = true; result.m_size = conf.layoutViewport; @@ -2854,13 +2898,11 @@ bool QWebPage::event(QEvent *ev) case QEvent::Leave: d->leaveEvent(ev); break; -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) case QEvent::TouchBegin: case QEvent::TouchUpdate: case QEvent::TouchEnd: // Return whether the default action was cancelled in the JS event handler return d->touchEvent(static_cast<QTouchEvent*>(ev)); -#endif #ifndef QT_NO_PROPERTIES case QEvent::DynamicPropertyChange: d->dynamicPropertyChangeEvent(static_cast<QDynamicPropertyChangeEvent*>(ev)); diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h index b1441ff..e71e3da 100644 --- a/WebKit/qt/Api/qwebpage.h +++ b/WebKit/qt/Api/qwebpage.h @@ -55,6 +55,7 @@ namespace WebCore { class EditorClientQt; class FrameLoaderClientQt; class InspectorClientQt; + class InspectorServerRequestHandlerQt; class InspectorFrontendClientQt; class NotificationPresenterClientQt; class GeolocationPermissionClientQt; @@ -216,13 +217,13 @@ public: QWebPage::ViewportConfiguration& operator=(const QWebPage::ViewportConfiguration& other); - inline qreal initialScaleFactor() const { return m_initialScaleFactor; }; - inline qreal minimumScaleFactor() const { return m_minimumScaleFactor; }; - inline qreal maximumScaleFactor() const { return m_maximumScaleFactor; }; - inline qreal devicePixelRatio() const { return m_devicePixelRatio; }; - inline bool isUserScalable() const { return m_isUserScalable; }; - inline bool isValid() const { return m_isValid; }; - inline QSize size() const { return m_size; }; + inline qreal initialScaleFactor() const { return m_initialScaleFactor; } + inline qreal minimumScaleFactor() const { return m_minimumScaleFactor; } + inline qreal maximumScaleFactor() const { return m_maximumScaleFactor; } + inline qreal devicePixelRatio() const { return m_devicePixelRatio; } + inline bool isUserScalable() const { return m_isUserScalable; } + inline bool isValid() const { return m_isValid; } + inline QSize size() const { return m_size; } private: QSharedDataPointer<QtViewportConfigurationPrivate> d; @@ -275,7 +276,7 @@ public: QSize viewportSize() const; void setViewportSize(const QSize &size) const; - ViewportConfiguration viewportConfigurationForSize(QSize availableSize) const; + ViewportConfiguration viewportConfigurationForSize(const QSize& availableSize) const; QSize preferredContentsSize() const; void setPreferredContentsSize(const QSize &size) const; @@ -425,6 +426,7 @@ private: friend class WebCore::EditorClientQt; friend class WebCore::FrameLoaderClientQt; friend class WebCore::InspectorClientQt; + friend class WebCore::InspectorServerRequestHandlerQt; friend class WebCore::InspectorFrontendClientQt; friend class WebCore::NotificationPresenterClientQt; friend class WebCore::GeolocationPermissionClientQt; diff --git a/WebKit/qt/Api/qwebpage_p.h b/WebKit/qt/Api/qwebpage_p.h index 82f5365..12716f9 100644 --- a/WebKit/qt/Api/qwebpage_p.h +++ b/WebKit/qt/Api/qwebpage_p.h @@ -131,38 +131,29 @@ public: void handleSoftwareInputPanel(Qt::MouseButton); bool handleScrolling(QKeyEvent*, WebCore::Frame*); -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) // Returns whether the default action was cancelled in the JS event handler bool touchEvent(QTouchEvent*); -#endif void setInspector(QWebInspector*); QWebInspector* getOrCreateInspector(); WebCore::InspectorController* inspectorController(); + quint16 inspectorServerPort(); #ifndef QT_NO_SHORTCUT static QWebPage::WebAction editorActionForKeyEvent(QKeyEvent* event); #endif static const char* editorCommandForWebActions(QWebPage::WebAction action); - WebCore::ChromeClientQt *chromeClient; - WebCore::ContextMenuClientQt *contextMenuClient; - WebCore::EditorClientQt *editorClient; + QWebPage *q; WebCore::Page *page; - + QWebPageClient* client; QPointer<QWebFrame> mainFrame; - QWebPage *q; - QWebPageClient* client; #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/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp index b71de25..6b36522 100644 --- a/WebKit/qt/Api/qwebsettings.cpp +++ b/WebKit/qt/Api/qwebsettings.cpp @@ -174,6 +174,11 @@ void QWebSettingsPrivate::apply() settings->setWebGLEnabled(value); #endif + + value = attributes.value(QWebSettings::HyperlinkAuditingEnabled, + global->attributes.value(QWebSettings::HyperlinkAuditingEnabled)); + + settings->setHyperlinkAuditingEnabled(value); value = attributes.value(QWebSettings::JavascriptCanOpenWindows, global->attributes.value(QWebSettings::JavascriptCanOpenWindows)); @@ -495,6 +500,7 @@ QWebSettings::QWebSettings() d->attributes.insert(QWebSettings::LocalContentCanAccessFileUrls, true); d->attributes.insert(QWebSettings::AcceleratedCompositingEnabled, true); d->attributes.insert(QWebSettings::WebGLEnabled, false); + d->attributes.insert(QWebSettings::HyperlinkAuditingEnabled, false); d->attributes.insert(QWebSettings::TiledBackingStoreEnabled, false); d->attributes.insert(QWebSettings::FrameFlatteningEnabled, false); d->attributes.insert(QWebSettings::SiteSpecificQuirksEnabled, true); diff --git a/WebKit/qt/Api/qwebsettings.h b/WebKit/qt/Api/qwebsettings.h index 8967e7c..d5e0ef6 100644 --- a/WebKit/qt/Api/qwebsettings.h +++ b/WebKit/qt/Api/qwebsettings.h @@ -75,7 +75,8 @@ public: TiledBackingStoreEnabled, FrameFlatteningEnabled, SiteSpecificQuirksEnabled, - WebGLEnabled + WebGLEnabled, + HyperlinkAuditingEnabled }; enum WebGraphic { MissingImageGraphic, diff --git a/WebKit/qt/Api/qwebview.cpp b/WebKit/qt/Api/qwebview.cpp index 1f400cb..64b7a90 100644 --- a/WebKit/qt/Api/qwebview.cpp +++ b/WebKit/qt/Api/qwebview.cpp @@ -307,9 +307,7 @@ QWebView::QWebView(QWidget *parent) setAttribute(Qt::WA_InputMethodEnabled); #endif -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) setAttribute(Qt::WA_AcceptTouchEvents); -#endif #if defined(Q_WS_MAEMO_5) QAbstractKineticScroller* scroller = new QWebViewKineticScroller(); static_cast<QWebViewKineticScroller*>(scroller)->setWidget(this); @@ -348,13 +346,7 @@ void QWebViewPrivate::detachCurrentPage() if (!page) return; - if (page) { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) - page->d->view.clear(); -#else - page->d->view = 0; -#endif - } + page->d->view.clear(); // if the page client is the special client constructed for // delegating the responsibilities to a QWidget, we need @@ -828,7 +820,6 @@ bool QWebView::event(QEvent *e) if (cursor().shape() == Qt::ArrowCursor) d->page->d->client->resetCursor(); #endif -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) } else if (e->type() == QEvent::TouchBegin || e->type() == QEvent::TouchEnd || e->type() == QEvent::TouchUpdate) { @@ -836,7 +827,6 @@ bool QWebView::event(QEvent *e) // Always return true so that we'll receive also TouchUpdate and TouchEnd events return true; -#endif } else if (e->type() == QEvent::Leave) d->page->event(e); } diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog index 34edbd7..7a2c064 100644 --- a/WebKit/qt/ChangeLog +++ b/WebKit/qt/ChangeLog @@ -1,3 +1,354 @@ +2010-09-28 Jenn Braithwaite <jennb@chromium.org> + + Reviewed by Dmitry Titov. + + Added oldPage param to FrameLoaderClient::didTransferChildFrameToNewDocument. + https://bugs.webkit.org/show_bug.cgi?id=46663 + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::didTransferChildFrameToNewDocument): + * WebCoreSupport/FrameLoaderClientQt.h: + +2010-09-28 Andreas Kling <andreas.kling@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Clean up QWebPage::ViewportConfiguration API + https://bugs.webkit.org/show_bug.cgi?id=46730 + + - Pass QSize parameter as const-reference + - Style fixes + + * Api/qwebpage.cpp: + (QWebPage::viewportConfigurationForSize): + * Api/qwebpage.h: + +2010-09-28 Andras Becsi <abecsi@webkit.org> + + Reviewed by Csaba Osztrogonác. + + Undefined reference errors when linking due to gperf and inlining. + webkit.org/b/29244 + + EFL CMake changes by Leandro Pereira <leandro@profusion.mobi> + + Refactor gperf code generation and usage to fix the debug build with gcc>4.4. + Hitherto gperf generated C code, these files were included in multiple C++ files across WebCore + to access the functionality provided. This resulted in debug build failure with newer gcc versions + because of a behaviour change of gcc, which disables C style inlining in debug mode. + The make-hash-tools.pl script lets gperf generate C++ code for all gperf files now, which are compiled + in their own compilation unit. + The functionality provided by the generated code is wrapped behind HashTools.h, so there is no need + for multiple inclusions of generated C files to access these functions. + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::createPlugin): + +2010-09-28 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] Remove support for Qt 4.5 + https://bugs.webkit.org/show_bug.cgi?id=46718 + + Remove the code for versions of Qt prior to 4.6. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::updateResizesToContentsForPage): + (QGraphicsWebView::QGraphicsWebView): + (QGraphicsWebView::sceneEvent): + (QGraphicsWebViewPrivate::detachCurrentPage): + * Api/qwebframe.cpp: + (QWebFrame::load): + * Api/qwebpage.cpp: + (QWebPagePrivate::QWebPagePrivate): + (QWebPagePrivate::handleSoftwareInputPanel): + (QWebPagePrivate::inputMethodEvent): + (QWebPagePrivate::touchEvent): + (QWebPage::inputMethodQuery): + (QWebPage::view): + (QWebPage::event): + * Api/qwebpage_p.h: + * Api/qwebview.cpp: + (QWebView::QWebView): + (QWebViewPrivate::detachCurrentPage): + (QWebView::event): + * WebCoreSupport/EditorClientQt.cpp: + (WebCore::EditorClientQt::setInputMethodState): + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::createPlugin): + * WebCoreSupport/PageClientQt.cpp: + (WebCore::PageClientQWidget::setInputMethodHints): + (WebCore::PageClientQGraphicsWidget::setInputMethodEnabled): + (WebCore::PageClientQGraphicsWidget::inputMethodEnabled): + (WebCore::PageClientQGraphicsWidget::setInputMethodHints): + * WebCoreSupport/PageClientQt.h: + (WebCore::QGraphicsItemOverlay::page): + * tests/qwebframe/tst_qwebframe.cpp: + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::inputMethods_data): + (inputMethodHints): + (inputMethodEnabled): + (tst_QWebPage::inputMethods): + (tst_QWebPage::originatingObjectInNetworkRequests): + * tests/qwebview/tst_qwebview.cpp: + (tst_QWebView::reusePage): + +2010-09-28 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + Clean up QWebPage initialization + + * Api/qwebpage.cpp: + * Api/qwebpage_p.h: + +2010-09-28 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] tst_QWebPage::testStopScheduledPageRefresh() fails on MeeGo handset + https://bugs.webkit.org/show_bug.cgi?id=46706 + + The test require the network to succeed or fail in order to work. + On MeeGo, the network can simply timeout the because of the netword access + management. This patch makes the test use local URLs to avoid the + problem. + + * tests/qwebpage/tst_qwebpage.cpp: + (TestNetworkManager::TestNetworkManager): + +2010-09-27 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org> + + Reviewed by Antonio Gomes. + + [Qt] Remove setDeviceSize methods + https://bugs.webkit.org/show_bug.cgi?id=46347 + + Remove our setDeviceHeight() API and obtain it automatically from the + system. Also for testing purposes, make it possible to override the + values via two newly introduced environment variables. + + * Api/qgraphicswebview.cpp: + * Api/qgraphicswebview.h: + * Api/qwebpage.cpp: + (getintenv): + (queryDeviceSizeForScreenContainingWidget): + (QWebPage::viewportConfigurationForSize): + * WebCoreSupport/PageClientQt.cpp: + (WebCore::PageClientQGraphicsWidget::windowRect): + * symbian/eabi/QtWebKitu.def: + +2010-09-27 Girish Ramakrishnan <girish@forwardbias.in> + + Reviewed by Antonio Gomes. + + Enable local rendering of NPAPI plugins on Maemo6. + + https://bugs.webkit.org/show_bug.cgi?id=46618 + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::createPlugin): + +2010-09-27 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] tst_QWebFrame::popupFocus() randomly fail on MeeGo handset because the focus is not set on the window + https://bugs.webkit.org/show_bug.cgi?id=46617 + + This patch avoid the race condition by waiting for the window + to be mapped on screen before attempting any actions. + + * tests/qwebframe/tst_qwebframe.cpp: + +2010-09-24 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + Keep viewport information in Document + https://bugs.webkit.org/show_bug.cgi?id=46385 + + The viewport meta data (layout viewport, scale) needs to be set again when bringing + back a page from the page cache. As the viewport metadata is only retrieved while parsing + the document, we need to store it in the Document class. + + * Api/qwebframe.cpp: + (QWebFramePrivate::viewportArguments): + * Api/qwebframe_p.h: + * Api/qwebpage.cpp: + (QWebPage::viewportConfigurationForSize): + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::didReceiveViewportArguments): + * WebCoreSupport/DumpRenderTreeSupportQt.cpp: + (DumpRenderTreeSupportQt::viewportAsText): + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::dispatchDidCommitLoad): + +2010-09-23 Ademar de Souza Reis Jr <ademar.reis@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + Fix QWebHapticFeedbackPlayer exposure via QWebKitPlatformPlugin + + [Qt] QWebHapticFeedbackPlayer needs correct exposure through QWebKitPlatformPlugin + https://bugs.webkit.org/show_bug.cgi?id=46402 + + QWebHapticFeedbackPlayer is exported through + QWebKitPlatformPlugin::createExtension(), but + createHapticFeedbackPlayer() and the correct + inheritage are missing. + + * Api/qwebkitplatformplugin.h: + * WebCoreSupport/QtPlatformPlugin.cpp: + (WebCore::QtPlatformPlugin::createHapticFeedbackPlayer): + * WebCoreSupport/QtPlatformPlugin.h: + +2010-09-23 Nate Chapin <japhet@chromium.org> + + Reviewed by Darin Fisher. + + Add hyperlink auditing settings (i.e., <a ping>). + https://bugs.webkit.org/show_bug.cgi?id=30458 + + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::apply): + (QWebSettings::QWebSettings): + * Api/qwebsettings.h: + + +2010-09-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Refactor QtWebKitPlatformPlugin interface + + Make it easier to keep source-compability for the + QtWebKitPlatformPlugin interface, and run qmake + on the example (but not build) for convenience. + + https://bugs.webkit.org/show_bug.cgi?id=46345 + + * Api/qwebkitplatformplugin.h: + * WebCoreSupport/QtPlatformPlugin.cpp: + * examples/platformplugin/README: + * examples/platformplugin/WebPlugin.cpp: + * examples/platformplugin/WebPlugin.h: + * examples/platformplugin/qwebkitplatformplugin.h: + +2010-09-22 Andras Becsi <abecsi@webkit.org> + + Speculative build fix for the Qt Windows bots. + + * Api/DerivedSources.pro: + +2010-09-22 Jamey Hicks <jamey.hicks@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Web Inspector: Remote Web Inspector support for QtWebKit + https://bugs.webkit.org/show_bug.cgi?id=43988 + + Runs a web debug server on port specified by QtTestBrowser + argument -remote-inspector-port. Property + _q_webInspectorServerPort of the QWebPage instance will be set + according to the argument. All pages with that property set will + be remotely inspectable. + + URL for remote inspection of first QWebPage is + http://localhost:9222/webkit/inspector/inspector.html?page=1 + where 1 is the number of the QWebPage instance. + + The base URL yields an index page with links to the individual inspectors: + http://localhost:9222/ + + * Api/qwebinspector.cpp: + (QWebInspectorPrivate::attachAndReplaceRemoteFrontend): + (QWebInspectorPrivate::detachRemoteFrontend): + * Api/qwebinspector_p.h: + (QWebInspectorPrivate::QWebInspectorPrivate): + * Api/qwebpage.cpp: + (QWebPagePrivate::dynamicPropertyChangeEvent): + (QWebPagePrivate::inspectorServerPort): + * Api/qwebpage.h: + * Api/qwebpage_p.h: + * WebCoreSupport/InspectorClientQt.cpp: + (WebCore::InspectorClientQt::InspectorClientQt): + (WebCore::InspectorClientQt::inspectorDestroyed): + (WebCore::InspectorClientQt::openInspectorFrontend): + (WebCore::InspectorClientQt::attachAndReplaceRemoteFrontend): + (WebCore::InspectorClientQt::detachRemoteFrontend): + (WebCore::InspectorClientQt::sendMessageToFrontend): + * WebCoreSupport/InspectorClientQt.h: + * WebCoreSupport/InspectorServerQt.cpp: Added. + (WebCore::generateWebSocketChallengeResponse): + (WebCore::parseWebSocketChallengeNumber): + (WebCore::InspectorServerQt::server): + (WebCore::InspectorServerQt::InspectorServerQt): + (WebCore::InspectorServerQt::~InspectorServerQt): + (WebCore::InspectorServerQt::listen): + (WebCore::InspectorServerQt::close): + (WebCore::InspectorServerQt::inspectorClientForPage): + (WebCore::InspectorServerQt::registerClient): + (WebCore::InspectorServerQt::unregisterClient): + (WebCore::InspectorServerQt::newConnection): + (WebCore::InspectorServerRequestHandlerQt::InspectorServerRequestHandlerQt): + (WebCore::InspectorServerRequestHandlerQt::~InspectorServerRequestHandlerQt): + (WebCore::InspectorServerRequestHandlerQt::tcpReadyRead): + (WebCore::InspectorServerRequestHandlerQt::tcpConnectionDisconnected): + (WebCore::InspectorServerRequestHandlerQt::webSocketSend): + (WebCore::InspectorServerRequestHandlerQt::webSocketReadyRead): + (WebCore::RemoteFrontendChannel::RemoteFrontendChannel): + (WebCore::RemoteFrontendChannel::sendMessageToFrontend): + * WebCoreSupport/InspectorServerQt.h: Added. + +2010-09-22 Balazs Kelemen <kb@inf.u-szeged.hu> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] PluginStrategy implementation is broken + https://bugs.webkit.org/show_bug.cgi?id=46078 + + Remove the QWebPage* member from WebPlatformStrategies. + Get the originator QWebPage of the getPluginInfo call via + the Page* argument. + * Api/qwebpage.cpp: + (QWebPagePrivate::QWebPagePrivate): + * WebCoreSupport/WebPlatformStrategies.cpp: + (WebPlatformStrategies::initialize): + (WebPlatformStrategies::WebPlatformStrategies): + (WebPlatformStrategies::getPluginInfo): + Use the ChromeClient for accessing the originator QWebPage. + * WebCoreSupport/WebPlatformStrategies.h: + +2010-09-22 İsmail Dönmez <ismail@namtrac.org> + + Reviewed by Andreas Kling. + + [Qt] Buildfix for WinCE + + * Api/DerivedSources.pro: + +2010-09-20 Philippe Normand <pnormand@igalia.com> + + Reviewed by Eric Carlson. + + [GTK] enhanced context menu for media elements + https://bugs.webkit.org/show_bug.cgi?id=45021 + + * WebCoreSupport/WebPlatformStrategies.cpp: + * WebCoreSupport/WebPlatformStrategies.h: + (WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow): + (WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow): + (WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard): + (WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard): + (WebPlatformStrategies::contextMenuItemTagToggleMediaControls) + (WebPlatformStrategies::contextMenuItemTagToggleMediaLoop) + (WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen) + (WebPlatformStrategies::contextMenuItemTagMediaPlay) + (WebPlatformStrategies::contextMenuItemTagMediaPause) + (WebPlatformStrategies::contextMenuItemTagMediaMute) + 2010-09-20 Jacob Dinu <dinu.jacob@nokia.com> Reviewed by Adam Barth. diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp index a5dfdc7..9fbc5e5 100644 --- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp @@ -644,8 +644,6 @@ QWebSelectMethod* ChromeClientQt::createSelectPopup() const void ChromeClientQt::didReceiveViewportArguments(Frame* frame, const ViewportArguments& arguments) const { - m_webPage->mainFrame()->d->viewportArguments = arguments; - emit m_webPage->viewportChangeRequested(); } diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp index ed7ac32..836df49 100644 --- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp +++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp @@ -631,7 +631,7 @@ void DumpRenderTreeSupportQt::dumpNotification(bool b) QString DumpRenderTreeSupportQt::viewportAsText(QWebPage* page, const QSize& availableSize) { - WebCore::ViewportArguments args = page->mainFrame()->d->viewportArguments; + WebCore::ViewportArguments args = page->mainFrame()->d->viewportArguments(); WebCore::ViewportConfiguration conf = WebCore::findConfigurationForViewportData(args, /* desktop-width */ 980, /* device-width */ 320, diff --git a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp index 080c459..9db4333 100644 --- a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp @@ -595,7 +595,6 @@ void EditorClientQt::setInputMethodState(bool active) { QWebPageClient* webPageClient = m_page->d->client; if (webPageClient) { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) Qt::InputMethodHints hints; HTMLInputElement* inputElement = 0; @@ -628,8 +627,7 @@ void EditorClientQt::setInputMethodState(bool active) hints |= Qt::ImhNoAutoUppercase; hints |= Qt::ImhNoPredictiveText; #endif // Q_WS_MAEMO_5 || Q_WS_MAEMO_6 || Q_OS_SYMBIAN - webPageClient->setInputMethodHints(hints); -#endif // QT_VERSION check + webPageClient->setInputMethodHints(hints); webPageClient->setInputMethodEnabled(active); } emit m_page->microFocusChanged(); diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index 4aadeb0..41bcb3c 100644 --- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -442,9 +442,6 @@ void FrameLoaderClientQt::dispatchDidCommitLoad() if (m_frame->tree()->parent() || !m_webFrame) return; - // Clear the viewport arguments. - m_webFrame->d->viewportArguments = WebCore::ViewportArguments(); - emit m_webFrame->urlChanged(m_webFrame->url()); m_webFrame->page()->d->updateNavigationActions(); @@ -1248,7 +1245,7 @@ PassRefPtr<Frame> FrameLoaderClientQt::createFrame(const KURL& url, const String return frameData.frame.release(); } -void FrameLoaderClientQt::didTransferChildFrameToNewDocument() +void FrameLoaderClientQt::didTransferChildFrameToNewDocument(Page*) { ASSERT(m_frame->ownerElement()); @@ -1370,7 +1367,6 @@ private: } }; -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) class QtPluginGraphicsWidget: public Widget { public: @@ -1415,7 +1411,6 @@ private: QGraphicsWidget* graphicsWidget; }; -#endif PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) @@ -1456,7 +1451,7 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, for (unsigned i = 0; i < numqStyleSheetProperties; ++i) { CSSPropertyID property = qstyleSheetProperties[i]; - styleSheet += QString::fromLatin1(::getPropertyName(property)); + styleSheet += QString::fromLatin1(getPropertyName(property)); styleSheet += QLatin1Char(':'); styleSheet += computedStyle(element)->getPropertyValue(property); styleSheet += QLatin1Char(';'); @@ -1488,7 +1483,7 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, w->setFrameRect(IntRect(0, 0, 0, 0)); return w; } -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + QGraphicsWidget* graphicsWidget = qobject_cast<QGraphicsWidget*>(object); if (graphicsWidget) { QGraphicsObject* parentWidget = 0; @@ -1502,7 +1497,7 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, w->setFrameRect(IntRect(0, 0, 0, 0)); return w; } -#endif + // FIXME: make things work for widgetless plugins as well delete object; } @@ -1513,7 +1508,7 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, if (mimeType == "application/x-shockwave-flash") { QWebPageClient* client = m_webFrame->page()->d->client; const bool isQWebView = client && qobject_cast<QWidget*>(client->pluginParent()); -#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO >= 5) size_t wmodeIndex = params.find("wmode"); if (wmodeIndex == -1) { // Disable XEmbed mode and force it to opaque mode diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h index fffda58..ec6a3b6 100644 --- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h +++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h @@ -198,7 +198,7 @@ public: virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); - virtual void didTransferChildFrameToNewDocument(); + virtual void didTransferChildFrameToNewDocument(WebCore::Page*); virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool); virtual void redirectDataToPlugin(Widget* pluginWidget); diff --git a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp index e6e6fde..b6673e6 100644 --- a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp @@ -32,7 +32,10 @@ #include "InspectorClientQt.h" #include "Frame.h" +#include "InspectorBackendDispatcher.h" #include "InspectorController.h" +#include "InspectorFrontend.h" +#include "InspectorServerQt.h" #include "NotImplemented.h" #include "Page.h" #include "PlatformString.h" @@ -115,17 +118,26 @@ InspectorClientQt::InspectorClientQt(QWebPage* page) : m_inspectedWebPage(page) , m_frontendWebPage(0) , m_frontendClient(0) -{} +{ + InspectorServerQt* webInspectorServer = InspectorServerQt::server(); + if (webInspectorServer) + webInspectorServer->registerClient(this); +} void InspectorClientQt::inspectorDestroyed() { if (m_frontendClient) m_frontendClient->inspectorClientDestroyed(); + + InspectorServerQt* webInspectorServer = InspectorServerQt::server(); + if (webInspectorServer) + webInspectorServer->unregisterClient(this); + delete this; } -void InspectorClientQt::openInspectorFrontend(WebCore::InspectorController*) +void InspectorClientQt::openInspectorFrontend(WebCore::InspectorController* inspectorController) { #if USE(V8) ensureDebuggerScriptLoaded(); @@ -136,6 +148,10 @@ void InspectorClientQt::openInspectorFrontend(WebCore::InspectorController*) inspectorView->setPage(inspectorPage); QWebInspector* inspector = m_inspectedWebPage->d->getOrCreateInspector(); + // Remote frontend was attached. + if (m_inspectedWebPage->d->inspector->d->remoteFrontend) + return; + // This is a known hook that allows changing the default URL for the // Web inspector. This is used for SDK purposes. Please keep this hook // around and don't remove it. @@ -167,6 +183,23 @@ void InspectorClientQt::releaseFrontendPage() m_frontendClient = 0; } +void InspectorClientQt::attachAndReplaceRemoteFrontend(RemoteFrontendChannel* channel) +{ +#if ENABLE(INSPECTOR) + // Channel was allocated by InspectorServerQt. Here we transfer ownership to inspector. + m_inspectedWebPage->d->inspector->d->attachAndReplaceRemoteFrontend(channel); + m_inspectedWebPage->d->inspectorController()->connectFrontend(); +#endif +} + +void InspectorClientQt::detachRemoteFrontend() +{ +#if ENABLE(INSPECTOR) + m_inspectedWebPage->d->inspector->d->detachRemoteFrontend(); + m_inspectedWebPage->d->inspectorController()->disconnectFrontend(); +#endif +} + void InspectorClientQt::highlight(Node*) { notImplemented(); @@ -223,6 +256,12 @@ void InspectorClientQt::storeSetting(const String& key, const String& setting) bool InspectorClientQt::sendMessageToFrontend(const String& message) { + if (m_inspectedWebPage->d->inspector->d->remoteFrontend) { + RemoteFrontendChannel* session = qobject_cast<RemoteFrontendChannel*>(m_inspectedWebPage->d->inspector->d->remoteFrontend); + if (session) + session->sendMessageToFrontend(message); + return true; + } if (!m_frontendWebPage) return false; diff --git a/WebKit/qt/WebCoreSupport/InspectorClientQt.h b/WebKit/qt/WebCoreSupport/InspectorClientQt.h index 0074159..64a2d0c 100644 --- a/WebKit/qt/WebCoreSupport/InspectorClientQt.h +++ b/WebKit/qt/WebCoreSupport/InspectorClientQt.h @@ -42,8 +42,10 @@ class QWebView; namespace WebCore { class InspectorFrontendClientQt; +class InspectorServerRequestHandlerQt; class Node; class Page; +class RemoteFrontendChannel; class InspectorClientQt : public InspectorClient { public: @@ -63,10 +65,16 @@ public: void releaseFrontendPage(); + void attachAndReplaceRemoteFrontend(RemoteFrontendChannel *channel); + void detachRemoteFrontend(); + private: QWebPage* m_inspectedWebPage; QWebPage* m_frontendWebPage; InspectorFrontendClientQt* m_frontendClient; + bool m_remoteInspector; + + friend class InspectorServerRequestHandlerQt; }; class InspectorFrontendClientQt : public InspectorFrontendClientLocal { diff --git a/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp b/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp new file mode 100644 index 0000000..fad7247 --- /dev/null +++ b/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp @@ -0,0 +1,386 @@ +/* + Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "config.h" +#include "InspectorServerQt.h" + +#include "InspectorBackendDispatcher.h" +#include "InspectorClientQt.h" +#include "MD5.h" +#include "Page.h" +#include "qwebpage.h" +#include "qwebpage_p.h" +#include <QFile> +#include <QHttpHeader> +#include <QHttpRequestHeader> +#include <QHttpResponseHeader> +#include <QString> +#include <QStringList> +#include <QTcpServer> +#include <QTcpSocket> +#include <QUrl> +#include <QWidget> +#include <qendian.h> + +namespace WebCore { + +/*! + Computes the WebSocket handshake response given the two challenge numbers and key3. + */ +static void generateWebSocketChallengeResponse(uint32_t number1, uint32_t number2, const unsigned char key3[8], unsigned char response[16]) +{ + uint8_t challenge[16]; + qToBigEndian<qint32>(number1, &challenge[0]); + qToBigEndian<qint32>(number2, &challenge[4]); + memcpy(&challenge[8], key3, 8); + MD5 md5; + md5.addBytes(challenge, sizeof(challenge)); + Vector<uint8_t, 16> digest; + md5.checksum(digest); + memcpy(response, digest.data(), 16); +} + +/*! + Parses and returns a WebSocket challenge number according to the + method specified in the WebSocket protocol. + + The field contains numeric digits interspersed with spaces and + non-numeric digits. The protocol ignores the characters that are + neither digits nor spaces. The digits are concatenated and + interpreted as a long int. The result is this number divided by + the number of spaces. + */ +static quint32 parseWebSocketChallengeNumber(QString field) +{ + QString nString; + int numSpaces = 0; + for (int i = 0; i < field.size(); i++) { + QChar c = field[i]; + if (c == (QChar)' ') { + numSpaces++; + } else if ((c >= (QChar)'0') && (c <= (QChar)'9')) { + nString.append((QChar)c); + } + } + quint32 num = nString.toLong(); + quint32 result = (numSpaces ? (num / numSpaces) : num); + return result; +} + +static InspectorServerQt* s_inspectorServer; + +InspectorServerQt* InspectorServerQt::server() +{ + // s_inspectorServer is deleted in unregisterClient() when the last client is unregistered. + if (!s_inspectorServer) + s_inspectorServer = new InspectorServerQt(); + + return s_inspectorServer; +} + +InspectorServerQt::InspectorServerQt() + : QObject() + , m_tcpServer(0) + , m_pageNumber(1) +{ +} + +InspectorServerQt::~InspectorServerQt() +{ + close(); +} + +void InspectorServerQt::listen(quint16 port) +{ + if (m_tcpServer) + return; + + m_tcpServer = new QTcpServer(); + m_tcpServer->listen(QHostAddress::Any, port); + connect(m_tcpServer, SIGNAL(newConnection()), SLOT(newConnection())); +} + +void InspectorServerQt::close() +{ + if (m_tcpServer) { + m_tcpServer->close(); + delete m_tcpServer; + } + m_tcpServer = 0; +} + +InspectorClientQt* InspectorServerQt::inspectorClientForPage(int pageNum) +{ + InspectorClientQt* client = m_inspectorClients.value(pageNum); + return client; +} + +void InspectorServerQt::registerClient(InspectorClientQt* client) +{ + if (!m_inspectorClients.key(client)) + m_inspectorClients.insert(m_pageNumber++, client); +} + +void InspectorServerQt::unregisterClient(InspectorClientQt* client) +{ + int pageNum = m_inspectorClients.key(client, -1); + if (pageNum >= 0) + m_inspectorClients.remove(pageNum); + if (!m_inspectorClients.size()) { + // s_inspectorServer points to this. + s_inspectorServer = 0; + close(); + deleteLater(); + } +} + +void InspectorServerQt::newConnection() +{ + QTcpSocket* tcpConnection = m_tcpServer->nextPendingConnection(); + InspectorServerRequestHandlerQt* handler = new InspectorServerRequestHandlerQt(tcpConnection, this); + handler->setParent(this); +} + +InspectorServerRequestHandlerQt::InspectorServerRequestHandlerQt(QTcpSocket* tcpConnection, InspectorServerQt* server) + : QObject(server) + , m_tcpConnection(tcpConnection) + , m_server(server) + , m_inspectorClient(0) +{ + m_endOfHeaders = false; + m_contentLength = 0; + + connect(m_tcpConnection, SIGNAL(readyRead()), SLOT(tcpReadyRead())); + connect(m_tcpConnection, SIGNAL(disconnected()), SLOT(tcpConnectionDisconnected())); +} + +InspectorServerRequestHandlerQt::~InspectorServerRequestHandlerQt() +{ +} + +void InspectorServerRequestHandlerQt::tcpReadyRead() +{ + QHttpRequestHeader header; + bool isWebSocket = false; + if (!m_tcpConnection) + return; + + if (!m_endOfHeaders) { + while (m_tcpConnection->bytesAvailable() && !m_endOfHeaders) { + QByteArray line = m_tcpConnection->readLine(); + m_data.append(line); + if (line == "\r\n") + m_endOfHeaders = true; + } + if (m_endOfHeaders) { + header = QHttpRequestHeader(QString::fromLatin1(m_data)); + if (header.isValid()) { + m_path = header.path(); + m_contentType = header.contentType().toLatin1(); + m_contentLength = header.contentLength(); + if (header.hasKey("Upgrade") && (header.value("Upgrade") == QLatin1String("WebSocket"))) + isWebSocket = true; + + m_data.clear(); + } + } + } + + if (m_endOfHeaders) { + QStringList pathAndQuery = m_path.split("?"); + m_path = pathAndQuery[0]; + QStringList words = m_path.split(QString::fromLatin1("/")); + + if (isWebSocket) { + // switch to websocket-style WebSocketService messaging + if (m_tcpConnection) { + m_tcpConnection->disconnect(SIGNAL(readyRead())); + connect(m_tcpConnection, SIGNAL(readyRead()), SLOT(webSocketReadyRead())); + + QByteArray key3 = m_tcpConnection->read(8); + + quint32 number1 = parseWebSocketChallengeNumber(header.value("Sec-WebSocket-Key1")); + quint32 number2 = parseWebSocketChallengeNumber(header.value("Sec-WebSocket-Key2")); + + char responseData[16]; + generateWebSocketChallengeResponse(number1, number2, (unsigned char*)key3.data(), (unsigned char*)responseData); + QByteArray response(responseData, sizeof(responseData)); + + QHttpResponseHeader responseHeader(101, "WebSocket Protocol Handshake", 1, 1); + responseHeader.setValue("Upgrade", header.value("Upgrade")); + responseHeader.setValue("Connection", header.value("Connection")); + responseHeader.setValue("Sec-WebSocket-Origin", header.value("Origin")); + responseHeader.setValue("Sec-WebSocket-Location", ("ws://" + header.value("Host") + m_path)); + responseHeader.setContentLength(response.size()); + m_tcpConnection->write(responseHeader.toString().toLatin1()); + m_tcpConnection->write(response); + m_tcpConnection->flush(); + + if ((words.size() == 4) + && (words[1] == QString::fromLatin1("devtools")) + && (words[2] == QString::fromLatin1("page"))) { + int pageNum = words[3].toInt(); + + m_inspectorClient = m_server->inspectorClientForPage(pageNum); + // Attach remoteFrontendChannel to inspector, also transferring ownership. + if (m_inspectorClient) + m_inspectorClient->attachAndReplaceRemoteFrontend(new RemoteFrontendChannel(this)); + } + + } + + return; + } + if (m_contentLength && (m_tcpConnection->bytesAvailable() < m_contentLength)) + return; + + QByteArray content = m_tcpConnection->read(m_contentLength); + m_endOfHeaders = false; + + QByteArray response; + int code = 200; + QString text = QString::fromLatin1("OK"); + + // If no path is specified, generate an index page. + if ((m_path == "") || (m_path == "/")) { + QString indexHtml = "<html><head><title>Remote Web Inspector</title></head><body><ul>\n"; + for (QMap<int, InspectorClientQt* >::const_iterator it = m_server->m_inspectorClients.begin(); + it != m_server->m_inspectorClients.end(); + ++it) { + indexHtml.append(QString("<li><a href=\"/webkit/inspector/inspector.html?page=%1\">%2</li>\n") + .arg(it.key()) + .arg(it.value()->m_inspectedWebPage->mainFrame()->url().toString())); + } + indexHtml.append("</ul></body></html>"); + response = indexHtml.toLatin1(); + } else { + QString path = QString(":%1").arg(m_path); + QFile file(path); + // It seems that there should be an enum or define for these status codes somewhere in Qt or WebKit, + // but grep fails to turn one up. + // QNetwork uses the numeric values directly. + if (file.exists()) { + file.open(QIODevice::ReadOnly); + response = file.readAll(); + } else { + code = 404; + text = QString::fromLatin1("Not OK"); + } + } + + QHttpResponseHeader responseHeader(code, text, 1, 0); + responseHeader.setContentLength(response.size()); + if (!m_contentType.isEmpty()) + responseHeader.setContentType(QString::fromLatin1(m_contentType)); + + QByteArray asciiHeader = responseHeader.toString().toAscii(); + m_tcpConnection->write(asciiHeader); + + m_tcpConnection->write(response); + m_tcpConnection->flush(); + m_tcpConnection->close(); + + return; + } +} + +void InspectorServerRequestHandlerQt::tcpConnectionDisconnected() +{ + if (m_inspectorClient) + m_inspectorClient->detachRemoteFrontend(); + m_tcpConnection->deleteLater(); + m_tcpConnection = 0; +} + +int InspectorServerRequestHandlerQt::webSocketSend(QByteArray payload) +{ + Q_ASSERT(m_tcpConnection); + m_tcpConnection->putChar(0x00); + int nBytes = m_tcpConnection->write(payload); + m_tcpConnection->putChar(0xFF); + m_tcpConnection->flush(); + return nBytes; +} + +int InspectorServerRequestHandlerQt::webSocketSend(const char* data, size_t length) +{ + Q_ASSERT(m_tcpConnection); + m_tcpConnection->putChar(0x00); + int nBytes = m_tcpConnection->write(data, length); + m_tcpConnection->putChar(0xFF); + m_tcpConnection->flush(); + return nBytes; +} + +void InspectorServerRequestHandlerQt::webSocketReadyRead() +{ + Q_ASSERT(m_tcpConnection); + if (!m_tcpConnection->bytesAvailable()) + return; + QByteArray content = m_tcpConnection->read(m_tcpConnection->bytesAvailable()); + m_data.append(content); + while (m_data.size() > 0) { + // first byte in websocket frame should be 0 + Q_ASSERT(!m_data[0]); + + // Start of WebSocket frame is indicated by 0 + if (m_data[0]) { + qCritical() << "webSocketReadyRead: unknown frame type" << m_data[0]; + m_data.clear(); + m_tcpConnection->close(); + return; + } + + // End of WebSocket frame indicated by 0xff. + int pos = m_data.indexOf(0xff, 1); + if (pos < 1) + return; + + // After above checks, length will be >= 0. + size_t length = pos - 1; + if (length <= 0) + return; + + QByteArray payload = m_data.mid(1, length); + + if (m_inspectorClient) { + InspectorController* inspectorController = m_inspectorClient->m_inspectedWebPage->d->page->inspectorController(); + inspectorController->inspectorBackendDispatcher()->dispatch(QString::fromUtf8(payload)); + } + + // Remove this WebSocket message from m_data (payload, start-of-frame byte, end-of-frame byte). + m_data = m_data.mid(length + 2); + } +} + +RemoteFrontendChannel::RemoteFrontendChannel(InspectorServerRequestHandlerQt* requestHandler) + : QObject(requestHandler) + , m_requestHandler(requestHandler) +{ +} + +bool RemoteFrontendChannel::sendMessageToFrontend(const String& message) +{ + if (!m_requestHandler) + return false; + CString cstr = message.utf8(); + return m_requestHandler->webSocketSend(cstr.data(), cstr.length()); +} + +} diff --git a/WebKit/qt/WebCoreSupport/InspectorServerQt.h b/WebKit/qt/WebCoreSupport/InspectorServerQt.h new file mode 100644 index 0000000..74e8c2f --- /dev/null +++ b/WebKit/qt/WebCoreSupport/InspectorServerQt.h @@ -0,0 +1,110 @@ +/* + Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef InspectorServerQt_h +#define InspectorServerQt_h + +#include <QList> +#include <QMap> +#include <QObject> +#include <QPair> +#include <QString> +#include <wtf/Forward.h> + +class QTcpServer; +class QTcpSocket; +class QWebPage; + +namespace WebCore { +class InspectorServerRequestHandlerQt; +class InspectorClientQt; + +class InspectorServerQt : public QObject { + Q_OBJECT +public: + + static InspectorServerQt* server(); + + void listen(quint16 port); + + void registerClient(InspectorClientQt* client); + void unregisterClient(InspectorClientQt* client); + + void close(); + InspectorClientQt* inspectorClientForPage(int pageNum); + +protected: + InspectorServerQt(); + virtual ~InspectorServerQt(); + +private slots: + void newConnection(); + +private: + QTcpServer* m_tcpServer; + QMap<int, InspectorClientQt*> m_inspectorClients; + int m_pageNumber; + + friend class InspectorServerRequestHandlerQt; +}; + +class RemoteFrontendChannel : public QObject { + Q_OBJECT +public: + + RemoteFrontendChannel(InspectorServerRequestHandlerQt* requestHandler); + bool sendMessageToFrontend(const String& message); + +private: + InspectorServerRequestHandlerQt* m_requestHandler; +}; + +class InspectorServerRequestHandlerQt : public QObject { + Q_OBJECT +public: + + InspectorServerRequestHandlerQt(QTcpSocket *tcpConnection, InspectorServerQt *server); + virtual ~InspectorServerRequestHandlerQt(); + virtual int webSocketSend(QByteArray payload); + virtual int webSocketSend(const char *payload, size_t length); + +private slots: + void tcpReadyRead(); + void tcpConnectionDisconnected(); + void webSocketReadyRead(); + +private: + QTcpSocket* m_tcpConnection; + InspectorServerQt* m_server; + + QString m_path; + QByteArray m_contentType; + int m_contentLength; + bool m_endOfHeaders; + QByteArray m_data; + InspectorClientQt* m_inspectorClient; + + void handleInspectorRequest(QStringList words); + void handleFromFrontendRequest(); + void handleResourceRequest(QStringList words); + +}; + +} +#endif diff --git a/WebKit/qt/WebCoreSupport/PageClientQt.cpp b/WebKit/qt/WebCoreSupport/PageClientQt.cpp index 62f48ff..ea209d9 100644 --- a/WebKit/qt/WebCoreSupport/PageClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/PageClientQt.cpp @@ -48,12 +48,10 @@ bool PageClientQWidget::inputMethodEnabled() const return view->testAttribute(Qt::WA_InputMethodEnabled); } -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) void PageClientQWidget::setInputMethodHints(Qt::InputMethodHints hints) { view->setInputMethodHints(hints); } -#endif #ifndef QT_NO_CURSOR QCursor PageClientQWidget::cursor() const @@ -215,26 +213,18 @@ void PageClientQGraphicsWidget::updateTiledBackingStoreScale() void PageClientQGraphicsWidget::setInputMethodEnabled(bool enable) { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) view->setFlag(QGraphicsItem::ItemAcceptsInputMethod, enable); -#endif } bool PageClientQGraphicsWidget::inputMethodEnabled() const { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) return view->flags() & QGraphicsItem::ItemAcceptsInputMethod; -#else - return false; -#endif } -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) void PageClientQGraphicsWidget::setInputMethodHints(Qt::InputMethodHints hints) { view->setInputMethodHints(hints); } -#endif #ifndef QT_NO_CURSOR QCursor PageClientQGraphicsWidget::cursor() const @@ -318,9 +308,6 @@ QStyle* PageClientQGraphicsWidget::style() const QRectF PageClientQGraphicsWidget::windowRect() const { - if (!view->deviceSize().isEmpty()) - return QRectF(QRect(QPoint(0, 0), view->deviceSize())); - if (!view->scene()) return QRectF(); diff --git a/WebKit/qt/WebCoreSupport/PageClientQt.h b/WebKit/qt/WebCoreSupport/PageClientQt.h index 65ee849..eea7f40 100644 --- a/WebKit/qt/WebCoreSupport/PageClientQt.h +++ b/WebKit/qt/WebCoreSupport/PageClientQt.h @@ -58,9 +58,7 @@ public: virtual void update(const QRect& dirtyRect); virtual void setInputMethodEnabled(bool enable); virtual bool inputMethodEnabled() const; -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) virtual void setInputMethodHints(Qt::InputMethodHints hints); -#endif #ifndef QT_NO_CURSOR virtual QCursor cursor() const; @@ -93,9 +91,7 @@ class QGraphicsItemOverlay : public QGraphicsItem { , page(p) { setPos(0, 0); -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true); -#endif setCacheMode(QGraphicsItem::DeviceCoordinateCache); } @@ -146,9 +142,7 @@ public: virtual void update(const QRect& dirtyRect); virtual void setInputMethodEnabled(bool enable); virtual bool inputMethodEnabled() const; -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) virtual void setInputMethodHints(Qt::InputMethodHints hints); -#endif #ifndef QT_NO_CURSOR virtual QCursor cursor() const; diff --git a/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp b/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp index fd86e91..1f91d8c 100644 --- a/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp +++ b/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp @@ -91,16 +91,20 @@ QWebKitPlatformPlugin* QtPlatformPlugin::plugin() QWebSelectMethod* QtPlatformPlugin::createSelectInputMethod() { QWebKitPlatformPlugin* p = plugin(); - return p ? p->createSelectInputMethod() : 0; + return p ? qobject_cast<QWebSelectMethod*>(p->createExtension(QWebKitPlatformPlugin::MultipleSelections)) : 0; } QWebNotificationPresenter* QtPlatformPlugin::createNotificationPresenter() { QWebKitPlatformPlugin* p = plugin(); - if (!p) - return 0; - return p->createNotificationPresenter(); + return p ? qobject_cast<QWebNotificationPresenter*>(p->createExtension(QWebKitPlatformPlugin::Notifications)) : 0; +} + +QWebHapticFeedbackPlayer* QtPlatformPlugin::createHapticFeedbackPlayer() +{ + QWebKitPlatformPlugin* p = plugin(); + return p ? qobject_cast<QWebHapticFeedbackPlayer*>(p->createExtension(QWebKitPlatformPlugin::Haptics)) : 0; } } diff --git a/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h b/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h index 9bdab75..a3e50c2 100644 --- a/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h +++ b/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h @@ -26,6 +26,7 @@ class QWebSelectMethod; class QWebKitPlatformPlugin; class QWebNotificationPresenter; +class QWebHapticFeedbackPlayer; class QWebSelectData; namespace WebCore { @@ -37,6 +38,7 @@ public: QWebSelectMethod* createSelectInputMethod(); QWebNotificationPresenter* createNotificationPresenter(); + QWebHapticFeedbackPlayer* createHapticFeedbackPlayer(); QWebKitPlatformPlugin* plugin(); diff --git a/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp b/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp index 948e0cd..7cd255f 100644 --- a/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp +++ b/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp @@ -30,8 +30,10 @@ #include "config.h" #include "WebPlatformStrategies.h" -#include "NotImplemented.h" +#include "Chrome.h" +#include "ChromeClientQt.h" #include <IntSize.h> +#include "NotImplemented.h" #include <Page.h> #include <PageGroup.h> #include <PluginDatabase.h> @@ -43,14 +45,13 @@ using namespace WebCore; -void WebPlatformStrategies::initialize(QWebPage* webPage) +void WebPlatformStrategies::initialize() { - DEFINE_STATIC_LOCAL(WebPlatformStrategies, platformStrategies, (webPage)); + DEFINE_STATIC_LOCAL(WebPlatformStrategies, platformStrategies, ()); Q_UNUSED(platformStrategies); } -WebPlatformStrategies::WebPlatformStrategies(QWebPage* webPage) - : m_page(webPage) +WebPlatformStrategies::WebPlatformStrategies() { setPlatformStrategies(this); } @@ -78,10 +79,11 @@ void WebPlatformStrategies::refreshPlugins() PluginDatabase::installedPlugins()->refresh(); } -void WebPlatformStrategies::getPluginInfo(Vector<WebCore::PluginInfo>& outPlugins) +void WebPlatformStrategies::getPluginInfo(const WebCore::Page* page, Vector<WebCore::PluginInfo>& outPlugins) { - QWebPluginFactory* factory = m_page->pluginFactory(); - if (factory) { + QWebPage* qPage = static_cast<ChromeClientQt*>(page->chrome()->client())->m_webPage; + QWebPluginFactory* factory; + if (qPage && (factory = qPage->pluginFactory())) { QList<QWebPluginFactory::Plugin> qplugins = factory->plugins(); for (int i = 0; i < qplugins.count(); ++i) { @@ -198,6 +200,56 @@ String WebPlatformStrategies::contextMenuItemTagCopyImageToClipboard() return QCoreApplication::translate("QWebPage", "Copy Image", "Copy Link context menu item"); } +String WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow() +{ + return QCoreApplication::translate("QWebPage", "Open Video", "Open Video in New Window"); +} + +String WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow() +{ + return QCoreApplication::translate("QWebPage", "Open Audio", "Open Audio in New Window"); +} + +String WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard() +{ + return QCoreApplication::translate("QWebPage", "Copy Video", "Copy Video Link Location"); +} + +String WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard() +{ + return QCoreApplication::translate("QWebPage", "Copy Audio", "Copy Audio Link Location"); +} + +String WebPlatformStrategies::contextMenuItemTagToggleMediaControls() +{ + return QCoreApplication::translate("QWebPage", "Toggle Controls", "Toggle Media Controls"); +} + +String WebPlatformStrategies::contextMenuItemTagToggleMediaLoop() +{ + return QCoreApplication::translate("QWebPage", "Toggle Loop", "Toggle Media Loop Playback"); +} + +String WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen() +{ + return QCoreApplication::translate("QWebPage", "Enter Fullscreen", "Switch Video to Fullscreen"); +} + +String WebPlatformStrategies::contextMenuItemTagMediaPlay() +{ + return QCoreApplication::translate("QWebPage", "Play", "Play"); +} + +String WebPlatformStrategies::contextMenuItemTagMediaPause() +{ + return QCoreApplication::translate("QWebPage", "Pause", "Pause"); +} + +String WebPlatformStrategies::contextMenuItemTagMediaMute() +{ + return QCoreApplication::translate("QWebPage", "Mute", "Mute"); +} + String WebPlatformStrategies::contextMenuItemTagOpenFrameInNewWindow() { return QCoreApplication::translate("QWebPage", "Open Frame", "Open Frame in New Window context menu item"); diff --git a/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h b/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h index 8ea60d9..ea366e0 100644 --- a/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h +++ b/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h @@ -33,14 +33,16 @@ #include <PluginStrategy.h> #include <VisitedLinkStrategy.h> -class QWebPage; +namespace WebCore { +class Page; +} class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::PluginStrategy, private WebCore::LocalizationStrategy, private WebCore::VisitedLinkStrategy { public: - static void initialize(QWebPage* webPage); + static void initialize(); private: - WebPlatformStrategies(QWebPage* webPage); + WebPlatformStrategies(); // WebCore::PlatformStrategies virtual WebCore::PluginStrategy* createPluginStrategy(); @@ -49,7 +51,7 @@ private: // WebCore::PluginStrategy virtual void refreshPlugins(); - virtual void getPluginInfo(Vector<WebCore::PluginInfo>&); + virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&); // WebCore::LocalizationStrategy virtual WTF::String inputElementAltText(); @@ -95,6 +97,16 @@ private: virtual WTF::String contextMenuItemTagLeftToRight(); virtual WTF::String contextMenuItemTagRightToLeft(); virtual WTF::String contextMenuItemTagInspectElement(); + virtual WTF::String contextMenuItemTagOpenVideoInNewWindow(); + virtual WTF::String contextMenuItemTagOpenAudioInNewWindow(); + virtual WTF::String contextMenuItemTagCopyVideoLinkToClipboard(); + virtual WTF::String contextMenuItemTagCopyAudioLinkToClipboard(); + virtual WTF::String contextMenuItemTagToggleMediaControls(); + virtual WTF::String contextMenuItemTagToggleMediaLoop(); + virtual WTF::String contextMenuItemTagEnterVideoFullscreen(); + virtual WTF::String contextMenuItemTagMediaPlay(); + virtual WTF::String contextMenuItemTagMediaPause(); + virtual WTF::String contextMenuItemTagMediaMute(); virtual WTF::String searchMenuNoRecentSearchesText(); virtual WTF::String searchMenuRecentSearchesText(); virtual WTF::String searchMenuClearRecentSearchesText(); @@ -134,8 +146,6 @@ private: // WebCore::VisitedLinkStrategy virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash); virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash); - - QWebPage* m_page; }; #endif // WebPlatformStrategies_h diff --git a/WebKit/qt/examples/examples.pro b/WebKit/qt/examples/examples.pro new file mode 100644 index 0000000..f8dc589 --- /dev/null +++ b/WebKit/qt/examples/examples.pro @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +SUBDIRS = platformplugin
\ No newline at end of file diff --git a/WebKit/qt/examples/platformplugin/README b/WebKit/qt/examples/platformplugin/README index 47ef797..e220d04 100644 --- a/WebKit/qt/examples/platformplugin/README +++ b/WebKit/qt/examples/platformplugin/README @@ -6,6 +6,9 @@ that will provide combo boxes popups to QtWebKit. QtWebKit will look for the plugins automatically so there is no need to make any other configuration to put the plugin into use. To stop using the plugin just remove the directory $$[QT_INSTALL_PLUGINS]/webkit. +A copy of qwebkitplatformplugin.h is provided with the example, as platform plugins should not depend +on the precense of QtWebKit to build. + This plugin can provide popups for <select multiple> elements but to use this feature QtWebKit must be compiled with NO_LISTBOX_RENDERING enabled. diff --git a/WebKit/qt/examples/platformplugin/WebPlugin.cpp b/WebKit/qt/examples/platformplugin/WebPlugin.cpp index c3efb80..23b938e 100644 --- a/WebKit/qt/examples/platformplugin/WebPlugin.cpp +++ b/WebKit/qt/examples/platformplugin/WebPlugin.cpp @@ -210,15 +210,30 @@ MultipleSelectionPopup::MultipleSelectionPopup(const QWebSelectData& data) bool WebPlugin::supportsExtension(Extension extension) const { - if (extension == MultipleSelections) + switch (extension) { + case MultipleSelections: return true; - if (extension == Notifications) #if ENABLE_NOTIFICATIONS + case Notifications: return true; -#else +#endif + default: return false; + } +} + +QObject* WebPlugin::createExtension(Extension extension) const +{ + switch (extension) { + case MultipleSelections: + return new WebPopup(); +#if ENABLE_NOTIFICATIONS + case Notifications: + return new WebNotificationPresenter(); #endif - return false; + default: + return 0; + } } Q_EXPORT_PLUGIN2(platformplugin, WebPlugin) diff --git a/WebKit/qt/examples/platformplugin/WebPlugin.h b/WebKit/qt/examples/platformplugin/WebPlugin.h index 4af19f9..3df345f 100644 --- a/WebKit/qt/examples/platformplugin/WebPlugin.h +++ b/WebKit/qt/examples/platformplugin/WebPlugin.h @@ -87,14 +87,8 @@ class WebPlugin : public QObject, public QWebKitPlatformPlugin Q_OBJECT Q_INTERFACES(QWebKitPlatformPlugin) public: - virtual QWebSelectMethod* createSelectInputMethod() const { return new WebPopup(); } virtual bool supportsExtension(Extension extension) const; - virtual QWebNotificationPresenter* createNotificationPresenter() const { - return new WebNotificationPresenter(); - } - virtual QWebHapticFeedbackPlayer* createHapticFeedbackPlayer() const { - return 0; - } + virtual QObject* createExtension(Extension extension) const; }; #endif // WEBPLUGIN_H diff --git a/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h b/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h index 76496c5..faa6989 100644 --- a/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h +++ b/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h @@ -110,12 +110,9 @@ public: }; virtual bool supportsExtension(Extension extension) const = 0; - virtual QWebSelectMethod* createSelectInputMethod() const = 0; - virtual QWebNotificationPresenter* createNotificationPresenter() const = 0; - virtual QWebHapticFeedbackPlayer* createHapticFeedbackPlayer() const = 0; - + virtual QObject* createExtension(Extension extension) const = 0; }; -Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.4"); +Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.5"); #endif // QWEBKITPLATFORMPLUGIN_H diff --git a/WebKit/qt/symbian/eabi/QtWebKitu.def b/WebKit/qt/symbian/eabi/QtWebKitu.def index 8291197..2b917e1 100644 --- a/WebKit/qt/symbian/eabi/QtWebKitu.def +++ b/WebKit/qt/symbian/eabi/QtWebKitu.def @@ -799,7 +799,6 @@ EXPORTS _ZN8QWebPage23allowGeolocationRequestEP9QWebFrame @ 798 NONAME _ZN8QWebPage23viewportChangeRequestedERKNS_13ViewportHintsE @ 799 NONAME ABSENT _ZNK15QWebScriptWorld5worldEv @ 800 NONAME - _ZN16QGraphicsWebView13setDeviceSizeERK5QSize @ 801 NONAME _ZN23DumpRenderTreeSupportQt12pagePropertyEP9QWebFrameRK7QStringi @ 802 NONAME _ZN23DumpRenderTreeSupportQt16isPageBoxVisibleEP9QWebFramei @ 803 NONAME _ZN23DumpRenderTreeSupportQt16resumeAnimationsEP9QWebFrame @ 804 NONAME @@ -811,7 +810,6 @@ EXPORTS _ZN8QWebPage23checkPermissionFromUserEP9QWebFrameNS_16PermissionDomainERNS_16PermissionPolicyE @ 810 NONAME _ZN8QWebPage25requestPermissionFromUserEP9QWebFrameNS_16PermissionDomainE @ 811 NONAME _ZN8QWebPage27cancelRequestsForPermissionEP9QWebFrameNS_16PermissionDomainE @ 812 NONAME - _ZNK16QGraphicsWebView10deviceSizeEv @ 813 NONAME _ZN23DumpRenderTreeSupportQt14viewportAsTextEP8QWebPageRK5QSize @ 814 NONAME _ZN23DumpRenderTreeSupportQt32simulateDesktopNotificationClickERK7QString @ 815 NONAME _ZN8QWebPage23viewportChangeRequestedEv @ 816 NONAME diff --git a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp index 2c63739..ec8a39e 100644 --- a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp +++ b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp @@ -2604,6 +2604,7 @@ void tst_QWebFrame::popupFocus() "</html>"); view.resize(400, 100); view.show(); + QTest::qWaitForWindowShown(&view); view.setFocus(); QTRY_VERIFY(view.hasFocus()); @@ -2946,12 +2947,7 @@ void tst_QWebFrame::evaluateWillCauseRepaint() view.setHtml(html); view.show(); -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) QTest::qWaitForWindowShown(&view); -#else - QTest::qWait(2000); -#endif - view.page()->mainFrame()->evaluateJavaScript( "document.getElementById('junk').style.display = 'none';"); diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index 10af94c..36fa050 100644 --- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -1368,12 +1368,9 @@ void tst_QWebPage::inputMethods_data() { QTest::addColumn<QString>("viewType"); QTest::newRow("QWebView") << "QWebView"; -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) QTest::newRow("QGraphicsWebView") << "QGraphicsWebView"; -#endif } -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) static Qt::InputMethodHints inputMethodHints(QObject* object) { if (QGraphicsObject* o = qobject_cast<QGraphicsObject*>(object)) @@ -1382,14 +1379,11 @@ static Qt::InputMethodHints inputMethodHints(QObject* object) return w->inputMethodHints(); return Qt::InputMethodHints(); } -#endif static bool inputMethodEnabled(QObject* object) { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) if (QGraphicsObject* o = qobject_cast<QGraphicsObject*>(object)) return o->flags() & QGraphicsItem::ItemAcceptsInputMethod; -#endif if (QWidget* w = qobject_cast<QWidget*>(object)) return w->testAttribute(Qt::WA_InputMethodEnabled); return false; @@ -1406,9 +1400,7 @@ void tst_QWebPage::inputMethods() wv->setPage(page); view = wv; container = view; - } -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) - else if (viewType == "QGraphicsWebView") { + } else if (viewType == "QGraphicsWebView") { QGraphicsWebView* wv = new QGraphicsWebView; wv->setPage(page); view = wv; @@ -1420,9 +1412,7 @@ void tst_QWebPage::inputMethods() wv->setGeometry(QRect(0, 0, 500, 500)); container = gv; - } -#endif - else + } else QVERIFY2(false, "Unknown view type"); page->settings()->setFontFamily(QWebSettings::SerifFont, "FooSerifFont"); @@ -1441,7 +1431,6 @@ void tst_QWebPage::inputMethods() QMouseEvent evrel(QEvent::MouseButtonRelease, inputs.at(0).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier); page->event(&evrel); -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) // This part of the test checks if the SIP (Software Input Panel) is triggered, // which normally happens on mobile platforms, when a user input form receives // a mouse click. @@ -1463,15 +1452,11 @@ void tst_QWebPage::inputMethods() QVERIFY(viewEventSpy.contains(QEvent::RequestSoftwareInputPanel)); else QVERIFY(!viewEventSpy.contains(QEvent::RequestSoftwareInputPanel)); -#endif viewEventSpy.clear(); page->event(&evpres); page->event(&evrel); - -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) QVERIFY(viewEventSpy.contains(QEvent::RequestSoftwareInputPanel)); -#endif //ImMicroFocus QVariant variant = page->inputMethodQuery(Qt::ImMicroFocus); @@ -1499,7 +1484,6 @@ void tst_QWebPage::inputMethods() page->event(&eventText); } -#if QT_VERSION >= 0x040600 //ImMaximumTextLength variant = page->inputMethodQuery(Qt::ImMaximumTextLength); QCOMPARE(20, variant.toInt()); @@ -1548,14 +1532,12 @@ void tst_QWebPage::inputMethods() variant = page->inputMethodQuery(Qt::ImCurrentSelection); selectionValue = variant.value<QString>(); QCOMPARE(selectionValue, QString("tWebK")); -#endif //ImSurroundingText variant = page->inputMethodQuery(Qt::ImSurroundingText); QString value = variant.value<QString>(); QCOMPARE(value, QString("QtWebKit")); -#if QT_VERSION >= 0x040600 { QList<QInputMethodEvent::Attribute> attributes; // Clear the selection, so the next test does not clear any contents. @@ -1569,7 +1551,6 @@ void tst_QWebPage::inputMethods() variant = page->inputMethodQuery(Qt::ImSurroundingText); value = variant.value<QString>(); QCOMPARE(value, QString("QtWebKit")); -#endif // Cancel current composition first inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 0, 0, QVariant()); @@ -1670,13 +1651,11 @@ void tst_QWebPage::inputMethods() page->event(&evrelPassword); QVERIFY(inputMethodEnabled(view)); -#if QT_VERSION >= 0x040600 QVERIFY(inputMethodHints(view) & Qt::ImhHiddenText); page->event(&evpres); page->event(&evrel); QVERIFY(!(inputMethodHints(view) & Qt::ImhHiddenText)); -#endif page->mainFrame()->setHtml("<html><body><p>nothing to input here"); viewEventSpy.clear(); @@ -1689,11 +1668,8 @@ void tst_QWebPage::inputMethods() page->event(&evrel); } -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) QVERIFY(!viewEventSpy.contains(QEvent::RequestSoftwareInputPanel)); -#endif -#if QT_VERSION >= 0x040600 //START - Test for sending empty QInputMethodEvent page->mainFrame()->setHtml("<html><body>" \ "<input type='text' id='input3' value='QtWebKit2'/>" \ @@ -1707,7 +1683,6 @@ void tst_QWebPage::inputMethods() QString inputValue = page->mainFrame()->evaluateJavaScript("document.getElementById('input3').value").toString(); QCOMPARE(inputValue, QString("QtWebKit2")); //END - Test for sending empty QInputMethodEvent -#endif delete container; } @@ -2089,10 +2064,8 @@ void tst_QWebPage::originatingObjectInNetworkRequests() QList<QWebFrame*> childFrames = m_page->mainFrame()->childFrames(); QCOMPARE(childFrames.count(), 2); -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) for (int i = 0; i < 2; ++i) QVERIFY(qobject_cast<QWebFrame*>(networkManager->requests.at(i).originatingObject()) == childFrames.at(i)); -#endif } /** @@ -2189,23 +2162,23 @@ void tst_QWebPage::testStopScheduledPageRefresh() QWebPage page1; page1.setNetworkAccessManager(new TestNetworkManager(&page1)); page1.mainFrame()->setHtml("<html><head>" - "<meta http-equiv=\"refresh\"content=\"0;URL=http://qt.nokia.com/favicon.ico\">" + "<meta http-equiv=\"refresh\"content=\"0;URL=qrc:///resources/index.html\">" "</head><body><h1>Page redirects immediately...</h1>" "</body></html>"); QVERIFY(::waitForSignal(&page1, SIGNAL(loadFinished(bool)))); QTest::qWait(500); - QCOMPARE(page1.mainFrame()->url().toString(), QString("http://qt.nokia.com/favicon.ico")); + QCOMPARE(page1.mainFrame()->url(), QUrl(QLatin1String("qrc:///resources/index.html"))); // With QWebPage::StopScheduledPageRefresh QWebPage page2; page2.setNetworkAccessManager(new TestNetworkManager(&page2)); page2.mainFrame()->setHtml("<html><head>" - "<meta http-equiv=\"refresh\"content=\"1;URL=http://qt.nokia.com/favicon.ico\">" + "<meta http-equiv=\"refresh\"content=\"1;URL=qrc:///resources/index.html\">" "</head><body><h1>Page redirect test with 1 sec timeout...</h1>" "</body></html>"); page2.triggerAction(QWebPage::StopScheduledPageRefresh); QTest::qWait(1500); - QCOMPARE(page2.mainFrame()->url().toString(), QString("about:blank")); + QCOMPARE(page2.mainFrame()->url().toString(), QLatin1String("about:blank")); } void tst_QWebPage::findText() diff --git a/WebKit/qt/tests/qwebview/tst_qwebview.cpp b/WebKit/qt/tests/qwebview/tst_qwebview.cpp index fd4978d..8cd2f3f 100644 --- a/WebKit/qt/tests/qwebview/tst_qwebview.cpp +++ b/WebKit/qt/tests/qwebview/tst_qwebview.cpp @@ -142,22 +142,14 @@ void tst_QWebView::reusePage() } view1->show(); -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) QTest::qWaitForWindowShown(view1); -#else - QTest::qWait(2000); -#endif 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 -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) QTest::qWaitForWindowShown(view2); -#else - QTest::qWait(2000); -#endif delete view2; delete page; // must not crash diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog index 251bf91..4933b24 100644 --- a/WebKit/win/ChangeLog +++ b/WebKit/win/ChangeLog @@ -1,3 +1,137 @@ +2010-09-28 Jenn Braithwaite <jennb@chromium.org> + + Reviewed by Dmitry Titov. + + Added oldPage param to FrameLoaderClient::didTransferChildFrameToNewDocument. + https://bugs.webkit.org/show_bug.cgi?id=46663 + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::didTransferChildFrameToNewDocument): + * WebCoreSupport/WebFrameLoaderClient.h: + +2010-09-27 Andrey Kosyakov <caseq@chromium.org> + + Unreviewed build fix (win; broken in r68371) + + * WebFrame.cpp: remove include <WebCore/ResourceHandleWin.h> + +2010-09-23 Matthew Delaney <mdelaney@apple.com> + + Reviewed by Simon Fraser. + + Reduce minimum DOMTimer interval + https://bugs.webkit.org/show_bug.cgi?id=45362 + + * WebView.cpp: + Updating set interval call to use Settings' static version inside + one time init block. + +2010-09-23 Nate Chapin <japhet@chromium.org> + + Unreviewed, build fix. + + Move hyperlinkAuditingEnabled to IWebPreferencesPrivate.idl + and touch WebKit.idl + + * Interfaces/IWebPreferences.idl: + * Interfaces/IWebPreferencesPrivate.idl: + * Interfaces/WebKit.idl: + * WebView.cpp: + (WebView::notifyPreferencesChanged): + +2010-09-23 Nate Chapin <japhet@chromium.org> + + Unreviewed, build fix. + + Look for hyperlinkAuditingEnabled in the right set of preferences. + + * WebView.cpp: + (WebView::notifyPreferencesChanged): + +2010-09-23 Nate Chapin <japhet@chromium.org> + + Reviewed by Darin Fisher. + + Add hyperlink auditing settings (i.e., <a ping>). + https://bugs.webkit.org/show_bug.cgi?id=30458 + + * Interfaces/IWebPreferences.idl: + * WebPreferenceKeysPrivate.h: + * WebPreferences.cpp: + (WebPreferences::initializeDefaultSettings): + (WebPreferences::hyperlinkAuditingEnabled): + (WebPreferences::setHyperlinkAuditingEnabled): + * WebPreferences.h: + * WebView.cpp: + (WebView::notifyPreferencesChanged): + +2010-09-23 Matthew Delaney <mdelaney@apple.com> + + Reviewed by Adam Roben. + + Create one time initialization block for WebView's initWithFrame + https://bugs.webkit.org/show_bug.cgi?id=46307 + + * WebView.cpp: Added one time initialization block for webview code + that needs only be run once and not for each webview. This is just as + the mac version WebView.mm does. + +2010-09-22 Brent Fulgham <bfulgham@webkit.org> + + Reviewed by Martin Robinson. + + [WinCairo] Part 2: Update WebKitTestRunner and DumpRenderTree Build. + https://bugs.webkit.org/show_bug.cgi?id=46303. + + * WebKit.vcproj/WebKit.sln: Update overall Debug_Cairo and + Release_Cairo configurations to select appropriate build + targets for WebKitTestRunner and MiniBrowser. + +2010-09-22 Brent Fulgham <bfulgham@webkit.org> + + Reviewed by Martin Robinson. + + [WinCairo] Update WebKitTestRunner and DumpRenderTree Build.rt + https://bugs.webkit.org/show_bug.cgi?id=46303. + + * WebKit.vcproj/WebKit.sln: Update overall Debug_Cairo and + Release_Cairo configurations to select appropriate build + targets for InjectionBundle. + +2010-09-22 Balazs Kelemen <kb@inf.u-szeged.hu> + + Reviewed by Kenneth Rohde Christiansen. + + PluginStrategy should satisfy the needs of Qt + https://bugs.webkit.org/show_bug.cgi?id=45857 + No new functionality so no new tests. + + * WebCoreSupport/WebPlatformStrategies.cpp: + (WebPlatformStrategies::getPluginInfo): + * WebCoreSupport/WebPlatformStrategies.h: + +2010-09-20 Philippe Normand <pnormand@igalia.com> + + Reviewed by Eric Carlson. + + [GTK] enhanced context menu for media elements + https://bugs.webkit.org/show_bug.cgi?id=45021 + + New localized strings for the media element context-menu. + + * WebCoreSupport/WebPlatformStrategies.cpp: + (WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow): + (WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow): + (WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard): + (WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard): + (WebPlatformStrategies::contextMenuItemTagToggleMediaControls): + (WebPlatformStrategies::contextMenuItemTagToggleMediaLoop): + (WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen): + (WebPlatformStrategies::contextMenuItemTagMediaPlay): + (WebPlatformStrategies::contextMenuItemTagMediaPause): + (WebPlatformStrategies::contextMenuItemTagMediaMute): + * WebCoreSupport/WebPlatformStrategies.h: + 2010-09-17 Darin Adler <darin@apple.com> Reviewed by Sam Weinig. diff --git a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl index bca8d6f..68cbcf3 100644 --- a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl +++ b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl @@ -118,4 +118,7 @@ interface IWebPreferencesPrivate : IUnknown HRESULT memoryInfoEnabled([out, retval] BOOL *enabled); HRESULT setMemoryInfoEnabled([in] BOOL enabled); + + HRESULT hyperlinkAuditingEnabled(BOOL *hyperlinkAuditingEnabled); + HRESULT setHyperlinkAuditingEnabled(BOOL hyperlinkAuditingEnabled); } diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl index d25cdfe..8938501 100644 --- a/WebKit/win/Interfaces/WebKit.idl +++ b/WebKit/win/Interfaces/WebKit.idl @@ -20,7 +20,7 @@ * 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. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ cpp_quote("/*") diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp index 1fb827d..4b05338 100644 --- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp +++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp @@ -728,7 +728,7 @@ PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const Strin return result.release(); } -void WebFrameLoaderClient::didTransferChildFrameToNewDocument() +void WebFrameLoaderClient::didTransferChildFrameToNewDocument(Page*) { } diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h index 6e8e354..7ec344c 100644 --- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h +++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h @@ -112,7 +112,7 @@ public: virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); - virtual void didTransferChildFrameToNewDocument(); + virtual void didTransferChildFrameToNewDocument(WebCore::Page*); virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WTF::String>&, const Vector<WTF::String>&, const WTF::String&, bool loadManually); virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); diff --git a/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp b/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp index 00a2eab..fe35877 100644 --- a/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp +++ b/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp @@ -68,7 +68,7 @@ void WebPlatformStrategies::refreshPlugins() PluginDatabase::installedPlugins()->refresh(); } -void WebPlatformStrategies::getPluginInfo(Vector<WebCore::PluginInfo>& outPlugins) +void WebPlatformStrategies::getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>& outPlugins) { const Vector<PluginPackage*>& plugins = PluginDatabase::installedPlugins()->plugins(); @@ -163,6 +163,56 @@ String WebPlatformStrategies::contextMenuItemTagCopyImageToClipboard() return UI_STRING("Copy Image", "Copy Image context menu item"); } +String WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow() +{ + return UI_STRING("Open Video in New Window", "Open Video in New Window context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow() +{ + return UI_STRING("Open Audio in New Window", "Open Audio in New Window context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard() +{ + return UI_STRING("Copy Video Address", "Copy Video Address Location context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard() +{ + return UI_STRING("Copy Audio Address", "Copy Audio Address Location context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagToggleMediaControls() +{ + return UI_STRING("Controls", "Media Controls context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagToggleMediaLoop() +{ + return UI_STRING("Loop", "Media Loop context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen() +{ + return UI_STRING("Enter Fullscreen", "Video Enter Fullscreen context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagMediaPlay() +{ + return UI_STRING("Play", "Media Play context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagMediaPause() +{ + return UI_STRING("Pause", "Media Pause context menu item"); +} + +String WebPlatformStrategies::contextMenuItemTagMediaMute() +{ + return UI_STRING("Mute", "Media Mute context menu item"); +} + String WebPlatformStrategies::contextMenuItemTagOpenFrameInNewWindow() { return UI_STRING("Open Frame in New Window", "Open Frame in New Window context menu item"); diff --git a/WebKit/win/WebCoreSupport/WebPlatformStrategies.h b/WebKit/win/WebCoreSupport/WebPlatformStrategies.h index c3cfbb4..48c2b46 100644 --- a/WebKit/win/WebCoreSupport/WebPlatformStrategies.h +++ b/WebKit/win/WebCoreSupport/WebPlatformStrategies.h @@ -45,7 +45,7 @@ private: // WebCore::PluginStrategy virtual void refreshPlugins(); - virtual void getPluginInfo(Vector<WebCore::PluginInfo>&); + virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&); // WebCore::LocalizationStrategy virtual WTF::String inputElementAltText(); @@ -92,6 +92,16 @@ private: virtual WTF::String contextMenuItemTagLeftToRight(); virtual WTF::String contextMenuItemTagRightToLeft(); virtual WTF::String contextMenuItemTagInspectElement(); + virtual WTF::String contextMenuItemTagOpenVideoInNewWindow(); + virtual WTF::String contextMenuItemTagOpenAudioInNewWindow(); + virtual WTF::String contextMenuItemTagCopyVideoLinkToClipboard(); + virtual WTF::String contextMenuItemTagCopyAudioLinkToClipboard(); + virtual WTF::String contextMenuItemTagToggleMediaControls(); + virtual WTF::String contextMenuItemTagToggleMediaLoop(); + virtual WTF::String contextMenuItemTagEnterVideoFullscreen(); + virtual WTF::String contextMenuItemTagMediaPlay(); + virtual WTF::String contextMenuItemTagMediaPause(); + virtual WTF::String contextMenuItemTagMediaMute(); #endif // ENABLE(CONTEXT_MENUS) virtual WTF::String searchMenuNoRecentSearchesText(); virtual WTF::String searchMenuRecentSearchesText(); diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp index 843f33a..27da1f4 100644 --- a/WebKit/win/WebFrame.cpp +++ b/WebKit/win/WebFrame.cpp @@ -89,7 +89,6 @@ #include <WebCore/PluginView.h> #include <WebCore/PrintContext.h> #include <WebCore/ResourceHandle.h> -#include <WebCore/ResourceHandleWin.h> #include <WebCore/ResourceRequest.h> #include <WebCore/RenderView.h> #include <WebCore/RenderTreeAsText.h> diff --git a/WebKit/win/WebKit.vcproj/WebKit.sln b/WebKit/win/WebKit.vcproj/WebKit.sln index 251fa5f..504bae3 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.sln +++ b/WebKit/win/WebKit.vcproj/WebKit.sln @@ -413,14 +413,14 @@ Global {114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.Build.0 = Release|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.Build.0 = Debug_All|Win32
- {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
- {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Cairo|Win32.Build.0 = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.ActiveCfg = Debug|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.Build.0 = Debug|Win32
- {CBC3391C-F060-4BF5-A66E-81404168816B}.Release_Cairo|Win32.ActiveCfg = Release|Win32
- {CBC3391C-F060-4BF5-A66E-81404168816B}.Release_Cairo|Win32.Build.0 = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release_Cairo|Win32.ActiveCfg = Release_CFLite|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.ActiveCfg = Release|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.Build.0 = Release|Win32
{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_All|Win32.ActiveCfg = all|Win32
@@ -437,26 +437,26 @@ Global {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release|Win32.Build.0 = all|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Debug_All|Win32.Build.0 = Debug_All|Win32
- {3B99669B-1817-443B-BCBE-835580146668}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
- {3B99669B-1817-443B-BCBE-835580146668}.Debug_Cairo|Win32.Build.0 = Debug|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Debug|Win32.ActiveCfg = Debug|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Debug|Win32.Build.0 = Debug|Win32
- {3B99669B-1817-443B-BCBE-835580146668}.Release_Cairo|Win32.ActiveCfg = Release|Win32
- {3B99669B-1817-443B-BCBE-835580146668}.Release_Cairo|Win32.Build.0 = Release|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Release_Cairo|Win32.ActiveCfg = Release_CFLite|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.ActiveCfg = Release|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.Build.0 = Release|Win32
{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_All|Win32.Build.0 = Debug_All|Win32
- {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
- {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_Cairo|Win32.Build.0 = Debug|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug|Win32.ActiveCfg = Debug|Win32
{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug|Win32.Build.0 = Debug|Win32
- {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Release_Cairo|Win32.ActiveCfg = Release|Win32
- {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Release_Cairo|Win32.Build.0 = Release|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Release_Cairo|Win32.ActiveCfg = Release_CFLite|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Release|Win32.ActiveCfg = Release|Win32
{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
diff --git a/WebKit/win/WebPreferenceKeysPrivate.h b/WebKit/win/WebPreferenceKeysPrivate.h index f62905c..0b781d8 100644 --- a/WebKit/win/WebPreferenceKeysPrivate.h +++ b/WebKit/win/WebPreferenceKeysPrivate.h @@ -66,6 +66,7 @@ #define WebKitUsesPageCachePreferenceKey "WebKitUsesPageCachePreferenceKey" #define WebKitCacheModelPreferenceKey "WebKitCacheModelPreferenceKey" #define WebKitLocalStorageDatabasePathPreferenceKey "WebKitLocalStorageDatabasePath" +#define WebKitHyperlinkAuditingEnabledPreferenceKey "WebKitHyperlinkAuditingEnabled" // These are private both because callers should be using the cover methods and because the // cover methods themselves are private. diff --git a/WebKit/win/WebPreferences.cpp b/WebKit/win/WebPreferences.cpp index 255b68e..d4bfd3e 100644 --- a/WebKit/win/WebPreferences.cpp +++ b/WebKit/win/WebPreferences.cpp @@ -264,6 +264,7 @@ void WebPreferences::initializeDefaultSettings() CFDictionaryAddValue(defaults, CFSTR(WebKitDNSPrefetchingEnabledPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitMemoryInfoEnabledPreferenceKey), kCFBooleanFalse); + CFDictionaryAddValue(defaults, CFSTR(WebKitHyperlinkAuditingEnabledPreferenceKey), kCFBooleanFalse); defaultSettings = defaults; } @@ -1148,6 +1149,19 @@ HRESULT STDMETHODCALLTYPE WebPreferences::setEditingBehavior( return S_OK; } +HRESULT STDMETHODCALLTYPE WebPreferences::hyperlinkAuditingEnabled( + /* [in] */ BOOL* enabled) +{ + *enabled = boolValueForKey(CFSTR(WebKitHyperlinkAuditingEnabledPreferenceKey)); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebPreferences::setHyperlinkAuditingEnabled( + /* [retval][out] */ BOOL enabled) +{ + setBoolValue(CFSTR(WebKitHyperlinkAuditingEnabledPreferenceKey), enabled); + return S_OK; +} HRESULT STDMETHODCALLTYPE WebPreferences::cookieStorageAcceptPolicy( /* [retval][out] */ WebKitCookieStorageAcceptPolicy *acceptPolicy ) diff --git a/WebKit/win/WebPreferences.h b/WebKit/win/WebPreferences.h index 463e1b3..d09945a 100644 --- a/WebKit/win/WebPreferences.h +++ b/WebKit/win/WebPreferences.h @@ -426,6 +426,9 @@ public: virtual HRESULT STDMETHODCALLTYPE setMemoryInfoEnabled(BOOL); virtual HRESULT STDMETHODCALLTYPE memoryInfoEnabled(BOOL*); + virtual HRESULT STDMETHODCALLTYPE hyperlinkAuditingEnabled(BOOL*); + virtual HRESULT STDMETHODCALLTYPE setHyperlinkAuditingEnabled(BOOL); + // WebPreferences // This method accesses a different preference key than developerExtrasEnabled. diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp index 04794c9..547daf8 100755 --- a/WebKit/win/WebView.cpp +++ b/WebKit/win/WebView.cpp @@ -2561,12 +2561,18 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame( sharedPreferences->willAddToWebView(); m_preferences = sharedPreferences; - InitializeLoggingChannelsIfNecessary(); + static bool didOneTimeInitialization; + if (!didOneTimeInitialization) { + InitializeLoggingChannelsIfNecessary(); #if ENABLE(DATABASE) - WebKitInitializeWebDatabasesIfNecessary(); + WebKitInitializeWebDatabasesIfNecessary(); #endif - WebKitSetApplicationCachePathIfNecessary(); - WebPlatformStrategies::initialize(); + WebKitSetApplicationCachePathIfNecessary(); + WebPlatformStrategies::initialize(); + Settings::setMinDOMTimerInterval(0.004); + + didOneTimeInitialization = true; + } #if USE(SAFARI_THEME) BOOL shouldPaintNativeControls; @@ -2589,7 +2595,6 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame( pageClients.geolocationControllerClient = new WebGeolocationControllerClient(this); #endif m_page = new Page(pageClients); - m_page->settings()->setMinDOMTimerInterval(0.004); BSTR localStoragePath; if (SUCCEEDED(m_preferences->localStorageDatabasePath(&localStoragePath))) { @@ -4772,6 +4777,11 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) if (FAILED(hr)) return hr; settings->setMemoryInfoEnabled(enabled); + + hr = prefsPrivate->hyperlinkAuditingEnabled(&enabled); + if (FAILED(hr)) + return hr; + settings->setHyperlinkAuditingEnabled(enabled); if (!m_closeWindowTimer) m_mainFrame->invalidate(); // FIXME diff --git a/WebKit/wince/ChangeLog b/WebKit/wince/ChangeLog index fba4def..c85f902 100644 --- a/WebKit/wince/ChangeLog +++ b/WebKit/wince/ChangeLog @@ -1,3 +1,60 @@ +2010-09-28 Jenn Braithwaite <jennb@chromium.org> + + Reviewed by Dmitry Titov. + + Added oldPage param to FrameLoaderClient::didTransferChildFrameToNewDocument. + https://bugs.webkit.org/show_bug.cgi?id=46663 + + * WebCoreSupport/FrameLoaderClientWinCE.cpp: + (WebKit::FrameLoaderClientWinCE::didTransferChildFrameToNewDocument): + * WebCoreSupport/FrameLoaderClientWinCE.h: + +2010-09-23 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Adam Roben. + + Add PlatformStrategiesWinCE + https://bugs.webkit.org/show_bug.cgi?id=46371 + + * WebCoreSupport/PlatformStrategiesWinCE.cpp: Copied from WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp. + * WebCoreSupport/PlatformStrategiesWinCE.h: Copied from WebKit/win/WebCoreSupport/WebPlatformStrategies.h. + +2010-09-23 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Adam Roben. + + Add ChromeClientWinCE + https://bugs.webkit.org/show_bug.cgi?id=46294 + + * WebCoreSupport/ChromeClientWinCE.cpp: Added. + * WebCoreSupport/ChromeClientWinCE.h: Added. + +2010-09-23 Patrick Gansterer <paroga@webkit.org> + + Unreviewed. + + Build fix for FrameLoaderClientWinCE. + + * WebCoreSupport/FrameLoaderClientWinCE.cpp: + (WebKit::FrameLoaderClientWinCE::canShowMIMETypeAsHTML): Add missing method. + * WebCoreSupport/FrameLoaderClientWinCE.h: + +2010-09-21 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Adam Roben. + + Add "WinCE" to classname for all WebCoreSupport classes to match filename. + https://bugs.webkit.org/show_bug.cgi?id=46175 + + * WebCoreSupport/ContextMenuClientWinCE.cpp: Rename ContextMenuClient to ContextMenuClientWinCE. + * WebCoreSupport/ContextMenuClientWinCE.h: Ditto. + * WebCoreSupport/DragClientWinCE.cpp: Rename DragClient to DragClientWinCE. + * WebCoreSupport/DragClientWinCE.h: Ditto. + * WebCoreSupport/EditorClientWinCE.cpp: Rename EditorClient to EditorClientWinCE. + * WebCoreSupport/EditorClientWinCE.h: Ditto. + * WebCoreSupport/InspectorClientWinCE.cpp: Rename InspectorClient to InspectorClientWinCE. + * WebCoreSupport/InspectorClientWinCE.h: Ditto. + 2010-09-20 Patrick Gansterer <paroga@paroga.com> Reviewed by Adam Roben. diff --git a/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp b/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp new file mode 100644 index 0000000..468d86c --- /dev/null +++ b/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp @@ -0,0 +1,393 @@ +/* + * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.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. + * + * 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. + */ + +#include "config.h" +#include "ChromeClientWinCE.h" + +#include "FileChooser.h" +#include "Icon.h" +#include "NotImplemented.h" +#include "PopupMenuWin.h" +#include "SearchPopupMenuWin.h" +#include "WebView.h" +#include <wtf/text/CString.h> + +using namespace WebCore; + +namespace WebKit { + +ChromeClientWinCE::ChromeClientWinCE(WebView* webView) + : m_webView(webView) +{ + ASSERT(m_webView); +} + +void ChromeClientWinCE::chromeDestroyed() +{ + delete this; +} + +FloatRect ChromeClientWinCE::windowRect() +{ + if (!m_webView) + return FloatRect(); + + RECT rect; + m_webView->frameRect(&rect); + return rect; +} + +void ChromeClientWinCE::setWindowRect(const FloatRect&) +{ + notImplemented(); +} + +FloatRect ChromeClientWinCE::pageRect() +{ + return windowRect(); +} + +float ChromeClientWinCE::scaleFactor() +{ + return 1.0; +} + +void ChromeClientWinCE::focus() +{ + notImplemented(); +} + +void ChromeClientWinCE::unfocus() +{ + notImplemented(); +} + +Page* ChromeClientWinCE::createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&) +{ + notImplemented(); + return 0; +} + +void ChromeClientWinCE::show() +{ + notImplemented(); +} + +bool ChromeClientWinCE::canRunModal() +{ + notImplemented(); + return false; +} + +void ChromeClientWinCE::runModal() +{ + notImplemented(); +} + +void ChromeClientWinCE::setToolbarsVisible(bool) +{ + notImplemented(); +} + +bool ChromeClientWinCE::toolbarsVisible() +{ + return false; +} + +void ChromeClientWinCE::setStatusbarVisible(bool) +{ + notImplemented(); +} + +bool ChromeClientWinCE::statusbarVisible() +{ + notImplemented(); + return false; +} + +void ChromeClientWinCE::setScrollbarsVisible(bool) +{ + notImplemented(); +} + +bool ChromeClientWinCE::scrollbarsVisible() +{ + notImplemented(); + return false; +} + +void ChromeClientWinCE::setMenubarVisible(bool) +{ + notImplemented(); +} + +bool ChromeClientWinCE::menubarVisible() +{ + notImplemented(); + return false; +} + +void ChromeClientWinCE::setResizable(bool) +{ + notImplemented(); +} + +void ChromeClientWinCE::closeWindowSoon() +{ + PostMessageW(m_webView->windowHandle(), WM_CLOSE, 0, 0); +} + +bool ChromeClientWinCE::canTakeFocus(FocusDirection) +{ + return true; +} + +void ChromeClientWinCE::takeFocus(FocusDirection) +{ + unfocus(); +} + +void ChromeClientWinCE::focusedNodeChanged(Node*) +{ + notImplemented(); +} + +bool ChromeClientWinCE::canRunBeforeUnloadConfirmPanel() +{ + return true; +} + +bool ChromeClientWinCE::runBeforeUnloadConfirmPanel(const String& message, Frame* frame) +{ + return runJavaScriptConfirm(frame, message); +} + +void ChromeClientWinCE::addMessageToConsole(MessageSource, MessageType, MessageLevel, const String&, unsigned int, const String&) +{ + notImplemented(); +} + +void ChromeClientWinCE::runJavaScriptAlert(Frame*, const String& message) +{ + m_webView->runJavaScriptAlert(message); +} + +bool ChromeClientWinCE::runJavaScriptConfirm(Frame*, const String& message) +{ + return m_webView->runJavaScriptConfirm(message); +} + +bool ChromeClientWinCE::runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result) +{ + return m_webView->runJavaScriptPrompt(message, defaultValue, result); +} + +void ChromeClientWinCE::setStatusbarText(const String&) +{ + notImplemented(); +} + +bool ChromeClientWinCE::shouldInterruptJavaScript() +{ + notImplemented(); + return false; +} + +bool ChromeClientWinCE::tabsToLinks() const +{ + return true; +} + +IntRect ChromeClientWinCE::windowResizerRect() const +{ + notImplemented(); + return IntRect(); +} + +void ChromeClientWinCE::invalidateWindow(const IntRect&, bool) +{ + notImplemented(); +} + +void ChromeClientWinCE::invalidateContentsAndWindow(const IntRect& updateRect, bool immediate) +{ + RECT rect = updateRect; + InvalidateRect(m_webView->windowHandle(), &rect, FALSE); + + if (immediate) + UpdateWindow(m_webView->windowHandle()); +} + +void ChromeClientWinCE::invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate) +{ + invalidateContentsAndWindow(updateRect, immediate); +} + +void ChromeClientWinCE::scroll(const IntSize&, const IntRect& rectToScroll, const IntRect&) +{ + invalidateContentsAndWindow(rectToScroll, false); +} + +IntRect ChromeClientWinCE::windowToScreen(const IntRect& rect) const +{ + notImplemented(); + return rect; +} + +IntPoint ChromeClientWinCE::screenToWindow(const IntPoint& point) const +{ + notImplemented(); + return point; +} + +PlatformPageClient ChromeClientWinCE::platformPageClient() const +{ + notImplemented(); + return 0; +} + +void ChromeClientWinCE::contentsSizeChanged(Frame*, const IntSize&) const +{ + notImplemented(); +} + +void ChromeClientWinCE::scrollRectIntoView(const IntRect&, const ScrollView*) const +{ + notImplemented(); +} + +void ChromeClientWinCE::scrollbarsModeDidChange() const +{ + notImplemented(); +} + +void ChromeClientWinCE::mouseDidMoveOverElement(const HitTestResult&, unsigned) +{ + notImplemented(); +} + +void ChromeClientWinCE::setToolTip(const String&, TextDirection) +{ + notImplemented(); +} + +void ChromeClientWinCE::print(Frame*) +{ + notImplemented(); +} + +#if ENABLE(DATABASE) +void ChromeClientWinCE::exceededDatabaseQuota(Frame*, const String&) +{ + notImplemented() +} +#endif + +#if ENABLE(OFFLINE_WEB_APPLICATIONS) +void ChromeClientWinCE::reachedMaxAppCacheSize(int64_t) +{ + notImplemented(); +} +#endif + +#if ENABLE(TOUCH_EVENTS) +void ChromeClientWinCE::needTouchEvents(bool) +{ + notImplemented(); +} +#endif + +#if USE(ACCELERATED_COMPOSITING) +void ChromeClientWinCE::attachRootGraphicsLayer(Frame*, GraphicsLayer*) +{ + notImplemented(); +} + +void ChromeClientWinCE::setNeedsOneShotDrawingSynchronization() +{ + notImplemented(); +} + +void ChromeClientWinCE::scheduleCompositingLayerSync() +{ + notImplemented(); +} +#endif + +void ChromeClientWinCE::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChooser) +{ + notImplemented(); +} + +void ChromeClientWinCE::chooseIconForFiles(const Vector<String>& filenames, FileChooser* chooser) +{ + chooser->iconLoaded(Icon::createIconForFiles(filenames)); +} + +void ChromeClientWinCE::setCursor(const Cursor&) +{ + notImplemented(); +} + +void ChromeClientWinCE::setLastSetCursorToCurrentCursor() +{ + notImplemented(); +} + +void ChromeClientWinCE::formStateDidChange(const Node*) +{ + notImplemented(); +} + +PassOwnPtr<HTMLParserQuirks> ChromeClientWinCE::createHTMLParserQuirks() +{ + return 0; +} + +void ChromeClientWinCE::requestGeolocationPermissionForFrame(Frame*, Geolocation*) +{ + notImplemented(); +} + +void ChromeClientWinCE::cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) +{ + notImplemented(); +} + +bool ChromeClientWinCE::selectItemWritingDirectionIsNatural() +{ + return false; +} + +PassRefPtr<PopupMenu> ChromeClientWinCE::createPopupMenu(PopupMenuClient* client) const +{ + return adoptRef(new PopupMenuWin(client)); +} + +PassRefPtr<SearchPopupMenu> ChromeClientWinCE::createSearchPopupMenu(PopupMenuClient* client) const +{ + return adoptRef(new SearchPopupMenuWin(client)); +} + +} // namespace WebKit diff --git a/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h b/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h new file mode 100644 index 0000000..be9f643 --- /dev/null +++ b/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h @@ -0,0 +1,174 @@ +/* + * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.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. + * + * 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. + */ + +#ifndef ChromeClientWinCE_h +#define ChromeClientWinCE_h + +#include "ChromeClient.h" + +class WebView; + +namespace WebKit { + +class ChromeClientWinCE : public WebCore::ChromeClient { +public: + ChromeClientWinCE(WebView* webView); + + virtual void chromeDestroyed(); + + virtual void setWindowRect(const WebCore::FloatRect&); + virtual WebCore::FloatRect windowRect(); + + virtual WebCore::FloatRect pageRect(); + + virtual float scaleFactor(); + + virtual void focus(); + virtual void unfocus(); + + virtual bool canTakeFocus(WebCore::FocusDirection); + virtual void takeFocus(WebCore::FocusDirection); + + virtual void focusedNodeChanged(WebCore::Node*); + + // The Frame pointer provides the ChromeClient with context about which + // Frame wants to create the new Page. Also, the newly created window + // should not be shown to the user until the ChromeClient of the newly + // created Page has its show method called. + virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&); + virtual void show(); + + virtual bool canRunModal(); + virtual void runModal(); + + virtual void setToolbarsVisible(bool); + virtual bool toolbarsVisible(); + + virtual void setStatusbarVisible(bool); + virtual bool statusbarVisible(); + + virtual void setScrollbarsVisible(bool); + virtual bool scrollbarsVisible(); + + virtual void setMenubarVisible(bool); + virtual bool menubarVisible(); + + virtual void setResizable(bool); + + virtual void addMessageToConsole(WebCore::MessageSource, WebCore::MessageType, WebCore::MessageLevel, const WTF::String& message, unsigned int lineNumber, const WTF::String& sourceID); + + virtual bool canRunBeforeUnloadConfirmPanel(); + virtual bool runBeforeUnloadConfirmPanel(const WTF::String& message, WebCore::Frame* frame); + + virtual void closeWindowSoon(); + + virtual void runJavaScriptAlert(WebCore::Frame*, const WTF::String&); + virtual bool runJavaScriptConfirm(WebCore::Frame*, const WTF::String&); + virtual bool runJavaScriptPrompt(WebCore::Frame*, const WTF::String& message, const WTF::String& defaultValue, WTF::String& result); + virtual void setStatusbarText(const WTF::String&); + virtual bool shouldInterruptJavaScript(); + virtual bool tabsToLinks() const; + + virtual WebCore::IntRect windowResizerRect() const; + + // Methods used by HostWindow. + virtual void invalidateWindow(const WebCore::IntRect&, bool); + virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool); + virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool); + virtual void scroll(const WebCore::IntSize&, const WebCore::IntRect&, const WebCore::IntRect&); + virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) const; + virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) const; + virtual PlatformPageClient platformPageClient() const; + virtual void contentsSizeChanged(WebCore::Frame*, const WebCore::IntSize&) const; + virtual void scrollRectIntoView(const WebCore::IntRect&, const WebCore::ScrollView*) const; // Currently only Mac has a non empty implementation. + virtual void scrollbarsModeDidChange() const; + virtual void setCursor(const WebCore::Cursor&); + // End methods used by HostWindow. + + virtual void mouseDidMoveOverElement(const WebCore::HitTestResult&, unsigned modifierFlags); + + virtual void setToolTip(const WTF::String&, WebCore::TextDirection); + + virtual void print(WebCore::Frame*); + +#if ENABLE(DATABASE) + virtual void exceededDatabaseQuota(WebCore::Frame*, const WTF::String& databaseName) = 0; +#endif + +#if ENABLE(OFFLINE_WEB_APPLICATIONS) + // Callback invoked when the application cache fails to save a cache object + // because storing it would grow the database file past its defined maximum + // size or past the amount of free space on the device. + // The chrome client would need to take some action such as evicting some + // old caches. + virtual void reachedMaxAppCacheSize(int64_t spaceNeeded) = 0; +#endif + +#if ENABLE(NOTIFICATIONS) + virtual WebCore::NotificationPresenter* notificationPresenter() const = 0; +#endif + + // This can be either a synchronous or asynchronous call. The ChromeClient can display UI asking the user for permission + // to use Geolocation. + virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*); + virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*); + + virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>); + // Asynchronous request to load an icon for specified filenames. + virtual void chooseIconForFiles(const Vector<WTF::String>&, WebCore::FileChooser*); + + // Notification that the given form element has changed. This function + // will be called frequently, so handling should be very fast. + virtual void formStateDidChange(const WebCore::Node*); + + virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks(); + +#if USE(ACCELERATED_COMPOSITING) + // Pass 0 as the GraphicsLayer to detatch the root layer. + virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*); + // Sets a flag to specify that the next time content is drawn to the window, + // the changes appear on the screen in synchrony with updates to GraphicsLayers. + virtual void setNeedsOneShotDrawingSynchronization(); + // Sets a flag to specify that the view needs to be updated, so we need + // to do an eager layout before the drawing. + virtual void scheduleCompositingLayerSync(); +#endif + + virtual void setLastSetCursorToCurrentCursor(); + +#if ENABLE(TOUCH_EVENTS) + virtual void needTouchEvents(bool); +#endif + + virtual bool selectItemWritingDirectionIsNatural(); + virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const; + virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const; + +private: + WebView* m_webView; +}; + +} // namespace WebKit + +#endif // ChromeClientWinCE_h diff --git a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp index 011c2ea..7358f2a 100644 --- a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp +++ b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp @@ -32,57 +32,57 @@ using namespace WebCore; namespace WebKit { -ContextMenuClient::ContextMenuClient(WebView *webView) +ContextMenuClientWinCE::ContextMenuClientWinCE(WebView *webView) : m_webView(webView) { } -void ContextMenuClient::contextMenuDestroyed() +void ContextMenuClientWinCE::contextMenuDestroyed() { delete this; } -PlatformMenuDescription ContextMenuClient::getCustomMenuFromDefaultItems(ContextMenu* menu) +PlatformMenuDescription ContextMenuClientWinCE::getCustomMenuFromDefaultItems(ContextMenu* menu) { return menu->releasePlatformDescription(); } -void ContextMenuClient::contextMenuItemSelected(ContextMenuItem*, const ContextMenu*) +void ContextMenuClientWinCE::contextMenuItemSelected(ContextMenuItem*, const ContextMenu*) { notImplemented(); } -void ContextMenuClient::downloadURL(const KURL& url) +void ContextMenuClientWinCE::downloadURL(const KURL& url) { notImplemented(); } -void ContextMenuClient::copyImageToClipboard(const HitTestResult&) +void ContextMenuClientWinCE::copyImageToClipboard(const HitTestResult&) { notImplemented(); } -void ContextMenuClient::searchWithGoogle(const Frame*) +void ContextMenuClientWinCE::searchWithGoogle(const Frame*) { notImplemented(); } -void ContextMenuClient::lookUpInDictionary(Frame*) +void ContextMenuClientWinCE::lookUpInDictionary(Frame*) { notImplemented(); } -void ContextMenuClient::speak(const String&) +void ContextMenuClientWinCE::speak(const String&) { notImplemented(); } -void ContextMenuClient::stopSpeaking() +void ContextMenuClientWinCE::stopSpeaking() { notImplemented(); } -bool ContextMenuClient::isSpeaking() +bool ContextMenuClientWinCE::isSpeaking() { notImplemented(); return false; diff --git a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h index 3d51f3c..13d91d1 100644 --- a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h +++ b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h @@ -31,9 +31,9 @@ class WebView; namespace WebKit { -class ContextMenuClient : public WebCore::ContextMenuClient { +class ContextMenuClientWinCE : public WebCore::ContextMenuClient { public: - ContextMenuClient(WebView*); + ContextMenuClientWinCE(WebView*); virtual void contextMenuDestroyed(); diff --git a/WebKit/wince/WebCoreSupport/DragClientWinCE.cpp b/WebKit/wince/WebCoreSupport/DragClientWinCE.cpp index cd94547..1fc4379 100644 --- a/WebKit/wince/WebCoreSupport/DragClientWinCE.cpp +++ b/WebKit/wince/WebCoreSupport/DragClientWinCE.cpp @@ -31,40 +31,40 @@ using namespace WebCore; namespace WebKit { -void DragClient::willPerformDragDestinationAction(DragDestinationAction, DragData*) +void DragClientWinCE::willPerformDragDestinationAction(DragDestinationAction, DragData*) { notImplemented(); } -void DragClient::willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*) +void DragClientWinCE::willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*) { notImplemented(); } -DragDestinationAction DragClient::actionMaskForDrag(DragData*) +DragDestinationAction DragClientWinCE::actionMaskForDrag(DragData*) { notImplemented(); return DragDestinationActionAny; } -DragSourceAction DragClient::dragSourceActionMaskForPoint(const IntPoint&) +DragSourceAction DragClientWinCE::dragSourceActionMaskForPoint(const IntPoint&) { notImplemented(); return DragSourceActionAny; } -void DragClient::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard*, Frame*, bool) +void DragClientWinCE::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard*, Frame*, bool) { notImplemented(); } -DragImageRef DragClient::createDragImageForLink(KURL&, const String& label, Frame*) +DragImageRef DragClientWinCE::createDragImageForLink(KURL&, const String& label, Frame*) { notImplemented(); return 0; } -void DragClient::dragControllerDestroyed() +void DragClientWinCE::dragControllerDestroyed() { delete this; } diff --git a/WebKit/wince/WebCoreSupport/DragClientWinCE.h b/WebKit/wince/WebCoreSupport/DragClientWinCE.h index 01dba3c..dc5168c 100644 --- a/WebKit/wince/WebCoreSupport/DragClientWinCE.h +++ b/WebKit/wince/WebCoreSupport/DragClientWinCE.h @@ -29,7 +29,7 @@ namespace WebKit { -class DragClient : public WebCore::DragClient { +class DragClientWinCE : public WebCore::DragClient { public: virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction, WebCore::DragData*); virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::Clipboard*); diff --git a/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp b/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp index d81fc02..a806cf9 100644 --- a/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp +++ b/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp @@ -32,282 +32,282 @@ using namespace WebCore; namespace WebKit { -EditorClient::EditorClient(WebView* webView) +EditorClientWinCE::EditorClientWinCE(WebView* webView) : m_webView(webView) { } -EditorClient::~EditorClient() +EditorClientWinCE::~EditorClientWinCE() { } -void EditorClient::setInputMethodState(bool active) +void EditorClientWinCE::setInputMethodState(bool active) { notImplemented(); } -bool EditorClient::shouldDeleteRange(Range*) +bool EditorClientWinCE::shouldDeleteRange(Range*) { notImplemented(); return true; } -bool EditorClient::shouldShowDeleteInterface(HTMLElement*) +bool EditorClientWinCE::shouldShowDeleteInterface(HTMLElement*) { return false; } -bool EditorClient::isContinuousSpellCheckingEnabled() +bool EditorClientWinCE::isContinuousSpellCheckingEnabled() { notImplemented(); return false; } -bool EditorClient::isGrammarCheckingEnabled() +bool EditorClientWinCE::isGrammarCheckingEnabled() { notImplemented(); return false; } -int EditorClient::spellCheckerDocumentTag() +int EditorClientWinCE::spellCheckerDocumentTag() { notImplemented(); return 0; } -bool EditorClient::shouldBeginEditing(WebCore::Range*) +bool EditorClientWinCE::shouldBeginEditing(WebCore::Range*) { notImplemented(); return true; } -bool EditorClient::shouldEndEditing(WebCore::Range*) +bool EditorClientWinCE::shouldEndEditing(WebCore::Range*) { notImplemented(); return true; } -bool EditorClient::shouldInsertText(const String&, Range*, EditorInsertAction) +bool EditorClientWinCE::shouldInsertText(const String&, Range*, EditorInsertAction) { notImplemented(); return true; } -bool EditorClient::shouldChangeSelectedRange(Range*, Range*, EAffinity, bool) +bool EditorClientWinCE::shouldChangeSelectedRange(Range*, Range*, EAffinity, bool) { notImplemented(); return true; } -bool EditorClient::shouldApplyStyle(WebCore::CSSStyleDeclaration*, WebCore::Range*) +bool EditorClientWinCE::shouldApplyStyle(WebCore::CSSStyleDeclaration*, WebCore::Range*) { notImplemented(); return true; } -bool EditorClient::shouldMoveRangeAfterDelete(WebCore::Range*, WebCore::Range*) +bool EditorClientWinCE::shouldMoveRangeAfterDelete(WebCore::Range*, WebCore::Range*) { notImplemented(); return true; } -void EditorClient::didBeginEditing() +void EditorClientWinCE::didBeginEditing() { notImplemented(); } -void EditorClient::respondToChangedContents() +void EditorClientWinCE::respondToChangedContents() { notImplemented(); } -void EditorClient::respondToChangedSelection() +void EditorClientWinCE::respondToChangedSelection() { notImplemented(); } -void EditorClient::didEndEditing() +void EditorClientWinCE::didEndEditing() { notImplemented(); } -void EditorClient::didWriteSelectionToPasteboard() +void EditorClientWinCE::didWriteSelectionToPasteboard() { notImplemented(); } -void EditorClient::didSetSelectionTypesForPasteboard() +void EditorClientWinCE::didSetSelectionTypesForPasteboard() { notImplemented(); } -bool EditorClient::isEditable() +bool EditorClientWinCE::isEditable() { notImplemented(); return false; } -void EditorClient::registerCommandForUndo(WTF::PassRefPtr<WebCore::EditCommand> command) +void EditorClientWinCE::registerCommandForUndo(WTF::PassRefPtr<WebCore::EditCommand> command) { notImplemented(); } -void EditorClient::registerCommandForRedo(WTF::PassRefPtr<WebCore::EditCommand> command) +void EditorClientWinCE::registerCommandForRedo(WTF::PassRefPtr<WebCore::EditCommand> command) { notImplemented(); } -void EditorClient::clearUndoRedoOperations() +void EditorClientWinCE::clearUndoRedoOperations() { notImplemented(); } -bool EditorClient::canUndo() const +bool EditorClientWinCE::canUndo() const { notImplemented(); return false; } -bool EditorClient::canRedo() const +bool EditorClientWinCE::canRedo() const { notImplemented(); return false; } -void EditorClient::undo() +void EditorClientWinCE::undo() { notImplemented(); } -void EditorClient::redo() +void EditorClientWinCE::redo() { notImplemented(); } -bool EditorClient::shouldInsertNode(Node*, Range*, EditorInsertAction) +bool EditorClientWinCE::shouldInsertNode(Node*, Range*, EditorInsertAction) { notImplemented(); return true; } -void EditorClient::pageDestroyed() +void EditorClientWinCE::pageDestroyed() { delete this; } -bool EditorClient::smartInsertDeleteEnabled() +bool EditorClientWinCE::smartInsertDeleteEnabled() { notImplemented(); return false; } -bool EditorClient::isSelectTrailingWhitespaceEnabled() +bool EditorClientWinCE::isSelectTrailingWhitespaceEnabled() { notImplemented(); return false; } -void EditorClient::toggleContinuousSpellChecking() +void EditorClientWinCE::toggleContinuousSpellChecking() { notImplemented(); } -void EditorClient::toggleGrammarChecking() +void EditorClientWinCE::toggleGrammarChecking() { notImplemented(); } -void EditorClient::handleKeyboardEvent(KeyboardEvent* event) +void EditorClientWinCE::handleKeyboardEvent(KeyboardEvent* event) { notImplemented(); } -void EditorClient::handleInputMethodKeydown(KeyboardEvent* event) +void EditorClientWinCE::handleInputMethodKeydown(KeyboardEvent* event) { notImplemented(); } -void EditorClient::textFieldDidBeginEditing(Element*) +void EditorClientWinCE::textFieldDidBeginEditing(Element*) { } -void EditorClient::textFieldDidEndEditing(Element*) +void EditorClientWinCE::textFieldDidEndEditing(Element*) { } -void EditorClient::textDidChangeInTextField(Element*) +void EditorClientWinCE::textDidChangeInTextField(Element*) { } -bool EditorClient::doTextFieldCommandFromEvent(Element*, KeyboardEvent*) +bool EditorClientWinCE::doTextFieldCommandFromEvent(Element*, KeyboardEvent*) { return false; } -void EditorClient::textWillBeDeletedInTextField(Element*) +void EditorClientWinCE::textWillBeDeletedInTextField(Element*) { notImplemented(); } -void EditorClient::textDidChangeInTextArea(Element*) +void EditorClientWinCE::textDidChangeInTextArea(Element*) { notImplemented(); } -void EditorClient::ignoreWordInSpellDocument(const String& text) +void EditorClientWinCE::ignoreWordInSpellDocument(const String& text) { notImplemented(); } -void EditorClient::learnWord(const String& text) +void EditorClientWinCE::learnWord(const String& text) { notImplemented(); } -void EditorClient::checkSpellingOfString(const UChar* text, int length, int* misspellingLocation, int* misspellingLength) +void EditorClientWinCE::checkSpellingOfString(const UChar* text, int length, int* misspellingLocation, int* misspellingLength) { notImplemented(); } -String EditorClient::getAutoCorrectSuggestionForMisspelledWord(const String& inputWord) +String EditorClientWinCE::getAutoCorrectSuggestionForMisspelledWord(const String& inputWord) { // This method can be implemented using customized algorithms for the particular browser. // Currently, it computes an empty string. return String(); } -void EditorClient::checkGrammarOfString(const UChar*, int, Vector<GrammarDetail>&, int*, int*) +void EditorClientWinCE::checkGrammarOfString(const UChar*, int, Vector<GrammarDetail>&, int*, int*) { notImplemented(); } -void EditorClient::updateSpellingUIWithGrammarString(const String&, const GrammarDetail&) +void EditorClientWinCE::updateSpellingUIWithGrammarString(const String&, const GrammarDetail&) { notImplemented(); } -void EditorClient::updateSpellingUIWithMisspelledWord(const String&) +void EditorClientWinCE::updateSpellingUIWithMisspelledWord(const String&) { notImplemented(); } -void EditorClient::showSpellingUI(bool) +void EditorClientWinCE::showSpellingUI(bool) { notImplemented(); } -bool EditorClient::spellingUIIsShowing() +bool EditorClientWinCE::spellingUIIsShowing() { notImplemented(); return false; } -void EditorClient::getGuessesForWord(const String& word, WTF::Vector<String>& guesses) +void EditorClientWinCE::getGuessesForWord(const String& word, WTF::Vector<String>& guesses) { notImplemented(); } -void EditorClient::willSetInputMethodState() +void EditorClientWinCE::willSetInputMethodState() { notImplemented(); } diff --git a/WebKit/wince/WebCoreSupport/EditorClientWinCE.h b/WebKit/wince/WebCoreSupport/EditorClientWinCE.h index 943f591..0ad0a19 100644 --- a/WebKit/wince/WebCoreSupport/EditorClientWinCE.h +++ b/WebKit/wince/WebCoreSupport/EditorClientWinCE.h @@ -31,10 +31,10 @@ class WebView; namespace WebKit { -class EditorClient : public WebCore::EditorClient { +class EditorClientWinCE : public WebCore::EditorClient { public: - EditorClient(WebView*); - ~EditorClient(); + EditorClientWinCE(WebView*); + ~EditorClientWinCE(); virtual void pageDestroyed(); diff --git a/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp b/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp index b11df84..e841ab9 100644 --- a/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp +++ b/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp @@ -32,6 +32,7 @@ #include "HTMLFormElement.h" #include "MIMETypeRegistry.h" #include "NotImplemented.h" +#include "Page.h" #include "PluginDatabase.h" #include "RenderPart.h" #include "WebView.h" @@ -160,7 +161,7 @@ PassRefPtr<Frame> FrameLoaderClientWinCE::createFrame(const KURL& url, const Str return m_webView->createFrame(url, name, ownerElement, referrer, allowsScrolling, marginWidth, marginHeight); } -void FrameLoaderClientWinCE::didTransferChildFrameToNewDocument() +void FrameLoaderClientWinCE::didTransferChildFrameToNewDocument(Page*) { } @@ -424,6 +425,12 @@ bool FrameLoaderClientWinCE::canShowMIMEType(const String& type) const || PluginDatabase::installedPlugins()->isMIMETypeRegistered(type)); } +bool FrameLoaderClientWinCE::canShowMIMETypeAsHTML(const String&) const +{ + notImplemented(); + return false; +} + bool FrameLoaderClientWinCE::representationExistsForURLScheme(const String&) const { notImplemented(); diff --git a/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h b/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h index 94810bc..b64efed 100644 --- a/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h +++ b/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h @@ -108,7 +108,7 @@ public: virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); - virtual void didTransferChildFrameToNewDocument(); + virtual void didTransferChildFrameToNewDocument(WebCore::Page*); virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const WTF::Vector<WTF::String>&, const WTF::Vector<WTF::String>&, const WTF::String&, bool); virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues); @@ -154,6 +154,7 @@ public: virtual bool canHandleRequest(const WebCore::ResourceRequest&) const; virtual bool canShowMIMEType(const WTF::String&) const; + virtual bool canShowMIMETypeAsHTML(const WTF::String&) const; virtual bool representationExistsForURLScheme(const WTF::String&) const; virtual WTF::String generatedMIMETypeForURLScheme(const WTF::String&) const; diff --git a/WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp b/WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp index debc611..5168885 100644 --- a/WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp +++ b/WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp @@ -31,51 +31,51 @@ using namespace WebCore; namespace WebKit { -InspectorClient::InspectorClient(WebView* webView) +InspectorClientWinCE::InspectorClientWinCE(WebView* webView) : m_inspectedWebView(webView) { } -InspectorClient::~InspectorClient() +InspectorClientWinCE::~InspectorClientWinCE() { } -void InspectorClient::inspectorDestroyed() +void InspectorClientWinCE::inspectorDestroyed() { delete this; } -void InspectorClient::openInspectorFrontend(InspectorController* controller) +void InspectorClientWinCE::openInspectorFrontend(InspectorController* controller) { notImplemented(); } -void InspectorClient::releaseFrontendPage() +void InspectorClientWinCE::releaseFrontendPage() { notImplemented(); } -void InspectorClient::highlight(Node* node) +void InspectorClientWinCE::highlight(Node* node) { notImplemented(); } -void InspectorClient::hideHighlight() +void InspectorClientWinCE::hideHighlight() { notImplemented(); } -void InspectorClient::populateSetting(const String& key, String* value) +void InspectorClientWinCE::populateSetting(const String& key, String* value) { notImplemented(); } -void InspectorClient::storeSetting(const String& key, const String& value) +void InspectorClientWinCE::storeSetting(const String& key, const String& value) { notImplemented(); } -bool InspectorClient::sendMessageToFrontend(const String& message) +bool InspectorClientWinCE::sendMessageToFrontend(const String& message) { notImplemented(); return false; diff --git a/WebKit/wince/WebCoreSupport/InspectorClientWinCE.h b/WebKit/wince/WebCoreSupport/InspectorClientWinCE.h index 45fcc5b..37d7577 100644 --- a/WebKit/wince/WebCoreSupport/InspectorClientWinCE.h +++ b/WebKit/wince/WebCoreSupport/InspectorClientWinCE.h @@ -31,10 +31,10 @@ class WebView; namespace WebKit { -class InspectorClient : public WebCore::InspectorClient { +class InspectorClientWinCE : public WebCore::InspectorClient { public: - InspectorClient(WebView* webView); - ~InspectorClient(); + InspectorClientWinCE(WebView* webView); + ~InspectorClientWinCE(); virtual void inspectorDestroyed(); diff --git a/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp b/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp new file mode 100644 index 0000000..514fdf4 --- /dev/null +++ b/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp @@ -0,0 +1,663 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.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. + * + * 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. + */ + +#include "config.h" +#include "PlatformStrategiesWinCE.h" + +#include "IntSize.h" +#include "MathExtras.h" +#include "Page.h" +#include "PageGroup.h" +#include "PluginDatabase.h" +#include <wtf/text/CString.h> + +#define UI_STRING(text, desciprion) text +#define UI_STRING_KEY(text, key, desciprion) text + +using namespace WebCore; + +void PlatformStrategiesWinCE::initialize() +{ + DEFINE_STATIC_LOCAL(PlatformStrategiesWinCE, platformStrategies, ()); +} + +PlatformStrategiesWinCE::PlatformStrategiesWinCE() +{ + setPlatformStrategies(this); +} + +// PluginStrategy + +PluginStrategy* PlatformStrategiesWinCE::createPluginStrategy() +{ + return this; +} + +LocalizationStrategy* PlatformStrategiesWinCE::createLocalizationStrategy() +{ + return this; +} + +VisitedLinkStrategy* PlatformStrategiesWinCE::createVisitedLinkStrategy() +{ + return this; +} + +void PlatformStrategiesWinCE::refreshPlugins() +{ + PluginDatabase::installedPlugins()->refresh(); +} + +void PlatformStrategiesWinCE::getPluginInfo(const Page*, Vector<PluginInfo>& outPlugins) +{ + const Vector<PluginPackage*>& plugins = PluginDatabase::installedPlugins()->plugins(); + + outPlugins.resize(plugins.size()); + + for (size_t i = 0; i < plugins.size(); ++i) { + PluginPackage* package = plugins[i]; + + PluginInfo info; + info.name = package->name(); + info.file = package->fileName(); + info.desc = package->description(); + + const MIMEToDescriptionsMap& mimeToDescriptions = package->mimeToDescriptions(); + + info.mimes.reserveCapacity(mimeToDescriptions.size()); + + MIMEToDescriptionsMap::const_iterator end = mimeToDescriptions.end(); + for (MIMEToDescriptionsMap::const_iterator it = mimeToDescriptions.begin(); it != end; ++it) { + MimeClassInfo mime; + + mime.type = it->first; + mime.desc = it->second; + mime.extensions = package->mimeToExtensions().get(mime.type); + + info.mimes.append(mime); + } + + outPlugins[i] = info; + } +} + +// LocalizationStrategy + +String PlatformStrategiesWinCE::searchableIndexIntroduction() +{ + return UI_STRING("This is a searchable index. Enter search keywords: ", "text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'"); +} + +String PlatformStrategiesWinCE::submitButtonDefaultLabel() +{ + return UI_STRING("Submit", "default label for Submit buttons in forms on web pages"); +} + +String PlatformStrategiesWinCE::inputElementAltText() +{ + return UI_STRING_KEY("Submit", "Submit (input element)", "alt text for <input> elements with no alt, title, or value"); +} + +String PlatformStrategiesWinCE::resetButtonDefaultLabel() +{ + return UI_STRING("Reset", "default label for Reset buttons in forms on web pages"); +} + +String PlatformStrategiesWinCE::fileButtonChooseFileLabel() +{ + return UI_STRING("Choose File", "title for file button used in HTML forms"); +} + +String PlatformStrategiesWinCE::fileButtonNoFileSelectedLabel() +{ + return UI_STRING("no file selected", "text to display in file button used in HTML forms when no file is selected"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagOpenLinkInNewWindow() +{ + return UI_STRING("Open Link in New Window", "Open in New Window context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagDownloadLinkToDisk() +{ + return UI_STRING("Download Linked File", "Download Linked File context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagCopyLinkToClipboard() +{ + return UI_STRING("Copy Link", "Copy Link context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagOpenImageInNewWindow() +{ + return UI_STRING("Open Image in New Window", "Open Image in New Window context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagDownloadImageToDisk() +{ + return UI_STRING("Download Image", "Download Image context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagCopyImageToClipboard() +{ + return UI_STRING("Copy Image", "Copy Image context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagOpenVideoInNewWindow() +{ + return UI_STRING("Open Video in New Window", "Open Video in New Window context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagOpenAudioInNewWindow() +{ + return UI_STRING("Open Audio in New Window", "Open Audio in New Window context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagCopyVideoLinkToClipboard() +{ + return UI_STRING("Copy Video Address", "Copy Video Address Location context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagCopyAudioLinkToClipboard() +{ + return UI_STRING("Copy Audio Address", "Copy Audio Address Location context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagToggleMediaControls() +{ + return UI_STRING("Controls", "Media Controls context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagToggleMediaLoop() +{ + return UI_STRING("Loop", "Media Loop context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagEnterVideoFullscreen() +{ + return UI_STRING("Enter Fullscreen", "Video Enter Fullscreen context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagMediaPlay() +{ + return UI_STRING("Play", "Media Play context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagMediaPause() +{ + return UI_STRING("Pause", "Media Pause context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagMediaMute() +{ + return UI_STRING("Mute", "Media Mute context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagOpenFrameInNewWindow() +{ + return UI_STRING("Open Frame in New Window", "Open Frame in New Window context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagCopy() +{ + return UI_STRING("Copy", "Copy context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagGoBack() +{ + return UI_STRING("Back", "Back context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagGoForward() +{ + return UI_STRING("Forward", "Forward context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagStop() +{ + return UI_STRING("Stop", "Stop context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagReload() +{ + return UI_STRING("Reload", "Reload context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagCut() +{ + return UI_STRING("Cut", "Cut context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagPaste() +{ + return UI_STRING("Paste", "Paste context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagNoGuessesFound() +{ + return UI_STRING("No Guesses Found", "No Guesses Found context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagIgnoreSpelling() +{ + return UI_STRING("Ignore Spelling", "Ignore Spelling context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagLearnSpelling() +{ + return UI_STRING("Learn Spelling", "Learn Spelling context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagSearchWeb() +{ + return UI_STRING("Search with Google", "Search in Google context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagLookUpInDictionary() +{ + return UI_STRING("Look Up in Dictionary", "Look Up in Dictionary context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagOpenLink() +{ + return UI_STRING("Open Link", "Open Link context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagIgnoreGrammar() +{ + return UI_STRING("Ignore Grammar", "Ignore Grammar context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagSpellingMenu() +{ + return UI_STRING("Spelling and Grammar", "Spelling and Grammar context sub-menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagCheckSpelling() +{ + return UI_STRING("Check Document Now", "Check spelling context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagCheckSpellingWhileTyping() +{ + return UI_STRING("Check Spelling While Typing", "Check spelling while typing context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagCheckGrammarWithSpelling() +{ + return UI_STRING("Check Grammar With Spelling", "Check grammar with spelling context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagFontMenu() +{ + return UI_STRING("Font", "Font context sub-menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagBold() +{ + return UI_STRING("Bold", "Bold context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagItalic() +{ + return UI_STRING("Italic", "Italic context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagUnderline() +{ + return UI_STRING("Underline", "Underline context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagOutline() +{ + return UI_STRING("Outline", "Outline context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagWritingDirectionMenu() +{ + return UI_STRING("Paragraph Direction", "Paragraph direction context sub-menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagTextDirectionMenu() +{ + return UI_STRING("Selection Direction", "Selection direction context sub-menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagDefaultDirection() +{ + return UI_STRING("Default", "Default writing direction context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagLeftToRight() +{ + return UI_STRING("Left to Right", "Left to Right context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagRightToLeft() +{ + return UI_STRING("Right to Left", "Right to Left context menu item"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagShowSpellingPanel(bool show) +{ + if (show) + return UI_STRING("Show Spelling and Grammar", "menu item title"); + return UI_STRING("Hide Spelling and Grammar", "menu item title"); +} + +String PlatformStrategiesWinCE::contextMenuItemTagInspectElement() +{ + return UI_STRING("Inspect Element", "Inspect Element context menu item"); +} + +String PlatformStrategiesWinCE::searchMenuNoRecentSearchesText() +{ + return UI_STRING("No recent searches", "Label for only item in menu that appears when clicking on the search field image, when no searches have been performed"); +} + +String PlatformStrategiesWinCE::searchMenuRecentSearchesText() +{ + return UI_STRING("Recent Searches", "label for first item in the menu that appears when clicking on the search field image, used as embedded menu title"); +} + +String PlatformStrategiesWinCE::searchMenuClearRecentSearchesText() +{ + return UI_STRING("Clear Recent Searches", "menu item in Recent Searches menu that empties menu's contents"); +} + +String PlatformStrategiesWinCE::AXWebAreaText() +{ + return UI_STRING("web area", "accessibility role description for web area"); +} + +String PlatformStrategiesWinCE::AXLinkText() +{ + return UI_STRING("link", "accessibility role description for link"); +} + +String PlatformStrategiesWinCE::AXListMarkerText() +{ + return UI_STRING("list marker", "accessibility role description for list marker"); +} + +String PlatformStrategiesWinCE::AXImageMapText() +{ + return UI_STRING("image map", "accessibility role description for image map"); +} + +String PlatformStrategiesWinCE::AXHeadingText() +{ + return UI_STRING("heading", "accessibility role description for headings"); +} + +String PlatformStrategiesWinCE::AXDefinitionListTermText() +{ + return UI_STRING("term", "term word of a definition"); +} + +String PlatformStrategiesWinCE::AXDefinitionListDefinitionText() +{ + return UI_STRING("definition", "definition phrase"); +} + +String PlatformStrategiesWinCE::AXButtonActionVerb() +{ + return UI_STRING("press", "Verb stating the action that will occur when a button is pressed, as used by accessibility"); +} + +String PlatformStrategiesWinCE::AXRadioButtonActionVerb() +{ + return UI_STRING("select", "Verb stating the action that will occur when a radio button is clicked, as used by accessibility"); +} + +String PlatformStrategiesWinCE::AXTextFieldActionVerb() +{ + return UI_STRING("activate", "Verb stating the action that will occur when a text field is selected, as used by accessibility"); +} + +String PlatformStrategiesWinCE::AXCheckedCheckBoxActionVerb() +{ + return UI_STRING("uncheck", "Verb stating the action that will occur when a checked checkbox is clicked, as used by accessibility"); +} + +String PlatformStrategiesWinCE::AXUncheckedCheckBoxActionVerb() +{ + return UI_STRING("check", "Verb stating the action that will occur when an unchecked checkbox is clicked, as used by accessibility"); +} + +String PlatformStrategiesWinCE::AXLinkActionVerb() +{ + return UI_STRING("jump", "Verb stating the action that will occur when a link is clicked, as used by accessibility"); +} + +String PlatformStrategiesWinCE::AXMenuListActionVerb() +{ + return UI_STRING("open", "Verb stating the action that will occur when a select element is clicked, as used by accessibility"); +} + +String PlatformStrategiesWinCE::AXMenuListPopupActionVerb() +{ + return UI_STRING_KEY("press", "press (select element)", "Verb stating the action that will occur when a select element's popup list is clicked, as used by accessibility"); +} + +String PlatformStrategiesWinCE::unknownFileSizeText() +{ + return UI_STRING("Unknown", "Unknown filesize FTP directory listing item"); +} + +String PlatformStrategiesWinCE::uploadFileText() +{ + return UI_STRING("Upload file", "(Windows) Form submit file upload dialog title"); +} + +String PlatformStrategiesWinCE::allFilesText() +{ + return UI_STRING("All Files", "(Windows) Form submit file upload all files pop-up"); +} + +String PlatformStrategiesWinCE::missingPluginText() +{ + return UI_STRING("Missing Plug-in", "Label text to be used when a plugin is missing"); +} + +String PlatformStrategiesWinCE::crashedPluginText() +{ + return UI_STRING("Plug-in Failure", "Label text to be used if plugin host process has crashed"); +} + +String PlatformStrategiesWinCE::imageTitle(const String& filename, const IntSize& size) +{ + CString filenameCString = filename.utf8(); + return String::format(UI_STRING("%s %d\xC3\x97%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"), filenameCString.data(), size.width(), size.height()); +} + +String PlatformStrategiesWinCE::multipleFileUploadText(unsigned numberOfFiles) +{ + return String::format(UI_STRING("%d files", "Label to describe the number of files selected in a file upload control that allows multiple files"), numberOfFiles); +} + +String PlatformStrategiesWinCE::mediaElementLoadingStateText() +{ + return UI_STRING("Loading...", "Media controller status message when the media is loading"); +} + +String PlatformStrategiesWinCE::mediaElementLiveBroadcastStateText() +{ + return UI_STRING("Live Broadcast", "Media controller status message when watching a live broadcast"); +} + +String PlatformStrategiesWinCE::localizedMediaControlElementString(const String& name) +{ + if (name == "AudioElement") + return UI_STRING("audio element controller", "accessibility role description for audio element controller"); + if (name == "VideoElement") + return UI_STRING("video element controller", "accessibility role description for video element controller"); + if (name == "MuteButton") + return UI_STRING("mute", "accessibility role description for mute button"); + if (name == "UnMuteButton") + return UI_STRING("unmute", "accessibility role description for turn mute off button"); + if (name == "PlayButton") + return UI_STRING("play", "accessibility role description for play button"); + if (name == "PauseButton") + return UI_STRING("pause", "accessibility role description for pause button"); + if (name == "Slider") + return UI_STRING("movie time", "accessibility role description for timeline slider"); + if (name == "SliderThumb") + return UI_STRING("timeline slider thumb", "accessibility role description for timeline thumb"); + if (name == "RewindButton") + return UI_STRING("back 30 seconds", "accessibility role description for seek back 30 seconds button"); + if (name == "ReturnToRealtimeButton") + return UI_STRING("return to realtime", "accessibility role description for return to real time button"); + if (name == "CurrentTimeDisplay") + return UI_STRING("elapsed time", "accessibility role description for elapsed time display"); + if (name == "TimeRemainingDisplay") + return UI_STRING("remaining time", "accessibility role description for time remaining display"); + if (name == "StatusDisplay") + return UI_STRING("status", "accessibility role description for movie status"); + if (name == "FullscreenButton") + return UI_STRING("fullscreen", "accessibility role description for enter fullscreen button"); + if (name == "SeekForwardButton") + return UI_STRING("fast forward", "accessibility role description for fast forward button"); + if (name == "SeekBackButton") + return UI_STRING("fast reverse", "accessibility role description for fast reverse button"); + if (name == "ShowClosedCaptionsButton") + return UI_STRING("show closed captions", "accessibility role description for show closed captions button"); + if (name == "HideClosedCaptionsButton") + return UI_STRING("hide closed captions", "accessibility role description for hide closed captions button"); + + ASSERT_NOT_REACHED(); + return String(); +} + +String PlatformStrategiesWinCE::localizedMediaControlElementHelpText(const String& name) +{ + if (name == "AudioElement") + return UI_STRING("audio element playback controls and status display", "accessibility role description for audio element controller"); + if (name == "VideoElement") + return UI_STRING("video element playback controls and status display", "accessibility role description for video element controller"); + if (name == "MuteButton") + return UI_STRING("mute audio tracks", "accessibility help text for mute button"); + if (name == "UnMuteButton") + return UI_STRING("unmute audio tracks", "accessibility help text for un mute button"); + if (name == "PlayButton") + return UI_STRING("begin playback", "accessibility help text for play button"); + if (name == "PauseButton") + return UI_STRING("pause playback", "accessibility help text for pause button"); + if (name == "Slider") + return UI_STRING("movie time scrubber", "accessibility help text for timeline slider"); + if (name == "SliderThumb") + return UI_STRING("movie time scrubber thumb", "accessibility help text for timeline slider thumb"); + if (name == "RewindButton") + return UI_STRING("seek movie back 30 seconds", "accessibility help text for jump back 30 seconds button"); + if (name == "ReturnToRealtimeButton") + return UI_STRING("return streaming movie to real time", "accessibility help text for return streaming movie to real time button"); + if (name == "CurrentTimeDisplay") + return UI_STRING("current movie time in seconds", "accessibility help text for elapsed time display"); + if (name == "TimeRemainingDisplay") + return UI_STRING("number of seconds of movie remaining", "accessibility help text for remaining time display"); + if (name == "StatusDisplay") + return UI_STRING("current movie status", "accessibility help text for movie status display"); + if (name == "SeekBackButton") + return UI_STRING("seek quickly back", "accessibility help text for fast rewind button"); + if (name == "SeekForwardButton") + return UI_STRING("seek quickly forward", "accessibility help text for fast forward button"); + if (name == "FullscreenButton") + return UI_STRING("Play movie in fullscreen mode", "accessibility help text for enter fullscreen button"); + if (name == "ShowClosedCaptionsButton") + return UI_STRING("start displaying closed captions", "accessibility help text for show closed captions button"); + if (name == "HideClosedCaptionsButton") + return UI_STRING("stop displaying closed captions", "accessibility help text for hide closed captions button"); + + ASSERT_NOT_REACHED(); + return String(); +} + +String PlatformStrategiesWinCE::localizedMediaTimeDescription(float time) +{ + if (!isfinite(time)) + return UI_STRING("indefinite time", "accessibility help text for an indefinite media controller time value"); + + int seconds = (int)fabsf(time); + int days = seconds / (60 * 60 * 24); + int hours = seconds / (60 * 60); + int minutes = (seconds / 60) % 60; + seconds %= 60; + + if (days) + return String::format(UI_STRING("%1$d days %2$d hours %3$d minutes %4$d seconds", "accessibility help text for media controller time value >= 1 day"), days, hours, minutes, seconds); + + if (hours) + return String::format(UI_STRING("%1$d hours %2$d minutes %3$d seconds", "accessibility help text for media controller time value >= 60 minutes"), hours, minutes, seconds); + + if (minutes) + return String::format(UI_STRING("%1$d minutes %2$d seconds", "accessibility help text for media controller time value >= 60 seconds"), minutes, seconds); + + return String::format(UI_STRING("%1$d seconds", "accessibility help text for media controller time value < 60 seconds"), seconds); +} + +String PlatformStrategiesWinCE::validationMessageValueMissingText() +{ + return UI_STRING("value missing", "Validation message for required form control elements that have no value"); +} + +String PlatformStrategiesWinCE::validationMessageTypeMismatchText() +{ + return UI_STRING("type mismatch", "Validation message for input form controls with a value not matching type"); +} + +String PlatformStrategiesWinCE::validationMessagePatternMismatchText() +{ + return UI_STRING("pattern mismatch", "Validation message for input form controls requiring a constrained value according to pattern"); +} + +String PlatformStrategiesWinCE::validationMessageTooLongText() +{ + return UI_STRING("too long", "Validation message for form control elements with a value longer than maximum allowed length"); +} + +String PlatformStrategiesWinCE::validationMessageRangeUnderflowText() +{ + return UI_STRING("range underflow", "Validation message for input form controls with value lower than allowed minimum"); +} + +String PlatformStrategiesWinCE::validationMessageRangeOverflowText() +{ + return UI_STRING("range overflow", "Validation message for input form controls with value higher than allowed maximum"); +} + +String PlatformStrategiesWinCE::validationMessageStepMismatchText() +{ + return UI_STRING("step mismatch", "Validation message for input form controls with value not respecting the step attribute"); +} + +bool PlatformStrategiesWinCE::isLinkVisited(Page* page, LinkHash hash) +{ + return page->group().isLinkVisited(hash); +} + +void PlatformStrategiesWinCE::addVisitedLink(Page* page, LinkHash hash) +{ + page->group().addVisitedLinkHash(hash); +} diff --git a/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h b/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h new file mode 100644 index 0000000..02d87d3 --- /dev/null +++ b/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h @@ -0,0 +1,148 @@ +/* + * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.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. + * + * 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. + */ + +#ifndef PlatformStrategiesWinCE_h +#define PlatformStrategiesWinCE_h + +#include "LocalizationStrategy.h" +#include "PlatformStrategies.h" +#include "PluginStrategy.h" +#include "VisitedLinkStrategy.h" + +class PlatformStrategiesWinCE : public WebCore::PlatformStrategies, private WebCore::PluginStrategy, private WebCore::LocalizationStrategy, private WebCore::VisitedLinkStrategy { +public: + static void initialize(); + +private: + PlatformStrategiesWinCE(); + + // WebCore::PlatformStrategies + virtual WebCore::PluginStrategy* createPluginStrategy(); + virtual WebCore::LocalizationStrategy* createLocalizationStrategy(); + virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy(); + + // WebCore::PluginStrategy + virtual void refreshPlugins(); + virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&); + + // WebCore::LocalizationStrategy + virtual WTF::String inputElementAltText(); + virtual WTF::String resetButtonDefaultLabel(); + virtual WTF::String searchableIndexIntroduction(); + virtual WTF::String submitButtonDefaultLabel(); + virtual WTF::String fileButtonChooseFileLabel(); + virtual WTF::String fileButtonNoFileSelectedLabel(); +#if ENABLE(CONTEXT_MENUS) + virtual WTF::String contextMenuItemTagOpenLinkInNewWindow(); + virtual WTF::String contextMenuItemTagDownloadLinkToDisk(); + virtual WTF::String contextMenuItemTagCopyLinkToClipboard(); + virtual WTF::String contextMenuItemTagOpenImageInNewWindow(); + virtual WTF::String contextMenuItemTagDownloadImageToDisk(); + virtual WTF::String contextMenuItemTagCopyImageToClipboard(); + virtual WTF::String contextMenuItemTagOpenFrameInNewWindow(); + virtual WTF::String contextMenuItemTagCopy(); + virtual WTF::String contextMenuItemTagGoBack(); + virtual WTF::String contextMenuItemTagGoForward(); + virtual WTF::String contextMenuItemTagStop(); + virtual WTF::String contextMenuItemTagReload(); + virtual WTF::String contextMenuItemTagCut(); + virtual WTF::String contextMenuItemTagPaste(); + virtual WTF::String contextMenuItemTagNoGuessesFound(); + virtual WTF::String contextMenuItemTagIgnoreSpelling(); + virtual WTF::String contextMenuItemTagLearnSpelling(); + virtual WTF::String contextMenuItemTagSearchWeb(); + virtual WTF::String contextMenuItemTagLookUpInDictionary(); + virtual WTF::String contextMenuItemTagOpenLink(); + virtual WTF::String contextMenuItemTagIgnoreGrammar(); + virtual WTF::String contextMenuItemTagSpellingMenu(); + virtual WTF::String contextMenuItemTagShowSpellingPanel(bool show); + virtual WTF::String contextMenuItemTagCheckSpelling(); + virtual WTF::String contextMenuItemTagCheckSpellingWhileTyping(); + virtual WTF::String contextMenuItemTagCheckGrammarWithSpelling(); + virtual WTF::String contextMenuItemTagFontMenu(); + virtual WTF::String contextMenuItemTagBold(); + virtual WTF::String contextMenuItemTagItalic(); + virtual WTF::String contextMenuItemTagUnderline(); + virtual WTF::String contextMenuItemTagOutline(); + virtual WTF::String contextMenuItemTagWritingDirectionMenu(); + virtual WTF::String contextMenuItemTagTextDirectionMenu(); + virtual WTF::String contextMenuItemTagDefaultDirection(); + virtual WTF::String contextMenuItemTagLeftToRight(); + virtual WTF::String contextMenuItemTagRightToLeft(); + virtual WTF::String contextMenuItemTagInspectElement(); + virtual WTF::String contextMenuItemTagOpenVideoInNewWindow(); + virtual WTF::String contextMenuItemTagOpenAudioInNewWindow(); + virtual WTF::String contextMenuItemTagCopyVideoLinkToClipboard(); + virtual WTF::String contextMenuItemTagCopyAudioLinkToClipboard(); + virtual WTF::String contextMenuItemTagToggleMediaControls(); + virtual WTF::String contextMenuItemTagToggleMediaLoop(); + virtual WTF::String contextMenuItemTagEnterVideoFullscreen(); + virtual WTF::String contextMenuItemTagMediaPlay(); + virtual WTF::String contextMenuItemTagMediaPause(); + virtual WTF::String contextMenuItemTagMediaMute(); +#endif // ENABLE(CONTEXT_MENUS) + virtual WTF::String searchMenuNoRecentSearchesText(); + virtual WTF::String searchMenuRecentSearchesText(); + virtual WTF::String searchMenuClearRecentSearchesText(); + virtual WTF::String AXWebAreaText(); + virtual WTF::String AXLinkText(); + virtual WTF::String AXListMarkerText(); + virtual WTF::String AXImageMapText(); + virtual WTF::String AXHeadingText(); + virtual WTF::String AXDefinitionListTermText(); + virtual WTF::String AXDefinitionListDefinitionText(); + virtual WTF::String AXButtonActionVerb(); + virtual WTF::String AXRadioButtonActionVerb(); + virtual WTF::String AXTextFieldActionVerb(); + virtual WTF::String AXCheckedCheckBoxActionVerb(); + virtual WTF::String AXUncheckedCheckBoxActionVerb(); + virtual WTF::String AXMenuListActionVerb(); + virtual WTF::String AXMenuListPopupActionVerb(); + virtual WTF::String AXLinkActionVerb(); + virtual WTF::String missingPluginText(); + virtual WTF::String crashedPluginText(); + virtual WTF::String multipleFileUploadText(unsigned numberOfFiles); + virtual WTF::String unknownFileSizeText(); + virtual WTF::String uploadFileText(); + virtual WTF::String allFilesText(); + virtual WTF::String imageTitle(const WTF::String& filename, const WebCore::IntSize&); + virtual WTF::String mediaElementLoadingStateText(); + virtual WTF::String mediaElementLiveBroadcastStateText(); + virtual WTF::String localizedMediaControlElementString(const WTF::String&); + virtual WTF::String localizedMediaControlElementHelpText(const WTF::String&); + virtual WTF::String localizedMediaTimeDescription(float); + virtual WTF::String validationMessageValueMissingText(); + virtual WTF::String validationMessageTypeMismatchText(); + virtual WTF::String validationMessagePatternMismatchText(); + virtual WTF::String validationMessageTooLongText(); + virtual WTF::String validationMessageRangeUnderflowText(); + virtual WTF::String validationMessageRangeOverflowText(); + virtual WTF::String validationMessageStepMismatchText(); + + // WebCore::VisitedLinkStrategy + virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash); + virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash); +}; + +#endif // PlatformStrategiesWinCE_h diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog index 7aedbac..abbc87b 100644 --- a/WebKit/wx/ChangeLog +++ b/WebKit/wx/ChangeLog @@ -1,3 +1,27 @@ +2010-09-28 Jenn Braithwaite <jennb@chromium.org> + + Reviewed by Dmitry Titov. + + Added oldPage param to FrameLoaderClient::didTransferChildFrameToNewDocument. + https://bugs.webkit.org/show_bug.cgi?id=46663 + + * WebKitSupport/FrameLoaderClientWx.cpp: + (WebCore::FrameLoaderClientWx::didTransferChildFrameToNewDocument): + * WebKitSupport/FrameLoaderClientWx.h: + +2010-09-24 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Andreas Kling. + + [wx] ChromeClientWx::scaleFactor must return 1.0 + https://bugs.webkit.org/show_bug.cgi?id=46542 + + The default value of ChromeClientWx::scaleFactor must be 1.0. + Otherwise, canvas element won't be painted. + + * WebKitSupport/ChromeClientWx.cpp: + (WebCore::ChromeClientWx::scaleFactor): + 2010-09-17 Darin Adler <darin@apple.com> Reviewed by Sam Weinig. diff --git a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp index 9c90596..11c5643 100644 --- a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp +++ b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp @@ -108,7 +108,7 @@ FloatRect ChromeClientWx::pageRect() float ChromeClientWx::scaleFactor() { notImplemented(); - return 0.0; + return 1.0; } void ChromeClientWx::focus() diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp index facb387..93a62ca 100644 --- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp +++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp @@ -860,7 +860,7 @@ PassRefPtr<Frame> FrameLoaderClientWx::createFrame(const KURL& url, const String return childFrame.release(); } -void FrameLoaderClientWx::didTransferChildFrameToNewDocument() +void FrameLoaderClientWx::didTransferChildFrameToNewDocument(Page*) { } diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h index 20b50d3..9c260fe 100644 --- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h +++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h @@ -203,7 +203,7 @@ namespace WebCore { virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); - virtual void didTransferChildFrameToNewDocument(); + virtual void didTransferChildFrameToNewDocument(Page*); virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) ; virtual void redirectDataToPlugin(Widget* pluginWidget); virtual ResourceError pluginWillHandleLoadError(const ResourceResponse&); |