summaryrefslogtreecommitdiff
path: root/Source/WebKit
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
commit2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch)
tree988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/WebKit
parentdd91e772430dc294e3bf478c119ef8d43c0a3358 (diff)
downloadqtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/WebKit')
-rw-r--r--Source/WebKit/CMakeLists.txt4
-rw-r--r--Source/WebKit/ChangeLog201
-rw-r--r--Source/WebKit/PlatformBlackBerry.cmake17
-rw-r--r--Source/WebKit/PlatformEfl.cmake27
-rw-r--r--Source/WebKit/WebKit.xcodeproj/project.pbxproj16
-rw-r--r--Source/WebKit/blackberry/Api/ActiveNodeContext.h76
-rw-r--r--Source/WebKit/blackberry/Api/BackingStore.cpp521
-rw-r--r--Source/WebKit/blackberry/Api/BackingStore.h10
-rw-r--r--Source/WebKit/blackberry/Api/BackingStore_p.h23
-rw-r--r--Source/WebKit/blackberry/Api/BlackBerryGlobal.cpp4
-rw-r--r--Source/WebKit/blackberry/Api/BlackBerryGlobal.h4
-rw-r--r--Source/WebKit/blackberry/Api/WebPage.cpp882
-rw-r--r--Source/WebKit/blackberry/Api/WebPage.h27
-rw-r--r--Source/WebKit/blackberry/Api/WebPageClient.h14
-rw-r--r--Source/WebKit/blackberry/Api/WebPageCompositor.cpp268
-rw-r--r--Source/WebKit/blackberry/Api/WebPageCompositor.h58
-rw-r--r--Source/WebKit/blackberry/Api/WebPageCompositorClient.h41
-rw-r--r--Source/WebKit/blackberry/Api/WebPageCompositor_p.h (renamed from Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.h)56
-rw-r--r--Source/WebKit/blackberry/Api/WebPage_p.h92
-rw-r--r--Source/WebKit/blackberry/Api/WebSettings.cpp92
-rw-r--r--Source/WebKit/blackberry/Api/WebSettings.h6
-rw-r--r--Source/WebKit/blackberry/Api/WebViewportArguments.cpp119
-rw-r--r--Source/WebKit/blackberry/Api/WebViewportArguments.h94
-rw-r--r--Source/WebKit/blackberry/ChangeLog2297
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/AboutData.cpp9
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/AboutDataEnableFeatures.in60
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/AboutDataHaveFeatures.in2
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/AboutDataUseFeatures.in18
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/BatteryClientBlackBerry.cpp93
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/BatteryClientBlackBerry.h57
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp63
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.h15
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/CredentialManager.cpp53
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/CredentialManager.h16
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp2
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp16
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.h6
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp221
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h15
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp8
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h2
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp10
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.h4
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/NotificationPresenterImpl.cpp6
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/NotificationPresenterImpl.h4
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/VibrationClientBlackBerry.cpp48
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/VibrationClientBlackBerry.h38
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp110
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/DOMSupport.h7
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp29
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/FatFingers.cpp4
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/GLES2Context.cpp25
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.cpp227
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.h20
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/InRegionScrollableArea.cpp4
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp169
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/InputHandler.h9
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp202
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/SelectionHandler.h9
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/SurfacePool.cpp8
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp54
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.h1
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.cpp130
-rw-r--r--Source/WebKit/chromium/.gitignore35
-rw-r--r--Source/WebKit/chromium/ChangeLog8926
-rw-r--r--Source/WebKit/chromium/DEPS4
-rw-r--r--Source/WebKit/chromium/WebKit.gyp89
-rw-r--r--Source/WebKit/chromium/WebKit.gypi16
-rw-r--r--Source/WebKit/chromium/WebKitUnitTests.gyp11
-rw-r--r--Source/WebKit/chromium/bridge/MediaStreamCenterInternal.cpp96
-rw-r--r--Source/WebKit/chromium/bridge/PeerConnectionHandler.cpp88
-rw-r--r--Source/WebKit/chromium/bridge/PeerConnectionHandlerInternal.cpp137
-rw-r--r--Source/WebKit/chromium/bridge/PeerConnectionHandlerInternal.h80
-rw-r--r--Source/WebKit/chromium/features.gypi29
-rwxr-xr-xSource/WebKit/chromium/gyp_webkit2
-rw-r--r--Source/WebKit/chromium/public/WebAccessibilityRole.h1
-rw-r--r--Source/WebKit/chromium/public/WebActiveWheelFlingParameters.h54
-rw-r--r--Source/WebKit/chromium/public/WebArrayBuffer.h1
-rw-r--r--Source/WebKit/chromium/public/WebAttribute.h74
-rw-r--r--Source/WebKit/chromium/public/WebAutofillClient.h24
-rw-r--r--Source/WebKit/chromium/public/WebBatteryStatus.h (renamed from Source/WebKit/chromium/tests/WebExternalTextureLayerImplTest.cpp)38
-rw-r--r--Source/WebKit/chromium/public/WebBatteryStatusClient.h41
-rw-r--r--Source/WebKit/chromium/public/WebCompositor.h8
-rw-r--r--Source/WebKit/chromium/public/WebCompositorInputHandler.h3
-rw-r--r--Source/WebKit/chromium/public/WebCompositorInputHandlerClient.h6
-rw-r--r--Source/WebKit/chromium/public/WebContextMenuData.h2
-rw-r--r--Source/WebKit/chromium/public/WebDevToolsFrontendClient.h3
-rw-r--r--Source/WebKit/chromium/public/WebDocument.h2
-rw-r--r--Source/WebKit/chromium/public/WebElement.h5
-rw-r--r--Source/WebKit/chromium/public/WebFileChooserCompletion.h20
-rw-r--r--Source/WebKit/chromium/public/WebFrame.h18
-rw-r--r--Source/WebKit/chromium/public/WebFrameClient.h14
-rw-r--r--Source/WebKit/chromium/public/WebHitTestResult.h71
-rw-r--r--Source/WebKit/chromium/public/WebIDBCursor.h1
-rw-r--r--Source/WebKit/chromium/public/WebIDBDatabase.h9
-rw-r--r--Source/WebKit/chromium/public/WebIDBDatabaseException.h (renamed from Source/WebKit/chromium/public/WebReferrerPolicy.h)16
-rw-r--r--Source/WebKit/chromium/public/WebIDBIndex.h13
-rw-r--r--Source/WebKit/chromium/public/WebIDBKeyPath.h22
-rw-r--r--Source/WebKit/chromium/public/WebIDBObjectStore.h16
-rw-r--r--Source/WebKit/chromium/public/WebInputElement.h5
-rw-r--r--Source/WebKit/chromium/public/WebInputEvent.h54
-rw-r--r--Source/WebKit/chromium/public/WebIntent.h16
-rw-r--r--Source/WebKit/chromium/public/WebMediaElement.h56
-rw-r--r--Source/WebKit/chromium/public/WebMediaPlayer.h87
-rw-r--r--Source/WebKit/chromium/public/WebMediaPlayerClient.h19
-rw-r--r--Source/WebKit/chromium/public/WebNodeCollection.h2
-rw-r--r--Source/WebKit/chromium/public/WebPageVisibilityState.h3
-rw-r--r--Source/WebKit/chromium/public/WebPrerendererClient.h (renamed from Source/WebKit/chromium/src/WebURLRequestPrivate.h)27
-rw-r--r--Source/WebKit/chromium/public/WebPrintScalingOption.h44
-rw-r--r--Source/WebKit/chromium/public/WebRange.h4
-rw-r--r--Source/WebKit/chromium/public/WebRuntimeFeatures.h9
-rw-r--r--Source/WebKit/chromium/public/WebScopedMicrotaskSuppression.h (renamed from Source/WebKit/chromium/public/WebNamedNodeMap.h)64
-rw-r--r--Source/WebKit/chromium/public/WebSecurityPolicy.h6
-rw-r--r--Source/WebKit/chromium/public/WebSettings.h6
-rw-r--r--Source/WebKit/chromium/public/WebSpeechGrammar.h60
-rw-r--r--Source/WebKit/chromium/public/WebSpeechRecognitionHandle.h91
-rw-r--r--Source/WebKit/chromium/public/WebSpeechRecognitionParams.h58
-rw-r--r--Source/WebKit/chromium/public/WebSpeechRecognitionResult.h59
-rw-r--r--Source/WebKit/chromium/public/WebSpeechRecognizer.h56
-rw-r--r--Source/WebKit/chromium/public/WebSpeechRecognizerClient.h94
-rw-r--r--Source/WebKit/chromium/public/WebStorageEventDispatcher.h23
-rw-r--r--Source/WebKit/chromium/public/WebStorageNamespace.h25
-rw-r--r--Source/WebKit/chromium/public/WebSurroundingText.h72
-rw-r--r--Source/WebKit/chromium/public/WebTextCheckingCompletion.h1
-rw-r--r--Source/WebKit/chromium/public/WebTextFieldDecoratorClient.h (renamed from Source/WebKit/chromium/src/WebMediaStreamSourcesRequest.cpp)79
-rw-r--r--Source/WebKit/chromium/public/WebTimeRange.h (renamed from Source/WebKit/chromium/src/WebURLResponsePrivate.h)24
-rw-r--r--Source/WebKit/chromium/public/WebUserMediaClient.h3
-rw-r--r--Source/WebKit/chromium/public/WebUserMediaRequest.h8
-rw-r--r--Source/WebKit/chromium/public/WebVideoFrame.h81
-rw-r--r--Source/WebKit/chromium/public/WebView.h40
-rw-r--r--Source/WebKit/chromium/public/WebViewClient.h11
-rw-r--r--Source/WebKit/chromium/public/WebWidget.h25
-rw-r--r--Source/WebKit/chromium/public/WebWidgetClient.h19
-rw-r--r--Source/WebKit/chromium/public/android/WebInputEventFactory.h2
-rw-r--r--Source/WebKit/chromium/public/platform/WebArrayBufferView.h11
-rw-r--r--Source/WebKit/chromium/public/platform/WebAudioBus.h73
-rw-r--r--Source/WebKit/chromium/public/platform/WebAudioDevice.h34
-rw-r--r--Source/WebKit/chromium/public/platform/WebData.h122
-rw-r--r--Source/WebKit/chromium/public/platform/WebDragData.h4
-rw-r--r--Source/WebKit/chromium/public/platform/WebFileSystem.h5
-rw-r--r--Source/WebKit/chromium/public/platform/WebGamepad.h112
-rw-r--r--Source/WebKit/chromium/public/platform/WebGamepads.h88
-rw-r--r--Source/WebKit/chromium/public/platform/WebHTTPBody.h121
-rw-r--r--Source/WebKit/chromium/public/platform/WebHTTPHeaderVisitor.h60
-rw-r--r--Source/WebKit/chromium/public/platform/WebHTTPLoadInfo.h100
-rw-r--r--Source/WebKit/chromium/public/platform/WebICECandidateDescriptor.h26
-rw-r--r--Source/WebKit/chromium/public/platform/WebICEOptions.h26
-rw-r--r--Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h259
-rw-r--r--Source/WebKit/chromium/public/platform/WebLocalizedString.h58
-rw-r--r--Source/WebKit/chromium/public/platform/WebMediaHints.h26
-rw-r--r--Source/WebKit/chromium/public/platform/WebMediaStreamCenter.h64
-rw-r--r--Source/WebKit/chromium/public/platform/WebMediaStreamCenterClient.h57
-rw-r--r--Source/WebKit/chromium/public/platform/WebMediaStreamComponent.h81
-rw-r--r--Source/WebKit/chromium/public/platform/WebMediaStreamDescriptor.h78
-rw-r--r--Source/WebKit/chromium/public/platform/WebMediaStreamSource.h98
-rw-r--r--Source/WebKit/chromium/public/platform/WebMediaStreamSourcesRequest.h79
-rw-r--r--Source/WebKit/chromium/public/platform/WebPeerConnection00Handler.h26
-rw-r--r--Source/WebKit/chromium/public/platform/WebPeerConnection00HandlerClient.h26
-rw-r--r--Source/WebKit/chromium/public/platform/WebPeerConnectionHandler.h85
-rw-r--r--Source/WebKit/chromium/public/platform/WebPeerConnectionHandlerClient.h64
-rw-r--r--Source/WebKit/chromium/public/platform/WebPrivateOwnPtr.h53
-rw-r--r--Source/WebKit/chromium/public/platform/WebReferrerPolicy.h31
-rw-r--r--Source/WebKit/chromium/public/platform/WebSessionDescriptionDescriptor.h26
-rw-r--r--Source/WebKit/chromium/public/platform/WebSocketStreamError.h57
-rw-r--r--Source/WebKit/chromium/public/platform/WebSocketStreamHandle.h70
-rw-r--r--Source/WebKit/chromium/public/platform/WebSocketStreamHandleClient.h78
-rw-r--r--Source/WebKit/chromium/public/platform/WebThread.h50
-rw-r--r--Source/WebKit/chromium/public/platform/WebThreadSafeData.h89
-rw-r--r--Source/WebKit/chromium/public/platform/WebURL.h170
-rw-r--r--Source/WebKit/chromium/public/platform/WebURLError.h85
-rw-r--r--Source/WebKit/chromium/public/platform/WebURLLoadTiming.h120
-rw-r--r--Source/WebKit/chromium/public/platform/WebURLLoader.h83
-rw-r--r--Source/WebKit/chromium/public/platform/WebURLLoaderClient.h90
-rw-r--r--Source/WebKit/chromium/public/platform/WebURLRequest.h211
-rw-r--r--Source/WebKit/chromium/public/platform/WebURLResponse.h212
-rw-r--r--Source/WebKit/chromium/public/platform/WebVector.h198
-rw-r--r--Source/WebKit/chromium/src/ApplicationCacheHost.cpp8
-rw-r--r--Source/WebKit/chromium/src/AssertMatchingEnums.cpp152
-rw-r--r--Source/WebKit/chromium/src/AssociatedURLLoader.cpp6
-rw-r--r--Source/WebKit/chromium/src/AsyncFileSystemChromium.cpp89
-rw-r--r--Source/WebKit/chromium/src/AsyncFileSystemChromium.h9
-rw-r--r--Source/WebKit/chromium/src/AudioDestinationChromium.cpp130
-rw-r--r--Source/WebKit/chromium/src/AudioDestinationChromium.h57
-rw-r--r--Source/WebKit/chromium/src/AutofillPopupMenuClient.cpp136
-rw-r--r--Source/WebKit/chromium/src/AutofillPopupMenuClient.h17
-rw-r--r--Source/WebKit/chromium/src/BatteryClientImpl.cpp (renamed from Source/WebKit/chromium/bridge/MediaStreamCenter.cpp)48
-rw-r--r--Source/WebKit/chromium/src/BatteryClientImpl.h (renamed from Source/WebKit/chromium/src/WebStorageNamespaceImpl.h)40
-rw-r--r--Source/WebKit/chromium/src/BlobRegistryProxy.h1
-rw-r--r--Source/WebKit/chromium/src/CCThreadImpl.cpp2
-rw-r--r--Source/WebKit/chromium/src/ChromeClientImpl.cpp94
-rw-r--r--Source/WebKit/chromium/src/ChromeClientImpl.h12
-rw-r--r--Source/WebKit/chromium/src/ChromiumCurrentTime.cpp4
-rw-r--r--Source/WebKit/chromium/src/ChromiumOSRandomSource.cpp5
-rw-r--r--Source/WebKit/chromium/src/ChromiumThreading.cpp2
-rw-r--r--Source/WebKit/chromium/src/ColorChooserProxy.cpp4
-rw-r--r--Source/WebKit/chromium/src/ColorChooserProxy.h4
-rw-r--r--Source/WebKit/chromium/src/CompositionUnderlineBuilder.h2
-rw-r--r--Source/WebKit/chromium/src/CompositionUnderlineVectorBuilder.h2
-rw-r--r--Source/WebKit/chromium/src/ContextMenuClientImpl.cpp22
-rw-r--r--Source/WebKit/chromium/src/DatabaseObserver.cpp3
-rw-r--r--Source/WebKit/chromium/src/Extensions3DChromium.cpp45
-rw-r--r--Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp98
-rw-r--r--Source/WebKit/chromium/src/FrameLoaderClientImpl.h18
-rw-r--r--Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp29
-rw-r--r--Source/WebKit/chromium/src/GraphicsContext3DPrivate.h16
-rw-r--r--Source/WebKit/chromium/src/IDBCursorBackendProxy.cpp5
-rw-r--r--Source/WebKit/chromium/src/IDBCursorBackendProxy.h1
-rw-r--r--Source/WebKit/chromium/src/IDBIndexBackendProxy.cpp10
-rw-r--r--Source/WebKit/chromium/src/IDBIndexBackendProxy.h4
-rwxr-xr-xSource/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp6
-rw-r--r--Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h2
-rw-r--r--Source/WebKit/chromium/src/InspectorClientImpl.cpp22
-rw-r--r--Source/WebKit/chromium/src/InspectorClientImpl.h7
-rw-r--r--Source/WebKit/chromium/src/InspectorFrontendClientImpl.cpp11
-rw-r--r--Source/WebKit/chromium/src/InspectorFrontendClientImpl.h5
-rw-r--r--Source/WebKit/chromium/src/LocalFileSystemChromium.cpp21
-rw-r--r--Source/WebKit/chromium/src/LocalizedStrings.cpp36
-rw-r--r--Source/WebKit/chromium/src/NonCompositedContentHost.cpp11
-rw-r--r--Source/WebKit/chromium/src/NotificationPresenterImpl.cpp4
-rw-r--r--Source/WebKit/chromium/src/NotificationPresenterImpl.h11
-rw-r--r--Source/WebKit/chromium/src/PageWidgetDelegate.cpp221
-rw-r--r--Source/WebKit/chromium/src/PageWidgetDelegate.h86
-rw-r--r--Source/WebKit/chromium/src/PlatformSupport.cpp192
-rw-r--r--Source/WebKit/chromium/src/ResourceHandle.cpp297
-rw-r--r--Source/WebKit/chromium/src/ResourceHandleInternal.h97
-rw-r--r--Source/WebKit/chromium/src/ScrollbarGroup.cpp26
-rw-r--r--Source/WebKit/chromium/src/ScrollbarGroup.h5
-rw-r--r--Source/WebKit/chromium/src/SharedWorkerRepository.cpp4
-rw-r--r--Source/WebKit/chromium/src/SocketStreamHandle.cpp8
-rw-r--r--Source/WebKit/chromium/src/SpeechRecognitionClientProxy.cpp163
-rw-r--r--Source/WebKit/chromium/src/SpeechRecognitionClientProxy.h75
-rw-r--r--Source/WebKit/chromium/src/StorageAreaProxy.cpp80
-rw-r--r--Source/WebKit/chromium/src/StorageAreaProxy.h18
-rw-r--r--Source/WebKit/chromium/src/StorageEventDispatcherChromium.cpp52
-rw-r--r--Source/WebKit/chromium/src/StorageEventDispatcherImpl.cpp2
-rw-r--r--Source/WebKit/chromium/src/StorageNamespaceProxy.cpp7
-rw-r--r--Source/WebKit/chromium/src/StorageNamespaceProxy.h5
-rw-r--r--Source/WebKit/chromium/src/TextFieldDecoratorImpl.cpp119
-rw-r--r--Source/WebKit/chromium/src/TextFieldDecoratorImpl.h (renamed from Source/WebKit/chromium/bridge/MediaStreamCenterInternal.h)53
-rw-r--r--Source/WebKit/chromium/src/UserMediaClientImpl.cpp6
-rw-r--r--Source/WebKit/chromium/src/VideoFrameChromiumImpl.cpp138
-rw-r--r--Source/WebKit/chromium/src/VideoFrameChromiumImpl.h69
-rw-r--r--Source/WebKit/chromium/src/WebAccessibilityObject.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebArrayBuffer.cpp10
-rw-r--r--Source/WebKit/chromium/src/WebArrayBufferView.cpp13
-rw-r--r--Source/WebKit/chromium/src/WebAttribute.cpp67
-rw-r--r--Source/WebKit/chromium/src/WebAudioBus.cpp132
-rw-r--r--Source/WebKit/chromium/src/WebBindings.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebColorChooserClientImpl.cpp4
-rw-r--r--Source/WebKit/chromium/src/WebColorChooserClientImpl.h4
-rw-r--r--Source/WebKit/chromium/src/WebColorName.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebCompositorImpl.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp227
-rw-r--r--Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.h33
-rw-r--r--Source/WebKit/chromium/src/WebContentLayer.cpp10
-rw-r--r--Source/WebKit/chromium/src/WebData.cpp103
-rw-r--r--Source/WebKit/chromium/src/WebDatabase.cpp1
-rw-r--r--Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp243
-rw-r--r--Source/WebKit/chromium/src/WebDevToolsAgentImpl.h12
-rw-r--r--Source/WebKit/chromium/src/WebDevToolsAgentPrivate.h20
-rw-r--r--Source/WebKit/chromium/src/WebDocument.cpp10
-rw-r--r--Source/WebKit/chromium/src/WebDragData.cpp107
-rw-r--r--Source/WebKit/chromium/src/WebElement.cpp21
-rw-r--r--Source/WebKit/chromium/src/WebExternalTextureLayer.cpp54
-rw-r--r--Source/WebKit/chromium/src/WebFileChooserCompletionImpl.cpp22
-rw-r--r--Source/WebKit/chromium/src/WebFileChooserCompletionImpl.h1
-rw-r--r--Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp6
-rw-r--r--Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.h10
-rw-r--r--Source/WebKit/chromium/src/WebFontImpl.cpp31
-rw-r--r--Source/WebKit/chromium/src/WebFrameImpl.cpp99
-rw-r--r--Source/WebKit/chromium/src/WebFrameImpl.h14
-rw-r--r--Source/WebKit/chromium/src/WebGeolocationClientMock.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebHTTPBody.cpp184
-rw-r--r--Source/WebKit/chromium/src/WebHTTPLoadInfo.cpp147
-rw-r--r--Source/WebKit/chromium/src/WebHitTestResult.cpp84
-rw-r--r--Source/WebKit/chromium/src/WebIDBCursorImpl.cpp5
-rw-r--r--Source/WebKit/chromium/src/WebIDBCursorImpl.h1
-rw-r--r--Source/WebKit/chromium/src/WebIDBDatabaseImpl.h5
-rw-r--r--Source/WebKit/chromium/src/WebIDBIndexImpl.cpp13
-rw-r--r--Source/WebKit/chromium/src/WebIDBIndexImpl.h9
-rw-r--r--Source/WebKit/chromium/src/WebIDBKeyPath.cpp64
-rwxr-xr-xSource/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp13
-rw-r--r--Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h14
-rw-r--r--Source/WebKit/chromium/src/WebIOSurfaceLayer.cpp (renamed from Source/WebKit/chromium/src/WebExternalTextureLayerImpl.cpp)28
-rw-r--r--Source/WebKit/chromium/src/WebInputElement.cpp18
-rw-r--r--Source/WebKit/chromium/src/WebInputEvent.cpp32
-rw-r--r--Source/WebKit/chromium/src/WebInputEventConversion.cpp13
-rw-r--r--Source/WebKit/chromium/src/WebIntent.cpp54
-rw-r--r--Source/WebKit/chromium/src/WebKit.cpp32
-rw-r--r--Source/WebKit/chromium/src/WebLayer.cpp26
-rw-r--r--Source/WebKit/chromium/src/WebLayerImpl.cpp4
-rw-r--r--Source/WebKit/chromium/src/WebLayerImpl.h1
-rw-r--r--Source/WebKit/chromium/src/WebLayerTreeView.cpp28
-rw-r--r--Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp43
-rw-r--r--Source/WebKit/chromium/src/WebLayerTreeViewImpl.h29
-rw-r--r--Source/WebKit/chromium/src/WebMediaElement.cpp64
-rw-r--r--Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp193
-rw-r--r--Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h48
-rw-r--r--Source/WebKit/chromium/src/WebMediaStreamDescriptor.cpp153
-rw-r--r--Source/WebKit/chromium/src/WebMediaStreamSource.cpp102
-rw-r--r--Source/WebKit/chromium/src/WebNamedNodeMap.cpp70
-rw-r--r--Source/WebKit/chromium/src/WebNotification.cpp13
-rw-r--r--Source/WebKit/chromium/src/WebPagePopupImpl.cpp286
-rw-r--r--Source/WebKit/chromium/src/WebPagePopupImpl.h104
-rw-r--r--Source/WebKit/chromium/src/WebPageSerializer.cpp9
-rw-r--r--Source/WebKit/chromium/src/WebPluginContainerImpl.cpp68
-rw-r--r--Source/WebKit/chromium/src/WebPluginContainerImpl.h11
-rw-r--r--Source/WebKit/chromium/src/WebPopupMenuImpl.cpp15
-rw-r--r--Source/WebKit/chromium/src/WebPopupMenuImpl.h1
-rw-r--r--Source/WebKit/chromium/src/WebRange.cpp23
-rw-r--r--Source/WebKit/chromium/src/WebRuntimeFeatures.cpp61
-rw-r--r--Source/WebKit/chromium/src/WebScopedMicrotaskSuppression.cpp (renamed from Source/WebKit/chromium/src/WebURL.cpp)29
-rw-r--r--Source/WebKit/chromium/src/WebSecurityPolicy.cpp7
-rw-r--r--Source/WebKit/chromium/src/WebSessionDescriptionDescriptor.cpp (renamed from Source/WebKit/chromium/src/WebMediaStreamComponent.cpp)37
-rw-r--r--Source/WebKit/chromium/src/WebSettingsImpl.cpp26
-rw-r--r--Source/WebKit/chromium/src/WebSettingsImpl.h8
-rw-r--r--Source/WebKit/chromium/src/WebSharedWorkerImpl.cpp3
-rw-r--r--Source/WebKit/chromium/src/WebSharedWorkerImpl.h2
-rw-r--r--Source/WebKit/chromium/src/WebSocketImpl.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebSpeechGrammar.cpp62
-rw-r--r--Source/WebKit/chromium/src/WebSpeechRecognitionHandle.cpp71
-rw-r--r--Source/WebKit/chromium/src/WebSpeechRecognitionResult.cpp62
-rw-r--r--Source/WebKit/chromium/src/WebStorageAreaImpl.cpp93
-rw-r--r--Source/WebKit/chromium/src/WebStorageAreaImpl.h79
-rw-r--r--Source/WebKit/chromium/src/WebStorageEventDispatcherImpl.cpp37
-rw-r--r--Source/WebKit/chromium/src/WebStorageEventDispatcherImpl.h3
-rw-r--r--Source/WebKit/chromium/src/WebStorageNamespaceImpl.cpp75
-rw-r--r--Source/WebKit/chromium/src/WebSurroundingText.cpp90
-rw-r--r--Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp8
-rw-r--r--Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.h1
-rwxr-xr-xSource/WebKit/chromium/src/WebThreadSafeData.cpp75
-rw-r--r--Source/WebKit/chromium/src/WebURLError.cpp72
-rw-r--r--Source/WebKit/chromium/src/WebURLRequest.cpp347
-rw-r--r--Source/WebKit/chromium/src/WebURLResponse.cpp447
-rw-r--r--Source/WebKit/chromium/src/WebUserMediaRequest.cpp28
-rw-r--r--Source/WebKit/chromium/src/WebVideoLayer.cpp (renamed from Source/WebKit/chromium/src/WebExternalTextureLayerImpl.h)31
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.cpp589
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.h108
-rw-r--r--Source/WebKit/chromium/src/WebWorkerClientImpl.cpp8
-rw-r--r--Source/WebKit/chromium/src/WebWorkerClientImpl.h2
-rw-r--r--Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp6
-rw-r--r--Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h10
-rw-r--r--Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp8
-rw-r--r--Source/WebKit/chromium/src/WrappedResourceRequest.h80
-rw-r--r--Source/WebKit/chromium/src/WrappedResourceResponse.h80
-rw-r--r--Source/WebKit/chromium/src/android/WebInputEventFactory.cpp5
-rw-r--r--Source/WebKit/chromium/src/js/Tests.js10
-rw-r--r--Source/WebKit/chromium/src/painting/PaintAggregator.cpp2
-rw-r--r--Source/WebKit/chromium/tests/AssociatedURLLoaderTest.cpp42
-rw-r--r--Source/WebKit/chromium/tests/CCActiveAnimationTest.cpp55
-rw-r--r--Source/WebKit/chromium/tests/CCAnimationTestCommon.cpp57
-rw-r--r--Source/WebKit/chromium/tests/CCAnimationTestCommon.h50
-rw-r--r--Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp260
-rw-r--r--Source/WebKit/chromium/tests/CCDelayBasedTimeSourceTest.cpp82
-rw-r--r--Source/WebKit/chromium/tests/CCFrameRateControllerTest.cpp62
-rw-r--r--Source/WebKit/chromium/tests/CCLayerAnimationControllerImplTest.cpp396
-rw-r--r--Source/WebKit/chromium/tests/CCLayerAnimationControllerTest.cpp519
-rw-r--r--Source/WebKit/chromium/tests/CCLayerImplTest.cpp4
-rw-r--r--Source/WebKit/chromium/tests/CCLayerIteratorTest.cpp2
-rw-r--r--Source/WebKit/chromium/tests/CCLayerSorterTest.cpp246
-rw-r--r--Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp759
-rw-r--r--Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp641
-rw-r--r--Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp708
-rw-r--r--Source/WebKit/chromium/tests/CCLayerTreeTestCommon.h8
-rw-r--r--Source/WebKit/chromium/tests/CCMathUtilTest.cpp102
-rw-r--r--Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp4681
-rw-r--r--Source/WebKit/chromium/tests/CCOcclusionTrackerTestCommon.h57
-rw-r--r--Source/WebKit/chromium/tests/CCQuadCullerTest.cpp397
-rw-r--r--Source/WebKit/chromium/tests/CCRenderSurfaceTest.cpp36
-rw-r--r--Source/WebKit/chromium/tests/CCSchedulerStateMachineTest.cpp357
-rw-r--r--Source/WebKit/chromium/tests/CCSchedulerTest.cpp316
-rw-r--r--Source/WebKit/chromium/tests/CCSchedulerTestCommon.h34
-rw-r--r--Source/WebKit/chromium/tests/CCSolidColorLayerImplTest.cpp40
-rw-r--r--Source/WebKit/chromium/tests/CCTiledLayerImplTest.cpp128
-rw-r--r--Source/WebKit/chromium/tests/CCTiledLayerTestCommon.cpp129
-rw-r--r--Source/WebKit/chromium/tests/CCTiledLayerTestCommon.h168
-rw-r--r--Source/WebKit/chromium/tests/CCTimerTest.cpp6
-rw-r--r--Source/WebKit/chromium/tests/Canvas2DLayerChromiumTest.cpp125
-rw-r--r--Source/WebKit/chromium/tests/DrawingBufferChromiumTest.cpp (renamed from Source/WebKit/chromium/tests/WebGLLayerChromiumTest.cpp)16
-rwxr-xr-xSource/WebKit/chromium/tests/FakeCCLayerTreeHostClient.h18
-rw-r--r--Source/WebKit/chromium/tests/FakeWebGraphicsContext3D.h13
-rw-r--r--Source/WebKit/chromium/tests/FloatQuadTest.cpp4
-rw-r--r--Source/WebKit/chromium/tests/FrameTestHelpers.cpp9
-rw-r--r--Source/WebKit/chromium/tests/FrameTestHelpers.h4
-rw-r--r--Source/WebKit/chromium/tests/LayerChromiumTest.cpp56
-rw-r--r--Source/WebKit/chromium/tests/LayerRendererChromiumTest.cpp277
-rw-r--r--Source/WebKit/chromium/tests/LayerTextureUpdaterTest.cpp93
-rw-r--r--Source/WebKit/chromium/tests/LevelDBTest.cpp105
-rw-r--r--Source/WebKit/chromium/tests/LocaleWinTest.cpp163
-rw-r--r--Source/WebKit/chromium/tests/LocalizedNumberICUTest.cpp4
-rw-r--r--Source/WebKit/chromium/tests/MockCCQuadCuller.h65
-rw-r--r--Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp255
-rw-r--r--Source/WebKit/chromium/tests/PlatformGestureCurveTest.cpp34
-rw-r--r--Source/WebKit/chromium/tests/PopupMenuTest.cpp9
-rw-r--r--Source/WebKit/chromium/tests/RegionTest.cpp127
-rw-r--r--Source/WebKit/chromium/tests/RenderTableCellTest.cpp23
-rw-r--r--Source/WebKit/chromium/tests/RenderTableRowTest.cpp118
-rw-r--r--Source/WebKit/chromium/tests/ScrollAnimatorNoneTest.cpp22
-rw-r--r--Source/WebKit/chromium/tests/ScrollbarLayerChromiumTest.cpp2
-rw-r--r--Source/WebKit/chromium/tests/TextureCopierTest.cpp85
-rw-r--r--Source/WebKit/chromium/tests/TextureManagerTest.cpp9
-rw-r--r--Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp1046
-rwxr-xr-xSource/WebKit/chromium/tests/TilingDataTest.cpp686
-rw-r--r--Source/WebKit/chromium/tests/TransparencyWinTest.cpp60
-rw-r--r--Source/WebKit/chromium/tests/TreeSynchronizerTest.cpp66
-rw-r--r--Source/WebKit/chromium/tests/WebCompositorInputHandlerImplTest.cpp614
-rw-r--r--Source/WebKit/chromium/tests/WebFrameTest.cpp44
-rw-r--r--Source/WebKit/chromium/tests/WebLayerTest.cpp7
-rw-r--r--Source/WebKit/chromium/tests/WebMediaPlayerClientImplTest.cpp120
-rw-r--r--Source/WebKit/chromium/tests/WebSocketDeflaterTest.cpp12
-rw-r--r--Source/WebKit/chromium/tests/WebViewTest.cpp125
-rw-r--r--Source/WebKit/chromium/tests/data/no_viewport_tag.html5
-rw-r--r--Source/WebKit/chromium/tests/data/specify_size.html16
-rw-r--r--Source/WebKit/efl/ChangeLog1047
-rw-r--r--Source/WebKit/efl/WebCoreSupport/AssertMatchingEnums.cpp1
-rw-r--r--Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.cpp62
-rw-r--r--Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.h53
-rw-r--r--Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp42
-rw-r--r--Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h16
-rw-r--r--Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp217
-rw-r--r--Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h19
-rw-r--r--Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp23
-rw-r--r--Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h4
-rw-r--r--Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp236
-rw-r--r--Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h10
-rw-r--r--Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.cpp70
-rw-r--r--Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.h53
-rw-r--r--Source/WebKit/efl/WebCoreSupport/NotificationPresenterClientEfl.cpp2
-rw-r--r--Source/WebKit/efl/WebCoreSupport/NotificationPresenterClientEfl.h2
-rw-r--r--Source/WebKit/efl/WebCoreSupport/PageClientEfl.cpp49
-rw-r--r--Source/WebKit/efl/WebCoreSupport/PageClientEfl.h48
-rw-r--r--Source/WebKit/efl/ewk/EWebKit.h1
-rw-r--r--Source/WebKit/efl/ewk/ewk_cookies.cpp12
-rw-r--r--Source/WebKit/efl/ewk/ewk_cookies.h4
-rw-r--r--Source/WebKit/efl/ewk/ewk_frame.cpp132
-rw-r--r--Source/WebKit/efl/ewk/ewk_frame.h79
-rw-r--r--Source/WebKit/efl/ewk/ewk_history.cpp9
-rw-r--r--Source/WebKit/efl/ewk/ewk_private.h38
-rw-r--r--Source/WebKit/efl/ewk/ewk_security_origin.cpp109
-rw-r--r--Source/WebKit/efl/ewk/ewk_security_origin.h122
-rw-r--r--Source/WebKit/efl/ewk/ewk_settings.cpp10
-rw-r--r--Source/WebKit/efl/ewk/ewk_settings.h7
-rw-r--r--Source/WebKit/efl/ewk/ewk_tiled_backing_store.cpp10
-rw-r--r--Source/WebKit/efl/ewk/ewk_tiled_matrix.cpp56
-rw-r--r--Source/WebKit/efl/ewk/ewk_tiled_matrix.h4
-rw-r--r--Source/WebKit/efl/ewk/ewk_view.cpp384
-rw-r--r--Source/WebKit/efl/ewk/ewk_view.h277
-rw-r--r--Source/WebKit/gtk/ChangeLog1005
-rw-r--r--Source/WebKit/gtk/GNUmakefile.am52
-rw-r--r--Source/WebKit/gtk/NEWS85
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h3
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp22
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp2
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp34
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h2
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp105
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h3
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp2
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/DragClientGtk.h2
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp99
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h7
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp248
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h16
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp84
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h11
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h2
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.cpp20
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.h7
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h4
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp110
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.h53
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.cpp2
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.h2
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.cpp (renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp)41
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.h (renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h)38
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.cpp110
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.h54
-rw-r--r--Source/WebKit/gtk/docs/webkitgtk-docs.sgml1
-rw-r--r--Source/WebKit/gtk/docs/webkitgtk-sections.txt29
-rw-r--r--Source/WebKit/gtk/docs/webkitgtk.types1
-rw-r--r--Source/WebKit/gtk/po/ChangeLog81
-rw-r--r--Source/WebKit/gtk/po/GNUmakefile.am2
-rw-r--r--Source/WebKit/gtk/po/de.po924
-rw-r--r--Source/WebKit/gtk/po/en_GB.po1143
-rw-r--r--Source/WebKit/gtk/po/es.po1132
-rw-r--r--Source/WebKit/gtk/po/gl.po962
-rw-r--r--Source/WebKit/gtk/po/id.po865
-rw-r--r--Source/WebKit/gtk/po/mr.po1417
-rw-r--r--Source/WebKit/gtk/po/nb.po831
-rw-r--r--Source/WebKit/gtk/po/sl.po961
-rw-r--r--Source/WebKit/gtk/resources/error.html4
-rw-r--r--Source/WebKit/gtk/tests/testcontextmenu.c324
-rw-r--r--Source/WebKit/gtk/tests/testfavicondatabase.c284
-rw-r--r--Source/WebKit/gtk/tests/testhittestresult.c6
-rw-r--r--Source/WebKit/gtk/webkit/webkit.h1
-rw-r--r--Source/WebKit/gtk/webkit/webkitdefines.h3
-rw-r--r--Source/WebKit/gtk/webkit/webkitdownload.cpp6
-rw-r--r--Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp645
-rw-r--r--Source/WebKit/gtk/webkit/webkitfavicondatabase.h95
-rw-r--r--Source/WebKit/gtk/webkit/webkitfavicondatabaseprivate.h (renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h)32
-rw-r--r--Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp19
-rw-r--r--Source/WebKit/gtk/webkit/webkitgeolocationpolicydecisionprivate.h4
-rw-r--r--Source/WebKit/gtk/webkit/webkitglobals.cpp197
-rw-r--r--Source/WebKit/gtk/webkit/webkitglobals.h97
-rw-r--r--Source/WebKit/gtk/webkit/webkitglobalsprivate.h2
-rw-r--r--Source/WebKit/gtk/webkit/webkithittestresult.cpp62
-rw-r--r--Source/WebKit/gtk/webkit/webkiticondatabase.cpp16
-rw-r--r--Source/WebKit/gtk/webkit/webkiticondatabase.h2
-rw-r--r--Source/WebKit/gtk/webkit/webkitnetworkrequest.cpp4
-rw-r--r--Source/WebKit/gtk/webkit/webkitnetworkresponse.cpp4
-rw-r--r--Source/WebKit/gtk/webkit/webkitspellcheckerenchant.cpp2
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebdatasourceprivate.h2
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebframe.cpp24
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp2
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebresource.cpp6
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebsettings.cpp4
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h2
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebview.cpp315
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebview.h7
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebviewprivate.h14
-rw-r--r--Source/WebKit/gtk/webkitmarshal.list3
-rw-r--r--Source/WebKit/mac/ChangeLog1181
-rw-r--r--Source/WebKit/mac/Configurations/Base.xcconfig2
-rw-r--r--Source/WebKit/mac/Configurations/DebugRelease.xcconfig1
-rw-r--r--Source/WebKit/mac/Configurations/FeatureDefines.xcconfig71
-rw-r--r--Source/WebKit/mac/Configurations/Version.xcconfig2
-rw-r--r--Source/WebKit/mac/Configurations/WebKit.xcconfig2
-rw-r--r--Source/WebKit/mac/DOM/WebDOMOperations.mm2
-rw-r--r--Source/WebKit/mac/History/WebHistory.mm51
-rw-r--r--Source/WebKit/mac/MigrateHeaders.make1
-rw-r--r--Source/WebKit/mac/Misc/WebKitVersionChecks.h1
-rw-r--r--Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h2
-rw-r--r--Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm42
-rw-r--r--Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm36
-rw-r--r--Source/WebKit/mac/Plugins/Hosted/ProxyInstance.h3
-rw-r--r--Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm18
-rw-r--r--Source/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs3
-rw-r--r--Source/WebKit/mac/Plugins/Hosted/WebTextInputWindowController.m20
-rw-r--r--Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm2
-rw-r--r--Source/WebKit/mac/Plugins/WebNetscapePluginPackage.mm2
-rw-r--r--Source/WebKit/mac/WebCoreSupport/CorrectionPanel.h15
-rw-r--r--Source/WebKit/mac/WebCoreSupport/CorrectionPanel.mm28
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebAlternativeTextClient.h51
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebAlternativeTextClient.mm76
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebChromeClient.h5
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm50
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebEditorClient.h11
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm35
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h5
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm22
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebGeolocationClient.mm7
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm63
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebKitFullScreenListener.h47
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebKitFullScreenListener.mm70
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebNotificationClient.h15
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebNotificationClient.mm113
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h4
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm10
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm12
-rw-r--r--Source/WebKit/mac/WebKit.order4
-rw-r--r--Source/WebKit/mac/WebView/WebFrame.mm56
-rw-r--r--Source/WebKit/mac/WebView/WebFramePrivate.h5
-rw-r--r--Source/WebKit/mac/WebView/WebFullScreenController.h2
-rw-r--r--Source/WebKit/mac/WebView/WebFullScreenController.mm28
-rw-r--r--Source/WebKit/mac/WebView/WebGeolocationPosition.mm12
-rw-r--r--Source/WebKit/mac/WebView/WebGeolocationPositionInternal.h3
-rw-r--r--Source/WebKit/mac/WebView/WebHTMLRepresentation.mm8
-rw-r--r--Source/WebKit/mac/WebView/WebHTMLView.mm4
-rw-r--r--Source/WebKit/mac/WebView/WebNotification.h2
-rw-r--r--Source/WebKit/mac/WebView/WebNotification.mm32
-rw-r--r--Source/WebKit/mac/WebView/WebNotificationInternal.h2
-rw-r--r--Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h5
-rw-r--r--Source/WebKit/mac/WebView/WebPreferences.mm61
-rw-r--r--Source/WebKit/mac/WebView/WebPreferencesPrivate.h17
-rw-r--r--Source/WebKit/mac/WebView/WebUIDelegatePrivate.h1
-rw-r--r--Source/WebKit/mac/WebView/WebView.mm120
-rw-r--r--Source/WebKit/mac/WebView/WebViewPrivate.h6
-rw-r--r--Source/WebKit/qt/Api/qwebdatabase_p.h2
-rw-r--r--Source/WebKit/qt/Api/qwebelement.cpp14
-rw-r--r--Source/WebKit/qt/Api/qwebframe.cpp2
-rw-r--r--Source/WebKit/qt/Api/qwebkitplatformplugin.h4
-rw-r--r--Source/WebKit/qt/Api/qwebpage.cpp54
-rw-r--r--Source/WebKit/qt/Api/qwebpage.h4
-rw-r--r--Source/WebKit/qt/Api/qwebscriptworld_p.h2
-rw-r--r--Source/WebKit/qt/Api/qwebsecurityorigin_p.h2
-rw-r--r--Source/WebKit/qt/Api/qwebsettings.cpp2
-rw-r--r--Source/WebKit/qt/ChangeLog752
-rw-r--r--Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h5
-rw-r--r--Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp89
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h62
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp61
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp74
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h59
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp103
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h5
-rw-r--r--Source/WebKit/qt/WebCoreSupport/EditorClientQt.h2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp51
-rw-r--r--Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h22
-rw-r--r--Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp4
-rw-r--r--Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.h2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h4
-rw-r--r--Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp3
-rw-r--r--Source/WebKit/qt/WebCoreSupport/InspectorClientQt.h4
-rw-r--r--Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp88
-rw-r--r--Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h14
-rw-r--r--Source/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QtWebComboBox.h2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp34
-rw-r--r--Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h14
-rw-r--r--Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp115
-rw-r--r--Source/WebKit/qt/WebCoreSupport/WebEventConversion.h6
-rw-r--r--Source/WebKit/qt/declarative/declarative.pro2
-rw-r--r--Source/WebKit/qt/declarative/experimental/experimental.pri12
-rw-r--r--Source/WebKit/qt/declarative/experimental/plugin.cpp4
-rw-r--r--Source/WebKit/qt/declarative/plugin.cpp11
-rw-r--r--Source/WebKit/qt/declarative/public.pri9
-rw-r--r--Source/WebKit/qt/docs/qtwebkit-bridge.qdoc2
-rw-r--r--Source/WebKit/qt/docs/qtwebkit.qdocconf4
-rw-r--r--Source/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp8
-rw-r--r--Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h4
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/MIMESniffing.pro3
-rw-r--r--Source/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp6
-rw-r--r--Source/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp6
-rw-r--r--Source/WebKit/win/AccessibleBase.cpp2
-rw-r--r--Source/WebKit/win/ChangeLog340
-rw-r--r--Source/WebKit/win/FullscreenVideoController.cpp3
-rw-r--r--Source/WebKit/win/Interfaces/IWebFramePrivate.idl2
-rw-r--r--Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl3
-rw-r--r--Source/WebKit/win/MarshallingHelpers.cpp2
-rw-r--r--Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp2
-rw-r--r--Source/WebKit/win/WebCoreSupport/WebChromeClient.h9
-rw-r--r--Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp8
-rw-r--r--Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h9
-rw-r--r--Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp38
-rw-r--r--Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h3
-rw-r--r--Source/WebKit/win/WebCoreSupport/WebGeolocationClient.cpp4
-rw-r--r--Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp4
-rw-r--r--Source/WebKit/win/WebDatabaseManager.cpp2
-rw-r--r--Source/WebKit/win/WebFrame.cpp6
-rw-r--r--Source/WebKit/win/WebFrame.h2
-rw-r--r--Source/WebKit/win/WebGeolocationPosition.cpp8
-rw-r--r--Source/WebKit/win/WebGeolocationPosition.h6
-rw-r--r--Source/WebKit/win/WebInspector.cpp4
-rw-r--r--Source/WebKit/win/WebKit.vcproj/WebKit.sln4
-rw-r--r--Source/WebKit/win/WebKitCOMAPI.cpp7
-rw-r--r--Source/WebKit/win/WebNodeHighlight.cpp12
-rw-r--r--Source/WebKit/win/WebNodeHighlight.h2
-rw-r--r--Source/WebKit/win/WebPreferenceKeysPrivate.h3
-rw-r--r--Source/WebKit/win/WebPreferences.cpp15
-rw-r--r--Source/WebKit/win/WebPreferences.h3
-rw-r--r--Source/WebKit/win/WebView.cpp43
-rw-r--r--Source/WebKit/win/WebView.h6
-rw-r--r--Source/WebKit/wince/ChangeLog93
-rw-r--r--Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp10
-rw-r--r--Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h7
-rw-r--r--Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp19
-rw-r--r--Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h5
-rw-r--r--Source/WebKit/wince/WebView.cpp2
-rw-r--r--Source/WebKit/wince/WebView.h4
-rw-r--r--Source/WebKit/wx/ChangeLog337
-rw-r--r--Source/WebKit/wx/WebBrowserShell.cpp133
-rw-r--r--Source/WebKit/wx/WebBrowserShell.h70
-rw-r--r--Source/WebKit/wx/WebDOMSelection.cpp14
-rw-r--r--Source/WebKit/wx/WebDOMSelection.h16
-rw-r--r--Source/WebKit/wx/WebEdit.cpp12
-rw-r--r--Source/WebKit/wx/WebEdit.h15
-rw-r--r--Source/WebKit/wx/WebFrame.cpp106
-rw-r--r--Source/WebKit/wx/WebFrame.h41
-rw-r--r--Source/WebKit/wx/WebKitSupport/ChromeClientWx.cpp34
-rw-r--r--Source/WebKit/wx/WebKitSupport/ChromeClientWx.h9
-rw-r--r--Source/WebKit/wx/WebKitSupport/EditorClientWx.cpp24
-rw-r--r--Source/WebKit/wx/WebKitSupport/EditorClientWx.h4
-rw-r--r--Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp88
-rw-r--r--Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h26
-rw-r--r--Source/WebKit/wx/WebSettings.cpp48
-rw-r--r--Source/WebKit/wx/WebSettings.h24
-rw-r--r--Source/WebKit/wx/WebView.cpp246
-rw-r--r--Source/WebKit/wx/WebView.h385
-rw-r--r--Source/WebKit/wx/bindings/python/webview.i14
-rw-r--r--Source/WebKit/wx/wscript7
683 files changed, 48614 insertions, 18875 deletions
diff --git a/Source/WebKit/CMakeLists.txt b/Source/WebKit/CMakeLists.txt
index 62f4b3116..394a55562 100644
--- a/Source/WebKit/CMakeLists.txt
+++ b/Source/WebKit/CMakeLists.txt
@@ -50,8 +50,7 @@ SET(WebKit_INCLUDE_DIRECTORIES
"${JAVASCRIPTCORE_DIR}/parser"
"${JAVASCRIPTCORE_DIR}/profiler"
"${JAVASCRIPTCORE_DIR}/runtime"
- "${JAVASCRIPTCORE_DIR}/wtf"
- "${JAVASCRIPTCORE_DIR}/wtf/unicode"
+ "${WTF_DIR}"
"${DERIVED_SOURCES_WEBCORE_DIR}"
"${CMAKE_BINARY_DIR}"
)
@@ -75,6 +74,7 @@ INCLUDE_DIRECTORIES(${WebKit_INCLUDE_DIRECTORIES})
ADD_LIBRARY(${WebKit_LIBRARY_NAME} ${WebKit_LIBRARY_TYPE} ${WebKit_SOURCES})
ADD_DEPENDENCIES(${WebKit_LIBRARY_NAME} ${WebCore_LIBRARY_NAME})
TARGET_LINK_LIBRARIES(${WebKit_LIBRARY_NAME} ${WebKit_LIBRARIES})
+SET_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} PROPERTIES FOLDER "WebKit")
SET_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
IF (WebKit_LINK_FLAGS)
diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog
index 4f1cf58b9..5c7dafc88 100644
--- a/Source/WebKit/ChangeLog
+++ b/Source/WebKit/ChangeLog
@@ -1,3 +1,204 @@
+2012-05-03 Jer Noble <jer.noble@apple.com>
+
+ Move WebKitFullScreenListener into its own file.
+ https://bugs.webkit.org/show_bug.cgi?id=85640
+
+ Reviewed by Maciej Stachowiak .
+
+ Pull WebKitFullScreenListener into its own file.
+
+ * WebKit.xcodeproj/project.pbxproj:
+
+2012-05-03 Raphael Kubo da Costa <rakuco@webkit.org>
+
+ [CMake] Rewrite FindCairo.cmake.
+ https://bugs.webkit.org/show_bug.cgi?id=84895
+
+ Reviewed by Daniel Bates.
+
+ The old approach relied on pkg-config for finding Cairo (which
+ introduced a dependency on pkg-config that could be avoided), used
+ the LibFindMacros code that we should probably remove in the
+ future and did not use the FindPackageHandleStandardArguments
+ module.
+
+ Change all that by rewriting the module.
+ - Use the pkg-config output optionally instead of requiring it
+ like LibFindMacros did.
+ - Remove the implicit dependency on FreeType which often found it
+ the wrong way via pkg-config and without considering
+ CMAKE_PREFIX_PATH.
+ - Retrieve the Cairo version by looking at cairo-version.h instead
+ of relying on pkg-config. It requires some additional code for
+ checking if the desired version has been found, but that will not
+ be needed once we start depending on CMake 2.8.3 or later.
+
+ The only downside is that FPHSA sets <UPPERCASED_NAME>_FOUND
+ instead of <Name>_FOUND, and to keep things consistent
+ Cairo_LIBRARIES and Cairo_INCLUDE_DIRS have become CAIRO_LIBRARIES
+ and CAIRO_INCLUDE_DIRS.
+
+ * PlatformEfl.cmake: Use CAIRO_FOO instead of Cairo_FOO.
+
+2012-04-26 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] Enable VIDEO_TRACK feature
+ https://bugs.webkit.org/show_bug.cgi?id=84830
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Enable VIDEO_TRACK feature by default for EFL port.
+
+ * PlatformEfl.cmake:
+
+2012-04-20 Mike Lattanzio <mlattanzio@rim.com>
+
+ [BlackBerry] Expose WebViewportArguments to WebPageClient
+ https://bugs.webkit.org/show_bug.cgi?id=84471
+
+ Reviewed by Antonio Gomes.
+
+ * PlatformBlackBerry.cmake:
+
+2012-04-20 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [EFL] Add Security Origin API
+ https://bugs.webkit.org/show_bug.cgi?id=84023
+
+ Reviewed by Antonio Gomes.
+
+ * PlatformEfl.cmake:
+
+2012-04-10 Patrick Gansterer <paroga@webkit.org>
+
+ [CMake] Enable USE_FOLDERS property
+ https://bugs.webkit.org/show_bug.cgi?id=83571
+
+ Reviewed by Daniel Bates.
+
+ Setting the FOLDER property on targets gives more structure
+ to the generated Visual Studio solutions.
+ This does not affect other CMake generators.
+
+ * CMakeLists.txt:
+
+2012-04-07 Patrick Gansterer <paroga@webkit.org>
+
+ [CMake] Cleanup WTF include directories
+ https://bugs.webkit.org/show_bug.cgi?id=82716
+
+ Reviewed by Eric Seidel.
+
+ * CMakeLists.txt:
+
+2012-04-07 Rob Buis <rbuis@rim.com>
+
+ [BlackBerry] Add Battery Status API support
+ https://bugs.webkit.org/show_bug.cgi?id=82615
+
+ Reviewed by George Staikos.
+
+ Add BatteryClientBlackBerry.cpp to the build.
+
+ * PlatformBlackBerry.cmake:
+
+2012-04-06 Charles Wei <charles.wei@torchmobile.com.cn>
+
+ [BlackBerry] Build fix to match the latest WebCore change
+ https://bugs.webkit.org/show_bug.cgi?id=83358
+
+ Reviewed by Rob Buis.
+
+ * PlatformBlackBerry.cmake:
+
+2012-04-05 George Staikos <staikos@webkit.org>
+
+ Add the vibration client for BlackBerry.
+ https://bugs.webkit.org/show_bug.cgi?id=83340
+
+ Reviewed by Rob Buis.
+
+ * PlatformBlackBerry.cmake:
+
+2012-04-05 Jia Pu <jpu@apple.com>
+
+ Move correction panel related functions from EditorClient into separated AlternativeTextClient class.
+ https://bugs.webkit.org/show_bug.cgi?id=82970
+
+ Reviewed by Enrica Casucci.
+
+ See WebCore/ChangeLog for details.
+
+ * WebKit.xcodeproj/project.pbxproj:
+
+2012-04-01 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Support the Network Information API
+ https://bugs.webkit.org/show_bug.cgi?id=73528
+
+ Reviewed by Adam Barth.
+
+ * PlatformEfl.cmake: Add dummy NetworkInfoClientEfl.cpp files in order to support network information API.
+
+2012-03-30 Eli Fidler <efidler@rim.com>
+
+ Enable OpenType Sanitizer for BlackBerry port.
+ https://bugs.webkit.org/show_bug.cgi?id=82782
+
+ Reviewed by Eric Seidel.
+
+ * PlatformBlackBerry.cmake: add libots to link
+
+2012-03-22 Raphael Kubo da Costa <rakuco@FreeBSD.org>
+
+ [CMake] Unreviewed build fix after r111778.
+
+ * CMakeLists.txt: Replace ${JAVASCRIPTCORE_DIR}/wtf includes with
+ ${WTF_DIR}/wtf ones.
+
+2012-03-22 Hyowon Kim <hw1008.kim@samsung.com>
+
+ [EFL] Add PageClientEfl to WebCoreSupport.
+ https://bugs.webkit.org/show_bug.cgi?id=80748
+
+ Reviewed by Noam Rosenthal.
+
+ * PlatformEfl.cmake: Add WebCore/platform/graphics/efl to the include path
+ and PageClientEfl.cpp to the source list.
+
+2012-03-20 Eric Seidel <eric@webkit.org>
+
+ Move wtf/Platform.h from JavaScriptCore to Source/WTF/wtf
+ https://bugs.webkit.org/show_bug.cgi?id=80911
+
+ Reviewed by Adam Barth.
+
+ * CMakeLists.txt: Look for headers in Source/WTF.
+
+2012-03-20 Charles Wei <charles.wei@torchmobile.com.cn>
+
+ [BlackBerry] Remove OutOfMemoryHandler from the build system
+ https://bugs.webkit.org/show_bug.cgi?id=81649
+
+ Remove OutOfMemoryHandler, and change GLES2Context to WebKitSupport,
+ in the build system for BlackBerry porting.
+
+ Reviewed by Rob Buis.
+
+ * PlatformBlackBerry.cmake:
+
+2012-03-16 Kihong Kwon <kihong.kwon@samsung.com>
+
+ Support for Battery Status API
+ https://bugs.webkit.org/show_bug.cgi?id=62698
+
+ Add include directory and file.
+ http://www.w3.org/TR/battery-status/
+
+ Reviewed by Adam Barth.
+
+ * PlatformEfl.cmake:
+
2012-03-11 Timothy Hatcher <timothy@apple.com>
Update how the Web Inspector resources are loaded.
diff --git a/Source/WebKit/PlatformBlackBerry.cmake b/Source/WebKit/PlatformBlackBerry.cmake
index b0d07546a..fcff9cb67 100644
--- a/Source/WebKit/PlatformBlackBerry.cmake
+++ b/Source/WebKit/PlatformBlackBerry.cmake
@@ -16,7 +16,9 @@ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}/platform/graphics/blackberry/skia"
"${WEBCORE_DIR}/platform/graphics/skia"
"${WEBCORE_DIR}/platform/network/blackberry"
- "${WEBCORE_DIR}/websockets"
+ "${WEBCORE_DIR}/Modules/websockets"
+ "${WEBCORE_DIR}/Modules/geolocation"
+ "${WEBCORE_DIR}/Modules/vibration"
"${WEBKIT_DIR}/blackberry/Api"
"${WEBKIT_DIR}/blackberry/WebCoreSupport"
"${WEBKIT_DIR}/blackberry/WebKitSupport"
@@ -35,6 +37,11 @@ IF (ENABLE_DRT)
)
ENDIF ()
+IF (ENABLE_BATTERY_STATUS)
+ LIST(APPEND WebKit_INCLUDE_DIRECTORIES ${WEBCORE_DIR}/Modules/battery)
+ LIST(APPEND WebKit_SOURCES blackberry/WebCoreSupport/BatteryClientBlackBerry.cpp)
+ENDIF ()
+
ADD_DEFINITIONS(-DUSER_PROCESSES)
LIST(APPEND WebKit_SOURCES
@@ -44,8 +51,10 @@ LIST(APPEND WebKit_SOURCES
blackberry/Api/WebKitMIMETypeConverter.cpp
blackberry/Api/WebKitTextCodec.cpp
blackberry/Api/WebPage.cpp
+ blackberry/Api/WebPageCompositor.cpp
blackberry/Api/WebPageGroupLoadDeferrer.cpp
blackberry/Api/WebSettings.cpp
+ blackberry/Api/WebViewportArguments.cpp
blackberry/WebCoreSupport/AboutData.cpp
blackberry/WebCoreSupport/CacheClientBlackBerry.cpp
blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
@@ -64,6 +73,7 @@ LIST(APPEND WebKit_SOURCES
blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp
blackberry/WebCoreSupport/JavaScriptDebuggerBlackBerry.cpp
blackberry/WebCoreSupport/NotificationPresenterImpl.cpp
+ blackberry/WebCoreSupport/VibrationClientBlackBerry.cpp
blackberry/WebKitSupport/BackingStoreCompositingSurface.cpp
blackberry/WebKitSupport/BackingStoreTile.cpp
blackberry/WebKitSupport/BackingStoreClient.cpp
@@ -71,13 +81,11 @@ LIST(APPEND WebKit_SOURCES
blackberry/WebKitSupport/FrameLayers.cpp
blackberry/WebKitSupport/InPageSearchManager.cpp
blackberry/WebKitSupport/InputHandler.cpp
- blackberry/WebKitSupport/OutOfMemoryHandler.cpp
blackberry/WebKitSupport/RenderQueue.cpp
blackberry/WebKitSupport/SelectionHandler.cpp
blackberry/WebKitSupport/SurfacePool.cpp
blackberry/WebKitSupport/TouchEventHandler.cpp
blackberry/WebKitSupport/FatFingers.cpp
- blackberry/WebKitSupport/WebPageCompositor.cpp
)
IF (ENABLE_DRT)
@@ -125,6 +133,7 @@ LIST(APPEND WebKit_LIBRARIES
${MMR_LIBRARY}
${M_LIBRARY}
${NBUTIL_LIBRARY}
+ ${OTS_LIBRARY}
${PNG_LIBRARY}
${PPSCache_LIBRARY}
${SQLITE3_LIBRARY}
@@ -149,7 +158,7 @@ ENDIF ()
IF (WTF_USE_ACCELERATED_COMPOSITING)
LIST(APPEND WebKit_SOURCES
- blackberry/WebCoreSupport/GLES2Context.cpp
+ blackberry/WebKitSupport/GLES2Context.cpp
)
LIST(APPEND WebKit_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}/platform/graphics/gles2"
diff --git a/Source/WebKit/PlatformEfl.cmake b/Source/WebKit/PlatformEfl.cmake
index 1debe3684..c4d20cc70 100644
--- a/Source/WebKit/PlatformEfl.cmake
+++ b/Source/WebKit/PlatformEfl.cmake
@@ -13,7 +13,8 @@ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
"${JAVASCRIPTCORE_DIR}/wtf/gobject"
"${WEBCORE_DIR}/platform/efl"
"${WEBCORE_DIR}/platform/graphics/cairo"
- ${Cairo_INCLUDE_DIRS}
+ "${WEBCORE_DIR}/platform/graphics/efl"
+ ${CAIRO_INCLUDE_DIRS}
${ECORE_X_INCLUDE_DIRS}
${EDJE_INCLUDE_DIRS}
${EFLDEPS_INCLUDE_DIRS}
@@ -43,6 +44,12 @@ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
)
ENDIF()
+IF (ENABLE_VIDEO_TRACK)
+ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+ "${WEBCORE_DIR}/html/track"
+ )
+ENDIF ()
+
IF (WTF_USE_FREETYPE)
LIST(APPEND WebKit_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}/platform/graphics/freetype"
@@ -59,6 +66,15 @@ IF (WTF_USE_PANGO)
)
ENDIF ()
+IF (ENABLE_NETWORK_INFO)
+ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+ "${WEBCORE_DIR}/Modules/networkinfo"
+ )
+ LIST(APPEND WebKit_SOURCES
+ efl/WebCoreSupport/NetworkInfoClientEfl.cpp
+ )
+ENDIF ()
+
IF (ENABLE_NOTIFICATIONS)
LIST(APPEND WebKit_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}/notifications"
@@ -80,6 +96,7 @@ LIST(APPEND WebKit_SOURCES
efl/WebCoreSupport/StorageTrackerClientEfl.cpp
efl/WebCoreSupport/InspectorClientEfl.cpp
efl/WebCoreSupport/NotificationPresenterClientEfl.cpp
+ efl/WebCoreSupport/PageClientEfl.cpp
efl/ewk/ewk_auth.cpp
efl/ewk/ewk_auth_soup.cpp
@@ -90,6 +107,7 @@ LIST(APPEND WebKit_SOURCES
efl/ewk/ewk_js.cpp
efl/ewk/ewk_main.cpp
efl/ewk/ewk_network.cpp
+ efl/ewk/ewk_security_origin.cpp
efl/ewk/ewk_security_policy.cpp
efl/ewk/ewk_settings.cpp
efl/ewk/ewk_tiled_backing_store.cpp
@@ -103,7 +121,7 @@ LIST(APPEND WebKit_SOURCES
)
LIST(APPEND WebKit_LIBRARIES
- ${Cairo_LIBRARIES}
+ ${CAIRO_LIBRARIES}
${ECORE_X_LIBRARIES}
${EFLDEPS_LIBRARIES}
${FREETYPE_LIBRARIES}
@@ -126,6 +144,10 @@ IF (ENABLE_VIBRATION)
)
ENDIF ()
+IF (ENABLE_BATTERY_STATUS)
+ LIST(APPEND WebKit_INCLUDE_DIRECTORIES ${WEBCORE_DIR}/Modules/battery)
+ LIST(APPEND WebKit_SOURCES efl/WebCoreSupport/BatteryClientEfl.cpp)
+ENDIF ()
SET(WebKit_THEME_DEFINITION "")
IF (ENABLE_PROGRESS_TAG)
@@ -237,6 +259,7 @@ SET(EWebKit_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_logging.h
${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_main.h
${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_network.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_security_origin.h
${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_security_policy.h
${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_settings.h
${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_view.h
diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj
index c8de755b6..25e00409a 100644
--- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj
@@ -367,9 +367,13 @@
C0B88E8B10A08F3D00FBB3F5 /* WebFrameLoadDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = C0B88E8A10A08F3D00FBB3F5 /* WebFrameLoadDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
C0C5B3EE1177A4A0002B0AEF /* WebUserContentURLPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = C0C5B3EC1177A4A0002B0AEF /* WebUserContentURLPattern.h */; settings = {ATTRIBUTES = (Private, ); }; };
C0C5B3EF1177A4A0002B0AEF /* WebUserContentURLPattern.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0C5B3ED1177A4A0002B0AEF /* WebUserContentURLPattern.mm */; };
+ CD8BFCE715531224005AFB25 /* WebKitFullScreenListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD8BFCE515531224005AFB25 /* WebKitFullScreenListener.mm */; };
+ CD8BFCE815531224005AFB25 /* WebKitFullScreenListener.h in Headers */ = {isa = PBXBuildFile; fileRef = CD8BFCE615531224005AFB25 /* WebKitFullScreenListener.h */; };
CD8EAC7311CAC9A300774075 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD8EAC7211CAC9A300774075 /* IOKit.framework */; };
CDA62AE2125F87C2007FD118 /* WebFullScreenController.h in Headers */ = {isa = PBXBuildFile; fileRef = CDA62AE0125F87C2007FD118 /* WebFullScreenController.h */; };
CDA62AE3125F87C2007FD118 /* WebFullScreenController.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDA62AE1125F87C2007FD118 /* WebFullScreenController.mm */; };
+ CEDA12DB152CBE6800D9E08D /* WebAlternativeTextClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = CEDA12D9152CBE6800D9E08D /* WebAlternativeTextClient.mm */; };
+ CEDA12DC152CBE6800D9E08D /* WebAlternativeTextClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CEDA12DA152CBE6800D9E08D /* WebAlternativeTextClient.h */; };
DD7CDEE70A23BA9E00069928 /* WebTypesInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = DD7CDEE60A23BA9E00069928 /* WebTypesInternal.h */; };
DD89682009AA87240097E7F0 /* WebElementDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = DD89681E09AA87240097E7F0 /* WebElementDictionary.h */; };
DD89682109AA87240097E7F0 /* WebElementDictionary.mm in Sources */ = {isa = PBXBuildFile; fileRef = DD89681F09AA87240097E7F0 /* WebElementDictionary.mm */; };
@@ -696,9 +700,13 @@
C0B88E8A10A08F3D00FBB3F5 /* WebFrameLoadDelegatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebFrameLoadDelegatePrivate.h; sourceTree = "<group>"; };
C0C5B3EC1177A4A0002B0AEF /* WebUserContentURLPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebUserContentURLPattern.h; sourceTree = "<group>"; };
C0C5B3ED1177A4A0002B0AEF /* WebUserContentURLPattern.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebUserContentURLPattern.mm; sourceTree = "<group>"; };
+ CD8BFCE515531224005AFB25 /* WebKitFullScreenListener.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebKitFullScreenListener.mm; sourceTree = "<group>"; };
+ CD8BFCE615531224005AFB25 /* WebKitFullScreenListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitFullScreenListener.h; sourceTree = "<group>"; };
CD8EAC7211CAC9A300774075 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
CDA62AE0125F87C2007FD118 /* WebFullScreenController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebFullScreenController.h; sourceTree = "<group>"; };
CDA62AE1125F87C2007FD118 /* WebFullScreenController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebFullScreenController.mm; sourceTree = "<group>"; };
+ CEDA12D9152CBE6800D9E08D /* WebAlternativeTextClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebAlternativeTextClient.mm; sourceTree = "<group>"; };
+ CEDA12DA152CBE6800D9E08D /* WebAlternativeTextClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAlternativeTextClient.h; sourceTree = "<group>"; };
DD7CDEE60A23BA9E00069928 /* WebTypesInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebTypesInternal.h; sourceTree = "<group>"; };
DD89681E09AA87240097E7F0 /* WebElementDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebElementDictionary.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
DD89681F09AA87240097E7F0 /* WebElementDictionary.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebElementDictionary.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
@@ -1294,6 +1302,8 @@
children = (
B82958D1132707D0000D0E79 /* CorrectionPanel.h */,
B82958D2132707D0000D0E79 /* CorrectionPanel.mm */,
+ CEDA12D9152CBE6800D9E08D /* WebAlternativeTextClient.mm */,
+ CEDA12DA152CBE6800D9E08D /* WebAlternativeTextClient.h */,
B68049710FFBCEC1009F7F62 /* WebApplicationCache.h */,
B68049720FFBCEC1009F7F62 /* WebApplicationCache.mm */,
A5DEFC1111D5344B00885273 /* WebApplicationCacheQuotaManager.h */,
@@ -1313,6 +1323,8 @@
931633EE0AEDFFAE0062B92D /* WebFrameLoaderClient.mm */,
9391F273121B38BD00EBF7E8 /* WebFrameNetworkingContext.h */,
9391F274121B38BD00EBF7E8 /* WebFrameNetworkingContext.mm */,
+ CD8BFCE515531224005AFB25 /* WebKitFullScreenListener.mm */,
+ CD8BFCE615531224005AFB25 /* WebKitFullScreenListener.h */,
BC7F884910C8775A00D6133D /* WebGeolocationClient.h */,
BC7F884A10C8775A00D6133D /* WebGeolocationClient.mm */,
51494CD40C7EBDE0004178C5 /* WebIconDatabaseClient.h */,
@@ -1643,6 +1655,8 @@
41F4484F10338E8C0030E55E /* WebWorkersPrivate.h in Headers */,
312E2FE514E48182007CCA18 /* WebNotification.h in Headers */,
312E2FE914E48215007CCA18 /* WebNotificationInternal.h in Headers */,
+ CEDA12DC152CBE6800D9E08D /* WebAlternativeTextClient.h in Headers */,
+ CD8BFCE815531224005AFB25 /* WebKitFullScreenListener.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2030,6 +2044,8 @@
BC2E464E0FD8A96800A9D9DE /* WebViewData.mm in Sources */,
41F4485010338E8C0030E55E /* WebWorkersPrivate.mm in Sources */,
312E2FE614E48182007CCA18 /* WebNotification.mm in Sources */,
+ CEDA12DB152CBE6800D9E08D /* WebAlternativeTextClient.mm in Sources */,
+ CD8BFCE715531224005AFB25 /* WebKitFullScreenListener.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Source/WebKit/blackberry/Api/ActiveNodeContext.h b/Source/WebKit/blackberry/Api/ActiveNodeContext.h
deleted file mode 100644
index 1258d259f..000000000
--- a/Source/WebKit/blackberry/Api/ActiveNodeContext.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2010, 2011, 2012 Research In Motion Limited. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef ActiveNodeContext_h
-#define ActiveNodeContext_h
-
-#include "WebString.h"
-
-namespace BlackBerry {
-namespace WebKit {
-
-class ActiveNodeContext {
-public:
- // We assume a default context should be selectable, but nothing else.
- ActiveNodeContext()
- : m_flags(IsSelectable)
- {
- }
-
- enum ContextFlags { IsFocusable = 0x01,
- IsInput = 0x02,
- IsPassword = 0x04,
- IsSelectable = 0x08,
- IsSingleLine = 0x10, };
-
- bool isFocusable() const { return m_flags & IsFocusable; }
- bool isInput() const { return m_flags & IsInput; }
- bool isPassword() const { return m_flags & IsPassword; }
- bool isSelectable() const { return m_flags & IsSelectable; }
- bool isSingleLine() const { return m_flags & IsSingleLine; }
-
- void setFlag(ContextFlags flag) { m_flags |= flag; }
- void resetFlag(ContextFlags flag) { m_flags &= ~flag; }
-
- const WebString& imageAlt() const { return m_imageAlt; }
- void setImageAlt(const WebString& string) { m_imageAlt = string; }
-
- const WebString& imageSrc() const { return m_imageSrc; }
- void setImageSrc(const WebString& string) { m_imageSrc = string; }
-
- const WebString& pattern() const { return m_pattern; }
- void setPattern(const WebString& string) { m_pattern = string; }
-
- const WebString& text() const { return m_text; }
- void setText(const WebString& string) { m_text = string; }
-
- const WebString& url() const { return m_url; }
- void setUrl(const WebString& string) { m_url = string; }
-
-private:
- unsigned m_flags;
- WebString m_imageAlt;
- WebString m_imageSrc;
- WebString m_pattern;
- WebString m_text;
- WebString m_url;
-};
-
-}
-}
-#endif // ActiveNodeContext_h
diff --git a/Source/WebKit/blackberry/Api/BackingStore.cpp b/Source/WebKit/blackberry/Api/BackingStore.cpp
index 0df6137c6..eeda7dd8a 100644
--- a/Source/WebKit/blackberry/Api/BackingStore.cpp
+++ b/Source/WebKit/blackberry/Api/BackingStore.cpp
@@ -32,15 +32,24 @@
#include "SurfacePool.h"
#include "WebPage.h"
#include "WebPageClient.h"
+#include "WebPageCompositorClient.h"
+#include "WebPageCompositor_p.h"
#include "WebPage_p.h"
#include "WebSettings.h"
+#include <BlackBerryPlatformClient.h>
#include <BlackBerryPlatformExecutableMessage.h>
+#include <BlackBerryPlatformGraphics.h>
#include <BlackBerryPlatformIntRectRegion.h>
+#include <BlackBerryPlatformLog.h>
#include <BlackBerryPlatformMessage.h>
#include <BlackBerryPlatformMessageClient.h>
+#include <BlackBerryPlatformScreen.h>
+#include <BlackBerryPlatformSettings.h>
#include <BlackBerryPlatformWindow.h>
+#include <SkImageDecoder.h>
+
#include <wtf/CurrentTime.h>
#include <wtf/MathExtras.h>
#include <wtf/NotFound.h>
@@ -55,11 +64,10 @@
#define DEBUG_TILEMATRIX 0
#define DEBUG_COMPOSITING_DIRTY_REGION 0
-#include <BlackBerryPlatformScreen.h>
-
using namespace WebCore;
using namespace std;
+using BlackBerry::Platform::Graphics::Window;
using BlackBerry::Platform::IntRect;
using BlackBerry::Platform::IntPoint;
using BlackBerry::Platform::IntSize;
@@ -69,6 +77,8 @@ namespace WebKit {
const int s_renderTimerTimeout = 1.0;
WebPage* BackingStorePrivate::s_currentBackingStoreOwner = 0;
+Platform::Graphics::Buffer* BackingStorePrivate::s_overScrollImage = 0;
+std::string BackingStorePrivate::s_overScrollImagePath;
typedef std::pair<int, int> Divisor;
typedef Vector<Divisor> DivisorList;
@@ -239,15 +249,36 @@ BackingStorePrivate::~BackingStorePrivate()
bool BackingStorePrivate::shouldDirectRenderingToWindow() const
{
- if (m_webPage->settings()->isDirectRenderingToWindowEnabled() || !isActive())
+ // Direct rendering doesn't work with OpenGL compositing code paths due to
+ // a race condition on which thread's EGL context gets to make the surface
+ // current, see PR 105750.
+ // As a workaround, we will be using compositor to draw the root layer.
+ if (isOpenGLCompositing())
+ return false;
+
+ if (m_webPage->settings()->isDirectRenderingToWindowEnabled())
return true;
+ // If the BackingStore is inactive, see if there's a compositor to do the
+ // work of rendering the root layer.
+ if (!isActive())
+ return !m_webPage->d->compositorDrawsRootLayer();
+
const BackingStoreGeometry* currentState = frontState();
const unsigned tilesNecessary = minimumNumberOfTilesWide() * minimumNumberOfTilesHigh();
const unsigned tilesAvailable = currentState->numberOfTilesWide() * currentState->numberOfTilesHigh();
return tilesAvailable < tilesNecessary;
}
+bool BackingStorePrivate::isOpenGLCompositing() const
+{
+ if (Window* window = m_webPage->client()->window())
+ return window->windowUsage() == Window::GLES2Usage;
+
+ // If there's no window, OpenGL rendering is currently the only option.
+ return true;
+}
+
void BackingStorePrivate::suspendScreenAndBackingStoreUpdates()
{
m_suspendBackingStoreUpdates = true;
@@ -990,7 +1021,7 @@ bool BackingStorePrivate::render(const Platform::IntRect& rect)
m_suspendBackingStoreUpdates ? "true" : "false");
#endif
- bool blittingDirectlyToCompositingWindow = m_webPage->d->m_client->window()->windowUsage() == BlackBerry::Platform::Graphics::Window::GLES2Usage;
+ bool blittingDirectlyToCompositingWindow = isOpenGLCompositing();
BackingStoreGeometry* currentState = frontState();
TileMap currentMap = currentState->tileMap();
@@ -1122,7 +1153,7 @@ void BackingStorePrivate::blitVisibleContents(bool force)
if (!BlackBerry::Platform::userInterfaceThreadMessageClient()->isCurrentThread()) {
#if USE(ACCELERATED_COMPOSITING)
- // The blit will call drawSubLayers if necessary
+ // The blit will draw accelerated compositing layers if necessary
m_needsDrawLayersOnCommit = false;
#endif
@@ -1145,7 +1176,8 @@ void BackingStorePrivate::copyPreviousContentsToBackSurfaceOfWindow()
if (previousContentsRegion.isEmpty())
return;
- m_webPage->client()->window()->copyFromFrontToBack(previousContentsRegion);
+ if (Window* window = m_webPage->client()->window())
+ window->copyFromFrontToBack(previousContentsRegion);
windowBackBufferState()->addBlittedRegion(previousContentsRegion);
}
@@ -1166,6 +1198,57 @@ void BackingStorePrivate::copyPreviousContentsToBackSurfaceOfTile(const Platform
}
}
+bool BackingStorePrivate::ensureOverScrollImage()
+{
+ std::string path = m_webPage->settings()->overScrollImagePath().utf8();
+ if (path == "")
+ return false;
+
+ if (s_overScrollImage && path == s_overScrollImagePath)
+ return true;
+
+ std::string imagePath = Platform::Client::get()->getApplicationDirectory() + path;
+
+ SkBitmap bitmap;
+
+ if (!SkImageDecoder::DecodeFile(imagePath.c_str(), &bitmap)) {
+ BlackBerry::Platform::log(BlackBerry::Platform::LogLevelCritical,
+ "BackingStorePrivate::ensureOverScrollImage could not decode overscroll image: %s", imagePath.c_str());
+ return false;
+ }
+
+ // FIXME: Make it orientation and resolution agnostic
+ if (bitmap.width() != surfaceSize().width() || bitmap.height() != surfaceSize().height())
+ return false;
+
+ // FIXME: For now we fallback to solid color if sizes don't match, later we can implement tiling
+ s_overScrollImage = createBuffer(Platform::IntSize(bitmap.width(), bitmap.height()), Platform::Graphics::TemporaryBuffer);
+
+ SkCanvas* canvas = Platform::Graphics::lockBufferDrawable(s_overScrollImage);
+
+ if (!canvas) {
+ destroyBuffer(s_overScrollImage);
+ s_overScrollImage = 0;
+ return false;
+ }
+ SkPaint paint;
+ paint.setXfermodeMode(SkXfermode::kSrc_Mode);
+ paint.setFlags(SkPaint::kAntiAlias_Flag);
+ paint.setFilterBitmap(true);
+
+ SkRect rect = SkRect::MakeXYWH(0, 0, bitmap.width(), bitmap.height());
+
+ canvas->save();
+ canvas->drawBitmapRect(bitmap, 0, rect, &paint);
+ canvas->restore();
+
+ Platform::Graphics::releaseBufferDrawable(s_overScrollImage);
+
+ s_overScrollImagePath = path;
+
+ return true;
+}
+
void BackingStorePrivate::paintDefaultBackground(const Platform::IntRect& contents,
const WebCore::TransformationMatrix& transformation,
bool flush)
@@ -1174,6 +1257,7 @@ void BackingStorePrivate::paintDefaultBackground(const Platform::IntRect& conten
Platform::IntPoint origin = contents.location();
Platform::IntRect contentsClipped = contents;
+
// We have to paint the default background in the case of overzoom and
// make sure it is invalidated.
Color color(m_webPage->settings()->overZoomColor());
@@ -1191,10 +1275,13 @@ void BackingStorePrivate::paintDefaultBackground(const Platform::IntRect& conten
// Because of rounding it is possible that overScrollRect could be off-by-one larger
// than the surface size of the window. We prevent this here, by clamping
// it to ensure that can't happen.
- overScrollRect.intersect(Platform::IntRect(Platform::IntPoint(0, 0), m_webPage->client()->window()->surfaceSize()));
+ overScrollRect.intersect(Platform::IntRect(Platform::IntPoint(0, 0), surfaceSize()));
}
- clearWindow(overScrollRect, color.red(), color.green(), color.blue(), color.alpha());
+ if (ensureOverScrollImage())
+ blitToWindow(overScrollRect, s_overScrollImage, overScrollRect, false, 255);
+ else
+ clearWindow(overScrollRect, color.red(), color.green(), color.blue(), color.alpha());
}
}
@@ -1208,7 +1295,7 @@ void BackingStorePrivate::blitContents(const Platform::IntRect& dstRect,
if (shouldDirectRenderingToWindow())
return;
- if (!m_webPage->isVisible() || m_suspendScreenUpdates || !isActive()) {
+ if (!m_webPage->isVisible() || m_suspendScreenUpdates) {
// Avoid client going into busy loop while blit is impossible.
if (force)
m_hasBlitJobs = false;
@@ -1217,7 +1304,7 @@ void BackingStorePrivate::blitContents(const Platform::IntRect& dstRect,
if (!BlackBerry::Platform::userInterfaceThreadMessageClient()->isCurrentThread()) {
#if USE(ACCELERATED_COMPOSITING)
- // The blit will call drawSubLayers if necessary
+ // The blit will draw accelerated compositing layers if necessary
m_needsDrawLayersOnCommit = false;
#endif
@@ -1228,13 +1315,22 @@ void BackingStorePrivate::blitContents(const Platform::IntRect& dstRect,
}
if (m_defersBlit && !force) {
+#if USE(ACCELERATED_COMPOSITING)
+ // If there's a WebPageCompositorClient, let it schedule the blit.
+ if (WebPageCompositorPrivate* compositor = m_webPage->d->compositor()) {
+ if (WebPageCompositorClient* client = compositor->client()) {
+ client->invalidate(0);
+ return;
+ }
+ }
+#endif
+
m_hasBlitJobs = true;
return;
}
m_hasBlitJobs = false;
- BackingStoreGeometry* currentState = frontState();
const Platform::IntRect contentsRect = Platform::IntRect(Platform::IntPoint(0, 0), m_client->transformedContentsSize());
#if DEBUG_VISUALIZE
@@ -1243,7 +1339,7 @@ void BackingStorePrivate::blitContents(const Platform::IntRect& dstRect,
// can visualize the entire backingstore and what it is doing when we
// scroll and zoom!
// FIXME: This should not explicitely depend on WebCore::.
- WebCore::IntRect debugRect = currentState->backingStoreRect();
+ WebCore::IntRect debugRect = frontState()->backingStoreRect();
debugRect.unite(m_webPage->client()->userInterfaceBlittedVisibleContentsRect());
if (debugRect.width() < debugRect.height())
debugRect.setWidth(ceil(double(srcRect.width()) * (double(debugRect.height()) / srcRect.height())));
@@ -1259,15 +1355,6 @@ void BackingStorePrivate::blitContents(const Platform::IntRect& dstRect,
if (!contents.isEmpty())
transformation = TransformationMatrix::rectToRect(FloatRect(FloatPoint(0.0, 0.0), WebCore::IntSize(contents.size())), WebCore::IntRect(dstRect));
- bool blittingDirectlyToCompositingWindow = m_webPage->d->m_client->window()->windowUsage() == BlackBerry::Platform::Graphics::Window::GLES2Usage;
-#if USE(ACCELERATED_COMPOSITING)
- BackingStoreCompositingSurface* compositingSurface =
- SurfacePool::globalSurfacePool()->compositingSurface();
-
- if (!blittingDirectlyToCompositingWindow)
- drawSubLayers();
-#endif
-
#if DEBUG_BACKINGSTORE
BlackBerry::Platform::log(BlackBerry::Platform::LogLevelCritical,
"BackingStorePrivate::blitContents dstRect=(%d,%d %dx%d) srcRect=(%d,%d %dx%d)",
@@ -1278,165 +1365,172 @@ void BackingStorePrivate::blitContents(const Platform::IntRect& dstRect,
Platform::IntPoint origin = contents.location();
Platform::IntRect contentsClipped = contents;
- paintDefaultBackground(contents, transformation, false /*flush*/);
+ Vector<TileBuffer*> blittedTiles;
- TileMap currentMap = currentState->tileMap();
+ if (isActive() && !m_webPage->d->compositorDrawsRootLayer()) {
+ paintDefaultBackground(contents, transformation, false /*flush*/);
+
+ BackingStoreGeometry* currentState = frontState();
+ TileMap currentMap = currentState->tileMap();
#if DEBUG_CHECKERBOARD
- bool blitCheckered = false;
+ bool blitCheckered = false;
#endif
- // Don't clip to contents if it is empty so we can still paint default background.
- if (!contentsRect.isEmpty()) {
- contentsClipped.intersect(contentsRect);
- if (contentsClipped.isEmpty()) {
- invalidateWindow(dstRect);
- return;
- }
+ // Don't clip to contents if it is empty so we can still paint default background.
+ if (!contentsRect.isEmpty()) {
+ contentsClipped.intersect(contentsRect);
+ if (contentsClipped.isEmpty()) {
+ invalidateWindow(dstRect);
+ return;
+ }
- Platform::IntRectRegion contentsRegion = contentsClipped;
- Platform::IntRectRegion backingStoreRegion = currentState->backingStoreRect();
- Platform::IntRectRegion checkeredRegion
- = Platform::IntRectRegion::subtractRegions(contentsRegion, backingStoreRegion);
-
- // Blit checkered to those parts that are not covered by the backingStoreRect.
- IntRectList checkeredRects = checkeredRegion.rects();
- for (size_t i = 0; i < checkeredRects.size(); ++i) {
- Platform::IntRect dstRect = transformation.mapRect(Platform::IntRect(
- Platform::IntPoint(checkeredRects.at(i).x() - origin.x(), checkeredRects.at(i).y() - origin.y()),
- checkeredRects.at(i).size()));
+ Platform::IntRectRegion contentsRegion = contentsClipped;
+ Platform::IntRectRegion backingStoreRegion = currentState->backingStoreRect();
+ Platform::IntRectRegion checkeredRegion
+ = Platform::IntRectRegion::subtractRegions(contentsRegion, backingStoreRegion);
+
+ // Blit checkered to those parts that are not covered by the backingStoreRect.
+ IntRectList checkeredRects = checkeredRegion.rects();
+ for (size_t i = 0; i < checkeredRects.size(); ++i) {
+ Platform::IntRect dstRect = transformation.mapRect(Platform::IntRect(
+ Platform::IntPoint(checkeredRects.at(i).x() - origin.x(), checkeredRects.at(i).y() - origin.y()),
+ checkeredRects.at(i).size()));
#if DEBUG_CHECKERBOARD
- blitCheckered = true;
+ blitCheckered = true;
#endif
- checkerWindow(dstRect, checkeredRects.at(i).location(), transformation.a());
+ checkerWindow(dstRect, checkeredRects.at(i).location(), transformation.a());
+ }
}
- }
- Vector<TileBuffer*> blittedTiles;
+ // Get the list of tile rects that makeup the content.
+ TileRectList tileRectList = mapFromTransformedContentsToTiles(contentsClipped, currentState);
+ for (size_t i = 0; i < tileRectList.size(); ++i) {
+ TileRect tileRect = tileRectList[i];
+ TileIndex index = tileRect.first;
+ Platform::IntRect dirtyTileRect = tileRect.second;
+ BackingStoreTile* tile = currentMap.get(index);
+ TileBuffer* tileBuffer = tile->frontBuffer();
- // Get the list of tile rects that makeup the content.
- TileRectList tileRectList = mapFromTransformedContentsToTiles(contentsClipped, currentState);
- for (size_t i = 0; i < tileRectList.size(); ++i) {
- TileRect tileRect = tileRectList[i];
- TileIndex index = tileRect.first;
- Platform::IntRect dirtyTileRect = tileRect.second;
- BackingStoreTile* tile = currentMap.get(index);
- TileBuffer* tileBuffer = tile->frontBuffer();
+ // This dirty rect is in tile coordinates, but it needs to be in
+ // transformed contents coordinates.
+ Platform::IntRect dirtyRect
+ = mapFromTilesToTransformedContents(tileRect, currentState->backingStoreRect());
- // This dirty rect is in tile coordinates, but it needs to be in
- // transformed contents coordinates.
- Platform::IntRect dirtyRect
- = mapFromTilesToTransformedContents(tileRect, currentState->backingStoreRect());
+ // Don't clip to contents if it is empty so we can still paint default background.
+ if (!contentsRect.isEmpty()) {
+ // Otherwise we should clip the contents size and blit.
+ dirtyRect.intersect(contentsRect);
- // Don't clip to contents if it is empty so we can still paint default background.
- if (!contentsRect.isEmpty()) {
- // Otherwise we should clip the contents size and blit.
- dirtyRect.intersect(contentsRect);
+ // We probably have extra tiles since the contents size is so small.
+ // Save some cycles here...
+ if (dirtyRect.isEmpty())
+ continue;
+ }
+
+ // Now, this dirty rect is in transformed coordinates relative to the
+ // transformed contents, but ultimately it needs to be transformed
+ // coordinates relative to the viewport.
+ dirtyRect.move(-origin.x(), -origin.y());
- // We probably have extra tiles since the contents size is so small.
// Save some cycles here...
- if (dirtyRect.isEmpty())
+ if (dirtyRect.isEmpty() || dirtyTileRect.isEmpty())
continue;
- }
-
- // Now, this dirty rect is in transformed coordinates relative to the
- // transformed contents, but ultimately it needs to be transformed
- // coordinates relative to the viewport.
- dirtyRect.move(-origin.x(), -origin.y());
- // Save some cycles here...
- if (dirtyRect.isEmpty() || dirtyTileRect.isEmpty())
- continue;
+ TileRect wholeTileRect;
+ wholeTileRect.first = index;
+ wholeTileRect.second = this->tileRect();
- TileRect wholeTileRect;
- wholeTileRect.first = index;
- wholeTileRect.second = this->tileRect();
+ bool committed = tile->isCommitted();
+ bool rendered = tileBuffer->isRendered(dirtyTileRect);
+ bool paintCheckered = !committed || !rendered;
- bool committed = tile->isCommitted();
- bool rendered = tileBuffer->isRendered(dirtyTileRect);
- bool paintCheckered = !committed || !rendered;
-
- if (paintCheckered) {
- Platform::IntRect dirtyRectT = transformation.mapRect(dirtyRect);
+ if (paintCheckered) {
+ Platform::IntRect dirtyRectT = transformation.mapRect(dirtyRect);
- if (!transformation.isIdentity()) {
- // Because of rounding it is possible that dirtyRect could be off-by-one larger
- // than the surface size of the dst buffer. We prevent this here, by clamping
- // it to ensure that can't happen.
- dirtyRectT.intersect(Platform::IntRect(Platform::IntPoint(0, 0), m_webPage->client()->window()->surfaceSize()));
- }
- const Platform::IntPoint contentsOrigin(dirtyRect.x() + origin.x(), dirtyRect.y() + origin.y());
+ if (!transformation.isIdentity()) {
+ // Because of rounding it is possible that dirtyRect could be off-by-one larger
+ // than the surface size of the dst buffer. We prevent this here, by clamping
+ // it to ensure that can't happen.
+ dirtyRectT.intersect(Platform::IntRect(Platform::IntPoint(0, 0), surfaceSize()));
+ }
+ const Platform::IntPoint contentsOrigin(dirtyRect.x() + origin.x(), dirtyRect.y() + origin.y());
#if DEBUG_CHECKERBOARD
- blitCheckered = true;
+ blitCheckered = true;
#endif
- checkerWindow(dirtyRectT, contentsOrigin, transformation.a());
- }
+ checkerWindow(dirtyRectT, contentsOrigin, transformation.a());
+ }
- // Blit the visible buffer here if we have visible zoom jobs.
- if (m_renderQueue->hasCurrentVisibleZoomJob()) {
+ // Blit the visible buffer here if we have visible zoom jobs.
+ if (m_renderQueue->hasCurrentVisibleZoomJob()) {
- // Needs to be in same coordinate system as dirtyRect.
- Platform::IntRect visibleTileBufferRect = m_visibleTileBufferRect;
- visibleTileBufferRect.move(-origin.x(), -origin.y());
+ // Needs to be in same coordinate system as dirtyRect.
+ Platform::IntRect visibleTileBufferRect = m_visibleTileBufferRect;
+ visibleTileBufferRect.move(-origin.x(), -origin.y());
- // Clip to the visibleTileBufferRect.
- dirtyRect.intersect(visibleTileBufferRect);
+ // Clip to the visibleTileBufferRect.
+ dirtyRect.intersect(visibleTileBufferRect);
- // Clip to the dirtyRect.
- visibleTileBufferRect.intersect(dirtyRect);
+ // Clip to the dirtyRect.
+ visibleTileBufferRect.intersect(dirtyRect);
- if (!dirtyRect.isEmpty() && !visibleTileBufferRect.isEmpty()) {
- BackingStoreTile* visibleTileBuffer
- = SurfacePool::globalSurfacePool()->visibleTileBuffer();
- ASSERT(visibleTileBuffer->size() == visibleContentsRect().size());
+ if (!dirtyRect.isEmpty() && !visibleTileBufferRect.isEmpty()) {
+ BackingStoreTile* visibleTileBuffer
+ = SurfacePool::globalSurfacePool()->visibleTileBuffer();
+ ASSERT(visibleTileBuffer->size() == visibleContentsRect().size());
- // The offset of the current viewport with the visble tile buffer.
- Platform::IntPoint difference = origin - m_visibleTileBufferRect.location();
- Platform::IntSize offset = Platform::IntSize(difference.x(), difference.y());
+ // The offset of the current viewport with the visble tile buffer.
+ Platform::IntPoint difference = origin - m_visibleTileBufferRect.location();
+ Platform::IntSize offset = Platform::IntSize(difference.x(), difference.y());
- // Map to the visibleTileBuffer coordinates.
- Platform::IntRect dirtyTileRect = visibleTileBufferRect;
- dirtyTileRect.move(offset.width(), offset.height());
+ // Map to the visibleTileBuffer coordinates.
+ Platform::IntRect dirtyTileRect = visibleTileBufferRect;
+ dirtyTileRect.move(offset.width(), offset.height());
- Platform::IntRect dirtyRectT = transformation.mapRect(dirtyRect);
+ Platform::IntRect dirtyRectT = transformation.mapRect(dirtyRect);
- if (!transformation.isIdentity()) {
- // Because of rounding it is possible that dirtyRect could be off-by-one larger
- // than the surface size of the dst buffer. We prevent this here, by clamping
- // it to ensure that can't happen.
- dirtyRectT.intersect(Platform::IntRect(Platform::IntPoint(0, 0), m_webPage->client()->window()->surfaceSize()));
- }
+ if (!transformation.isIdentity()) {
+ // Because of rounding it is possible that dirtyRect could be off-by-one larger
+ // than the surface size of the dst buffer. We prevent this here, by clamping
+ // it to ensure that can't happen.
+ dirtyRectT.intersect(Platform::IntRect(Platform::IntPoint(0, 0), surfaceSize()));
+ }
- blitToWindow(dirtyRectT,
- visibleTileBuffer->frontBuffer()->nativeBuffer(),
- dirtyTileRect,
- false /*blend*/, 255);
- }
- } else if (committed) {
- // Intersect the rendered region.
- Platform::IntRectRegion renderedRegion = tileBuffer->renderedRegion();
- IntRectList dirtyRenderedRects = renderedRegion.rects();
- for (size_t i = 0; i < dirtyRenderedRects.size(); ++i) {
- TileRect tileRect;
- tileRect.first = index;
- tileRect.second = intersection(dirtyTileRect, dirtyRenderedRects.at(i));
- if (tileRect.second.isEmpty())
- continue;
- // Blit the rendered parts.
- blitTileRect(tileBuffer, tileRect, origin, transformation, currentState);
+ blitToWindow(dirtyRectT,
+ visibleTileBuffer->frontBuffer()->nativeBuffer(),
+ dirtyTileRect,
+ false /*blend*/, 255);
+ }
+ } else if (committed) {
+ // Intersect the rendered region.
+ Platform::IntRectRegion renderedRegion = tileBuffer->renderedRegion();
+ IntRectList dirtyRenderedRects = renderedRegion.rects();
+ for (size_t i = 0; i < dirtyRenderedRects.size(); ++i) {
+ TileRect tileRect;
+ tileRect.first = index;
+ tileRect.second = intersection(dirtyTileRect, dirtyRenderedRects.at(i));
+ if (tileRect.second.isEmpty())
+ continue;
+ // Blit the rendered parts.
+ blitTileRect(tileBuffer, tileRect, origin, transformation, currentState);
+ }
+ blittedTiles.append(tileBuffer);
}
- blittedTiles.append(tileBuffer);
}
}
+ bool blittingDirectlyToCompositingWindow = isOpenGLCompositing();
+
#if USE(ACCELERATED_COMPOSITING)
- if (blittingDirectlyToCompositingWindow) {
- WebCore::FloatRect contentsRect = m_webPage->d->mapFromTransformedFloatRect(
- WebCore::FloatRect(WebCore::IntRect(contents)));
- m_webPage->d->drawSubLayers(dstRect, contentsRect);
- } else if (compositingSurface)
- blendCompositingSurface(dstRect);
+ if (WebPageCompositorPrivate* compositor = m_webPage->d->compositor()) {
+ WebCore::FloatRect contentsRect = m_webPage->d->mapFromTransformedFloatRect(WebCore::FloatRect(WebCore::IntRect(contents)));
+ compositor->drawLayers(dstRect, contentsRect);
+ if (compositor->drawsRootLayer())
+ paintDefaultBackground(contents, transformation, false /*flush*/);
+ }
+ if (!blittingDirectlyToCompositingWindow)
+ blendCompositingSurface(dstRect);
#endif
#if ENABLE_SCROLLBARS
@@ -1450,8 +1544,7 @@ void BackingStorePrivate::blitContents(const Platform::IntRect& dstRect,
#if DEBUG_VISUALIZE
// FIXME: This should not explicitely depend on WebCore::.
- BlackBerry::Platform::Graphics::Buffer* windowBuffer =
- m_webPage->client()->window()->buffer();
+ BlackBerry::Platform::Graphics::Buffer* windowBuffer = buffer();
BlackBerry::Platform::Graphics::Drawable* bufferDrawable =
BlackBerry::Platform::Graphics::lockBufferDrawable(windowBuffer);
PlatformGraphicsContext* bufferPlatformGraphicsContext =
@@ -1498,7 +1591,7 @@ void BackingStorePrivate::blitContents(const Platform::IntRect& dstRect,
invalidateWindow(dstRect);
- if (blittingDirectlyToCompositingWindow) {
+ if (blittingDirectlyToCompositingWindow && !blittedTiles.isEmpty()) {
pthread_mutex_lock(&m_blitGenerationLock);
++m_blitGeneration;
@@ -1542,7 +1635,7 @@ Platform::IntRect BackingStorePrivate::blitTileRect(TileBuffer* tileBuffer,
// Because of rounding it is possible that dirtyRect could be off-by-one larger
// than the surface size of the dst buffer. We prevent this here, by clamping
// it to ensure that can't happen.
- dirtyRect.intersect(Platform::IntRect(Platform::IntPoint(0, 0), m_webPage->client()->window()->surfaceSize()));
+ dirtyRect.intersect(Platform::IntRect(Platform::IntPoint(0, 0), surfaceSize()));
}
ASSERT(!dirtyRect.isEmpty());
@@ -1578,7 +1671,7 @@ void BackingStorePrivate::blendCompositingSurface(const Platform::IntRect& dstRe
holePunchRect.intersect(dstRect);
holePunchRect.intersect(Platform::IntRect(
- Platform::IntPoint(0, 0), m_webPage->client()->window()->surfaceSize()));
+ Platform::IntPoint(0, 0), surfaceSize()));
if (!holePunchRect.isEmpty())
clearWindow(holePunchRect, 0, 0, 0, 0);
@@ -1590,7 +1683,7 @@ void BackingStorePrivate::blendCompositingSurface(const Platform::IntRect& dstRe
for (size_t i = 0; i < rects.size(); ++i) {
rects[i].intersect(dstRect);
#if DEBUG_COMPOSITING_DIRTY_REGION
- clearBuffer(m_webPage->client()->window()->buffer(), rects[i], 255, 0, 0, 128);
+ clearBuffer(buffer(), rects[i], 255, 0, 0, 128);
#endif
blitToWindow(rects[i], frontBuffer->nativeBuffer(), rects[i], true /*blend*/, 255);
}
@@ -2114,6 +2207,38 @@ Platform::IntRect BackingStorePrivate::tileRect()
return Platform::IntRect(0, 0, tileWidth(), tileHeight());
}
+void BackingStorePrivate::renderContents(BlackBerry::Platform::Graphics::Drawable* drawable,
+ double scale,
+ const Platform::IntRect& contentsRect) const
+{
+ if (!drawable || contentsRect.isEmpty())
+ return;
+ PlatformGraphicsContext* platformGraphicsContext = SurfacePool::globalSurfacePool()->createPlatformGraphicsContext(drawable);
+ GraphicsContext graphicsContext(platformGraphicsContext);
+
+ graphicsContext.translate(-contentsRect.x(), -contentsRect.y());
+
+ WebCore::IntRect transformedContentsRect(contentsRect.x(), contentsRect.y(), contentsRect.width(), contentsRect.height());
+
+ if (scale != 1.0) {
+ TransformationMatrix matrix;
+ matrix.scale(1.0 / scale);
+ transformedContentsRect = matrix.mapRect(transformedContentsRect);
+
+ // We extract from the contentsRect but draw a slightly larger region than
+ // we were told to, in order to avoid pixels being rendered only partially.
+ const int atLeastOneDevicePixel = static_cast<int>(ceilf(1.0 / scale));
+ transformedContentsRect.inflate(atLeastOneDevicePixel);
+
+ graphicsContext.scale(FloatSize(scale, scale));
+ }
+
+ graphicsContext.clip(transformedContentsRect);
+ m_client->frame()->view()->paintContents(&graphicsContext, transformedContentsRect);
+
+ delete platformGraphicsContext;
+}
+
void BackingStorePrivate::renderContents(BlackBerry::Platform::Graphics::Buffer* tileBuffer,
const Platform::IntPoint& surfaceOffset,
const Platform::IntRect& contentsRect) const
@@ -2137,7 +2262,7 @@ void BackingStorePrivate::renderContents(BlackBerry::Platform::Graphics::Buffer*
BlackBerry::Platform::Graphics::Buffer* targetBuffer = tileBuffer
? tileBuffer
- : m_webPage->client()->window()->buffer();
+ : buffer();
if (contentsSize.isEmpty()
|| !Platform::IntRect(Platform::IntPoint(0, 0), m_client->transformedContentsSize()).contains(contentsRect)
@@ -2229,7 +2354,7 @@ void BackingStorePrivate::renderContents(BlackBerry::Platform::Graphics::Buffer*
if (m_webPage->d->m_page->inspectorController()->enabled()) {
WebCore::IntPoint scrollPosition = m_client->frame()->view()->scrollPosition();
graphicsContext.translate(scrollPosition.x(), scrollPosition.y());
- m_webPage->d->m_page->inspectorController()->drawNodeHighlight(graphicsContext);
+ m_webPage->d->m_page->inspectorController()->drawHighlight(graphicsContext);
}
#endif
@@ -2275,7 +2400,7 @@ void BackingStorePrivate::blitToWindow(const Platform::IntRect& dstRect,
windowFrontBufferState()->clearBlittedRegion(dstRect);
windowBackBufferState()->addBlittedRegion(dstRect);
- BlackBerry::Platform::Graphics::Buffer* dstBuffer = m_webPage->client()->window()->buffer();
+ BlackBerry::Platform::Graphics::Buffer* dstBuffer = buffer();
ASSERT(dstBuffer);
ASSERT(srcBuffer);
if (!dstBuffer)
@@ -2304,7 +2429,7 @@ void BackingStorePrivate::checkerWindow(const Platform::IntRect& dstRect,
windowFrontBufferState()->clearBlittedRegion(dstRect);
windowBackBufferState()->addBlittedRegion(dstRect);
- BlackBerry::Platform::Graphics::Buffer* dstBuffer = m_webPage->client()->window()->buffer();
+ BlackBerry::Platform::Graphics::Buffer* dstBuffer = buffer();
ASSERT(dstBuffer);
if (!dstBuffer)
BlackBerry::Platform::log(BlackBerry::Platform::LogLevelWarn, "Empty window buffer, couldn't checkerWindow");
@@ -2363,7 +2488,8 @@ void BackingStorePrivate::invalidateWindow(const Platform::IntRect& dst)
#endif
m_currentWindowBackBuffer = (m_currentWindowBackBuffer + 1) % 2;
- m_webPage->client()->window()->post(dstRect);
+ if (Window* window = m_webPage->client()->window())
+ window->post(dstRect);
}
void BackingStorePrivate::clearWindow()
@@ -2376,14 +2502,14 @@ void BackingStorePrivate::clearWindow()
return;
}
- BlackBerry::Platform::Graphics::Buffer* dstBuffer = m_webPage->client()->window()->buffer();
+ BlackBerry::Platform::Graphics::Buffer* dstBuffer = buffer();
ASSERT(dstBuffer);
if (!dstBuffer)
BlackBerry::Platform::log(BlackBerry::Platform::LogLevelWarn, "Empty window buffer, couldn't clearWindow");
windowFrontBufferState()->clearBlittedRegion();
windowBackBufferState()->addBlittedRegion(Platform::IntRect(
- Platform::IntPoint(0, 0), m_webPage->client()->window()->surfaceSize()));
+ Platform::IntPoint(0, 0), surfaceSize()));
Color color(m_webPage->settings()->backgroundColor());
BlackBerry::Platform::Graphics::clearBuffer(dstBuffer,
@@ -2414,7 +2540,7 @@ void BackingStorePrivate::clearWindow(const Platform::IntRect& rect,
return;
}
- BlackBerry::Platform::Graphics::Buffer* dstBuffer = m_webPage->client()->window()->buffer();
+ BlackBerry::Platform::Graphics::Buffer* dstBuffer = buffer();
ASSERT(dstBuffer);
if (!dstBuffer)
BlackBerry::Platform::log(BlackBerry::Platform::LogLevelWarn, "Empty window buffer, couldn't clearWindow");
@@ -2498,27 +2624,6 @@ BackingStoreWindowBufferState* BackingStorePrivate::windowBackBufferState() cons
}
#if USE(ACCELERATED_COMPOSITING)
-bool BackingStorePrivate::drawSubLayers()
-{
- ASSERT(BlackBerry::Platform::userInterfaceThreadMessageClient()->isCurrentThread());
- if (!BlackBerry::Platform::userInterfaceThreadMessageClient()->isCurrentThread())
- return false;
-
- bool blittingDirectlyToCompositingWindow = m_webPage->d->m_client->window()->windowUsage() == BlackBerry::Platform::Graphics::Window::GLES2Usage;
-
- if (m_suspendBackingStoreUpdates && !blittingDirectlyToCompositingWindow)
- return false;
-
- Platform::IntRect dst = m_webPage->client()->userInterfaceBlittedDestinationRect();
- if (dst.isEmpty())
- return false;
-
- Platform::IntRect src = m_webPage->client()->userInterfaceBlittedVisibleContentsRect();
- WebCore::FloatRect contentsRect = m_webPage->d->mapFromTransformedFloatRect(
- WebCore::FloatRect(WebCore::IntRect(src)));
- return m_webPage->d->drawSubLayers(dst, contentsRect);
-}
-
bool BackingStorePrivate::drawLayersOnCommitIfNeeded()
{
// Check if rendering caused a commit and we need to redraw the layers
@@ -2547,7 +2652,8 @@ void BackingStorePrivate::drawAndBlendLayersForDirectRendering(const Platform::I
// Check if rendering caused a commit and we need to redraw the layers.
m_needsDrawLayersOnCommit = false;
- m_webPage->d->drawSubLayers(dstRect, untransformedContentsRect);
+ if (WebPageCompositorPrivate* compositor = m_webPage->d->compositor())
+ compositor->drawLayers(dstRect, untransformedContentsRect);
#if ENABLE_COMPOSITING_SURFACE
// See above comment about sync calling, visibleContentsRect() is safe here.
@@ -2562,7 +2668,7 @@ void BackingStorePrivate::drawAndBlendLayersForDirectRendering(const Platform::I
bool BackingStorePrivate::isActive() const
{
- return BackingStorePrivate::s_currentBackingStoreOwner == m_webPage && !SurfacePool::globalSurfacePool()->isEmpty();
+ return BackingStorePrivate::s_currentBackingStoreOwner == m_webPage && SurfacePool::globalSurfacePool()->isActive();
}
BackingStore::BackingStore(WebPage* webPage, BackingStoreClient* client)
@@ -2574,7 +2680,7 @@ BackingStore::BackingStore(WebPage* webPage, BackingStoreClient* client)
BackingStore::~BackingStore()
{
- delete d;
+ deleteGuardedObject(d);
d = 0;
}
@@ -2648,6 +2754,16 @@ bool BackingStore::isDirectRenderingToWindow() const
return d->shouldDirectRenderingToWindow();
}
+void BackingStore::createBackingStoreMemory()
+{
+ SurfacePool::globalSurfacePool()->createBuffers();
+}
+
+void BackingStore::releaseBackingStoreMemory()
+{
+ SurfacePool::globalSurfacePool()->releaseBuffers();
+}
+
bool BackingStore::defersBlit() const
{
return d->m_defersBlit;
@@ -2660,6 +2776,13 @@ void BackingStore::setDefersBlit(bool b)
bool BackingStore::hasBlitJobs() const
{
+#if USE(ACCELERATED_COMPOSITING)
+ // If there's a WebPageCompositorClient, let it schedule the blit.
+ WebPageCompositorPrivate* compositor = d->m_webPage->d->compositor();
+ if (compositor && compositor->client())
+ return false;
+#endif
+
// Normally, this would be called from the compositing thread,
// and the flag is set on the compositing thread, so no need for
// synchronization.
@@ -2668,8 +2791,46 @@ bool BackingStore::hasBlitJobs() const
void BackingStore::blitOnIdle()
{
+#if USE(ACCELERATED_COMPOSITING)
+ // If there's a WebPageCompositorClient, let it schedule the blit.
+ WebPageCompositorPrivate* compositor = d->m_webPage->d->compositor();
+ if (compositor && compositor->client())
+ return;
+#endif
+
d->blitVisibleContents(true /*force*/);
}
+Platform::IntSize BackingStorePrivate::surfaceSize() const
+{
+ if (Window* window = m_webPage->client()->window())
+ return window->surfaceSize();
+
+#if USE(ACCELERATED_COMPOSITING)
+ if (WebPageCompositorPrivate* compositor = m_webPage->d->compositor())
+ return compositor->context()->surfaceSize();
+#endif
+
+ return Platform::IntSize();
+}
+
+Platform::Graphics::Buffer* BackingStorePrivate::buffer() const
+{
+ if (Window* window = m_webPage->client()->window())
+ return window->buffer();
+
+#if USE(ACCELERATED_COMPOSITING)
+ if (WebPageCompositorPrivate* compositor = m_webPage->d->compositor())
+ return compositor->context()->buffer();
+#endif
+
+ return 0;
+}
+
+void BackingStore::drawContents(BlackBerry::Platform::Graphics::Drawable* drawable, double scale, const Platform::IntRect& contentsRect)
+{
+ d->renderContents(drawable, scale, contentsRect);
+}
+
}
}
diff --git a/Source/WebKit/blackberry/Api/BackingStore.h b/Source/WebKit/blackberry/Api/BackingStore.h
index 73194859f..caf5b3ed0 100644
--- a/Source/WebKit/blackberry/Api/BackingStore.h
+++ b/Source/WebKit/blackberry/Api/BackingStore.h
@@ -20,6 +20,7 @@
#define BackingStore_h
#include "BlackBerryGlobal.h"
+#include <BlackBerryPlatformGraphics.h>
namespace WebCore {
class ChromeClientBlackBerry;
@@ -40,7 +41,7 @@ namespace WebKit {
class WebPage;
class WebPagePrivate;
-class WebPageCompositor;
+class WebPageCompositorPrivate;
class BackingStorePrivate;
class BackingStoreClient;
@@ -74,11 +75,16 @@ public:
bool isDirectRenderingToWindow() const;
+ void createBackingStoreMemory();
+ void releaseBackingStoreMemory();
+
+ void drawContents(BlackBerry::Platform::Graphics::Drawable*, double /*scale*/, const BlackBerry::Platform::IntRect&);
+
private:
friend class BlackBerry::WebKit::BackingStoreClient;
friend class BlackBerry::WebKit::WebPage;
friend class BlackBerry::WebKit::WebPagePrivate; // FIXME: For now, we expose our internals to WebPagePrivate. See PR #120301.
- friend class BlackBerry::WebKit::WebPageCompositor;
+ friend class BlackBerry::WebKit::WebPageCompositorPrivate;
friend class WebCore::ChromeClientBlackBerry;
friend class WebCore::FrameLoaderClientBlackBerry;
friend class WebCore::GLES2Context;
diff --git a/Source/WebKit/blackberry/Api/BackingStore_p.h b/Source/WebKit/blackberry/Api/BackingStore_p.h
index 795b7711b..25b6c8c6b 100644
--- a/Source/WebKit/blackberry/Api/BackingStore_p.h
+++ b/Source/WebKit/blackberry/Api/BackingStore_p.h
@@ -26,11 +26,10 @@
#include "Timer.h"
#include <BlackBerryPlatformGraphics.h>
#include <BlackBerryPlatformGuardedPointer.h>
+#include <pthread.h>
#include <wtf/HashMap.h>
#include <wtf/Vector.h>
-#include <pthread.h>
-
namespace WebCore {
class IntRect;
class TransformationMatrix;
@@ -99,13 +98,17 @@ class BackingStorePrivate : public BlackBerry::Platform::GuardedPointerBase {
public:
enum TileMatrixDirection { Horizontal, Vertical };
BackingStorePrivate();
- ~BackingStorePrivate();
// Returns whether direct rendering is explicitly turned on or is
// required because the surface pool is not large enough to meet
// the minimum number of tiles required to scroll.
bool shouldDirectRenderingToWindow() const;
+ // Returns whether we're using the OpenGL code path for compositing the
+ // backing store tiles. This can be due to the main window using
+ // BlackBerry::Platform::Graphics::Window::GLES2Usage.
+ bool isOpenGLCompositing() const;
+
bool isSuspended() const { return m_suspendBackingStoreUpdates; }
// Suspends all screen updates so that 'blitContents' is disabled.
@@ -195,7 +198,6 @@ public:
#if USE(ACCELERATED_COMPOSITING)
void blendCompositingSurface(const Platform::IntRect& dstRect);
void clearCompositingSurface();
- bool drawSubLayers();
bool drawLayersOnCommitIfNeeded();
void drawAndBlendLayersForDirectRendering(const Platform::IntRect& dirtyRect);
// WebPage will call this when drawing layers to tell us we don't need to
@@ -293,6 +295,7 @@ public:
// This takes transformed contents coordinates.
void renderContents(BlackBerry::Platform::Graphics::Buffer*, const Platform::IntPoint& surfaceOffset, const Platform::IntRect& contentsRect) const;
+ void renderContents(BlackBerry::Platform::Graphics::Drawable* /*drawable*/, double /*scale*/, const Platform::IntRect& /*contentsRect*/) const;
void blitToWindow(const Platform::IntRect& dstRect, const BlackBerry::Platform::Graphics::Buffer* srcBuffer, const Platform::IntRect& srcRect, bool blend, unsigned char globalAlpha);
void checkerWindow(const Platform::IntRect& dstRect, const Platform::IntPoint& contentsOrigin, double contentsScale);
@@ -319,6 +322,12 @@ public:
static WebPage* currentBackingStoreOwner() { return BackingStorePrivate::s_currentBackingStoreOwner; }
bool isActive() const;
+ // Surface abstraction, maybe BlackBerry::Platform::Graphics::Buffer could be made public instead.
+ BlackBerry::Platform::IntSize surfaceSize() const;
+ BlackBerry::Platform::Graphics::Buffer* buffer() const;
+
+ bool ensureOverScrollImage();
+
static WebPage* s_currentBackingStoreOwner;
bool m_suspendScreenUpdates;
@@ -359,6 +368,12 @@ public:
mutable bool m_needsDrawLayersOnCommit; // Not thread safe, WebKit thread only
bool m_isDirectRenderingAnimationMessageScheduled;
#endif
+
+ static Platform::Graphics::Buffer* s_overScrollImage;
+ static std::string s_overScrollImagePath;
+
+protected:
+ virtual ~BackingStorePrivate();
};
} // namespace WebKit
} // namespace BlackBerry
diff --git a/Source/WebKit/blackberry/Api/BlackBerryGlobal.cpp b/Source/WebKit/blackberry/Api/BlackBerryGlobal.cpp
index 6258a3cc3..495d8f7ec 100644
--- a/Source/WebKit/blackberry/Api/BlackBerryGlobal.cpp
+++ b/Source/WebKit/blackberry/Api/BlackBerryGlobal.cpp
@@ -136,10 +136,6 @@ void clearAppCache(const WebString& pageGroupName)
cacheStorage().empty();
}
-void clearLocalStorage(const WebString& pageGroupName)
-{
-}
-
void clearDatabase(const WebString& pageGroupName)
{
}
diff --git a/Source/WebKit/blackberry/Api/BlackBerryGlobal.h b/Source/WebKit/blackberry/Api/BlackBerryGlobal.h
index e794fb951..9e6e7d5a6 100644
--- a/Source/WebKit/blackberry/Api/BlackBerryGlobal.h
+++ b/Source/WebKit/blackberry/Api/BlackBerryGlobal.h
@@ -30,15 +30,13 @@ namespace WebKit {
class WebString;
-void globalInitialize();
+BLACKBERRY_EXPORT void globalInitialize();
void collectJavascriptGarbageNow();
void clearCookieCache();
BLACKBERRY_EXPORT void clearMemoryCaches();
void clearAppCache(const WebString& pageGroupName);
void reopenAllAppCaches();
void closeAllAppCaches();
-void clearLocalStorage(const WebString& pageGroupName);
-void closeAllLocalStorages();
void clearDatabase(const WebString& pageGroupName);
void reopenAllTrackerDatabases();
void closeAllTrackerDatabases();
diff --git a/Source/WebKit/blackberry/Api/WebPage.cpp b/Source/WebKit/blackberry/Api/WebPage.cpp
index ad433607e..21e906a3b 100644
--- a/Source/WebKit/blackberry/Api/WebPage.cpp
+++ b/Source/WebKit/blackberry/Api/WebPage.cpp
@@ -25,12 +25,17 @@
#include "BackingStoreClient.h"
#include "BackingStoreCompositingSurface.h"
#include "BackingStore_p.h"
+#if ENABLE(BATTERY_STATUS)
+#include "BatteryClientBlackBerry.h"
+#endif
#include "CString.h"
#include "CachedImage.h"
#include "Chrome.h"
#include "ChromeClientBlackBerry.h"
#include "ContextMenuClientBlackBerry.h"
#include "CookieManager.h"
+#include "CredentialManager.h"
+#include "CredentialTransformData.h"
#include "DOMSupport.h"
#include "Database.h"
#include "DatabaseSync.h"
@@ -46,17 +51,16 @@
#include "EditorClientBlackBerry.h"
#include "FocusController.h"
#include "FrameLoaderClientBlackBerry.h"
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
#if ENABLE_DRT
#include "GeolocationClientMock.h"
#endif
#include "GeolocationControllerClientBlackBerry.h"
-#endif
#include "GroupSettings.h"
#include "HTMLAreaElement.h"
#include "HTMLFrameOwnerElement.h"
#include "HTMLImageElement.h"
#include "HTMLInputElement.h"
+#include "HTMLMediaElement.h"
#include "HTMLNames.h"
#include "HTMLParserIdioms.h"
#include "HTTPParsers.h"
@@ -72,7 +76,7 @@
#include "LayerWebKitThread.h"
#include "NetworkManager.h"
#include "NodeRenderStyle.h"
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#include "NotificationPresenterImpl.h"
#endif
#include "Page.h"
@@ -82,6 +86,8 @@
#include "PlatformWheelEvent.h"
#include "PluginDatabase.h"
#include "PluginView.h"
+#include "RenderLayerBacking.h"
+#include "RenderLayerCompositor.h"
#include "RenderText.h"
#include "RenderThemeBlackBerry.h"
#include "RenderTreeAsText.h"
@@ -99,12 +105,17 @@
#include "ThreadCheck.h"
#include "TouchEventHandler.h"
#include "TransformationMatrix.h"
+#if ENABLE(VIBRATION)
+#include "VibrationClientBlackBerry.h"
+#endif
#include "VisiblePosition.h"
#if ENABLE(WEBDOM)
#include "WebDOMDocument.h"
#endif
+#include "WebKitVersion.h"
#include "WebPageClient.h"
#include "WebSocket.h"
+#include "WebViewportArguments.h"
#include "npapi.h"
#include "runtime_root.h"
@@ -120,9 +131,10 @@
#if USE(ACCELERATED_COMPOSITING)
#include "FrameLayers.h"
-#include "WebPageCompositor.h"
+#include "WebPageCompositor_p.h"
#endif
+#include <BlackBerryPlatformDeviceInfo.h>
#include <BlackBerryPlatformExecutableMessage.h>
#include <BlackBerryPlatformITPolicy.h>
#include <BlackBerryPlatformKeyboardEvent.h>
@@ -140,14 +152,19 @@
#include <memalloc.h>
#endif
-#if ENABLE(SKIA_GPU_CANVAS)
-#include "BlackBerryPlatformGraphics.h"
+#if ENABLE(ACCELERATED_2D_CANVAS)
+#include "SharedGraphicsContext3D.h"
#include "GrContext.h"
#endif
+#if ENABLE(REQUEST_ANIMATION_FRAME)
+#include "PlatformScreen.h"
+#endif
+
#define DEBUG_BLOCK_ZOOM 0
#define DEBUG_TOUCH_EVENTS 0
#define DEBUG_WEBPAGE_LOAD 0
+#define DEBUG_AC_COMMIT 0
using namespace std;
using namespace WebCore;
@@ -192,16 +209,16 @@ static KURL parseUrl(const String& url)
}
// Helper functions to convert to and from WebCore types.
-static inline MouseEventType toWebCoreMouseEventType(const Platform::MouseEvent::Type type)
+static inline WebCore::PlatformEvent::Type toWebCoreMouseEventType(const BlackBerry::Platform::MouseEvent::Type type)
{
switch (type) {
- case Platform::MouseEvent::MouseButtonDown:
- return MouseEventPressed;
+ case BlackBerry::Platform::MouseEvent::MouseButtonDown:
+ return WebCore::PlatformEvent::MousePressed;
case Platform::MouseEvent::MouseButtonUp:
- return MouseEventReleased;
+ return WebCore::PlatformEvent::MouseReleased;
case Platform::MouseEvent::MouseMove:
default:
- return MouseEventMoved;
+ return WebCore::PlatformEvent::MouseMoved;
}
}
@@ -262,6 +279,31 @@ static inline WebPage::BackForwardId backForwardIdFromHistoryItem(HistoryItem* i
return reinterpret_cast<WebPage::BackForwardId>(item);
}
+void WebPage::setUserViewportArguments(const WebViewportArguments& viewportArguments)
+{
+ d->m_userViewportArguments = *(viewportArguments.d);
+}
+
+void WebPage::resetUserViewportArguments()
+{
+ d->m_userViewportArguments = ViewportArguments();
+}
+
+template <bool WebPagePrivate::* isActive>
+class DeferredTask: public WebPagePrivate::DeferredTaskBase {
+public:
+ static void finishOrCancel(WebPagePrivate* webPagePrivate)
+ {
+ webPagePrivate->*isActive = false;
+ }
+protected:
+ DeferredTask(WebPagePrivate* webPagePrivate)
+ : DeferredTaskBase(webPagePrivate, isActive)
+ {
+ }
+ typedef DeferredTask<isActive> DeferredTaskType;
+};
+
WebPagePrivate::WebPagePrivate(WebPage* webPage, WebPageClient* client, const IntRect& rect)
: m_webPage(webPage)
, m_client(client)
@@ -270,6 +312,7 @@ WebPagePrivate::WebPagePrivate(WebPage* webPage, WebPageClient* client, const In
, m_currentContextNode(0)
, m_webSettings(0) // Initialized by init.
, m_visible(false)
+ , m_activationState(ActivationActive)
, m_shouldResetTilesWhenShown(false)
, m_userScalable(true)
, m_userPerformedManualZoom(false)
@@ -317,10 +360,8 @@ WebPagePrivate::WebPagePrivate(WebPage* webPage, WebPageClient* client, const In
, m_lastUserEventTimestamp(0.0)
, m_pluginMouseButtonPressed(false)
, m_pluginMayOpenNewTab(false)
- , m_geolocationClient(0)
, m_inRegionScrollStartingNode(0)
#if USE(ACCELERATED_COMPOSITING)
- , m_isAcceleratedCompositingActive(false)
, m_rootLayerCommitTimer(adoptPtr(new Timer<WebPagePrivate>(this, &WebPagePrivate::rootLayerCommitTimerFired)))
, m_needsOneShotDrawingSynchronization(false)
, m_needsCommit(false)
@@ -330,7 +371,14 @@ WebPagePrivate::WebPagePrivate(WebPage* webPage, WebPageClient* client, const In
, m_fullscreenVideoNode(0)
, m_hasInRegionScrollableAreas(false)
, m_updateDelegatedOverlaysDispatched(false)
+ , m_deferredTasksTimer(this, &WebPagePrivate::deferredTasksTimerFired)
{
+ static bool isInitialized = false;
+ if (!isInitialized) {
+ isInitialized = true;
+ BlackBerry::Platform::DeviceInfo::instance();
+ defaultUserAgent();
+ }
}
WebPage::WebPage(WebPageClient* client, const WebString& pageGroupName, const Platform::IntRect& rect)
@@ -380,7 +428,7 @@ WebPagePrivate::~WebPagePrivate()
WebPage::~WebPage()
{
- delete d;
+ deleteGuardedObject(d);
d = 0;
}
@@ -415,36 +463,36 @@ void WebPagePrivate::init(const WebString& pageGroupName)
pageClients.dragClient = dragClient;
pageClients.inspectorClient = inspectorClient;
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- // Note the object will be destroyed when the page is destroyed.
+ m_page = new Page(pageClients);
#if ENABLE_DRT
- if (getenv("drtRun"))
- pageClients.geolocationClient = new GeolocationClientMock();
- else
-#endif
- pageClients.geolocationClient = m_geolocationClient = new GeolocationControllerClientBlackBerry(this);
+ if (getenv("drtRun")) {
+ // In case running in DumpRenderTree mode set the controller to mock provider.
+ GeolocationClientMock* mock = new GeolocationClientMock();
+ WebCore::provideGeolocationTo(m_page, mock);
+ mock->setController(WebCore::GeolocationController::from(m_page));
+ } else
#else
- pageClients.geolocationClient = m_geolocationClient;
+ WebCore::provideGeolocationTo(m_page, new GeolocationControllerClientBlackBerry(this));
+#endif
+ WebCore::provideDeviceOrientationTo(m_page, new DeviceOrientationClientBlackBerry(this));
+ WebCore::provideDeviceMotionTo(m_page, new DeviceMotionClientBlackBerry(this));
+#if ENABLE(VIBRATION)
+ WebCore::provideVibrationTo(m_page, new VibrationClientBlackBerry());
#endif
- pageClients.deviceMotionClient = new DeviceMotionClientBlackBerry(this);
- pageClients.deviceOrientationClient = new DeviceOrientationClientBlackBerry(this);
- m_page = new Page(pageClients);
-
-#if ENABLE(NOTIFICATIONS)
- WebCore::provideNotification(m_page, NotificationPresenterImpl::instance());
+#if ENABLE(BATTERY_STATUS)
+ WebCore::provideBatteryTo(m_page, new WebCore::BatteryClientBlackBerry);
#endif
-#if ENABLE(CLIENT_BASED_GEOLOCATION) && ENABLE_DRT
- // In case running in DumpRenderTree mode set the controller to mock provider.
- if (getenv("drtRun"))
- static_cast<GeolocationClientMock*>(pageClients.geolocationClient)->setController(m_page->geolocationController());
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+ WebCore::provideNotification(m_page, NotificationPresenterImpl::instance());
#endif
m_page->setCustomHTMLTokenizerChunkSize(256);
m_page->setCustomHTMLTokenizerTimeDelay(0.3);
m_webSettings = WebSettings::createFromStandardSettings();
+ m_webSettings->setUserAgentString(defaultUserAgent());
// FIXME: We explicitly call setDelegate() instead of passing ourself in createFromStandardSettings()
// so that we only get one didChangeSettings() callback when we set the page group name. This causes us
@@ -463,7 +511,7 @@ void WebPagePrivate::init(const WebString& pageGroupName)
Platform::Settings* settings = Platform::Settings::get();
m_page->settings()->setWebGLEnabled(settings && settings->isWebGLSupported());
#endif
-#if ENABLE(SKIA_GPU_CANVAS)
+#if ENABLE(ACCELERATED_2D_CANVAS)
m_page->settings()->setCanvasUsesAcceleratedDrawing(true);
m_page->settings()->setAccelerated2dCanvasEnabled(true);
#endif
@@ -485,11 +533,34 @@ void WebPagePrivate::init(const WebString& pageGroupName)
blockClickRadius = int(roundf(0.35 * Platform::Graphics::Screen::primaryScreen()->pixelsPerInch(0).width())); // The clicked rectangle area should be a fixed unit of measurement.
m_page->settings()->setDelegateSelectionPaint(true);
+
+#if ENABLE(REQUEST_ANIMATION_FRAME)
+ m_page->windowScreenDidChange((PlatformDisplayID)0);
+#endif
+
+#if ENABLE(WEB_TIMING)
+ m_page->settings()->setMemoryInfoEnabled(true);
+#endif
}
-void WebPagePrivate::load(const char* url, const char* networkToken, const char* method, Platform::NetworkRequest::CachePolicy cachePolicy, const char* data, size_t dataLength, const char* const* headers, size_t headersLength, bool isInitial, bool mustHandleInternally, bool forceDownload, const char* overrideContentType)
+class DeferredTaskLoadManualScript: public DeferredTask<&WebPagePrivate::m_wouldLoadManualScript> {
+public:
+ explicit DeferredTaskLoadManualScript(WebPagePrivate* webPagePrivate, const KURL& url)
+ : DeferredTaskType(webPagePrivate)
+ {
+ webPagePrivate->m_cachedManualScript = url;
+ }
+private:
+ virtual void performInternal(WebPagePrivate* webPagePrivate)
+ {
+ webPagePrivate->m_mainFrame->script()->executeIfJavaScriptURL(webPagePrivate->m_cachedManualScript, DoNotReplaceDocumentIfJavaScriptURL);
+ }
+};
+
+void WebPagePrivate::load(const char* url, const char* networkToken, const char* method, Platform::NetworkRequest::CachePolicy cachePolicy, const char* data, size_t dataLength, const char* const* headers, size_t headersLength, bool isInitial, bool mustHandleInternally, bool forceDownload, const char* overrideContentType, const char* suggestedSaveName)
{
stopCurrentLoad();
+ DeferredTaskLoadManualScript::finishOrCancel(this);
String urlString(url);
if (urlString.startsWith("vs:", false)) {
@@ -501,10 +572,9 @@ void WebPagePrivate::load(const char* url, const char* networkToken, const char*
KURL kurl = parseUrl(urlString);
if (protocolIs(kurl, "javascript")) {
// Never run javascript while loading is deferred.
- if (m_page->defersLoading()) {
- FrameLoaderClientBlackBerry* frameLoaderClient = static_cast<FrameLoaderClientBlackBerry*>(m_mainFrame->loader()->client());
- frameLoaderClient->setDeferredManualScript(kurl);
- } else
+ if (m_page->defersLoading())
+ m_deferredTasks.append(adoptPtr(new DeferredTaskLoadManualScript(this, kurl)));
+ else
m_mainFrame->script()->executeIfJavaScriptURL(kurl, DoNotReplaceDocumentIfJavaScriptURL);
return;
}
@@ -512,7 +582,7 @@ void WebPagePrivate::load(const char* url, const char* networkToken, const char*
if (isInitial)
NetworkManager::instance()->setInitialURL(kurl);
- ResourceRequest request(kurl, "" /* referrer */);
+ ResourceRequest request(kurl);
request.setToken(networkToken);
if (isInitial || mustHandleInternally)
request.setMustHandleInternally(true);
@@ -530,6 +600,8 @@ void WebPagePrivate::load(const char* url, const char* networkToken, const char*
if (forceDownload)
request.setForceDownload(true);
+ request.setSuggestedSaveName(suggestedSaveName);
+
m_mainFrame->loader()->load(request, "" /* name */, false);
}
@@ -556,7 +628,7 @@ void WebPage::loadFile(const char* path, const char* overrideContentType)
void WebPage::download(const Platform::NetworkRequest& request)
{
- d->load(request.getUrlRef().c_str(), 0, "GET", Platform::NetworkRequest::UseProtocolCachePolicy, 0, 0, 0, 0, false, false, true, "");
+ d->load(request.getUrlRef().c_str(), 0, "GET", Platform::NetworkRequest::UseProtocolCachePolicy, 0, 0, 0, 0, false, false, true, "", request.getSuggestedSaveName().c_str());
}
void WebPagePrivate::loadString(const char* string, const char* baseURL, const char* contentType, const char* failingURL)
@@ -711,8 +783,7 @@ void WebPagePrivate::stopCurrentLoad()
m_mainFrame->loader()->stopAllLoaders();
// Cancel any deferred script that hasn't been processed yet.
- FrameLoaderClientBlackBerry* frameLoaderClient = static_cast<FrameLoaderClientBlackBerry*>(m_mainFrame->loader()->client());
- frameLoaderClient->setDeferredManualScript(KURL());
+ DeferredTaskLoadManualScript::finishOrCancel(this);
}
void WebPage::stopLoading()
@@ -781,23 +852,19 @@ void WebPagePrivate::setLoadState(LoadState state)
{
unscheduleZoomAboutPoint();
-#if ENABLE(SKIA_GPU_CANVAS)
+#if ENABLE(ACCELERATED_2D_CANVAS)
if (m_page->settings()->canvasUsesAcceleratedDrawing()) {
// Free GPU resources as we're on a new page.
// This will help us to free memory pressure.
- Platform::Graphics::makeSharedResourceContextCurrent(Platform::Graphics::GLES2);
+ SharedGraphicsContext3D::get()->makeContextCurrent();
GrContext* grContext = Platform::Graphics::getGrContext();
grContext->freeGpuResources();
}
#endif
#if USE(ACCELERATED_COMPOSITING)
- // FIXME: compositor may only be touched on the compositing thread.
- // However, it's created/destroyed by a sync command so this is harmless.
- if (m_compositor) {
- m_compositor->setLayoutRectForCompositing(IntRect());
- m_compositor->setContentsSizeForCompositing(IntSize());
- }
+ if (isAcceleratedCompositingActive() && !compositorDrawsRootLayer())
+ syncDestroyCompositorOnCompositingThread();
#endif
m_previousContentsSize = IntSize();
m_backingStore->d->resetRenderQueue();
@@ -817,6 +884,12 @@ void WebPagePrivate::setLoadState(LoadState state)
// Check if we have already process the meta viewport tag, this only happens on history navigation
if (!m_didRestoreFromPageCache) {
m_viewportArguments = ViewportArguments();
+
+ // At the moment we commit a new load, set the viewport arguments
+ // to any fallback values. If there is a meta viewport in the
+ // content it will overwrite the fallback arguments soon.
+ dispatchViewportPropertiesDidChange(m_userViewportArguments);
+
m_userScalable = m_webSettings->isUserScalable();
resetScales();
} else {
@@ -845,6 +918,9 @@ void WebPagePrivate::setLoadState(LoadState state)
toggleTextReflowIfEnabledForBlockZoomOnly();
#endif
+ // Notify InputHandler of state change.
+ m_inputHandler->enableInputMode(false);
+
// Set the scroll to origin here and notify the client since we'll be
// zooming below without any real contents yet thus the contents size
// we report to the client could make our current scroll position invalid.
@@ -1175,14 +1251,32 @@ bool WebPagePrivate::shouldSendResizeEvent()
void WebPagePrivate::willDeferLoading()
{
+ m_deferredTasksTimer.stop();
m_client->willDeferLoading();
}
void WebPagePrivate::didResumeLoading()
{
+ if (!m_deferredTasks.isEmpty())
+ m_deferredTasksTimer.startOneShot(0);
m_client->didResumeLoading();
}
+void WebPagePrivate::deferredTasksTimerFired(WebCore::Timer<WebPagePrivate>*)
+{
+ ASSERT(!m_deferredTasks.isEmpty());
+ if (!m_deferredTasks.isEmpty())
+ return;
+
+ OwnPtr<DeferredTaskBase> task = m_deferredTasks[0].release();
+ m_deferredTasks.remove(0);
+
+ if (!m_deferredTasks.isEmpty())
+ m_deferredTasksTimer.startOneShot(0);
+
+ task->perform(this);
+}
+
bool WebPagePrivate::scrollBy(int deltaX, int deltaY, bool scrollMainFrame)
{
IntSize delta(deltaX, deltaY);
@@ -1547,6 +1641,11 @@ bool WebPage::isUserScalable() const
return d->isUserScalable();
}
+void WebPage::setUserScalable(bool userScalable)
+{
+ d->setUserScalable(userScalable);
+}
+
double WebPage::currentScale() const
{
return d->currentScale();
@@ -1843,7 +1942,7 @@ bool WebPagePrivate::setViewMode(ViewMode mode)
return true; // Needs re-layout!
}
-void WebPagePrivate::setCursor(PlatformCursorHandle handle)
+void WebPagePrivate::setCursor(PlatformCursor handle)
{
if (m_currentCursor.type() != handle.type()) {
m_currentCursor = handle;
@@ -1930,6 +2029,10 @@ void WebPagePrivate::didPluginEnterFullScreen(PluginView* plugin, const char* wi
{
m_fullScreenPluginView = plugin;
m_client->didPluginEnterFullScreen();
+
+ if (!m_client->window())
+ return;
+
Platform::Graphics::Window::setTransparencyDiscardFilter(windowUniquePrefix);
m_client->window()->setSensitivityFullscreenOverride(true);
}
@@ -1938,6 +2041,10 @@ void WebPagePrivate::didPluginExitFullScreen(PluginView* plugin, const char* win
{
m_fullScreenPluginView = 0;
m_client->didPluginExitFullScreen();
+
+ if (!m_client->window())
+ return;
+
Platform::Graphics::Window::setTransparencyDiscardFilter(0);
m_client->window()->setSensitivityFullscreenOverride(false);
}
@@ -1987,14 +2094,41 @@ bool WebPagePrivate::isActive() const
return m_client->isActive();
}
+Credential WebPagePrivate::authenticationChallenge(const KURL& url, const ProtectionSpace& protectionSpace)
+{
+ WebString username;
+ WebString password;
+
+#if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST)
+ if (!m_webSettings->isPrivateBrowsingEnabled())
+ credentialManager().autofillAuthenticationChallenge(protectionSpace, username, password);
+#endif
+
+ m_client->authenticationChallenge(protectionSpace.realm().characters(), protectionSpace.realm().length(), username, password);
+
+#if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST)
+ Credential inputCredential(username, password, CredentialPersistencePermanent);
+ if (!m_webSettings->isPrivateBrowsingEnabled())
+ credentialManager().saveCredentialIfConfirmed(this, CredentialTransformData(url, protectionSpace, inputCredential));
+#else
+ Credential inputCredential(username, password, CredentialPersistenceNone);
+#endif
+ return inputCredential;
+}
+
+PageClientBlackBerry::SaveCredentialType WebPagePrivate::notifyShouldSaveCredential(bool isNew)
+{
+ return static_cast<PageClientBlackBerry::SaveCredentialType>(m_client->notifyShouldSaveCredential(isNew));
+}
+
bool WebPagePrivate::useFixedLayout() const
{
return true;
}
-ActiveNodeContext WebPagePrivate::activeNodeContext(TargetDetectionStrategy strategy)
+Platform::WebContext WebPagePrivate::webContext(TargetDetectionStrategy strategy)
{
- ActiveNodeContext context;
+ Platform::WebContext context;
RefPtr<Node> node = contextNode(strategy);
m_currentContextNode = node;
@@ -2007,16 +2141,16 @@ ActiveNodeContext WebPagePrivate::activeNodeContext(TargetDetectionStrategy stra
if (Node* linkNode = node->enclosingLinkEventParentOrSelf()) {
KURL href;
if (linkNode->isLink() && linkNode->hasAttributes()) {
- if (Attribute* attribute = linkNode->attributes()->getAttributeItem(HTMLNames::hrefAttr))
+ if (Attribute* attribute = static_cast<Element*>(linkNode)->getAttributeItem(HTMLNames::hrefAttr))
href = linkNode->document()->completeURL(stripLeadingAndTrailingHTMLSpaces(attribute->value()));
}
String pattern = findPatternStringForUrl(href);
if (!pattern.isEmpty())
- context.setPattern(pattern);
+ context.setPattern(pattern.utf8().data());
if (!href.string().isEmpty()) {
- context.setUrl(href.string());
+ context.setUrl(href.string().utf8().data());
// Links are non-selectable by default, but selection should be allowed
// providing the page is selectable, use the parent to determine it.
@@ -2026,58 +2160,75 @@ ActiveNodeContext WebPagePrivate::activeNodeContext(TargetDetectionStrategy stra
}
if (!nodeAllowSelectionOverride && !node->canStartSelection())
- context.resetFlag(ActiveNodeContext::IsSelectable);
+ context.resetFlag(Platform::WebContext::IsSelectable);
if (node->isHTMLElement()) {
HTMLImageElement* imageElement = 0;
+ HTMLMediaElement* mediaElement = 0;
+
if (node->hasTagName(HTMLNames::imgTag))
imageElement = static_cast<HTMLImageElement*>(node.get());
else if (node->hasTagName(HTMLNames::areaTag))
imageElement = static_cast<HTMLAreaElement*>(node.get())->imageElement();
+
+ if (static_cast<HTMLElement*>(node.get())->isMediaElement())
+ mediaElement = static_cast<HTMLMediaElement*>(node.get());
+
if (imageElement && imageElement->renderer()) {
+ context.setFlag(Platform::WebContext::IsImage);
// FIXME: At the mean time, we only show "Save Image" when the image data is available.
if (CachedResource* cachedResource = imageElement->cachedImage()) {
if (cachedResource->isLoaded() && cachedResource->data()) {
String url = stripLeadingAndTrailingHTMLSpaces(imageElement->getAttribute(HTMLNames::srcAttr).string());
- context.setImageSrc(node->document()->completeURL(url).string());
+ context.setSrc(node->document()->completeURL(url).string().utf8().data());
}
}
String alt = imageElement->altText();
if (!alt.isNull())
- context.setImageAlt(alt);
+ context.setAlt(alt.utf8().data());
+ }
+
+ if (mediaElement) {
+ if (mediaElement->hasAudio())
+ context.setFlag(Platform::WebContext::IsAudio);
+ if (mediaElement->hasVideo())
+ context.setFlag(Platform::WebContext::IsVideo);
+
+ String src = stripLeadingAndTrailingHTMLSpaces(mediaElement->getAttribute(HTMLNames::srcAttr).string());
+ context.setSrc(node->document()->completeURL(src).string().utf8().data());
}
}
if (node->isTextNode()) {
Text* curText = static_cast<Text*>(node.get());
if (!curText->wholeText().isEmpty())
- context.setText(curText->wholeText());
+ context.setText(curText->wholeText().utf8().data());
}
if (node->isElementNode()) {
Element* element = static_cast<Element*>(node->shadowAncestorNode());
if (DOMSupport::isTextBasedContentEditableElement(element)) {
- context.setFlag(ActiveNodeContext::IsInput);
+ context.setFlag(Platform::WebContext::IsInput);
if (element->hasTagName(HTMLNames::inputTag))
- context.setFlag(ActiveNodeContext::IsSingleLine);
+ context.setFlag(Platform::WebContext::IsSingleLine);
if (DOMSupport::isPasswordElement(element))
- context.setFlag(ActiveNodeContext::IsPassword);
+ context.setFlag(Platform::WebContext::IsPassword);
String elementText(DOMSupport::inputElementText(element));
if (!elementText.stripWhiteSpace().isEmpty())
- context.setText(elementText);
+ context.setText(elementText.utf8().data());
}
}
if (node->isFocusable())
- context.setFlag(ActiveNodeContext::IsFocusable);
+ context.setFlag(Platform::WebContext::IsFocusable);
return context;
}
-ActiveNodeContext WebPage::activeNodeContext(TargetDetectionStrategy strategy) const
+Platform::WebContext WebPage::webContext(TargetDetectionStrategy strategy) const
{
- return d->activeNodeContext(strategy);
+ return d->webContext(strategy);
}
void WebPagePrivate::updateCursor()
@@ -2090,7 +2241,7 @@ void WebPagePrivate::updateCursor()
else if (m_lastMouseEvent.button() == RightButton)
buttonMask = Platform::MouseEvent::ScreenRightMouseButton;
- Platform::MouseEvent event(buttonMask, buttonMask, mapToTransformed(m_lastMouseEvent.pos()), mapToTransformed(m_lastMouseEvent.globalPos()), 0, 0);
+ BlackBerry::Platform::MouseEvent event(buttonMask, buttonMask, mapToTransformed(m_lastMouseEvent.position()), mapToTransformed(m_lastMouseEvent.globalPosition()), 0, 0);
m_webPage->mouseEvent(event);
}
@@ -2347,6 +2498,8 @@ void WebPagePrivate::assignFocus(Platform::FocusDirection direction)
void WebPage::assignFocus(Platform::FocusDirection direction)
{
+ if (d->m_page->defersLoading())
+ return;
d->assignFocus(direction);
}
@@ -2398,7 +2551,7 @@ PassRefPtr<Node> WebPagePrivate::contextNode(TargetDetectionStrategy strategy)
if (isTouching)
contentPos = lastFatFingersResult.adjustedPosition();
else
- contentPos = mapFromViewportToContents(m_lastMouseEvent.pos());
+ contentPos = mapFromViewportToContents(m_lastMouseEvent.position());
if (strategy == RectBased) {
FatFingersResult result = FatFingers(this, lastFatFingersResult.adjustedPosition(), FatFingers::Text).findBestPoint();
@@ -2509,6 +2662,17 @@ Node* WebPagePrivate::adjustedBlockZoomNodeForZoomLimits(Node* node)
acceptableNodeSize = newScaleForBlockZoomRect(rectForNode(node), 1.0, 0) < maxBlockZoomScale();
}
+ // Don't use a node if it is too close to the size of the actual contents.
+ if (initialNode != node) {
+ IntRect nodeRect = rectForNode(node);
+ nodeRect = adjustRectOffsetForFrameOffset(nodeRect, node);
+ nodeRect.intersect(IntRect(IntPoint::zero(), contentsSize()));
+ int nodeArea = nodeRect.width() * nodeRect.height();
+ int pageArea = contentsSize().width() * contentsSize().height();
+ if (static_cast<double>(pageArea - nodeArea) / pageArea < minimumExpandingRatio)
+ return initialNode;
+ }
+
return node;
}
@@ -2645,7 +2809,7 @@ IntRect WebPagePrivate::blockZoomRectForNode(Node* node)
int originalArea = originalRect.width() * originalRect.height();
int pageArea = contentsSize().width() * contentsSize().height();
- double blockToPageRatio = static_cast<double>(1 - originalArea / pageArea);
+ double blockToPageRatio = static_cast<double>(pageArea - originalArea) / pageArea;
double blockExpansionRatio = 5.0 * blockToPageRatio * blockToPageRatio;
if (!tnode->hasTagName(HTMLNames::imgTag) && !tnode->hasTagName(HTMLNames::inputTag) && !tnode->hasTagName(HTMLNames::textareaTag)) {
@@ -2654,7 +2818,7 @@ IntRect WebPagePrivate::blockZoomRectForNode(Node* node)
IntRect tRect = rectForNode(tnode);
int tempBlockArea = tRect.width() * tRect.height();
// Don't expand the block if it will be too large relative to the content.
- if (static_cast<double>(1 - tempBlockArea / pageArea) < minimumExpandingRatio)
+ if (static_cast<double>(pageArea - tempBlockArea) / pageArea < minimumExpandingRatio)
break;
if (tRect.isEmpty())
continue; // No renderer.
@@ -2662,7 +2826,7 @@ IntRect WebPagePrivate::blockZoomRectForNode(Node* node)
continue; // The size of this parent is very close to the child, no need to go to this parent.
// Don't expand the block if the parent node size is already almost the size of actual visible size.
IntSize actualSize = actualVisibleSize();
- if (static_cast<double>(1 - tRect.width() / actualSize.width()) < minimumExpandingRatio)
+ if (static_cast<double>(actualSize.width() - tRect.width()) / actualSize.width() < minimumExpandingRatio)
break;
if (tempBlockArea < blockExpansionRatio * originalArea) {
blockRect = tRect;
@@ -2825,7 +2989,7 @@ void WebPage::destroy()
if (loader)
loader->detachFromParent();
- delete this;
+ deleteGuardedObject(this);
}
WebPageClient* WebPage::client() const
@@ -2879,12 +3043,50 @@ bool WebPage::isVisible() const
return d->m_visible;
}
+#if ENABLE(PAGE_VISIBILITY_API)
+class DeferredTaskSetPageVisibilityState: public DeferredTask<&WebPagePrivate::m_wouldSetPageVisibilityState> {
+public:
+ explicit DeferredTaskSetPageVisibilityState(WebPagePrivate* webPagePrivate)
+ : DeferredTaskType(webPagePrivate)
+ {
+ }
+private:
+ virtual void performInternal(WebPagePrivate* webPagePrivate)
+ {
+ webPagePrivate->setPageVisibilityState();
+ }
+};
+
+void WebPagePrivate::setPageVisibilityState()
+{
+ if (m_page->defersLoading())
+ m_deferredTasks.append(adoptPtr(new DeferredTaskSetPageVisibilityState(this)));
+ else {
+ DeferredTaskSetPageVisibilityState::finishOrCancel(this);
+
+ static bool s_initialVisibilityState = true;
+
+ m_page->setVisibilityState(m_visible && m_activationState == ActivationActive ? PageVisibilityStateVisible : PageVisibilityStateHidden, s_initialVisibilityState);
+ s_initialVisibilityState = false;
+ }
+}
+#endif
+
+void WebPagePrivate::setVisible(bool visible)
+{
+ m_visible = visible;
+
+#if ENABLE(PAGE_VISIBILITY_API)
+ setPageVisibilityState();
+#endif
+}
+
void WebPage::setVisible(bool visible)
{
if (d->m_visible == visible)
return;
- d->m_visible = visible;
+ d->setVisible(visible);
if (!visible) {
d->suspendBackingStore();
@@ -2903,6 +3105,7 @@ void WebPage::setVisible(bool visible)
// And release layer resources can reduce memory consumption.
d->suspendRootLayerCommit();
#endif
+
return;
}
@@ -2971,6 +3174,8 @@ bool WebPage::setBatchEditingActive(bool active)
bool WebPage::setInputSelection(unsigned start, unsigned end)
{
+ if (d->m_page->defersLoading())
+ return false;
return d->m_inputHandler->setSelection(start, end);
}
@@ -2979,23 +3184,101 @@ int WebPage::inputCaretPosition() const
return d->m_inputHandler->caretPosition();
}
-void WebPage::popupListClosed(int size, bool* selecteds)
+class DeferredTaskPopupListSelectMultiple: public DeferredTask<&WebPagePrivate::m_wouldPopupListSelectMultiple> {
+public:
+ DeferredTaskPopupListSelectMultiple(WebPagePrivate* webPagePrivate, int size, const bool* selecteds)
+ : DeferredTaskType(webPagePrivate)
+ {
+ webPagePrivate->m_cachedPopupListSelecteds.append(selecteds, size);
+ }
+private:
+ virtual void performInternal(WebPagePrivate* webPagePrivate)
+ {
+ webPagePrivate->m_webPage->popupListClosed(webPagePrivate->m_cachedPopupListSelecteds.size(), webPagePrivate->m_cachedPopupListSelecteds.data());
+ }
+};
+
+class DeferredTaskPopupListSelectSingle: public DeferredTask<&WebPagePrivate::m_wouldPopupListSelectSingle> {
+public:
+ explicit DeferredTaskPopupListSelectSingle(WebPagePrivate* webPagePrivate, int index)
+ : DeferredTaskType(webPagePrivate)
+ {
+ webPagePrivate->m_cachedPopupListSelectedIndex = index;
+ }
+private:
+ virtual void performInternal(WebPagePrivate* webPagePrivate)
+ {
+ webPagePrivate->m_webPage->popupListClosed(webPagePrivate->m_cachedPopupListSelectedIndex);
+ }
+};
+
+void WebPage::popupListClosed(int size, const bool* selecteds)
{
+ DeferredTaskPopupListSelectSingle::finishOrCancel(d);
+ if (d->m_page->defersLoading()) {
+ d->m_deferredTasks.append(adoptPtr(new DeferredTaskPopupListSelectMultiple(d, size, selecteds)));
+ return;
+ }
+ DeferredTaskPopupListSelectMultiple::finishOrCancel(d);
d->m_inputHandler->setPopupListIndexes(size, selecteds);
}
void WebPage::popupListClosed(int index)
{
+ DeferredTaskPopupListSelectMultiple::finishOrCancel(d);
+ if (d->m_page->defersLoading()) {
+ d->m_deferredTasks.append(adoptPtr(new DeferredTaskPopupListSelectSingle(d, index)));
+ return;
+ }
+ DeferredTaskPopupListSelectSingle::finishOrCancel(d);
d->m_inputHandler->setPopupListIndex(index);
}
+class DeferredTaskSetDateTimeInput: public DeferredTask<&WebPagePrivate::m_wouldSetDateTimeInput> {
+public:
+ explicit DeferredTaskSetDateTimeInput(WebPagePrivate* webPagePrivate, WebString value)
+ : DeferredTaskType(webPagePrivate)
+ {
+ webPagePrivate->m_cachedDateTimeInput = value;
+ }
+private:
+ virtual void performInternal(WebPagePrivate* webPagePrivate)
+ {
+ webPagePrivate->m_webPage->setDateTimeInput(webPagePrivate->m_cachedDateTimeInput);
+ }
+};
+
void WebPage::setDateTimeInput(const WebString& value)
{
+ if (d->m_page->defersLoading()) {
+ d->m_deferredTasks.append(adoptPtr(new DeferredTaskSetDateTimeInput(d, value)));
+ return;
+ }
+ DeferredTaskSetDateTimeInput::finishOrCancel(d);
d->m_inputHandler->setInputValue(String(value.impl()));
}
+class DeferredTaskSetColorInput: public DeferredTask<&WebPagePrivate::m_wouldSetColorInput> {
+public:
+ explicit DeferredTaskSetColorInput(WebPagePrivate* webPagePrivate, WebString value)
+ : DeferredTaskType(webPagePrivate)
+ {
+ webPagePrivate->m_cachedColorInput = value;
+ }
+private:
+ virtual void performInternal(WebPagePrivate* webPagePrivate)
+ {
+ webPagePrivate->m_webPage->setColorInput(webPagePrivate->m_cachedColorInput);
+ }
+};
+
void WebPage::setColorInput(const WebString& value)
{
+ if (d->m_page->defersLoading()) {
+ d->m_deferredTasks.append(adoptPtr(new DeferredTaskSetColorInput(d, value)));
+ return;
+ }
+ DeferredTaskSetColorInput::finishOrCancel(d);
d->m_inputHandler->setInputValue(String(value.impl()));
}
@@ -3012,7 +3295,7 @@ void WebPage::resetVirtualViewportOnCommitted(bool reset)
IntSize WebPagePrivate::recomputeVirtualViewportFromViewportArguments()
{
- static ViewportArguments defaultViewportArguments;
+ static const ViewportArguments defaultViewportArguments;
if (m_viewportArguments == defaultViewportArguments)
return IntSize();
@@ -3021,9 +3304,11 @@ IntSize WebPagePrivate::recomputeVirtualViewportFromViewportArguments()
int deviceHeight = Platform::Graphics::Screen::primaryScreen()->height();
FloatSize currentPPI = Platform::Graphics::Screen::primaryScreen()->pixelsPerInch(-1);
int deviceDPI = int(roundf((currentPPI.width() + currentPPI.height()) / 2));
- if (m_viewportArguments.targetDensityDpi == ViewportArguments::ValueAuto) {
- // Auto means 160dpi if we leave it alone. This looks terrible for pages wanting 1:1.
- // FIXME: This is insufficient for devices with high dpi, as they will render content unreadably small.
+ if (m_viewportArguments.targetDensityDpi == ViewportArguments::ValueAuto
+ && !Platform::DeviceInfo::instance()->isMobile()) {
+ // If the content provider hasn't specified a target dpi and we have a large
+ // screen we assume the content is fine and set the targetDensityDpi to our dpi.
+ // On smaller screen mobile devices we skip this and use WebCore dpi scaling.
m_viewportArguments.targetDensityDpi = deviceDPI;
}
@@ -3098,6 +3383,15 @@ void WebPage::onInputLocaleChanged(bool isRTL)
void WebPagePrivate::suspendBackingStore()
{
#if USE(ACCELERATED_COMPOSITING)
+ if (m_backingStore->d->isOpenGLCompositing()) {
+ // A visible web page's backing store can be suspended when another web
+ // page is taking over the backing store.
+ if (m_visible)
+ setCompositorDrawsRootLayer(true);
+
+ return;
+ }
+
resetCompositingSurface();
#endif
}
@@ -3106,10 +3400,6 @@ void WebPagePrivate::resumeBackingStore()
{
ASSERT(m_webPage->isVisible());
-#if USE(ACCELERATED_COMPOSITING)
- setNeedsOneShotDrawingSynchronization();
-#endif
-
bool directRendering = m_backingStore->d->shouldDirectRenderingToWindow();
if (!m_backingStore->d->isActive()
|| shouldResetTilesWhenShown()
@@ -3117,6 +3407,12 @@ void WebPagePrivate::resumeBackingStore()
// We need to reset all tiles so that we do not show any tiles whose content may
// have been replaced by another WebPage instance (i.e. another tab).
BackingStorePrivate::setCurrentBackingStoreOwner(m_webPage);
+
+ // If we're OpenGL compositing, switching to accel comp drawing of the root layer
+ // is a good substitute for backingstore blitting.
+ if (m_backingStore->d->isOpenGLCompositing())
+ setCompositorDrawsRootLayer(!m_backingStore->d->isActive());
+
m_backingStore->d->orientationChanged(); // Updates tile geometry and creates visible tile buffer.
m_backingStore->d->resetTiles(true /* resetBackground */);
m_backingStore->d->updateTiles(false /* updateVisible */, false /* immediate */);
@@ -3125,10 +3421,17 @@ void WebPagePrivate::resumeBackingStore()
if (m_backingStore->d->renderVisibleContents() && !m_backingStore->d->isSuspended() && !directRendering)
m_backingStore->d->blitVisibleContents();
} else {
+ if (m_backingStore->d->isOpenGLCompositing())
+ setCompositorDrawsRootLayer(false);
+
// Rendering was disabled while we were hidden, so we need to update all tiles.
m_backingStore->d->updateTiles(true /* updateVisible */, false /* immediate */);
}
+#if USE(ACCELERATED_COMPOSITING)
+ setNeedsOneShotDrawingSynchronization();
+#endif
+
setShouldResetTilesWhenShown(false);
}
@@ -3411,6 +3714,9 @@ bool WebPage::mouseEvent(const Platform::MouseEvent& mouseEvent, bool* wheelDelt
if (!d->m_mainFrame->view())
return false;
+ if (d->m_page->defersLoading())
+ return false;
+
PluginView* pluginView = d->m_fullScreenPluginView.get();
if (pluginView)
return d->dispatchMouseEventToFullScreenPlugin(pluginView, mouseEvent);
@@ -3494,10 +3800,10 @@ bool WebPagePrivate::handleMouseEvent(PlatformMouseEvent& mouseEvent)
{
EventHandler* eventHandler = m_mainFrame->eventHandler();
- if (mouseEvent.eventType() == MouseEventMoved)
+ if (mouseEvent.type() == WebCore::PlatformEvent::MouseMoved)
return eventHandler->mouseMoved(mouseEvent);
- if (mouseEvent.eventType() == MouseEventScroll)
+ if (mouseEvent.type() == WebCore::PlatformEvent::MouseScroll)
return true;
Node* node = 0;
@@ -3509,11 +3815,12 @@ bool WebPagePrivate::handleMouseEvent(PlatformMouseEvent& mouseEvent)
}
if (!node) {
- HitTestResult result = eventHandler->hitTestResultAtPoint(mapFromViewportToContents(mouseEvent.pos()), false /*allowShadowContent*/);
+ HitTestResult result = eventHandler->hitTestResultAtPoint(mapFromViewportToContents(mouseEvent.position()), false /*allowShadowContent*/);
node = result.innerNode();
}
- if (mouseEvent.eventType() == MouseEventPressed) {
+ if (mouseEvent.type() == WebCore::PlatformEvent::MousePressed) {
+ m_inputHandler->enableInputMode();
if (m_inputHandler->willOpenPopupForNode(node)) {
// Do not allow any human generated mouse or keyboard events to select <option>s in the list box
// because we use a pop up dialog to handle the actual selections. This prevents options from
@@ -3533,7 +3840,7 @@ bool WebPagePrivate::handleMouseEvent(PlatformMouseEvent& mouseEvent)
}
} else
eventHandler->handleMousePressEvent(mouseEvent);
- } else if (mouseEvent.eventType() == MouseEventReleased) {
+ } else if (mouseEvent.type() == WebCore::PlatformEvent::MouseReleased) {
// FIXME: For <select> and <options> elements, we explicitly do not forward this event to WebCore so
// as to preserve symmetry with the MouseEventPressed handling (above). This has the side-effect that
// mouseup events are not fired on such elements for human generated mouse release events. See RIM Bug #1579.
@@ -3586,13 +3893,16 @@ bool WebPage::touchEvent(const Platform::TouchEvent& event)
#endif
#if ENABLE(TOUCH_EVENTS)
+ if (!d->m_mainFrame)
+ return false;
+
+ if (d->m_page->defersLoading())
+ return false;
+
PluginView* pluginView = d->m_fullScreenPluginView.get();
if (pluginView)
return d->dispatchTouchEventToFullScreenPlugin(pluginView, event);
- if (!d->m_mainFrame)
- return false;
-
Platform::TouchEvent tEvent = event;
for (unsigned i = 0; i < event.m_points.size(); i++) {
tEvent.m_points[i].m_pos = d->mapFromTransformed(tEvent.m_points[i].m_pos);
@@ -3710,6 +4020,9 @@ bool WebPagePrivate::dispatchTouchEventToFullScreenPlugin(PluginView* plugin, co
bool WebPage::touchPointAsMouseEvent(const Platform::TouchPoint& point)
{
+ if (d->m_page->defersLoading())
+ return false;
+
PluginView* pluginView = d->m_fullScreenPluginView.get();
if (pluginView)
return d->dispatchTouchPointAsMouseEventToFullScreenPlugin(pluginView, point);
@@ -3755,11 +4068,15 @@ bool WebPagePrivate::dispatchTouchPointAsMouseEventToFullScreenPlugin(PluginView
void WebPage::touchEventCancel()
{
d->m_pluginMayOpenNewTab = false;
+ if (d->m_page->defersLoading())
+ return;
d->m_touchEventHandler->touchEventCancel();
}
void WebPage::touchEventCancelAndClearFocusedNode()
{
+ if (d->m_page->defersLoading())
+ return;
d->m_touchEventHandler->touchEventCancelAndClearFocusedNode();
}
@@ -3978,6 +4295,9 @@ bool WebPage::keyEvent(const Platform::KeyboardEvent& keyboardEvent)
if (!d->m_mainFrame->view())
return false;
+ if (d->m_page->defersLoading())
+ return false;
+
ASSERT(d->m_page->focusController());
bool handled = d->m_inputHandler->handleKeyboardInput(keyboardEvent);
@@ -3993,6 +4313,9 @@ bool WebPage::keyEvent(const Platform::KeyboardEvent& keyboardEvent)
bool WebPage::deleteTextRelativeToCursor(unsigned int leftOffset, unsigned int rightOffset)
{
+ if (d->m_page->defersLoading())
+ return false;
+
return d->m_inputHandler->deleteTextRelativeToCursor(leftOffset, rightOffset);
}
@@ -4028,11 +4351,15 @@ int32_t WebPage::finishComposition()
int32_t WebPage::setComposingText(spannable_string_t* spannableString, int32_t relativeCursorPosition)
{
+ if (d->m_page->defersLoading())
+ return -1;
return d->m_inputHandler->setComposingText(spannableString, relativeCursorPosition);
}
int32_t WebPage::commitText(spannable_string_t* spannableString, int32_t relativeCursorPosition)
{
+ if (d->m_page->defersLoading())
+ return -1;
return d->m_inputHandler->commitText(spannableString, relativeCursorPosition);
}
@@ -4041,8 +4368,26 @@ void WebPage::setSpellCheckingEnabled(bool enabled)
static_cast<EditorClientBlackBerry*>(d->m_page->editorClient())->enableSpellChecking(enabled);
}
+class DeferredTaskSelectionCancelled: public DeferredTask<&WebPagePrivate::m_wouldCancelSelection> {
+public:
+ explicit DeferredTaskSelectionCancelled(WebPagePrivate* webPagePrivate)
+ : DeferredTaskType(webPagePrivate)
+ {
+ }
+private:
+ virtual void performInternal(WebPagePrivate* webPagePrivate)
+ {
+ webPagePrivate->m_webPage->selectionCancelled();
+ }
+};
+
void WebPage::selectionCancelled()
{
+ if (d->m_page->defersLoading()) {
+ d->m_deferredTasks.append(adoptPtr(new DeferredTaskSelectionCancelled(d)));
+ return;
+ }
+ DeferredTaskSelectionCancelled::finishOrCancel(d);
d->m_selectionHandler->cancelSelection();
}
@@ -4066,23 +4411,29 @@ WebString WebPage::selectedText() const
WebString WebPage::cutSelectedText()
{
WebString selectedText = d->m_selectionHandler->selectedText();
- if (!selectedText.isEmpty())
+ if (!d->m_page->defersLoading() && !selectedText.isEmpty())
d->m_inputHandler->deleteSelection();
return selectedText;
}
void WebPage::insertText(const WebString& string)
{
+ if (d->m_page->defersLoading())
+ return;
d->m_inputHandler->insertText(string);
}
void WebPage::clearCurrentInputField()
{
+ if (d->m_page->defersLoading())
+ return;
d->m_inputHandler->clearField();
}
void WebPage::cut()
{
+ if (d->m_page->defersLoading())
+ return;
d->m_inputHandler->cut();
}
@@ -4093,11 +4444,15 @@ void WebPage::copy()
void WebPage::paste()
{
+ if (d->m_page->defersLoading())
+ return;
d->m_inputHandler->paste();
}
void WebPage::setSelection(const Platform::IntPoint& startPoint, const Platform::IntPoint& endPoint)
{
+ if (d->m_page->defersLoading())
+ return;
// Transform this events coordinates to webkit content coordinates.
// FIXME: Don't transform the sentinel, because it may be transformed to a floating number
// which could be rounded to 0 or other numbers. This workaround should be removed after
@@ -4112,6 +4467,8 @@ void WebPage::setSelection(const Platform::IntPoint& startPoint, const Platform:
void WebPage::setCaretPosition(const Platform::IntPoint& position)
{
+ if (d->m_page->defersLoading())
+ return;
// Handled by selection handler as it's point based.
// Transform this events coordinates to webkit content coordinates.
d->m_selectionHandler->setCaretPosition(d->mapFromTransformed(position));
@@ -4119,6 +4476,8 @@ void WebPage::setCaretPosition(const Platform::IntPoint& position)
void WebPage::selectAtPoint(const Platform::IntPoint& location)
{
+ if (d->m_page->defersLoading())
+ return;
// Transform this events coordinates to webkit content coordinates if it
// is not the sentinel value.
IntPoint selectionLocation =
@@ -4343,7 +4702,7 @@ bool WebPage::blockZoom(int x, int y)
IntRect tRect = d->mapFromTransformed(blockRect);
int blockArea = tRect.width() * tRect.height();
int pageArea = d->contentsSize().width() * d->contentsSize().height();
- double blockToPageRatio = static_cast<double>(1 - blockArea / pageArea);
+ double blockToPageRatio = static_cast<double>(pageArea - blockArea) / pageArea;
if (blockToPageRatio < minimumExpandingRatio) {
// Restore old adjust node because zoom was canceled.
d->m_currentBlockZoomAdjustedNode = tempBlockZoomAdjustedNode;
@@ -4552,8 +4911,27 @@ bool WebPage::zoomToOneOne()
return d->zoomAboutPoint(scale, d->centerOfVisibleContentsRect());
}
+class DeferredTaskSetFocused: public DeferredTask<&WebPagePrivate::m_wouldSetFocused> {
+public:
+ explicit DeferredTaskSetFocused(WebPagePrivate* webPagePrivate, bool focused)
+ : DeferredTaskType(webPagePrivate)
+ {
+ webPagePrivate->m_cachedFocused = focused;
+ }
+private:
+ virtual void performInternal(WebPagePrivate* webPagePrivate)
+ {
+ webPagePrivate->m_webPage->setFocused(webPagePrivate->m_cachedFocused);
+ }
+};
+
void WebPage::setFocused(bool focused)
{
+ if (d->m_page->defersLoading()) {
+ d->m_deferredTasks.append(adoptPtr(new DeferredTaskSetFocused(d, focused)));
+ return;
+ }
+ DeferredTaskSetFocused::finishOrCancel(d);
FocusController* focusController = d->m_page->focusController();
focusController->setActive(focused);
if (focused) {
@@ -4564,9 +4942,18 @@ void WebPage::setFocused(bool focused)
focusController->setFocused(focused);
}
-bool WebPage::findNextString(const char* text, bool forward)
+bool WebPage::findNextString(const char* text, bool forward, bool caseSensitive, bool wrap, bool highlightAllMatches)
{
- return d->m_inPageSearchManager->findNextString(String::fromUTF8(text), forward);
+ WebCore::FindOptions findOptions = WebCore::StartInSelection;
+ if (!forward)
+ findOptions |= WebCore::Backwards;
+ if (!caseSensitive)
+ findOptions |= WebCore::CaseInsensitive;
+
+ // The WebCore::FindOptions::WrapAround boolean actually wraps the search
+ // within the current frame as opposed to the entire Document, so we have to
+ // provide our own wrapping code to wrap at the whole Document level.
+ return d->m_inPageSearchManager->findNextString(String::fromUTF8(text), findOptions, wrap, highlightAllMatches);
}
void WebPage::runLayoutTests()
@@ -4771,8 +5158,24 @@ void WebPage::clearCookies()
void WebPage::clearLocalStorage()
{
- BlackBerry::WebKit::clearLocalStorage(d->m_page->groupName());
- clearDatabase(d->m_page->groupName());
+ if (PageGroup* group = d->m_page->groupPtr()) {
+ if (StorageNamespace* storage = group->localStorage())
+ storage->clearAllOriginsForDeletion();
+ }
+}
+
+void WebPage::clearCredentials()
+{
+#if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST)
+ credentialManager().clearCredentials();
+#endif
+}
+
+void WebPage::clearNeverRememberSites()
+{
+#if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST)
+ credentialManager().clearNeverRememberSites();
+#endif
}
void WebPage::clearCache()
@@ -4943,6 +5346,15 @@ void WebPage::notifyDeviceIdleStateChange(bool enterIdle)
(*it)->handleIdleEvent(enterIdle);
}
+void WebPagePrivate::notifyAppActivationStateChange(ActivationStateType activationState)
+{
+ m_activationState = activationState;
+
+#if ENABLE(PAGE_VISIBILITY_API)
+ setPageVisibilityState();
+#endif
+}
+
void WebPage::notifyAppActivationStateChange(ActivationStateType activationState)
{
#if ENABLE(VIDEO)
@@ -4960,11 +5372,10 @@ void WebPage::notifyAppActivationStateChange(ActivationStateType activationState
case ActivationStandby:
(*it)->handleAppStandbyEvent();
break;
- default: // FIXME: Get rid of the default to force a compiler error instead of using a runtime error. See PR #121109.
- ASSERT_NOT_REACHED();
- break;
}
}
+
+ d->notifyAppActivationStateChange(activationState);
}
void WebPage::notifySwipeEvent()
@@ -5043,10 +5454,41 @@ void WebPage::disablePasswordEcho()
void WebPage::dispatchInspectorMessage(const std::string& message)
{
- String stringMessage(message.c_str(), message.length());
+ String stringMessage = String::fromUTF8(message.data(), message.length());
d->m_page->inspectorController()->dispatchMessageFromFrontend(stringMessage);
}
+bool WebPagePrivate::compositorDrawsRootLayer() const
+{
+#if USE(ACCELERATED_COMPOSITING)
+ if (Platform::userInterfaceThreadMessageClient()->isCurrentThread())
+ return m_compositor && m_compositor->drawsRootLayer();
+
+ // WebKit thread implementation:
+ RenderView* renderView = m_mainFrame->contentRenderer();
+ if (!renderView || !renderView->layer() || !renderView->layer()->backing())
+ return false;
+
+ return !renderView->layer()->backing()->paintingGoesToWindow();
+#else
+ return false;
+#endif
+}
+
+void WebPagePrivate::setCompositorDrawsRootLayer(bool compositorDrawsRootLayer)
+{
+#if USE(ACCELERATED_COMPOSITING)
+ if (m_page->settings()->forceCompositingMode() == compositorDrawsRootLayer)
+ return;
+
+ // When the BlackBerry port forces compositing mode, the root layer stops
+ // painting to window and starts painting to layer instead.
+ m_page->settings()->setForceCompositingMode(compositorDrawsRootLayer);
+ if (FrameView* view = m_mainFrame->view())
+ view->updateCompositingLayers();
+#endif
+}
+
#if USE(ACCELERATED_COMPOSITING)
void WebPagePrivate::drawLayersOnCommit()
{
@@ -5055,7 +5497,7 @@ void WebPagePrivate::drawLayersOnCommit()
// animations. And only if we don't need a one shot drawing sync.
ASSERT(!needsOneShotDrawingSynchronization());
- if (!m_webPage->isVisible() || !m_backingStore->d->isActive())
+ if (!m_webPage->isVisible())
return;
m_backingStore->d->willDrawLayersOnCommit();
@@ -5065,52 +5507,12 @@ void WebPagePrivate::drawLayersOnCommit()
return;
}
- if (m_client->window()->windowUsage() == Platform::Graphics::Window::GLES2Usage) {
- m_backingStore->d->blitVisibleContents();
- return; // blitVisibleContents() includes drawSubLayers() in this case.
- }
-
- if (!drawSubLayers())
- return;
-
- // If we use the compositing surface, we need to re-blit the
- // backingstore and blend the compositing surface on top of that
- // in order to get the newly drawn layers on screen.
- if (!SurfacePool::globalSurfacePool()->compositingSurface())
- return;
-
- // If there are no visible layers, return early.
- if (lastCompositingResults().isEmpty() && lastCompositingResults().wasEmpty)
- return;
-
- if (m_backingStore->d->shouldDirectRenderingToWindow())
- return;
-
- m_backingStore->d->blitVisibleContents();
-}
-
-bool WebPagePrivate::drawSubLayers(const IntRect& dstRect, const FloatRect& contents)
-{
- ASSERT(Platform::userInterfaceThreadMessageClient()->isCurrentThread());
- if (!Platform::userInterfaceThreadMessageClient()->isCurrentThread())
- return false;
-
- if (m_compositor) {
- m_compositor->setCompositingOntoMainWindow(
- m_client->window()->windowUsage() == Platform::Graphics::Window::GLES2Usage);
- return m_compositor->drawLayers(dstRect, contents);
- }
-
- return false;
-}
-
-bool WebPagePrivate::drawSubLayers()
-{
- ASSERT(Platform::userInterfaceThreadMessageClient()->isCurrentThread());
- if (!Platform::userInterfaceThreadMessageClient()->isCurrentThread())
- return false;
+#if DEBUG_AC_COMMIT
+ Platform::log(Platform::LogLevelCritical, "%s", WTF_PRETTY_FUNCTION);
+#endif
- return m_backingStore->d->drawSubLayers();
+ if (!m_backingStore->d->shouldDirectRenderingToWindow())
+ m_backingStore->d->blitVisibleContents();
}
void WebPagePrivate::scheduleRootLayerCommit()
@@ -5119,8 +5521,12 @@ void WebPagePrivate::scheduleRootLayerCommit()
return;
m_needsCommit = true;
- if (!m_rootLayerCommitTimer->isActive())
+ if (!m_rootLayerCommitTimer->isActive()) {
+#if DEBUG_AC_COMMIT
+ Platform::log(Platform::LogLevelCritical, "%s: m_rootLayerCommitTimer->isActive() = %d", WTF_PRETTY_FUNCTION, m_rootLayerCommitTimer->isActive());
+#endif
m_rootLayerCommitTimer->startOneShot(0);
+ }
}
static bool needsLayoutRecursive(FrameView* view)
@@ -5147,19 +5553,57 @@ LayerRenderingResults WebPagePrivate::lastCompositingResults() const
return LayerRenderingResults();
}
+void WebPagePrivate::setCompositor(PassRefPtr<WebPageCompositorPrivate> compositor)
+{
+ using namespace BlackBerry::Platform;
+
+ // The m_compositor member has to be modified during a sync call for thread
+ // safe access to m_compositor and its refcount.
+ if (!userInterfaceThreadMessageClient()->isCurrentThread()) {
+ userInterfaceThreadMessageClient()->dispatchSyncMessage(createMethodCallMessage(&WebPagePrivate::setCompositor, this, compositor));
+ return;
+ }
+
+ m_compositor = compositor;
+
+ // The previous compositor, if any, has now released it's OpenGL resources,
+ // so we can safely free the owned context, if any.
+ m_ownedContext.clear();
+}
+
void WebPagePrivate::commitRootLayer(const IntRect& layoutRectForCompositing,
- const IntSize& contentsSizeForCompositing)
+ const IntSize& contentsSizeForCompositing,
+ bool drawsRootLayer)
{
+#if DEBUG_AC_COMMIT
+ Platform::log(Platform::LogLevelCritical, "%s: m_compositor = 0x%x",
+ WTF_PRETTY_FUNCTION, m_compositor.get());
+#endif
+
if (!m_frameLayers || !m_compositor)
return;
+ if (m_frameLayers->rootLayer() && m_frameLayers->rootLayer()->layerCompositingThread() != m_compositor->rootLayer())
+ m_compositor->setRootLayer(m_frameLayers->rootLayer()->layerCompositingThread());
+
m_compositor->setLayoutRectForCompositing(layoutRectForCompositing);
m_compositor->setContentsSizeForCompositing(contentsSizeForCompositing);
+ m_compositor->setDrawsRootLayer(drawsRootLayer);
m_compositor->commit(m_frameLayers->rootLayer());
}
bool WebPagePrivate::commitRootLayerIfNeeded()
{
+#if DEBUG_AC_COMMIT
+ Platform::log(Platform::LogLevelCritical, "%s: m_suspendRootLayerCommit = %d, m_needsCommit = %d, m_frameLayers = 0x%x, m_frameLayers->hasLayer() = %d, needsLayoutRecursive() = %d",
+ WTF_PRETTY_FUNCTION,
+ m_suspendRootLayerCommit,
+ m_needsCommit,
+ m_frameLayers.get(),
+ m_frameLayers && m_frameLayers->hasLayer(),
+ m_mainFrame && m_mainFrame->view() && needsLayoutRecursive(m_mainFrame->view()));
+#endif
+
if (m_suspendRootLayerCommit)
return false;
@@ -5199,6 +5643,7 @@ bool WebPagePrivate::commitRootLayerIfNeeded()
// and that's what the layer renderer wants.
IntRect layoutRectForCompositing(scrollPosition(), actualVisibleSize());
IntSize contentsSizeForCompositing = contentsSize();
+ bool drawsRootLayer = compositorDrawsRootLayer();
// Commit changes made to the layers synchronously with the compositing thread.
Platform::userInterfaceThreadMessageClient()->dispatchSyncMessage(
@@ -5206,7 +5651,8 @@ bool WebPagePrivate::commitRootLayerIfNeeded()
&WebPagePrivate::commitRootLayer,
this,
layoutRectForCompositing,
- contentsSizeForCompositing));
+ contentsSizeForCompositing,
+ drawsRootLayer));
return true;
}
@@ -5216,6 +5662,10 @@ void WebPagePrivate::rootLayerCommitTimerFired(Timer<WebPagePrivate>*)
if (m_suspendRootLayerCommit)
return;
+#if DEBUG_AC_COMMIT
+ Platform::log(Platform::LogLevelCritical, "%s", WTF_PRETTY_FUNCTION);
+#endif
+
// The commit timer may have fired just before the layout timer, or for some
// other reason we need layout. It's not allowed to commit when a layout is
// pending, becaues a commit can cause parts of the web page to be rendered
@@ -5224,20 +5674,30 @@ void WebPagePrivate::rootLayerCommitTimerFired(Timer<WebPagePrivate>*)
// to handle a one shot drawing synchronization after the layout.
requestLayoutIfNeeded();
- bool isSingleTargetWindow = SurfacePool::globalSurfacePool()->compositingSurface()
- || m_client->window()->windowUsage() == Platform::Graphics::Window::GLES2Usage;
-
- // If we are doing direct rendering and have a single rendering target,
- // committing is equivalent to a one shot drawing synchronization.
- // We need to re-render the web page, re-render the layers, and
- // then blit them on top of the re-rendered web page.
- if (isSingleTargetWindow && m_backingStore->d->shouldDirectRenderingToWindow())
- setNeedsOneShotDrawingSynchronization();
+ // If we transitioned to drawing the root layer using compositor instead of
+ // backing store, doing a one shot drawing synchronization with the
+ // backing store is never necessary, because the backing store draws
+ // nothing.
+ if (!compositorDrawsRootLayer()) {
+ bool isSingleTargetWindow = SurfacePool::globalSurfacePool()->compositingSurface()
+ || m_backingStore->d->isOpenGLCompositing();
+
+ // If we are doing direct rendering and have a single rendering target,
+ // committing is equivalent to a one shot drawing synchronization.
+ // We need to re-render the web page, re-render the layers, and
+ // then blit them on top of the re-rendered web page.
+ if (isSingleTargetWindow && m_backingStore->d->shouldDirectRenderingToWindow())
+ setNeedsOneShotDrawingSynchronization();
+
+ if (needsOneShotDrawingSynchronization()) {
+#if DEBUG_AC_COMMIT
+ Platform::log(Platform::LogLevelCritical, "%s: OneShotDrawingSynchronization code path!", WTF_PRETTY_FUNCTION);
+#endif
- if (needsOneShotDrawingSynchronization()) {
- const IntRect windowRect = IntRect(IntPoint::zero(), viewportSize());
- m_backingStore->d->repaint(windowRect, true /*contentChanged*/, true /*immediate*/);
- return;
+ const IntRect windowRect = IntRect(IntPoint::zero(), viewportSize());
+ m_backingStore->d->repaint(windowRect, true /*contentChanged*/, true /*immediate*/);
+ return;
+ }
}
// If the web page needs layout, the commit will fail.
@@ -5246,28 +5706,6 @@ void WebPagePrivate::rootLayerCommitTimerFired(Timer<WebPagePrivate>*)
drawLayersOnCommit();
}
-void WebPagePrivate::setIsAcceleratedCompositingActive(bool active)
-{
- // Backing store can be null here because it happens during teardown.
- if (m_isAcceleratedCompositingActive == active || !m_backingStore)
- return;
-
- m_isAcceleratedCompositingActive = active;
-
- if (!active) {
- m_compositor.clear();
- resetCompositingSurface();
- return;
- }
-
- if (!m_compositor) {
- m_compositor = adoptPtr(new WebPageCompositor(this));
- m_isAcceleratedCompositingActive = m_compositor->hardwareCompositing();
- if (!m_isAcceleratedCompositingActive)
- m_compositor.clear();
- }
-}
-
void WebPagePrivate::resetCompositingSurface()
{
if (!Platform::userInterfaceThreadMessageClient()->isCurrentThread()) {
@@ -5319,19 +5757,13 @@ void WebPagePrivate::setRootLayerCompositingThread(LayerCompositingThread* layer
return;
}
- // Depending on whether we have a root layer or not,
- // this method will turn on or off accelerated compositing.
if (!layer) {
- // Don't ASSERT(m_compositor) here because we may be called in
- // the process of destruction of WebPage where we have already
- // called syncDestroyCompositorOnCompositingThread() to destroy
- // the compositor.
- setIsAcceleratedCompositingActive(false);
- return;
- }
-
- if (!m_compositor)
- setIsAcceleratedCompositingActive(true);
+ // Keep the compositor around, a single web page will frequently enter
+ // and leave compositing mode many times. Instead we destroy it when
+ // navigating to a new page.
+ resetCompositingSurface();
+ } else if (!m_compositor)
+ createCompositor();
// Don't ASSERT(m_compositor) here because setIsAcceleratedCompositingActive(true)
// may not turn accelerated compositing on since m_backingStore is 0.
@@ -5339,9 +5771,34 @@ void WebPagePrivate::setRootLayerCompositingThread(LayerCompositingThread* layer
m_compositor->setRootLayer(layer);
}
+bool WebPagePrivate::createCompositor()
+{
+ // If there's no window, the compositor will be supplied by the API client
+ if (!m_client->window())
+ return false;
+
+ m_ownedContext = GLES2Context::create(this);
+ m_compositor = WebPageCompositorPrivate::create(this, 0);
+ m_compositor->setContext(m_ownedContext.get());
+
+ if (!m_compositor->hardwareCompositing()) {
+ destroyCompositor();
+ return false;
+ }
+
+ return true;
+}
+
void WebPagePrivate::destroyCompositor()
{
- m_compositor.clear();
+ // We shouldn't release the compositor unless we created and own the
+ // context. If the compositor was created from the WebPageCompositor API,
+ // keep it around and reuse it later.
+ if (!m_ownedContext)
+ return;
+
+ m_compositor.clear();
+ m_ownedContext.clear();
}
void WebPagePrivate::syncDestroyCompositorOnCompositingThread()
@@ -5366,7 +5823,7 @@ void WebPagePrivate::suspendRootLayerCommit()
m_suspendRootLayerCommit = true;
- if (!m_frameLayers || !m_frameLayers->hasLayer() || !m_compositor)
+ if (!m_compositor)
return;
Platform::userInterfaceThreadMessageClient()->dispatchSyncMessage(
@@ -5392,6 +5849,11 @@ bool WebPagePrivate::needsOneShotDrawingSynchronization()
void WebPagePrivate::setNeedsOneShotDrawingSynchronization()
{
+ if (compositorDrawsRootLayer()) {
+ scheduleRootLayerCommit();
+ return;
+ }
+
// This means we have to commit layers on next render, or render on the next commit,
// whichever happens first.
m_needsCommit = true;
@@ -5477,9 +5939,6 @@ void WebPagePrivate::didChangeSettings(WebSettings* webSettings)
coreSettings->setDownloadableBinaryFontsEnabled(webSettings->downloadableBinaryFontsEnabled());
coreSettings->setSpatialNavigationEnabled(m_webSettings->isSpatialNavigationEnabled());
- // UserScalable should be reset by new settings.
- setUserScalable(webSettings->isUserScalable());
-
WebString stylesheetURL = webSettings->userStyleSheetString();
if (stylesheetURL.isEmpty())
stylesheetURL = webSettings->userStyleSheetLocation();
@@ -5599,5 +6058,24 @@ void WebPagePrivate::frameUnloaded(const Frame* frame)
m_inPageSearchManager->frameUnloaded(frame);
}
+const String& WebPagePrivate::defaultUserAgent()
+{
+ static String* defaultUserAgent = new String;
+ if (defaultUserAgent->isEmpty()) {
+ BlackBerry::Platform::DeviceInfo* info = BlackBerry::Platform::DeviceInfo::instance();
+ char uaBuffer[256];
+ int uaSize = snprintf(uaBuffer, 256, "Mozilla/5.0 (%s) AppleWebKit/%d.%d+ (KHTML, like Gecko) Version/%s %sSafari/%d.%d+",
+ info->family(), WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION, info->osVersion(),
+ info->isMobile() ? "Mobile " : "", WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION);
+
+ if (uaSize <= 0 || uaSize >= 256)
+ BLACKBERRY_CRASH();
+
+ defaultUserAgent->append(uaBuffer);
+ }
+
+ return *defaultUserAgent;
+}
+
}
}
diff --git a/Source/WebKit/blackberry/Api/WebPage.h b/Source/WebKit/blackberry/Api/WebPage.h
index 3a883ce66..82d4ef6ea 100644
--- a/Source/WebKit/blackberry/Api/WebPage.h
+++ b/Source/WebKit/blackberry/Api/WebPage.h
@@ -19,10 +19,12 @@
#ifndef WebPage_h
#define WebPage_h
-#include "ActiveNodeContext.h"
#include "BlackBerryGlobal.h"
+#include "WebString.h"
+
#include <BlackBerryPlatformGuardedPointer.h>
#include <BlackBerryPlatformInputEvents.h>
+#include <BlackBerryPlatformWebContext.h>
#include <imf/input_data.h>
#include <network/NetworkRequest.h>
@@ -60,9 +62,11 @@ class BackingStoreClient;
class BackingStorePrivate;
class RenderQueue;
class WebPageClient;
+class WebPageCompositor;
class WebPageGroupLoadDeferrer;
class WebPagePrivate;
class WebSettings;
+class WebViewportArguments;
enum JavaScriptDataType { JSUndefined = 0, JSNull, JSBoolean, JSNumber, JSString, JSObject, JSException, JSDataTypeMax };
@@ -171,6 +175,7 @@ public:
bool pinchZoomAboutPoint(double scale, int x, int y);
bool isUserScalable() const;
+ void setUserScalable(bool);
double currentScale() const;
double initialScale() const;
double zoomToFitScale() const;
@@ -189,14 +194,14 @@ public:
void clearCookies();
void clearCache();
void clearLocalStorage();
+ void clearCredentials();
+ void clearNeverRememberSites();
void runLayoutTests();
- // Finds and selects the next utf8 string that is a case sensitive
- // match in the web page. It will wrap the web page if it reaches
- // the end. An empty string will result in no match and no selection.
- // Returns true if the string matched and false if not.
- bool findNextString(const char*, bool forward = true);
+ // Find the next utf8 string in the given direction.
+ // Case sensitivity, wrapping, and highlighting all matches are also toggleable.
+ bool findNextString(const char*, bool forward, bool caseSensitive, bool wrap, bool highlightAllMatches);
// JavaScriptDebugger interface.
bool enableScriptDebugger();
@@ -246,7 +251,7 @@ public:
void selectionCancelled();
bool selectionContains(const Platform::IntPoint&);
- void popupListClosed(int size, bool* selecteds);
+ void popupListClosed(int size, const bool* selecteds);
void popupListClosed(int index);
void setDateTimeInput(const WebString& value);
void setColorInput(const WebString& value);
@@ -257,7 +262,7 @@ public:
WebString textHasAttribute(const WebString& query) const;
- ActiveNodeContext activeNodeContext(TargetDetectionStrategy) const;
+ Platform::WebContext webContext(TargetDetectionStrategy) const;
typedef intptr_t BackForwardId;
struct BackForwardEntry {
@@ -324,13 +329,17 @@ public:
void destroyWebPageCompositor();
+ void setUserViewportArguments(const WebViewportArguments&);
+ void resetUserViewportArguments();
+
private:
- ~WebPage();
+ virtual ~WebPage();
friend class WebKit::BackingStore;
friend class WebKit::BackingStoreClient;
friend class WebKit::BackingStorePrivate;
friend class WebKit::RenderQueue;
+ friend class WebKit::WebPageCompositor;
friend class WebKit::WebPageGroupLoadDeferrer;
friend class WebKit::WebPagePrivate;
friend class WebCore::ChromeClientBlackBerry;
diff --git a/Source/WebKit/blackberry/Api/WebPageClient.h b/Source/WebKit/blackberry/Api/WebPageClient.h
index 6799d428e..329660963 100644
--- a/Source/WebKit/blackberry/Api/WebPageClient.h
+++ b/Source/WebKit/blackberry/Api/WebPageClient.h
@@ -77,6 +77,12 @@ public:
MediaInvalidError,
};
+ enum SaveCredentialType {
+ SaveCredentialNeverForThisSite = 0,
+ SaveCredentialNotNow,
+ SaveCredentialYes
+ };
+
virtual int getInstanceId() const = 0;
virtual void notifyLoadStarted() = 0;
@@ -129,7 +135,7 @@ public:
virtual void drawTapHighlight(const Platform::IntRectRegion&, int red, int green, int blue, int alpha, bool hideAfterScroll) = 0;
virtual void hideTapHighlight() = 0;
- virtual void inputFocusGained(Platform::BlackBerryInputType, int inputStyle, bool waitForExplicitKeyboardShowCall) = 0;
+ virtual void inputFocusGained(Platform::BlackBerryInputType, int inputStyle) = 0;
virtual void inputFocusLost() = 0;
virtual void inputTextChanged() = 0;
virtual void inputSelectionChanged(unsigned selectionStart, unsigned selectionEnd) = 0;
@@ -140,10 +146,10 @@ public:
virtual void checkSpellingOfString(const unsigned short* text, int length, int& misspellingLocation, int& misspellingLength) = 0;
virtual void requestSpellingSuggestionsForString(unsigned start, unsigned end) = 0;
- virtual void notifySelectionDetailsChanged(const Platform::IntRect& start, const Platform::IntRect& end, const Platform::IntRectRegion&) = 0;
+ virtual void notifySelectionDetailsChanged(const Platform::IntRect& start, const Platform::IntRect& end, const Platform::IntRectRegion&, bool overrideTouchHandling = false) = 0;
virtual void cancelSelectionVisuals() = 0;
virtual void notifySelectionHandlesReversed() = 0;
- virtual void notifyCaretChanged(const Platform::IntRect& caret, bool userTouchTriggered) = 0;
+ virtual void notifyCaretChanged(const Platform::IntRect& caret, bool userTouchTriggered, bool singleLineInput = false, const Platform::IntRect& singleLineBoundingBox = Platform::IntRect()) = 0;
virtual void cursorChanged(Platform::CursorType, const char* url, int x, int y) = 0;
@@ -206,6 +212,7 @@ public:
virtual void setPreventsScreenIdleDimming(bool noDimming) = 0;
virtual void authenticationChallenge(const unsigned short* realm, unsigned int realmLength, WebString& username, WebString& password) = 0;
+ virtual SaveCredentialType notifyShouldSaveCredential(bool isNew) = 0;
virtual bool shouldPluginEnterFullScreen() = 0;
virtual void didPluginEnterFullScreen() = 0;
@@ -215,6 +222,7 @@ public:
virtual bool lockOrientation(bool landscape) = 0;
virtual void unlockOrientation() = 0;
virtual bool isActive() const = 0;
+ virtual bool isVisible() const = 0;
virtual void requestWebGLPermission(const WebString&) = 0;
virtual void setToolTip(WebString) = 0;
diff --git a/Source/WebKit/blackberry/Api/WebPageCompositor.cpp b/Source/WebKit/blackberry/Api/WebPageCompositor.cpp
new file mode 100644
index 000000000..8e4c17778
--- /dev/null
+++ b/Source/WebKit/blackberry/Api/WebPageCompositor.cpp
@@ -0,0 +1,268 @@
+/*
+ * Copyright (C) 2010, 2011, 2012 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+
+#include "WebPageCompositor.h"
+
+#if USE(ACCELERATED_COMPOSITING)
+#include "WebPageCompositorClient.h"
+#include "WebPageCompositor_p.h"
+
+#include "BackingStore_p.h"
+#include "LayerWebKitThread.h"
+#include "WebPage_p.h"
+
+#include <BlackBerryPlatformDebugMacros.h>
+#include <BlackBerryPlatformExecutableMessage.h>
+#include <BlackBerryPlatformMessage.h>
+#include <BlackBerryPlatformMessageClient.h>
+#include <GenericTimerClient.h>
+#include <ThreadTimerClient.h>
+
+using namespace WebCore;
+
+namespace BlackBerry {
+namespace WebKit {
+
+WebPageCompositorPrivate::WebPageCompositorPrivate(WebPagePrivate* page, WebPageCompositorClient* client)
+ : m_client(client)
+ , m_webPage(page)
+ , m_drawsRootLayer(false)
+{
+ setOneShot(true); // one-shot animation client
+}
+
+WebPageCompositorPrivate::~WebPageCompositorPrivate()
+{
+ Platform::AnimationFrameRateController::instance()->removeClient(this);
+}
+
+void WebPageCompositorPrivate::setContext(Platform::Graphics::GLES2Context* context)
+{
+ if (m_context == context)
+ return;
+
+ m_context = context;
+ if (!m_context) {
+ m_layerRenderer.clear();
+ return;
+ }
+
+ m_layerRenderer = LayerRenderer::create(m_context);
+ m_layerRenderer->setRootLayer(m_rootLayer.get());
+}
+
+bool WebPageCompositorPrivate::hardwareCompositing() const
+{
+ return m_layerRenderer && m_layerRenderer->hardwareCompositing();
+}
+
+void WebPageCompositorPrivate::setRootLayer(LayerCompositingThread* rootLayer)
+{
+ m_rootLayer = rootLayer;
+
+ if (m_layerRenderer)
+ m_layerRenderer->setRootLayer(m_rootLayer.get());
+}
+
+void WebPageCompositorPrivate::commit(LayerWebKitThread* rootLayer)
+{
+ if (!rootLayer)
+ return;
+
+ rootLayer->commitOnCompositingThread();
+}
+
+void WebPageCompositorPrivate::render(const IntRect& dstRect, const IntRect& transformedContents)
+{
+ // It's not safe to call into the BackingStore if the compositor hasn't been set yet.
+ // For thread safety, we have to do it using a round-trip to the WebKit thread, so the
+ // embedder might call this before the round-trip to WebPagePrivate::setCompositor() is
+ // done.
+ if (m_webPage->compositor() != this)
+ return;
+
+ // The BackingStore is the root layer
+ if (BackingStore* backingStore = m_webPage->m_backingStore)
+ backingStore->d->blitContents(dstRect, transformedContents, true);
+ else {
+ FloatRect contents = m_webPage->mapFromTransformedFloatRect(FloatRect(transformedContents));
+ drawLayers(dstRect, contents);
+ }
+}
+
+bool WebPageCompositorPrivate::drawsRootLayer() const
+{
+ return m_drawsRootLayer;
+}
+
+bool WebPageCompositorPrivate::drawLayers(const IntRect& dstRect, const FloatRect& contents)
+{
+ if (!m_layerRenderer)
+ return false;
+
+ bool shouldClear = drawsRootLayer();
+ if (BackingStore* backingStore = m_webPage->m_backingStore)
+ shouldClear = shouldClear || !backingStore->d->isOpenGLCompositing();
+ m_layerRenderer->setClearSurfaceOnDrawLayers(shouldClear);
+
+ m_layerRenderer->drawLayers(contents, m_layoutRectForCompositing, m_contentsSizeForCompositing, dstRect);
+ m_lastCompositingResults = m_layerRenderer->lastRenderingResults();
+
+ if (m_lastCompositingResults.needsAnimationFrame) {
+ Platform::AnimationFrameRateController::instance()->addClient(this);
+ m_webPage->updateDelegatedOverlays();
+ }
+
+ return true;
+}
+
+void WebPageCompositorPrivate::releaseLayerResources()
+{
+ if (m_layerRenderer)
+ m_layerRenderer->releaseLayerResources();
+}
+
+void WebPageCompositorPrivate::animationFrameChanged()
+{
+ BackingStore* backingStore = m_webPage->m_backingStore;
+ if (!backingStore) {
+ drawLayers(m_webPage->client()->userInterfaceBlittedDestinationRect(),
+ IntRect(m_webPage->client()->userInterfaceBlittedVisibleContentsRect()));
+ return;
+ }
+
+ if (backingStore->d->shouldDirectRenderingToWindow()) {
+ if (backingStore->d->isDirectRenderingAnimationMessageScheduled())
+ return; // don't send new messages as long as we haven't rerendered
+
+ using namespace BlackBerry::Platform;
+
+ backingStore->d->setDirectRenderingAnimationMessageScheduled();
+ webKitThreadMessageClient()->dispatchMessage(createMethodCallMessage(&BackingStorePrivate::renderVisibleContents, backingStore->d));
+ return;
+ }
+ m_webPage->blitVisibleContents();
+}
+
+void WebPageCompositorPrivate::compositorDestroyed()
+{
+ if (m_client)
+ m_client->compositorDestroyed();
+
+ m_client = 0;
+}
+
+WebPageCompositor::WebPageCompositor(WebPage* page, WebPageCompositorClient* client)
+{
+ using namespace BlackBerry::Platform;
+
+ RefPtr<WebPageCompositorPrivate> tmp = WebPageCompositorPrivate::create(page->d, client);
+
+ // Keep one ref ourselves...
+ d = tmp.get();
+ d->ref();
+
+ // ...And pass one ref to the web page.
+ // This ensures that the compositor will be around for as long as it's
+ // needed. Unfortunately RefPtr<T> is not public, so we have declare to
+ // resort to manual refcounting.
+ webKitThreadMessageClient()->dispatchMessage(createMethodCallMessage(&WebPagePrivate::setCompositor, d->page(), tmp));
+}
+
+WebPageCompositor::~WebPageCompositor()
+{
+ using namespace BlackBerry::Platform;
+
+ webKitThreadMessageClient()->dispatchMessage(createMethodCallMessage(&WebPagePrivate::setCompositor, d->page(), PassRefPtr<WebPageCompositorPrivate>(0)));
+ d->compositorDestroyed();
+ d->deref();
+}
+
+WebPageCompositorClient* WebPageCompositor::client() const
+{
+ return 0;
+}
+
+void WebPageCompositor::prepareFrame(Platform::Graphics::GLES2Context* context, double timestamp)
+{
+ d->setContext(context);
+}
+
+void WebPageCompositor::render(Platform::Graphics::GLES2Context* context, const Platform::IntRect& dstRect, const Platform::IntRect& contents)
+{
+ d->setContext(context);
+ d->render(dstRect, contents);
+}
+
+void WebPageCompositor::cleanup(Platform::Graphics::GLES2Context* context)
+{
+ d->setContext(0);
+}
+
+void WebPageCompositor::contextLost()
+{
+ // This method needs to delete the compositor in a way that not tries to
+ // use any OpenGL calls (the context is gone, so we can't and don't need to
+ // free any OpenGL resources.
+ notImplemented();
+}
+
+} // namespace WebKit
+} // namespace BlackBerry
+
+#else // USE(ACCELERATED_COMPOSITING)
+
+namespace BlackBerry {
+namespace WebKit {
+
+WebPageCompositor::WebPageCompositor(WebPage*, WebPageCompositorClient*)
+ : d(0)
+{
+}
+
+WebPageCompositor::~WebPageCompositor()
+{
+}
+
+WebPageCompositorClient* WebPageCompositor::client() const
+{
+ return 0;
+}
+
+void WebPageCompositor::prepareFrame(Platform::Graphics::GLES2Context*, double)
+{
+}
+
+void WebPageCompositor::render(Platform::Graphics::GLES2Context*, const Platform::IntRect&, const Platform::IntRect&)
+{
+}
+
+void WebPageCompositor::cleanup(Platform::Graphics::GLES2Context*)
+{
+}
+
+void WebPageCompositor::contextLost()
+{
+}
+
+} // namespace WebKit
+} // namespace BlackBerry
+
+#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/Source/WebKit/blackberry/Api/WebPageCompositor.h b/Source/WebKit/blackberry/Api/WebPageCompositor.h
new file mode 100644
index 000000000..11bf2841f
--- /dev/null
+++ b/Source/WebKit/blackberry/Api/WebPageCompositor.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2011, 2012 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef WebPageCompositor_h
+#define WebPageCompositor_h
+
+#include "BlackBerryGlobal.h"
+
+#include <BlackBerryPlatformGLES2Context.h>
+#include <BlackBerryPlatformGraphics.h>
+#include <BlackBerryPlatformPrimitives.h>
+
+namespace BlackBerry {
+namespace WebKit {
+
+class WebPage;
+class WebPageCompositorClient;
+class WebPageCompositorPrivate;
+
+class BLACKBERRY_EXPORT WebPageCompositor {
+public:
+ WebPageCompositor(WebPage*, WebPageCompositorClient*);
+ virtual ~WebPageCompositor();
+
+ WebPageCompositorClient* client() const;
+
+ void prepareFrame(Platform::Graphics::GLES2Context*, double timestamp);
+
+ // FIXME: dstRect should be a Platform::TransformationMatrix instead. PR142628
+ void render(Platform::Graphics::GLES2Context*, const Platform::IntRect& dstRect, const Platform::IntRect& contents);
+
+ void cleanup(Platform::Graphics::GLES2Context*);
+
+ void contextLost();
+
+private:
+ WebPageCompositorPrivate *d;
+};
+
+} // namespace WebKit
+} // namespace BlackBerry
+
+#endif // WebPageCompositor_h
diff --git a/Source/WebKit/blackberry/Api/WebPageCompositorClient.h b/Source/WebKit/blackberry/Api/WebPageCompositorClient.h
new file mode 100644
index 000000000..00497ee8a
--- /dev/null
+++ b/Source/WebKit/blackberry/Api/WebPageCompositorClient.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2011, 2012 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef WebPageCompositorClient_h
+#define WebPageCompositorClient_h
+
+#include "BlackBerryGlobal.h"
+
+namespace BlackBerry {
+namespace WebKit {
+
+class BLACKBERRY_EXPORT WebPageCompositorClient {
+public:
+ virtual ~WebPageCompositorClient() { }
+
+ virtual void compositorDestroyed() = 0;
+
+ virtual double requestAnimationFrame() = 0;
+ virtual void invalidate(double animationFrameTimestamp) = 0;
+ virtual void requestCleanup() = 0;
+};
+
+} // namespace WebKit
+} // namespace BlackBerry
+
+#endif // WebPageCompositorClient_h
diff --git a/Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.h b/Source/WebKit/blackberry/Api/WebPageCompositor_p.h
index aa0a9a8c0..4bd06c404 100644
--- a/Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.h
+++ b/Source/WebKit/blackberry/Api/WebPageCompositor_p.h
@@ -16,16 +16,18 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef WebPageCompositor_h
-#define WebPageCompositor_h
+#ifndef WebPageCompositor_p_h
+#define WebPageCompositor_p_h
#if USE(ACCELERATED_COMPOSITING)
#include "LayerCompositingThread.h"
#include "LayerRenderer.h"
-#include <BlackBerryPlatformTimer.h>
+#include <BlackBerryPlatformAnimation.h>
+#include <BlackBerryPlatformGLES2Context.h>
#include <wtf/OwnPtr.h>
+#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
namespace WebCore {
@@ -35,22 +37,37 @@ class LayerWebKitThread;
namespace BlackBerry {
namespace WebKit {
+class WebPageCompositorClient;
class WebPagePrivate;
-// This class may only be used on the compositing thread.
-class WebPageCompositor {
+// This class may only be used on the compositing thread. So it does not need to be threadsaferefcounted.
+class WebPageCompositorPrivate : public RefCounted<WebPageCompositorPrivate>, public Platform::AnimationFrameRateClient {
public:
- WebPageCompositor(WebPagePrivate*);
- ~WebPageCompositor();
+ static PassRefPtr<WebPageCompositorPrivate> create(WebPagePrivate* page, WebPageCompositorClient* client)
+ {
+ return adoptRef(new WebPageCompositorPrivate(page, client));
+ }
+
+ ~WebPageCompositorPrivate();
bool hardwareCompositing() const;
- void setRootLayer(WebCore::LayerCompositingThread*);
+ Platform::Graphics::GLES2Context* context() const { return m_context; }
+ void setContext(Platform::Graphics::GLES2Context*);
- void setCompositingOntoMainWindow(bool);
+ WebCore::LayerCompositingThread* rootLayer() const { return m_rootLayer.get(); }
+ void setRootLayer(WebCore::LayerCompositingThread*);
void commit(WebCore::LayerWebKitThread* rootLayerProxy);
+ // This is mapped from the public API, thus takes transformed contents
+ void render(const WebCore::IntRect& dstRect, const WebCore::IntRect& transformedContents);
+
+ // Returns true if the WebPageCompositor draws the root layer, false if the BackingStore draws the root layer
+ bool drawsRootLayer() const;
+ void setDrawsRootLayer(bool drawsRootLayer) { m_drawsRootLayer = drawsRootLayer; }
+
+ // Render everything but the root layer, or everything if drawsRootLayer() is true.
bool drawLayers(const WebCore::IntRect& dstRect, const WebCore::FloatRect& contents);
WebCore::IntRect layoutRectForCompositing() const { return m_layoutRectForCompositing; }
@@ -64,22 +81,25 @@ public:
void releaseLayerResources();
+ WebPagePrivate* page() const { return m_webPage; }
+ WebPageCompositorClient* client() const { return m_client; }
+ void compositorDestroyed();
+
+protected:
+ WebPageCompositorPrivate(WebPagePrivate*, WebPageCompositorClient*);
+
private:
- void animationTimerFired();
+ void animationFrameChanged();
+ WebPageCompositorClient* m_client;
WebPagePrivate* m_webPage;
+ Platform::Graphics::GLES2Context* m_context;
OwnPtr<WebCore::LayerRenderer> m_layerRenderer;
RefPtr<WebCore::LayerCompositingThread> m_rootLayer;
WebCore::IntRect m_layoutRectForCompositing;
WebCore::IntSize m_contentsSizeForCompositing;
WebCore::LayerRenderingResults m_lastCompositingResults;
- int m_generation;
- int m_compositedGeneration;
- WebCore::IntRect m_compositedDstRect;
- WebCore::FloatRect m_compositedContentsRect;
- bool m_compositingOntoMainWindow;
- BlackBerry::Platform::Timer<WebPageCompositor> m_animationTimer;
- BlackBerry::Platform::TimerClient* m_timerClient;
+ bool m_drawsRootLayer;
};
} // namespace WebKit
@@ -87,4 +107,4 @@ private:
#endif // USE(ACCELERATED_COMPOSITING)
-#endif // WebPageCompositor_h
+#endif // WebPageCompositor_p_h
diff --git a/Source/WebKit/blackberry/Api/WebPage_p.h b/Source/WebKit/blackberry/Api/WebPage_p.h
index ed3739c22..1c86c1a4a 100644
--- a/Source/WebKit/blackberry/Api/WebPage_p.h
+++ b/Source/WebKit/blackberry/Api/WebPage_p.h
@@ -21,8 +21,10 @@
#include "ChromeClient.h"
#if USE(ACCELERATED_COMPOSITING)
+#include "GLES2Context.h"
#include "LayerRenderer.h"
#endif
+#include "KURL.h"
#include "PageClientBlackBerry.h"
#include "PlatformMouseEvent.h"
#include "ScriptSourceCode.h"
@@ -39,7 +41,6 @@ class Document;
class Frame;
class GeolocationControllerClientBlackBerry;
class JavaScriptDebuggerBlackBerry;
-class KURL;
class Node;
class Page;
class PluginView;
@@ -65,7 +66,7 @@ class WebPageClient;
#if USE(ACCELERATED_COMPOSITING)
class FrameLayers;
-class WebPageCompositor;
+class WebPageCompositorPrivate;
#endif
// In the client code, there is screen size and viewport.
@@ -78,15 +79,16 @@ public:
enum LoadState { None /* on instantiation of page */, Provisional, Committed, Finished, Failed };
WebPagePrivate(WebPage*, WebPageClient*, const WebCore::IntRect&);
- virtual ~WebPagePrivate();
static WebCore::Page* core(const WebPage*);
+ WebPageClient* client() const { return m_client; }
+
void init(const WebString& pageGroupName);
bool handleMouseEvent(WebCore::PlatformMouseEvent&);
bool handleWheelEvent(WebCore::PlatformWheelEvent&);
- void load(const char* url, const char* networkToken, const char* method, Platform::NetworkRequest::CachePolicy, const char* data, size_t dataLength, const char* const* headers, size_t headersLength, bool isInitial, bool mustHandleInternally = false, bool forceDownload = false, const char* overrideContentType = "");
+ void load(const char* url, const char* networkToken, const char* method, Platform::NetworkRequest::CachePolicy, const char* data, size_t dataLength, const char* const* headers, size_t headersLength, bool isInitial, bool mustHandleInternally = false, bool forceDownload = false, const char* overrideContentType = "", const char* suggestedSaveName = "");
void loadString(const char* string, const char* baseURL, const char* mimeType, const char* failingURL = 0);
bool executeJavaScript(const char* script, JavaScriptDataType& returnType, WebString& returnValue);
bool executeJavaScriptInIsolatedWorld(const WebCore::ScriptSourceCode&, JavaScriptDataType& returnType, WebString& returnValue);
@@ -156,7 +158,7 @@ public:
WebCore::IntSize absoluteVisibleOverflowSize() const;
// Virtual functions inherited from PageClientBlackBerry.
- virtual void setCursor(WebCore::PlatformCursorHandle);
+ virtual void setCursor(WebCore::PlatformCursor);
virtual Platform::NetworkStreamFactory* networkStreamFactory();
virtual Platform::Graphics::Window* platformWindow() const;
virtual void setPreventsScreenDimming(bool preventDimming);
@@ -176,6 +178,9 @@ public:
virtual double currentZoomFactor() const;
virtual int showAlertDialog(WebPageClient::AlertType atype);
virtual bool isActive() const;
+ virtual bool isVisible() const { return m_visible; }
+ virtual WebCore::Credential authenticationChallenge(const WebCore::KURL&, const WebCore::ProtectionSpace&);
+ virtual SaveCredentialType notifyShouldSaveCredential(bool);
// Called from within WebKit via ChromeClientBlackBerry.
void enterFullscreenForNode(WebCore::Node*);
@@ -266,7 +271,7 @@ public:
void notifyPluginRectChanged(int id, const WebCore::IntRect& rectChanged);
// Context Methods.
- ActiveNodeContext activeNodeContext(TargetDetectionStrategy);
+ Platform::WebContext webContext(TargetDetectionStrategy);
PassRefPtr<WebCore::Node> contextNode(TargetDetectionStrategy);
#if ENABLE(VIEWPORT_REFLOW)
@@ -351,6 +356,9 @@ public:
return m_transformationMatrix;
}
+ bool compositorDrawsRootLayer() const; // Thread safe
+ void setCompositorDrawsRootLayer(bool); // WebKit thread only
+
#if USE(ACCELERATED_COMPOSITING)
// WebKit thread.
bool needsOneShotDrawingSynchronization();
@@ -366,14 +374,14 @@ public:
// Thread safe.
void resetCompositingSurface();
void drawLayersOnCommit(); // Including backing store blit.
- bool drawSubLayers(const WebCore::IntRect& dstRect, const WebCore::FloatRect& contents);
- bool drawSubLayers(); // Draw them at last known position.
// Compositing thread.
void setRootLayerCompositingThread(WebCore::LayerCompositingThread*);
- void commitRootLayer(const WebCore::IntRect&, const WebCore::IntSize&);
- void setIsAcceleratedCompositingActive(bool);
- bool isAcceleratedCompositingActive() const { return m_isAcceleratedCompositingActive; }
+ void commitRootLayer(const WebCore::IntRect&, const WebCore::IntSize&, bool);
+ bool isAcceleratedCompositingActive() const { return m_compositor; }
+ WebPageCompositorPrivate* compositor() const { return m_compositor.get(); }
+ void setCompositor(PassRefPtr<WebPageCompositorPrivate>);
+ bool createCompositor();
void destroyCompositor();
void syncDestroyCompositorOnCompositingThread();
void destroyLayerResources();
@@ -399,6 +407,15 @@ public:
static WebCore::RenderLayer* enclosingFixedPositionedAncestorOrSelfIfFixedPositioned(WebCore::RenderLayer*);
static WebCore::IntSize defaultMaxLayoutSize();
+ static const String& defaultUserAgent();
+
+ void setVisible(bool);
+#if ENABLE(PAGE_VISIBILITY_API)
+ void setPageVisibilityState();
+#endif
+ void notifyAppActivationStateChange(ActivationStateType);
+
+ void deferredTasksTimerFired(WebCore::Timer<WebPagePrivate>*);
WebPage* m_webPage;
WebPageClient* m_client;
@@ -412,6 +429,7 @@ public:
#endif
bool m_visible;
+ ActivationStateType m_activationState;
bool m_shouldResetTilesWhenShown;
bool m_userScalable;
bool m_userPerformedManualZoom;
@@ -434,6 +452,7 @@ public:
int m_virtualViewportHeight;
WebCore::IntSize m_defaultLayoutSize;
WebCore::ViewportArguments m_viewportArguments; // We keep this around since we may need to re-evaluate the arguments on rotation.
+ WebCore::ViewportArguments m_userViewportArguments; // A fallback set of Viewport Arguments supplied by the WebPageClient
bool m_didRestoreFromPageCache;
ViewMode m_viewMode;
LoadState m_loadState;
@@ -492,7 +511,12 @@ public:
#if USE(ACCELERATED_COMPOSITING)
bool m_isAcceleratedCompositingActive;
OwnPtr<FrameLayers> m_frameLayers; // WebKit thread only.
- OwnPtr<WebPageCompositor> m_compositor; // Compositing thread only.
+
+ // Compositing thread only, used only when the WebKit layer created the context.
+ // If the API client created the context, this will be null.
+ OwnPtr<GLES2Context> m_ownedContext;
+
+ RefPtr<WebPageCompositorPrivate> m_compositor; // Compositing thread only.
OwnPtr<WebCore::Timer<WebPagePrivate> > m_rootLayerCommitTimer;
bool m_needsOneShotDrawingSynchronization;
bool m_needsCommit;
@@ -513,6 +537,50 @@ public:
RefPtr<WebCore::DOMWrapperWorld> m_isolatedWorld;
bool m_hasInRegionScrollableAreas;
bool m_updateDelegatedOverlaysDispatched;
+
+ // There is no need to initialize the following members in WebPagePrivate's constructor,
+ // because they are only used by WebPageTasks and the tasks will initialize them when
+ // being constructed.
+ bool m_wouldPopupListSelectMultiple;
+ bool m_wouldPopupListSelectSingle;
+ bool m_wouldSetDateTimeInput;
+ bool m_wouldSetColorInput;
+ bool m_wouldCancelSelection;
+ bool m_wouldLoadManualScript;
+ bool m_wouldSetFocused;
+ bool m_wouldSetPageVisibilityState;
+ Vector<bool> m_cachedPopupListSelecteds;
+ int m_cachedPopupListSelectedIndex;
+ WebString m_cachedDateTimeInput;
+ WebString m_cachedColorInput;
+ WebCore::KURL m_cachedManualScript;
+ bool m_cachedFocused;
+
+ class DeferredTaskBase {
+ public:
+ void perform(WebPagePrivate* webPagePrivate)
+ {
+ if (!(webPagePrivate->*m_isActive))
+ return;
+ performInternal(webPagePrivate);
+ }
+ protected:
+ DeferredTaskBase(WebPagePrivate* webPagePrivate, bool WebPagePrivate::*isActive)
+ : m_isActive(isActive)
+ {
+ webPagePrivate->*m_isActive = true;
+ }
+
+ virtual void performInternal(WebPagePrivate*) = 0;
+
+ bool WebPagePrivate::*m_isActive;
+ };
+
+ Vector<OwnPtr<DeferredTaskBase> > m_deferredTasks;
+ WebCore::Timer<WebPagePrivate> m_deferredTasksTimer;
+
+protected:
+ virtual ~WebPagePrivate();
};
}
}
diff --git a/Source/WebKit/blackberry/Api/WebSettings.cpp b/Source/WebKit/blackberry/Api/WebSettings.cpp
index f6067178a..a9967e9ad 100644
--- a/Source/WebKit/blackberry/Api/WebSettings.cpp
+++ b/Source/WebKit/blackberry/Api/WebSettings.cpp
@@ -19,6 +19,7 @@
#include "config.h"
#include "WebSettings.h"
+#include "MIMETypeRegistry.h"
#include "WebSettings_p.h"
#include "WebString.h"
@@ -43,6 +44,7 @@ DEFINE_STATIC_LOCAL(String, BlackBerryInitialScale, ("BlackBerryInitialScale"));
DEFINE_STATIC_LOCAL(String, BlackBerryLinksHandledExternallyEnabled, ("BlackBerryLinksHandledExternallyEnabled"));
DEFINE_STATIC_LOCAL(String, BlackBerryMaxPluginInstances, ("BlackBerryMaxPluginInstances"));
DEFINE_STATIC_LOCAL(String, BlackBerryOverZoomColor, ("BlackBerryOverZoomColor"));
+DEFINE_STATIC_LOCAL(String, BlackBerryOverScrollImagePath, ("BlackBerryOverScrollImagePath"));
DEFINE_STATIC_LOCAL(String, BlackBerryRenderAnimationsOnScrollOrZoomEnabled, ("BlackBerryRenderAnimationsOnScrollOrZoomEnabled"));
DEFINE_STATIC_LOCAL(String, BlackBerryScrollbarsEnabled, ("BlackBerryScrollbarsEnabled"));
DEFINE_STATIC_LOCAL(String, BlackBerryTextReflowMode, ("BlackBerryTextReflowMode"));
@@ -84,65 +86,6 @@ DEFINE_STATIC_LOCAL(String, WebKitUserStyleSheetLocation, ("WebKitUserStyleSheet
DEFINE_STATIC_LOCAL(String, WebKitWebSocketsEnabled, ("WebKitWebSocketsEnabled"));
DEFINE_STATIC_LOCAL(String, WebKitXSSAuditorEnabled, ("WebKitXSSAuditorEnabled"));
-// FIXME: We should consider moving all the mime type code into its own object.
-
-typedef HashMap<String, WebString> MIMETypeAssociationMap;
-
-static const MIMETypeAssociationMap& mimeTypeAssociationMap()
-{
- static MIMETypeAssociationMap* mimeTypeMap = 0;
- if (mimeTypeMap)
- return *mimeTypeMap;
-
- mimeTypeMap = new MIMETypeAssociationMap;
- mimeTypeMap->add("image/x-ms-bmp", "image/bmp");
- mimeTypeMap->add("image/x-windows-bmp", "image/bmp");
- mimeTypeMap->add("image/x-bmp", "image/bmp");
- mimeTypeMap->add("image/x-bitmap", "image/bmp");
- mimeTypeMap->add("image/x-ms-bitmap", "image/bmp");
- mimeTypeMap->add("image/jpg", "image/jpeg");
- mimeTypeMap->add("image/pjpeg", "image/jpeg");
- mimeTypeMap->add("image/x-png", "image/png");
- mimeTypeMap->add("image/vnd.rim.png", "image/png");
- mimeTypeMap->add("image/ico", "image/vnd.microsoft.icon");
- mimeTypeMap->add("image/icon", "image/vnd.microsoft.icon");
- mimeTypeMap->add("text/ico", "image/vnd.microsoft.icon");
- mimeTypeMap->add("application/ico", "image/vnd.microsoft.icon");
- mimeTypeMap->add("image/x-icon", "image/vnd.microsoft.icon");
- mimeTypeMap->add("audio/vnd.qcelp", "audio/qcelp");
- mimeTypeMap->add("audio/qcp", "audio/qcelp");
- mimeTypeMap->add("audio/vnd.qcp", "audio/qcelp");
- mimeTypeMap->add("audio/wav", "audio/x-wav");
- mimeTypeMap->add("audio/mid", "audio/midi");
- mimeTypeMap->add("audio/sp-midi", "audio/midi");
- mimeTypeMap->add("audio/x-mid", "audio/midi");
- mimeTypeMap->add("audio/x-midi", "audio/midi");
- mimeTypeMap->add("audio/x-mpeg", "audio/mpeg");
- mimeTypeMap->add("audio/mp3", "audio/mpeg");
- mimeTypeMap->add("audio/x-mp3", "audio/mpeg");
- mimeTypeMap->add("audio/mpeg3", "audio/mpeg");
- mimeTypeMap->add("audio/x-mpeg3", "audio/mpeg");
- mimeTypeMap->add("audio/mpg3", "audio/mpeg");
- mimeTypeMap->add("audio/mpg", "audio/mpeg");
- mimeTypeMap->add("audio/x-mpg", "audio/mpeg");
- mimeTypeMap->add("audio/m4a", "audio/mp4");
- mimeTypeMap->add("audio/x-m4a", "audio/mp4");
- mimeTypeMap->add("audio/x-mp4", "audio/mp4");
- mimeTypeMap->add("audio/x-aac", "audio/aac");
- mimeTypeMap->add("audio/x-amr", "audio/amr");
- mimeTypeMap->add("audio/mpegurl", "audio/x-mpegurl");
- mimeTypeMap->add("audio/flac", "audio/x-flac");
- mimeTypeMap->add("video/3gp", "video/3gpp");
- mimeTypeMap->add("video/avi", "video/x-msvideo");
- mimeTypeMap->add("video/x-m4v", "video/mp4");
- mimeTypeMap->add("video/x-quicktime", "video/quicktime");
- mimeTypeMap->add("application/java", "application/java-archive");
- mimeTypeMap->add("application/x-java-archive", "application/java-archive");
- mimeTypeMap->add("application/x-zip-compressed", "application/zip");
-
- return *mimeTypeMap;
-}
-
static HashSet<String>* s_supportedObjectMIMETypes;
WebSettingsPrivate::WebSettingsPrivate()
@@ -210,6 +153,7 @@ WebSettings* WebSettings::standardSettings()
settings->m_private->setDouble(BlackBerryInitialScale, -1);
settings->m_private->setUnsigned(BlackBerryMaxPluginInstances, 1);
settings->m_private->setUnsigned(BlackBerryOverZoomColor, WebCore::Color::white);
+ settings->m_private->setString(BlackBerryOverScrollImagePath, "");
settings->m_private->setBoolean(BlackBerryScrollbarsEnabled, true);
// FIXME: We should detect whether we are embedded in a browser or an email client and default to TextReflowEnabledOnlyForBlockZoom and TextReflowEnabled, respectively.
@@ -254,14 +198,7 @@ bool WebSettings::isSupportedObjectMIMEType(const WebString& mimeType)
if (!s_supportedObjectMIMETypes)
return false;
- return s_supportedObjectMIMETypes->contains(getNormalizedMIMEType(mimeType));
-}
-
-WebString WebSettings::getNormalizedMIMEType(const WebString& type)
-{
- MIMETypeAssociationMap::const_iterator i = mimeTypeAssociationMap().find(type);
-
- return i == mimeTypeAssociationMap().end() ? type : i->second;
+ return s_supportedObjectMIMETypes->contains(MIMETypeRegistry::getNormalizedMIMEType(mimeType));
}
bool WebSettings::xssAuditorEnabled() const
@@ -396,17 +333,10 @@ void WebSettings::setStandardFontFamily(const char* standardFontFamily)
WebString WebSettings::userAgentString() const
{
- // FIXME: Is this the best place for this assertion. Why can't we just return an empty string
- // and let the caller decide how to handle it?
-
- // The default user agent string is empty. We rely upon the client to set this for us.
- // We check this by asserting if the client has not done so before the first time it is needed.
- String userAgentString = m_private->getString(BlackBerryUserAgentString);
- ASSERT(!userAgentString.isEmpty());
- return userAgentString;
+ return m_private->getString(BlackBerryUserAgentString);
}
-void WebSettings::setUserAgentString(const char* userAgentString)
+void WebSettings::setUserAgentString(const WebString& userAgentString)
{
m_private->setString(BlackBerryUserAgentString, userAgentString);
}
@@ -733,6 +663,16 @@ void WebSettings::setOverZoomColor(unsigned color)
m_private->setUnsigned(BlackBerryOverZoomColor, color);
}
+WebString WebSettings::overScrollImagePath() const
+{
+ return m_private->getString(BlackBerryOverScrollImagePath);
+}
+
+void WebSettings::setOverScrollImagePath(const char* path)
+{
+ m_private->setString(BlackBerryOverScrollImagePath, path);
+}
+
unsigned WebSettings::backgroundColor() const
{
return m_private->getUnsigned(BlackBerryBackgroundColor);
diff --git a/Source/WebKit/blackberry/Api/WebSettings.h b/Source/WebKit/blackberry/Api/WebSettings.h
index 403e8f4a2..5a2336ffc 100644
--- a/Source/WebKit/blackberry/Api/WebSettings.h
+++ b/Source/WebKit/blackberry/Api/WebSettings.h
@@ -56,7 +56,6 @@ public:
static void addSupportedObjectPluginMIMEType(const char*);
static bool isSupportedObjectMIMEType(const WebString&);
- static WebString getNormalizedMIMEType(const WebString&);
bool xssAuditorEnabled() const;
void setXSSAuditorEnabled(bool);
@@ -95,7 +94,7 @@ public:
bool downloadableBinaryFontsEnabled() const;
WebString userAgentString() const;
- void setUserAgentString(const char*);
+ void setUserAgentString(const WebString&);
WebString defaultTextEncodingName() const;
void setDefaultTextEncodingName(const char*);
@@ -194,6 +193,9 @@ public:
unsigned overZoomColor() const;
void setOverZoomColor(unsigned);
+ WebString overScrollImagePath() const;
+ void setOverScrollImagePath(const char*);
+
unsigned backgroundColor() const;
void setBackgroundColor(unsigned);
diff --git a/Source/WebKit/blackberry/Api/WebViewportArguments.cpp b/Source/WebKit/blackberry/Api/WebViewportArguments.cpp
new file mode 100644
index 000000000..9bfd44489
--- /dev/null
+++ b/Source/WebKit/blackberry/Api/WebViewportArguments.cpp
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#include "WebViewportArguments.h"
+
+#include "ViewportArguments.h"
+
+namespace BlackBerry {
+namespace WebKit {
+
+WebViewportArguments::WebViewportArguments()
+ :d(new WebCore::ViewportArguments(WebCore::ViewportArguments::ViewportMeta))
+{
+}
+
+WebViewportArguments::~WebViewportArguments()
+{
+ delete d;
+ d = 0;
+}
+
+float WebViewportArguments::initialScale() const
+{
+ return d->initialScale;
+}
+
+void WebViewportArguments::setInitialScale(float scale)
+{
+ d->initialScale = scale;
+}
+
+float WebViewportArguments::minimumScale() const
+{
+ return d->minimumScale;
+}
+
+void WebViewportArguments::setMinimumScale(float scale)
+{
+ d->minimumScale = scale;
+}
+
+float WebViewportArguments::maximumScale() const
+{
+ return d->maximumScale;
+}
+
+void WebViewportArguments::setMaximumScale(float scale)
+{
+ d->maximumScale = scale;
+}
+
+float WebViewportArguments::width() const
+{
+ return d->width;
+}
+
+void WebViewportArguments::setWidth(float width)
+{
+ d->width = width;
+}
+
+float WebViewportArguments::height() const
+{
+ return d->height;
+}
+
+void WebViewportArguments::setHeight(float height)
+{
+ d->height = height;
+}
+
+float WebViewportArguments::targetDensityDpi() const
+{
+ return d->targetDensityDpi;
+}
+
+void WebViewportArguments::setTargetDensityDpi(float dpi)
+{
+ d->targetDensityDpi = dpi;
+}
+
+float WebViewportArguments::userScalable() const
+{
+ return d->userScalable;
+}
+
+void WebViewportArguments::setUserScalable(float scalable)
+{
+ d->userScalable = scalable;
+}
+
+bool WebViewportArguments::operator==(const WebViewportArguments& other)
+{
+ return *d == *(other.d);
+}
+
+bool WebViewportArguments::operator!=(const WebViewportArguments& other)
+{
+ return !(*this == other);
+}
+
+} // namespace WebKit
+} // namespace BlackBerry
diff --git a/Source/WebKit/blackberry/Api/WebViewportArguments.h b/Source/WebKit/blackberry/Api/WebViewportArguments.h
new file mode 100644
index 000000000..852735c3c
--- /dev/null
+++ b/Source/WebKit/blackberry/Api/WebViewportArguments.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef WebViewportArguments_h
+#define WebViewportArguments_h
+
+#include "BlackBerryGlobal.h"
+
+// Not for public API purpose.
+namespace WebCore {
+class ViewportArguments;
+}
+
+namespace BlackBerry {
+namespace WebKit {
+
+class WebPage;
+
+/**
+ * A class designed to expose a meta viewport fallback.
+ *
+ * This class simply wraps a WebCore::ViewportArguments. It can be
+ * instantiated by the WebPageClient and supplied to a WebPage to
+ * provide a userViewportArguments object that can be used whenever
+ * there is no meta viewport tag provided in any loaded html.
+ */
+class BLACKBERRY_EXPORT WebViewportArguments {
+public:
+ WebViewportArguments();
+ ~WebViewportArguments();
+
+ // This matches the enum found in WebCore::ViewportArguments
+ enum {
+ ValueAuto = -1,
+ ValueDesktopWidth = -2,
+ ValueDeviceWidth = -3,
+ ValueDeviceHeight = -4,
+ ValueDeviceDPI = -5,
+ ValueLowDPI = -6,
+ ValueMediumDPI = -7,
+ ValueHighDPI = -8
+ };
+
+ float initialScale() const;
+ void setInitialScale(float);
+
+ float minimumScale() const;
+ void setMinimumScale(float);
+
+ float maximumScale() const;
+ void setMaximumScale(float);
+
+ float width() const;
+ void setWidth(float);
+
+ float height() const;
+ void setHeight(float);
+
+ float targetDensityDpi() const;
+ void setTargetDensityDpi(float);
+
+ float userScalable() const;
+ void setUserScalable(float);
+
+ bool operator==(const WebViewportArguments &other);
+ bool operator!=(const WebViewportArguments &other);
+
+private:
+ WebViewportArguments(const WebViewportArguments&);
+ WebCore::ViewportArguments* d;
+
+private:
+ friend class WebPage;
+};
+
+} // namespace WebKit
+} // namespace BlackBerry
+
+#endif // WebViewportArguments_h
diff --git a/Source/WebKit/blackberry/ChangeLog b/Source/WebKit/blackberry/ChangeLog
index 28317d8aa..49f6d0909 100644
--- a/Source/WebKit/blackberry/ChangeLog
+++ b/Source/WebKit/blackberry/ChangeLog
@@ -1,3 +1,2300 @@
+2012-05-06 Mary Wu <mary.wu@torchmobile.com.cn>
+
+ [BlackBerry] Support html5 download attribute.
+ https://bugs.webkit.org/show_bug.cgi?id=85044
+
+ Reviewed by Antonio Gomes.
+
+ If a link has download attribute, we should pass that value and be able to
+ save file with the name according to HTML5:
+ http://updates.html5rocks.com/2011/08/Downloading-resources-in-HTML5-a-download
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::load):
+ (BlackBerry::WebKit::WebPage::download):
+ * Api/WebPage_p.h:
+ (WebPagePrivate):
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::startDownload):
+
+2012-05-06 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
+
+ [BlackBerry] Autofill backing store implementation upstream
+ https://bugs.webkit.org/show_bug.cgi?id=85575
+
+ Reviewed by Rob Buis.
+
+ Replaced calling static function CredentialBackingStore::instance()
+ with calling the helper function credentialBackingStore().
+
+ * WebCoreSupport/CredentialManager.cpp:
+ (WebCore::CredentialManager::autofillAuthenticationChallenge):
+ (WebCore::CredentialManager::autofillPasswordForms):
+ (WebCore::CredentialManager::saveCredentialIfConfirmed):
+ (WebCore::CredentialManager::clearCredentials):
+ (WebCore::CredentialManager::clearNeverRememberSites):
+
+2012-05-06 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
+
+ [BlackBerry] Enable credential persistance and auto fill
+ https://bugs.webkit.org/show_bug.cgi?id=85572
+
+ Reviewed by Rob Buis.
+
+ Set autofilled status of credential input fields when credential
+ information is auto filled by CredentialManager.
+ By doing this the input element will get painted with yellow background
+ which can notify user this input field is auto filled by the browser.
+
+ No behavior changes, so no new test.
+
+ * WebCoreSupport/CredentialTransformData.cpp:
+ (WebCore::CredentialTransformData::setCredential):
+
+2012-05-04 Andrew Lo <anlo@rim.com>
+
+ [Blackberry] Implement over-scroll background image
+ https://bugs.webkit.org/show_bug.cgi?id=85538
+
+ Reviewed by Rob Buis.
+
+ Use over-scroll image when set instead of the solid colour.
+ Internal PR146652
+
+ * Api/BackingStore.cpp:
+ (WebKit):
+ (BlackBerry::WebKit::BackingStorePrivate::ensureOverScrollImage):
+ (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
+ * Api/BackingStore_p.h:
+ (BackingStorePrivate):
+ * Api/WebSettings.cpp:
+ (WebKit):
+ (BlackBerry::WebKit::WebSettings::standardSettings):
+ (BlackBerry::WebKit::WebSettings::overScrollImagePath):
+ (BlackBerry::WebKit::WebSettings::setOverScrollImagePath):
+ * Api/WebSettings.h:
+
+2012-05-04 Rob Buis <rbuis@rim.com>
+
+ [BlackBerry] Rendering bmp file as text file when Content-Type:image/x-ms-bmp from apache web server.
+ https://bugs.webkit.org/show_bug.cgi?id=85036
+
+ Reviewed by Antonio Gomes.
+
+ Move getNormalizedMIMEType into WebCore::MIMETypeRegistry.
+
+ * Api/WebSettings.cpp:
+ (WebKit):
+ (BlackBerry::WebKit::WebSettings::isSupportedObjectMIMEType):
+ * Api/WebSettings.h:
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::createPlugin):
+ (WebCore::FrameLoaderClientBlackBerry::canShowMIMEType):
+ (WebCore::FrameLoaderClientBlackBerry::objectContentType):
+
+2012-05-04 Nate Chapin <japhet@chromium.org>
+
+ Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+ https://bugs.webkit.org/show_bug.cgi?id=85533
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::finishedLoading):
+
+2012-05-04 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r116085, r116091, and r116095.
+ http://trac.webkit.org/changeset/116085
+ http://trac.webkit.org/changeset/116091
+ http://trac.webkit.org/changeset/116095
+ https://bugs.webkit.org/show_bug.cgi?id=85628
+
+ We are not ready with dependencies on all platform yet (mac) +
+ problems with debug builds. (Requested by Zoltan on #webkit).
+
+ * WebCoreSupport/AboutDataEnableFeatures.in:
+
+2012-05-04 Zoltan Horvath <zoltan@webkit.org>
+
+ [Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder
+ https://bugs.webkit.org/show_bug.cgi?id=80400
+
+ Get rid off QT_IMAGE_DECODER flag.
+
+ Reviewed by Simon Hausmann.
+
+ * WebCoreSupport/AboutDataEnableFeatures.in:
+
+2012-05-03 Fady Samuel <fsamuel@chromium.org>
+
+ Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
+ https://bugs.webkit.org/show_bug.cgi?id=70609
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * WebKitSupport/DumpRenderTreeSupport.cpp:
+ (DumpRenderTreeSupport::dumpConfigurationForViewport):
+
+2012-05-03 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] Add special attribute for alternate selection touch handling.
+ https://bugs.webkit.org/show_bug.cgi?id=85284
+
+ Reviewed by Rob Buis.
+
+ Rename the custom attribute and make it a data- attribute.
+
+ * WebKitSupport/SelectionHandler.cpp:
+ (BlackBerry::WebKit::SelectionHandler::inputNodeOverridesTouch):
+
+2012-04-18 Jon Honeycutt <jhoneycutt@apple.com>
+
+ FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
+ information about the form being submitted
+ https://bugs.webkit.org/show_bug.cgi?id=84297
+
+ Reviewed by Andy Estes.
+
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
+ Updated to use the FormState.
+
+ * WebCoreSupport/FrameLoaderClientBlackBerry.h:
+ (FrameLoaderClientBlackBerry):
+ Updated method declaration.
+
+2012-05-02 Jacky Jiang <zhajiang@rim.com>
+
+ [BlackBerry] Double tap zooming does nothing on small size table
+ https://bugs.webkit.org/show_bug.cgi?id=85383
+
+ Reviewed by George Staikos.
+
+ PR: 153232
+ When we search the best node for block zoom, if the initial node's new
+ scale exceeds the maximum block zoom scale, we will try to walk through
+ it's ancestors and pick the acceptable one. But the reality is that the
+ acceptable ancestor's size can be too close to the size of the actual
+ contents, we will do nothing for it. As we will still select the
+ minimum of the new scale and the maximum block zoom scale as block zoom
+ scale, we can ignore such kind of node and use the initial node instead.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::adjustedBlockZoomNodeForZoomLimits):
+
+2012-05-01 Mike Fenton <mifenton@rim.com>
+
+ Add special attribute for alternate selection touch handling.
+ https://bugs.webkit.org/show_bug.cgi?id=85284
+
+ Reviewed by Antonio Gomes.
+
+ PR 152975.
+
+ Add attribute -bb-selection-touchoverride to override
+ touch handling on selection overlay.
+
+ Reviewed Internally by Gen Mak.
+
+ * Api/WebPageClient.h:
+ * WebKitSupport/SelectionHandler.cpp:
+ (BlackBerry::WebKit::SelectionHandler::inputNodeOverridesTouch):
+ (WebKit):
+ (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
+ * WebKitSupport/SelectionHandler.h:
+ (SelectionHandler):
+
+2012-04-30 Benjamin Poulain <benjamin@webkit.org>
+
+ Add String::startsWith() and endsWith() for string literals
+ https://bugs.webkit.org/show_bug.cgi?id=85154
+
+ Reviewed by Darin Adler.
+
+ * WebKitSupport/DOMSupport.cpp:
+ (BlackBerry::WebKit::DOMSupport::elementPatternMatches):
+
+2012-04-27 Jacky Jiang <zhajiang@rim.com>
+
+ [BlackBerry] Double tap zooming does nothing on table element on bustedtees.com
+ https://bugs.webkit.org/show_bug.cgi?id=85104
+
+ Reviewed by George Staikos.
+
+ PR: 147006
+ This was caused by the incorrect fix master_33/SHA:612caec4.
+ Calculations like this "originalArea / pageArea" would always return 0
+ so that the incorrect node and blockRect were used by block zoom. This
+ patch takes care of it.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
+ (BlackBerry::WebKit::WebPage::blockZoom):
+
+2012-04-27 Nima Ghanavatian <nghanavatian@rim.com>
+
+ [BlackBerry] Improve log output in InputHandler.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=85007
+
+ Reviewed by Antonio Gomes.
+
+ PR 138292
+ Improving logging in InputHandler.
+ In setText we had an early return which wasn't being captured.
+ Also, cleaning up the output to make it more clear and descriptive.
+
+ Internally reviewed by Mike Fenton.
+
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::learnText):
+ (BlackBerry::WebKit::InputHandler::enableInputMode):
+ (BlackBerry::WebKit::InputHandler::setText):
+
+2012-04-27 Chris Guan <chris.guan@torchmobile.com.cn>
+
+ [Blackberry] remove redundant returns
+ https://bugs.webkit.org/show_bug.cgi?id=85033
+
+ Reviewed by Antonio Gomes.
+
+ Remove two redundant returns which were added by accident.
+
+ No new test cases, because no behaviour has changed.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPage::setSelection):
+ (BlackBerry::WebKit::WebPage::setCaretPosition):
+
+2012-04-27 Andy Chen <andchen@rim.com>
+
+ [BlackBerry] Find-in-page fails to deactivate the old active match when moving backwards
+ https://bugs.webkit.org/show_bug.cgi?id=84892
+
+ Reviewed by Antonio Gomes.
+
+ Find in page fails to deactivate the old active match when moving backwards
+ because searchStartingPoint was incorrectly initialized.
+ Create a real range object instead of referencing other range object.
+ PR 152009
+
+ Internally reviewed by Yongxin Dai.
+
+ * WebKitSupport/InPageSearchManager.cpp:
+ (BlackBerry::WebKit::InPageSearchManager::findNextString):
+
+2012-04-26 Yong Li <yoli@rim.com>
+
+ [BlackBerry] A quick fix to the previous patch r115245.
+ https://bugs.webkit.org/show_bug.cgi?id=84862
+
+ Reviewed by Antonio Gomes.
+
+ Fix an obvious bug in previous patch: DeferredTaskLoadManualScript
+ was using a wrong flag.
+
+ * Api/WebPage.cpp:
+ * Api/WebPage_p.h:
+ (WebPagePrivate):
+
+2012-04-25 Chris Guan <chris.guan@torchmobile.com.cn>
+
+ [Blackberry] add a new function in BackingStore
+ https://bugs.webkit.org/show_bug.cgi?id=84818
+
+ Reviewed by Antonio Gomes.
+
+ Adding two functions in BackingStorePrivate and
+ BackingStore, which could render out webpage contents
+ into BlackBerry::Platform::Graphics::Drawable.
+
+ * Api/BackingStore.cpp:
+ (BlackBerry::WebKit::BackingStorePrivate::renderContents):
+ (WebKit):
+ (BlackBerry::WebKit::BackingStore::drawContents):
+ * Api/BackingStore.h:
+ * Api/BackingStore_p.h:
+ (BackingStorePrivate):
+
+2012-04-25 Charles Wei <charles.wei@torchmobile.com.cn>
+
+ [BlackBerry] Input Range element expects mouse events
+ https://bugs.webkit.org/show_bug.cgi?id=84571
+
+ Reviewed by Antonio Gomes.
+
+ This just cleans up the code a bit to make it less code and more readable.
+ * WebKitSupport/TouchEventHandler.cpp:
+ (BlackBerry::WebKit::shouldConvertTouchToMouse):
+ (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
+ (BlackBerry::WebKit::TouchEventHandler::spellCheck):
+
+2012-04-25 Yong Li <yoli@rim.com>
+
+ [BlackBerry] Possible JS re-entrancy caused by UI events.
+ https://bugs.webkit.org/show_bug.cgi?id=84862
+
+ Reviewed by Antonio Gomes.
+
+ 1. block UI events when running in nested event loop
+ 2. defer some tasks we still want to perform when it is safe to do,
+ with cached data.
+ 3. deferred task can be cancelled by clearing the flag. duplicate tasks
+ is not a problem because they share same flag and data.
+ 4. move deferred manual script from FrameLoaderClientBlackBerry to WebPagePrivate
+ and make it a deferred task
+
+ * Api/WebPage.cpp:
+ (WebKit):
+ (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
+ (BlackBerry::WebKit::WebPagePrivate::load):
+ (BlackBerry::WebKit::WebPagePrivate::stopCurrentLoad):
+ (BlackBerry::WebKit::WebPagePrivate::willDeferLoading):
+ (BlackBerry::WebKit::WebPagePrivate::didResumeLoading):
+ (BlackBerry::WebKit::WebPagePrivate::deferredTasksTimerFired):
+ (BlackBerry::WebKit::WebPage::assignFocus):
+ (BlackBerry::WebKit::WebPagePrivate::setPageVisibilityState):
+ (BlackBerry::WebKit::WebPage::setInputSelection):
+ (BlackBerry::WebKit::WebPage::popupListClosed):
+ (BlackBerry::WebKit::WebPage::setDateTimeInput):
+ (BlackBerry::WebKit::WebPage::setColorInput):
+ (BlackBerry::WebKit::WebPage::mouseEvent):
+ (BlackBerry::WebKit::WebPage::touchEvent):
+ (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
+ (BlackBerry::WebKit::WebPage::touchEventCancel):
+ (BlackBerry::WebKit::WebPage::touchEventCancelAndClearFocusedNode):
+ (BlackBerry::WebKit::WebPage::keyEvent):
+ (BlackBerry::WebKit::WebPage::deleteTextRelativeToCursor):
+ (BlackBerry::WebKit::WebPage::setComposingText):
+ (BlackBerry::WebKit::WebPage::commitText):
+ (BlackBerry::WebKit::WebPage::selectionCancelled):
+ (BlackBerry::WebKit::WebPage::cutSelectedText):
+ (BlackBerry::WebKit::WebPage::insertText):
+ (BlackBerry::WebKit::WebPage::clearCurrentInputField):
+ (BlackBerry::WebKit::WebPage::cut):
+ (BlackBerry::WebKit::WebPage::paste):
+ (BlackBerry::WebKit::WebPage::setSelection):
+ (BlackBerry::WebKit::WebPage::setCaretPosition):
+ (BlackBerry::WebKit::WebPage::selectAtPoint):
+ (BlackBerry::WebKit::WebPage::setFocused):
+ * Api/WebPage.h:
+ * Api/WebPage_p.h:
+ (WebCore):
+ (WebPagePrivate):
+ (DeferredTaskBase):
+ (BlackBerry::WebKit::WebPagePrivate::DeferredTaskBase::perform):
+ (BlackBerry::WebKit::WebPagePrivate::DeferredTaskBase::DeferredTaskBase):
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::FrameLoaderClientBlackBerry):
+ (WebCore::FrameLoaderClientBlackBerry::~FrameLoaderClientBlackBerry):
+ (WebCore::FrameLoaderClientBlackBerry::willDeferLoading):
+ (WebCore::FrameLoaderClientBlackBerry::didResumeLoading):
+ * WebCoreSupport/FrameLoaderClientBlackBerry.h:
+ (FrameLoaderClientBlackBerry):
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::setPopupListIndexes):
+ * WebKitSupport/InputHandler.h:
+ (InputHandler):
+
+2012-04-24 Nima Ghanavatian <nghanavatian@rim.com>
+
+ [BlackBerry] Perform spellcheck before handling TouchRelease event
+ https://bugs.webkit.org/show_bug.cgi?id=84744
+
+ After rebasing to master_35, it appears as though some code had been moved around.
+ Here, we were handling the TouchReleased event before calling spellcheck. This
+ meant that when we finally got the call to spellcheck, the fatFinger result had been
+ reset and the spelling markers had been removed.
+
+ In addition, based on https://bugs.webkit.org/show_bug.cgi?id=66330
+ I am also updating the BlackBerry specific documentMarkerContainingPoint to use
+ LayoutPoint instead of IntPoint.
+
+ Internally reviewed by Mike Fenton.
+
+ Reviewed by Antonio Gomes.
+
+ * WebKitSupport/TouchEventHandler.cpp:
+ (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
+ (BlackBerry::WebKit::TouchEventHandler::spellCheck):
+ * dom/DocumentMarkerController.cpp:
+ (WebCore::DocumentMarkerController::markerContainingPoint):
+ * dom/DocumentMarkerController.h:
+
+2012-04-24 Mike Lattanzio <mlattanzio@rim.com>
+
+ [BlackBerry] setUserViewportArguments not always respected.
+ https://bugs.webkit.org/show_bug.cgi?id=84738
+
+ Reviewed by Antonio Gomes.
+
+ Remove the unnecessary logic in
+ WebPagePrivate::recomputeVirtualViewportFromViewportArguments().
+ Instead it is much simpler to just set the m_viewportArguments to
+ m_userViewportArguments on LoadCommitted. If there is a viewport
+ tag in the content, m_viewportArguments will be replaced with it
+ as usual during normal page load.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::setLoadState):
+ (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
+
+2012-04-24 Joe Mason <jmason@rim.com>
+
+ [BlackBerry] Revert broken changes to authentication dialog
+ https://bugs.webkit.org/show_bug.cgi?id=80135
+
+ Reviewed by Antonio Gomes.
+
+ The previous patches from this bug caused an infinite loop when using digest auth;
+ apparently they were only tested with basic.
+
+ * Api/DumpRenderTreeClient.h:
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
+ * Api/WebPageClient.h:
+ * Api/WebPage_p.h:
+ (WebPagePrivate):
+
+2012-04-24 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] Add additional details including the bounds of the box for caretPositionChanged.
+ https://bugs.webkit.org/show_bug.cgi?id=84728
+
+ Reviewed by Antonio Gomes.
+
+ PR 138988.
+
+ Update caretPositionChanged to include the limit of the input field
+ for single line inputs.
+
+ Reviewed Internally by Gen Mak.
+
+ * Api/WebPageClient.h:
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::boundingBoxForInputField):
+ (WebKit):
+ * WebKitSupport/InputHandler.h:
+ (InputHandler):
+ * WebKitSupport/SelectionHandler.cpp:
+ (BlackBerry::WebKit::SelectionHandler::clippingRectForVisibleContent):
+ (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
+
+2012-04-24 Charles Wei <charles.wei@torchmobile.com.cn>
+
+ [BlackBerry] Input Range element expects mouse events
+ https://bugs.webkit.org/show_bug.cgi?id=84571
+
+ Reviewed by Antonio Gomes.
+
+ Input element with Range type expects mouse events to
+ drag the handle. Note that Input Range could appear
+ in both the web page directly, or in some shadow tree,
+ like the MediaControlTimeline and MediaControlVolume.
+ * WebKitSupport/TouchEventHandler.cpp:
+ (BlackBerry::WebKit::isRangeControlElement):
+ (WebKit):
+ (BlackBerry::WebKit::elementExpectsMouseEvents):
+ (BlackBerry::WebKit::shouldConvertTouchToMouse):
+
+2012-04-23 Charles Wei <charles.wei@torchmobile.com.cn>
+
+ [BlackBerry] Build failure when DEBUG_FAT_FINGER is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=84563
+
+ Reviewed by Antonio Gomes.
+
+ Fat Finger log code uses obsolete IntRect::toString() for logging,
+ which was first implemented interally and removed later.
+
+ * WebKitSupport/FatFingers.cpp:
+ (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
+
+2012-04-21 Benjamin C Meyer <bmeyer@rim.com>
+
+ Don't hard code the plugins that blackberry supports.
+ https://bugs.webkit.org/show_bug.cgi?id=84535
+
+ Use the existing PluginDatabase to query for the plugins we can handle.
+
+ The original implemention of FrameLoaderClientBlackBerry::createPlugin
+ was a partial copy from another port. In the Qt port there is some
+ workarounds for flash which is why this exists there. Sadly the bits
+ that were copied made it so only flash worked, but as flash was the only
+ plugin on the system this issue was not noticed until QNX tried to get
+ jnext working. Tracing it down to this bit of code rather then
+ correcting it they hardcoded the jnext into the same block as flash was.
+
+ The blackberry port isn't specifically suppose to only allow jnext and
+ flash, but was an accident due to the way this code was developed.
+
+ Reviewed by Adam Treat.
+
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::createPlugin):
+
+2012-04-20 Brady Eidson <beidson@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=84512
+ Repurpose ActiveDOMObject::WillShowDialog to WillDeferLoading
+
+ Reviewed by Eric Carlson.
+
+ PageGroupLoadDeferrer's don't take a ReasonForSuspension argument anymore;
+ They just use WillDeferLoading by default.
+
+ * Api/WebPageGroupLoadDeferrer.cpp:
+ (BlackBerry::WebKit::WebPageGroupLoadDeferrer::WebPageGroupLoadDeferrer):
+
+ * WebCoreSupport/ChromeClientBlackBerry.cpp:
+ (WebCore::ChromeClientBlackBerry::createWindow):
+ (WebCore::ChromeClientBlackBerry::runOpenPanel):
+
+2012-04-20 Brady Eidson <beidson@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=84490
+ PageGroupLoadDeferrer needs to take a ReasonForSuspension argument
+
+ Reviewed by Anders Carlsson.
+
+ * Api/WebPageGroupLoadDeferrer.cpp:
+ (BlackBerry::WebKit::WebPageGroupLoadDeferrer::WebPageGroupLoadDeferrer): Pass along ActiveDOMObject::WillShowDialog,
+ which used to be the default
+
+ * WebCoreSupport/ChromeClientBlackBerry.cpp:
+ (WebCore::ChromeClientBlackBerry::createWindow): Pass along ActiveDOMObject::WillShowDialog, which used to be the default.
+ (WebCore::ChromeClientBlackBerry::runOpenPanel): Ditto.
+
+2012-04-20 Mike Lattanzio <mlattanzio@rim.com>
+
+ [BlackBerry] Expose WebViewportArguments to WebPageClient
+ https://bugs.webkit.org/show_bug.cgi?id=84471
+
+ Reviewed by Antonio Gomes.
+
+ Implement the ability for the WebPageClient to specify a fallback
+ virtual viewport to be used whenever a meta viewport tag is not
+ present in the HTML. This can drastically impact apparent layout.
+ This patch is designed to provide a classic "Column View" style of
+ layout without breaking the web by simply exposing meta viewport
+ arguments to WebPageClients.
+
+ Note: As a side effect of this change. the WebPagePrivate::
+ recomputeVirtualViewportFromViewportArguments method no longer
+ modifies the targetDensityDpi property of the m_viewportArguments.
+ However this does not affect the class because that property itself
+ means nothing to us. Only the computeViewportArguments method from
+ WebCore uses it, and the currentViewportArguments object we pass
+ into that method has the adjusted targetDensityDpi value as before.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPage::setUserViewportArguments):
+ (WebKit):
+ (BlackBerry::WebKit::WebPage::resetUserViewportArguments):
+ (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
+ * Api/WebPage.h:
+ (WebKit):
+ * Api/WebPage_p.h:
+ (WebPagePrivate):
+ * Api/WebViewportArguments.cpp: Added.
+ (WebKit):
+ (BlackBerry::WebKit:::d):
+ (BlackBerry::WebKit::WebViewportArguments::~WebViewportArguments):
+ (BlackBerry::WebKit::WebViewportArguments::initialScale):
+ (BlackBerry::WebKit::WebViewportArguments::setInitialScale):
+ (BlackBerry::WebKit::WebViewportArguments::minimumScale):
+ (BlackBerry::WebKit::WebViewportArguments::setMinimumScale):
+ (BlackBerry::WebKit::WebViewportArguments::maximumScale):
+ (BlackBerry::WebKit::WebViewportArguments::setMaximumScale):
+ (BlackBerry::WebKit::WebViewportArguments::width):
+ (BlackBerry::WebKit::WebViewportArguments::setWidth):
+ (BlackBerry::WebKit::WebViewportArguments::height):
+ (BlackBerry::WebKit::WebViewportArguments::setHeight):
+ (BlackBerry::WebKit::WebViewportArguments::targetDensityDpi):
+ (BlackBerry::WebKit::WebViewportArguments::setTargetDensityDpi):
+ (BlackBerry::WebKit::WebViewportArguments::userScalable):
+ (BlackBerry::WebKit::WebViewportArguments::setUserScalable):
+ (BlackBerry::WebKit::WebViewportArguments::operator==):
+ (BlackBerry::WebKit::WebViewportArguments::operator!=):
+ * Api/WebViewportArguments.h: Added.
+ (WebCore):
+ (WebKit):
+
+2012-04-19 Arvid Nilsson <anilsson@rim.com>
+
+ [BlackBerry] Always use the AnimationFrameRateController for accelerated animations
+ https://bugs.webkit.org/show_bug.cgi?id=84323
+
+ Reviewed by Antonio Gomes.
+
+ PR 150750
+ Regardless of whether there's a WebPageCompositorClient, we want the
+ AnimationFrameRateController to manage animation frames.
+ Reviewed internally by Andrew Lo.
+
+ * Api/BackingStore.cpp:
+ (BlackBerry::WebKit::BackingStorePrivate::blitContents):
+ * Api/WebPageCompositor.cpp:
+ (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
+ * Api/WebPageCompositor_p.h:
+ (WebPageCompositorPrivate):
+
+2012-04-18 Max Feil <mfeil@rim.com>
+
+ [BlackBerry] Tab awareness for HTML5 concurrent audio
+ https://bugs.webkit.org/show_bug.cgi?id=82930
+ Support for concurrent HTML5 audio improvements being made in
+ the platform library, which need to be aware of tabs and tab
+ visibility. PR96004.
+
+ Reviewed by George Staikos.
+
+ * Api/WebPageClient.h:
+ * Api/WebPage_p.h:
+ (BlackBerry::WebKit::WebPagePrivate::isVisible):
+
+2012-04-17 Jacky Jiang <zhajiang@rim.com>
+
+ [BlackBerry] Viewport metatag doesn't disable double-tap zoom
+ https://bugs.webkit.org/show_bug.cgi?id=84199
+
+ Reviewed by George Staikos.
+
+ PR: 148279
+ When we set "user-scalable=no" in viewport meta-tag and change any
+ other WebSettings, the WebPage can turn to be scalable.
+ This is a regression of the change master_32/SHA:fa0f8ee9. In that
+ change, we used setUserScalable(webSettings->isUserScalable())
+ in WebPagePrivate::didChangeSettings which was incorrect for non-DRT
+ case, as webSettings->isUserScalable() would always return true by
+ default.
+ Create a new API WebPage::setUserScalable which will be used in
+ DumpRenderTree.cpp.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPage::setUserScalable):
+ (WebKit):
+ (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
+ * Api/WebPage.h:
+
+2012-04-17 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] Pattern matching should be applied to numbers
+ https://bugs.webkit.org/show_bug.cgi?id=84152
+
+ Reviewed by Antonio Gomes.
+
+ PR 148906.
+
+ Add pattern matching for number based on [0-9] to trigger
+ input help matching number fields.
+
+ * WebKitSupport/DOMSupport.cpp:
+ (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesNumber):
+ (DOMSupport):
+ (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesHexadecimal):
+ (BlackBerry::WebKit::DOMSupport::elementPatternMatches):
+ * WebKitSupport/DOMSupport.h:
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::convertInputType):
+
+2012-04-17 George Staikos <staikos@webkit.org>
+
+ Export the initialization function so it can be called earlier.
+ https://bugs.webkit.org/show_bug.cgi?id=84134
+
+ Reviewed by Nikolas Zimmermann.
+
+ * Api/BlackBerryGlobal.h: export globalInitialize()
+ (WebKit):
+
+2012-04-16 Antonio Gomes <agomes@rim.com>
+
+ Screen shift down when VKB shows by clicking in a input box MKS_3601371
+ https://bugs.webkit.org/show_bug.cgi?id=84057
+
+ Reviewed by Rob Buis.
+
+ After switching from ScrollView::canOverscroll to ScrollView::constrainsScrollingToContentEdge
+ we had a less restricted code path allowing/disallowing overscrolling. That caused
+ some webpages like google.com to get on overscroll when adjusting the scroll
+ position to ensure the focused input field is visible.
+
+ Patch restricts the way we allow overscrolling to the bottom, where the virtual
+ keyboard pops up from, clamping it to 0, 0 if it tries to
+ overscroll upwards, and to maximum scroll position if it overscrolls
+ downwards.
+
+ PR #149846
+ Internally reviewed by Mike Fenton.
+
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
+
+2012-04-16 Yongxin Dai <yodai@rim.com>
+
+ [BlackBerry] Increase padding for text element
+ https://bugs.webkit.org/show_bug.cgi?id=83903
+
+ Reviewed by Antonio Gomes.
+
+ PR 125888
+
+ Increase the padding value for focused text element to make selection handle
+ at least partially visible when the user is dragging at edge of viewport
+ in in-region scoll mode.
+
+ Reviewed internally by Mike Fenton.
+
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
+
+2012-04-16 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
+
+ [BlackBerry] Add ability for DRT to handle HTTP authentication challenges.
+ https://bugs.webkit.org/show_bug.cgi?id=84031
+
+ Reviewed by Rob Buis.
+
+ Added the interface function didReceivedAuthenticaitonChallenge()
+ in interface class DumpRenderTreeClient;
+ Called m_dumpRenderTree->didReceiveAuthenticationChallenge() in
+ WebPagePrivate::authenticationChallenge() when DRT is enabled.
+
+ Test: reuse existing test cases:
+ http/tests/loading/basic-credentials-sent-automatically.html
+ http/tests/loading/basic-auth-resend-wrong-credentials.html
+
+ * Api/DumpRenderTreeClient.h:
+ (WebCore):
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
+
+2012-04-16 Arvid Nilsson <anilsson@rim.com>
+
+ [BlackBerry] Accelerated compositing layers fail to render in direct rendering mode
+ https://bugs.webkit.org/show_bug.cgi?id=83933
+
+ Reviewed by Adam Treat.
+
+ RIM PR: 149609
+ This was because I accidentally dropped an exclamation mark when
+ upstreaming the patch for PR 136381 (bug #83131). Fixed by adding back
+ the exclamation mark.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
+
+2012-04-12 Konrad Piascik <kpiascik@rim.com>
+
+ [BlackBerry] Web Inspector messages incorrectly converted
+ https://bugs.webkit.org/show_bug.cgi?id=83796
+
+ Reviewed by Rob Buis.
+
+ The JSON sent over from the remote Web Inspector front-end was being
+ mis interpreted as ISO-8859-1. This caused all non ascii characters to
+ become garbled when using the String constructor, so we use fromtUTF8 instead.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPage::dispatchInspectorMessage):
+
+2012-04-12 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] Speed up processing of Selection region generation.
+ https://bugs.webkit.org/show_bug.cgi?id=82766
+
+ Reviewed by Rob Buis.
+
+ PR 136593.
+
+ Re-speed up text selection. The previous patch had a merge
+ error causing text selection not to function. The fix
+ implemented removed the optimization. This fixes the error
+ in the original patch and removes the temporary fix.
+
+ Make style updated as suggested by Antonio Gomes.
+
+ Reviewed Internally by Gen Mak.
+
+ * WebKitSupport/SelectionHandler.cpp:
+ (BlackBerry::WebKit::SelectionHandler::regionForTextQuads):
+ (BlackBerry::WebKit::regionRectListContainsPoint):
+
+2012-04-12 Mike Fenton <mifenton@rim.com>
+
+ Pattern matching for hexadecimal should include * as an allowable count.
+ https://bugs.webkit.org/show_bug.cgi?id=83779
+
+ Reviewed by Rob Buis.
+
+ Update pattern matching check to allow wildcard for number
+ of characters allowed.
+
+ PR 148907.
+
+ Reviewed Internally by Gen Mak.
+
+ * WebKitSupport/DOMSupport.cpp:
+ (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesHexadecimal):
+
+2012-04-11 Joe Mason <jmason@rim.com>
+
+ [BlackBerry] Update to the thread-safe GuardedPointer API
+ https://bugs.webkit.org/show_bug.cgi?id=83603
+
+ Reviewed by Rob Buis.
+
+ RIM PR: 134984
+ Make the destructors of all objects inheriting GuardedPointerBase protected or
+ private, and delete them using BlackBerry::Platform::deleteGuardedObject.
+ Access all GuardedPointers through GuardedPointerLocker.
+
+ No new tests, refactor.
+
+ Reviewed internally by Yong Li and George Staikos.
+
+ * Api/BackingStore.cpp:
+ (BlackBerry::WebKit::BackingStore::~BackingStore):
+ * Api/BackingStore_p.h:
+ (BackingStorePrivate):
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPage::~WebPage):
+ (BlackBerry::WebKit::WebPage::destroy):
+ * Api/WebPage.h:
+ * Api/WebPage_p.h:
+ (WebPagePrivate):
+
+2012-04-10 Arvid Nilsson <anilsson@rim.com>
+
+ [BlackBerry] Crash when tearing down web page rendered using WebPageCompositor
+ https://bugs.webkit.org/show_bug.cgi?id=83567
+
+ Reviewed by Antonio Gomes.
+
+ Fixed by checking if there's a layer renderer before calling into it.
+
+ * Api/WebPageCompositor.cpp:
+ (BlackBerry::WebKit::WebPageCompositorPrivate::releaseLayerResources):
+
+2012-04-09 Eli Fidler <efidler@rim.com>
+
+ [BlackBerry] Update about:config page
+ https://bugs.webkit.org/show_bug.cgi?id=83515
+
+ Reviewed by Rob Buis.
+
+ * WebCoreSupport/AboutData.cpp:
+ (WebCore::configPage):
+ * WebCoreSupport/AboutDataEnableFeatures.in:
+ * WebCoreSupport/AboutDataHaveFeatures.in:
+ * WebCoreSupport/AboutDataUseFeatures.in:
+
+2012-04-07 Rob Buis <rbuis@rim.com>
+
+ [BlackBerry] Add Battery Status API support
+ https://bugs.webkit.org/show_bug.cgi?id=82615
+
+ Reviewed by George Staikos.
+
+ Add client implementation for Battery API.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::init): initialize BatteryClient.
+ * WebCoreSupport/BatteryClientBlackBerry.cpp: Added.
+ (WebCore):
+ (WebCore::BatteryClientBlackBerry::BatteryClientBlackBerry):
+ (WebCore::BatteryClientBlackBerry::setController):
+ (WebCore::BatteryClientBlackBerry::startUpdating):
+ (WebCore::BatteryClientBlackBerry::stopUpdating):
+ (WebCore::BatteryClientBlackBerry::batteryControllerDestroyed):
+ (WebCore::BatteryClientBlackBerry::onLevelChange):
+ (WebCore::BatteryClientBlackBerry::onChargingChange):
+ (WebCore::BatteryClientBlackBerry::onChargingTimeChange):
+ (WebCore::BatteryClientBlackBerry::onDischargingTimeChange):
+ * WebCoreSupport/BatteryClientBlackBerry.h: Added.
+ (WebCore):
+ (BatteryClientBlackBerry):
+ (WebCore::BatteryClientBlackBerry::~BatteryClientBlackBerry):
+
+2012-04-06 Benjamin Poulain <bpoulain@apple.com>
+
+ Get rid of the useless flag PREEMPT_GEOLOCATION_PERMISSION
+ https://bugs.webkit.org/show_bug.cgi?id=83325
+
+ Reviewed by Ryosuke Niwa.
+
+ * WebCoreSupport/AboutDataUseFeatures.in:
+
+2012-04-06 Sean Wang <Xuewen.Wang@torchmobile.com.cn>
+
+ [BlackBerry] Text selection - Can't select texts
+ https://bugs.webkit.org/show_bug.cgi?id=83355
+
+ Fix the problem of not sending out the result of the function
+ SelectionHandler::regionForTextQuads(). This regression issue
+ is introduced by the git commit f9446b7d671d48a833ab0acf12b1e20637e0a910.
+
+ Reviewed by George Staikos.
+
+ * WebKitSupport/SelectionHandler.cpp:
+ (BlackBerry::WebKit::SelectionHandler::regionForTextQuads):
+ Add code to return the function result.
+
+2012-04-05 Jason Liu <jason.liu@torchmobile.com.cn>
+
+ [BlackBerry] Empty Referrer should not be set into ResourceRequest when loading a main resource.
+ https://bugs.webkit.org/show_bug.cgi?id=83252
+
+ Reviewed by George Staikos.
+
+ Test: http/tests/misc/resources/referrer-main-resource.php
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::load):
+
+2012-04-05 George Staikos <staikos@webkit.org>
+
+ Add a vibration client for BlackBerry and enable it.
+ https://bugs.webkit.org/show_bug.cgi?id=83340
+
+ Reviewed by Rob Buis.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::init): enable the client
+ * WebCoreSupport/VibrationClientBlackBerry.cpp: Added.
+ (WebCore):
+ (WebCore::VibrationClientBlackBerry::VibrationClientBlackBerry):
+ (WebCore::VibrationClientBlackBerry::vibrate):
+ (WebCore::VibrationClientBlackBerry::cancelVibration):
+ (WebCore::VibrationClientBlackBerry::vibrationDestroyed):
+ * WebCoreSupport/VibrationClientBlackBerry.h: Added.
+ (WebCore):
+ (VibrationClientBlackBerry):
+ (WebCore::VibrationClientBlackBerry::~VibrationClientBlackBerry):
+
+2012-04-05 Arvid Nilsson <anilsson@rim.com>
+
+ [BlackBerry] Force compositing mode when backing store is not active
+ https://bugs.webkit.org/show_bug.cgi?id=83131
+
+ Reviewed by George Staikos.
+
+ RIM PR: 136381
+ Normally, the BlackBerry WebKit port resorts to direct rendering when
+ the backing store is not active. However, direct rendering is broken
+ with the OpenGL code path. This prevented multiple web pages from being
+ displayed at once with the new WebPageCompositor API.
+
+ Fixed by using accelerated compositing layer to render the root layer
+ instead of backing store. This will give us a tiled layer backing the
+ root layer, which for some use cases is even better than direct
+ rendering.
+
+ Reviewed internally by Filip Spacek.
+
+ * Api/BackingStore.cpp:
+ (BlackBerry::WebKit::BackingStorePrivate::shouldDirectRenderingToWindow):
+ (BlackBerry::WebKit::BackingStorePrivate::blitContents):
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::setLoadState):
+ (BlackBerry::WebKit::WebPage::setVisible):
+ (BlackBerry::WebKit::WebPagePrivate::suspendBackingStore):
+ (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
+ (BlackBerry::WebKit::WebPagePrivate::compositorDrawsRootLayer):
+ (WebKit):
+ (BlackBerry::WebKit::WebPagePrivate::setCompositorDrawsRootLayer):
+ (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
+ (BlackBerry::WebKit::WebPagePrivate::scheduleRootLayerCommit):
+ (BlackBerry::WebKit::WebPagePrivate::commitRootLayer):
+ (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
+ (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
+ (BlackBerry::WebKit::WebPagePrivate::setRootLayerCompositingThread):
+ (BlackBerry::WebKit::WebPagePrivate::createCompositor):
+ (BlackBerry::WebKit::WebPagePrivate::suspendRootLayerCommit):
+ (BlackBerry::WebKit::WebPagePrivate::setNeedsOneShotDrawingSynchronization):
+ * Api/WebPageCompositor.cpp:
+ (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::drawsRootLayer):
+ (WebKit):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
+ * Api/WebPageCompositor_p.h:
+ (BlackBerry::WebKit::WebPageCompositorPrivate::rootLayer):
+ (WebPageCompositorPrivate):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::setDrawsRootLayer):
+ * Api/WebPage_p.h:
+ (WebPagePrivate):
+
+2012-04-05 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
+
+ [BlackBerry] Clear local storage won't take effect until browser exit and relaunch
+ https://bugs.webkit.org/show_bug.cgi?id=83253
+
+ Reviewed by Rob Buis.
+
+ RIM PR: #146871
+ Cleared the local storage namespace of a WebPage's PageGroup
+ when WebPage::clearLocalStorage() get called.
+ Also deleted unused global function clearLocalStorage().
+
+ * Api/BlackBerryGlobal.cpp:
+ * Api/BlackBerryGlobal.h:
+ (WebKit):
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPage::clearLocalStorage):
+
+2012-04-04 Rob Buis <rbuis@rim.com>
+
+ [BlackBerry] Make the switch statement in WebPage::notifyAppActivationStateChange() stronger
+ https://bugs.webkit.org/show_bug.cgi?id=83085
+
+ Reviewed by Antonio Gomes.
+
+ PR 121109
+
+ This way when we add something to the enum and forget to add to the switch we'll get a compile error.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPage::notifyAppActivationStateChange):
+
+2012-04-03 Mike Lattanzio <mlattanzio@rim.com>
+
+ [BlackBerry] Expose CaseSensitive, Wrap, and HighlightAllMatches in WebPage::findNextString()
+ https://bugs.webkit.org/show_bug.cgi?id=82643
+
+ Enhance BlackBerry::WebKit::WebPage::findNextString()
+
+ This patch adds support for toggling case sensitivity,
+ search wrapping, and whether or not to highlight all matches
+ in addition to the next found match.
+
+ I refactored and renamed the new setActiveMatchAndMarker() method
+ to move the active match from one range to another. This was
+ required because in the case of a non wrapped search we do not
+ want to adjust the m_activeMatch if another match is not found.
+
+ Internal Review by Andy Chen.
+
+ Reviewed by Rob Buis.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPage::findNextString):
+ * Api/WebPage.h:
+ * WebKitSupport/InPageSearchManager.cpp:
+ (BlackBerry::WebKit::InPageSearchManager::InPageSearchManager):
+ (BlackBerry::WebKit::InPageSearchManager::findNextString):
+ (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
+ (BlackBerry::WebKit::InPageSearchManager::setActiveMatchAndMarker):
+ (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
+ * WebKitSupport/InPageSearchManager.h:
+ (InPageSearchManager):
+
+2012-04-02 Jacky Jiang <zhajiang@rim.com>
+
+ [BlackBerry] Adapt WebPagePrivate::webContext to the API change of r109570
+ https://bugs.webkit.org/show_bug.cgi?id=82945
+
+ Reviewed by Rob Buis.
+
+ RIM PR: 147163
+ Adapt WebPagePrivate::webContext to the API change of the security
+ cherry-pick of r109570 and r112023.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::webContext):
+
+2012-04-02 Lianghui Chen <liachen@rim.com>
+
+ [BlackBerry] Set ResourceRequest TargetType in WebPagePrivate::load()
+ https://bugs.webkit.org/show_bug.cgi?id=80519
+
+ Set the right TargetType for main loads if they are not already set in
+ dispatchWillSendRequest().
+
+ Also adjust NetworkRequest TargetType for decidePolicyForExternalLoad()
+ and dispatchDecidePolicyForNavigationAction() as they are called before
+ dispatchWillSendRequest() is called. Patch to change ResourceRequest
+ TargetType earlier has been rejected as in WebKit bug
+ https://bugs.webkit.org/show_bug.cgi?id=80713
+
+ Reviewed by Rob Buis.
+
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
+ (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
+ (WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad):
+
+2012-04-01 Arvid Nilsson <anilsson@rim.com>
+
+ [BlackBerry] Simplify the code that gets accelerated compositing output onto the screen
+ https://bugs.webkit.org/show_bug.cgi?id=82845
+
+ Reviewed by Rob Buis.
+
+ RIM PR: 136381
+ The code accounted for a now obsolete setup where we used one OpenGL
+ window for accelerated compositing and one native window for backing
+ store output, and let the windowing system composite those two. In that
+ setup an optimization to try and only update the window that had
+ changed was viable.
+
+ Nowadays, we either use an offscreen surface for accelerated
+ compositing output, which we blend onto the window containing the
+ backing store output, or render both backing store and accelerated
+ compositing output directly to one OpenGL window. We always have to
+ blit the backingstore contents and draw the accelerated compositing
+ output every frame with these code paths, so don't try to be clever
+ about it.
+
+ Even when we use an OpenGL window, the compositing surface can be non-
+ null, so don't try to glFinish() and swap the compositing surface when
+ the GLES2Context is tied to a window.
+
+ * Api/BackingStore.cpp:
+ (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
+ (BlackBerry::WebKit::BackingStorePrivate::blitContents):
+ (WebKit):
+ * Api/BackingStore_p.h:
+ (BackingStorePrivate):
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
+ * WebKitSupport/GLES2Context.cpp:
+ (BlackBerry::WebKit::GLES2Context::swapBuffers):
+
+2012-03-31 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
+
+ [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
+ https://bugs.webkit.org/show_bug.cgi?id=80135
+
+ Reviewed by Rob Buis.
+
+ RIM PR: 145660
+ Fixed a regression introduced by r111810, which used the wrong
+ credential object.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
+
+2012-03-30 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] Speed up processing of Selection region generation.
+ https://bugs.webkit.org/show_bug.cgi?id=82766
+
+ Reviewed by Rob Buis.
+
+ PR 136593.
+
+ Refactor generation of Selection IntRectRegion to avoid
+ the need for IntRectRegion's helper functions which were
+ not available when using it as a container without
+ unioning the rects.
+
+ This greatly speeds up rendering by maintaining the distinct
+ rects as the union operation was length with large numbers of
+ rects.
+
+ Reviewed Internally by Gen Mak, Mike Lattanzio and Tyler Abbott.
+
+ * WebKitSupport/DOMSupport.cpp:
+ (BlackBerry::WebKit::DOMSupport::visibleTextQuads):
+ (DOMSupport):
+ * WebKitSupport/DOMSupport.h:
+ * WebKitSupport/SelectionHandler.cpp:
+ (BlackBerry::WebKit::SelectionHandler::clippingRectForVisibleContent):
+ (BlackBerry::WebKit::SelectionHandler::regionForTextQuads):
+ (BlackBerry::WebKit::SelectionHandler::setSelection):
+ (WebKit):
+ (BlackBerry::WebKit::regionRectListContainsPoint):
+ (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
+ (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
+ * WebKitSupport/SelectionHandler.h:
+ (WebCore):
+ (SelectionHandler):
+
+2012-03-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ GEOLOCATION should be implemented as Page Supplement
+ https://bugs.webkit.org/show_bug.cgi?id=82228
+
+ Reviewed by Adam Barth.
+
+ Geolocation is now a Supplement in Page so the interface
+ has changed for setting up the page's geolocation client
+ initially and accessing the controller later.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
+ (BlackBerry::WebKit::WebPagePrivate::init):
+ * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
+ (GeolocationControllerClientBlackBerry::onLocationUpdate):
+ (GeolocationControllerClientBlackBerry::onLocationError):
+ * WebKitSupport/DumpRenderTreeSupport.cpp:
+ (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
+ (DumpRenderTreeSupport::resetGeolocationMock):
+ (DumpRenderTreeSupport::setMockGeolocationError):
+ (DumpRenderTreeSupport::setMockGeolocationPermission):
+ (DumpRenderTreeSupport::setMockGeolocationPosition):
+
+2012-03-30 Keishi Hattori <keishi@webkit.org>
+
+ Change ENABLE_INPUT_COLOR to ENABLE_INPUT_TYPE_COLOR and enable it for chromium
+ https://bugs.webkit.org/show_bug.cgi?id=80972
+
+ Reviewed by Kent Tamura.
+
+ * WebCoreSupport/AboutDataEnableFeatures.in:
+ * WebCoreSupport/ChromeClientBlackBerry.h:
+ (ChromeClientBlackBerry):
+ * WebKitSupport/DOMSupport.cpp:
+ (BlackBerry::WebKit::DOMSupport::isColorInputField):
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::convertInputType):
+
+2012-03-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r111259.
+ http://trac.webkit.org/changeset/111259
+ https://bugs.webkit.org/show_bug.cgi?id=82650
+
+ Caused selection regression in calculations due to
+ misconstructed IntRectRegion. (Requested by mfenton on
+ #webkit).
+
+ * WebKitSupport/SelectionHandler.cpp:
+ (BlackBerry::WebKit::SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection):
+
+2012-03-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r112553.
+ http://trac.webkit.org/changeset/112553
+ https://bugs.webkit.org/show_bug.cgi?id=82638
+
+ It made all tests crash on Qt WK2 (Requested by Ossy_away on
+ #webkit).
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
+ (BlackBerry::WebKit::WebPagePrivate::init):
+ * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
+ (GeolocationControllerClientBlackBerry::onLocationUpdate):
+ (GeolocationControllerClientBlackBerry::onLocationError):
+ * WebKitSupport/DumpRenderTreeSupport.cpp:
+ (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
+ (DumpRenderTreeSupport::resetGeolocationMock):
+ (DumpRenderTreeSupport::setMockGeolocationError):
+ (DumpRenderTreeSupport::setMockGeolocationPermission):
+ (DumpRenderTreeSupport::setMockGeolocationPosition):
+
+2012-03-29 Mark Pilgrim <pilgrim@chromium.org>
+
+ GEOLOCATION should be implemented as Page Supplement
+ https://bugs.webkit.org/show_bug.cgi?id=82228
+
+ Reviewed by Adam Barth.
+
+ Geolocation is now a Supplement in Page so the interface
+ has changed for setting up the page's geolocation client
+ initially and accessing the controller later.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
+ (BlackBerry::WebKit::WebPagePrivate::init):
+ * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
+ (GeolocationControllerClientBlackBerry::onLocationUpdate):
+ (GeolocationControllerClientBlackBerry::onLocationError):
+ * WebKitSupport/DumpRenderTreeSupport.cpp:
+ (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
+ (DumpRenderTreeSupport::resetGeolocationMock):
+ (DumpRenderTreeSupport::setMockGeolocationError):
+ (DumpRenderTreeSupport::setMockGeolocationPermission):
+ (DumpRenderTreeSupport::setMockGeolocationPosition):
+
+2012-03-28 Nate Chapin <japhet@chromium.org>
+
+ Remove dispatchDidLoadMainResource callback, since no
+ port implements it.
+ https://bugs.webkit.org/show_bug.cgi?id=82539
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/FrameLoaderClientBlackBerry.h:
+ (FrameLoaderClientBlackBerry):
+
+2012-03-28 Leo Yang <leo.yang@torchmobile.com.cn>
+
+ [BlackBerry] Use WebCore::PlatformMouseEvent::globalPosition() instead of WebCore::PlatformMouseEvent::globalPos() in WebPage.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=82420
+
+ Reviewed by Rob Buis.
+
+ In PlatformMouseEvent.h the blackberry porting added globalPos() (but not upstreamed yet)
+ for PlatformMouseEvent, but this method is same as globalPosition() that is available for
+ every porting. We should use globalPosition().
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::updateCursor):
+
+2012-03-27 Sean Wang <Xuewen.Wang@torchmobile.com.cn>
+
+ [BlackBerry] Text selection - selection gets broken in test.com/individuals.htm
+ https://bugs.webkit.org/show_bug.cgi?id=82292
+
+ Change to check and avoid text selection across frames.
+
+ Internal reviewed by Mike Fenton
+
+ Reviewed by Rob Buis.
+
+ * WebKitSupport/SelectionHandler.cpp:
+ (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
+ support selection across frames, so check if the *framePoint* is in
+ the *frame*.
+ (BlackBerry::WebKit::SelectionHandler::setSelection):
+ function returns a null VisablePosition, it stands for a invalid position
+ or a position in the different frames, therefor we don't execute setting
+ handle's position.
+
+2012-03-27 Andrew Lo <anlo@rim.com>
+
+ [BlackBerry] Switch WebPageCompositor to use AnimationFrameRateController instead of timer
+ https://bugs.webkit.org/show_bug.cgi?id=82350
+
+ Switch timer in WebPageCompositor to use AnimationFrameRateController.
+
+ Reviewed by Rob Buis.
+
+ * Api/WebPageCompositor.cpp:
+ (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged):
+ * Api/WebPageCompositor_p.h:
+ (WebPageCompositorPrivate):
+
+2012-03-27 Chris Guan <chris.guan@torchmobile.com.cn>
+
+ A page containing multiparts with "multipart/x-mixed-replace" should not be cached.
+ https://bugs.webkit.org/show_bug.cgi?id=82291
+
+ Reviewed by Rob Buis.
+
+ If we have a multiPart reponse with multipart/x-mixed-replace,
+ the current page should not be cached. I use isMultipartPayload()
+ API which was supposed to be set in NetworkJob to decide to
+ cache page or not.
+
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::canCachePage):
+
+2012-03-25 Arvid Nilsson <anilsson@rim.com>
+
+ [BlackBerry] Accelerated compositing layers fail to render when using WebPageCompositor
+ https://bugs.webkit.org/show_bug.cgi?id=82104
+ RIM PR: 145963
+
+ Reviewed by Rob Buis.
+
+ The root layer may be set before we have a layer renderer, because the
+ latter is not created until we get an OpenGL context from the embedder.
+
+ Fixed by setting the root layer on the layer renderer when it's created
+ instead of assuming a certain order of events.
+
+ * Api/WebPageCompositor.cpp:
+ (BlackBerry::WebKit::WebPageCompositorPrivate::setContext):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
+
+2012-03-23 Arvid Nilsson <anilsson@rim.com>
+
+ [BlackBerry] Add WebPageCompositor class to BlackBerry WebKit API
+ https://bugs.webkit.org/show_bug.cgi?id=81121
+ RIM PR: 136687
+
+ Reviewed by Rob Buis.
+
+ The idea is for the API client to use a WebPageCompositor object to
+ render the WebPage when there's no screen window available.
+
+ The WebPageCompositorPrivate becomes reference counted in order to be
+ kept alive either because it's used for accelerated compositing layers
+ or used for the WebPageCompositor API. It can still work standalone.
+
+ Clean up some code - no need to keep track of a separate boolean
+ WebPagePrivate::m_isAcceleratedCompositingActive when the state of
+ m_compositor can tell you.
+
+ Also remove duplicated code from WebPagePrivate - go directly to the
+ compositor object instead, if you need to draw the AC layers.
+
+ Reviewed internally by Robin Cao and the hasBlitJobs/blitOnIdle change
+ by Filip Spacek.
+
+ * Api/BackingStore.cpp:
+ (BlackBerry::WebKit::BackingStore::hasBlitJobs):
+ (BlackBerry::WebKit::BackingStore::blitOnIdle):
+ (BlackBerry::WebKit::BackingStorePrivate::blitContents):
+ (BlackBerry::WebKit::BackingStorePrivate::drawSubLayers):
+ (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
+ (BlackBerry::WebKit::BackingStorePrivate::surfaceSize):
+ (BlackBerry::WebKit::BackingStorePrivate::buffer):
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
+ (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
+ (BlackBerry::WebKit::WebPagePrivate::setCompositor):
+ (BlackBerry::WebKit::WebPagePrivate::setRootLayerCompositingThread):
+ (BlackBerry::WebKit::WebPagePrivate::createCompositor):
+ (BlackBerry::WebKit::WebPagePrivate::destroyCompositor):
+ * Api/WebPage.h:
+ * Api/WebPageCompositor.cpp:
+ (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::setContext):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::hardwareCompositing):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::render):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::animationTimerFired):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::compositorDestroyed):
+ (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
+ (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
+ (BlackBerry::WebKit::WebPageCompositor::client):
+ (BlackBerry::WebKit::WebPageCompositor::prepareFrame):
+ (BlackBerry::WebKit::WebPageCompositor::render):
+ (BlackBerry::WebKit::WebPageCompositor::cleanup):
+ (BlackBerry::WebKit::WebPageCompositor::contextLost):
+ * Api/WebPageCompositor.h: Added.
+ * Api/WebPageCompositorClient.h: Added.
+ * Api/WebPageCompositor_p.h:
+ (BlackBerry::WebKit::WebPageCompositorPrivate::create):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::context):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameTimestamp):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::page):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::client):
+ * Api/WebPage_p.h:
+ (BlackBerry::WebKit::WebPagePrivate::client):
+ (BlackBerry::WebKit::WebPagePrivate::isAcceleratedCompositingActive):
+ (BlackBerry::WebKit::WebPagePrivate::compositor):
+
+2012-03-22 Charles Wei <charles.wei@torchmobile.com.cn>
+
+ [BlackBerry] Need to store the meta info of a page in the ViewState of the history
+ https://bugs.webkit.org/show_bug.cgi?id=82000
+
+ Reviewed by Rob Buis.
+
+ Internally reviewed by George Staikos.
+
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem):
+ (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
+
+2012-03-22 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
+
+ [BlackBerry] add interface clearCredentials() and clearNeverRememberSites()
+ https://bugs.webkit.org/show_bug.cgi?id=81887
+
+ Reviewed by Rob Buis.
+
+ Added two interface functions clearCredentials() and
+ clearNeverRememberSites() into class WebPage, which
+ should be used by UI to clear the stored credential
+ information and never remember sites.
+ Also implemented the corresponding functions in class
+ CredentialManager to call CredentialBackingStore
+ to perform the actual clear table work.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPage::clearCredentials):
+ (WebKit):
+ (BlackBerry::WebKit::WebPage::clearNeverRememberSites):
+ * Api/WebPage.h:
+ * WebCoreSupport/CredentialManager.cpp:
+ (WebCore::CredentialManager::clearCredentials):
+ (WebCore):
+ (WebCore::CredentialManager::clearNeverRememberSites):
+ * WebCoreSupport/CredentialManager.h:
+ (CredentialManager):
+
+2012-03-22 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
+
+ [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
+ https://bugs.webkit.org/show_bug.cgi?id=80135
+
+ Reviewed by Rob Buis.
+
+ Modified the interface function authenticationChallenge() in
+ class WebPagePrivate by returning a bool to indicate if user
+ pressed Ok button or not, and moved the Credential from return
+ value to the reference parameter.
+ Also updated the corresponding interface functions in class
+ WebPageClient.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
+ * Api/WebPageClient.h:
+ * Api/WebPage_p.h:
+ (WebPagePrivate):
+
+2012-03-22 Mike Lattanzio <mlattanzio@rim.com>
+
+ [BlackBerry] DeviceDPI Scaling is broken on mobile.
+ https://bugs.webkit.org/show_bug.cgi?id=81966
+
+ Fix our viewport argument handling to only override the
+ targetDensityDpi on tablet devices. Allow WebCore to use
+ dpi scaling for smaller screen mobile devices.
+
+ Reviewed by Rob Buis.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
+
+2012-03-22 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] Add pattern matching for hexadecimal type input fields
+ https://bugs.webkit.org/show_bug.cgi?id=81944
+
+ Reviewed by Rob Buis.
+
+ PR 98504.
+
+ Add mapping of patterns matching hexadecimal input
+ to a specialized type and provide input styling based
+ on that format.
+
+ Reviewed Internally by Gen Mak.
+
+ * WebKitSupport/DOMSupport.cpp:
+ (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesHexadecimal):
+ (DOMSupport):
+ * WebKitSupport/DOMSupport.h:
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::convertInputType):
+ (BlackBerry::WebKit::inputStyle):
+
+2012-03-22 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] DOMSupport isPositionInNode should have early returns for null nodes
+ https://bugs.webkit.org/show_bug.cgi?id=81929
+
+ Reviewed by Rob Buis.
+
+ Make suggested style clean up and move int offset = 0 directly
+ above is actual usage.
+
+ * WebKitSupport/DOMSupport.cpp:
+ (BlackBerry::WebKit::DOMSupport::isPositionInNode):
+
+2012-03-22 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] DOMSupport isPositionInNode should have early returns for null nodes
+ https://bugs.webkit.org/show_bug.cgi?id=81929
+
+ Reviewed by Rob Buis.
+
+ Add early returns in isPositionInNode when either
+ node or the position node is null.
+
+ * WebKitSupport/DOMSupport.cpp:
+ (BlackBerry::WebKit::DOMSupport::isPositionInNode):
+
+2012-03-21 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
+
+ [BlackBerry] Credential save and autofill implemetation
+ https://bugs.webkit.org/show_bug.cgi?id=80401
+
+ Reviewed by Rob Buis.
+
+ This patch is intended to implement the credential persist
+ and autofill feature for BlackBerry porting.
+
+ Moved interface authenticationChallenge() from class
+ FrameLoaderClientBlackBerry to WebPagePrivate (derived from
+ PageClientBlackBerry as changes made in its parent interface class);
+ Implemented notifyShouldSaveCredential() in WebPagePrivate
+ and WebPageClient as well.
+ Added credentialManager() to retrive CredentialManager instance
+ as a global singleton; removed its m_frameLoaderClient which is
+ replaced with a passed in PageClientBlackBerry pointer, and modified
+ the interface function accordingly.
+
+ For the http authentication, autofill the input dialog in
+ function authenticationChallenge() and save the credential
+ information in the same function;
+ For the in-form authentication, autofill the username and
+ password input fields in function dispatchDidFinishLoad(),
+ and save the credential information in function
+ dispatchWillSubmitForm() or dispatchWillSendSubmitEvent().
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
+ (WebKit):
+ (BlackBerry::WebKit::WebPagePrivate::notifyShouldSaveCredential):
+ * Api/WebPageClient.h:
+ * Api/WebPage_p.h:
+ (WebPagePrivate):
+ * WebCoreSupport/CredentialManager.cpp:
+ (WebCore::credentialManager):
+ (WebCore::CredentialManager::saveCredentialIfConfirmed):
+ * WebCoreSupport/CredentialManager.h:
+ (CredentialManager):
+ (WebCore::CredentialManager::CredentialManager):
+ (WebCore):
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
+ (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
+ (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
+ (WebCore):
+ * WebCoreSupport/FrameLoaderClientBlackBerry.h:
+ (FrameLoaderClientBlackBerry):
+
+2012-03-20 Jacky Jiang <zhajiang@rim.com>
+
+ [BlackBerry] Dijit crash WebCore::CookieManager::getRawCookies
+ https://bugs.webkit.org/show_bug.cgi?id=81686
+
+ Reviewed by Rob Buis.
+
+ When deciding the policy for navigation action, if the url of the
+ request is null, ignore it to avoid the ASSERT failure in
+ MainResourceLoader::willSendRequest.
+
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
+
+2012-03-20 Konrad Piascik <kpiascik@rim.com>
+
+ [BlackBerry] BlackBerry can clear cookies and cache from the Web Inspector
+ https://bugs.webkit.org/show_bug.cgi?id=81670
+
+ Reviewed by Rob Buis.
+
+ * WebCoreSupport/InspectorClientBlackBerry.h:
+ (WebCore::InspectorClientBlackBerry::canClearBrowserCache):
+ (WebCore::InspectorClientBlackBerry::canClearBrowserCookies):
+
+2012-03-20 Nima Ghanavatian <nghanavatian@rim.com>
+
+ [BlackBerry] Removing doubly defined methods in BackingStore.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=81664
+
+ Reviewed by Rob Buis.
+
+ * Api/BackingStore.cpp:
+ (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
+
+2012-03-20 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] Crash when dragging the FCC caret over an invalid node.
+ https://bugs.webkit.org/show_bug.cgi?id=81654
+
+ Reviewed by Rob Buis.
+
+ PR 144505.
+
+ The position did not have a valid container node and was causing
+ a crash. Validate the node pointer before using it.
+
+ * WebKitSupport/DOMSupport.cpp:
+ (BlackBerry::WebKit::DOMSupport::DOMContainerNodeForPosition):
+
+2012-03-20 Jason Liu <jason.liu@torchmobile.com.cn>
+
+ [BlackBerry]Cookies shouldn't be set into each of webcore's request and platform's request. And this makes a regression.
+ https://bugs.webkit.org/show_bug.cgi?id=80800
+
+ Reviewed by George Staikos.
+
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
+ (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
+ (WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad):
+
+2012-03-19 Adam Barth <abarth@webkit.org>
+
+ Remove support for "magic" iframe
+ https://bugs.webkit.org/show_bug.cgi?id=81590
+
+ Reviewed by Eric Seidel.
+
+ Remove FrameLoaderClient methods that no longer exist.
+
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore):
+ * WebCoreSupport/FrameLoaderClientBlackBerry.h:
+ (FrameLoaderClientBlackBerry):
+ (WebCore::FrameLoaderClientBlackBerry::didDetectXSS):
+
+2012-03-19 Tyler Abbott <tabbott@rim.com>
+
+ [BlackBerry] speed up text selection for large selections
+ https://bugs.webkit.org/show_bug.cgi?id=81536
+
+ When selecting large disjoint areas of text the cost
+ of calculating the IntRectRegion union becomes very
+ expensive. Simply placing all of the text quads into
+ the IntRectRegion is faster despite the larger memory
+ footprint and the additional calculations at render
+ time.
+
+ Reviewed by Rob Buis.
+
+ * WebKitSupport/SelectionHandler.cpp:
+ (BlackBerry::WebKit::SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection):
+
+2012-03-19 Mike Lattanzio <mlattanzio@rim.com>
+
+ [BlackBerry] Use BlackBerry::Platform::DeviceInfo to generate UserAgent
+ https://bugs.webkit.org/show_bug.cgi?id=81269
+
+ Generate the UserAgent lazily, using it as the default for the
+ WebSettings object. BlackBerry::Platform::DeviceInfo is used
+ to ensure the information is accurate to the specific device.
+
+ Remove the !isEmpty() assert when fetching the UA from the
+ WebSettings object, as it will now always be properly initialized.
+
+ Add a static initializer block to ensure defaultUserAgent() is
+ thread-safe from that moment onward.
+
+ Reviewed by Rob Buis.
+
+ * Api/WebPage.cpp:
+ (WebKit):
+ (BlackBerry::WebKit::WebPagePrivate::init):
+ (BlackBerry::WebKit::WebPagePrivate::defaultUserAgent):
+ * Api/WebPage_p.h:
+ (WebPagePrivate):
+ * Api/WebSettings.cpp:
+ (BlackBerry::WebKit::WebSettings::setUserAgentString):
+ * Api/WebSettings.h:
+
+2012-03-19 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] Input fields with id of e-mail and url should be styled as such.
+ https://bugs.webkit.org/show_bug.cgi?id=81364
+
+ Reviewed by Rob Buis.
+
+ Be less aggressive on matching url, and update as suggested by Rob.
+
+ * WebKitSupport/DOMSupport.cpp:
+ (BlackBerry::WebKit::DOMSupport::matchesReservedStringUrl):
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::inputStyle):
+
+2012-03-19 Arvid Nilsson <anilsson@rim.com>
+
+ [BlackBerry] Remove obsolete optimization in WebPageCompositorPrivate
+ https://bugs.webkit.org/show_bug.cgi?id=81115
+
+ Reviewed by Benjamin Poulain.
+
+ The compositor tried to avoid rendering the same stuff twice, using a
+ mechanism that didn't work properly and has been redundant since we
+ introduced deferred blits. Remove this code.
+
+ Reviewed internally by Robin Cao.
+
+ * Api/WebPageCompositor.cpp:
+ (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::commit):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
+ * Api/WebPageCompositor_p.h:
+
+2012-03-17 Charles Wei <charles.wei@torchmobile.com.cn>
+
+ [BlackBerry] Enable Web Timing for performance profiling and improvement.
+ https://bugs.webkit.org/show_bug.cgi?id=81085
+
+ Reviewed by Rob Buis.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::init):
+
+2012-03-16 Arvid Nilsson <anilsson@rim.com>
+
+ [BlackBerry] Rename the existing WebPageCompositor class to WebPageCompositorPrivate
+ https://bugs.webkit.org/show_bug.cgi?id=81108
+ RIM PR: 136687
+
+ Reviewed by Rob Buis.
+
+ This is done in anticipation of a new WebPageCompositor class in the
+ public API. The existing internal class will serve to d-pointerize the
+ new public API. In addition, it is and will be possible to create only
+ the private class, for cases where existing code paths require
+ OpenGL compositing (i.e. due to accelerated compositing layers being
+ added to the page).
+
+ Reviewed internally by Robin Cao.
+
+ * Api/BackingStore.h:
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::setIsAcceleratedCompositingActive):
+ * Api/WebPageCompositor.cpp: Renamed from Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.cpp.
+ (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::hardwareCompositing):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::setBackingStoreUsesOpenGL):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::commit):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::releaseLayerResources):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::animationTimerFired):
+ * Api/WebPageCompositor_p.h: Renamed from Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.h.
+ (BlackBerry::WebKit::WebPageCompositorPrivate::layoutRectForCompositing):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::setLayoutRectForCompositing):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::contentsSizeForCompositing):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::setContentsSizeForCompositing):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::lastCompositingResults):
+ (BlackBerry::WebKit::WebPageCompositorPrivate::setLastCompositingResults):
+ * Api/WebPage_p.h:
+ * CMakeListsBlackBerry.txt:
+
+2012-03-16 Nima Ghanavatian <nghanavatian@rim.com>
+
+ [BlackBerry] Syncing up left over bits in WebKitSupport from our local branch to upstream
+ https://bugs.webkit.org/show_bug.cgi?id=81118
+
+ Reviewed by Rob Buis.
+
+ This is a consolidation of various changes that are in our local dev branch
+ but do not appear in our upstreamed port.
+
+ * WebKitSupport/DumpRenderTreeSupport.cpp:
+ (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
+ * WebKitSupport/FatFingers.cpp:
+ (BlackBerry::WebKit::FatFingers::isElementClickable):
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::spannableTextInRange):
+ * WebKitSupport/SurfacePool.cpp:
+ (BlackBerry::WebKit::SurfacePool::createBuffers):
+ (BlackBerry::WebKit::SurfacePool::releaseBuffers):
+ * WebKitSupport/TouchEventHandler.cpp:
+ (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
+ (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed):
+ * WebKitSupport/WebPageCompositor.cpp:
+ (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
+ * WebKitSupport/WebPageCompositor.h:
+ (WebPageCompositor):
+
+2012-03-16 Nima Ghanavatian <nghanavatian@rim.com>
+
+ [BlackBerry] Syncing up left over bits in WebCoreSupport from our local branch to upstream
+ https://bugs.webkit.org/show_bug.cgi?id=81120
+
+ Reviewed by Rob Buis.
+
+ This is a consolidation of various changes that are in our local dev branch
+ but do not appear in our upstreamed port.
+
+ * WebCoreSupport/AboutDataEnableFeatures.in:
+ * WebCoreSupport/AboutDataHaveFeatures.in:
+ * WebCoreSupport/AboutDataUseFeatures.in:
+ * WebCoreSupport/ChromeClientBlackBerry.cpp:
+ (WebCore::ChromeClientBlackBerry::hasOpenedPopup):
+ (WebCore):
+ (WebCore::ChromeClientBlackBerry::screenToRootView):
+ (WebCore::ChromeClientBlackBerry::rootViewToScreen):
+ (WebCore::ChromeClientBlackBerry::invalidateRootView):
+ (WebCore::ChromeClientBlackBerry::invalidateContentsAndRootView):
+ (WebCore::ChromeClientBlackBerry::invalidateContentsForSlowScroll):
+ (WebCore::ChromeClientBlackBerry::scrollableAreasDidChange):
+ (WebCore::ChromeClientBlackBerry::createColorChooser):
+ * WebCoreSupport/ChromeClientBlackBerry.h:
+ (ChromeClientBlackBerry):
+ (WebCore::ChromeClientBlackBerry::numTouchEventHandlersChanged):
+ * WebCoreSupport/EditorClientBlackBerry.cpp:
+ (WebCore::EditorClientBlackBerry::registerUndoStep):
+ (WebCore::EditorClientBlackBerry::registerRedoStep):
+ (WebCore::EditorClientBlackBerry::undo):
+ (WebCore::EditorClientBlackBerry::redo):
+ * WebCoreSupport/EditorClientBlackBerry.h:
+ (EditorClientBlackBerry):
+ * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
+ (GeolocationControllerClientBlackBerry::requestPermission):
+ (GeolocationControllerClientBlackBerry::cancelPermissionRequest):
+ * WebCoreSupport/GeolocationControllerClientBlackBerry.h:
+ * WebCoreSupport/InspectorClientBlackBerry.cpp:
+ (WebCore::InspectorClientBlackBerry::closeInspectorFrontend):
+ (WebCore):
+ (WebCore::InspectorClientBlackBerry::bringFrontendToFront):
+ * WebCoreSupport/InspectorClientBlackBerry.h:
+ (InspectorClientBlackBerry):
+ * WebCoreSupport/NotificationPresenterImpl.cpp:
+ (WebCore::NotificationPresenterImpl::show):
+
+2012-03-16 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] Input fields with id of e-mail and url should be styled as such.
+ https://bugs.webkit.org/show_bug.cgi?id=81364
+
+ Reviewed by Rob Buis.
+
+ Treat fields that have name/id's that match url or
+ email as url or email fields providing the appropriate
+ keyboard.
+
+ PR 137259.
+
+ Reviewed Internally by Gen Mak and Nima Ghanavatian.
+
+ * WebKitSupport/DOMSupport.cpp:
+ (BlackBerry::WebKit::DOMSupport::matchesReservedStringEmail):
+ (DOMSupport):
+ (BlackBerry::WebKit::DOMSupport::matchesReservedStringUrl):
+ (BlackBerry::WebKit::DOMSupport::elementIdOrNameIndicatesEmail):
+ (BlackBerry::WebKit::DOMSupport::elementIdOrNameIndicatesUrl):
+ (BlackBerry::WebKit::DOMSupport::matchesReservedStringPreventingAutocomplete):
+ * WebKitSupport/DOMSupport.h:
+ (WebCore):
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::convertInputType):
+ (BlackBerry::WebKit::inputStyle):
+
+2012-03-16 Nima Ghanavatian <nghanavatian@rim.com>
+
+ [BlackBerry] Syncing up left over bits in Api from our local branch to upstream
+ https://bugs.webkit.org/show_bug.cgi?id=81105
+
+ Reviewed by Rob Buis.
+
+ This patches fixes up a previous sync done in this directory and adds some new bits
+ as well. This is accurate as of ddea1528b37b29925638fe1183318b3c3994f1f8 in our
+ local repo.
+
+ * Api/BackingStore.cpp:
+ (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
+ (WebKit):
+ (BlackBerry::WebKit::BackingStorePrivate::drawLayersOnCommitIfNeeded):
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::webContext):
+ (BlackBerry::WebKit::WebPage::webContext):
+ (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
+ * Api/WebPage.h:
+ * Api/WebPage_p.h:
+ (WebPagePrivate):
+
+2012-03-16 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] Input processing mode should be cancelled when processing hot keys
+ https://bugs.webkit.org/show_bug.cgi?id=81348
+
+ Reviewed by Rob Buis.
+
+ Don't suppress IMF notifications if we are handling
+ the event as a hotkey.
+
+ Reviewed Internally by Nima Ghanavatian.
+
+ * WebCoreSupport/EditorClientBlackBerry.cpp:
+ (WebCore::EditorClientBlackBerry::handleKeyboardEvent):
+
+2012-03-16 Robin Cao <robin.cao@torchmobile.com.cn>
+
+ [BlackBerry] Can not open certain links from bridge applications
+ https://bugs.webkit.org/show_bug.cgi?id=81197
+
+ Reviewed by Rob Buis.
+
+ Currently, the engine asks the client to handle some type of requests externally.
+ But WebPageClient::handleStringPattern is not yet implemented and exposed to
+ the client. Before that, we still need to give the client a chance to decide
+ how to handle requests such as 'mailto:'.
+
+ To address this problem, r108763 introduced a change that ask the client to
+ decide how to handle the navigation in dispatchDecidePolicyForNewWindowAction().
+ This is not intuitive and will bring troubles, because this navigation will
+ happen in the new page. So the new page client is to decide how to handle
+ the navigation, not the old one.
+
+ This patch reverts r108763 and skips calling WebPageClient::handleStringPattern
+ since it's not implemented.
+
+ This way the new window action will continue, and the logic in
+ dispatchDecidePolicyForNavigationAction() will handle the navigation correctly.
+
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction):
+ (WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad):
+
+2012-03-16 Leo Yang <leo.yang@torchmobile.com.cn>
+
+ [BlackBerry] Crash when going back from an xhtml document containing <img>
+ https://bugs.webkit.org/show_bug.cgi?id=81297
+
+ Reviewed by Rob Buis.
+
+ This is manually reverting the offending internal commit which checked-in before upstreaming.
+
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::canCachePage):
+
+2012-03-16 Genevieve Mak <gmak@rim.com>
+
+ [BlackBerry] viewportRect has changed to viewportSize
+ https://bugs.webkit.org/show_bug.cgi?id=81262
+
+ Reviewed by Antonio Gomes.
+
+ Set size instead of rect in constructor.
+ * WebKitSupport/InRegionScrollableArea.cpp:
+ (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
+
+2012-03-16 Andrew Lo <anlo@rim.com>
+
+ [BlackBerry] Enable PAGE_VISIBILITY_API
+ https://bugs.webkit.org/show_bug.cgi?id=81257
+
+ Set Page visibility state for BlackBerry port.
+
+ Reviewed by Rob Buis.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
+ (WebKit):
+ (BlackBerry::WebKit::WebPagePrivate::setPageVisibilityState):
+ (BlackBerry::WebKit::WebPagePrivate::setVisible):
+ (BlackBerry::WebKit::WebPage::setVisible):
+ (BlackBerry::WebKit::WebPagePrivate::notifyAppActivationStateChange):
+ (BlackBerry::WebKit::WebPage::notifyAppActivationStateChange):
+ * Api/WebPage_p.h:
+ (WebPagePrivate):
+
+2012-03-14 Arvid Nilsson <anilsson@rim.com>
+
+ [BlackBerry] Make sure WebPage and BackingStore don't crash without a Window
+ https://bugs.webkit.org/show_bug.cgi?id=81099
+
+ Reviewed by Rob Buis.
+
+ Also rename the "compositing/blitting to main window" variables to
+ instead refer to OpenGL compositing. The code paths it triggers are
+ related to the BackingStore using OpenGL compositing, and can be useful
+ even when there's no window.
+
+ * Api/BackingStore.cpp:
+ (BlackBerry::WebKit::BackingStorePrivate::isOpenGLCompositing):
+ (BlackBerry::WebKit::BackingStorePrivate::render):
+ (BlackBerry::WebKit::BackingStorePrivate::copyPreviousContentsToBackSurfaceOfWindow):
+ (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
+ (BlackBerry::WebKit::BackingStorePrivate::blitContents):
+ (BlackBerry::WebKit::BackingStorePrivate::blitTileRect):
+ (BlackBerry::WebKit::BackingStorePrivate::blendCompositingSurface):
+ (BlackBerry::WebKit::BackingStorePrivate::renderContents):
+ (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
+ (BlackBerry::WebKit::BackingStorePrivate::checkerWindow):
+ (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
+ (BlackBerry::WebKit::BackingStorePrivate::clearWindow):
+ (BlackBerry::WebKit::BackingStorePrivate::drawSubLayers):
+ (BlackBerry::WebKit::BackingStorePrivate::surfaceSize):
+ (BlackBerry::WebKit::BackingStorePrivate::buffer):
+ * Api/BackingStore_p.h:
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::didPluginEnterFullScreen):
+ (BlackBerry::WebKit::WebPagePrivate::didPluginExitFullScreen):
+ (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
+ (BlackBerry::WebKit::WebPagePrivate::drawSubLayers):
+ (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
+ * WebCoreSupport/ChromeClientBlackBerry.cpp:
+ (WebCore::ChromeClientBlackBerry::windowRect):
+ (WebCore::ChromeClientBlackBerry::screenToWindow):
+ (WebCore::ChromeClientBlackBerry::windowToScreen):
+ * WebKitSupport/GLES2Context.cpp:
+ (BlackBerry::WebKit::GLES2Context::GLES2Context):
+ * WebKitSupport/TouchEventHandler.h:
+ * WebKitSupport/WebPageCompositor.cpp:
+ (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
+ (BlackBerry::WebKit::WebPageCompositor::setBackingStoreUsesOpenGL):
+ (BlackBerry::WebKit::WebPageCompositor::drawLayers):
+ * WebKitSupport/WebPageCompositor.h:
+
+2012-03-13 Jon Lee <jonlee@apple.com>
+
+ Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
+ https://bugs.webkit.org/show_bug.cgi?id=80922
+ <rdar://problem/11035082>
+
+ Reviewed by Jian Li.
+
+ You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
+ LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
+ new API. Therefore, APIs that are common between the two will have:
+ #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+
+ This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
+ the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
+
+ Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::init):
+ * WebCoreSupport/NotificationPresenterImpl.cpp:
+ * WebCoreSupport/NotificationPresenterImpl.h:
+
+2012-03-14 Nima Ghanavatian <nghanavatian@rim.com>
+
+ [BlackBerry] Syncing up left over bits in Api from our local branch to upstream
+ https://bugs.webkit.org/show_bug.cgi?id=81105
+
+ Reviewed by Rob Buis.
+
+ * Api/BackingStore.cpp:
+ (BlackBerry::WebKit::BackingStorePrivate::renderContents):
+ (BlackBerry::WebKit::BackingStorePrivate::isActive):
+ (BlackBerry::WebKit::BackingStore::createBackingStoreMemory):
+ (WebKit):
+ (BlackBerry::WebKit::BackingStore::releaseBackingStoreMemory):
+ * Api/BackingStore.h:
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::toWebCoreMouseEventType):
+ (BlackBerry::WebKit::WebPagePrivate::init):
+ (BlackBerry::WebKit::WebPagePrivate::setLoadState):
+ (BlackBerry::WebKit::WebPagePrivate::activeNodeContext):
+ (BlackBerry::WebKit::WebPage::activeNodeContext):
+ (BlackBerry::WebKit::WebPagePrivate::updateCursor):
+ (BlackBerry::WebKit::WebPagePrivate::contextNode):
+ (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
+ * Api/WebPage.h:
+ * Api/WebPage_p.h:
+ (WebPagePrivate):
+
+2012-03-14 Andrew Lo <anlo@rim.com>
+
+ [BlackBerry] Implement REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR using AnimationFrameRateController
+ https://bugs.webkit.org/show_bug.cgi?id=81000
+
+ Set the platform display ID, needed for DisplayRefreshMonitor.
+
+ Reviewed by Antonio Gomes.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::init):
+
+2012-03-14 Leo Yang <leo.yang@torchmobile.com.cn>
+
+ [BlackBerry] Upstream the BlackBerry change to platform/Cursor.h
+ https://bugs.webkit.org/show_bug.cgi?id=81086
+
+ Reviewed by Rob Buis.
+
+ There was an alias named PlatformCursorHandle for PlatformCursor
+ in the internal version of Cursor.h. But it's not necessary so it's
+ not included in the upstreaming version of Cursor.h. As a result,
+ use PlatformCursor directly.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::setCursor):
+ * Api/WebPage_p.h:
+ (WebPagePrivate):
+
+2012-03-13 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] Input focus state should unfocus the frame selection instead of the field.
+ https://bugs.webkit.org/show_bug.cgi?id=81023
+
+ Reviewed by Antonio Gomes.
+
+ PR 137400.
+
+ Prevent cursor drawing by unfocusing the frame selection
+ when input mode is not ready.
+
+ Greatly simplify the decision to focus input fields by removing
+ all ties to the page load state and base it on input. Input mode
+ is disabled when a page load begins and enabled on any user input.
+
+ The field is focused and ready for input immediately, only the
+ frame selection (or cursor) is unfocused.
+
+ Reviewed Internally by Gen Mak, Antonio Gomes and Nima Ghanavatian.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::setLoadState):
+ (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
+ * Api/WebPageClient.h:
+ * WebCoreSupport/EditorClientBlackBerry.cpp:
+ (WebCore::EditorClientBlackBerry::shouldBeginEditing):
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::InputHandler):
+ (BlackBerry::WebKit::InputHandler::setElementUnfocused):
+ (BlackBerry::WebKit::InputHandler::enableInputMode):
+ (BlackBerry::WebKit::InputHandler::setElementFocused):
+ (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
+ (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
+ (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
+ (BlackBerry::WebKit::InputHandler::setComposingText):
+ * WebKitSupport/InputHandler.h:
+ (InputHandler):
+ * WebKitSupport/TouchEventHandler.cpp:
+ (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
+
+2012-03-13 Adam Barth <abarth@webkit.org> && Benjamin Poulain <bpoulain@apple.com>
+
+ Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
+ https://bugs.webkit.org/show_bug.cgi?id=78853
+
+ Reviewed by Adam Barth.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::init):
+ * WebCoreSupport/AboutDataEnableFeatures.in:
+ * WebCoreSupport/ChromeClientBlackBerry.cpp:
+ * WebCoreSupport/ChromeClientBlackBerry.h:
+ (ChromeClientBlackBerry):
+ * WebKitSupport/DumpRenderTreeSupport.cpp:
+ (toGeolocationClientMock):
+ (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
+ (DumpRenderTreeSupport::resetGeolocationMock):
+ (DumpRenderTreeSupport::setMockGeolocationError):
+ (DumpRenderTreeSupport::setMockGeolocationPermission):
+ (DumpRenderTreeSupport::setMockGeolocationPosition):
+
+2012-03-13 Mike Lattanzio <mlattanzio@rim.com>
+
+ Remove ActiveNodeContext in favour of BlackBerry::Platform::WebContext
+ https://bugs.webkit.org/show_bug.cgi?id=80984
+
+ Remove ActiveNodeContext, and switch the implementation to
+ provide a BlackBerry::Platform::WebContext. The new object
+ adds an explicit IsImage flag, as well as IsAudio and IsVideo
+ for the HTML5 elements.
+
+ Note that for many videos both IsVideo and IsAudio will be true,
+ as videos typically have audio streams as well.
+
+ Reviewed by George Staikos.
+
+ * Api/ActiveNodeContext.h: Removed.
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::webContext):
+ (BlackBerry::WebKit::WebPage::webContext):
+ * Api/WebPage.h:
+ * Api/WebPage_p.h:
+
+2012-03-12 Andy Chen <andchen@rim.com>
+
+ [Blackberry] Make the process of marking all matches interruptible and asynchronous for find-in-page
+ https://bugs.webkit.org/show_bug.cgi?id=80831
+
+ Reviewed by Antonio Gomes.
+
+ * WebKitSupport/InPageSearchManager.cpp:
+ (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::DeferredScopeStringMatches):
+ (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::doTimeout):
+ (BlackBerry::WebKit::InPageSearchManager::InPageSearchManager):
+ (BlackBerry::WebKit::InPageSearchManager::~InPageSearchManager):
+ (BlackBerry::WebKit::InPageSearchManager::findNextString):
+ (BlackBerry::WebKit::InPageSearchManager::shouldSearchForText):
+ (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
+ (BlackBerry::WebKit::InPageSearchManager::clearTextMatches):
+ (BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
+ (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
+ (BlackBerry::WebKit::InPageSearchManager::scopeStringMatchesSoon):
+ (BlackBerry::WebKit::InPageSearchManager::callScopeStringMatches):
+ (BlackBerry::WebKit::InPageSearchManager::cancelPendingScopingEffort):
+ * WebKitSupport/InPageSearchManager.h:
+
2012-03-09 Jon Lee <jonlee@apple.com>
Rename NotificationPresenter to NotificationClient
diff --git a/Source/WebKit/blackberry/WebCoreSupport/AboutData.cpp b/Source/WebKit/blackberry/WebCoreSupport/AboutData.cpp
index 88b6037b0..6c79d54f9 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/AboutData.cpp
+++ b/Source/WebKit/blackberry/WebCoreSupport/AboutData.cpp
@@ -89,7 +89,6 @@ String configPage()
+ "0"
#endif
+ "</td></tr>"
- + "<tr><td>USE_SYSTEM_MALLOC</td><td>" + String::number(USE_SYSTEM_MALLOC) + "</td></tr>"
+ "<tr><td>__STDC_ISO_10646__</td><td>"
#ifdef __STDC_ISO_10646__
+ "1"
@@ -105,20 +104,28 @@ String configPage()
page += numberToHTMLTr("maxPixelsPerDecodedImage", settings->maxPixelsPerDecodedImage());
page += numberToHTMLTr("shouldReportLowMemoryToUser", settings->shouldReportLowMemoryToUser());
page += numberToHTMLTr("numberOfBackingStoreTiles", settings->numberOfBackingStoreTiles());
+ page += numberToHTMLTr("maximumNumberOfBackingStoreTilesAcrossProcesses", settings->maximumNumberOfBackingStoreTilesAcrossProcesses());
page += numberToHTMLTr("tabsSupportedByClient", settings->tabsSupportedByClient());
page += numberToHTMLTr("contextMenuEnabled", settings->contextMenuEnabled());
page += numberToHTMLTr("selectionEnabled", settings->selectionEnabled());
page += numberToHTMLTr("alwaysShowKeyboardOnFocus", settings->alwaysShowKeyboardOnFocus());
+ page += numberToHTMLTr("allowCenterScrollAdjustmentForInputFields", settings->allowCenterScrollAdjustmentForInputFields());
page += numberToHTMLTr("unrestrictedResizeEvents", settings->unrestrictedResizeEvents());
page += numberToHTMLTr("isBridgeBrowser", settings->isBridgeBrowser());
+ page += numberToHTMLTr("isWebGLSupported", settings->isWebGLSupported());
+ page += numberToHTMLTr("showImageLocationOptionsInGCM", settings->showImageLocationOptionsInGCM());
page += numberToHTMLTr("maxClickableSpeed", settings->maxClickableSpeed());
page += numberToHTMLTr("maxJitterRadiusClick", settings->maxJitterRadiusClick());
page += numberToHTMLTr("maxJitterRadiusTap", settings->maxJitterRadiusTap());
+ page += numberToHTMLTr("maxJitterRadiusSingleTouchMove", settings->maxJitterRadiusSingleTouchMove());
page += numberToHTMLTr("maxJitterRadiusTouchHold", settings->maxJitterRadiusTouchHold());
+ page += numberToHTMLTr("maxJitterRadiusHandleDrag", settings->maxJitterRadiusHandleDrag());
page += numberToHTMLTr("maxJitterRadiusTapHighlight", settings->maxJitterRadiusTapHighlight());
page += numberToHTMLTr("maxJitterDistanceClick", settings->maxJitterDistanceClick());
page += numberToHTMLTr("maxJitterDistanceTap", settings->maxJitterDistanceTap());
+ page += numberToHTMLTr("maxJitterDistanceSingleTouchMove", settings->maxJitterDistanceSingleTouchMove());
page += numberToHTMLTr("maxJitterDistanceTouchHold", settings->maxJitterDistanceTouchHold());
+ page += numberToHTMLTr("maxJitterDistanceHandleDrag", settings->maxJitterDistanceHandleDrag());
page += numberToHTMLTr("maxJitterDistanceTapHighlight", settings->maxJitterDistanceTapHighlight());
page += numberToHTMLTr("topFatFingerPadding", settings->topFatFingerPadding());
page += numberToHTMLTr("rightFatFingerPadding", settings->rightFatFingerPadding());
diff --git a/Source/WebKit/blackberry/WebCoreSupport/AboutDataEnableFeatures.in b/Source/WebKit/blackberry/WebCoreSupport/AboutDataEnableFeatures.in
index 44565db22..32e973868 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/AboutDataEnableFeatures.in
+++ b/Source/WebKit/blackberry/WebCoreSupport/AboutDataEnableFeatures.in
@@ -1,28 +1,28 @@
+3D_CANVAS
3D_PLUGIN
3D_RENDERING
ACCELERATED_2D_CANVAS
+ANIMATION_API
ASSEMBLER
ASSEMBLER_WX_EXCLUSIVE
+BATTERY_STATUS
BLACKBERRY_CREDENTIAL_PERSIST
+BLACKBERRY_DEBUG_MEMORY
BLOB
BRANCH_COMPACTION
CHANNEL_MESSAGING
-CLIENT_BASED_GEOLOCATION
+CLASSIC_INTERPRETER
CODEBLOCK_SAMPLING
COMPARE_AND_SWAP
-COMPUTED_GOTO_INTERPRETER
-CONSISTENCY_CHECK
+COMPUTED_GOTO_CLASSIC_INTERPRETER
CONTEXT_MENUS
CSS_FILTERS
CSS_GRID_LAYOUT
-CSS_LAYOUT_GRID
CSS_SHADERS
DASHBOARD_SUPPORT
DATALIST
DATA_TRANSFER_ITEMS
DEBUG_MATH_LAYOUT
-DEBUG_PROPAGATION_VERBOSE
-DEBUG_VERBOSE
DEBUG_WITH_BREAKPOINT
DETAILS
DEVICE_ORIENTATION
@@ -31,12 +31,16 @@ DIRECTORY_UPLOAD
DOUBLE_TAP_CENTERS
DOWNLOAD_ATTRIBUTE
DRAG_SUPPORT
+DRT
+EVENT_MODE_METATAGS
EXECUTABLE_ALLOCATOR_DEMAND
EXECUTABLE_ALLOCATOR_FIXED
+EXPERIMENTAL_FEATURE
FAST_MALLOC_MATCH_VALIDATION
FAST_MOBILE_SCROLLING
FILE_SYSTEM
FILTERS
+FIXED_REPORTED_SIZE
FTPDIR
FULLSCREEN_API
GAMEPAD
@@ -44,14 +48,15 @@ GC_LOGGING
GC_VALIDATION
GEOLOCATION
GESTURE_EVENTS
+GESTURE_RECOGNIZER
GGC
-GLIB_SUPPORT
GLOBAL_FASTMALLOC_NEW
+HIGH_DPI_CANVAS
ICONDATABASE
IMAGE_DECODER_DOWN_SAMPLING
INDEXED_DATABASE
-INPUT_COLOR
INPUT_SPEECH
+INPUT_TYPE_COLOR
INPUT_TYPE_DATE
INPUT_TYPE_DATETIME
INPUT_TYPE_DATETIMELOCAL
@@ -59,21 +64,18 @@ INPUT_TYPE_MONTH
INPUT_TYPE_TIME
INPUT_TYPE_WEEK
INSPECTOR
-INTERPRETER
-JAVA_BRIDGE
JAVASCRIPT_DEBUGGER
JAVASCRIPT_I18N_API
+JAVA_BRIDGE
JIT
-JIT_ASSERT
-JIT_BREAK_ON_EVERY_BLOCK
-JIT_BREAK_ON_EVERY_FUNCTION
-JIT_BREAK_ON_EVERY_NODE
-JIT_BREAK_ON_SPECULATION_FAILURE
+JIT_OPTIMIZE_PROPERTY_ACCESS
JIT_USE_SOFT_MODULO
JIT_VERBOSE
JIT_VERBOSE_OSR
LARGE_HEAP
+LEGACY_NOTIFICATIONS
LINK_PREFETCH
+LLINT
MAC_JAVA_BRIDGE
MATHML
MEDIA_SOURCE
@@ -88,61 +90,69 @@ MUTATION_OBSERVERS
NETSCAPE_PLUGIN_API
NETSCAPE_PLUGIN_METADATA_CACHE
NEW_XML
-NO_LISTBOX_RENDERING
NOTIFICATIONS
+NO_LISTBOX_RENDERING
OPCODE_SAMPLING
OPCODE_STATS
+OPENTYPE_SANITIZER
ORIENTATION_EVENTS
-OSR_ENTRY
-PAGE_CACHE
PAGE_VISIBILITY_API
PAN_SCROLLING
PARALLEL_GC
PARALLEL_JOBS
+PASSWORD_ECHO
PLUGIN_PACKAGE_SIMPLE_HASH
PLUGIN_PROCESS
PLUGIN_PROXY_FOR_VIDEO
POINTER_LOCK
PROGRESS_TAG
PURGEABLE_MEMORY
+QT_IMAGE_DECODER
QUOTA
REGEXP_TRACING
REGISTER_PROTOCOL_HANDLER
REPAINT_THROTTLING
REQUEST_ANIMATION_FRAME
-RESTRICTIONS
RUBBER_BANDING
RUN_TIME_HEURISTICS
+RXI_IMAGE_FORMAT
SAMPLING_COUNTERS
SAMPLING_FLAGS
SAMPLING_REGIONS
SAMPLING_THREAD
+SHADOW_DOM
SHARED_WORKERS
SIMPLE_HEAP_PROFILING
+SINGLE_THREADED
+SKIA_GPU_CANVAS
+SKIA_TEXT
SMOOTH_SCROLLING
SPEECH_INPUT
SPELLCHECK
SQL_DATABASE
-SUCCESS_STATS
+STYLE_SCOPED
SVG
SVG_DOM_OBJC_BINDINGS
SVG_FONTS
TEXT_CARET
+TEXT_NOTIFICATIONS_ONLY
THREADING_GENERIC
THREADING_LIBDISPATCH
THREADING_OPENMP
+THREADING_SCROLLING
TOUCH_EVENTS
TOUCH_ICON_LOADING
-V_028D10_FORCE_DISABLE
VALUE_PROFILER
-VERBOSE_SPECULATION_FAILURE
VERBOSE_VALUE_PROFILE
-VERBOSE_VALUE_RECOVERIES
+VIBRATION
VIDEO
VIDEO_TRACK
+VIEWPORT_REFLOW
+WEBDOM
+WEBGL
+WEBKIT2
WEB_ARCHIVE
WEB_AUDIO
-WEBGL
WEB_PROCESS_SANDBOX
WEB_SOCKETS
WEB_TIMING
@@ -150,7 +160,7 @@ WORKERS
WRITE_BARRIER_PROFILING
WTF_MALLOC_VALIDATION
XHR_RESPONSE_BLOB
-XOR_DEBUG_AID
+XHTMLMP
XSLT
YARR_JIT
YARR_JIT_DEBUG
diff --git a/Source/WebKit/blackberry/WebCoreSupport/AboutDataHaveFeatures.in b/Source/WebKit/blackberry/WebCoreSupport/AboutDataHaveFeatures.in
index 15259d99c..344595cfc 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/AboutDataHaveFeatures.in
+++ b/Source/WebKit/blackberry/WebCoreSupport/AboutDataHaveFeatures.in
@@ -1,4 +1,5 @@
ACCESSIBILITY
+ASSEMBLER
AVCF
CG_INTERPOLATION_MEDIUM
COMPUTED_GOTO
@@ -42,4 +43,5 @@ TM_ZONE
VARIADIC_MACRO
VASPRINTF
VIRTUALALLOC
+WEBCOMPOSITOR
WKQCA
diff --git a/Source/WebKit/blackberry/WebCoreSupport/AboutDataUseFeatures.in b/Source/WebKit/blackberry/WebCoreSupport/AboutDataUseFeatures.in
index b744d904c..88fec71b7 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/AboutDataUseFeatures.in
+++ b/Source/WebKit/blackberry/WebCoreSupport/AboutDataUseFeatures.in
@@ -13,13 +13,18 @@ CFURLCACHE
CFURLSTORAGESESSIONS
CG
CG_INTERPOLATION_MEDIUM
+CHROME_NETWORK_STACK
+CONCATENATED_IMPULSE_RESPONSES
+CONSOLE_ENTRY_POINT
COREAUDIO
+COREMEDIA
CORE_TEXT
CROSS_PLATFORM_CONTEXT_MENUS
-CURL
DYNAMIC_ANNOTATIONS
DYNAMIC_ANNOTATIONS_NOIMPL
+EGL
EXPORT_MACROS
+EXTERNAL_CRASH
FREETYPE
GCC_COMPUTED_GOTO_WORKAROUND
GLIB_UNICODE
@@ -44,10 +49,9 @@ OS_RANDOMNESS
PANGO
PLATFORM_STRATEGIES
PLUGIN_HOST_PROCESS
-PREEMPT_GEOLOCATION_PERMISSION
PROTECTION_SPACE_AUTH_CALLBACK
-PTHREAD_GETSPECIFIC_DIRECT
PTHREADS
+PTHREAD_GETSPECIFIC_DIRECT
QT4_UNICODE
QTKIT
QT_MOBILITY_SYSTEMINFO
@@ -62,19 +66,23 @@ SCROLLBAR_PAINTER
SKIA
SKIA_ON_MAC_CHROMIUM
SKIA_TEXT
-SOUP
+SYSTEM_MALLOC
TEXTURE_MAPPER
TEXTURE_MAPPER_GL
TILED_BACKING_STORE
+UI_SIDE_COMPOSITING
UNIFIED_TEXT_CHECKING
UNIX_DOMAIN_SOCKETS
V8
WEBAUDIO_FFMPEG
-WEBAUDIO_FFTW
+WEBAUDIO_GSTREAMER
+WEBAUDIO_IPP
WEBAUDIO_MKL
WEBKIT_IMAGE_DECODERS
WEBP
WINCE_UNICODE
WININET
+WTFURL
WK_SCROLLBAR_PAINTER
WXGC
+ZLIB
diff --git a/Source/WebKit/blackberry/WebCoreSupport/BatteryClientBlackBerry.cpp b/Source/WebKit/blackberry/WebCoreSupport/BatteryClientBlackBerry.cpp
new file mode 100644
index 000000000..7a6679dc8
--- /dev/null
+++ b/Source/WebKit/blackberry/WebCoreSupport/BatteryClientBlackBerry.cpp
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#include "BatteryClientBlackBerry.h"
+
+#if ENABLE(BATTERY_STATUS)
+
+#include "BatteryController.h"
+#include <stdio.h>
+
+namespace WebCore {
+
+BatteryClientBlackBerry::BatteryClientBlackBerry()
+ : m_tracker(0)
+ , m_controller(0)
+{
+}
+
+void BatteryClientBlackBerry::setController(BatteryController* controller)
+{
+ m_controller = controller;
+}
+
+void BatteryClientBlackBerry::startUpdating()
+{
+ if (m_tracker)
+ m_tracker->resume();
+ else
+ m_tracker = BlackBerry::Platform::BatteryStatusTracker::create(this);
+}
+
+void BatteryClientBlackBerry::stopUpdating()
+{
+ if (m_tracker)
+ m_tracker->suspend();
+}
+
+void BatteryClientBlackBerry::batteryControllerDestroyed()
+{
+ delete this;
+}
+
+void BatteryClientBlackBerry::onLevelChange(bool charging, double chargingTime, double dischargingTime, double level)
+{
+ if (!m_controller)
+ return;
+
+ m_controller->didChangeBatteryStatus("levelchange", BatteryStatus::create(charging, chargingTime, dischargingTime, level));
+}
+
+void BatteryClientBlackBerry::onChargingChange(bool charging, double chargingTime, double dischargingTime, double level)
+{
+ if (!m_controller)
+ return;
+
+ m_controller->didChangeBatteryStatus("chargingchange", BatteryStatus::create(charging, chargingTime, dischargingTime, level));
+}
+
+void BatteryClientBlackBerry::onChargingTimeChange(bool charging, double chargingTime, double dischargingTime, double level)
+{
+ if (!m_controller)
+ return;
+
+ m_controller->didChangeBatteryStatus("chargingtimechange", BatteryStatus::create(charging, chargingTime, dischargingTime, level));
+}
+
+void BatteryClientBlackBerry::onDischargingTimeChange(bool charging, double chargingTime, double dischargingTime, double level)
+{
+ if (!m_controller)
+ return;
+
+ m_controller->didChangeBatteryStatus("dischargingtimechange", BatteryStatus::create(charging, chargingTime, dischargingTime, level));
+}
+
+}
+
+#endif // BATTERY_STATUS
diff --git a/Source/WebKit/blackberry/WebCoreSupport/BatteryClientBlackBerry.h b/Source/WebKit/blackberry/WebCoreSupport/BatteryClientBlackBerry.h
new file mode 100644
index 000000000..8d631cc78
--- /dev/null
+++ b/Source/WebKit/blackberry/WebCoreSupport/BatteryClientBlackBerry.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef BatteryClientBlackBerry_h
+#define BatteryClientBlackBerry_h
+
+#if ENABLE(BATTERY_STATUS)
+
+#include "BatteryClient.h"
+
+#include <BlackBerryPlatformBatteryStatusTracker.h>
+#include <BlackBerryPlatformBatteryStatusTrackerListener.h>
+
+namespace WebCore {
+
+class BatteryController;
+class BatteryStatus;
+
+class BatteryClientBlackBerry : public BatteryClient, public BlackBerry::Platform::BatteryStatusTrackerListener {
+public:
+ BatteryClientBlackBerry();
+ ~BatteryClientBlackBerry() { }
+
+ virtual void setController(BatteryController*);
+ virtual void startUpdating();
+ virtual void stopUpdating();
+ virtual void batteryControllerDestroyed();
+
+ void onLevelChange(bool charging, double chargingTime, double dischargingTime, double level);
+ void onChargingChange(bool charging, double chargingTime, double dischargingTime, double level);
+ void onChargingTimeChange(bool charging, double chargingTime, double dischargingTime, double level);
+ void onDischargingTimeChange(bool charging, double chargingTime, double dischargingTime, double level);
+
+private:
+ BlackBerry::Platform::BatteryStatusTracker* m_tracker;
+ BatteryController* m_controller;
+};
+
+}
+
+#endif // BATTERY_STATUS
+#endif // BatteryClientBlackBerry_h
diff --git a/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp b/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
index 3fc4afb62..23368d5bf 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
+++ b/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
@@ -24,6 +24,7 @@
#include "BackingStoreClient.h"
#include "BackingStore_p.h"
#include "CString.h"
+#include "ColorChooser.h"
#include "DatabaseTracker.h"
#include "Document.h"
#include "DumpRenderTreeClient.h"
@@ -69,6 +70,8 @@
using namespace BlackBerry::WebKit;
+using BlackBerry::Platform::Graphics::Window;
+
namespace WebCore {
static CString frameOrigin(Frame* frame)
@@ -151,7 +154,11 @@ void ChromeClientBlackBerry::setWindowRect(const FloatRect&)
FloatRect ChromeClientBlackBerry::windowRect()
{
- const IntSize windowSize = m_webPagePrivate->m_client->window()->windowSize();
+ IntSize windowSize;
+
+ if (Window* window = m_webPagePrivate->m_client->window())
+ windowSize = window->windowSize();
+
return FloatRect(0, 0, windowSize.width(), windowSize.height());
}
@@ -273,6 +280,12 @@ bool ChromeClientBlackBerry::selectItemAlignmentFollowsMenuWritingDirection()
return true;
}
+bool ChromeClientBlackBerry::hasOpenedPopup() const
+{
+ notImplemented();
+ return false;
+}
+
PassRefPtr<PopupMenu> ChromeClientBlackBerry::createPopupMenu(PopupMenuClient* client) const
{
return adoptRef(new PopupMenuBlackBerry(client));
@@ -371,17 +384,23 @@ IntRect ChromeClientBlackBerry::windowResizerRect() const
return IntRect();
}
-IntPoint ChromeClientBlackBerry::screenToWindow(const IntPoint& screenPos) const
+IntPoint ChromeClientBlackBerry::screenToRootView(const IntPoint& screenPos) const
{
- IntPoint windowPoint = m_webPagePrivate->m_client->window()->windowLocation();
+ IntPoint windowPoint;
+ if (Window* window = m_webPagePrivate->m_client->window())
+ windowPoint = window->windowLocation();
+
windowPoint.move(-screenPos.x(), -screenPos.y());
return windowPoint;
}
-IntRect ChromeClientBlackBerry::windowToScreen(const IntRect& windowRect) const
+IntRect ChromeClientBlackBerry::rootViewToScreen(const IntRect& windowRect) const
{
IntRect windowPoint(windowRect);
- IntPoint location(m_webPagePrivate->m_client->window()->windowLocation());
+ IntPoint location;
+ if (Window* window = m_webPagePrivate->m_client->window())
+ location = window->windowLocation();
+
windowPoint.move(location.x(), location.y());
return windowPoint;
}
@@ -458,26 +477,6 @@ void ChromeClientBlackBerry::exceededDatabaseQuota(Frame* frame, const String& n
#endif
}
-void ChromeClientBlackBerry::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
-{
- if (!m_webPagePrivate->m_webSettings->isGeolocationEnabled()) {
- geolocation->setIsAllowed(false);
- return;
- }
- DOMWindow* window = frame->domWindow();
- if (!window)
- return;
-
- CString latinOrigin = frameOrigin(frame);
-
- m_webPagePrivate->m_client->requestGeolocationPermission(m_webPagePrivate->m_geolocationClient, geolocation, latinOrigin.data(), latinOrigin.length());
-}
-
-void ChromeClientBlackBerry::cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation* geolocation)
-{
- m_webPagePrivate->m_client->cancelGeolocationPermission(m_webPagePrivate->m_geolocationClient, geolocation);
-}
-
void ChromeClientBlackBerry::runOpenPanel(Frame*, PassRefPtr<FileChooser> chooser)
{
SharedArray<WebString> initialFiles;
@@ -533,12 +532,12 @@ void ChromeClientBlackBerry::contentsSizeChanged(Frame* frame, const IntSize& si
m_webPagePrivate->contentsSizeChanged(size);
}
-void ChromeClientBlackBerry::invalidateWindow(const IntRect& updateRect, bool immediate)
+void ChromeClientBlackBerry::invalidateRootView(const IntRect& updateRect, bool immediate)
{
m_webPagePrivate->m_backingStore->d->repaint(updateRect, false /*contentChanged*/, immediate);
}
-void ChromeClientBlackBerry::invalidateContentsAndWindow(const IntRect& updateRect, bool immediate)
+void ChromeClientBlackBerry::invalidateContentsAndRootView(const IntRect& updateRect, bool immediate)
{
m_webPagePrivate->m_backingStore->d->repaint(updateRect, true /*contentChanged*/, immediate);
}
@@ -546,7 +545,7 @@ void ChromeClientBlackBerry::invalidateContentsAndWindow(const IntRect& updateRe
void ChromeClientBlackBerry::invalidateContentsForSlowScroll(const IntSize& delta, const IntRect& updateRect, bool immediate, const ScrollView* scrollView)
{
if (scrollView != m_webPagePrivate->m_mainFrame->view())
- invalidateContentsAndWindow(updateRect, true /*immediate*/);
+ invalidateContentsAndRootView(updateRect, true /*immediate*/);
else {
BackingStoreClient* backingStoreClientForFrame = m_webPagePrivate->backingStoreClientForFrame(m_webPagePrivate->m_mainFrame);
ASSERT(backingStoreClientForFrame);
@@ -574,7 +573,7 @@ void ChromeClientBlackBerry::scroll(const IntSize& delta, const IntRect& scrollV
void ChromeClientBlackBerry::scrollableAreasDidChange()
{
typedef HashSet<ScrollableArea*> ScrollableAreaSet;
- const ScrollableAreaSet* scrollableAreas = m_webPagePrivate->m_page->scrollableAreaSet();
+ const ScrollableAreaSet* scrollableAreas = m_webPagePrivate->m_mainFrame->view()->scrollableAreas();
bool hasAtLeastOneInRegionScrollableArea = false;
ScrollableAreaSet::iterator end = scrollableAreas->end();
@@ -748,4 +747,10 @@ bool ChromeClientBlackBerry::allowsAcceleratedCompositing() const
}
#endif
+PassOwnPtr<ColorChooser> ChromeClientBlackBerry::createColorChooser(ColorChooserClient*, const Color&)
+{
+ return nullptr;
+}
+
+
} // namespace WebCore
diff --git a/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.h b/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.h
index b24d39c80..d1e6b3de4 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.h
+++ b/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.h
@@ -70,13 +70,13 @@ public:
virtual bool shouldInterruptJavaScript();
virtual KeyboardUIMode keyboardUIMode();
virtual IntRect windowResizerRect() const;
- virtual void invalidateWindow(const IntRect&, bool);
- virtual void invalidateContentsAndWindow(const IntRect&, bool);
+ virtual void invalidateRootView(const IntRect&, bool);
+ virtual void invalidateContentsAndRootView(const IntRect&, bool);
virtual void invalidateContentsForSlowScroll(const IntSize&, const IntRect&, bool, const ScrollView*);
virtual void scroll(const IntSize&, const IntRect&, const IntRect&);
virtual void scrollableAreasDidChange();
- virtual IntPoint screenToWindow(const IntPoint&) const;
- virtual IntRect windowToScreen(const IntRect&) const;
+ virtual IntPoint screenToRootView(const IntPoint&) const;
+ virtual IntRect rootViewToScreen(const IntRect&) const;
virtual void contentsSizeChanged(Frame*, const IntSize&) const;
virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const;
virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned int);
@@ -88,10 +88,9 @@ public:
virtual void dispatchViewportPropertiesDidChange(const ViewportArguments&) const;
virtual bool shouldRubberBandInDirection(ScrollDirection) const { return true; }
virtual void numWheelEventHandlersChanged(unsigned) { }
+ virtual void numTouchEventHandlersChanged(unsigned) { }
virtual void print(Frame*);
virtual void exceededDatabaseQuota(Frame*, const String&);
- virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
- virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*);
virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
virtual void loadIconForFiles(const Vector<String>&, FileIconLoader*);
virtual void setCursor(const Cursor&);
@@ -104,7 +103,8 @@ public:
virtual void needTouchEvents(bool);
#endif
-#if ENABLE(INPUT_COLOR)
+#if ENABLE(INPUT_TYPE_COLOR)
+ virtual PassOwnPtr<ColorChooser> createColorChooser(ColorChooserClient*, const Color&);
void openColorChooser(ColorChooser*, const Color&) { }
void cleanupColorChooser(ColorChooser*) { }
void setSelectedColorInColorChooser(ColorChooser*, const Color&) { }
@@ -133,6 +133,7 @@ public:
#endif
virtual bool selectItemWritingDirectionIsNatural();
virtual bool selectItemAlignmentFollowsMenuWritingDirection();
+ virtual bool hasOpenedPopup() const;
virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;
virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const;
diff --git a/Source/WebKit/blackberry/WebCoreSupport/CredentialManager.cpp b/Source/WebKit/blackberry/WebCoreSupport/CredentialManager.cpp
index 97e7de6f8..e80608607 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/CredentialManager.cpp
+++ b/Source/WebKit/blackberry/WebCoreSupport/CredentialManager.cpp
@@ -23,31 +23,30 @@
#include "CredentialBackingStore.h"
#include "CredentialTransformData.h"
-#include "FrameLoaderClientBlackBerry.h"
#include "HTMLFormElement.h"
#include "KURL.h"
#include "Logging.h"
-#include "WebPageClient.h"
-#include "WebPage_p.h"
+#include "PageClientBlackBerry.h"
#include "WebString.h"
-using BlackBerry::WebKit::WebPageClient;
using BlackBerry::WebKit::WebString;
namespace WebCore {
-CredentialManager::CredentialManager(FrameLoaderClientBlackBerry* frameLoaderClient)
- : m_frameLoaderClient(frameLoaderClient)
+CredentialManager& credentialManager()
{
- ASSERT(m_frameLoaderClient);
+ static CredentialManager *credentialManager = 0;
+ if (!credentialManager)
+ credentialManager = new CredentialManager();
+ return *credentialManager;
}
void CredentialManager::autofillAuthenticationChallenge(const ProtectionSpace& protectionSpace, WebString& username, WebString& password)
{
- if (CredentialBackingStore::instance()->hasNeverRemember(protectionSpace))
+ if (credentialBackingStore().hasNeverRemember(protectionSpace))
return;
- Credential savedCredential = CredentialBackingStore::instance()->getLogin(protectionSpace);
+ Credential savedCredential = credentialBackingStore().getLogin(protectionSpace);
username = savedCredential.user();
password = savedCredential.password();
}
@@ -62,35 +61,47 @@ void CredentialManager::autofillPasswordForms(PassRefPtr<HTMLCollection> docForm
Node* node = forms->item(i);
if (node && node->isHTMLElement()) {
CredentialTransformData data(static_cast<HTMLFormElement*>(node));
- if (!data.isValid() || !CredentialBackingStore::instance()->hasLogin(data.url(), data.protectionSpace()))
+ if (!data.isValid() || !credentialBackingStore().hasLogin(data.url(), data.protectionSpace()))
continue;
- Credential savedCredential = CredentialBackingStore::instance()->getLogin(data.url());
+ Credential savedCredential = credentialBackingStore().getLogin(data.url());
data.setCredential(savedCredential);
}
}
}
-void CredentialManager::saveCredentialIfConfirmed(const CredentialTransformData& data)
+void CredentialManager::saveCredentialIfConfirmed(PageClientBlackBerry* pageClient, const CredentialTransformData& data)
{
- if (!data.isValid() || data.credential().isEmpty() || CredentialBackingStore::instance()->hasNeverRemember(data.protectionSpace()))
+ ASSERT(pageClient);
+
+ if (!data.isValid() || data.credential().isEmpty() || credentialBackingStore().hasNeverRemember(data.protectionSpace()))
return;
- Credential savedCredential = CredentialBackingStore::instance()->getLogin(data.url());
+ Credential savedCredential = credentialBackingStore().getLogin(data.url());
if (savedCredential == data.credential())
return;
- WebPageClient::SaveCredentialType type = m_frameLoaderClient->m_webPagePrivate->m_client->notifyShouldSaveCredential(savedCredential.isEmpty());
- if (type == WebPageClient::SaveCredentialYes) {
+ PageClientBlackBerry::SaveCredentialType type = pageClient->notifyShouldSaveCredential(savedCredential.isEmpty());
+ if (type == PageClientBlackBerry::SaveCredentialYes) {
if (savedCredential.isEmpty())
- CredentialBackingStore::instance()->addLogin(data.url(), data.protectionSpace(), data.credential());
+ credentialBackingStore().addLogin(data.url(), data.protectionSpace(), data.credential());
else
- CredentialBackingStore::instance()->updateLogin(data.url(), data.protectionSpace(), data.credential());
- } else if (type == WebPageClient::SaveCredentialNeverForThisSite) {
- CredentialBackingStore::instance()->addNeverRemember(data.url(), data.protectionSpace());
- CredentialBackingStore::instance()->removeLogin(data.url(), data.protectionSpace());
+ credentialBackingStore().updateLogin(data.url(), data.protectionSpace(), data.credential());
+ } else if (type == PageClientBlackBerry::SaveCredentialNeverForThisSite) {
+ credentialBackingStore().addNeverRemember(data.url(), data.protectionSpace());
+ credentialBackingStore().removeLogin(data.url(), data.protectionSpace());
}
}
+void CredentialManager::clearCredentials()
+{
+ credentialBackingStore().clearLogins();
+}
+
+void CredentialManager::clearNeverRememberSites()
+{
+ credentialBackingStore().clearNeverRemember();
+}
+
} // namespace WebCore
#endif // ENABLE(BLACKBERRY_CREDENTIAL_PERSIST)
diff --git a/Source/WebKit/blackberry/WebCoreSupport/CredentialManager.h b/Source/WebKit/blackberry/WebCoreSupport/CredentialManager.h
index 1d39f10c0..92ce530f5 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/CredentialManager.h
+++ b/Source/WebKit/blackberry/WebCoreSupport/CredentialManager.h
@@ -24,6 +24,8 @@
#include "HTMLCollection.h"
#include <wtf/PassRefPtr.h>
+class PageClientBlackBerry;
+
namespace BlackBerry {
namespace WebKit {
class WebString;
@@ -31,23 +33,25 @@ class WebString;
}
namespace WebCore {
-class FrameLoaderClientBlackBerry;
class KURL;
class ProtectionSpace;
class CredentialTransformData;
class CredentialManager {
public:
- CredentialManager(FrameLoaderClientBlackBerry*);
-
void autofillAuthenticationChallenge(const ProtectionSpace&, BlackBerry::WebKit::WebString& username, BlackBerry::WebKit::WebString& password);
void autofillPasswordForms(PassRefPtr<HTMLCollection> docForms);
- void saveCredentialIfConfirmed(const CredentialTransformData&);
+ void saveCredentialIfConfirmed(PageClientBlackBerry*, const CredentialTransformData&);
+ void clearCredentials();
+ void clearNeverRememberSites();
-private:
- FrameLoaderClientBlackBerry* m_frameLoaderClient;
+ private:
+ friend CredentialManager& credentialManager();
+ CredentialManager() { }
};
+CredentialManager& credentialManager();
+
} // WebCore
#endif // ENABLE(BLACKBERRY_CREDENTIAL_PERSIST)
diff --git a/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp b/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp
index 8c22ae2a2..0d05a7543 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp
+++ b/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp
@@ -170,7 +170,9 @@ void CredentialTransformData::setCredential(const Credential& credential)
m_credential = credential;
m_userNameElement->setValue(credential.user());
+ m_userNameElement->setAutofilled();
m_passwordElement->setValue(credential.password());
+ m_passwordElement->setAutofilled();
}
bool CredentialTransformData::findPasswordFormFields(HTMLFormElement* form)
diff --git a/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp b/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp
index 356fee9ea..148be1663 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp
+++ b/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp
@@ -159,7 +159,7 @@ bool EditorClientBlackBerry::shouldBeginEditing(Range* range)
if (m_webPagePrivate->m_dumpRenderTree)
return m_webPagePrivate->m_dumpRenderTree->shouldBeginEditingInDOMRange(range);
- return m_webPagePrivate->m_inputHandler->shouldAcceptInputFocus();
+ return true;
}
bool EditorClientBlackBerry::shouldEndEditing(Range* range)
@@ -257,7 +257,7 @@ void EditorClientBlackBerry::didSetSelectionTypesForPasteboard()
notImplemented();
}
-void EditorClientBlackBerry::registerCommandForUndo(PassRefPtr<EditCommand> command)
+void EditorClientBlackBerry::registerUndoStep(PassRefPtr<UndoStep> step)
{
// Remove the oldest item if we've reached the maximum capacity for the stack.
if (m_undoStack.size() == maximumUndoStackDepth)
@@ -266,12 +266,12 @@ void EditorClientBlackBerry::registerCommandForUndo(PassRefPtr<EditCommand> comm
if (!m_inRedo)
m_redoStack.clear();
- m_undoStack.append(command);
+ m_undoStack.append(step);
}
-void EditorClientBlackBerry::registerCommandForRedo(PassRefPtr<EditCommand> command)
+void EditorClientBlackBerry::registerRedoStep(PassRefPtr<UndoStep> step)
{
- m_redoStack.append(command);
+ m_redoStack.append(step);
}
void EditorClientBlackBerry::clearUndoRedoOperations()
@@ -304,7 +304,7 @@ void EditorClientBlackBerry::undo()
{
if (canUndo()) {
EditCommandStack::iterator back = --m_undoStack.end();
- RefPtr<EditCommand> command(*back);
+ RefPtr<UndoStep> command(*back);
m_undoStack.remove(back);
// Unapply will call us back to push this command onto the redo stack.
@@ -316,7 +316,7 @@ void EditorClientBlackBerry::redo()
{
if (canRedo()) {
EditCommandStack::iterator back = --m_redoStack.end();
- RefPtr<EditCommand> command(*back);
+ RefPtr<UndoStep> command(*back);
m_redoStack.remove(back);
ASSERT(!m_inRedo);
@@ -464,6 +464,8 @@ void EditorClientBlackBerry::handleKeyboardEvent(KeyboardEvent* event)
String commandName = interpretKeyEvent(event);
if (!commandName.isEmpty()) {
+ // Hot key handling. Cancel processing mode.
+ m_webPagePrivate->m_inputHandler->setProcessingChange(false);
if (frame->editor()->command(commandName).execute())
event->setDefaultHandled();
return;
diff --git a/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.h b/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.h
index 54a310090..486176b0d 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.h
+++ b/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.h
@@ -60,8 +60,8 @@ public:
virtual void didEndEditing();
virtual void didWriteSelectionToPasteboard();
virtual void didSetSelectionTypesForPasteboard();
- virtual void registerCommandForUndo(PassRefPtr<EditCommand>);
- virtual void registerCommandForRedo(PassRefPtr<EditCommand>);
+ virtual void registerUndoStep(PassRefPtr<UndoStep>);
+ virtual void registerRedoStep(PassRefPtr<UndoStep>);
virtual void clearUndoRedoOperations();
virtual bool canCopyCut(Frame*, bool) const;
virtual bool canPaste(Frame*, bool) const;
@@ -108,7 +108,7 @@ private:
bool m_inRedo;
- typedef Deque<RefPtr<WebCore::EditCommand> > EditCommandStack;
+ typedef Deque<RefPtr<WebCore::UndoStep> > EditCommandStack;
EditCommandStack m_undoStack;
EditCommandStack m_redoStack;
};
diff --git a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp b/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
index 0eef1f3da..b2de76e39 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
+++ b/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
@@ -24,17 +24,18 @@
#include "BackingStoreClient.h"
#include "BackingStore_p.h"
#include "Base64.h"
-#include "CachedImage.h"
#include "Chrome.h"
#include "ChromeClientBlackBerry.h"
#include "ClientExtension.h"
#include "CookieManager.h"
+#include "CredentialBackingStore.h"
+#include "CredentialManager.h"
+#include "CredentialTransformData.h"
#include "DumpRenderTreeClient.h"
#include "FrameNetworkingContextBlackBerry.h"
#include "FrameView.h"
#include "HTMLFormElement.h"
#include "HTMLHeadElement.h"
-#include "HTMLImageElement.h"
#include "HTMLLinkElement.h"
#include "HTMLMediaElement.h"
#include "HTMLMetaElement.h"
@@ -50,8 +51,10 @@
#include "NetworkManager.h"
#include "NodeList.h"
#include "Page.h"
+#include "PluginDatabase.h"
#include "PluginView.h"
#include "ProgressTracker.h"
+#include "ProtectionSpace.h"
#include "ScopePointer.h"
#include "SharedBuffer.h"
#include "TextEncoding.h"
@@ -70,6 +73,7 @@
using WTF::String;
using namespace WebCore;
using namespace BlackBerry::WebKit;
+using BlackBerry::Platform::NetworkRequest;
// This was copied from file "WebKit/Source/WebKit/mac/Misc/WebKitErrors.h".
enum {
@@ -97,13 +101,10 @@ FrameLoaderClientBlackBerry::FrameLoaderClientBlackBerry()
, m_hasSentResponseToPlugin(false)
, m_cancelLoadOnNextData(false)
{
- m_deferredJobsTimer = new Timer<FrameLoaderClientBlackBerry>(this, &FrameLoaderClientBlackBerry::deferredJobsTimerFired);
}
FrameLoaderClientBlackBerry::~FrameLoaderClientBlackBerry()
{
- delete m_deferredJobsTimer;
- m_deferredJobsTimer = 0;
}
int FrameLoaderClientBlackBerry::playerId() const
@@ -194,33 +195,36 @@ void FrameLoaderClientBlackBerry::dispatchDecidePolicyForResponse(FramePolicyFun
void FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, const NavigationAction& action, const ResourceRequest& request, PassRefPtr<FormState>)
{
- PolicyAction decision = PolicyUse;
+ PolicyAction decision = PolicyIgnore;
const KURL& url = request.url();
-
- // Fragment scrolls on the same page should always be handled internally.
- // (Only count as a fragment scroll if we are scrolling to a #fragment url, not back to the top, and reloading
- // the same url is not a fragment scroll even if it has a #fragment.)
- const KURL& currentUrl = m_frame->document()->url();
- bool isFragmentScroll = url.hasFragmentIdentifier() && url != currentUrl && equalIgnoringFragmentIdentifier(currentUrl, url);
- if (decision == PolicyUse)
+ if (!url.isNull()) {
+ // Fragment scrolls on the same page should always be handled internally.
+ // (Only count as a fragment scroll if we are scrolling to a #fragment url, not back to the top, and reloading
+ // the same url is not a fragment scroll even if it has a #fragment.)
+ const KURL& currentUrl = m_frame->document()->url();
+ bool isFragmentScroll = url.hasFragmentIdentifier() && url != currentUrl && equalIgnoringFragmentIdentifier(currentUrl, url);
decision = decidePolicyForExternalLoad(request, isFragmentScroll);
- // Let the client have a chance to say whether this navigation should
- // be ignored or not.
- BlackBerry::Platform::NetworkRequest platformRequest;
- request.initializePlatformRequest(platformRequest, false /*isInitial*/);
- if (isMainFrame() && !m_webPagePrivate->m_client->acceptNavigationRequest(
- platformRequest, BlackBerry::Platform::NavigationType(action.type()))) {
- if (action.type() == NavigationTypeFormSubmitted
- || action.type() == NavigationTypeFormResubmitted)
- m_frame->loader()->resetMultipleFormSubmissionProtection();
-
- if (action.type() == NavigationTypeLinkClicked && url.hasFragmentIdentifier()) {
- ResourceRequest emptyRequest;
- m_frame->loader()->activeDocumentLoader()->setLastCheckedRequest(emptyRequest);
+ // Let the client have a chance to say whether this navigation should
+ // be ignored or not.
+ NetworkRequest platformRequest;
+ request.initializePlatformRequest(platformRequest, cookiesEnabled());
+ if (platformRequest.getTargetType() == NetworkRequest::TargetIsUnknown)
+ platformRequest.setTargetType(isMainFrame() ? NetworkRequest::TargetIsMainFrame : NetworkRequest::TargetIsSubframe);
+
+ if (isMainFrame() && !m_webPagePrivate->m_client->acceptNavigationRequest(
+ platformRequest, BlackBerry::Platform::NavigationType(action.type()))) {
+ if (action.type() == NavigationTypeFormSubmitted
+ || action.type() == NavigationTypeFormResubmitted)
+ m_frame->loader()->resetMultipleFormSubmissionProtection();
+
+ if (action.type() == NavigationTypeLinkClicked && url.hasFragmentIdentifier()) {
+ ResourceRequest emptyRequest;
+ m_frame->loader()->activeDocumentLoader()->setLastCheckedRequest(emptyRequest);
+ }
+ decision = PolicyIgnore;
}
- decision = PolicyIgnore;
}
// If we abort here, dispatchDidCancelClientRedirect will not be called.
@@ -270,29 +274,13 @@ void FrameLoaderClientBlackBerry::doPendingFragmentScroll()
delayPolicyCheckUntilFragmentExists(fragment, function);
}
-void FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, const NavigationAction& action, const ResourceRequest& request, PassRefPtr<FormState>, const String& frameName)
+void FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, const NavigationAction&, const ResourceRequest& request, PassRefPtr<FormState>, const String& frameName)
{
if (request.isRequestedByPlugin() && ScriptController::processingUserGesture() && !m_webPagePrivate->m_pluginMayOpenNewTab)
(m_frame->loader()->policyChecker()->*function)(PolicyIgnore);
// A new window can never be a fragment scroll.
PolicyAction decision = decidePolicyForExternalLoad(request, false);
- // Let the client have a chance to say whether this navigation should
- // be ignored or not.
- BlackBerry::Platform::NetworkRequest platformRequest;
- request.initializePlatformRequest(platformRequest, false /*isInitial*/);
- if (isMainFrame() && !m_webPagePrivate->m_client->acceptNavigationRequest(
- platformRequest, BlackBerry::Platform::NavigationType(action.type()))) {
- if (action.type() == NavigationTypeFormSubmitted || action.type() == NavigationTypeFormResubmitted)
- m_frame->loader()->resetMultipleFormSubmissionProtection();
-
- if (action.type() == NavigationTypeLinkClicked && request.url().hasFragmentIdentifier()) {
- ResourceRequest emptyRequest;
- m_frame->loader()->activeDocumentLoader()->setLastCheckedRequest(emptyRequest);
- }
- decision = PolicyIgnore;
- }
-
(m_frame->loader()->policyChecker()->*function)(decision);
}
@@ -332,12 +320,12 @@ PassRefPtr<Widget> FrameLoaderClientBlackBerry::createPlugin(const IntSize& plug
String mimeType(mimeTypeIn);
if (mimeType.isEmpty()) {
mimeType = MIMETypeRegistry::getMIMETypeForPath(url.path());
- mimeType = WebSettings::getNormalizedMIMEType(mimeType);
+ mimeType = MIMETypeRegistry::getNormalizedMIMEType(mimeType);
if (mimeType != "application/x-shockwave-flash")
mimeType = mimeTypeIn;
}
- if (mimeType == "application/x-shockwave-flash" || mimeType == "application/jnext-scriptable-plugin")
+ if (PluginDatabase::installedPlugins()->isMIMETypeRegistered(mimeType))
return PluginView::create(m_frame, pluginSize, element, url, paramNames, paramValues, mimeType, loadManually);
// If it's not the plugin type we support, try load directly from browser.
@@ -375,17 +363,12 @@ void FrameLoaderClientBlackBerry::receivedData(const char* data, int length, con
m_frame->loader()->documentLoader()->writer()->addData(data, length);
}
-void FrameLoaderClientBlackBerry::finishedLoading(DocumentLoader* loader)
+void FrameLoaderClientBlackBerry::finishedLoading(DocumentLoader*)
{
if (m_pluginView) {
m_pluginView->didFinishLoading();
m_pluginView = 0;
m_hasSentResponseToPlugin = false;
- } else {
- // Telling the frame we received some data and passing 0 as the data is our
- // way to get work done that is normally done when the first bit of data is
- // received, even for the case of a document with no data (like about:blank).
- committedLoad(loader, 0, 0);
}
}
@@ -468,7 +451,7 @@ bool FrameLoaderClientBlackBerry::canHandleRequest(const ResourceRequest&) const
bool FrameLoaderClientBlackBerry::canShowMIMEType(const String& mimeTypeIn) const
{
// Get normalized type.
- String mimeType = WebSettings::getNormalizedMIMEType(mimeTypeIn);
+ String mimeType = MIMETypeRegistry::getNormalizedMIMEType(mimeTypeIn);
// FIXME: Seems no other port checks empty MIME type in this function. Should we do that?
return MIMETypeRegistry::isSupportedImageMIMEType(mimeType) || MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType)
@@ -620,6 +603,11 @@ void FrameLoaderClientBlackBerry::dispatchDidFinishLoad()
m_webPagePrivate->m_client->setAlternateFeedDetails(title.utf8().data(), href.utf8().data());
}
}
+
+#if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST)
+ if (!m_webPagePrivate->m_webSettings->isPrivateBrowsingEnabled())
+ credentialManager().autofillPasswordForms(m_frame->document()->forms());
+#endif
}
void FrameLoaderClientBlackBerry::dispatchDidFinishDocumentLoad()
@@ -712,12 +700,27 @@ void FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad(const ResourceE
}
}
-void FrameLoaderClientBlackBerry::dispatchWillSubmitForm(FramePolicyFunction function, PassRefPtr<FormState>)
+void FrameLoaderClientBlackBerry::dispatchWillSubmitForm(FramePolicyFunction function, PassRefPtr<FormState> formState)
{
+#if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST)
+ if (!m_webPagePrivate->m_webSettings->isPrivateBrowsingEnabled())
+ credentialManager().saveCredentialIfConfirmed(m_webPagePrivate, CredentialTransformData(formState->form()));
+#endif
+
// FIXME: Stub.
(m_frame->loader()->policyChecker()->*function)(PolicyUse);
}
+void FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent(PassRefPtr<FormState> prpFormState)
+{
+#if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST)
+ if (!m_webPagePrivate->m_webSettings->isPrivateBrowsingEnabled())
+ credentialManager().saveCredentialIfConfirmed(m_webPagePrivate, CredentialTransformData(prpFormState->form()));
+#else
+ notImplemented();
+#endif
+}
+
PassRefPtr<Frame> FrameLoaderClientBlackBerry::createFrame(const KURL& url, const String& name
, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight)
{
@@ -758,17 +761,6 @@ PassRefPtr<Frame> FrameLoaderClientBlackBerry::createFrame(const KURL& url, cons
return childFrame.release();
}
-void FrameLoaderClientBlackBerry::didTransferChildFrameToNewDocument(Page* /*oldPage*/)
-{
- Page* newPage = m_frame->page();
- m_webPagePrivate = static_cast<ChromeClientBlackBerry*>(newPage->chrome()->client())->webPagePrivate();
-}
-
-void FrameLoaderClientBlackBerry::transferLoadingResourceFromPage(ResourceLoader*, const ResourceRequest&, Page*)
-{
- notImplemented();
-}
-
ObjectContentType FrameLoaderClientBlackBerry::objectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
{
String mimeType = mimeTypeIn;
@@ -776,7 +768,7 @@ ObjectContentType FrameLoaderClientBlackBerry::objectContentType(const KURL& url
mimeType = MIMETypeRegistry::getMIMETypeForPath(url.path());
// Get mapped type.
- mimeType = WebSettings::getNormalizedMIMEType(mimeType);
+ mimeType = MIMETypeRegistry::getNormalizedMIMEType(mimeType);
ObjectContentType defaultType = FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages);
if (defaultType != ObjectContentNone)
@@ -936,22 +928,19 @@ void FrameLoaderClientBlackBerry::dispatchWillSendRequest(DocumentLoader* docLoa
// it is a new top level request which has not been commited.
bool isMainResourceLoad = docLoader && docLoader == docLoader->frameLoader()->provisionalDocumentLoader();
+ // TargetType for subresource loads should have been set in CachedResource::load().
+ if (isMainResourceLoad && request.targetType() == ResourceRequest::TargetIsUnspecified)
+ request.setTargetType(isMainFrame() ? ResourceRequest::TargetIsMainFrame : ResourceRequest::TargetIsSubframe);
+
// Any processing which is done for all loads (both main and subresource) should go here.
- BlackBerry::Platform::NetworkRequest platformRequest;
- request.initializePlatformRequest(platformRequest, false /*isInitial*/);
+ NetworkRequest platformRequest;
+ request.initializePlatformRequest(platformRequest, cookiesEnabled());
m_webPagePrivate->m_client->populateCustomHeaders(platformRequest);
- const BlackBerry::Platform::NetworkRequest::HeaderList& headerLists = platformRequest.getHeaderListRef();
- for (BlackBerry::Platform::NetworkRequest::HeaderList::const_iterator it = headerLists.begin(); it != headerLists.end(); ++it) {
+ const NetworkRequest::HeaderList& headerLists = platformRequest.getHeaderListRef();
+ for (NetworkRequest::HeaderList::const_iterator it = headerLists.begin(); it != headerLists.end(); ++it) {
std::string headerString = it->first;
std::string headerValueString = it->second;
- request.setHTTPHeaderField(String(headerString.c_str()), String(headerValueString.c_str()));
- }
- if (cookiesEnabled()) {
- String cookiePairs = cookieManager().getCookie(request.url(), WithHttpOnlyCookies);
- if (!cookiePairs.isEmpty()) {
- // We only modify the WebCore request to make the cookies visible in inspector.
- request.setHTTPHeaderField(String("Cookie"), cookiePairs);
- }
+ request.setHTTPHeaderField(String::fromUTF8WithLatin1Fallback(headerString.data(), headerString.length()), String::fromUTF8WithLatin1Fallback(headerValueString.data(), headerValueString.length()));
}
if (!isMainResourceLoad) {
// Do nothing for now.
@@ -1000,6 +989,9 @@ void FrameLoaderClientBlackBerry::saveViewStateToItem(HistoryItem* item)
viewState.isZoomToFitScale = m_webPagePrivate->currentScale() == m_webPagePrivate->zoomToFitScale();
viewState.scale = m_webPagePrivate->currentScale();
viewState.shouldReflowBlock = m_webPagePrivate->m_shouldReflowBlock;
+ viewState.minimumScale = m_webPagePrivate->m_minimumScale;
+ viewState.maximumScale = m_webPagePrivate->m_maximumScale;
+ viewState.isUserScalable = m_webPagePrivate->m_userScalable;
}
}
@@ -1034,6 +1026,10 @@ void FrameLoaderClientBlackBerry::restoreViewState()
m_webPagePrivate->m_didRestoreFromPageCache = false;
HistoryItemViewState& viewState = currentItem->viewState();
+ // Restore the meta first.
+ m_webPagePrivate->m_minimumScale = viewState.minimumScale;
+ m_webPagePrivate->m_maximumScale = viewState.maximumScale;
+ m_webPagePrivate->m_userScalable = viewState.isUserScalable;
// Also, try to keep the users zoom if any.
double scale = viewState.scale;
bool shouldReflowBlock = viewState.shouldReflowBlock;
@@ -1079,19 +1075,28 @@ void FrameLoaderClientBlackBerry::restoreViewState()
PolicyAction FrameLoaderClientBlackBerry::decidePolicyForExternalLoad(const ResourceRequest& request, bool isFragmentScroll)
{
+#if 0
+ // FIXME: Enable these commented out when WebPageClient::handleStringPattern is implemented
+ // and exposed to client. Before that, don't return PolicyIgnore so we can continue to
+ // create new window and get to dispatchDecidePolicyForNavigationAction() where the client
+ // is given a chance to decide how to handle patterns such as 'mailto:'.
const KURL& url = request.url();
String pattern = m_webPagePrivate->findPatternStringForUrl(url);
if (!pattern.isEmpty()) {
m_webPagePrivate->m_client->handleStringPattern(pattern.characters(), pattern.length());
return PolicyIgnore;
}
+#endif
if (m_webPagePrivate->m_webSettings->areLinksHandledExternally()
&& isMainFrame()
&& !request.mustHandleInternally()
&& !isFragmentScroll) {
- BlackBerry::Platform::NetworkRequest platformRequest;
- request.initializePlatformRequest(platformRequest);
+ NetworkRequest platformRequest;
+ request.initializePlatformRequest(platformRequest, cookiesEnabled());
+ if (platformRequest.getTargetType() == NetworkRequest::TargetIsUnknown)
+ platformRequest.setTargetType(isMainFrame() ? NetworkRequest::TargetIsMainFrame : NetworkRequest::TargetIsSubframe);
+
m_webPagePrivate->m_client->handleExternalLink(platformRequest, request.anchorText().characters(), request.anchorText().length(), m_clientRedirectIsPending);
return PolicyIgnore;
}
@@ -1101,8 +1106,6 @@ PolicyAction FrameLoaderClientBlackBerry::decidePolicyForExternalLoad(const Reso
void FrameLoaderClientBlackBerry::willDeferLoading()
{
- m_deferredJobsTimer->stop();
-
if (!isMainFrame())
return;
@@ -1111,36 +1114,12 @@ void FrameLoaderClientBlackBerry::willDeferLoading()
void FrameLoaderClientBlackBerry::didResumeLoading()
{
- if (!m_deferredManualScript.isNull())
- m_deferredJobsTimer->startOneShot(0);
-
if (!isMainFrame())
return;
m_webPagePrivate->didResumeLoading();
}
-void FrameLoaderClientBlackBerry::setDeferredManualScript(const KURL& script)
-{
- ASSERT(!m_deferredJobsTimer->isActive());
- m_deferredManualScript = script;
-}
-
-void FrameLoaderClientBlackBerry::deferredJobsTimerFired(Timer<FrameLoaderClientBlackBerry>*)
-{
- ASSERT(!m_frame->page()->defersLoading());
-
- if (!m_deferredManualScript.isNull()) {
- // Executing the script will set deferred loading, which could trigger this timer again if a script is set. So clear the script first.
- KURL script = m_deferredManualScript;
- m_deferredManualScript = KURL();
-
- m_frame->script()->executeIfJavaScriptURL(script);
- }
-
- ASSERT(!m_frame->page()->defersLoading());
-}
-
void FrameLoaderClientBlackBerry::readyToRender(bool pageIsVisuallyNonEmpty)
{
// Only send the notification once.
@@ -1155,21 +1134,9 @@ PassRefPtr<FrameNetworkingContext> FrameLoaderClientBlackBerry::createNetworking
return FrameNetworkingContextBlackBerry::create(m_frame);
}
-void FrameLoaderClientBlackBerry::authenticationChallenge(const String& realm, String& username, String& password)
-{
- WebString webPageUsername;
- WebString webPagePassword;
-
- m_webPagePrivate->m_client->authenticationChallenge(realm.characters(), realm.length(), webPageUsername, webPagePassword);
-
- username = webPageUsername;
- password = webPagePassword;
-}
-
-void FrameLoaderClientBlackBerry::startDownload(const ResourceRequest& request, const String& /*suggestedName*/)
+void FrameLoaderClientBlackBerry::startDownload(const ResourceRequest& request, const String& suggestedName)
{
- // FIXME: use the suggestedName?
- m_webPagePrivate->load(request.url().string().utf8().data(), 0, "GET", BlackBerry::Platform::NetworkRequest::UseProtocolCachePolicy, 0, 0, 0, 0, false, false, true, "");
+ m_webPagePrivate->load(request.url().string().utf8().data(), 0, "GET", NetworkRequest::UseProtocolCachePolicy, 0, 0, 0, 0, false, false, true, "", suggestedName.utf8().data());
}
void FrameLoaderClientBlackBerry::download(ResourceHandle* handle, const ResourceRequest&, const ResourceRequest&, const ResourceResponse& r)
@@ -1198,7 +1165,7 @@ void FrameLoaderClientBlackBerry::dispatchDidReceiveIcon()
bool FrameLoaderClientBlackBerry::canCachePage() const
{
- // We won't cache pages containing video or audio.
+ // We won't cache pages containing video, audio or multipart with "multipart/x-mixed-replace".
ASSERT(m_frame->document());
RefPtr<NodeList> nodeList = m_frame->document()->getElementsByTagName(HTMLNames::videoTag.localName());
if (nodeList.get()->length() > 0)
@@ -1207,13 +1174,11 @@ bool FrameLoaderClientBlackBerry::canCachePage() const
if (nodeList.get()->length() > 0)
return false;
- // The multipart of "multipart/x-mixed-replace" only supports image, correct?
- // FIXME: Do we have a better place to handle this case?
- nodeList = m_frame->document()->getElementsByTagName(HTMLNames::imgTag.localName());
- for (unsigned i = 0; i < nodeList.get()->length(); ++i) {
- HTMLImageElement* node = static_cast<HTMLImageElement*>(nodeList.get()->item(i));
- CachedImage* cachedimage = node ? node->cachedImage() : 0;
- if (cachedimage && cachedimage->response().isMultipartPayload())
+ ASSERT(m_frame->loader()->documentLoader());
+ const ResponseVector& responses = m_frame->loader()->documentLoader()->responses();
+ size_t count = responses.size();
+ for (size_t i = 0; i < count; i++) {
+ if (responses[i].isMultipartPayload())
return false;
}
return true;
diff --git a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h b/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h
index 2983d01ee..ba6b7e405 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h
+++ b/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h
@@ -93,7 +93,6 @@ public:
virtual void cancelPolicyCheck();
virtual void dispatchUnableToImplementPolicy(const ResourceError&) { notImplemented(); }
virtual void dispatchWillSubmitForm(FramePolicyFunction, PassRefPtr<FormState>);
- virtual void dispatchDidLoadMainResource(DocumentLoader*) { notImplemented(); }
virtual void revertToProvisionalState(DocumentLoader*) { notImplemented(); }
virtual void setMainDocumentError(DocumentLoader*, const ResourceError&);
virtual void postProgressStartedNotification();
@@ -148,7 +147,6 @@ public:
virtual void dispatchDidBecomeFrameset(bool) { }
virtual void download(ResourceHandle*, const ResourceRequest&, const ResourceRequest&, const ResourceResponse&);
virtual PassRefPtr<Frame> createFrame(const KURL&, const String&, HTMLFrameOwnerElement*, const String&, bool, int, int);
- virtual void didTransferChildFrameToNewDocument(Page*);
virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool);
virtual void redirectDataToPlugin(Widget*);
virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL&, const Vector<String>&, const Vector<String>&) { notImplemented(); return 0; }
@@ -164,21 +162,14 @@ public:
virtual void loadIconExternally(const String& originalPageUrl, const String& finalPageUrl, const String& iconUrl);
virtual void didDetectXSS(const KURL&, bool) { }
- virtual void transferLoadingResourceFromPage(ResourceLoader*, const ResourceRequest&, Page*);
- virtual void didTransferChildFrameToNewDocument() { notImplemented(); };
virtual void dispatchDidChangeIcons(IconType) { notImplemented(); };
- virtual void dispatchWillSendSubmitEvent(HTMLFormElement*) { notImplemented(); };
+ virtual void dispatchWillSendSubmitEvent(PassRefPtr<FormState>);
virtual void willDeferLoading();
virtual void didResumeLoading();
- virtual void authenticationChallenge(const String& realm, String& username, String& password);
virtual PassRefPtr<FrameNetworkingContext> createNetworkingContext();
- // Schedule a script that was loaded manually by the user (eg. a
- // bookmarklet) while page loading was deferred.
- void setDeferredManualScript(const KURL&);
-
void readyToRender(bool pageIsVisuallyNonEmpty);
void doPendingFragmentScroll();
@@ -200,14 +191,10 @@ private:
PolicyAction decidePolicyForExternalLoad(const ResourceRequest &, bool isFragmentScroll);
void delayPolicyCheckUntilFragmentExists(const String& fragment, FramePolicyFunction);
- void deferredJobsTimerFired(Timer<FrameLoaderClientBlackBerry>*);
-
Frame* m_frame;
ResourceError m_loadError;
BlackBerry::WebKit::WebPagePrivate* m_webPagePrivate;
- Timer<FrameLoaderClientBlackBerry>* m_deferredJobsTimer;
- KURL m_deferredManualScript;
Geolocation* m_geolocation;
bool m_sentReadyToRender;
diff --git a/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp b/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp
index fd59f2e41..b337d0396 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp
+++ b/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp
@@ -66,7 +66,7 @@ void GeolocationControllerClientBlackBerry::requestPermission(Geolocation* locat
Frame* frame = location->frame();
if (!frame)
return;
- m_webPagePrivate->m_page->chrome()->requestGeolocationPermissionForFrame(frame, location);
+ m_webPagePrivate->m_page->chrome()->client()->requestGeolocationPermissionForFrame(frame, location);
}
void GeolocationControllerClientBlackBerry::cancelPermissionRequest(Geolocation* location)
@@ -74,7 +74,7 @@ void GeolocationControllerClientBlackBerry::cancelPermissionRequest(Geolocation*
Frame* frame = location->frame();
if (!frame)
return;
- m_webPagePrivate->m_page->chrome()->cancelGeolocationPermissionRequestForFrame(frame, location);
+ m_webPagePrivate->m_page->chrome()->client()->cancelGeolocationPermissionRequestForFrame(frame, location);
}
void GeolocationControllerClientBlackBerry::onLocationUpdate(double timestamp, double latitude, double longitude, double accuracy, double altitude, bool altitudeValid,
@@ -82,13 +82,13 @@ void GeolocationControllerClientBlackBerry::onLocationUpdate(double timestamp, d
{
m_lastPosition = GeolocationPosition::create(timestamp, latitude, longitude, accuracy, altitudeValid, altitude, altitudeAccuracyValid,
altitudeAccuracy, headingValid, heading, speedValid, speed);
- m_webPagePrivate->m_page->geolocationController()->positionChanged(m_lastPosition.get());
+ GeolocationController::from(m_webPagePrivate->m_page)->positionChanged(m_lastPosition.get());
}
void GeolocationControllerClientBlackBerry::onLocationError(const char* errorStr)
{
RefPtr<GeolocationError> error = GeolocationError::create(GeolocationError::PositionUnavailable, String::fromUTF8(errorStr));
- m_webPagePrivate->m_page->geolocationController()->errorOccurred(error.get());
+ GeolocationController::from(m_webPagePrivate->m_page)->errorOccurred(error.get());
}
void GeolocationControllerClientBlackBerry::onPermission(void* context, bool isAllowed)
diff --git a/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h b/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h
index ea634bb97..c32449aee 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h
+++ b/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h
@@ -22,7 +22,7 @@
#include <BlackBerryPlatformGeoTracker.h>
#include <BlackBerryPlatformGeoTrackerListener.h>
#include <GeolocationClient.h>
-#include <GeolocationPosition.h>
+#include <RefPtr.h>
namespace BlackBerry {
namespace WebKit {
diff --git a/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp b/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp
index 73f887f30..0d5cdf4d1 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp
+++ b/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp
@@ -124,6 +124,16 @@ void InspectorClientBlackBerry::openInspectorFrontend(InspectorController*)
notImplemented();
}
+void InspectorClientBlackBerry::closeInspectorFrontend()
+{
+ notImplemented();
+}
+
+void InspectorClientBlackBerry::bringFrontendToFront()
+{
+ notImplemented();
+}
+
bool InspectorClientBlackBerry::sendMessageToFrontend(const String& message)
{
CString utf8Message = message.utf8();
diff --git a/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.h b/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.h
index f5cca1e87..d0cccea45 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.h
+++ b/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.h
@@ -51,9 +51,13 @@ public:
virtual void storeSetting(const String& key, const String& value);
virtual void inspectorWindowObjectCleared();
virtual void openInspectorFrontend(InspectorController*);
+ virtual void closeInspectorFrontend();
+ virtual void bringFrontendToFront();
virtual bool sendMessageToFrontend(const String&);
virtual void clearBrowserCache();
+ virtual bool canClearBrowserCache() { return true; }
virtual void clearBrowserCookies();
+ virtual bool canClearBrowserCookies() { return true; }
private:
BlackBerry::WebKit::WebPagePrivate* m_webPagePrivate;
diff --git a/Source/WebKit/blackberry/WebCoreSupport/NotificationPresenterImpl.cpp b/Source/WebKit/blackberry/WebCoreSupport/NotificationPresenterImpl.cpp
index 16c451ec3..6b2921029 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/NotificationPresenterImpl.cpp
+++ b/Source/WebKit/blackberry/WebCoreSupport/NotificationPresenterImpl.cpp
@@ -19,7 +19,7 @@
#include "config.h"
#include "NotificationPresenterImpl.h"
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#include <Event.h>
#include <Notification.h>
#include <NotificationPresenterBlackBerry.h>
@@ -65,7 +65,7 @@ bool NotificationPresenterImpl::show(Notification* notification)
message = n->url().string();
} else {
// FIXME: Strip the content into one line.
- message = n->contents().title() + ": " + n->contents().body();
+ message = n->contents().title + ": " + n->contents().body;
}
m_platformPresenter->show(std::string(uuid.utf8().data()), std::string(message.utf8().data()));
@@ -155,4 +155,4 @@ void NotificationPresenterImpl::notificationClicked(const std::string& id)
} // namespace WebKit
-#endif // ENABLE(NOTIFICATIONS)
+#endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
diff --git a/Source/WebKit/blackberry/WebCoreSupport/NotificationPresenterImpl.h b/Source/WebKit/blackberry/WebCoreSupport/NotificationPresenterImpl.h
index b708e002e..25e916a90 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/NotificationPresenterImpl.h
+++ b/Source/WebKit/blackberry/WebCoreSupport/NotificationPresenterImpl.h
@@ -19,7 +19,7 @@
#ifndef NotificationPresenterImpl_h
#define NotificationPresenterImpl_h
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#include <NotificationAckListener.h>
#include <NotificationClient.h>
#include <NotificationPresenterBlackBerry.h>
@@ -81,5 +81,5 @@ private:
} // namespace WebKit
-#endif // ENABLE(NOTIFICATIONS)
+#endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#endif // NotificationPresenterImpl_h
diff --git a/Source/WebKit/blackberry/WebCoreSupport/VibrationClientBlackBerry.cpp b/Source/WebKit/blackberry/WebCoreSupport/VibrationClientBlackBerry.cpp
new file mode 100644
index 000000000..796ea6d0e
--- /dev/null
+++ b/Source/WebKit/blackberry/WebCoreSupport/VibrationClientBlackBerry.cpp
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#include "VibrationClientBlackBerry.h"
+
+#include "BlackBerryPlatformVibrate.h"
+
+#if ENABLE(VIBRATION)
+
+namespace WebCore {
+
+VibrationClientBlackBerry::VibrationClientBlackBerry()
+{
+}
+
+void VibrationClientBlackBerry::vibrate(const unsigned long& time)
+{
+ BlackBerryPlatformVibrate::vibrate(time, 1.);
+}
+
+void VibrationClientBlackBerry::cancelVibration()
+{
+}
+
+void VibrationClientBlackBerry::vibrationDestroyed()
+{
+ delete this;
+}
+
+}
+
+#endif
diff --git a/Source/WebKit/blackberry/WebCoreSupport/VibrationClientBlackBerry.h b/Source/WebKit/blackberry/WebCoreSupport/VibrationClientBlackBerry.h
new file mode 100644
index 000000000..d096b5ae0
--- /dev/null
+++ b/Source/WebKit/blackberry/WebCoreSupport/VibrationClientBlackBerry.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef VibrationClientBlackBerry_h
+#define VibrationClientBlackBerry_h
+
+#include "VibrationClient.h"
+
+namespace WebCore {
+
+class VibrationClientBlackBerry : public VibrationClient {
+public:
+ VibrationClientBlackBerry();
+ ~VibrationClientBlackBerry() { }
+
+ void vibrate(const unsigned long& time);
+ void cancelVibration();
+ void vibrationDestroyed();
+};
+
+}
+
+#endif
diff --git a/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp b/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp
index 26c0e6cd2..3b972d6c9 100644
--- a/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp
@@ -48,6 +48,15 @@ namespace BlackBerry {
namespace WebKit {
namespace DOMSupport {
+void visibleTextQuads(const VisibleSelection& selection, Vector<FloatQuad>& quads)
+{
+ if (!selection.isRange())
+ return;
+ ASSERT(selection.firstRange());
+
+ visibleTextQuads(*(selection.firstRange()), quads, true /* useSelectionHeight */);
+}
+
void visibleTextQuads(const Range& range, Vector<FloatQuad>& quads, bool useSelectionHeight)
{
// Range::textQuads includes hidden text, which we don't want.
@@ -165,7 +174,7 @@ bool isColorInputField(const Element* element)
const HTMLInputElement* inputElement = static_cast<const HTMLInputElement*>(element);
-#if ENABLE(INPUT_COLOR)
+#if ENABLE(INPUT_TYPE_COLOR)
if (inputElement->isColorControl())
return true;
#endif
@@ -285,7 +294,7 @@ VisibleSelection visibleSelectionForRangeInputElement(Element* element, int star
Node* DOMContainerNodeForPosition(const Position& position)
{
Node* nodeAtPos = position.containerNode();
- if (nodeAtPos->isInShadowTree())
+ if (nodeAtPos && nodeAtPos->isInShadowTree())
nodeAtPos = nodeAtPos->shadowAncestorNode();
return nodeAtPos;
@@ -293,8 +302,14 @@ Node* DOMContainerNodeForPosition(const Position& position)
bool isPositionInNode(Node* node, const Position& position)
{
- int offset = 0;
+ if (!node)
+ return false;
+
Node* domNodeAtPos = DOMContainerNodeForPosition(position);
+ if (!domNodeAtPos)
+ return false;
+
+ int offset = 0;
if (domNodeAtPos == position.containerNode())
offset = position.computeOffsetInContainerNode();
@@ -304,9 +319,52 @@ bool isPositionInNode(Node* node, const Position& position)
return rangeForNode->isPointInRange(domNodeAtPos, offset, ec);
}
-bool matchesReservedStringPreventingAutocomplete(AtomicString& string)
+static bool matchesReservedStringEmail(const AtomicString& string)
{
- if (string.contains("email", false /* caseSensitive */)
+ return string.contains("email", false /* caseSensitive */);
+}
+
+static bool matchesReservedStringUrl(const AtomicString& string)
+{
+ return equalIgnoringCase("url", string);
+}
+
+bool elementIdOrNameIndicatesEmail(const HTMLInputElement* inputElement)
+{
+ if (!inputElement)
+ return false;
+
+ if (matchesReservedStringEmail(inputElement->getIdAttribute()))
+ return true;
+
+ if (inputElement->fastHasAttribute(HTMLNames::nameAttr)) {
+ if (matchesReservedStringEmail(inputElement->fastGetAttribute(HTMLNames::nameAttr)))
+ return true;
+ }
+
+ return false;
+}
+
+bool elementIdOrNameIndicatesUrl(const HTMLInputElement* inputElement)
+{
+ if (!inputElement)
+ return false;
+
+ if (matchesReservedStringUrl(inputElement->getIdAttribute()))
+ return true;
+
+ if (inputElement->fastHasAttribute(HTMLNames::nameAttr)) {
+ if (matchesReservedStringUrl(inputElement->fastGetAttribute(HTMLNames::nameAttr)))
+ return true;
+ }
+
+ return false;
+}
+
+static bool matchesReservedStringPreventingAutocomplete(const AtomicString& string)
+{
+ if (matchesReservedStringEmail(string)
+ || matchesReservedStringUrl(string)
|| string.contains("user", false /* caseSensitive */)
|| string.contains("name", false /* caseSensitive */)
|| string.contains("login", false /* caseSensitive */))
@@ -336,6 +394,48 @@ bool elementIdOrNameIndicatesNoAutocomplete(const Element* element)
return false;
}
+bool elementPatternIndicatesNumber(const HTMLInputElement* inputElement)
+{
+ return elementPatternMatches("[0-9]", inputElement);
+}
+
+bool elementPatternIndicatesHexadecimal(const HTMLInputElement* inputElement)
+{
+ return elementPatternMatches("[0-9a-fA-F]", inputElement);
+}
+
+bool elementPatternMatches(const char* pattern, const HTMLInputElement* inputElement)
+{
+ WTF::String patternString(pattern);
+ if (!inputElement || patternString.isEmpty())
+ return false;
+
+ if (inputElement->fastHasAttribute(HTMLNames::patternAttr)) {
+ WTF::String patternAttribute = inputElement->fastGetAttribute(HTMLNames::patternAttr);
+ if (patternAttribute.startsWith(patternString)) {
+ // The pattern is for hexadecimal, make sure nothing else is permitted.
+
+ // Check if it was an exact match.
+ if (patternAttribute.length() == patternString.length())
+ return true;
+
+ // Check for *
+ if (patternAttribute.length() == patternString.length() + 1 && patternAttribute[patternString.length()] == '*')
+ return true;
+
+ // Is the regex specifying a character count?
+ if (patternAttribute[patternString.length()] != '{' || !patternAttribute.endsWith('}'))
+ return false;
+
+ // Make sure the number in the regex is actually a number.
+ unsigned count = 0;
+ patternString = patternString + "{%d}";
+ return (sscanf(patternAttribute.latin1().data(), patternString.latin1().data() + '\0', &count) == 1) && count > 0;
+ }
+ }
+ return false;
+}
+
IntPoint convertPointToFrame(const Frame* sourceFrame, const Frame* targetFrame, const IntPoint& point, const bool clampToTargetFrame)
{
ASSERT(sourceFrame && targetFrame);
diff --git a/Source/WebKit/blackberry/WebKitSupport/DOMSupport.h b/Source/WebKit/blackberry/WebKitSupport/DOMSupport.h
index 85d9cbfa9..38699dc1f 100644
--- a/Source/WebKit/blackberry/WebKitSupport/DOMSupport.h
+++ b/Source/WebKit/blackberry/WebKitSupport/DOMSupport.h
@@ -32,6 +32,7 @@ namespace WebCore {
class Element;
class FloatQuad;
class Frame;
+class HTMLInputElement;
class HTMLTextFormControlElement;
class Node;
class Position;
@@ -66,6 +67,7 @@ WebCore::HTMLTextFormControlElement* toTextControlElement(WebCore::Node*);
WebCore::IntRect transformedBoundingBoxForRange(const WebCore::Range&);
void visibleTextQuads(const WebCore::Range&, WTF::Vector<WebCore::FloatQuad>& quads, bool useSelectionHeight = false);
+void visibleTextQuads(const WebCore::VisibleSelection&, WTF::Vector<WebCore::FloatQuad>& quads);
WebCore::VisibleSelection visibleSelectionForRangeInputElement(WebCore::Element*, int start, int end);
WebCore::VisibleSelection visibleSelectionForInputElement(WebCore::Element*);
@@ -74,6 +76,11 @@ WebCore::Node* DOMContainerNodeForPosition(const WebCore::Position&);
bool isPositionInNode(WebCore::Node*, const WebCore::Position&);
bool elementIdOrNameIndicatesNoAutocomplete(const WebCore::Element*);
+bool elementIdOrNameIndicatesEmail(const WebCore::HTMLInputElement*);
+bool elementIdOrNameIndicatesUrl(const WebCore::HTMLInputElement*);
+bool elementPatternMatches(const char*, const WebCore::HTMLInputElement*);
+bool elementPatternIndicatesNumber(const WebCore::HTMLInputElement*);
+bool elementPatternIndicatesHexadecimal(const WebCore::HTMLInputElement*);
WebCore::IntPoint convertPointToFrame(const WebCore::Frame* sourceFrame, const WebCore::Frame* targetFrame, const WebCore::IntPoint& sourcePoint, const bool clampToTargetFrame = false);
diff --git a/Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp b/Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp
index c8ede6e5a..cd1cb4cf9 100644
--- a/Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp
@@ -40,13 +40,11 @@ using namespace JSC;
bool DumpRenderTreeSupport::s_linksIncludedInTabChain = true;
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
GeolocationClientMock* toGeolocationClientMock(GeolocationClient* client)
{
ASSERT(getenv("drtRun"));
return static_cast<GeolocationClientMock*>(client);
}
-#endif
DumpRenderTreeSupport::DumpRenderTreeSupport()
{
@@ -93,31 +91,23 @@ void DumpRenderTreeSupport::dumpConfigurationForViewport(Frame* mainFrame, int d
restrictMinimumScaleFactorToViewportSize(attrs, IntSize(availableWidth, availableHeight));
restrictScaleFactorToInitialScaleIfNotUserScalable(attrs);
- fprintf(stdout, "viewport size %dx%d scale %f with limits [%f, %f] and userScalable %f\n", attrs.layoutSize.width(), attrs.layoutSize.height(), attrs.initialScale, attrs.minimumScale, attrs.maximumScale, attrs.userScalable);
+ fprintf(stdout, "viewport size %dx%d scale %f with limits [%f, %f] and userScalable %f\n", static_cast<int>(attrs.layoutSize.width()), static_cast<int>(attrs.layoutSize.height()), attrs.initialScale, attrs.minimumScale, attrs.maximumScale, attrs.userScalable);
}
int DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests(WebPage* webPage)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- GeolocationClientMock* mockClient = toGeolocationClientMock(corePage(webPage)->geolocationController()->client());
+ GeolocationClientMock* mockClient = toGeolocationClientMock(GeolocationController(corePage(webPage))->client());
return mockClient->numberOfPendingPermissionRequests();
-#else
- UNUSED_PARAM(webPage);
- return -1;
-#endif
}
void DumpRenderTreeSupport::resetGeolocationMock(WebPage* webPage)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- GeolocationClientMock* mockClient = toGeolocationClientMock(corePage(webPage)->geolocationController()->client());
+ GeolocationClientMock* mockClient = toGeolocationClientMock(GeolocationController::from(corePage(webPage))->client());
mockClient->reset();
-#endif
}
void DumpRenderTreeSupport::setMockGeolocationError(WebPage* webPage, int errorCode, const String message)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
GeolocationError::ErrorCode code = GeolocationError::PositionUnavailable;
switch (errorCode) {
case PositionError::PERMISSION_DENIED:
@@ -128,25 +118,20 @@ void DumpRenderTreeSupport::setMockGeolocationError(WebPage* webPage, int errorC
break;
}
- GeolocationClientMock* mockClient = static_cast<GeolocationClientMock*>(corePage(webPage)->geolocationController()->client());
+ GeolocationClientMock* mockClient = static_cast<GeolocationClientMock*>(GeolocationController::from(corePage(webPage))->client());
mockClient->setError(GeolocationError::create(code, message));
-#endif
}
void DumpRenderTreeSupport::setMockGeolocationPermission(WebPage* webPage, bool allowed)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- GeolocationClientMock* mockClient = toGeolocationClientMock(corePage(webPage)->geolocationController()->client());
+ GeolocationClientMock* mockClient = toGeolocationClientMock(GeolocationController::from(corePage(webPage))->client());
mockClient->setPermission(allowed);
-#endif
}
void DumpRenderTreeSupport::setMockGeolocationPosition(WebPage* webPage, double latitude, double longitude, double accuracy)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- GeolocationClientMock* mockClient = toGeolocationClientMock(corePage(webPage)->geolocationController()->client());
+ GeolocationClientMock* mockClient = toGeolocationClientMock(GeolocationController::from(corePage(webPage))->client());
mockClient->setPosition(GeolocationPosition::create(currentTime(), latitude, longitude, accuracy));
-#endif
}
void DumpRenderTreeSupport::scalePageBy(WebPage* webPage, float scaleFactor, float x, float y)
@@ -165,7 +150,7 @@ JSValueRef DumpRenderTreeSupport::computedStyleIncludingVisitedInfo(JSContextRef
return JSValueMakeUndefined(context);
JSElement* jsElement = static_cast<JSElement*>(asObject(jsValue));
Element* element = jsElement->impl();
- RefPtr<CSSComputedStyleDeclaration> style = computedStyle(element, true);
+ RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(element, true);
return toRef(exec, toJS(exec, jsElement->globalObject(), style.get()));
}
diff --git a/Source/WebKit/blackberry/WebKitSupport/FatFingers.cpp b/Source/WebKit/blackberry/WebKitSupport/FatFingers.cpp
index 016a42620..fe7f848d7 100644
--- a/Source/WebKit/blackberry/WebKitSupport/FatFingers.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/FatFingers.cpp
@@ -110,7 +110,7 @@ bool FatFingers::isElementClickable(Element* element) const
// Notice, B is not a hyperlink, or form control, and does not register any mouse event handler. Then B cannot
// be clicked. Suppose B specified the CSS property "cursor: pointer". Then, B will be considered as clickable.
return hasMousePressListener(element)
- || computedStyle(element)->getPropertyValue(cssPropertyID("cursor")) == "pointer";
+ || CSSComputedStyleDeclaration::create(element)->getPropertyValue(cssPropertyID("cursor")) == "pointer";
default:
ASSERT_NOT_REACHED();
}
@@ -306,7 +306,7 @@ bool FatFingers::findIntersectingRegions(Document* document,
#if DEBUG_FAT_FINGERS
IntRect fingerRect(fingerRectForPoint(frameContentPos));
IntRect screenFingerRect = m_webPage->mapToTransformed(fingerRect);
- log(LogLevelInfo, "fat finger rect now %s", screenFingerRect.toString().latin1().data());
+ log(LogLevelInfo, "fat finger rect now %d, %d, %d, %d", screenFingerRect.x(), screenFingerRect.y(), screenFingerRect.width(), screenFingerRect.height());
// only record the first finger rect
if (document == m_webPage->m_mainFrame->document())
diff --git a/Source/WebKit/blackberry/WebKitSupport/GLES2Context.cpp b/Source/WebKit/blackberry/WebKitSupport/GLES2Context.cpp
index 55b9e15dd..06507acac 100644
--- a/Source/WebKit/blackberry/WebKitSupport/GLES2Context.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/GLES2Context.cpp
@@ -42,6 +42,8 @@
#include <GLES2/gl2.h>
+using BlackBerry::Platform::Graphics::Window;
+
namespace BlackBerry {
namespace WebKit {
@@ -72,8 +74,10 @@ PassOwnPtr<GLES2Context> GLES2Context::create(WebPagePrivate* page)
GLES2Context::GLES2Context(WebPagePrivate* page)
: m_window(0)
{
- if (page->m_client->window()->windowUsage() == Platform::Graphics::Window::GLES2Usage)
- m_window = page->m_client->window();
+ if (Window* window = page->m_client->window()) {
+ if (window->windowUsage() == Window::GLES2Usage)
+ m_window = window;
+ }
}
GLES2Context::~GLES2Context()
@@ -104,14 +108,19 @@ bool GLES2Context::swapBuffers()
{
ASSERT(glGetError() == GL_NO_ERROR);
-#if ENABLE_COMPOSITING_SURFACE
- // Because we are rendering compositing contents into an off-screen pixmap and
- // we need to blend the pixmap with the web page window surface we have to call
- // glFinish() here.
- glFinish();
+ // If there's a window the backing store will swap it when the time is right.
+ // Return early because there might be an unused but non-null compositing surface
+ if (m_window)
+ return true;
- if (BackingStoreCompositingSurface* surface = compositingSurface())
+#if ENABLE_COMPOSITING_SURFACE
+ if (BackingStoreCompositingSurface* surface = compositingSurface()) {
+ // Because we are rendering compositing contents into an off-screen pixmap and
+ // we need to blend the pixmap with the web page window surface we have to call
+ // glFinish() here.
+ glFinish();
surface->swapBuffers();
+ }
#endif
return true;
diff --git a/Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.cpp b/Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.cpp
index 09cfd55bc..c4322de57 100644
--- a/Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.cpp
@@ -24,30 +24,69 @@
#include "DocumentMarkerController.h"
#include "Editor.h"
#include "Frame.h"
+#include "Node.h"
#include "Page.h"
+#include "Range.h"
+#include "TextIterator.h"
+#include "Timer.h"
#include "WebPage_p.h"
-static const int TextMatchMarkerLimit = 100;
+static const double MaxScopingDuration = 0.1;
using namespace WebCore;
namespace BlackBerry {
namespace WebKit {
+class InPageSearchManager::DeferredScopeStringMatches {
+public:
+ DeferredScopeStringMatches(InPageSearchManager* ipsm, Frame* scopingFrame, const String& text, bool reset)
+ : m_searchManager(ipsm)
+ , m_scopingFrame(scopingFrame)
+ , m_timer(this, &DeferredScopeStringMatches::doTimeout)
+ , m_searchText(text)
+ , m_reset(reset)
+ {
+ m_timer.startOneShot(0.0);
+ }
+
+private:
+ void doTimeout(Timer<DeferredScopeStringMatches>*)
+ {
+ m_searchManager->callScopeStringMatches(this, m_scopingFrame, m_searchText, m_reset);
+ }
+ InPageSearchManager* m_searchManager;
+ Frame* m_scopingFrame;
+ Timer<DeferredScopeStringMatches> m_timer;
+ String m_searchText;
+ bool m_reset;
+};
+
InPageSearchManager::InPageSearchManager(WebPagePrivate* page)
: m_webPage(page)
, m_activeMatch(0)
+ , m_resumeScopingFromRange(0)
+ , m_activeMatchCount(0)
+ , m_scopingComplete(false)
+ , m_scopingCaseInsensitive(false)
+ , m_locatingActiveMatch(false)
+ , m_highlightAllMatches(false)
+ , m_activeMatchIndex(0)
{
}
InPageSearchManager::~InPageSearchManager()
{
+ cancelPendingScopingEffort();
}
-bool InPageSearchManager::findNextString(const String& text, bool forward)
+bool InPageSearchManager::findNextString(const String& text, FindOptions findOptions, bool wrap, bool highlightAllMatches)
{
+ m_highlightAllMatches = highlightAllMatches;
+
if (!text.length()) {
clearTextMatches();
+ cancelPendingScopingEffort();
m_activeSearchString = String();
return false;
}
@@ -61,17 +100,16 @@ bool InPageSearchManager::findNextString(const String& text, bool forward)
if (m_activeMatch && !m_activeMatch->boundaryPointsValid())
m_activeMatch = 0;
- RefPtr<Range> searchStartingPoint(m_activeMatch);
- if (m_activeSearchString != text) { // Start a new search.
+ ExceptionCode ec = 0;
+ RefPtr<Range> searchStartingPoint = m_activeMatch ? m_activeMatch->cloneRange(ec) : 0;
+ bool newSearch = m_activeSearchString != text;
+ bool forward = !(findOptions & WebCore::Backwards);
+ if (newSearch) { // Start a new search.
m_activeSearchString = text;
+ cancelPendingScopingEffort();
+ m_scopingCaseInsensitive = findOptions & CaseInsensitive;
m_webPage->m_page->unmarkAllTextMatches();
- m_activeMatchCount = m_webPage->m_page->markAllMatchesForText(text, CaseInsensitive, true /* shouldHighlight */, TextMatchMarkerLimit);
- if (!m_activeMatchCount) {
- clearTextMatches();
- return false;
- }
- } else { // Search same string for next occurrence.
- setMarkerActive(m_activeMatch.get(), false /* active */);
+ } else {
// Searching for same string should start from the end of last match.
if (m_activeMatch) {
if (forward)
@@ -90,23 +128,27 @@ bool InPageSearchManager::findNextString(const String& text, bool forward)
Frame* currentActiveMatchFrame = selection.isNone() && m_activeMatch ? m_activeMatch->ownerDocument()->frame() : m_webPage->focusedOrMainFrame();
- const FindOptions findOptions = (forward ? 0 : Backwards)
- | CaseInsensitive
- | StartInSelection;
-
- if (findAndMarkText(text, searchStartingPoint.get(), currentActiveMatchFrame, findOptions))
+ if (findAndMarkText(text, searchStartingPoint.get(), currentActiveMatchFrame, findOptions, newSearch))
return true;
Frame* startFrame = currentActiveMatchFrame;
do {
- currentActiveMatchFrame = DOMSupport::incrementFrame(currentActiveMatchFrame, forward, true /* wrapFlag */);
- if (findAndMarkText(text, 0, currentActiveMatchFrame, findOptions))
+ currentActiveMatchFrame = DOMSupport::incrementFrame(currentActiveMatchFrame, forward, wrap);
+
+ if (!currentActiveMatchFrame) {
+ // We should only ever have a null frame if we haven't found any
+ // matches and we're not wrapping. We have searched every frame.
+ ASSERT(!wrap);
+ return false;
+ }
+
+ if (findAndMarkText(text, 0, currentActiveMatchFrame, findOptions, newSearch))
return true;
- } while (currentActiveMatchFrame && startFrame != currentActiveMatchFrame);
+ } while (startFrame != currentActiveMatchFrame);
clearTextMatches();
- ASSERT_NOT_REACHED();
+ // FIXME: We need to notify client here.
return false;
}
@@ -117,7 +159,8 @@ bool InPageSearchManager::shouldSearchForText(const String& text)
// If the previous search string is prefix of new search string,
// don't search if the previous one has zero result.
- if (!m_activeMatchCount
+ if (m_scopingComplete
+ && !m_activeMatchCount
&& m_activeSearchString.length()
&& text.length() > m_activeSearchString.length()
&& m_activeSearchString == text.substring(0, m_activeSearchString.length()))
@@ -125,11 +168,27 @@ bool InPageSearchManager::shouldSearchForText(const String& text)
return true;
}
-bool InPageSearchManager::findAndMarkText(const String& text, Range* range, Frame* frame, const FindOptions& options)
+bool InPageSearchManager::findAndMarkText(const String& text, Range* range, Frame* frame, const FindOptions& options, bool isNewSearch)
{
- m_activeMatch = frame->editor()->findStringAndScrollToVisible(text, range, options);
- if (m_activeMatch) {
- setMarkerActive(m_activeMatch.get(), true /* active */);
+ if (RefPtr<Range> match = frame->editor()->findStringAndScrollToVisible(text, range, options)) {
+ // Move the highlight to the new match.
+ setActiveMatchAndMarker(match);
+
+ if (m_highlightAllMatches) {
+ // FIXME: If it is a not new search, we need to calculate activeMatchIndex and notify client.
+ if (isNewSearch)
+ scopeStringMatches(text, true /* reset */);
+ } else {
+ // When only showing single matches, cancel any scoping effort and ensure
+ // only the single active match is marked.
+ cancelPendingScopingEffort();
+ m_webPage->m_page->unmarkAllTextMatches();
+ m_activeMatch->ownerDocument()->markers()->addTextMatchMarker(m_activeMatch.get(), true);
+ frame->editor()->setMarkedTextMatchesAreHighlighted(true /* highlight */);
+ m_activeMatchCount = 1;
+ m_activeMatchIndex = 1;
+ }
+
return true;
}
return false;
@@ -139,16 +198,23 @@ void InPageSearchManager::clearTextMatches()
{
m_webPage->m_page->unmarkAllTextMatches();
m_activeMatch = 0;
+ m_activeMatchCount = 0;
+ m_activeMatchIndex = 0;
}
-void InPageSearchManager::setMarkerActive(Range* range, bool active)
+void InPageSearchManager::setActiveMatchAndMarker(PassRefPtr<Range> range)
{
- if (!range)
- return;
- Document* doc = m_activeMatch->ownerDocument();
- if (!doc)
- return;
- doc->markers()->setMarkersActive(range, active);
+ // Clear the old marker, update our range, and highlight the new range.
+ if (m_activeMatch.get()) {
+ if (Document* doc = m_activeMatch->ownerDocument())
+ doc->markers()->setMarkersActive(m_activeMatch.get(), false);
+ }
+
+ m_activeMatch = range;
+ if (m_activeMatch.get()) {
+ if (Document* doc = m_activeMatch->ownerDocument())
+ doc->markers()->setMarkersActive(m_activeMatch.get(), true);
+ }
}
void InPageSearchManager::frameUnloaded(const Frame* frame)
@@ -161,6 +227,8 @@ void InPageSearchManager::frameUnloaded(const Frame* frame)
Frame* currentActiveMatchFrame = m_activeMatch->ownerDocument()->frame();
if (currentActiveMatchFrame == frame) {
+ // FIXME: We need to re-scope this frame instead of cancelling all effort?
+ cancelPendingScopingEffort();
m_activeMatch = 0;
m_activeSearchString = String();
m_activeMatchCount = 0;
@@ -171,5 +239,100 @@ void InPageSearchManager::frameUnloaded(const Frame* frame)
}
}
+void InPageSearchManager::scopeStringMatches(const String& text, bool reset, Frame* scopingFrame)
+{
+ if (reset) {
+ m_activeMatchCount = 0;
+ m_resumeScopingFromRange = 0;
+ m_scopingComplete = false;
+ m_locatingActiveMatch = true;
+ // New search should always start from mainFrame.
+ scopeStringMatchesSoon(m_webPage->mainFrame(), text, false /* reset */);
+ return;
+ }
+
+ if (m_resumeScopingFromRange && scopingFrame != m_resumeScopingFromRange->ownerDocument()->frame())
+ m_resumeScopingFromRange = 0;
+
+ RefPtr<Range> searchRange(rangeOfContents(scopingFrame->document()));
+ Node* originalEndContainer = searchRange->endContainer();
+ int originalEndOffset = searchRange->endOffset();
+ ExceptionCode ec = 0, ec2 = 0;
+ if (m_resumeScopingFromRange) {
+ searchRange->setStart(m_resumeScopingFromRange->startContainer(), m_resumeScopingFromRange->startOffset(ec2) + 1, ec);
+ if (ec || ec2) {
+ m_scopingComplete = true; // We should stop scoping because of some stale data.
+ return;
+ }
+ }
+
+ int matchCount = 0;
+ bool timeout = false;
+ double startTime = currentTime();
+ do {
+ RefPtr<Range> resultRange(findPlainText(searchRange.get(), text, m_scopingCaseInsensitive ? CaseInsensitive : 0));
+ if (resultRange->collapsed(ec)) {
+ if (!resultRange->startContainer()->isInShadowTree())
+ break;
+ searchRange->setStartAfter(resultRange->startContainer()->shadowAncestorNode(), ec);
+ searchRange->setEnd(originalEndContainer, originalEndOffset, ec);
+ continue;
+ }
+
+ if (scopingFrame->editor()->insideVisibleArea(resultRange.get())) {
+ ++matchCount;
+ bool foundActiveMatch = false;
+ if (m_locatingActiveMatch && areRangesEqual(resultRange.get(), m_activeMatch.get())) {
+ foundActiveMatch = true;
+ m_locatingActiveMatch = false;
+ m_activeMatchIndex = m_activeMatchCount + matchCount;
+ // FIXME: We need to notify client with m_activeMatchIndex.
+ }
+ resultRange->ownerDocument()->markers()->addTextMatchMarker(resultRange.get(), foundActiveMatch);
+ }
+ searchRange->setStart(resultRange->endContainer(ec), resultRange->endOffset(ec), ec);
+ Node* shadowTreeRoot = searchRange->shadowTreeRootNode();
+ if (searchRange->collapsed(ec) && shadowTreeRoot)
+ searchRange->setEnd(shadowTreeRoot, shadowTreeRoot->childNodeCount(), ec);
+ m_resumeScopingFromRange = resultRange;
+ timeout = (currentTime() - startTime) >= MaxScopingDuration;
+ } while (!timeout);
+
+ if (matchCount > 0) {
+ scopingFrame->editor()->setMarkedTextMatchesAreHighlighted(true /* highlight */);
+ m_activeMatchCount += matchCount;
+ }
+
+ if (timeout)
+ scopeStringMatchesSoon(scopingFrame, text, false /* reset */);
+ else {
+ // Scoping is done for this frame.
+ Frame* nextFrame = DOMSupport::incrementFrame(scopingFrame, true /* forward */, false /* wrapFlag */);
+ if (!nextFrame) {
+ m_scopingComplete = true;
+ return; // Scoping is done for all frames;
+ }
+ scopeStringMatchesSoon(nextFrame, text, false /* reset */);
+ }
+}
+
+void InPageSearchManager::scopeStringMatchesSoon(Frame* scopingFrame, const String& text, bool reset)
+{
+ m_deferredScopingWork.append(new DeferredScopeStringMatches(this, scopingFrame, text, reset));
+}
+
+void InPageSearchManager::callScopeStringMatches(DeferredScopeStringMatches* caller, Frame* scopingFrame, const String& text, bool reset)
+{
+ m_deferredScopingWork.remove(m_deferredScopingWork.find(caller));
+ scopeStringMatches(text, reset, scopingFrame);
+ delete caller;
+}
+
+void InPageSearchManager::cancelPendingScopingEffort()
+{
+ deleteAllValues(m_deferredScopingWork);
+ m_deferredScopingWork.clear();
+}
+
}
}
diff --git a/Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.h b/Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.h
index 4b0562b17..f48bb8e29 100644
--- a/Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.h
+++ b/Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.h
@@ -39,19 +39,33 @@ public:
InPageSearchManager(WebPagePrivate*);
~InPageSearchManager();
- bool findNextString(const String& text, bool forward);
+ bool findNextString(const String&, WebCore::FindOptions, bool wrap, bool highlightAllMatches);
void frameUnloaded(const WebCore::Frame*);
private:
+ class DeferredScopeStringMatches;
+ friend class DeferredScopeStringMatches;
+
void clearTextMatches();
- void setMarkerActive(WebCore::Range*, bool);
- bool findAndMarkText(const String&, WebCore::Range*, WebCore::Frame*, const WebCore::FindOptions&);
+ void setActiveMatchAndMarker(PassRefPtr<WebCore::Range>);
+ bool findAndMarkText(const String&, WebCore::Range*, WebCore::Frame*, const WebCore::FindOptions&, bool);
bool shouldSearchForText(const String&);
+ void scopeStringMatches(const String& text, bool reset, WebCore::Frame* scopingFrame = 0);
+ void scopeStringMatchesSoon(WebCore::Frame* scopingFrame, const String& text, bool reset);
+ void callScopeStringMatches(DeferredScopeStringMatches* caller, WebCore::Frame* scopingFrame, const String& text, bool reset);
+ void cancelPendingScopingEffort();
+ Vector<DeferredScopeStringMatches*> m_deferredScopingWork;
WebPagePrivate* m_webPage;
RefPtr<WebCore::Range> m_activeMatch;
+ RefPtr<WebCore::Range> m_resumeScopingFromRange;
String m_activeSearchString;
int m_activeMatchCount;
+ bool m_scopingComplete;
+ bool m_scopingCaseInsensitive;
+ bool m_locatingActiveMatch;
+ bool m_highlightAllMatches;
+ int m_activeMatchIndex;
};
}
diff --git a/Source/WebKit/blackberry/WebKitSupport/InRegionScrollableArea.cpp b/Source/WebKit/blackberry/WebKitSupport/InRegionScrollableArea.cpp
index 5eac31a30..f9fb74882 100644
--- a/Source/WebKit/blackberry/WebKitSupport/InRegionScrollableArea.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/InRegionScrollableArea.cpp
@@ -61,7 +61,7 @@ InRegionScrollableArea::InRegionScrollableArea(WebPagePrivate* webPage, RenderLa
m_scrollPosition = m_webPage->mapToTransformed(view->scrollPosition());
m_contentsSize = m_webPage->mapToTransformed(view->contentsSize());
- m_viewportRect = m_webPage->mapToTransformed(view->visibleContentRect(false /*includeScrollbars*/));
+ m_viewportSize = m_webPage->mapToTransformed(view->visibleContentRect(false /*includeScrollbars*/)).size();
m_visibleWindowRect = m_webPage->mapToTransformed(m_webPage->getRecursiveVisibleWindowRect(view));
IntRect transformedWindowRect = IntRect(IntPoint::zero(), m_webPage->transformedViewportSize());
@@ -87,7 +87,7 @@ InRegionScrollableArea::InRegionScrollableArea(WebPagePrivate* webPage, RenderLa
ScrollableArea* scrollableArea = static_cast<ScrollableArea*>(m_layer);
m_scrollPosition = m_webPage->mapToTransformed(scrollableArea->scrollPosition());
m_contentsSize = m_webPage->mapToTransformed(scrollableArea->contentsSize());
- m_viewportRect = m_webPage->mapToTransformed(scrollableArea->visibleContentRect(false /*includeScrollbars*/));
+ m_viewportSize = m_webPage->mapToTransformed(scrollableArea->visibleContentRect(false /*includeScrollbars*/)).size();
m_visibleWindowRect = m_layer->renderer()->absoluteClippedOverflowRect();
m_visibleWindowRect = m_layer->renderer()->frame()->view()->contentsToWindow(m_visibleWindowRect);
diff --git a/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp b/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
index a3362287f..526dcf3cf 100644
--- a/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
@@ -109,6 +109,7 @@ private:
InputHandler::InputHandler(WebPagePrivate* page)
: m_webPage(page)
, m_currentFocusElement(0)
+ , m_inputModeEnabled(false)
, m_processingChange(false)
, m_changingFocus(false)
, m_currentFocusElementType(TextEdit)
@@ -140,7 +141,7 @@ static BlackBerryInputType convertInputType(const HTMLInputElement* inputElement
return InputTypeTelephone;
if (inputElement->isURLField())
return InputTypeURL;
-#if ENABLE(INPUT_COLOR)
+#if ENABLE(INPUT_TYPE_COLOR)
if (inputElement->isColorControl())
return InputTypeColor;
#endif
@@ -153,6 +154,14 @@ static BlackBerryInputType convertInputType(const HTMLInputElement* inputElement
if (inputElement->isTimeControl())
return InputTypeTime;
// FIXME: missing WEEK popup selector
+ if (DOMSupport::elementIdOrNameIndicatesEmail(inputElement))
+ return InputTypeEmail;
+ if (DOMSupport::elementIdOrNameIndicatesUrl(inputElement))
+ return InputTypeURL;
+ if (DOMSupport::elementPatternIndicatesNumber(inputElement))
+ return InputTypeNumber;
+ if (DOMSupport::elementPatternIndicatesHexadecimal(inputElement))
+ return InputTypeHexadecimal;
return InputTypeText;
}
@@ -160,15 +169,18 @@ static BlackBerryInputType convertInputType(const HTMLInputElement* inputElement
static int inputStyle(BlackBerryInputType type, const Element* element)
{
switch (type) {
- case InputTypeText:
+ case InputTypeEmail:
+ case InputTypeURL:
case InputTypeSearch:
+ case InputTypeText:
case InputTypeTextArea:
{
// Regular input mode, disable help if autocomplete is off.
int imfMask = 0;
- if (DOMSupport::elementSupportsAutocomplete(element) == DOMSupport::Off)
+ DOMSupport::AttributeState autoCompleteState = DOMSupport::elementSupportsAutocomplete(element);
+ if (autoCompleteState == DOMSupport::Off)
imfMask = NO_AUTO_TEXT | NO_PREDICTION;
- else if (DOMSupport::elementSupportsAutocomplete(element) != DOMSupport::On
+ else if (autoCompleteState != DOMSupport::On
&& DOMSupport::elementIdOrNameIndicatesNoAutocomplete(element))
imfMask = NO_AUTO_TEXT | NO_PREDICTION;
@@ -180,14 +192,15 @@ static int inputStyle(BlackBerryInputType type, const Element* element)
if (imfMask)
return imfMask;
+ if ((type == InputTypeEmail || type == InputTypeURL) && autoCompleteState != DOMSupport::On)
+ return NO_AUTO_TEXT | NO_PREDICTION | NO_AUTO_CORRECTION;
break;
}
case InputTypeIsIndex:
case InputTypePassword:
- case InputTypeEmail:
case InputTypeNumber:
case InputTypeTelephone:
- case InputTypeURL:
+ case InputTypeHexadecimal:
// Disable special handling.
return NO_AUTO_TEXT | NO_PREDICTION | NO_AUTO_CORRECTION;
default:
@@ -385,7 +398,7 @@ void InputHandler::learnText()
if (textInField.isEmpty())
return;
- InputLog(LogLevelInfo, "InputHandler::learnText %s", textInField.latin1().data());
+ InputLog(LogLevelInfo, "InputHandler::learnText '%s'", textInField.latin1().data());
sendLearnTextDetails(textInField);
}
@@ -406,6 +419,10 @@ void InputHandler::setElementUnfocused(bool refocusOccuring)
m_webPage->m_client->inputFocusLost();
m_webPage->m_selectionHandler->selectionPositionChanged();
+
+ // If the frame selection isn't focused, focus it.
+ if (!m_currentFocusElement->document()->frame()->selection()->isFocused())
+ m_currentFocusElement->document()->frame()->selection()->setFocused(true);
}
// Clear the node details.
@@ -413,43 +430,22 @@ void InputHandler::setElementUnfocused(bool refocusOccuring)
m_currentFocusElementType = TextEdit;
}
-bool InputHandler::shouldAcceptInputFocus()
+void InputHandler::enableInputMode(bool inputModeAllowed)
{
- // If the DRT is running, always accept focus.
- if (m_webPage->m_dumpRenderTree)
- return true;
+ FocusLog(LogLevelInfo, "InputHandler::enableInputMode '%s', override is '%s'"
+ , inputModeAllowed ? "true" : "false"
+ , m_webPage->m_dumpRenderTree || Platform::Settings::get()->alwaysShowKeyboardOnFocus() ? "true" : "false");
- if (Platform::Settings::get()->alwaysShowKeyboardOnFocus()) {
- FocusLog(LogLevelInfo, "InputHandler::shouldAcceptInputFocus alwaysShowKeyboardOnFocus is active.");
- return true;
- }
+ m_inputModeEnabled = inputModeAllowed;
- Frame* focusedFrame = m_webPage->focusedOrMainFrame();
- if (!focusedFrame) {
- FocusLog(LogLevelInfo, "InputHandler::shouldAcceptInputFocus Frame not valid.");
- return false;
- }
-
- // Any user action should be respected. Mouse will be down when touch is
- // used to focus.
- if (focusedFrame->eventHandler()->mousePressed()) {
- FocusLog(LogLevelInfo, "InputHandler::shouldAcceptInputFocus Mouse is pressed focusing.");
- return true;
- }
-
- if (!m_webPage->m_client->hasKeyboardFocus()) {
- FocusLog(LogLevelInfo, "InputHandler::shouldAcceptInputFocus Client does not have input focus.");
- return false;
- }
-
- if (m_webPage->isLoading()) {
- FocusLog(LogLevelInfo, "InputHandler::shouldAcceptInputFocus Webpage is loading.");
- return false;
- }
+ // If DRT is running or always show keyboard setting is active, do not delay
+ // showing the keyboard.
+ if (m_webPage->m_dumpRenderTree || Platform::Settings::get()->alwaysShowKeyboardOnFocus())
+ m_inputModeEnabled = true;
- // Make sure the focused frame is not processing load events.
- FocusLog(LogLevelInfo, "InputHandler::shouldAcceptInputFocus returning state of processingLoadEvent (%s).", !focusedFrame->document()->processingLoadEvent() ? "true" : "false");
- return !focusedFrame->document()->processingLoadEvent();
+ // If the frame selection isn't focused, focus it.
+ if (m_inputModeEnabled && isActiveTextEdit() && !m_currentFocusElement->document()->frame()->selection()->isFocused())
+ m_currentFocusElement->document()->frame()->selection()->setFocused(true);
}
void InputHandler::setElementFocused(Element* element)
@@ -457,17 +453,8 @@ void InputHandler::setElementFocused(Element* element)
ASSERT(DOMSupport::isTextBasedContentEditableElement(element));
ASSERT(element->document() && element->document()->frame());
- if (!m_changingFocus && !shouldAcceptInputFocus()) {
- // Remove the focus from this element, but guard against recursion by
- // allowing a refocus during the blur to continue.
- // THIS IS A HACK that needs to be fixed. Instead of blur the field,
- // the frame or frame selection should be blurred. Google bypasses these
- // though so it can't be done right now.
- m_changingFocus = true;
- element->blur();
- m_changingFocus = false;
- return;
- }
+ if (element->document()->frame()->selection()->isFocused() != m_inputModeEnabled)
+ element->document()->frame()->selection()->setFocused(m_inputModeEnabled);
// Clear the existing focus node details.
setElementUnfocused(true /*refocusOccuring*/);
@@ -481,12 +468,12 @@ void InputHandler::setElementFocused(Element* element)
m_currentFocusElementTextEditMask = inputStyle(type, element);
FocusLog(LogLevelInfo, "InputHandler::setElementFocused, Type=%d, Style=%d", type, m_currentFocusElementTextEditMask);
-
- m_webPage->m_client->inputFocusGained(type,
- m_currentFocusElementTextEditMask,
- m_delayKeyboardVisibilityChange /* wait for explicit keyboard show call */);
+ m_webPage->m_client->inputFocusGained(type, m_currentFocusElementTextEditMask);
handleInputLocaleChanged(m_webPage->m_webSettings->isWritingDirectionRTL());
+
+ if (!m_delayKeyboardVisibilityChange)
+ notifyClientOfKeyboardVisibilityChange(true);
}
bool InputHandler::openDatePopup(HTMLInputElement* element, BlackBerryInputType type)
@@ -550,9 +537,20 @@ void InputHandler::nodeTextChanged(const Node* node)
removeAttributedTextMarker();
}
+WebCore::IntRect InputHandler::boundingBoxForInputField()
+{
+ if (!isActiveTextEdit())
+ return WebCore::IntRect();
+
+ if (!m_currentFocusElement->renderer())
+ return WebCore::IntRect();
+
+ return m_currentFocusElement->renderer()->absoluteBoundingBoxRect();
+}
+
void InputHandler::ensureFocusTextElementVisible(CaretScrollType scrollType)
{
- if (!m_currentFocusElement || !m_currentFocusElement->document())
+ if (!m_inputModeEnabled || !m_currentFocusElement || !m_currentFocusElement->document())
return;
if (!Platform::Settings::get()->allowCenterScrollAdjustmentForInputFields() && scrollType != EdgeIfNeeded)
@@ -638,12 +636,27 @@ void InputHandler::ensureFocusTextElementVisible(CaretScrollType scrollType)
}
// Pad the rect to improve the visual appearance.
- selectionFocusRect.inflate(4 /* padding in pixels */);
+ // Padding must be large enough to expose the selection / FCC should they exist. Dragging the handle offscreen and releasing
+ // will not trigger an automatic scroll. Using a padding of 40 will fully exposing the width of the current handle and half of
+ // the height making it usable.
+ // FIXME: This will need to be updated when the graphics change.
+ // FIXME: The value of 40 should be calculated as a unit of measure using Graphics::Screen::primaryScreen()->heightInMMToPixels
+ // using a relative value to the size of the handle. We should also consider expanding different amounts horizontally vs vertically.
+ selectionFocusRect.inflate(40 /* padding in pixels */);
WebCore::IntRect revealRect = layer->getRectToExpose(actualScreenRect, selectionFocusRect,
horizontalScrollAlignment,
verticalScrollAlignment);
- mainFrameView->setScrollPosition(revealRect.location());
+ mainFrameView->setConstrainsScrollingToContentEdge(false);
+ // In order to adjust the scroll position to ensure the focused input field is visible,
+ // we allow overscrolling. However this overscroll has to be strictly allowed towards the
+ // bottom of the page on the y axis only, where the virtual keyboard pops up from.
+ WebCore::IntPoint scrollLocation = revealRect.location();
+ scrollLocation.clampNegativeToZero();
+ WebCore::IntPoint maximumScrollPosition = WebCore::IntPoint(mainFrameView->contentsWidth() - actualScreenRect.width(), mainFrameView->contentsHeight() - actualScreenRect.height());
+ scrollLocation = scrollLocation.shrunkTo(maximumScrollPosition);
+ mainFrameView->setScrollPosition(scrollLocation);
+ mainFrameView->setConstrainsScrollingToContentEdge(true);
}
}
@@ -754,6 +767,10 @@ void InputHandler::processPendingKeyboardVisibilityChange()
void InputHandler::notifyClientOfKeyboardVisibilityChange(bool visible)
{
+ // If we aren't ready for input, keyboard changes should be ignored.
+ if (!m_inputModeEnabled && visible)
+ return;
+
if (!m_delayKeyboardVisibilityChange) {
m_webPage->showVirtualKeyboard(visible);
return;
@@ -909,6 +926,9 @@ bool InputHandler::handleKeyboardInput(const Platform::KeyboardEvent& keyboardEv
{
InputLog(LogLevelInfo, "InputHandler::handleKeyboardInput received character=%lc, type=%d", keyboardEvent.character(), keyboardEvent.type());
+ // Enable input mode if we are processing a key event.
+ enableInputMode();
+
// If we aren't specifically part of a composition, fail, IMF should never send key input
// while composing text. If IMF has failed, we should have already finished the
// composition manually.
@@ -1169,7 +1189,7 @@ void InputHandler::setPopupListIndex(int index)
clearCurrentFocusElement();
}
-void InputHandler::setPopupListIndexes(int size, bool* selecteds)
+void InputHandler::setPopupListIndexes(int size, const bool* selecteds)
{
if (!isActiveSelectPopup())
return clearCurrentFocusElement();
@@ -1317,6 +1337,7 @@ spannable_string_t* InputHandler::spannableTextInRange(int start, int end, int32
pst->length = stringLength;
pst->spans_count = 0;
pst->spans = 0;
+
return pst;
}
@@ -1516,6 +1537,8 @@ bool InputHandler::setText(spannable_string_t* spannableString)
String textToInsert = convertSpannableStringToString(spannableString);
int textLength = textToInsert.length();
+ InputLog(LogLevelInfo, "InputHandler::setText spannableString is '%s', of length %d \n", textToInsert.latin1().data(), textLength);
+
span_t* changedSpan = firstSpanInString(spannableString, CHANGED_ATTRIB);
int composingTextStart = m_composingTextStart;
int composingTextEnd = m_composingTextEnd;
@@ -1524,19 +1547,26 @@ bool InputHandler::setText(spannable_string_t* spannableString)
if (isTrailingSingleCharacter(changedSpan, textLength, composingTextLength)) {
// Handle the case where text is being composed.
- if (firstSpanInString(spannableString, COMPOSED_TEXT_ATTRIB))
+ if (firstSpanInString(spannableString, COMPOSED_TEXT_ATTRIB)) {
+ InputLog(LogLevelInfo, "InputHandler::setText Single trailing character detected. Text is being composed. \n");
return editor->command("InsertText").execute(textToInsert.right(1));
+ }
+ InputLog(LogLevelInfo, "InputHandler::setText Single trailing character detected. Text is not being composed. \n");
return handleKeyboardInput(Platform::KeyboardEvent(textToInsert[textLength - 1], Platform::KeyboardEvent::KeyChar, 0), false /* changeIsPartOfComposition */);
}
// If no spans have changed, treat it as a delete operation.
if (!changedSpan) {
// If the composition length is the same as our string length, then we don't need to do anything.
- if (composingTextLength == textLength)
+ if (composingTextLength == textLength) {
+ InputLog(LogLevelInfo, "InputHandler::setText No spans have changed. New text is the same length as the old. Nothing to do. \n");
return true;
+ }
- if (composingTextLength - textLength == 1)
+ if (composingTextLength - textLength == 1) {
+ InputLog(LogLevelInfo, "InputHandler::setText No spans have changed. New text is one character shorter than the old. Treating as 'delete'. \n");
return editor->command("DeleteBackward").execute();
+ }
}
if (composingTextLength && !setSelection(composingTextStart, composingTextEnd, true /* changeIsPartOfComposition */))
@@ -1551,8 +1581,6 @@ bool InputHandler::setText(spannable_string_t* spannableString)
return true;
}
- InputLog(LogLevelInfo, "setText spannableString is %s, %d \n", textToInsert.latin1().data(), textLength);
-
// Triggering an insert of the text with a space character trailing
// causes new text to adopt the previous text style.
// Remove it and apply it as a keypress later.
@@ -1564,27 +1592,25 @@ bool InputHandler::setText(spannable_string_t* spannableString)
textToInsert.remove(textLength, 1);
}
- InputLog(LogLevelInfo, "InputHandler::setText Request being processed Text before %s", elementText().latin1().data());
+ InputLog(LogLevelInfo, "InputHandler::setText Request being processed. Text before processing: '%s'", elementText().latin1().data());
if (textLength == 1 && !spannableString->spans_count) {
// Handle single key non-attributed entry as key press rather than insert to allow
// triggering of javascript events.
-
+ InputLog(LogLevelInfo, "InputHandler::setText Single character entry treated as key-press in the absense of spans. \n");
return handleKeyboardInput(Platform::KeyboardEvent(textToInsert[0], Platform::KeyboardEvent::KeyChar, 0), true /* changeIsPartOfComposition */);
}
// Perform the text change as a single command if there is one.
if (!textToInsert.isEmpty() && !editor->command("InsertText").execute(textToInsert)) {
- InputLog(LogLevelWarn, "InputHandler::setText Failed to insert text %s", textToInsert.latin1().data());
+ InputLog(LogLevelWarn, "InputHandler::setText Failed to insert text '%s'", textToInsert.latin1().data());
return false;
}
- InputLog(LogLevelInfo, "InputHandler::setText Request being processed Text after insert %s", elementText().latin1().data());
-
if (requiresSpaceKeyPress)
handleKeyboardInput(Platform::KeyboardEvent(32 /* space */, Platform::KeyboardEvent::KeyChar, 0), true /* changeIsPartOfComposition */);
- InputLog(LogLevelInfo, "InputHandler::setText Text after %s", elementText().latin1().data());
+ InputLog(LogLevelInfo, "InputHandler::setText Request being processed. Text after processing '%s'", elementText().latin1().data());
return true;
}
@@ -1689,6 +1715,9 @@ int32_t InputHandler::setComposingText(spannable_string_t* spannableString, int3
InputLog(LogLevelInfo, "InputHandler::setComposingText at relativeCursorPosition: %d", relativeCursorPosition);
+ // Enable input mode if we are processing a key event.
+ enableInputMode();
+
return setSpannableTextAndRelativeCursor(spannableString, relativeCursorPosition, true /* markTextAsComposing */) ? 0 : -1;
}
diff --git a/Source/WebKit/blackberry/WebKitSupport/InputHandler.h b/Source/WebKit/blackberry/WebKitSupport/InputHandler.h
index 94c93ff30..c63344724 100644
--- a/Source/WebKit/blackberry/WebKitSupport/InputHandler.h
+++ b/Source/WebKit/blackberry/WebKitSupport/InputHandler.h
@@ -57,6 +57,8 @@ public:
enum FocusElementType { TextEdit, TextPopup /* Date/Time & Color */, SelectPopup, Plugin };
enum CaretScrollType { CenterAlways, CenterIfNeeded, EdgeIfNeeded };
+ void enableInputMode(bool inputModeAllowed = true);
+
void focusedNodeChanged();
void nodeTextChanged(const WebCore::Node*);
void selectionChanged();
@@ -93,13 +95,15 @@ public:
bool openLineInputPopup(WebCore::HTMLInputElement*);
bool openSelectPopup(WebCore::HTMLSelectElement*);
void setPopupListIndex(int);
- void setPopupListIndexes(int size, bool* selecteds);
+ void setPopupListIndexes(int size, const bool* selecteds);
bool processingChange() const { return m_processingChange; }
void setProcessingChange(bool processingChange) { m_processingChange = processingChange; }
WTF::String elementText();
+ WebCore::IntRect boundingBoxForInputField();
+
// IMF driven calls.
bool setBatchEditingActive(bool);
bool setSelection(int start, int end, bool changeIsPartOfComposition = false);
@@ -116,8 +120,6 @@ public:
int32_t setComposingText(spannable_string_t*, int32_t relativeCursorPosition);
int32_t commitText(spannable_string_t*, int32_t relativeCursorPosition);
- bool shouldAcceptInputFocus();
-
private:
enum PendingKeyboardStateChange { NoChange, Visible, NotVisible };
@@ -177,6 +179,7 @@ private:
WebPagePrivate* m_webPage;
RefPtr<WebCore::Element> m_currentFocusElement;
+ bool m_inputModeEnabled;
bool m_processingChange;
bool m_changingFocus;
diff --git a/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp b/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp
index 8385deeda..b65babaee 100644
--- a/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp
@@ -24,6 +24,7 @@
#include "Editor.h"
#include "EditorClient.h"
#include "FatFingers.h"
+#include "FloatQuad.h"
#include "Frame.h"
#include "FrameSelection.h"
#include "FrameView.h"
@@ -47,6 +48,8 @@
#include <sys/keycodes.h>
+// Note: This generates a lot of logs when dumping rects lists. It will seriously
+// impact performance. Do not enable this during performance tests.
#define SHOWDEBUG_SELECTIONHANDLER 0
using namespace BlackBerry::Platform;
@@ -91,17 +94,29 @@ WebString SelectionHandler::selectedText() const
return m_webPage->focusedOrMainFrame()->editor()->selectedText();
}
-void SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection(const VisibleSelection& selection, IntRectRegion& region) const
+WebCore::IntRect SelectionHandler::clippingRectForVisibleContent() const
{
- ASSERT(region.isEmpty());
-
- if (!selection.isRange())
- return;
+ // Get the containing content rect for the frame.
+ Frame* frame = m_webPage->focusedOrMainFrame();
+ WebCore::IntRect clipRect = WebCore::IntRect(WebCore::IntPoint(0, 0), m_webPage->contentsSize());
+ if (frame != m_webPage->mainFrame()) {
+ clipRect = m_webPage->getRecursiveVisibleWindowRect(frame->view(), true /* no clip to main frame window */);
+ clipRect = m_webPage->m_mainFrame->view()->windowToContents(clipRect);
+ }
- ASSERT(selection.firstRange());
+ // Get the input field containing box.
+ WebCore::IntRect inputBoundingBox = m_webPage->m_inputHandler->boundingBoxForInputField();
+ if (!inputBoundingBox.isEmpty()) {
+ // Adjust the bounding box to the frame offset.
+ inputBoundingBox = m_webPage->mainFrame()->view()->windowToContents(frame->view()->contentsToWindow(inputBoundingBox));
+ clipRect.intersect(inputBoundingBox);
+ }
+ return clipRect;
+}
- Vector<FloatQuad> quadList;
- DOMSupport::visibleTextQuads(*(selection.firstRange()), quadList, true /* use selection height */);
+void SelectionHandler::regionForTextQuads(Vector<FloatQuad> &quadList, IntRectRegion& region, bool shouldClipToVisibleContent) const
+{
+ ASSERT(region.isEmpty());
if (!quadList.isEmpty()) {
FrameView* frameView = m_webPage->focusedOrMainFrame()->view();
@@ -112,15 +127,26 @@ void SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection(const Visibl
// framePosition is in main frame coordinates.
WebCore::IntPoint framePosition = m_webPage->frameOffset(m_webPage->focusedOrMainFrame());
- // The ranges rect list is based on render elements and may include multiple adjacent rects.
- // Use IntRectRegion to consolidate these rects into bands as well as a container to pass
- // to the client.
+ // Get the visibile content rect.
+ WebCore::IntRect clippingRect = shouldClipToVisibleContent ? clippingRectForVisibleContent() : WebCore::IntRect(-1, -1, 0, 0);
+
+ // Convert the text quads into a more platform friendy
+ // IntRectRegion and adjust for subframes.
+ Platform::IntRect selectionBoundingBox;
+ std::vector<Platform::IntRect> adjustedIntRects;
for (unsigned i = 0; i < quadList.size(); i++) {
WebCore::IntRect enclosingRect = quadList[i].enclosingBoundingBox();
enclosingRect.intersect(frameRect);
enclosingRect.move(framePosition.x(), framePosition.y());
- region = unionRegions(region, IntRectRegion(enclosingRect));
+
+ // Clip to the visible content.
+ if (clippingRect.location() != DOMSupport::InvalidPoint)
+ enclosingRect.intersect(clippingRect);
+
+ adjustedIntRects.push_back(enclosingRect);
+ selectionBoundingBox = unionOfRects(enclosingRect, selectionBoundingBox);
}
+ region = IntRectRegion(selectionBoundingBox, adjustedIntRects.size(), adjustedIntRects);
}
}
@@ -135,7 +161,7 @@ static VisiblePosition visiblePositionForPointIgnoringClipping(const Frame& fram
HitTestResult result = frame.eventHandler()->hitTestResultAtPoint(framePoint, true /* allowShadowContent */, true /* ignoreClipping */);
Node* node = result.innerNode();
- if (!node)
+ if (!node || node->document() != frame.document())
return VisiblePosition();
RenderObject* renderer = node->renderer();
@@ -447,24 +473,31 @@ void SelectionHandler::setSelection(const WebCore::IntPoint& start, const WebCor
if (!controller->selection().isBaseFirst())
controller->setSelection(VisibleSelection(controller->selection().start(), controller->selection().end(), true /* isDirectional */));
+ // We don't return early in the following, so that we can do input field scrolling if the
+ // handle is outside the bounds of the field. This can be extended to handle sub-region
+ // scrolling as well
if (startIsValid) {
relativeStart = DOMSupport::convertPointToFrame(m_webPage->mainFrame(), focusedFrame, start);
- // Set the selection with validation.
- newSelection.setBase(visiblePositionForPointIgnoringClipping(*focusedFrame, clipPointToVisibleContainer(start)));
-
- // Reset the selection using the existing extent without validation.
- newSelection.setWithoutValidation(newSelection.base(), controller->selection().end());
+ VisiblePosition base = visiblePositionForPointIgnoringClipping(*focusedFrame, clipPointToVisibleContainer(start));
+ if (base.isNotNull()) {
+ // The function setBase validates the "base"
+ newSelection.setBase(base);
+ newSelection.setWithoutValidation(newSelection.base(), controller->selection().end());
+ // Don't return early.
+ }
}
if (m_lastUpdatedEndPointIsValid) {
relativeEnd = DOMSupport::convertPointToFrame(m_webPage->mainFrame(), focusedFrame, end);
- // Set the selection with validation.
- newSelection.setExtent(visiblePositionForPointIgnoringClipping(*focusedFrame, clipPointToVisibleContainer(end)));
-
- // Reset the selection using the existing base without validation.
- newSelection.setWithoutValidation(controller->selection().start(), newSelection.extent());
+ VisiblePosition extent = visiblePositionForPointIgnoringClipping(*focusedFrame, clipPointToVisibleContainer(end));
+ if (extent.isNotNull()) {
+ // The function setExtent validates the "extent"
+ newSelection.setExtent(extent);
+ newSelection.setWithoutValidation(controller->selection().start(), newSelection.extent());
+ // Don't return early.
+ }
}
newSelection.setIsDirectional(true);
@@ -482,22 +515,24 @@ void SelectionHandler::setSelection(const WebCore::IntPoint& start, const WebCor
// If the selection size is reduce to less than a character, selection type becomes
// Caret. As long as it is still a range, it's a valid selection. Selection cannot
// be cancelled through this function.
- IntRectRegion region;
- getConsolidatedRegionOfTextQuadsForSelection(newSelection, region);
- clipRegionToVisibleContainer(region);
- if (!region.isEmpty()) {
+ Vector<FloatQuad> quads;
+ DOMSupport::visibleTextQuads(newSelection, quads);
+
+ IntRectRegion unclippedRegion;
+ regionForTextQuads(quads, unclippedRegion, false /* shouldClipToVisibleContent */);
+ if (!unclippedRegion.isEmpty()) {
// Check if the handles reversed position.
if (m_selectionActive && !newSelection.isBaseFirst())
m_webPage->m_client->notifySelectionHandlesReversed();
controller->setSelection(newSelection);
- DEBUG_SELECTION(LogLevelInfo, "SelectionHandler::setSelection selection points valid, selection updated");
+ DEBUG_SELECTION(LogLevelInfo, "SelectionHandler::setSelection selection points valid, selection updated\n");
} else {
// Requested selection results in an empty selection, skip this change.
selectionPositionChanged();
- DEBUG_SELECTION(LogLevelWarn, "SelectionHandler::setSelection selection points invalid, selection not updated");
+ DEBUG_SELECTION(LogLevelWarn, "SelectionHandler::setSelection selection points invalid, selection not updated\n");
}
}
@@ -734,33 +769,6 @@ static void adjustCaretRects(WebCore::IntRect& startCaret, bool isStartCaretClip
}
}
-void SelectionHandler::clipRegionToVisibleContainer(IntRectRegion& region)
-{
- ASSERT(m_webPage->m_mainFrame && m_webPage->m_mainFrame->view());
-
- Frame* frame = m_webPage->focusedOrMainFrame();
-
- // Don't allow the region to extend outside of the all its ancestor frames' visible area.
- if (frame != m_webPage->mainFrame()) {
- WebCore::IntRect containingContentRect;
- containingContentRect = m_webPage->getRecursiveVisibleWindowRect(frame->view(), true /* no clip to main frame window */);
- containingContentRect = m_webPage->m_mainFrame->view()->windowToContents(containingContentRect);
- region = intersectRegions(IntRectRegion(containingContentRect), region);
- }
-
- // Don't allow the region to extend outside of the input field.
- if (m_webPage->m_inputHandler->isInputMode()
- && frame->document()->focusedNode()
- && frame->document()->focusedNode()->renderer()) {
-
- // Adjust the bounding box to the frame offset.
- WebCore::IntRect boundingBox(frame->document()->focusedNode()->renderer()->absoluteBoundingBoxRect());
- boundingBox = m_webPage->mainFrame()->view()->windowToContents(frame->view()->contentsToWindow(boundingBox));
-
- region = intersectRegions(IntRectRegion(boundingBox), region);
- }
-}
-
WebCore::IntPoint SelectionHandler::clipPointToVisibleContainer(const WebCore::IntPoint& point) const
{
ASSERT(m_webPage->m_mainFrame && m_webPage->m_mainFrame->view());
@@ -794,6 +802,36 @@ static WebCore::IntPoint referencePoint(const VisiblePosition& position, const W
return caretComparisonPointForRect(startCaretBounds, isStartCaret, isRTL);
}
+// Check all rects in the region for a point match. The region is non-banded
+// and non-sorted so all must be checked.
+static bool regionRectListContainsPoint(const IntRectRegion& region, const WebCore::IntPoint& point)
+{
+ if (!region.extents().contains(point))
+ return false;
+
+ std::vector<Platform::IntRect> rectList = region.rects();
+ for (unsigned int i = 0; i < rectList.size(); i++) {
+ if (rectList[i].contains(point))
+ return true;
+ }
+ return false;
+}
+
+bool SelectionHandler::inputNodeOverridesTouch() const
+{
+ if (!m_webPage->m_inputHandler->isInputMode())
+ return false;
+
+ Node* focusedNode = m_webPage->focusedOrMainFrame()->document()->focusedNode();
+ if (!focusedNode || !focusedNode->isElementNode())
+ return false;
+
+ // TODO consider caching this in InputHandler so it is only calculated once per focus.
+ DEFINE_STATIC_LOCAL(QualifiedName, selectionTouchOverrideAttr, (nullAtom, "data-blackberry-end-selection-on-touch", nullAtom));
+ Element* element = static_cast<Element*>(focusedNode);
+ return DOMSupport::elementAttributeState(element, selectionTouchOverrideAttr) == DOMSupport::On;
+}
+
// Note: This is the only function in SelectionHandler in which the coordinate
// system is not entirely WebKit.
void SelectionHandler::selectionPositionChanged(bool visualChangeOnly)
@@ -831,51 +869,52 @@ void SelectionHandler::selectionPositionChanged(bool visualChangeOnly)
WebCore::IntRect endCaret;
// Get the text rects from the selections range.
- IntRectRegion region;
- getConsolidatedRegionOfTextQuadsForSelection(frame->selection()->selection(), region);
+ Vector<FloatQuad> quads;
+ DOMSupport::visibleTextQuads(frame->selection()->selection(), quads);
+
+ IntRectRegion unclippedRegion;
+ regionForTextQuads(quads, unclippedRegion, false /* shouldClipToVisibleContent */);
// If there is no change in selected text and the visual rects
// have not changed then don't bother notifying anything.
- if (visualChangeOnly && m_lastSelectionRegion.isEqual(region))
+ if (visualChangeOnly && m_lastSelectionRegion.isEqual(unclippedRegion))
return;
- m_lastSelectionRegion = region;
+ m_lastSelectionRegion = unclippedRegion;
- if (!region.isEmpty()) {
+ IntRectRegion visibleSelectionRegion;
+ if (!unclippedRegion.isEmpty()) {
WebCore::IntRect unclippedStartCaret;
WebCore::IntRect unclippedEndCaret;
bool isRTL = directionOfEnclosingBlock(frame->selection()) == RTL;
- std::vector<Platform::IntRect> rectList = region.rects();
-
- WebCore::IntPoint startCaretReferencePoint = referencePoint(frame->selection()->selection().visibleStart(), region.extents(), framePos, true /* isStartCaret */, isRTL);
- WebCore::IntPoint endCaretReferencePoint = referencePoint(frame->selection()->selection().visibleEnd(), region.extents(), framePos, false /* isStartCaret */, isRTL);
+ WebCore::IntPoint startCaretReferencePoint = referencePoint(frame->selection()->selection().visibleStart(), unclippedRegion.extents(), framePos, true /* isStartCaret */, isRTL);
+ WebCore::IntPoint endCaretReferencePoint = referencePoint(frame->selection()->selection().visibleEnd(), unclippedRegion.extents(), framePos, false /* isStartCaret */, isRTL);
- adjustCaretRects(unclippedStartCaret, false /* unclipped */, unclippedEndCaret, false /* unclipped */, rectList, startCaretReferencePoint, endCaretReferencePoint, isRTL);
+ adjustCaretRects(unclippedStartCaret, false /* unclipped */, unclippedEndCaret, false /* unclipped */, unclippedRegion.rects(), startCaretReferencePoint, endCaretReferencePoint, isRTL);
- clipRegionToVisibleContainer(region);
+ regionForTextQuads(quads, visibleSelectionRegion);
#if SHOWDEBUG_SELECTIONHANDLER // Don't rely just on DEBUG_SELECTION to avoid loop.
- for (unsigned int i = 0; i < rectList.size(); i++)
- DEBUG_SELECTION(LogLevelCritical, "Rect list - Unmodified #%d, (%d, %d) (%d x %d)", i, rectList[i].x(), rectList[i].y(), rectList[i].width(), rectList[i].height());
- for (unsigned int i = 0; i < region.numRects(); i++)
- DEBUG_SELECTION(LogLevelCritical, "Rect list - Consolidated #%d, (%d, %d) (%d x %d)", i, region.rects()[i].x(), region.rects()[i].y(), region.rects()[i].width(), region.rects()[i].height());
+ for (unsigned int i = 0; i < unclippedRegion.numRects(); i++)
+ DEBUG_SELECTION(LogLevelCritical, "Rect list - Unmodified #%d, (%d, %d) (%d x %d)", i, unclippedRegion.rects()[i].x(), unclippedRegion.rects()[i].y(), unclippedRegion.rects()[i].width(), unclippedRegion.rects()[i].height());
+ for (unsigned int i = 0; i < visibleSelectionRegion.numRects(); i++)
+ DEBUG_SELECTION(LogLevelCritical, "Rect list - Clipped to Visible #%d, (%d, %d) (%d x %d)", i, visibleSelectionRegion.rects()[i].x(), visibleSelectionRegion.rects()[i].y(), visibleSelectionRegion.rects()[i].width(), visibleSelectionRegion.rects()[i].height());
#endif
bool shouldCareAboutPossibleClippedOutSelection = frame != m_webPage->mainFrame() || m_webPage->m_inputHandler->isInputMode();
- if (!region.isEmpty() || shouldCareAboutPossibleClippedOutSelection) {
+ if (!visibleSelectionRegion.isEmpty() || shouldCareAboutPossibleClippedOutSelection) {
// Adjust the handle markers to be at the end of the painted rect. When selecting links
// and other elements that may have a larger visible area than needs to be rendered a gap
// can exist between the handle and overlay region.
- bool shouldClipStartCaret = !region.isRectInRegion(unclippedStartCaret);
- bool shouldClipEndCaret = !region.isRectInRegion(unclippedEndCaret);
+ bool shouldClipStartCaret = !regionRectListContainsPoint(visibleSelectionRegion, unclippedStartCaret.location());
+ bool shouldClipEndCaret = !regionRectListContainsPoint(visibleSelectionRegion, unclippedEndCaret.location());
// Find the top corner and bottom corner.
- std::vector<Platform::IntRect> clippedRectList = region.rects();
- adjustCaretRects(startCaret, shouldClipStartCaret, endCaret, shouldClipEndCaret, clippedRectList, startCaretReferencePoint, endCaretReferencePoint, isRTL);
+ adjustCaretRects(startCaret, shouldClipStartCaret, endCaret, shouldClipEndCaret, visibleSelectionRegion.rects(), startCaretReferencePoint, endCaretReferencePoint, isRTL);
// Translate the caret values as they must be in transformed coordinates.
if (!shouldClipStartCaret) {
@@ -894,7 +933,7 @@ void SelectionHandler::selectionPositionChanged(bool visualChangeOnly)
startCaret.x(), startCaret.y(), startCaret.width(), startCaret.height(), endCaret.x(), endCaret.y(), endCaret.width(), endCaret.height());
- m_webPage->m_client->notifySelectionDetailsChanged(startCaret, endCaret, region);
+ m_webPage->m_client->notifySelectionDetailsChanged(startCaret, endCaret, visibleSelectionRegion, inputNodeOverridesTouch());
}
// NOTE: This function is not in WebKit coordinates.
@@ -923,9 +962,7 @@ void SelectionHandler::caretPositionChanged()
caretLocation.move(frameOffset.x(), frameOffset.y());
// Clip against the containing frame and node boundaries.
- IntRectRegion region(caretLocation);
- clipRegionToVisibleContainer(region);
- caretLocation = region.extents();
+ caretLocation.intersect(clippingRectForVisibleContent());
}
m_caretActive = !caretLocation.isEmpty();
@@ -936,7 +973,10 @@ void SelectionHandler::caretPositionChanged()
caretLocation = m_webPage->mapToTransformed(caretLocation);
m_webPage->clipToTransformedContentsRect(caretLocation);
- m_webPage->m_client->notifyCaretChanged(caretLocation, m_webPage->m_touchEventHandler->lastFatFingersResult().isTextInput() /* userTouchTriggered */);
+ bool singleLineInput = !m_webPage->m_inputHandler->isMultilineInputMode();
+ WebCore::IntRect nodeBoundingBox = singleLineInput ? m_webPage->m_inputHandler->boundingBoxForInputField() : WebCore::IntRect();
+
+ m_webPage->m_client->notifyCaretChanged(caretLocation, m_webPage->m_touchEventHandler->lastFatFingersResult().isTextInput() /* userTouchTriggered */, singleLineInput, nodeBoundingBox);
}
bool SelectionHandler::selectionContains(const WebCore::IntPoint& point)
diff --git a/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.h b/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.h
index 41a69f8f6..f72af445c 100644
--- a/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.h
+++ b/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.h
@@ -23,11 +23,14 @@
#include "BlackBerryPlatformPrimitives.h"
#include "TextGranularity.h"
+#include <wtf/Vector.h>
+
namespace WTF {
class String;
}
namespace WebCore {
+class FloatQuad;
class IntPoint;
class IntRect;
class Node;
@@ -69,8 +72,8 @@ public:
private:
void caretPositionChanged();
- void getConsolidatedRegionOfTextQuadsForSelection(const WebCore::VisibleSelection&, BlackBerry::Platform::IntRectRegion&) const;
- void clipRegionToVisibleContainer(BlackBerry::Platform::IntRectRegion&);
+ void regionForTextQuads(WTF::Vector<WebCore::FloatQuad>&, BlackBerry::Platform::IntRectRegion&, bool shouldClipToVisibleContent = true) const;
+ WebCore::IntRect clippingRectForVisibleContent() const;
bool updateOrHandleInputSelection(WebCore::VisibleSelection& newSelection, const WebCore::IntPoint& relativeStart
, const WebCore::IntPoint& relativeEnd);
WebCore::Node* DOMContainerNodeForVisiblePosition(const WebCore::VisiblePosition&) const;
@@ -78,6 +81,8 @@ private:
unsigned short extendSelectionToFieldBoundary(bool isStartHandle, const WebCore::IntPoint& selectionPoint, WebCore::VisibleSelection& newSelection);
WebCore::IntPoint clipPointToVisibleContainer(const WebCore::IntPoint&) const;
+ bool inputNodeOverridesTouch() const;
+
WebPagePrivate* m_webPage;
bool m_selectionActive;
diff --git a/Source/WebKit/blackberry/WebKitSupport/SurfacePool.cpp b/Source/WebKit/blackberry/WebKitSupport/SurfacePool.cpp
index 5f0a2770a..bf2a58da1 100644
--- a/Source/WebKit/blackberry/WebKitSupport/SurfacePool.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/SurfacePool.cpp
@@ -155,7 +155,7 @@ std::string SurfacePool::sharedPixmapGroup() const
void SurfacePool::createBuffers()
{
- if (!m_initialized || m_tilePool.isEmpty())
+ if (!m_initialized || m_tilePool.isEmpty() || !m_buffersSuspended)
return;
// Create the tile pool.
@@ -173,7 +173,7 @@ void SurfacePool::createBuffers()
void SurfacePool::releaseBuffers()
{
- if (!m_initialized || m_tilePool.isEmpty())
+ if (!m_initialized || m_tilePool.isEmpty() || m_buffersSuspended)
return;
m_buffersSuspended = true;
@@ -181,16 +181,20 @@ void SurfacePool::releaseBuffers()
// Release the tile pool.
for (size_t i = 0; i < m_tilePool.size(); ++i) {
m_tilePool[i]->frontBuffer()->clearRenderedRegion();
+ // Clear the buffer to prevent accidental leakage of (possibly sensitive) pixel data.
+ BlackBerry::Platform::Graphics::clearBuffer(m_tilePool[i]->frontBuffer()->nativeBuffer(), 0, 0, 0, 0);
BlackBerry::Platform::Graphics::destroyPixmapBuffer(m_tilePool[i]->frontBuffer()->nativeBuffer());
}
if (m_visibleTileBuffer) {
m_visibleTileBuffer->frontBuffer()->clearRenderedRegion();
+ BlackBerry::Platform::Graphics::clearBuffer(m_visibleTileBuffer->frontBuffer()->nativeBuffer(), 0, 0, 0, 0);
BlackBerry::Platform::Graphics::destroyPixmapBuffer(m_visibleTileBuffer->frontBuffer()->nativeBuffer());
}
if (backBuffer()) {
backBuffer()->clearRenderedRegion();
+ BlackBerry::Platform::Graphics::clearBuffer(backBuffer()->nativeBuffer(), 0, 0, 0, 0);
BlackBerry::Platform::Graphics::destroyPixmapBuffer(backBuffer()->nativeBuffer());
}
}
diff --git a/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp b/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp
index cfe559af0..4224e6253 100644
--- a/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp
@@ -68,15 +68,14 @@ static bool hasTouchListener(Element* element)
|| element->hasEventListeners(eventNames().touchendEvent);
}
-static bool elementExpectsMouseEvents(Element* element)
+static bool isRangeControlElement(Element* element)
{
- // Make sure we are not operating a shadow node here, since the webpages
- // aren't able to attach event listeners to shadow content.
ASSERT(element);
- while (element->isInShadowTree())
- element = toElement(element->shadowAncestorNode());
+ if (!element->hasTagName(HTMLNames::inputTag))
+ return false;
- return hasMouseMoveListener(element) && !hasTouchListener(element);
+ HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(element);
+ return inputElement->isRangeControl();
}
static bool shouldConvertTouchToMouse(Element* element)
@@ -84,23 +83,25 @@ static bool shouldConvertTouchToMouse(Element* element)
if (!element)
return false;
- // Range element are a special case that require natural mouse events in order to allow
- // dragging of the slider handle.
- if (element->hasTagName(HTMLNames::inputTag)) {
- HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(element);
- if (inputElement->isRangeControl())
- return true;
- }
-
if ((element->hasTagName(HTMLNames::objectTag) || element->hasTagName(HTMLNames::embedTag)) && static_cast<HTMLPlugInElement*>(element))
return true;
+ // Input Range element is a special case that requires natural mouse events
+ // in order to allow dragging of the slider handle.
+ // Input Range element might appear in the webpage, or it might appear in the shadow tree,
+ // like the timeline and volume media controls all use Input Range.
+ // won't operate on the shadow node of other element type, because the webpages
+ // aren't able to attach listeners to shadow content.
+ do {
+ element = toElement(element->shadowAncestorNode()); // If an element is not in shadow tree, shadowAncestorNode returns itself.
+ if (isRangeControlElement(element))
+ return true;
+ } while (element->isInShadowTree());
+
// Check if the element has a mouse listener and no touch listener. If so,
// the field will require touch events be converted to mouse events to function properly.
- if (elementExpectsMouseEvents(element))
- return true;
+ return hasMouseMoveListener(element) && !hasTouchListener(element);
- return false;
}
TouchEventHandler::TouchEventHandler(WebPagePrivate* webpage)
@@ -174,6 +175,9 @@ void TouchEventHandler::touchHoldEvent()
bool TouchEventHandler::handleTouchPoint(Platform::TouchPoint& point)
{
+ // Enable input mode on any touch event.
+ m_webPage->m_inputHandler->enableInputMode();
+
switch (point.m_state) {
case Platform::TouchPoint::TouchPressed:
{
@@ -212,6 +216,7 @@ bool TouchEventHandler::handleTouchPoint(Platform::TouchPoint& point)
}
case Platform::TouchPoint::TouchReleased:
{
+ unsigned spellLength = spellCheck(point);
// Apply any suppressed changes. This does not eliminate the need
// for the show after the handling of fat finger pressed as it may
// have triggered a state change.
@@ -234,11 +239,9 @@ bool TouchEventHandler::handleTouchPoint(Platform::TouchPoint& point)
} else // Fat finger point in viewport coordinates.
adjustedPoint = m_webPage->mapFromContentsToViewport(m_lastFatFingersResult.adjustedPosition());
- PlatformMouseEvent mouseEvent(adjustedPoint, m_lastScreenPoint, MouseEventReleased, 1, LeftButton, TouchScreen);
+ PlatformMouseEvent mouseEvent(adjustedPoint, m_lastScreenPoint, PlatformEvent::MouseReleased, 1, LeftButton, TouchScreen);
m_webPage->handleMouseEvent(mouseEvent);
m_lastFatFingersResult.reset(); // Reset the fat finger result as its no longer valid when a user's finger is not on the screen.
-
- unsigned spellLength = spellCheck(point);
if (spellLength) {
unsigned end = m_webPage->m_inputHandler->caretPosition();
unsigned start = end - spellLength;
@@ -248,7 +251,7 @@ bool TouchEventHandler::handleTouchPoint(Platform::TouchPoint& point)
}
case Platform::TouchPoint::TouchMoved:
if (m_convertTouchToMouse) {
- PlatformMouseEvent mouseEvent(point.m_pos, m_lastScreenPoint, MouseEventMoved, 1, LeftButton, TouchScreen);
+ PlatformMouseEvent mouseEvent(point.m_pos, m_lastScreenPoint, PlatformEvent::MouseMoved, 1, LeftButton, TouchScreen);
m_lastScreenPoint = point.m_screenPos;
if (!m_webPage->handleMouseEvent(mouseEvent)) {
m_convertTouchToMouse = false;
@@ -269,7 +272,7 @@ unsigned TouchEventHandler::spellCheck(Platform::TouchPoint& touchPoint)
if (!m_lastFatFingersResult.isTextInput() || !elementUnderFatFinger)
return 0;
- IntPoint contentPos(m_webPage->mapFromViewportToContents(touchPoint.m_pos));
+ LayoutPoint contentPos(m_webPage->mapFromViewportToContents(touchPoint.m_pos));
contentPos = DOMSupport::convertPointToFrame(m_webPage->mainFrame(), m_webPage->focusedOrMainFrame(), contentPos);
Document* document = elementUnderFatFinger->document();
@@ -279,7 +282,7 @@ unsigned TouchEventHandler::spellCheck(Platform::TouchPoint& touchPoint)
return 0;
IntRect rect = marker->renderedRect();
- IntPoint newContentPos = IntPoint(rect.x() + rect.width(), rect.y() + rect.height() / 2);
+ LayoutPoint newContentPos = LayoutPoint(rect.x() + rect.width(), rect.y() + rect.height() / 2);
Frame* frame = m_webPage->focusedOrMainFrame();
if (frame != m_webPage->mainFrame())
newContentPos = m_webPage->mainFrame()->view()->windowToContents(frame->view()->contentsToWindow(newContentPos));
@@ -291,13 +294,12 @@ unsigned TouchEventHandler::spellCheck(Platform::TouchPoint& touchPoint)
void TouchEventHandler::handleFatFingerPressed()
{
if (!m_didCancelTouch) {
-
// First update the mouse position with a MouseMoved event.
- PlatformMouseEvent mouseMoveEvent(m_webPage->mapFromContentsToViewport(m_lastFatFingersResult.adjustedPosition()), m_lastScreenPoint, MouseEventMoved, 0, LeftButton, TouchScreen);
+ PlatformMouseEvent mouseMoveEvent(m_webPage->mapFromContentsToViewport(m_lastFatFingersResult.adjustedPosition()), m_lastScreenPoint, PlatformEvent::MouseMoved, 0, LeftButton, TouchScreen);
m_webPage->handleMouseEvent(mouseMoveEvent);
// Then send the MousePressed event.
- PlatformMouseEvent mousePressedEvent(m_webPage->mapFromContentsToViewport(m_lastFatFingersResult.adjustedPosition()), m_lastScreenPoint, MouseEventPressed, 1, LeftButton, TouchScreen);
+ PlatformMouseEvent mousePressedEvent(m_webPage->mapFromContentsToViewport(m_lastFatFingersResult.adjustedPosition()), m_lastScreenPoint, PlatformEvent::MousePressed, 1, LeftButton, TouchScreen);
m_webPage->handleMouseEvent(mousePressedEvent);
}
}
diff --git a/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.h b/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.h
index 473fc30a2..3b7ae506e 100644
--- a/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.h
+++ b/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.h
@@ -24,7 +24,6 @@
#include "IntPoint.h"
#include <BlackBerryPlatformTouchEvent.h>
-#include <BlackBerryPlatformWindow.h>
namespace BlackBerry {
namespace WebKit {
diff --git a/Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.cpp b/Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.cpp
deleted file mode 100644
index 91a4eb21d..000000000
--- a/Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (C) 2010, 2011, 2012 Research In Motion Limited. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-
-#if USE(ACCELERATED_COMPOSITING)
-#include "WebPageCompositor.h"
-
-#include "BackingStore_p.h"
-#include "LayerWebKitThread.h"
-#include "WebPage_p.h"
-
-#include <BlackBerryPlatformExecutableMessage.h>
-#include <BlackBerryPlatformMessage.h>
-#include <BlackBerryPlatformMessageClient.h>
-#include <GenericTimerClient.h>
-#include <ThreadTimerClient.h>
-
-using namespace WebCore;
-
-namespace BlackBerry {
-namespace WebKit {
-
-WebPageCompositor::WebPageCompositor(WebPagePrivate* page)
- : m_webPage(page)
- , m_layerRenderer(LayerRenderer::create(page->m_page))
- , m_generation(0)
- , m_compositedGeneration(-1)
- , m_compositingOntoMainWindow(false)
- , m_animationTimer(this, &WebPageCompositor::animationTimerFired)
- , m_timerClient(new Platform::GenericTimerClient(Platform::userInterfaceThreadTimerClient()))
-{
- m_animationTimer.setClient(m_timerClient);
-}
-
-WebPageCompositor::~WebPageCompositor()
-{
- m_animationTimer.stop();
- delete m_timerClient;
-}
-
-bool WebPageCompositor::hardwareCompositing() const
-{
- return m_layerRenderer->hardwareCompositing();
-}
-
-void WebPageCompositor::setRootLayer(LayerCompositingThread* rootLayer)
-{
- m_rootLayer = rootLayer;
- m_layerRenderer->setRootLayer(m_rootLayer.get());
-}
-
-void WebPageCompositor::setCompositingOntoMainWindow(bool compositingOntoMainWindow)
-{
- m_compositingOntoMainWindow = compositingOntoMainWindow;
- m_layerRenderer->setClearSurfaceOnDrawLayers(!compositingOntoMainWindow);
-}
-
-void WebPageCompositor::commit(LayerWebKitThread* rootLayer)
-{
- if (!rootLayer)
- return;
-
- rootLayer->commitOnCompositingThread();
- ++m_generation;
-}
-
-bool WebPageCompositor::drawLayers(const IntRect& dstRect, const FloatRect& contents)
-{
- // Save a draw if we already drew this generation, for example due to a concurrent scroll operation.
- if (m_compositedGeneration == m_generation && dstRect == m_compositedDstRect
- && contents == m_compositedContentsRect && !m_compositingOntoMainWindow)
- return false;
-
- m_layerRenderer->drawLayers(contents, m_layoutRectForCompositing, m_contentsSizeForCompositing, dstRect);
- m_lastCompositingResults = m_layerRenderer->lastRenderingResults();
-
- m_compositedDstRect = dstRect;
- m_compositedContentsRect = contents;
- m_compositedGeneration = m_generation;
-
- if (m_lastCompositingResults.needsAnimationFrame) {
- ++m_generation; // The animation update moves us along one generation.
- // Using a timeout of 0 actually won't start a timer, it will send a message.
- m_animationTimer.start(1.0 / 60.0);
- m_webPage->updateDelegatedOverlays();
- }
-
- return true;
-}
-
-void WebPageCompositor::releaseLayerResources()
-{
- m_layerRenderer->releaseLayerResources();
-}
-
-void WebPageCompositor::animationTimerFired()
-{
- if (m_webPage->m_backingStore->d->shouldDirectRenderingToWindow()) {
- if (m_webPage->m_backingStore->d->isDirectRenderingAnimationMessageScheduled())
- return; // don't send new messages as long as we haven't rerendered
-
- m_webPage->m_backingStore->d->setDirectRenderingAnimationMessageScheduled();
- BlackBerry::Platform::webKitThreadMessageClient()->dispatchMessage(
- BlackBerry::Platform::createMethodCallMessage(
- &BackingStorePrivate::renderVisibleContents, m_webPage->m_backingStore->d));
- return;
- }
- m_webPage->blitVisibleContents();
-}
-
-} // namespace WebKit
-} // namespace BlackBerry
-
-#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/Source/WebKit/chromium/.gitignore b/Source/WebKit/chromium/.gitignore
new file mode 100644
index 000000000..12ec0f709
--- /dev/null
+++ b/Source/WebKit/chromium/.gitignore
@@ -0,0 +1,35 @@
+# Ignore Chromium dependencies
+
+*.Makefile
+*.mk
+*.sln
+*.vcproj*
+All.xcodeproj
+WebKit.xcodeproj
+WebKitUnitTests.xcodeproj
+
+.gclient
+.gclient_entries
+base/
+chromium_deps/
+crypto/
+depot_tools/
+dbus/
+gfx/
+googleurl/
+gpu/
+ipc/
+media/
+net/
+ppapi/
+printing/
+sdch/
+skia/
+sql/
+testing/
+third_party/
+tools/
+ui/
+v8/
+webkit/
+xcodebuild/
diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog
index 8fe572481..4b8508c40 100644
--- a/Source/WebKit/chromium/ChangeLog
+++ b/Source/WebKit/chromium/ChangeLog
@@ -1,3 +1,8929 @@
+2012-05-06 Kinuko Yasuda <kinuko@chromium.org>
+
+ Cleanup: Change boolean synchronous flag argument into enum in FileSystem API code
+ https://bugs.webkit.org/show_bug.cgi?id=85741
+
+ Reviewed by David Levin.
+
+ * src/LocalFileSystemChromium.cpp:
+ (WebCore::openFileSystemHelper):
+ (WebCore::LocalFileSystem::readFileSystem):
+ (WebCore::LocalFileSystem::requestFileSystem):
+ * src/WebFileSystemCallbacksImpl.cpp:
+ (WebKit::WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl):
+ (WebKit::WebFileSystemCallbacksImpl::didOpenFileSystem):
+ * src/WebFileSystemCallbacksImpl.h:
+ (WebFileSystemCallbacksImpl):
+ * src/WorkerAsyncFileSystemChromium.cpp:
+ (WebCore::WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium):
+ (WebCore::WorkerAsyncFileSystemChromium::createWorkerFileSystemCallbacksBridge):
+ * src/WorkerAsyncFileSystemChromium.h:
+ (WebCore::WorkerAsyncFileSystemChromium::create):
+ (WorkerAsyncFileSystemChromium):
+
+2012-05-06 Kinuko Yasuda <kinuko@chromium.org>
+
+ Cleanup: Move FileSystem API type definitions into a separate header file
+ https://bugs.webkit.org/show_bug.cgi?id=85738
+
+ Reviewed by David Levin.
+
+ Move FileSystem API type definitions from AsyncFileSystem.h and
+ AsyncFileSystemChromium.cpp for chromium port into a single separate
+ header file: FileSystemType.h
+
+ By doing this we make it clearer that every filesystem type can be
+ found in the header file and also can save including entire
+ AsyncFileSystem definition just for referring type enum value.
+
+ * src/AssertMatchingEnums.cpp:
+ * src/AsyncFileSystemChromium.cpp:
+ (WebCore::AsyncFileSystem::crackFileSystemURL):
+ (WebCore::AsyncFileSystem::isValidType):
+ (WebCore::AsyncFileSystemChromium::AsyncFileSystemChromium):
+ (WebCore::AsyncFileSystemChromium::createIsolatedFileSystem):
+ (WebCore::AsyncFileSystemChromium::toURL):
+ * src/AsyncFileSystemChromium.h:
+ (WebCore::AsyncFileSystemChromium::create):
+ (AsyncFileSystemChromium):
+ * src/LocalFileSystemChromium.cpp:
+ (WebCore::openFileSystemHelper):
+ (WebCore::LocalFileSystem::readFileSystem):
+ (WebCore::LocalFileSystem::requestFileSystem):
+ * src/WebFileSystemCallbacksImpl.cpp:
+ (WebKit::WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl):
+ * src/WebFileSystemCallbacksImpl.h:
+ (WebFileSystemCallbacksImpl):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::createFileSystem):
+ (WebKit::WebFrameImpl::createFileEntry):
+ * src/WorkerAsyncFileSystemChromium.cpp:
+ (WebCore::WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium):
+ * src/WorkerAsyncFileSystemChromium.h:
+ (WebCore::WorkerAsyncFileSystemChromium::create):
+ (WorkerAsyncFileSystemChromium):
+
+2012-05-06 Kinuko Yasuda <kinuko@chromium.org>
+
+ Cleanup: FileSystem API's Entry.toURL() impl should return KURL instead of String
+ https://bugs.webkit.org/show_bug.cgi?id=85736
+
+ Reviewed by David Levin.
+
+ Change AsyncFileSystemChromium::toURL()'s return type from String to KURL.
+
+ * src/AsyncFileSystemChromium.cpp:
+ (WebCore::AsyncFileSystemChromium::toURL):
+ String to KURL.
+ * src/AsyncFileSystemChromium.h:
+ (AsyncFileSystemChromium):
+
+2012-05-06 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Call currentThread through Platform.h directly
+ https://bugs.webkit.org/show_bug.cgi?id=85769
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::CCLayerTreeHostTest::onEndTest):
+ (WTF::CCLayerTreeHostTest::runTest):
+
+2012-05-06 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Call cryptographicallyRandomValues through Platform.h
+ https://bugs.webkit.org/show_bug.cgi?id=85763
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/ChromiumOSRandomSource.cpp:
+ (WTF::cryptographicallyRandomValuesFromOS):
+
+2012-05-06 Keishi Hattori <keishi@webkit.org>
+
+ [chromium] Add WebKit API to access multiple attribute of input element
+ https://bugs.webkit.org/show_bug.cgi?id=85355
+
+ Reviewed by Kent Tamura.
+
+ We need this to implement the datalist UI for <input type=email multiple>.
+
+ * public/WebInputElement.h:
+ (WebInputElement):
+ * src/WebInputElement.cpp:
+ (WebKit::WebInputElement::isMultiple):
+ (WebKit):
+
+2012-05-06 Adam Barth <abarth@webkit.org>
+
+ CSP should let sites both enforce one policy and monitor another
+ https://bugs.webkit.org/show_bug.cgi?id=85561
+
+ Reviewed by Eric Seidel.
+
+ * src/SharedWorkerRepository.cpp:
+ (WebCore::SharedWorkerScriptLoader::notifyFinished):
+ * src/WebWorkerClientImpl.cpp:
+ (WebKit::WebWorkerClientImpl::startWorkerContext):
+
+2012-05-06 Kent Tamura <tkent@chromium.org>
+
+ Rename ICULocale to LocaleICU, part 2
+ https://bugs.webkit.org/show_bug.cgi?id=85695
+
+ Reviewed by Kentaro Hara.
+
+ * tests/LocalizedNumberICUTest.cpp:
+ (testNumberIsReversible): Rename ICULocale to LocaleICU.
+
+2012-05-06 Adrienne Walker <enne@google.com>
+
+ [chromium] Allow WebMediaPlayerClientImpl to switch clients
+ https://bugs.webkit.org/show_bug.cgi?id=85093
+
+ Reviewed by James Robinson.
+
+ WebVideoFrameProviderClient has a 1:1 relationship with a
+ WebVideoFrameProvider. The client here is CCVideoLayerImpl and the
+ provider is WebMediaPlayerClientImpl. If the provider gets a new
+ client, then the old client needs to be informed to stop using the
+ provider.
+
+ If this doesn't happen, then the old client will have an unsafe
+ pointer to the provider, will not get informed if the provider gets
+ deleted, and the client will crash when it dereferences the provider
+ pointer trying to tell the provider that its client is going away.
+
+ Test: WebMediaPlayerClientImplTest.InitialNullVideoClient
+ WebMediaPlayerClientImplTest.SetAndUnsetVideoClient
+ WebMediaPlayerClientImplTest.DestroyProvider
+ WebMediaPlayerClientImplTest.SetMultipleVideoClients
+
+ * WebKit.gypi:
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::setVideoFrameProviderClient):
+ * src/WebMediaPlayerClientImpl.h:
+ (WebMediaPlayerClientImpl):
+ * tests/WebMediaPlayerClientImplTest.cpp: Added.
+ (WebKit):
+ (FakeWebMediaPlayerClientImpl):
+ (WebKit::FakeWebMediaPlayerClientImpl::create):
+ (WebKit::FakeWebMediaPlayerClientImpl::FakeWebMediaPlayerClientImpl):
+ (FakeVideoFrameProviderClient):
+ (WebKit::FakeVideoFrameProviderClient::create):
+ (WebKit::FakeVideoFrameProviderClient::~FakeVideoFrameProviderClient):
+ (WebKit::FakeVideoFrameProviderClient::didReceiveFrame):
+ (WebKit::FakeVideoFrameProviderClient::didUpdateMatrix):
+ (WebKit::FakeVideoFrameProviderClient::stopUsingProvider):
+ (WebKit::FakeVideoFrameProviderClient::provider):
+ (WebKit::FakeVideoFrameProviderClient::FakeVideoFrameProviderClient):
+ (WebKit::TEST):
+
+2012-05-06 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed. Rolled DEPS.
+
+ * DEPS:
+
+2012-05-06 Andrey Kosyakov <caseq@chromium.org>
+
+ Web Inspector: take timeline frame mode out of experimental
+ https://bugs.webkit.org/show_bug.cgi?id=85707
+
+ Reviewed by Pavel Feldman.
+
+ - exposed supportFrameInstrumentation method to InspectorClient. Client must return true iff the platform will call
+ InspectorInstrumentation::instrumentBeginFrame() upon beginning of frame rendering;
+
+ * src/InspectorClientImpl.cpp:
+ (WebKit::InspectorClientImpl::supportsFrameInstrumentation):
+ (WebKit):
+ * src/InspectorClientImpl.h:
+ (InspectorClientImpl):
+
+2012-05-04 Kent Tamura <tkent@chromium.org>
+
+ Rename ICULocale to LocaleICU, part 1
+ https://bugs.webkit.org/show_bug.cgi?id=85688
+
+ Reviewed by Kentaro Hara.
+
+ * tests/LocalizedNumberICUTest.cpp: Rename ICULocale.h to LocaleICU.h.
+
+2012-05-04 Shawn Singh <shawnsingh@chromium.org>
+
+ [chromium] Changes to layer tree structure need to be tracked properly
+ https://bugs.webkit.org/show_bug.cgi?id=85421
+
+ Reviewed by Adrienne Walker.
+
+ Unit test added: TreeSynchronizerTest.syncSimpleTreeAndTrackStackingOrderChange
+
+ * tests/TreeSynchronizerTest.cpp:
+ (WebKitTests):
+ (WebKitTests::TEST):
+
+2012-05-04 Tony Chang <tony@chromium.org>
+
+ [chromium] enable msvs_error_on_missing_sources at gyp time
+ https://bugs.webkit.org/show_bug.cgi?id=85683
+
+ Reviewed by Adam Barth.
+
+ This flag checks for missing files, which cause compile times to be
+ slow on Windows. Since this flag is on by default for the
+ build.chromium.org bots, we should add it here too so everyone can fix
+ these errors.
+
+ * DEPS: Roll to a chromium version that has no missing files.
+ * gyp_webkit: Add the flag.
+
+2012-05-04 Satoru Takabayashi <satorux@chromium.org>
+
+ [chromium] Add plumbing for file display names for drag and drop
+ https://bugs.webkit.org/show_bug.cgi?id=85673
+
+ Reviewed by Darin Fisher.
+
+ * public/platform/WebDragData.h:
+ * src/WebDragData.cpp:
+ (WebKit::WebDragData::items):
+ (WebKit::WebDragData::addItem):
+
+2012-05-04 Adam Barth <abarth@webkit.org>
+
+ Refactor CSP state to prepare for having both a ReportOnly and an Enforced policy
+ https://bugs.webkit.org/show_bug.cgi?id=85662
+
+ Reviewed by Eric Seidel.
+
+ Update callers to the new function name.
+
+ * src/SharedWorkerRepository.cpp:
+ (WebCore::SharedWorkerScriptLoader::notifyFinished):
+ * src/WebWorkerClientImpl.cpp:
+ (WebKit::WebWorkerClientImpl::startWorkerContext):
+
+2012-05-04 Sami Kyostila <skyostil@chromium.org>
+
+ [chromium] Revert compositor layer scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=85644
+
+ Reviewed by Steve Block.
+
+ * src/WebContentLayerImpl.cpp:
+ * src/WebContentLayerImpl.h:
+ (WebContentLayerImpl):
+ * tests/CCLayerTreeHostCommonTest.cpp:
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::TEST_F):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::MockContentLayerDelegate::paintContents):
+
+2012-05-04 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Make PeerConnection00's API fully compliant with the draft
+ https://bugs.webkit.org/show_bug.cgi?id=85491
+
+ Reviewed by Adam Barth.
+
+ * src/AssertMatchingEnums.cpp:
+
+2012-05-04 Nate Chapin <japhet@chromium.org>
+
+ Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+ https://bugs.webkit.org/show_bug.cgi?id=85533
+
+ Reviewed by Alexey Proskuryakov.
+
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::FrameLoaderClientImpl):
+ (WebKit):
+ (WebKit::FrameLoaderClientImpl::finishedLoading):
+ * src/FrameLoaderClientImpl.h:
+ (WebKit::FrameLoaderClientImpl::makeRepresentation):
+ (WebKit::FrameLoaderClientImpl::revertToProvisionalState):
+ (FrameLoaderClientImpl):
+
+2012-05-04 Alexander Pavlov <apavlov@chromium.org>
+
+ Web Inspector: [Device Metrics] With "Fit window" option on, page contents are downscaled incorrectly
+ https://bugs.webkit.org/show_bug.cgi?id=85510
+
+ Reviewed by Pavel Feldman.
+
+ Use the RenderView width rather than FrameView contents width whenever possible.
+ Drive-by: add protection from division-by-zero (for some weird rendering states).
+
+ Test: inspector/styles/device-metrics-fit-window.html
+
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::DeviceMetricsSupport::ensureOriginalZoomFactor):
+ (WebKit::DeviceMetricsSupport::scaledEmulatedFrameSize):
+
+2012-05-03 W. James MacLean <wjmaclean@chromium.org>
+
+ [chromium] Revise touchpad fling curve to use exponential curve, to improve feel and small fling performance.
+ https://bugs.webkit.org/show_bug.cgi?id=85530
+
+ Reviewed by Kenneth Russell.
+
+ * tests/PlatformGestureCurveTest.cpp:
+
+2012-05-03 Dimitri Glazkov <dglazkov@chromium.org>
+
+ [Chromium] Use correct define in the features.gypi
+ https://bugs.webkit.org/show_bug.cgi?id=85520
+
+ Patch by Ben Goodger.
+
+ Reviewed by Tony Chang.
+
+ * features.gypi: Replaced use_aura with a more appropriate chromeos
+
+2012-05-03 Antony Sargent <asargent@chromium.org>
+
+ Add methods to create WebArrayBuffer/WebArrayBufferView from v8 objects
+ https://bugs.webkit.org/show_bug.cgi?id=84899
+
+ Reviewed by Adam Barth.
+
+ * public/WebArrayBuffer.h:
+ (WebArrayBuffer):
+ * public/platform/WebArrayBufferView.h:
+ (v8):
+ (WebArrayBufferView):
+ * src/WebArrayBuffer.cpp:
+ (WebKit):
+ (WebKit::WebArrayBuffer::createFromV8Value):
+ * src/WebArrayBufferView.cpp:
+ (WebKit):
+ (WebKit::WebArrayBufferView::createFromV8Value):
+
+2012-05-03 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Don't add small opaque areas to the occlusion tracker's Region
+ https://bugs.webkit.org/show_bug.cgi?id=85297
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebKitTests):
+ (CCOcclusionTrackerTestMinimumTrackingSize):
+ (WebKitTests::CCOcclusionTrackerTestMinimumTrackingSize::runMyTest):
+
+2012-05-02 Jon Lee <jonlee@apple.com>
+
+ Migrate permission functions to Notification from NotificationCenter
+ https://bugs.webkit.org/show_bug.cgi?id=80485
+ <rdar://problem/10965458>
+
+ Reviewed by Jian Li.
+
+ * src/NotificationPresenterImpl.h:
+ (NotificationPresenterImpl): Add stub implementation of requestPermission.
+ (WebKit::NotificationPresenterImpl::requestPermission):
+
+2012-05-02 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Don't occlude pixels in a surface that are needed for a background filter blur
+ https://bugs.webkit.org/show_bug.cgi?id=84317
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblings::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblingsWithTwoTransforms::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestAnimationOpacity1OnMainThread::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestAnimationOpacity0OnMainThread::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestAnimationTranslateOnMainThread::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestReplicaOccluded::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceWithReplicaUnoccluded::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceAndReplicaOccludedDifferently::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceChildOfSurface::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceChildOfClippingSurface::runMyTest):
+ (WebKitTests):
+ (CCOcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilter):
+ (WebKitTests::CCOcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilter::runMyTest):
+ (CCOcclusionTrackerTestTwoBackgroundFiltersReduceOcclusionTwice):
+ (WebKitTests::CCOcclusionTrackerTestTwoBackgroundFiltersReduceOcclusionTwice::runMyTest):
+ (CCOcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilterWithClip):
+ (WebKitTests::CCOcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilterWithClip::runMyTest):
+ (CCOcclusionTrackerTestDontReduceOcclusionBelowBackgroundFilter):
+ (WebKitTests::CCOcclusionTrackerTestDontReduceOcclusionBelowBackgroundFilter::runMyTest):
+ (CCOcclusionTrackerTestDontReduceOcclusionIfBackgroundFilterIsOccluded):
+ (WebKitTests::CCOcclusionTrackerTestDontReduceOcclusionIfBackgroundFilterIsOccluded::runMyTest):
+ (CCOcclusionTrackerTestReduceOcclusionWhenBackgroundFilterIsPartiallyOccluded):
+ (WebKitTests::CCOcclusionTrackerTestReduceOcclusionWhenBackgroundFilterIsPartiallyOccluded::runMyTest):
+
+2012-04-18 Jon Honeycutt <jhoneycutt@apple.com>
+
+ FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
+ information about the form being submitted
+ https://bugs.webkit.org/show_bug.cgi?id=84297
+
+ Reviewed by Andy Estes.
+
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::dispatchWillSendSubmitEvent):
+ Updated to use the FormState.
+
+ * src/FrameLoaderClientImpl.h:
+ (FrameLoaderClientImpl):
+ Updated method declaration.
+
+2012-05-02 Joshua Bell <jsbell@chromium.org>
+
+ Roll Chromium DEPS r134537 to r134581.
+ https://bugs.webkit.org/show_bug.cgi?id=85428
+
+ Unreviewed - just a deps roll.
+
+ * DEPS:
+
+2012-05-02 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] Add WebDocument::referrerPolicy() which wraps the same method on Document
+ https://bugs.webkit.org/show_bug.cgi?id=85201
+
+ Reviewed by Adam Barth.
+
+ Embedders should use webFrame->document()->referrerPolicy() instead of webFrame->referrerPolicy(). The latter will be removed soon.
+
+ * public/WebDocument.h:
+ (WebDocument):
+ * src/WebDocument.cpp:
+ (WebKit::WebDocument::referrerPolicy):
+ (WebKit):
+
+2012-05-02 Michal Mocny <mmocny@google.com>
+
+ [chromium] Set contents texture manager preferred memory limit based on GpuMemoryManager suggestion.
+ https://bugs.webkit.org/show_bug.cgi?id=84270
+
+ Reviewed by Kenneth Russell.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ * tests/LayerRendererChromiumTest.cpp:
+
+2012-05-02 Emil A Eklund <eae@chromium.org>
+
+ Fix usage of layout types in platform code
+ https://bugs.webkit.org/show_bug.cgi?id=85392
+
+ Reviewed by Eric Seidel.
+
+ * src/WebHitTestResult.cpp:
+ (WebKit::WebHitTestResult::localPoint):
+ * src/WebSurroundingText.cpp:
+ (WebKit::WebSurroundingText::initialize):
+ Explicitly cast WebPoint to IntPoint to avoid ambiguous conversion error.
+
+2012-05-02 Yury Semikhatsky <yurys@chromium.org>
+
+ Web Inspector: TypeError: Cannot call method 'createLiveLocation' of undefined
+ https://bugs.webkit.org/show_bug.cgi?id=85371
+
+ Standard extension scripts injected to the Chromium background page should have
+ correct script data which means that context debug id should be already set on
+ the context where they are compiled before the compilation. This patch moves
+ assignment of context debug id earlier where it is known that no scripts have
+ been evaluated in the context.
+
+ Reviewed by Pavel Feldman.
+
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::dispatchDidClearWindowObjectInWorld):
+ (WebKit::FrameLoaderClientImpl::didCreateScriptContext):
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgentImpl::didCreateScriptContext):
+ * src/WebDevToolsAgentImpl.h:
+ (WebDevToolsAgentImpl):
+ * src/WebDevToolsAgentPrivate.h:
+ (WebDevToolsAgentPrivate):
+
+2012-05-02 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Changing webkitGetUserMedia to take an object instead of a string
+ https://bugs.webkit.org/show_bug.cgi?id=84850
+
+ Reviewed by Dimitri Glazkov.
+
+ * public/WebUserMediaRequest.h:
+ (WebUserMediaRequest):
+ * src/WebUserMediaRequest.cpp:
+
+2012-05-01 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Additional instances of calling histogramCustomCounts directly
+ https://bugs.webkit.org/show_bug.cgi?id=85322
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/painting/PaintAggregator.cpp:
+ (WebKit::PaintAggregator::invalidateRect):
+
+2012-05-01 Min Qin <qinmin@google.com>
+
+ use USE(NATIVE_FULLSCREEN_VIDEO) instead of ENABLE(NATIVE_FULLSCREEN_VIDEO)
+ https://bugs.webkit.org/show_bug.cgi?id=85316
+
+ Reviewed by Kent Tamura.
+
+ NATIVE_FULLSCREEN_VIDEO means the fullscreen video is implemented by native
+ system view instead of webkit
+ So it is more appropriate to use USE(NATIVE_FULLSCREEN_VIDEO).
+ Just rename the flag, no new tests
+
+ * features.gypi:
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit):
+ * src/WebMediaPlayerClientImpl.h:
+ (WebMediaPlayerClientImpl):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::enterFullScreenForElement):
+ (WebKit::WebViewImpl::exitFullScreenForElement):
+
+2012-05-01 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Additional instances of calling createAudioDevice directly
+ https://bugs.webkit.org/show_bug.cgi?id=85321
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/AudioDestinationChromium.cpp:
+ (WebCore::AudioDestinationChromium::AudioDestinationChromium):
+
+2012-05-01 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Additional instances of calling mimeRegistry directly
+ https://bugs.webkit.org/show_bug.cgi?id=85320
+
+ Reviewed by Eric Seidel.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::canShowMIMEType):
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::supportsType):
+
+2012-05-01 Ryosuke Niwa <rniwa@webkit.org>
+
+ *Command.h files shouldn't be exported to WebKit layer
+ https://bugs.webkit.org/show_bug.cgi?id=74778
+
+ Reviewed by Eric Seidel.
+
+ * src/WebFrameImpl.cpp:
+ * src/WebViewImpl.cpp:
+
+2012-05-01 Julien Chaffraix <jchaffraix@webkit.org>
+
+ WebKit test RenderTableCellDeathTest.CanSetRow is failing as of r115705
+ https://bugs.webkit.org/show_bug.cgi?id=85274
+
+ Reviewed by Ojan Vafai.
+
+ The tests were crashing as we were creating a RenderTableCell without any RenderTableRow parent
+ which shouldn't happen inside the render tree.
+
+ Using RenderTableCell to access RenderTableRow was artificial and the checks have now been moved
+ to using a RenderTableRow directly.
+
+ * WebKit.gyp:
+ * WebKit.gypi:
+ Added the new file.
+
+ * tests/RenderTableCellTest.cpp:
+ Removed the row index tests as they are now in the following file.
+
+ * tests/RenderTableRowTest.cpp: Copied from Source/WebKit/chromium/tests/RenderTableCellTest.cpp.
+ Changed a bit the row index tests and re-enabled them.
+
+2012-05-01 Pavel Feldman <pfeldman@chromium.org>
+
+ WebKit unit tests RenderTableCellDeathTest.CanSetRow* are failing as of r115705
+ https://bugs.webkit.org/show_bug.cgi?id=85274
+
+ Not reviewed: test disabled.
+
+ * tests/RenderTableCellTest.cpp:
+
+2012-05-01 Pavel Feldman <pfeldman@chromium.org>
+
+ WebKit test RenderTableCellDeathTest.CanSetRow is failing as of r115705
+ https://bugs.webkit.org/show_bug.cgi?id=85274
+
+ Not reviewed: test disabled.
+
+ The test is based on the standalone cell, while the new logic
+ requires parent to be present upon the row index set.
+
+ * tests/RenderTableCellTest.cpp:
+
+2012-05-01 Hironori Bono <hbono@chromium.org>
+
+ [Chromium] Regression r113405 ContextMenuImpl does not set a misspelled word
+ https://bugs.webkit.org/show_bug.cgi?id=85271
+
+ Reviewed by Kent Tamura.
+
+ This change calls selectMisspelledWord() to get a misspelled word so Chrome can
+ set the misspelledWord variable without selecting text.
+
+ * src/ContextMenuClientImpl.cpp:
+ (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
+
+2012-04-30 Kent Tamura <tkent@chromium.org>
+
+ [Chromium/Windows] Add LocalizedDateWin
+ https://bugs.webkit.org/show_bug.cgi?id=84935
+
+ Reviewed by Kentaro Hara.
+
+ Add test for LocaleWin.cpp.
+
+ * WebKit.gypi:
+ * tests/LocaleWinTest.cpp: Added.
+ (msForDate): A helper function.
+ (TEST):
+
+2012-04-30 Julien Chaffraix <jchaffraix@webkit.org>
+
+ Move RenderTableCell's row index to RenderTableRow
+ https://bugs.webkit.org/show_bug.cgi?id=85229
+
+ Reviewed by Ojan Vafai.
+
+ * tests/RenderTableCellTest.cpp:
+ Updated after the refactoring.
+
+2012-04-30 Gavin Peters <gavinp@chromium.org>
+
+ [Chromium] Add thunk headers for staging Prerendering API.
+ https://bugs.webkit.org/show_bug.cgi?id=84880
+
+ Reviewed by Adam Barth.
+
+ These empty headers will be replaced by the actual API when Bug 85005 is commited.
+
+ * WebKit.gyp:
+ * public/WebPrerendererClient.h: Added.
+ (WebKit):
+ (WebPrerendererClient):
+ * public/WebView.h:
+ (WebKit):
+ (WebKit::WebView::setPrerendererClient):
+
+2012-04-30 Ilya Sherman <isherman@chromium.org>
+
+ [Chromium] Fix Autofill popup visibility behavior
+ Prevent users from interacting with invisible Autofill popups rendered outside the main frame's contents view.
+ This is a recommit of r115400, restricted to just Autofill popups.
+ https://bugs.webkit.org/show_bug.cgi?id=84420
+
+ Reviewed by Abhishek Arya
+
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::popupOpened): Hide popups rendered outside the main frame's contents view.
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::applyAutofillSuggestions): Fix up order of operations to support immediately hiding a popup if it would not be visible
+
+2012-04-30 Sadrul Habib Chowdhury <sadrul@chromium.org>
+
+ [chromium] Disable battery-status API support.
+
+ The battery-status API support should not have view-dependency. So disable it until
+ that is fixed.
+ https://bugs.webkit.org/show_bug.cgi?id=84499
+
+ Reviewed by Adam Barth.
+
+ * features.gypi:
+
+2012-04-30 Gavin Peters <gavinp@chromium.org>
+
+ [Chromium] Remove Webkit/chromium/public/WebReferrerPolicy.h thunk.
+ https://bugs.webkit.org/show_bug.cgi?id=84552
+
+ After http://codereview.chromium.org/10139023/ lands, this thunk is no
+ longer needed.
+
+ Reviewed by Adam Barth.
+
+ * WebKit.gyp:
+ * public/WebReferrerPolicy.h: Removed.
+
+2012-04-29 Sam Weinig <sam@webkit.org>
+
+ Remove BlobBuilder
+ https://bugs.webkit.org/show_bug.cgi?id=84036
+
+ Reviewed by Anders Carlsson.
+
+ * features.gypi:
+ Keep WebKitBlobBuilder enabled for Chromium, since it has shipped it.
+
+2012-04-30 Min Qin <qinmin@google.com>
+
+ Expose a flag so that fullscreen video on android can work with FULLSCREEN_API
+ https://bugs.webkit.org/show_bug.cgi?id=84414
+
+ Reviewed by Darin Fisher.
+
+ On android, the fullscreen video was implemented by passing a java
+ surfaceView to an android mediaplayer class.
+ The implementation of that logic should happen in WebKit::WebMediaPlayer.
+ This change makes it possble for WebViewImpl::enterFullScreenForElement()
+ to call WebMediaPlayer->enterFullscreen(), thus solving the issue.
+
+ Sorry, there is a merge error during the previous commit, resolved now
+
+ No new tests. This just exposes the flag so later it can be used by android.
+
+ * features.gypi:
+ * public/WebMediaPlayer.h:
+ (WebMediaPlayer):
+ (WebKit::WebMediaPlayer::enterFullscreen):
+ (WebKit::WebMediaPlayer::exitFullscreen):
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit):
+ (WebKit::WebMediaPlayerClientImpl::enterFullscreen):
+ (WebKit::WebMediaPlayerClientImpl::exitFullscreen):
+ * src/WebMediaPlayerClientImpl.h:
+ (WebMediaPlayerClientImpl):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::enterFullScreenForElement):
+ (WebKit::WebViewImpl::exitFullScreenForElement):
+
+2012-04-30 Gavin Peters <gavinp@chromium.org>
+
+ Unreviewed. Rolled DEPS.
+
+ * DEPS:
+
+2012-04-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Remove PlatformSupport::loadPlatformAudioResource, call loadResource directly
+ https://bugs.webkit.org/show_bug.cgi?id=85193
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+
+2012-04-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Call defaultLocale directly
+ https://bugs.webkit.org/show_bug.cgi?id=85192
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+
+2012-04-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Use new syntax to call callOnMainThread directly
+ https://bugs.webkit.org/show_bug.cgi?id=85190
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/ChromiumThreading.cpp:
+ (WTF::ChromiumThreading::callOnMainThread):
+
+2012-04-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Use new syntax to call monotonicallyIncreasingTime directly
+ https://bugs.webkit.org/show_bug.cgi?id=85189
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/ChromiumCurrentTime.cpp:
+ (WTF::monotonicallyIncreasingTime):
+
+2012-04-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Use new syntax to call userAgent directly
+ https://bugs.webkit.org/show_bug.cgi?id=85188
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::userAgent):
+
+2012-04-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Use new syntax to call currentTime directly
+ https://bugs.webkit.org/show_bug.cgi?id=85187
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/ChromiumCurrentTime.cpp:
+ (WTF::currentTime):
+
+2012-04-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Use new syntax to call currentThread directly
+ https://bugs.webkit.org/show_bug.cgi?id=85185
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/CCThreadImpl.cpp:
+ (WebKit::CCThreadImpl::CCThreadImpl):
+ * src/WebCompositorImpl.cpp:
+ (WebKit::WebCompositorImpl::initialize):
+
+2012-04-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Use new syntax to call createThread directly
+ https://bugs.webkit.org/show_bug.cgi?id=85186
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::CCLayerTreeHostTest::runTest):
+ * tests/Canvas2DLayerChromiumTest.cpp:
+ (Canvas2DLayerChromiumTest::fullLifecycleTest):
+
+2012-04-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Use new syntax to call createSocketStreamHandle directly
+ https://bugs.webkit.org/show_bug.cgi?id=85184
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/SocketStreamHandle.cpp:
+ (WebCore::SocketStreamHandleInternal::connect):
+
+2012-04-29 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Call highUsageDeltaMB directly
+ https://bugs.webkit.org/show_bug.cgi?id=84844
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+
+2012-04-28 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: InspectorFrontendHost.append has to be implemented for saving heap snapshots.
+ https://bugs.webkit.org/show_bug.cgi?id=85137
+
+ We can save a file with help of InspectorFrontendHost.save method,
+ but it is suitable only for relatively small portions of data and
+ can't process the 6Gb heap snapshot.
+ These methods just pass the url and content into embedder.
+
+ Reviewed by Yury Semikhatsky.
+
+ * public/WebDevToolsFrontendClient.h:
+ (WebKit::WebDevToolsFrontendClient::append):
+ * src/InspectorFrontendClientImpl.cpp:
+ (WebKit::InspectorFrontendClientImpl::append):
+ (WebKit):
+ * src/InspectorFrontendClientImpl.h:
+ (InspectorFrontendClientImpl):
+
+2012-04-28 Andrey Kosyakov <caseq@chromium.org>
+
+ [chromium] add frame boundaries instrumentation for the threaded compositor
+ https://bugs.webkit.org/show_bug.cgi?id=83926
+
+ - call instrumentBeginFrame() in a callback invoked by CCThreadProxy to fix frame marks in WebInspector's
+ timeline panel, currently broken for threaded compositor.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::willBeginFrame):
+
+2012-04-27 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r115529.
+ http://trac.webkit.org/changeset/115529
+ https://bugs.webkit.org/show_bug.cgi?id=85125
+
+ Broke Clang build (Requested by enne on #webkit).
+
+ * WebKit.gypi:
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::setVideoFrameProviderClient):
+ * src/WebMediaPlayerClientImpl.h:
+ (WebMediaPlayerClientImpl):
+ * tests/WebMediaPlayerClientImplTest.cpp: Removed.
+
+2012-04-27 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Call highMemoryUsageMB directly
+ https://bugs.webkit.org/show_bug.cgi?id=84841
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+
+2012-04-27 Adrienne Walker <enne@google.com>
+
+ [chromium] Allow WebMediaPlayerClientImpl to switch clients
+ https://bugs.webkit.org/show_bug.cgi?id=85093
+
+ Reviewed by James Robinson.
+
+ WebVideoFrameProviderClient has a 1:1 relationship with a
+ WebVideoFrameProvider. The client here is CCVideoLayerImpl and the
+ provider is WebMediaPlayerClientImpl. If the provider gets a new
+ client, then the old client needs to be informed to stop using the
+ provider.
+
+ If this doesn't happen, then the old client will have an unsafe
+ pointer to the provider, will not get informed if the provider gets
+ deleted, and the client will crash when it dereferences the provider
+ pointer trying to tell the provider that its client is going away.
+
+ Test: WebMediaPlayerClientImplTest.InitialNullVideoClient
+ WebMediaPlayerClientImplTest.SetAndUnsetVideoClient
+ WebMediaPlayerClientImplTest.DestroyProvider
+ WebMediaPlayerClientImplTest.SetMultipleVideoClients
+
+ * WebKit.gypi:
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::setVideoFrameProviderClient):
+ * src/WebMediaPlayerClientImpl.h:
+ (WebMediaPlayerClientImpl):
+ * tests/WebMediaPlayerClientImplTest.cpp: Added.
+ (WebKit):
+ (FakeWebMediaPlayerClientImpl):
+ (WebKit::FakeWebMediaPlayerClientImpl::create):
+ (WebKit::FakeWebMediaPlayerClientImpl::FakeWebMediaPlayerClientImpl):
+ (FakeVideoFrameProviderClient):
+ (WebKit::FakeVideoFrameProviderClient::create):
+ (WebKit::FakeVideoFrameProviderClient::~FakeVideoFrameProviderClient):
+ (WebKit::FakeVideoFrameProviderClient::didReceiveFrame):
+ (WebKit::FakeVideoFrameProviderClient::didUpdateMatrix):
+ (WebKit::FakeVideoFrameProviderClient::stopUsingProvider):
+ (WebKit::FakeVideoFrameProviderClient::provider):
+ (WebKit::FakeVideoFrameProviderClient::FakeVideoFrameProviderClient):
+ (WebKit::TEST):
+
+2012-04-27 Tony Chang <tony@chromium.org>
+
+ [chromium] Fix compiler warning in CCSchedulerTest.cpp with gcc 4.6.3
+ https://bugs.webkit.org/show_bug.cgi?id=85110
+
+ Reviewed by James Robinson.
+
+ Using gcc 4.6.3 (default on Precise), I get:
+ third_party/WebKit/Source/WebKit/chromium/tests/CCSchedulerTest.cpp:188:5: error: converting 'false' to pointer type
+ for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
+
+ * tests/CCSchedulerTest.cpp:
+ (WebKitTests::TEST):
+
+2012-04-27 Nat Duca <nduca@chromium.org>
+
+ Expose high-resolution on requestAnimationFrame callback
+ https://bugs.webkit.org/show_bug.cgi?id=66683
+
+ This changes requestAnimationFrame's animationStartTime argument
+ to be a high resolution DOM timestamp, per disucssion here:
+ http://lists.w3.org/Archives/Public/public-web-perf/2012Apr/0004.html
+
+ Reviewed by James Robinson.
+
+ * src/PageWidgetDelegate.cpp:
+ (WebKit::PageWidgetDelegate::animate):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::updateAnimations):
+
+2012-04-27 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Call lowMemoryUsageMB directly
+ https://bugs.webkit.org/show_bug.cgi?id=84840
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+
+2012-04-27 Ian Vollick <vollick@chromium.org>
+
+ [chromium] Add pause and resume support for accelerated css animations.
+ https://bugs.webkit.org/show_bug.cgi?id=84601
+
+ Reviewed by James Robinson.
+
+ * tests/CCActiveAnimationTest.cpp:
+ (WebCore::TEST):
+ (WebCore):
+ * tests/CCLayerAnimationControllerTest.cpp:
+ (WebKitTests::TEST):
+ (WebKitTests):
+
+2012-04-26 James Robinson <jamesr@chromium.org>
+
+ [chromium] Separate IOSurface layer type from texture layers
+ https://bugs.webkit.org/show_bug.cgi?id=85030
+
+ Reviewed by Adrienne Walker.
+
+ Update WebPluginContainerImpl to support having either a texture or IOSurface layer (but never both) depending
+ on the plugin's contents.
+
+ * WebKit.gyp:
+ * src/WebExternalTextureLayer.cpp:
+ * src/WebIOSurfaceLayer.cpp:
+ (WebKit):
+ (WebKit::WebIOSurfaceLayer::create):
+ (WebKit::WebIOSurfaceLayer::setIOSurfaceProperties):
+ (WebKit::WebIOSurfaceLayer::WebIOSurfaceLayer):
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::setBackingTextureId):
+ (WebKit::WebPluginContainerImpl::setBackingIOSurfaceId):
+ (WebKit::WebPluginContainerImpl::commitBackingTexture):
+ (WebKit::WebPluginContainerImpl::setOpaque):
+ (WebKit::WebPluginContainerImpl::platformLayer):
+ (WebKit::WebPluginContainerImpl::WebPluginContainerImpl):
+ * src/WebPluginContainerImpl.h:
+ (WebPluginContainerImpl):
+
+2012-04-27 Hans Wennborg <hans@chromium.org>
+
+ Speech JavaScript API: Fix Vector use failure
+ https://bugs.webkit.org/show_bug.cgi?id=85069
+
+ Reviewed by Tony Gentilcore.
+
+ Fix think-o in code copying from WebVector to Vector.
+
+ * src/SpeechRecognitionClientProxy.cpp:
+ (WebKit::SpeechRecognitionClientProxy::didReceiveResult):
+ (WebKit::SpeechRecognitionClientProxy::didDeleteResult):
+ * src/WebSpeechRecognitionResult.cpp:
+ (WebKit::WebSpeechRecognitionResult::assign):
+
+2012-04-27 Leandro Gracia Gil <leandrogracia@chromium.org>
+
+ Selectively retrieve text around a touched point.
+ https://bugs.webkit.org/show_bug.cgi?id=82460
+
+ Reviewed by Darin Fisher.
+
+ Implements an embedding API to WebCore's SurroundingText, adding also
+ the possibility of select and highlight the retrieved text range.
+
+ * WebKit.gyp:
+ * public/WebFrame.h:
+ (WebFrame):
+ * public/WebHitTestResult.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebHitTestResult):
+ (WebKit::WebHitTestResult::WebHitTestResult):
+ (WebKit::WebHitTestResult::~WebHitTestResult):
+ * public/WebRange.h:
+ (WebKit):
+ (WebRange):
+ * public/WebSurroundingText.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebSurroundingText):
+ (WebKit::WebSurroundingText::WebSurroundingText):
+ (WebKit::WebSurroundingText::~WebSurroundingText):
+ * public/WebView.h:
+ (WebKit):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::selectRange):
+ (WebKit):
+ * src/WebFrameImpl.h:
+ (WebFrameImpl):
+ * src/WebHitTestResult.cpp: Added.
+ (WebKit):
+ (WebKit::WebHitTestResult::node):
+ (WebKit::WebHitTestResult::localPoint):
+ (WebKit::WebHitTestResult::WebHitTestResult):
+ (WebKit::WebHitTestResult::operator=):
+ (WebKit::WebHitTestResult::operator HitTestResult):
+ (WebKit::WebHitTestResult::isNull):
+ (WebKit::WebHitTestResult::assign):
+ (WebKit::WebHitTestResult::reset):
+ * src/WebRange.cpp:
+ (WebKit::WebRange::textQuads):
+ (WebKit):
+ * src/WebSurroundingText.cpp: Added.
+ (WebKit):
+ (WebKit::WebSurroundingText::initialize):
+ (WebKit::WebSurroundingText::textContent):
+ (WebKit::WebSurroundingText::hitOffsetInTextContent):
+ (WebKit::WebSurroundingText::rangeFromContentOffsets):
+ (WebKit::WebSurroundingText::isNull):
+ (WebKit::WebSurroundingText::reset):
+
+2012-04-27 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, rolling out r115463.
+ http://trac.webkit.org/changeset/115463
+ https://bugs.webkit.org/show_bug.cgi?id=82460
+
+ Broke Mac build.
+
+ * WebKit.gyp:
+ * public/WebFrame.h:
+ (WebFrame):
+ * public/WebHitTestResult.h: Removed.
+ * public/WebRange.h:
+ (WebRange):
+ * public/WebSurroundingText.h: Removed.
+ * public/WebView.h:
+ (WebKit):
+ * src/WebFrameImpl.cpp:
+ * src/WebFrameImpl.h:
+ (WebFrameImpl):
+ * src/WebHitTestResult.cpp: Removed.
+ * src/WebRange.cpp:
+ * src/WebSurroundingText.cpp: Removed.
+
+2012-04-27 Kausalya Madhusudhanan <kmadhusu@chromium.org>
+
+ Added a chromium webkit public header file to support different web print scaling options.
+ https://bugs.webkit.org/show_bug.cgi?id=84608
+
+ Reviewed by Darin Fisher.
+
+ * WebKit.gyp:
+ * public/WebPrintScalingOption.h: Added.
+ (WebKit):
+
+2012-04-27 Leandro Gracia Gil <leandrogracia@chromium.org>
+
+ Selectively retrieve text around a touched point.
+ https://bugs.webkit.org/show_bug.cgi?id=82460
+
+ Reviewed by Darin Fisher.
+
+ Implements an embedding API to WebCore's SurroundingText, adding also
+ the possibility of select and highlight the retrieved text range.
+
+ * WebKit.gyp:
+ * public/WebFrame.h:
+ (WebFrame):
+ * public/WebHitTestResult.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebHitTestResult):
+ (WebKit::WebHitTestResult::WebHitTestResult):
+ (WebKit::WebHitTestResult::~WebHitTestResult):
+ * public/WebRange.h:
+ (WebKit):
+ (WebRange):
+ * public/WebSurroundingText.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebSurroundingText):
+ (WebKit::WebSurroundingText::WebSurroundingText):
+ (WebKit::WebSurroundingText::~WebSurroundingText):
+ * public/WebView.h:
+ (WebKit):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::selectRange):
+ (WebKit):
+ * src/WebFrameImpl.h:
+ (WebFrameImpl):
+ * src/WebHitTestResult.cpp: Added.
+ (WebKit):
+ (WebKit::WebHitTestResult::node):
+ (WebKit::WebHitTestResult::localPoint):
+ (WebKit::WebHitTestResult::WebHitTestResult):
+ (WebKit::WebHitTestResult::operator=):
+ (WebKit::WebHitTestResult::operator HitTestResult):
+ (WebKit::WebHitTestResult::isNull):
+ (WebKit::WebHitTestResult::assign):
+ (WebKit::WebHitTestResult::reset):
+ * src/WebRange.cpp:
+ (WebKit::WebRange::textQuads):
+ (WebKit):
+ * src/WebSurroundingText.cpp: Added.
+ (WebKit):
+ (WebKit::WebSurroundingText::initialize):
+ (WebKit::WebSurroundingText::textContent):
+ (WebKit::WebSurroundingText::hitOffsetInTextContent):
+ (WebKit::WebSurroundingText::rangeFromContentOffsets):
+ (WebKit::WebSurroundingText::isNull):
+ (WebKit::WebSurroundingText::reset):
+
+2012-04-27 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r115436.
+ http://trac.webkit.org/changeset/115436
+ https://bugs.webkit.org/show_bug.cgi?id=85079
+
+ "broke the build" (Requested by tonyg-cr on #webkit).
+
+ * WebKit.gyp:
+ * public/WebReferrerPolicy.h: Added.
+
+2012-04-27 Gavin Peters <gavinp@chromium.org>
+
+ Add new ENABLE_LINK_PRERENDER define to control the Prerendering API
+ https://bugs.webkit.org/show_bug.cgi?id=84871
+
+ Reviewed by Adam Barth.
+
+ Prerendering is currently covered by the ENABLE_LINK_PREFETCH macro, but the new Prerendering
+ API separates it from prefetching. Having separate include guards lets ports enable prefetching,
+ a relatively easy change, without needing to build the infrastructure for prerendering, which
+ is considerably more complicated.
+
+2012-04-27 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, rolling out r115433.
+ http://trac.webkit.org/changeset/115433
+ https://bugs.webkit.org/show_bug.cgi?id=85052
+
+ Enable unit tests again.
+
+ * tests/PopupMenuTest.cpp:
+ (WebKit::TEST_F):
+
+2012-04-27 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, rolling out r115421.
+ http://trac.webkit.org/changeset/115421
+ https://bugs.webkit.org/show_bug.cgi?id=85052
+
+ Enable unit tests again.
+
+ * tests/PopupMenuTest.cpp:
+ (WebKit::TEST_F):
+
+2012-04-27 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, rolling out r115400.
+ http://trac.webkit.org/changeset/115400
+ https://bugs.webkit.org/show_bug.cgi?id=84420
+
+ Broke unit tests.
+
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::popupOpened):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::applyAutofillSuggestions):
+
+2012-04-27 Gavin Peters <gavinp@chromium.org>
+
+ [Chromium] Remove Webkit/chromium/public/WebReferrerPolicy.h thunk.
+ https://bugs.webkit.org/show_bug.cgi?id=84552
+
+ After http://codereview.chromium.org/10139023/ lands, this thunk is no
+ longer needed.
+
+ Reviewed by Adam Barth.
+
+ * WebKit.gyp:
+ * public/WebReferrerPolicy.h: Removed.
+
+2012-04-27 Marcus Bulach <bulach@chromium.org>
+
+ [chromium] Disables a few more webkit_unittests.
+ https://bugs.webkit.org/show_bug.cgi?id=85052
+
+ Unreviewed build fix.
+
+ Failing on Windows bots, probably due to r115400.
+
+ * tests/PopupMenuTest.cpp:
+ (WebKit::TEST_F):
+
+2012-04-27 Marcus Bulach <bulach@chromium.org>
+
+ [chromium] Disables a few webkit_unittests.
+ https://bugs.webkit.org/show_bug.cgi?id=85052
+
+ Unreviewed build fix.
+
+ * tests/PopupMenuTest.cpp:
+ (WebKit::TEST_F):
+
+2012-04-24 James Robinson <jamesr@chromium.org>
+
+ [chromium] Move ProgramBinding definitions to LayerRendererChromium and normalize naming
+ https://bugs.webkit.org/show_bug.cgi?id=84808
+
+ Reviewed by Adrienne Walker.
+
+ Add some includes needed by this test that were previously picked up by upstream headers.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+
+2012-04-26 Ilya Sherman <isherman@chromium.org>
+
+ [Chromium] Security: Autofill info can be captured by innocuous social engineering
+ Prevent users from interacting with invisible popups rendered outside the main frame's contents view.
+ https://bugs.webkit.org/show_bug.cgi?id=84420
+ https://code.google.com/p/chromium/issues/detail?id=122925
+
+ Reviewed by Kent Tamura.
+
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::popupOpened): Hide popups rendered outside the main frame's contents view.
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::applyAutofillSuggestions): Fix up order of operations to support immediately hiding a popup if it would not be visible
+
+2012-04-26 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Some background filters require inflating damage on the surface behind them
+ https://bugs.webkit.org/show_bug.cgi?id=84479
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCDamageTrackerTest.cpp:
+ (WebKitTests::TEST_F):
+ (WebKitTests):
+
+2012-04-26 Aaron Colwell <acolwell@chromium.org>
+
+ Cleanup WebMediaPlayer enum values that didn't match Chromium style guidelines
+ https://bugs.webkit.org/show_bug.cgi?id=84998
+
+ Reviewed by Darin Fisher.
+
+ * public/WebMediaPlayer.h:
+ (WebKit::WebMediaPlayer::generateKeyRequest):
+ (WebKit::WebMediaPlayer::addKey):
+ (WebKit::WebMediaPlayer::cancelKeyRequest):
+
+2012-04-26 Shawn Singh <shawnsingh@chromium.org>
+
+ [chromium] re-implement backFaceVisibility to avoid dealing with perspective w<0 problem
+ https://bugs.webkit.org/show_bug.cgi?id=84059
+
+ Reviewed by Adrienne Walker.
+
+ * WebKit.gypi:
+ * tests/CCMathUtilTest.cpp: Added.
+ (WebCore):
+ (WebCore::TEST):
+
+2012-04-26 Justin Novosad <junov@chromium.org>
+
+ [Chromium] Single buffered canvas layers with the threaded compositor
+ https://bugs.webkit.org/show_bug.cgi?id=80540
+
+ Reviewed by James Robinson.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::CCLayerTreeHostTest::AcquireLayerTextures):
+ (CCLayerTreeHostTest):
+ (WTF::CCLayerTreeHostTest::dispatchAcquireLayerTextures):
+ (WTF::TEST_F):
+ (WTF):
+ (CCLayerTreeHostTestWriteLayersRedraw):
+ (WTF::CCLayerTreeHostTestWriteLayersRedraw::CCLayerTreeHostTestWriteLayersRedraw):
+ (WTF::CCLayerTreeHostTestWriteLayersRedraw::beginTest):
+ (WTF::CCLayerTreeHostTestWriteLayersRedraw::drawLayersOnCCThread):
+ (WTF::CCLayerTreeHostTestWriteLayersRedraw::commitCompleteOnCCThread):
+ (WTF::CCLayerTreeHostTestWriteLayersRedraw::afterTest):
+ (CCLayerTreeHostTestWriteLayersAfterVisible):
+ (WTF::CCLayerTreeHostTestWriteLayersAfterVisible::CCLayerTreeHostTestWriteLayersAfterVisible):
+ (WTF::CCLayerTreeHostTestWriteLayersAfterVisible::beginTest):
+ (WTF::CCLayerTreeHostTestWriteLayersAfterVisible::commitCompleteOnCCThread):
+ (WTF::CCLayerTreeHostTestWriteLayersAfterVisible::afterTest):
+ * tests/CCSchedulerTest.cpp:
+ (WebKitTests::TEST):
+ (WebKitTests):
+ * tests/Canvas2DLayerChromiumTest.cpp:
+ (Canvas2DLayerChromiumTest::fullLifecycleTest):
+
+2012-04-26 Joshua Bell <jsbell@chromium.org>
+
+ [Chromium] IndexedDB: Use WebIDBKeyPath type for key paths in WebKit API
+ https://bugs.webkit.org/show_bug.cgi?id=84631
+
+ Reviewed by James Robinson.
+
+ WebIDBKeyPath was previously a utility class for parsing key paths into components,
+ but the API exposed key paths only as nullable strings. To support array-type keypaths,
+ WebIDBKeyPath becomes a value class with type flags. For landing, several legacy methods
+ are retained but will be cleaned up after all callers have been updated, tracked as
+ the bug: http://webkit.org/b/84207
+
+ * public/WebIDBDatabase.h:
+ (WebKit::WebIDBDatabase::createObjectStore): Add WebIDBKeyPath overload; WebString overload delegates so implementers can switch.
+ * public/WebIDBIndex.h:
+ (WebKit::WebIDBIndex::keyPath): Calls keyPathString if not overridden.
+ (WebKit::WebIDBIndex::keyPathString): Comment change.
+ * public/WebIDBKeyPath.h:
+ (WebKit::WebIDBKeyPath::create): Overload added for creating array-type key paths.
+ (WebKit::WebIDBKeyPath::array): Accessor for array-type key paths.
+ (WebKit::WebIDBKeyPath::operator const WebString ): Temporary, for compatibility.
+ * public/WebIDBObjectStore.h:
+ (WebKit::WebIDBObjectStore::keyPath): Calls keyPathString if not overridden.
+ (WebKit::WebIDBObjectStore::keyPathString): Comment change.
+ (WebKit::WebIDBObjectStore::createIndex): Add WebIDBKeyPath overload; WebString overload delegates so implementers can switch.
+ * public/platform/WebKitPlatformSupport.h:
+ (WebKitPlatformSupport): WebIDBKeyPath overloads for these methods added, delegate to WebString version until implementers are updated.
+ (WebKit::WebKitPlatformSupport::createIDBKeysFromSerializedValuesAndKeyPath):
+ (WebKit::WebKitPlatformSupport::injectIDBKeyIntoSerializedValue):
+ * src/IDBIndexBackendProxy.cpp:
+ (WebKit::IDBIndexBackendProxy::keyPath): Returns the string version until WebCore is updated.
+ * src/IDBObjectStoreBackendProxy.cpp:
+ (WebKit::IDBObjectStoreBackendProxy::keyPath): Returns the string version until WebCore is updated.
+ * src/WebIDBDatabaseImpl.h:
+ (WebIDBDatabaseImpl): Add createObjectStore overload for WebIDBKeyPath type, delegates to WebString version until callers are updated.
+ * src/WebIDBIndexImpl.cpp:
+ (WebKit::WebIDBIndexImpl::keyPath): Implements the new WebIDBKeyPath return type.
+ (WebKit):
+ * src/WebIDBIndexImpl.h:
+ (WebIDBIndexImpl): Implements the new WebIDBKeyPath return type.
+ * src/WebIDBKeyPath.cpp:
+ (WebKit::WebIDBKeyPath::create): Support null key path types.
+ (WebKit::WebIDBKeyPath::createNull): New API.
+ (WebKit):
+ (WebKit::WebIDBKeyPath::isValid): New API.
+ (WebKit::WebIDBKeyPath::type): New API.
+ (WebKit::WebIDBKeyPath::string): New API (value accessor).
+ (WebKit::WebIDBKeyPath::WebIDBKeyPath):
+ (WebKit::WebIDBKeyPath::assign): This API will be removed.
+ (WebKit::WebIDBKeyPath::operator const WTF::Vector<WTF::String, 0>&): Ensure it is non-null - only used in copy constructor which guards against this.
+ * src/WebIDBObjectStoreImpl.cpp:
+ (WebKit::WebIDBObjectStoreImpl::keyPath): Implement the new WebIDBKeyPath return type.
+ (WebKit):
+ * src/WebIDBObjectStoreImpl.h:
+ (WebIDBObjectStoreImpl): Add createIndex overload for WebIDBKeyPath type, delegates to WebString version until callers are updated.
+
+2012-04-26 Alexander Pavlov <apavlov@chromium.org>
+
+ Web Inspector: [CRASH] WebViewImpl::setZoomLevel when emulating device metrics
+ https://bugs.webkit.org/show_bug.cgi?id=84938
+
+ Check for the presence of a live Frame/FrameView before invoking methods that depend on them.
+
+ Reviewed by Yury Semikhatsky.
+
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::DeviceMetricsSupport::restore):
+
+2012-04-25 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Remove guarded virtual methods from WebFilterOperation API
+ https://bugs.webkit.org/show_bug.cgi?id=84926
+
+ Reviewed by James Robinson.
+
+ * src/AssertMatchingEnums.cpp:
+
+2012-04-25 James Robinson <jamesr@chromium.org>
+
+ [chromium] REGRESSION(112286) Compositor initialization blocks for program compilation / linking
+ https://bugs.webkit.org/show_bug.cgi?id=84822
+
+ Reviewed by Adrienne Walker.
+
+ Add a test that makes sure we don't make blocking calls during LayerRendererChromium initialization.
+
+ * tests/LayerRendererChromiumTest.cpp:
+ (ForbidSynchronousCallContext):
+ (ForbidSynchronousCallContext::ForbidSynchronousCallContext):
+ (ForbidSynchronousCallContext::finish):
+ (ForbidSynchronousCallContext::getActiveAttrib):
+ (ForbidSynchronousCallContext::getActiveUniform):
+ (ForbidSynchronousCallContext::getAttachedShaders):
+ (ForbidSynchronousCallContext::getAttribLocation):
+ (ForbidSynchronousCallContext::getBooleanv):
+ (ForbidSynchronousCallContext::getBufferParameteriv):
+ (ForbidSynchronousCallContext::getContextAttributes):
+ (ForbidSynchronousCallContext::getError):
+ (ForbidSynchronousCallContext::getFloatv):
+ (ForbidSynchronousCallContext::getFramebufferAttachmentParameteriv):
+ (TEST):
+
+2012-04-25 Alec Flett <alecflett@chromium.org>
+
+ IndexedDB: implement cursor.advance()
+ https://bugs.webkit.org/show_bug.cgi?id=84174
+
+ Reviewed by Ojan Vafai.
+
+ Hook up chromium IPC to IDBCursor.advance().
+
+ * src/IDBCursorBackendProxy.cpp:
+ (WebKit::IDBCursorBackendProxy::advance):
+ (WebKit):
+ * src/IDBCursorBackendProxy.h:
+ (IDBCursorBackendProxy):
+ * src/WebIDBCursorImpl.cpp:
+ (WebKit::WebIDBCursorImpl::advance):
+
+2012-04-25 Alpha Lam <hclam@chromium.org>
+
+ Unreviewed, rolling out r115262.
+ http://trac.webkit.org/changeset/115262
+ https://bugs.webkit.org/show_bug.cgi?id=84631
+
+ r115262 is causing link error in WebKit Win Builder (dbg)
+
+ * public/WebIDBDatabase.h:
+ (WebKit::WebIDBDatabase::createObjectStore):
+ * public/WebIDBIndex.h:
+ (WebKit::WebIDBIndex::keyPath):
+ (WebKit::WebIDBIndex::keyPathString):
+ * public/WebIDBKeyPath.h:
+ (WebKit):
+ (WebIDBKeyPath):
+ * public/WebIDBObjectStore.h:
+ (WebKit::WebIDBObjectStore::keyPath):
+ (WebKit::WebIDBObjectStore::keyPathString):
+ (WebKit::WebIDBObjectStore::createIndex):
+ * public/platform/WebKitPlatformSupport.h:
+ (WebKit::WebKitPlatformSupport::createIDBKeysFromSerializedValuesAndKeyPath):
+ (WebKit::WebKitPlatformSupport::injectIDBKeyIntoSerializedValue):
+ * src/IDBIndexBackendProxy.cpp:
+ (WebKit::IDBIndexBackendProxy::keyPath):
+ * src/IDBObjectStoreBackendProxy.cpp:
+ (WebKit::IDBObjectStoreBackendProxy::keyPath):
+ * src/WebIDBDatabaseImpl.h:
+ (WebIDBDatabaseImpl):
+ * src/WebIDBIndexImpl.cpp:
+ * src/WebIDBIndexImpl.h:
+ (WebIDBIndexImpl):
+ * src/WebIDBKeyPath.cpp:
+ (WebKit::WebIDBKeyPath::create):
+ (WebKit::WebIDBKeyPath::assign):
+ (WebKit::WebIDBKeyPath::operator const WTF::Vector<WTF::String, 0>&):
+ * src/WebIDBObjectStoreImpl.cpp:
+ * src/WebIDBObjectStoreImpl.h:
+ (WebIDBObjectStoreImpl):
+ (WebKit::WebIDBObjectStoreImpl::createIndex):
+
+2012-04-24 Adrienne Walker <enne@google.com>
+
+ [chromium] Prevent CCLayerImpl::willDraw/didDraw mismatches
+ https://bugs.webkit.org/show_bug.cgi?id=84812
+
+ Reviewed by James Robinson.
+
+ Update all tests to call CCLayerTreeHostImpl::didDrawAllLayers if they
+ call CCLayerTreeHostImpl::prepareToDraw.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::CCLayerTreeHostImplTest::initializeLayerRendererAndDrawFrame):
+ (WebKitTests::TEST_F):
+
+2012-04-25 Joshua Bell <jsbell@chromium.org>
+
+ [Chromium] IndexedDB: Use WebIDBKeyPath type for key paths in WebKit API
+ https://bugs.webkit.org/show_bug.cgi?id=84631
+
+ Reviewed by James Robinson.
+
+ WebIDBKeyPath was previously a utility class for parsing key paths into components,
+ but the API exposed key paths only as nullable strings. To support array-type keypaths,
+ WebIDBKeyPath becomes a value class with type flags. For landing, several legacy methods
+ are retained but will be cleaned up after all callers have been updated, tracked as
+ the bug: http://webkit.org/b/84207
+
+ * public/WebIDBDatabase.h:
+ (WebKit::WebIDBDatabase::createObjectStore): Add WebIDBKeyPath overload; WebString overload delegates so implementers can switch.
+ * public/WebIDBIndex.h:
+ (WebKit::WebIDBIndex::keyPath): Calls keyPathString if not overridden.
+ (WebKit::WebIDBIndex::keyPathString): Comment change.
+ * public/WebIDBKeyPath.h:
+ (WebKit::WebIDBKeyPath::create): Overload added for creating array-type key paths.
+ (WebKit::WebIDBKeyPath::array): Accessor for array-type key paths.
+ (WebKit::WebIDBKeyPath::operator const WebString ): Temporary, for compatibility.
+ * public/WebIDBObjectStore.h:
+ (WebKit::WebIDBObjectStore::keyPath): Calls keyPathString if not overridden.
+ (WebKit::WebIDBObjectStore::keyPathString): Comment change.
+ (WebKit::WebIDBObjectStore::createIndex): Add WebIDBKeyPath overload; WebString overload delegates so implementers can switch.
+ * public/platform/WebKitPlatformSupport.h:
+ (WebKitPlatformSupport): WebIDBKeyPath overloads for these methods added, delegate to WebString version until implementers are updated.
+ (WebKit::WebKitPlatformSupport::createIDBKeysFromSerializedValuesAndKeyPath):
+ (WebKit::WebKitPlatformSupport::injectIDBKeyIntoSerializedValue):
+ * src/IDBIndexBackendProxy.cpp:
+ (WebKit::IDBIndexBackendProxy::keyPath): Returns the string version until WebCore is updated.
+ * src/IDBObjectStoreBackendProxy.cpp:
+ (WebKit::IDBObjectStoreBackendProxy::keyPath): Returns the string version until WebCore is updated.
+ * src/WebIDBDatabaseImpl.h:
+ (WebIDBDatabaseImpl): Add createObjectStore overload for WebIDBKeyPath type, delegates to WebString version until callers are updated.
+ * src/WebIDBIndexImpl.cpp:
+ (WebKit::WebIDBIndexImpl::keyPath): Implements the new WebIDBKeyPath return type.
+ (WebKit):
+ * src/WebIDBIndexImpl.h:
+ (WebIDBIndexImpl): Implements the new WebIDBKeyPath return type.
+ * src/WebIDBKeyPath.cpp:
+ (WebKit::WebIDBKeyPath::create): Support null key path types.
+ (WebKit::WebIDBKeyPath::createNull): New API.
+ (WebKit):
+ (WebKit::WebIDBKeyPath::isValid): New API.
+ (WebKit::WebIDBKeyPath::type): New API.
+ (WebKit::WebIDBKeyPath::string): New API (value accessor).
+ (WebKit::WebIDBKeyPath::WebIDBKeyPath):
+ (WebKit::WebIDBKeyPath::assign): This API will be removed.
+ (WebKit::WebIDBKeyPath::operator const WTF::Vector<WTF::String, 0>&): Ensure it is non-null - only used in copy constructor which guards against this.
+ * src/WebIDBObjectStoreImpl.cpp:
+ (WebKit::WebIDBObjectStoreImpl::keyPath): Implement the new WebIDBKeyPath return type.
+ (WebKit):
+ * src/WebIDBObjectStoreImpl.h:
+ (WebIDBObjectStoreImpl): Add createIndex overload for WebIDBKeyPath type, delegates to WebString version until callers are updated.
+
+2012-04-25 Ian Vollick <vollick@chromium.org>
+
+ [chromium] Add support for animation finished events.
+ https://bugs.webkit.org/show_bug.cgi?id=84454
+
+ Reviewed by James Robinson.
+
+ * tests/CCLayerAnimationControllerTest.cpp:
+ (WebKitTests::TEST):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::TestHooks::notifyAnimationFinished):
+ (WTF::TEST_F):
+ (WTF):
+ (CCLayerTreeHostTestAnimationFinishedEvents):
+ (WTF::CCLayerTreeHostTestAnimationFinishedEvents::CCLayerTreeHostTestAnimationFinishedEvents):
+ (WTF::CCLayerTreeHostTestAnimationFinishedEvents::beginTest):
+ (WTF::CCLayerTreeHostTestAnimationFinishedEvents::notifyAnimationFinished):
+ (WTF::CCLayerTreeHostTestAnimationFinishedEvents::afterTest):
+
+2012-04-25 Ian Vollick <vollick@chromium.org>
+
+ [chromium] Do not clobber synchronized start times.
+ https://bugs.webkit.org/show_bug.cgi?id=84605
+
+ Reviewed by James Robinson.
+
+ * tests/CCLayerAnimationControllerTest.cpp:
+ (WebKitTests):
+ (WebKitTests::TEST):
+
+2012-04-25 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Call actualMemoryUsageMB directly
+ https://bugs.webkit.org/show_bug.cgi?id=84837
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+
+2012-04-25 Alexis Menard <alexis.menard@openbossa.org>
+
+ Rename CSSStyleSelector files to StyleResolver.
+ https://bugs.webkit.org/show_bug.cgi?id=84814
+
+ Reviewed by Antti Koivisto.
+
+ Rename CSSStyleSelector files to match the new class name StyleResolver.
+ Update the includes all over the code base to the new name.
+
+ * src/AutofillPopupMenuClient.cpp:
+ * src/WebViewImpl.cpp:
+
+2012-04-25 Gavin Peters <gavinp@chromium.org>
+
+ [Chromium] Fix some conditional compilation logic in Platform
+ https://bugs.webkit.org/show_bug.cgi?id=83798
+
+ Reviewed by Darin Fisher.
+
+ * tests/WebFrameTest.cpp:
+ (WebKit::TestReloadDoesntRedirectWebFrameClient::cancelledError):
+
+2012-04-25 Yury Semikhatsky <yurys@chromium.org>
+
+ Web Inspector: move HeapSnapshotLoader into a separate file
+ https://bugs.webkit.org/show_bug.cgi?id=84860
+
+ Extracted HeapSnapshotLoader into its own file.
+
+ Reviewed by Pavel Feldman.
+
+ * WebKit.gyp:
+
+2012-04-25 Ian Vollick <vollick@chromium.org>
+
+ [chromium] Animations waiting for a synchronized start time should never be marked finished.
+ https://bugs.webkit.org/show_bug.cgi?id=84519
+
+ Reviewed by James Robinson.
+
+ * tests/CCLayerAnimationControllerTest.cpp:
+ (WebKitTests::TEST):
+ (WebKitTests):
+
+2012-04-25 Gavin Peters <gavinp@chromium.org>
+
+ Move WebReferrerPolicy.h from WebKit to Platform
+ https://bugs.webkit.org/show_bug.cgi?id=84539
+
+ Reviewed by Adam Barth.
+
+ * WebKit.gyp:
+ * public/WebContextMenuData.h:
+ * public/WebFrame.h:
+ * public/WebReferrerPolicy.h:
+ * public/WebSecurityPolicy.h:
+ * public/platform/WebReferrerPolicy.h: Copied from Source/WebKit/chromium/public/WebReferrerPolicy.h.
+ * src/AssertMatchingEnums.cpp:
+
+2012-04-24 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Unbounded draws should use clip to limit their damage to opaque tracking
+ https://bugs.webkit.org/show_bug.cgi?id=84494
+
+ Reviewed by Adrienne Walker.
+
+ * tests/PlatformContextSkiaTest.cpp:
+ (WebCore::TEST):
+ (WebCore):
+
+2012-04-24 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Image masks are considered opaque incorrectly
+ https://bugs.webkit.org/show_bug.cgi?id=84275
+
+ Reviewed by Adrienne Walker.
+
+ * tests/PlatformContextSkiaTest.cpp:
+ (WebCore):
+ (WebCore::TEST):
+
+2012-04-24 Alexis Menard <alexis.menard@openbossa.org>
+
+ Replace occurences of style selector from variables and methods names by style resolver.
+ https://bugs.webkit.org/show_bug.cgi?id=84765
+
+ Reviewed by Andreas Kling.
+
+ Rename methods and variables to follow the new name StyleResolver. It requires to update the
+ local variables, methods parameters, and function names to match the new name and to remove
+ the concept of "selector" to avoid clashing with the CSS concept. The next and last patch
+ will be to rename CSSStyleSelector file and update the includes.
+
+ * src/AutofillPopupMenuClient.cpp:
+ (WebKit::AutofillPopupMenuClient::fontSelector):
+ (WebKit::AutofillPopupMenuClient::initialize):
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::DeviceMetricsSupport::autoZoomPageToFitWidth):
+ (WebKit::DeviceMetricsSupport::applySizeOverrideInternal):
+
+2012-04-24 Kent Tamura <tkent@chromium.org>
+
+ [Chromium] Implement WebCore::dateFormat{DayInMonth,Month,Year}Text()
+ https://bugs.webkit.org/show_bug.cgi?id=84683
+
+ Reviewed by Dimitri Glazkov.
+
+ * public/platform/WebLocalizedString.h:
+ Add DateFormat{DayInMonth,Month,Year}Label
+ * src/LocalizedStrings.cpp:
+ (WebCore::dateFormatYearText): Implemented.
+ (WebCore::dateFormatMonthText): ditto.
+ (WebCore::dateFormatDayInMonthText): ditto.
+
+2012-04-24 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Create a new flag for PeerConnection
+ https://bugs.webkit.org/show_bug.cgi?id=84723
+
+ Reviewed by Dimitri Glazkov.
+
+ To allow Chrome to make the GetUserMedia functionality available by default we
+ need another flag for the PeerConnection related parts. This new flag is in
+ addition to the general media stream flag, and both need to be enabled for
+ PeerConnection object creation.
+
+ * public/WebRuntimeFeatures.h:
+ (WebRuntimeFeatures):
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enablePeerConnection):
+ (WebKit):
+ (WebKit::WebRuntimeFeatures::isPeerConnectionEnabled):
+
+2012-04-24 Sami Kyostila <skyostil@chromium.org>
+
+ [chromium] Don't keep pointers to released layer tree
+ https://bugs.webkit.org/show_bug.cgi?id=84715
+
+ Reviewed by Adrienne Walker.
+
+ Added new unit test to check that we can keep scrolling even if the layer
+ tree is replaced from under us.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::TEST_F):
+ (WebKitTests):
+
+2012-04-24 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed. Rolled DEPS.
+
+ * DEPS:
+
+2012-04-24 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r115000.
+ http://trac.webkit.org/changeset/115000
+ https://bugs.webkit.org/show_bug.cgi?id=84703
+
+ Breaks webkit_unit_tests on Mac in Chromium:
+ http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Mac10.6/builds/15157
+ (Requested by mnaganov on #webkit).
+
+ * tests/PlatformContextSkiaTest.cpp:
+ (WebCore):
+ (WebCore::TEST):
+
+2012-04-23 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Image masks are considered opaque incorrectly
+ https://bugs.webkit.org/show_bug.cgi?id=84275
+
+ Reviewed by Adrienne Walker.
+
+ * tests/PlatformContextSkiaTest.cpp:
+ (WebCore):
+ (WebCore::TEST):
+
+2012-04-23 Kent Tamura <tkent@chromium.org>
+
+ Show the format indicator in a date field
+ https://bugs.webkit.org/show_bug.cgi?id=83872
+
+ Reviewed by Hajime Morita.
+
+ * src/LocalizedStrings.cpp:
+ (WebCore::dateFormatYearText): Added a stub.
+ (WebCore::dateFormatMonthText): ditto.
+ (WebCore::dateFormatDayInMonthText): ditto.
+
+2012-04-23 Michael Nordman <michaeln@google.com>
+
+ [chromium] DomStorage event handling mods.
+ https://bugs.webkit.org/show_bug.cgi?id=84387
+
+ Events are currently handled inconsistently. The dispatch of some events are
+ initiated from within webkit/webcore, the dispatch of other events are initiated
+ from the outside via the WebKit::WebStorageEventDispatcher interface. The existing
+ WebStorageEventDispatcher is not expressive enough to handle initiation all
+ events from the outside. There's a chunk of nearly replicated code in there
+ that shouldn't be. The existing code has several FIXMEs related to making
+ this better.
+
+ The current state of things in webkit/webcore is also blocking development of some
+ overall performance improvements to chromium's implemention of this feature (getting
+ rid of sync ipcs for each access and adding a renderer-side caching layer).
+
+ To facilitate the perf improvements, this patch adds WebKit API to allow all
+ DomStorage events to be initiated from the outside. This is needed because
+ there will be an async latency between setting an item and receiving the
+ 'oldValue' from the main browser process which is required to raise the
+ mutation event.
+
+ This is the first of a multi-sided sequence of patches to make this transition.
+ wkpatch 1: add the new wider WebKit API and impl
+ crpatch 2: start using the new wider WebKit API
+ wkpatch 3: cleanup, delete the old WebKit API and impl
+ xxxxxxx 4/5: cleanup, remove extra params from new API whose only purpose was to allow the transition
+
+ Reviewed by Dimitri Glazkov.
+
+ * public/WebStorageEventDispatcher.h: Add new API to dispatch events.
+ * public/WebStorageNamespace.h: Add new API to test for namespace equality.
+ * src/StorageAreaProxy.cpp:
+ (WebCore::StorageAreaProxy::dispatchLocalStorageEvent): implementation of the new API
+ (WebCore::StorageAreaProxy::dispatchSessionStorageEvent): implementation of the new API
+ (WebCore::StorageAreaProxy::IsEventSource): a helper method
+ (WebCore::StorageAreaProxy::FindPageWithSessionStorageNamespace): a helper method
+ * src/StorageAreaProxy.h:
+ * src/StorageEventDispatcherImpl.cpp: added a FIXME comment to delete soon
+ * src/StorageNamespaceProxy.cpp:
+ (WebCore::StorageNamespaceProxy::IsSameNamespace): plumbing to call the new API
+ * src/StorageNamespaceProxy.h:
+ * src/WebStorageEventDispatcherImpl.cpp:
+ (WebKit::WebStorageEventDispatcher::dispatchLocalStorageEvent): plumbing to call the new impl
+ (WebKit::WebStorageEventDispatcher::dispatchSessionStorageEvent): plumbing to call the new impl
+ * src/WebStorageEventDispatcherImpl.h: added a FIXME comment to delete soon
+
+2012-04-23 Kenneth Russell <kbr@google.com>
+
+ Change ImageData to reference Uint8ClampedArray rather than CanvasPixelArray
+ https://bugs.webkit.org/show_bug.cgi?id=73011
+
+ Reviewed by Oliver Hunt.
+
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContext3DPrivate::paintRenderingResultsToImageData):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::doPixelReadbackToCanvas):
+
+2012-04-23 Kent Tamura <tkent@chromium.org>
+
+ Crash when the page with a calendar picker is scrolled
+ https://bugs.webkit.org/show_bug.cgi?id=84287
+
+ Reviewed by Hajime Morita.
+
+ Use the same ownership model as WebPopupMenuImpl's.
+
+ * src/WebPagePopupImpl.cpp:
+ (WebKit::WebPagePopupImpl::close):
+ Clear m_widgetClient to avoid furthur access to it. deref instead of delete.
+ (WebKit::WebPagePopupImpl::closePopup):
+ Do not call closeWidgetSoon() if close() was already called.
+ (WebKit::WebPagePopup::create):
+ Add a reference. Add explanation of the ownership.
+ * src/WebPagePopupImpl.h:
+ (WebPagePopupImpl): Make this RefCounted. Make the destuctor public.
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl): No need to clear m_pagePopup explicitly.
+ (WebKit::WebViewImpl::openPagePopup): Need to use .get() because m_pagePopup is a RefPtr.
+ (WebKit::WebViewImpl::closePagePopup): ditto.
+ (WebKit::WebViewImpl::hidePopups): ditto.
+ * src/WebViewImpl.h: Make m_pagePopup a RefPtr.
+
+2012-04-18 James Robinson <jamesr@chromium.org>
+
+ [chromium] Use TextureLayerChromium for WebGL content instead of a dedicated layer type
+ https://bugs.webkit.org/show_bug.cgi?id=84311
+
+ Reviewed by Adrienne Walker.
+
+ * WebKit.gypi:
+ * src/WebExternalTextureLayer.cpp:
+ (WebKit::WebExternalTextureLayer::create):
+ * src/WebLayer.cpp:
+ * tests/WebGLLayerChromiumTest.cpp: Removed.
+ * tests/WebLayerTest.cpp:
+
+2012-04-23 Alec Flett <alecflett@chromium.org>
+
+ IndexedDB: remove IDB(Index|ObjectStore)BackendImpl::get/getKey for IDBKey
+ https://bugs.webkit.org/show_bug.cgi?id=84285
+
+ Reviewed by Dimitri Glazkov.
+
+ This is old code supporting IDBKey-based lookup, supplanted by
+ IDBKeyRange. Now that chromium IPC/proxy code has landed,
+ these functions can be removed.
+
+ * public/WebIDBIndex.h:
+ * public/WebIDBObjectStore.h:
+ * src/IDBIndexBackendProxy.cpp:
+ * src/IDBIndexBackendProxy.h:
+ (IDBIndexBackendProxy):
+ * src/IDBObjectStoreBackendProxy.cpp:
+ * src/IDBObjectStoreBackendProxy.h:
+ (IDBObjectStoreBackendProxy):
+ * src/WebIDBIndexImpl.cpp:
+ * src/WebIDBIndexImpl.h:
+ (WebIDBIndexImpl):
+ * src/WebIDBObjectStoreImpl.cpp:
+ * src/WebIDBObjectStoreImpl.h:
+ (WebIDBObjectStoreImpl):
+
+2012-04-23 Eriq Augustine <eaugusti@chromium.org>
+
+ Return value from executed script in Chromium.
+ https://bugs.webkit.org/show_bug.cgi?id=79851
+
+ Reviewed by Adam Barth.
+
+ Providing a variant of evaluateScriptInIsolatedWorld that
+ returns the value of the evaluated script.
+
+ * public/WebFrame.h:
+ (WebFrame):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::executeScriptInIsolatedWorldAndReturnValues):
+ (WebKit):
+ * src/WebFrameImpl.h:
+ (WebKit):
+ (WebFrameImpl):
+
+2012-04-23 Raymond Toy <rtoy@google.com>
+
+ Move AudioDestinationChromium FIFO class to its own class.
+ https://bugs.webkit.org/show_bug.cgi?id=84058
+
+ Reviewed by Chris Rogers.
+
+ Remove private FIFO class and use new AudioPullFIFO class.
+ * src/AudioDestinationChromium.cpp:
+ (WebCore::AudioDestinationChromium::AudioDestinationChromium):
+ * src/AudioDestinationChromium.h:
+ (AudioDestinationChromium):
+
+2012-04-23 Dmitry Titov <dimich@chromium.org>
+
+ Chromium roll 133422:133506.
+ Not reviewed.
+
+ * DEPS:
+
+2012-04-23 Ian Vollick <vollick@chromium.org>
+
+ [chromium] Properly ignore unsupported animation directions.
+ https://bugs.webkit.org/show_bug.cgi?id=84599
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerAnimationControllerTest.cpp:
+ (WebKitTests::TEST):
+ (WebKitTests):
+
+2012-04-23 Ian Vollick <vollick@chromium.org>
+
+ [chromium] When prepareToDraw fails due to animation checkerboard, we need to call setNeedsCommit
+ https://bugs.webkit.org/show_bug.cgi?id=84520
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::TEST_F):
+
+2012-04-23 Mikhail Naganov <mnaganov@chromium.org>
+
+ Chromium roll from r133348 to r133422.
+
+ * DEPS:
+
+2012-04-23 Gavin Peters <gavinp@chromium.org>
+
+ Move ReferrerPolicy out of SecurityPolicy class into its own header in platform.
+ https://bugs.webkit.org/show_bug.cgi?id=84516
+
+
+ Reviewed by Adam Barth.
+
+ No change in behaviour; same enum, different class.
+
+ * src/AssertMatchingEnums.cpp:
+ * src/WebSecurityPolicy.cpp:
+ (WebKit::WebSecurityPolicy::generateReferrerHeader):
+
+2012-04-22 Andreas Kling <kling@webkit.org>
+
+ Optimize Element attribute storage for the common case (no Attr objects.)
+ <http://webkit.org/b/83440>
+
+ Reviewed by Antti Koivisto.
+
+ Remove the WebNamedNodeMap and WebAttribute API classes since they are no
+ longer needed by chromium after <http://crrev.com/133299>.
+
+ * WebKit.gyp:
+ * public/WebAttribute.h: Removed.
+ * public/WebElement.h:
+ * public/WebNamedNodeMap.h: Removed.
+ * src/WebAttribute.cpp: Removed.
+ * src/WebElement.cpp:
+ * src/WebNamedNodeMap.cpp: Removed.
+
+2012-04-22 Mikhail Naganov <mnaganov@chromium.org>
+
+ [Chromium] Fix clang build after r114827, unreviewed.
+
+ * tests/LayerTextureUpdaterTest.cpp:
+ (WebCore::TEST):
+
+2012-04-22 Shawn Singh <shawnsingh@chromium.org>
+
+ [chromium] Damage Tracker needs to use CCMathUtil transforms
+ https://bugs.webkit.org/show_bug.cgi?id=84070
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCDamageTrackerTest.cpp:
+ (WebKitTests::TEST_F):
+ (WebKitTests):
+
+2012-04-21 Ryosuke Niwa <rniwa@webkit.org>
+
+ Chromium roll attempt from r133173 to r133348.
+
+ * DEPS:
+
+2012-04-20 Adrienne Walker <enne@google.com>
+
+ [chromium] Refactor opaque content transform out of Skia context
+ https://bugs.webkit.org/show_bug.cgi?id=83608
+
+ Reviewed by James Robinson.
+
+ Add tests for opaque tracking in LayerTextureUpdater, since the
+ transform logic has moved there.
+
+ * tests/CCTiledLayerTestCommon.cpp:
+ (WebKitTests::FakeLayerTextureUpdater::prepareToUpdate):
+ * tests/CCTiledLayerTestCommon.h:
+ (FakeLayerTextureUpdater):
+ * tests/LayerTextureUpdaterTest.cpp:
+ (WebCore::PaintFillPartialOpaque::PaintFillPartialOpaque):
+ (PaintFillPartialOpaque):
+ (WebCore::PaintFillPartialOpaque::operator()):
+ (WebCore):
+ (WebCore::TEST):
+ * tests/PlatformContextSkiaTest.cpp:
+ (WebCore::TEST):
+
+2012-04-20 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Remove special case for recreating layers during sync
+ https://bugs.webkit.org/show_bug.cgi?id=84458
+
+ Reviewed by James Robinson.
+
+ * tests/TreeSynchronizerTest.cpp:
+
+2012-04-20 Alec Flett <alecflett@chromium.org>
+
+ IndexedDB: Support get/getKey(keyRange)
+ https://bugs.webkit.org/show_bug.cgi?id=83638
+
+ Reviewed by Ojan Vafai.
+
+ Hook up WebKit API to the new get/getKey implementations.
+
+ * src/IDBIndexBackendProxy.cpp:
+ (WebKit::IDBIndexBackendProxy::get):
+ (WebKit):
+ (WebKit::IDBIndexBackendProxy::getKey):
+ * src/IDBIndexBackendProxy.h:
+ (IDBIndexBackendProxy):
+ * src/WebIDBIndexImpl.cpp:
+ (WebKit::WebIDBIndexImpl::getObject):
+ (WebKit::WebIDBIndexImpl::getKey):
+ * src/WebIDBObjectStoreImpl.cpp:
+ (WebKit::WebIDBObjectStoreImpl::get):
+
+2012-04-20 Brady Eidson <beidson@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=84512
+ Repurpose ActiveDOMObject::WillShowDialog to WillDeferLoading
+
+ Reviewed by Eric Carlson.
+
+ PageGroupLoadDeferrer's don't take a ReasonForSuspension argument anymore;
+ They just use WillDeferLoading by default.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebView::willEnterModalLoop):
+
+2012-04-20 James Robinson <jamesr@chromium.org>
+
+ [chromium] Plumb a compositor surface ready notification through to the threaded compositor
+ https://bugs.webkit.org/show_bug.cgi?id=84305
+
+ Reviewed by Adrienne Walker.
+
+ Adds a notification to WebWidget for when the compositor surface is ready to use. This exists to fix a race
+ condition when WebKit requires that we enter compositing mode but we haven't completed initialization of the
+ native window/etc backing the WebWidget, and we can't block for this initialization to complete without inducing
+ deadlocks. In this situation, we proceed as usual except that we can't attempt to use the compositor context or
+ it will fail.
+
+ * public/WebWidget.h:
+ (WebWidget):
+ * src/WebLayerTreeView.cpp:
+ (WebKit::WebLayerTreeView::setSurfaceReady):
+ (WebKit):
+ * src/WebPagePopupImpl.cpp:
+ (WebKit::WebPagePopupImpl::setCompositorSurfaceReady):
+ (WebKit):
+ * src/WebPagePopupImpl.h:
+ (WebPagePopupImpl):
+ * src/WebPopupMenuImpl.cpp:
+ (WebKit::WebPopupMenuImpl::setCompositorSurfaceReady):
+ (WebKit):
+ * src/WebPopupMenuImpl.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setCompositorSurfaceReady):
+ (WebKit):
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+
+2012-04-20 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Call memoryUsageMB directly
+ https://bugs.webkit.org/show_bug.cgi?id=84376
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+
+2012-04-20 Adrienne Walker <enne@google.com>
+
+ [chromium] Clip TransparencyWin to prevent OOM from large Skia canvas
+ https://bugs.webkit.org/show_bug.cgi?id=84289
+
+ Reviewed by James Robinson.
+
+ Add a test that would OOM if the layer wasn't clipped. Also, verify
+ that clipping the canvas doesn't shift pixels around incorrectly.
+
+ * tests/TransparencyWinTest.cpp:
+ (WebCore::testClippedLayerKeepTransform):
+ (WebCore):
+ (WebCore::TEST):
+
+2012-04-20 Brady Eidson <beidson@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=84490
+ PageGroupLoadDeferrer needs to take a ReasonForSuspension argument
+
+ Reviewed by Anders Carlsson.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebView::willEnterModalLoop): Pass along ActiveDOMObject::WillShowDialog, which used
+ to be the default.
+
+2012-04-20 James Robinson <jamesr@chromium.org>
+
+ Avoid synchronously recalculating the nonFastScrollableRegion when the ScrollableArea set changes
+ https://bugs.webkit.org/show_bug.cgi?id=84470
+
+ Reviewed by Anders Carlsson.
+
+ Trigger a layout when a plugin becomes or stops being scrollable so the nonFastScrollableRegion
+ can be updated.
+
+ * src/ScrollbarGroup.cpp:
+ (WebKit::ScrollbarGroup::scrollbarCreated):
+ (WebKit::ScrollbarGroup::scrollbarDestroyed):
+
+2012-04-20 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Some filters require inflating damage rect in CCDamageTracker
+ https://bugs.webkit.org/show_bug.cgi?id=84373
+
+ Reviewed by James Robinson.
+
+ * tests/CCDamageTrackerTest.cpp:
+ (WebKitTests::emulateDrawingOneFrame):
+ (WebKitTests::TEST_F):
+ (WebKitTests):
+
+2012-04-20 Sami Kyostila <skyostil@chromium.org>
+
+ [chromium] Don't crash when scrolling empty layer tree
+ https://bugs.webkit.org/show_bug.cgi?id=84455
+
+ Reviewed by James Robinson.
+
+ Try to scroll an empty layer tree.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::TEST_F):
+ (WebKitTests):
+
+2012-04-20 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed. Rolled DEPS.
+
+ * DEPS:
+
+2012-04-20 'Pavel Feldman' <pfeldman@chromium.org>
+
+ Not reviewed: fixed chromium sanity tests for inspector via assigning last path component
+ to entire url for parsed urls with invalid specs.
+
+ * src/js/Tests.js:
+ (.TestSuite.prototype._scriptsAreParsed):
+
+2012-04-20 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Call cacheMetadata directly
+ https://bugs.webkit.org/show_bug.cgi?id=84415
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+
+2012-04-20 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Call stopSharedTimer directly
+ https://bugs.webkit.org/show_bug.cgi?id=84418
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+
+2012-04-19 Jeremy Mao <yujie.mao@intel.com>
+
+ Media Stream API: Piece of code cleanup for the chromium port
+ https://bugs.webkit.org/show_bug.cgi?id=84328
+
+ Reviewed by Kent Tamura.
+
+ Remove some deprecated interfaces.
+
+ No new tests. No behavior changes.
+
+ * public/WebUserMediaClient.h:
+ Remove deprecated requestUserMedia interface.
+ * public/WebUserMediaRequest.h:
+ Remove deprecated requestSucceeded interface.
+ * src/UserMediaClientImpl.cpp:
+ (WebKit::UserMediaClientImpl::requestUserMedia):
+ Use the requestUserMedia split sources implementation.
+ * src/WebUserMediaRequest.cpp:
+ Remove deprecated requestSucceeded implementation.
+
+2012-04-19 Joshua Bell <jsbell@chromium.org>
+
+ [Chromium] IndexedDB: Prep for changing keyPath return type
+ https://bugs.webkit.org/show_bug.cgi?id=84208
+
+ To introduce Array-type key paths (see http://webkit.org/b/84207) the keyPath() accessors
+ on WebIDBObjectStore and WebIDBIndex need to change return type. To do so requires temporarily
+ changing the method names to keyPathString with compatibility shims (on the WebKit side)
+ then switching the implementation in the Chromium port in a follow-up patch.
+
+ Reviewed by Kent Tamura.
+
+ * public/WebIDBIndex.h:
+ (WebKit::WebIDBIndex::keyPath):
+ (WebKit::WebIDBIndex::keyPathString):
+ * public/WebIDBObjectStore.h:
+ (WebKit::WebIDBObjectStore::keyPath):
+ (WebKit::WebIDBObjectStore::keyPathString):
+ * src/WebIDBIndexImpl.cpp:
+ (WebKit::WebIDBIndexImpl::keyPathString):
+ * src/WebIDBIndexImpl.h:
+ (WebIDBIndexImpl):
+ * src/WebIDBObjectStoreImpl.cpp:
+ (WebKit::WebIDBObjectStoreImpl::keyPathString):
+ * src/WebIDBObjectStoreImpl.h:
+ (WebIDBObjectStoreImpl):
+
+2012-04-19 Andreas Kling <kling@webkit.org>
+
+ [chromium] Add simplified API for iterating over a WebElement's attributes.
+ <http://webkit.org/b/84183>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add attributeCount(), attributeLocalName(index) and attributeValue(index) to the
+ WebElement API so that call sites currently using WebNamedNodeMap can be
+ converted, which will ultimately allow us to refactor WebCore::Attribute
+ on <http://webkit.org/b/83440>.
+
+ * public/WebElement.h:
+ * src/WebElement.cpp:
+ (WebKit::WebElement::attributeCount):
+ (WebKit::WebElement::attributeLocalName):
+ (WebKit::WebElement::attributeValue):
+
+2012-04-19 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Call signedPublicKeyAndChallengeString directly
+ https://bugs.webkit.org/show_bug.cgi?id=84372
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+
+2012-04-19 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Call audioHardwareBufferSize directly
+ https://bugs.webkit.org/show_bug.cgi?id=84370
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/AudioDestinationChromium.cpp:
+ (WebCore::AudioDestinationChromium::AudioDestinationChromium):
+
+2012-04-19 Sami Kyostila <skyostil@chromium.org>
+
+ [chromium] Add tests for scrolling non-root layers in the compositor thread
+ https://bugs.webkit.org/show_bug.cgi?id=73350
+
+ Reviewed by James Robinson.
+
+ * src/WebContentLayerImpl.cpp:
+ (WebKit::WebContentLayerImpl::didScroll):
+ (WebKit):
+ * src/WebContentLayerImpl.h:
+ (WebContentLayerImpl):
+ * tests/CCLayerImplTest.cpp:
+ (WebCore::TEST):
+ (WebCore):
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::CCLayerTreeHostImplTest::createScrollableLayer):
+ (CCLayerTreeHostImplTest):
+ (WebKitTests::CCLayerTreeHostImplTest::initializeLayerRendererAndDrawFrame):
+ (WebKitTests::TEST_F):
+ (WebKitTests):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::TestOpacityChangeLayerDelegate::didScroll):
+ (WTF::MockContentLayerDelegate::paintContents):
+ (WTF::MockContentLayerDelegate::didScroll):
+ (CCLayerTreeHostTestScrollChildLayer):
+ (WTF::CCLayerTreeHostTestScrollChildLayer::CCLayerTreeHostTestScrollChildLayer):
+ (WTF::CCLayerTreeHostTestScrollChildLayer::beginTest):
+ (WTF::CCLayerTreeHostTestScrollChildLayer::applyScrollAndScale):
+ (WTF::CCLayerTreeHostTestScrollChildLayer::beginCommitOnCCThread):
+ (WTF::CCLayerTreeHostTestScrollChildLayer::drawLayersOnCCThread):
+ (WTF::CCLayerTreeHostTestScrollChildLayer::afterTest):
+ (WTF):
+ (WTF::TEST_F):
+
+2012-04-19 Alec Flett <alecflett@chromium.org>
+
+ IndexedDB: Stub out IDBCursor.advance for landing
+ https://bugs.webkit.org/show_bug.cgi?id=84280
+
+ Reviewed by Dimitri Glazkov.
+
+ Just a stub method so it can be implemented on chromium
+
+ * public/WebIDBCursor.h:
+ (WebKit::WebIDBCursor::advance):
+ * src/WebIDBCursorImpl.cpp:
+ (WebKit::WebIDBCursorImpl::advance):
+ (WebKit):
+ * src/WebIDBCursorImpl.h:
+ (WebIDBCursorImpl):
+
+2012-04-19 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Call mimeRegistry directly
+ https://bugs.webkit.org/show_bug.cgi?id=84334
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/PlatformSupport.cpp:
+ (WebCore::PlatformSupport::layoutTestMode):
+
+2012-04-19 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Call sampleGamepads directly
+ https://bugs.webkit.org/show_bug.cgi?id=84339
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/PlatformSupport.cpp:
+ (WebCore::PlatformSupport::injectIDBKeyIntoSerializedValue):
+
+2012-04-19 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Call audioHardwareSampleRate directly
+ https://bugs.webkit.org/show_bug.cgi?id=84335
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/AudioDestinationChromium.cpp:
+ (WebCore::AudioDestination::hardwareSampleRate):
+
+2012-04-18 Nico Weber <thakis@chromium.org>
+
+ [chromium/mac] Fix build.
+ https://bugs.webkit.org/show_bug.cgi?id=84314
+
+ Unreviewed, build fix after http://trac.webkit.org/changeset/114604
+
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::setBackingIOSurfaceId):
+
+2012-04-18 Hironori Bono <hbono@chromium.org>
+
+ Split SpellChecker::didCheck() to SpellChecker::didCheckSucceeded() and SpellChecker::didCheckCanceled()
+ https://bugs.webkit.org/show_bug.cgi?id=83748
+
+ Reviewed by Ryosuke Niwa.
+
+ This change adds a new API WebTextCheckingCompletion::didCancelCheckingText(),
+ which encapsulates SpellChecker::didCheckCanceled() and implements it so
+ Chromium can use it.
+
+ * public/WebTextCheckingCompletion.h:
+ (WebKit::WebTextCheckingCompletion::didCancelCheckingText):
+ * src/WebTextCheckingCompletionImpl.cpp:
+ (WebKit::WebTextCheckingCompletionImpl::didFinishCheckingText):
+ (WebKit):
+ (WebKit::WebTextCheckingCompletionImpl::didCancelCheckingText):
+ * src/WebTextCheckingCompletionImpl.h:
+ (WebTextCheckingCompletionImpl):
+
+2012-04-16 James Robinson <jamesr@chromium.org>
+
+ [chromium] Convert WebPluginContainerImpl over to use WebExternalTextureLayer
+ https://bugs.webkit.org/show_bug.cgi?id=84120
+
+ Reviewed by Adrienne Walker.
+
+ This ports WebPluginContainerImpl over to use WebExternalTextureLayer instead of directly using a *LayerChromium
+ type for better layering and code sharing. The changes to WebPluginContainerImpl are fairly straightforward. In
+ addition to renames I also moved some state tracking into WPCI instead of having it exposed on the interface. I
+ also removed the WebExternalTextureLayerImpl intermediate class since it wasn't doing anything useful.
+
+ * WebKit.gyp:
+ * WebKit.gypi:
+ * src/WebContentLayer.cpp:
+ * src/WebExternalTextureLayer.cpp:
+ (WebKit::WebExternalTextureLayer::create):
+ (WebKit::WebExternalTextureLayer::setTextureId):
+ (WebKit::WebExternalTextureLayer::setIOSurfaceProperties):
+ (WebKit::WebExternalTextureLayer::setFlipped):
+ (WebKit::WebExternalTextureLayer::flipped):
+ (WebKit::WebExternalTextureLayer::setUVRect):
+ (WebKit::WebExternalTextureLayer::uvRect):
+ (WebKit::WebExternalTextureLayer::WebExternalTextureLayer):
+ * src/WebExternalTextureLayerImpl.cpp: Removed.
+ * src/WebExternalTextureLayerImpl.h: Removed.
+ * src/WebLayer.cpp:
+ (WebKit::WebLayer::invalidateRect):
+ (WebKit):
+ (WebKit::WebLayer::invalidate):
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::setBackingTextureId):
+ (WebKit::WebPluginContainerImpl::setBackingIOSurfaceId):
+ (WebKit::WebPluginContainerImpl::commitBackingTexture):
+ (WebKit::WebPluginContainerImpl::setOpaque):
+ (WebKit::WebPluginContainerImpl::platformLayer):
+ (WebKit::WebPluginContainerImpl::WebPluginContainerImpl):
+ * src/WebPluginContainerImpl.h:
+ (WebCore):
+ (WebPluginContainerImpl):
+ * tests/WebExternalTextureLayerImplTest.cpp: Removed.
+ * tests/WebLayerTest.cpp:
+
+2012-04-18 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Simplify occlusion tracker API by passing layer iterator data
+ https://bugs.webkit.org/show_bug.cgi?id=84088
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (CCOcclusionTrackerTestMainThreadTypes):
+ (CCOcclusionTrackerTestImplThreadTypes):
+ (WebKitTests::CCOcclusionTrackerTest::CCOcclusionTrackerTest):
+ (WebKitTests::CCOcclusionTrackerTest::calcDrawEtc):
+ (CCOcclusionTrackerTest):
+ (WebKitTests::CCOcclusionTrackerTest::enterLayer):
+ (WebKitTests::CCOcclusionTrackerTest::leaveLayer):
+ (WebKitTests::CCOcclusionTrackerTest::visitLayer):
+ (WebKitTests::CCOcclusionTrackerTest::enterContributingSurface):
+ (WebKitTests::CCOcclusionTrackerTest::leaveContributingSurface):
+ (WebKitTests::CCOcclusionTrackerTest::visitContributingSurface):
+ (WebKitTests::CCOcclusionTrackerTest::resetLayerIterator):
+ (WebKitTests::CCOcclusionTrackerTestIdentityTransforms::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestRotatedChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestTranslatedChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestChildInRotatedChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestVisitTargetTwoTimes::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceRotatedOffAxis::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceWithTwoOpaqueChildren::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblings::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblingsWithTwoTransforms::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestFilters::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestReplicaDoesOcclude::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestReplicaWithClipping::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestLayerScissorRectOutsideChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestScreenScissorRectOutsideChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestLayerScissorRectOverChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestScreenScissorRectOverChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestLayerScissorRectPartlyOverChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestScreenScissorRectPartlyOverChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestLayerScissorRectOverNothing::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestScreenScissorRectOverNothing::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestLayerScissorRectForLayerOffOrigin::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestOpaqueContentsRegionEmpty::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestOpaqueContentsRegionNonEmpty::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTest3dTransform::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestPerspectiveTransform::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestPerspectiveTransformBehindCamera::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestLayerBehindCameraDoesNotOcclude::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestLargePixelsOccludeInsideClipRect::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestAnimationOpacity1OnMainThread::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestAnimationOpacity0OnMainThread::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestAnimationTranslateOnMainThread::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceOcclusionTranslatesToParent::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceOcclusionTranslatesWithClipping::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestReplicaOccluded::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceWithReplicaUnoccluded::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceAndReplicaOccludedDifferently::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceChildOfSurface::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceChildOfClippingSurface::runMyTest):
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore):
+ (WebCore::makeLayer):
+ (WebCore::appendQuads):
+ (WebCore::TEST):
+
+2012-04-18 James Robinson <jamesr@chromium.org>
+
+ [chromium] Add canBeginFrame state to CCSchedulerStateMachine to suppress initialization before our surface is available
+ https://bugs.webkit.org/show_bug.cgi?id=84301
+
+ Reviewed by Adrienne Walker.
+
+ Update unit tests for new canBeginFrame bit.
+
+ * tests/CCSchedulerStateMachineTest.cpp:
+ (WebCore::TEST):
+ (WebCore):
+ * tests/CCSchedulerTest.cpp:
+ (WebKitTests::TEST):
+
+2012-04-18 David Reveman <reveman@chromium.org>
+
+ [Chromium] Solid color layers should respect opacity value.
+ https://bugs.webkit.org/show_bug.cgi?id=84197
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCSolidColorLayerImplTest.cpp:
+ (CCLayerTestCommon::TEST):
+ (CCLayerTestCommon):
+
+2012-04-18 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Call prefetchDNS directly
+ https://bugs.webkit.org/show_bug.cgi?id=84262
+
+ Reviewed by Kentaro Hara.
+
+ Part of a series, see tracking bug 82948.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+
+2012-04-18 Myles Maxfield <mmaxfield@google.com>
+
+ Chromium compile of WebDatabase.cpp fails without SQL_DATABASE
+ https://bugs.webkit.org/show_bug.cgi?id=84212
+
+ Reviewed by Kentaro Hara.
+
+ * src/WebDatabase.cpp:
+ (WebCore::AbstractDatabase::isSyncDatabase):
+
+2012-04-18 Keishi Hattori <keishi@webkit.org>
+
+ [chromium] Turn on ENABLE_DATALIST for chromium
+ https://bugs.webkit.org/show_bug.cgi?id=84118
+
+ Reviewed by Kent Tamura.
+
+ * features.gypi: Turn on ENABLE_DATALIST.
+ * src/WebInputElement.cpp: Touched to avoid build issues. No code change.
+
+2012-04-18 Alexander Pavlov <apavlov@chromium.org>
+
+ [Chromium] REGRESSION: Popup shrinks because of autocomplete
+ https://bugs.webkit.org/show_bug.cgi?id=84139
+ http://code.google.com/p/chromium/issues/detail?id=123432
+
+ Do not use the PopupContainer's frameRect() to update the popup client's window rect,
+ since PopupContainer is always positioned at (0, 0) inside the client's window rect,
+ and the latter one is positioned relative to the screen origin.
+
+ Reviewed by Kent Tamura.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::refreshAutofillPopup):
+
+2012-04-17 Rafael Weinstein <rafaelw@chromium.org>
+
+ [MutationObservers] enable V8RecursionScope debug ASSERT()
+ https://bugs.webkit.org/show_bug.cgi?id=84094
+
+ Reviewed by Ojan Vafai.
+
+ This patch enables the ASSERT() which enforces usage of
+ V8RecursionScope.
+
+ * src/WebKit.cpp:
+ (WebKit::assertV8RecursionScope):
+
+2012-04-17 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Fix gyp for WebFilterOperation.h and WebFilterOperations.h
+ https://bugs.webkit.org/show_bug.cgi?id=84182
+
+ Reviewed by James Robinson.
+
+ * WebKit.gyp:
+
+2012-04-17 David Reveman <reveman@chromium.org>
+
+ [Chromium] Add TextureUploader which allows us to use persistent GC3D state for texture uploads.
+ https://bugs.webkit.org/show_bug.cgi?id=83972
+
+ Reviewed by James Robinson.
+
+ * tests/CCTiledLayerTestCommon.h:
+ (FakeTextureUploader):
+ (WebKitTests::FakeTextureUploader::uploadTexture):
+ (WebKitTests):
+ * tests/Canvas2DLayerChromiumTest.cpp:
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::TEST):
+
+2012-04-17 Alec Flett <alecflett@chromium.org>
+
+ IndexedDB: stub getKey/getObject interfaces for IDBKeyRange
+ https://bugs.webkit.org/show_bug.cgi?id=84089
+
+ Reviewed by Dimitri Glazkov.
+
+ Added stub methods on WebIDBIndex.h to cleanly land
+ https://bugs.webkit.org/show_bug.cgi?id=83638
+
+ * public/WebIDBIndex.h:
+ (WebKit::WebIDBIndex::getObject):
+ (WebKit::WebIDBIndex::getKey):
+ * src/WebIDBIndexImpl.cpp:
+ (WebKit::WebIDBIndexImpl::getObject):
+ (WebKit):
+ (WebKit::WebIDBIndexImpl::getKey):
+ * src/WebIDBIndexImpl.h:
+ (WebIDBIndexImpl):
+
+2012-04-17 Aaron Colwell <acolwell@chromium.org>
+
+ Add sourceAddId() & sourceRemoveId() stubs for Chromium.
+ These are needed to bring the Media Source implementation
+ up to date with the new 0.4 version of the Media Source spec.
+ http://html5-mediasource-api.googlecode.com/svn/tags/0.4/draft-spec/mediasource-draft-spec.html
+ https://bugs.webkit.org/show_bug.cgi?id=83616
+
+ Reviewed by Eric Carlson, Darin Fisher.
+
+ * public/WebMediaPlayer.h:
+ (WebKit::WebMediaPlayer::sourceAddId):
+ (WebKit::WebMediaPlayer::sourceRemoveId):
+ * src/AssertMatchingEnums.cpp:
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::sourceAddId):
+ (WebKit):
+ (WebKit::WebMediaPlayerClientImpl::sourceRemoveId):
+ * src/WebMediaPlayerClientImpl.h:
+ (WebMediaPlayerClientImpl):
+
+2012-04-17 Kent Tamura <tkent@chromium.org>
+
+ [Chromium] Calendar Picker: Popup position is wrong when there are
+ no enough space below the target date field
+ https://bugs.webkit.org/show_bug.cgi?id=84007
+
+ Reviewed by Hajime Morita.
+
+ The popup was detached from the origin element because
+ calendarPicker.js resizes its window. To fix this bug, we move the
+ window position vertically when it is resized.
+
+ No new tests. This is not testable in WebKit.
+
+ * src/WebPagePopupImpl.cpp:
+ (WebKit::PagePopupChromeClient::setWindowRect):
+ If this request is just a resize and m_isPutAboveOrigin is true,
+ update the vertical position so that the popup attaches to the
+ origin rectangle.
+ (WebKit::WebPagePopupImpl::WebPagePopupImpl):
+ Initialize m_isPutAboveOrigin with false.
+ (WebKit::WebPagePopupImpl::init): Set m_isPutAboveOrigin true.
+ * src/WebPagePopupImpl.h:
+ (WebPagePopupImpl): Add m_isPutAboveOrigin.
+
+2012-04-16 Kent Tamura <tkent@chromium.org>
+
+ Rename LocalizedNumberICU.h to ICULocale.h
+ https://bugs.webkit.org/show_bug.cgi?id=84119
+
+ Reviewed by Kentaro Hara.
+
+ * tests/LocalizedNumberICUTest.cpp: Rename LocalizedNumberICU.h to ICULocale.h
+
+2012-04-16 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Expose compositor filters to Aura through WebLayer
+ https://bugs.webkit.org/show_bug.cgi?id=80054
+
+ Reviewed by James Robinson.
+
+ * WebKit.gyp:
+ * src/WebLayer.cpp:
+ (WebKit::WebLayer::setFilters):
+ (WebKit):
+ (WebKit::WebLayer::setBackgroundFilters):
+
+2012-04-16 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed. Rolled DEPS.
+
+ * DEPS:
+
+2012-04-16 Kent Tamura <tkent@chromium.org>
+
+ [Chromium] Move popup location detection code from WebViewImpl to WebPagePopupImpl
+ https://bugs.webkit.org/show_bug.cgi?id=84116
+
+ Reviewed by Kentaro Hara.
+
+ This makes no behavior change. Just move some code.
+ To fix Bug 84007, WebPagePopupImpl needs to know if the popup is
+ above the target element or below the target element.
+
+ * src/WebPagePopupImpl.cpp:
+ (WebKit::WebPagePopupImpl::init): Move some code from WebViewImpl::openPagePopup().
+ * src/WebPagePopupImpl.h:
+ (WebPagePopupImpl): Rename an argument name.
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::openPagePopup): Move some code to WebPagePopupImpl::init().
+
+2012-04-13 James Robinson <jamesr@chromium.org>
+
+ [chromium] Expose WebVideoLayer to Platform API and port WebMediaPlayerClientImpl to using it
+ https://bugs.webkit.org/show_bug.cgi?id=83963
+
+ Reviewed by Adrienne Walker.
+
+ Adds implementation of WebVideoLayer and ports WebMediaPlayerClientImpl over to using it.
+ WebMediaPlayerClientImpl still exposes a WebCore::VideoLayerChromium* to the compositor via the platformLayer()
+ interface, but this is temporary until we can change the PlatformLayer typedef over to WebLayer.
+
+ * WebKit.gyp:
+ * src/WebContentLayer.cpp:
+ * src/WebLayer.cpp:
+ (WebKit::WebLayer::invalidate):
+ (WebKit):
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::readyStateChanged):
+ (WebKit::WebMediaPlayerClientImpl::repaint):
+ (WebKit::WebMediaPlayerClientImpl::setOpaque):
+ (WebKit::WebMediaPlayerClientImpl::platformLayer):
+ (WebKit::WebMediaPlayerClientImpl::acceleratedRenderingInUse):
+ (WebKit::WebMediaPlayerClientImpl::setVideoFrameProviderClient):
+ (WebKit::WebMediaPlayerClientImpl::supportsType):
+ * src/WebMediaPlayerClientImpl.h:
+ (WebMediaPlayerClientImpl):
+ * src/WebVideoLayer.cpp: Copied from Source/WebKit/chromium/src/WebContentLayer.cpp.
+ (WebKit):
+ (WebKit::WebVideoLayer::create):
+ (WebKit::WebVideoLayer::WebVideoLayer):
+ (WebKit::WebVideoLayer::active):
+
+2012-04-16 Aaron Colwell <acolwell@chromium.org>
+
+ Fix WebKit style violations in Chromium WebMediaPlayer.h & WebMediaPlayerClient.h
+ https://bugs.webkit.org/show_bug.cgi?id=84046
+
+ Reviewed by Darin Fisher.
+
+ * WebKit.gyp:
+ * public/WebMediaPlayer.h:
+ (WebKit):
+ * public/WebMediaPlayerClient.h:
+ * public/WebTimeRange.h: Copied from Source/WebKit/chromium/public/WebMediaPlayerClient.h.
+ (WebKit):
+ (WebKit::WebTimeRange::WebTimeRange):
+ (WebTimeRange):
+ * src/AssertMatchingEnums.cpp:
+
+2012-04-16 Terry Anderson <tdanderson@chromium.org>
+
+ [chromium] Allow WebGestureEvent to store four floating point values
+ https://bugs.webkit.org/show_bug.cgi?id=84053
+
+ Reviewed by Darin Fisher.
+
+ See bug description for an explanation of the changes made.
+
+ * public/WebInputEvent.h:
+ (WebGestureEvent):
+ (WebKit::WebGestureEvent::WebGestureEvent):
+ * src/WebInputEvent.cpp:
+ (SameSizeAsWebGestureEvent):
+ * src/WebInputEventConversion.cpp:
+ (WebKit::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
+
+2012-04-16 Alexey Proskuryakov <ap@apple.com>
+
+ [chromium] Remove BlobRegistryProxy::createResourceHandle
+ https://bugs.webkit.org/show_bug.cgi?id=84047
+
+ Reviewed by Nate Chapin.
+
+ * src/BlobRegistryProxy.h: (BlobRegistryProxy::createResourceHandle): This function
+ is no longer used.
+
+2012-04-16 Raymes Khoury <raymes@chromium.org>
+
+ Fix bug in WebPluginContainer::isRectTopmost() which gave the incorrect result for a scrolled window.
+ https://bugs.webkit.org/show_bug.cgi?id=80606
+
+ Reviewed by Darin Fisher.
+
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::isRectTopmost):
+
+2012-04-15 Keishi Hattori <keishi@webkit.org>
+
+ Introduce MenuItemID to autofill popup
+ https://bugs.webkit.org/show_bug.cgi?id=83777
+
+ Introducing MenuItemIDs because we want to add multiple separators and
+ need to identify non-autofill menu items without resorting to the separator position.
+
+ Reviewed by Kent Tamura.
+
+ * public/WebAutofillClient.h:
+ (WebKit::WebAutofillClient::didAcceptAutofillSuggestion): Changed uniqueID to itemID because they aren't unique.
+ (WebKit::WebAutofillClient::didSelectAutofillSuggestion):
+ * public/WebView.h:
+ (WebView):
+ * src/AutofillPopupMenuClient.cpp:
+ (WebKit::AutofillPopupMenuClient::AutofillPopupMenuClient):
+ (WebKit::AutofillPopupMenuClient::getSuggestionsCount):
+ (WebKit::AutofillPopupMenuClient::getSuggestion):
+ (WebKit::AutofillPopupMenuClient::getLabel):
+ (WebKit::AutofillPopupMenuClient::getIcon):
+ (WebKit::AutofillPopupMenuClient::removeSuggestionAtIndex):
+ (WebKit::AutofillPopupMenuClient::canRemoveSuggestionAtIndex):
+ (WebKit::AutofillPopupMenuClient::valueChanged):
+ (WebKit::AutofillPopupMenuClient::selectionChanged):
+ (WebKit::AutofillPopupMenuClient::itemIsSeparator):
+ (WebKit::AutofillPopupMenuClient::itemIsWarning):
+ (WebKit::AutofillPopupMenuClient::initialize):
+ (WebKit::AutofillPopupMenuClient::setSuggestions):
+ * src/AutofillPopupMenuClient.h: Removed m_separatorIndex because now we use itemID to identify separators.
+ Added m_useLegacyBehavior which is true when it is initialized with a valid separator index. This is to keep
+ the autofill working even when the chromium side hasn't been updated yet.
+ (AutofillPopupMenuClient):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::applyAutofillSuggestions):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+
+2012-04-15 James Robinson <jamesr@chromium.org>
+
+ [chromium] LayerRendererChromium shouldn't know anything about CCLayerImpl
+ https://bugs.webkit.org/show_bug.cgi?id=83415
+
+ Reviewed by Adrienne Walker.
+
+ Add an explicit rootLayer getter to the test implementation of LayerRendererChromium since there isn't one on
+ the base class any more.
+
+ * tests/LayerRendererChromiumTest.cpp:
+ (FakeLayerRendererChromiumClient::rootLayer):
+ (FakeLayerRendererChromiumClient):
+ (TEST_F):
+
+2012-04-15 Yuta Kitamura <yutak@chromium.org>
+
+ Leak in WebSocketChannel with workers/worker-reload.html (part 2)
+ https://bugs.webkit.org/show_bug.cgi?id=83749
+
+ Reviewed by David Levin.
+
+ * src/WebWorkerClientImpl.cpp:
+ (WebKit::WebWorkerClientImpl::postTaskForModeToWorkerContext):
+ Correctly propagate the return value of postTaskForModeToWorkerContext().
+
+2012-04-13 David Reveman <reveman@chromium.org>
+
+ [Chromium] Avoid unnecessary full tile updates for checkerboard tiles.
+ https://bugs.webkit.org/show_bug.cgi?id=83804
+
+ Reviewed by James Robinson.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::setLayerPropertiesForTesting):
+ (WTF):
+ (WTF::CCLayerTreeHostTestAtomicCommitWithPartialUpdate::beginTest):
+ (WTF::CCLayerTreeHostTestAtomicCommitWithPartialUpdate::commitCompleteOnCCThread):
+ (WTF::CCLayerTreeHostTestAtomicCommitWithPartialUpdate::drawLayersOnCCThread):
+ (WTF::CCLayerTreeHostTestAtomicCommitWithPartialUpdate::layout):
+ (WTF::setTestLayerPropertiesForTesting):
+ (WTF::CCLayerTreeHostTestLayerOcclusion::beginTest):
+ (WTF::CCLayerTreeHostTestLayerOcclusionWithFilters::beginTest):
+ (WTF::CCLayerTreeHostTestManySurfaces::beginTest):
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::TEST):
+
+2012-04-13 Nico Weber <thakis@chromium.org>
+
+ [chromium] There is no Color(float, float, float) constructor, fix an attempt to call it.
+ https://bugs.webkit.org/show_bug.cgi?id=83920
+
+ Reviewed by James Robinson.
+
+ Found by clang:
+ third_party/WebKit/Source/WebKit/chromium/tests/LayerChromiumTest.cpp:508:89:error: implicit conversion turns literal floating-point number into integer: 'float' to 'int' [-Werror,-Wliteral-conversion]
+ EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setBackgroundColor(Color(0.4f, 0.4f, 0.4f)));
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
+
+ * tests/LayerChromiumTest.cpp:
+
+2012-04-13 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Replicas should be included in the computed occlusion
+ https://bugs.webkit.org/show_bug.cgi?id=82262
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (CCOcclusionTrackerTestReplicaDoesOcclude):
+ (WebKitTests::CCOcclusionTrackerTestReplicaDoesOcclude::runMyTest):
+ (WebKitTests):
+ (CCOcclusionTrackerTestReplicaWithClipping):
+ (WebKitTests::CCOcclusionTrackerTestReplicaWithClipping::runMyTest):
+ (CCOcclusionTrackerTestSurfaceChildOfSurface):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceChildOfSurface::runMyTest):
+
+2012-04-13 Bernhard Bauer <bauerb@google.com>
+
+ [chromium] Remove fallback code for "Missing plug-in" string.
+ https://bugs.webkit.org/show_bug.cgi?id=81907
+
+ Reviewed by Adam Barth.
+
+ * src/LocalizedStrings.cpp:
+ (WebCore::missingPluginText):
+
+2012-04-11 James Robinson <jamesr@chromium.org>
+
+ [chromium] Remove unused compositeToTexture / compositeOffscreen setting
+ https://bugs.webkit.org/show_bug.cgi?id=83733
+
+ Reviewed by Adrienne Walker.
+
+ Remove compositeOffscreen / compositeToTexture setting. This was an experiment that is no longer needed.
+
+ * public/WebSettings.h:
+ * src/WebLayerTreeView.cpp:
+ (WebKit::WebLayerTreeView::Settings::operator CCSettings):
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::WebSettingsImpl):
+ * src/WebSettingsImpl.h:
+ (WebSettingsImpl):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+
+2012-04-13 James Robinson <jamesr@chromium.org>
+
+ [chromium] Move WebVideoFrame into Platform and remove WebCore::VideoFrameChromium wrapper API
+ https://bugs.webkit.org/show_bug.cgi?id=83851
+
+ Reviewed by Adam Barth.
+
+ Moves the WebVideoFrame interface into Platform and removes the now unnecessary VideoFrameChromiumImpl adapter
+ implementation.
+
+ * WebKit.gyp:
+ * public/WebVideoFrame.h:
+ * src/AssertMatchingEnums.cpp:
+ * src/VideoFrameChromiumImpl.cpp: Removed.
+ * src/VideoFrameChromiumImpl.h: Removed.
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::getCurrentFrame):
+ (WebKit::WebMediaPlayerClientImpl::putCurrentFrame):
+ (WebKit::WebMediaPlayerClientImpl::supportsType):
+ * src/WebMediaPlayerClientImpl.h:
+ (WebMediaPlayerClientImpl):
+
+2012-04-13 Rob Flack <flackr@chromium.org>
+
+ Chromium: Should enable -webkit-image-set
+ https://bugs.webkit.org/show_bug.cgi?id=81859
+
+ Reviewed by Adam Barth.
+
+ * features.gypi:
+
+2012-04-12 Michael Nordman <michaeln@google.com>
+
+ [chromium] Now that the chromium port is using a different dom_storage backend
+ library in its main browser process, there are a handful of files that should no
+ longer be included in the build, and a few files than should be deleted
+ outright, and the webkit api should be modified to reflect the new (and smaller)
+ contract between the embedder and webkit/webcore.
+ https://bugs.webkit.org/show_bug.cgi?id=83807
+
+ Reviewed by Adam Barth.
+
+ * WebKit.gyp: Delete a few files.
+ * public/WebStorageNamespace.h: Remove some unused data members and methods, and annotate close() as deprecated.
+ * public/platform/WebKitPlatformSupport.h: Annotate a method as deprecated.
+ * src/StorageAreaProxy.cpp: Remove the include of a deleted file.
+ * src/StorageEventDispatcherChromium.cpp: Removed.
+ * src/StorageEventDispatcherImpl.cpp: Added a FIXME comment for upcoming work.
+ * src/StorageNamespaceProxy.cpp: Modified to no longer call out to the embedder thru the deprecated close() method.
+ * src/StorageNamespaceProxy.h: Moved some blank lines around.
+ * src/WebStorageAreaImpl.cpp: Removed.
+ * src/WebStorageAreaImpl.h: Removed.
+ * src/WebStorageEventDispatcherImpl.cpp: Cleaned up some cruft.
+ * src/WebStorageNamespaceImpl.cpp: Removed.
+ * src/WebStorageNamespaceImpl.h: Removed.
+
+2012-04-13 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r114140.
+ http://trac.webkit.org/changeset/114140
+ https://bugs.webkit.org/show_bug.cgi?id=83921
+
+ Fails fast/css/image-set-parsing.html test it attempts to
+ introduce. (Requested by scheib on #webkit).
+
+ * features.gypi:
+
+2012-04-13 Rob Flack <flackr@chromium.org>
+
+ Chromium: Should enable -webkit-image-set
+ https://bugs.webkit.org/show_bug.cgi?id=81859
+
+ Reviewed by Adam Barth.
+
+ * features.gypi:
+
+2012-04-13 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Build fix after r114126.
+
+ * WebKit.gyp:
+
+2012-04-13 Keishi Hattori <keishi@webkit.org>
+
+ [chromium] Add WebKit API to access <datalist> options
+ https://bugs.webkit.org/show_bug.cgi?id=83762
+
+ Introduce WebInputElement::dataListOptions so we can implement a UI for datalist.
+
+ Reviewed by Kent Tamura.
+
+ * public/WebInputElement.h:
+ (WebKit):
+ (WebInputElement):
+ * src/WebInputElement.cpp:
+ (WebKit::WebInputElement::dataListOptions): Added. Returns a WebNodeCollection containing WebOptionElements.
+
+2012-04-13 Kent Tamura <tkent@chromium.org>
+
+ Add a runtime flag for <input type=date>
+ https://bugs.webkit.org/show_bug.cgi?id=83853
+
+ Reviewed by Adam Barth.
+
+ * public/WebRuntimeFeatures.h:
+ (WebRuntimeFeatures): Add enableInputTypeDate() and isInputTypeDateEnabled().
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableInputTypeDate): Added.
+ (WebKit::WebRuntimeFeatures::isInputTypeDateEnabled): Added.
+
+2012-04-13 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed. Rolled DEPS.
+
+ * DEPS:
+
+2012-04-12 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Background filters for composited layers
+ https://bugs.webkit.org/show_bug.cgi?id=80046
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerImplTest.cpp:
+ (WebCore::TEST):
+
+2012-04-12 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r114075.
+ http://trac.webkit.org/changeset/114075
+ https://bugs.webkit.org/show_bug.cgi?id=83857
+
+ Breaks compile (Requested by jamesr on #webkit).
+
+ * WebKit.gyp:
+ * public/WebVideoFrame.h:
+ (WebKit):
+ (WebVideoFrame):
+ (WebKit::WebVideoFrame::~WebVideoFrame):
+ (WebKit::WebVideoFrame::format):
+ (WebKit::WebVideoFrame::width):
+ (WebKit::WebVideoFrame::height):
+ (WebKit::WebVideoFrame::planes):
+ (WebKit::WebVideoFrame::stride):
+ (WebKit::WebVideoFrame::data):
+ (WebKit::WebVideoFrame::textureId):
+ (WebKit::WebVideoFrame::textureTarget):
+ * src/AssertMatchingEnums.cpp:
+ * src/VideoFrameChromiumImpl.cpp: Added.
+ (WebKit):
+ (WebKit::VideoFrameChromiumImpl::toWebVideoFrame):
+ (WebKit::VideoFrameChromiumImpl::VideoFrameChromiumImpl):
+ (WebKit::VideoFrameChromiumImpl::format):
+ (WebKit::VideoFrameChromiumImpl::width):
+ (WebKit::VideoFrameChromiumImpl::height):
+ (WebKit::VideoFrameChromiumImpl::planes):
+ (WebKit::VideoFrameChromiumImpl::stride):
+ (WebKit::VideoFrameChromiumImpl::data):
+ (WebKit::VideoFrameChromiumImpl::requiredTextureSize):
+ (WebKit::VideoFrameChromiumImpl::hasPaddingBytes):
+ (WebKit::VideoFrameChromiumImpl::textureId):
+ (WebKit::VideoFrameChromiumImpl::textureTarget):
+ * src/VideoFrameChromiumImpl.h: Renamed from Source/Platform/chromium/public/WebVideoFrame.h.
+ (WebKit):
+ (VideoFrameChromiumImpl):
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::getCurrentFrame):
+ (WebKit::WebMediaPlayerClientImpl::putCurrentFrame):
+ (WebKit::WebMediaPlayerClientImpl::supportsType):
+ * src/WebMediaPlayerClientImpl.h:
+ (WebMediaPlayerClientImpl):
+
+2012-04-12 James Robinson <jamesr@chromium.org>
+
+ [chromium] Move WebVideoFrame into Platform and remove WebCore::VideoFrameChromium wrapper API
+ https://bugs.webkit.org/show_bug.cgi?id=83851
+
+ Reviewed by Adam Barth.
+
+ Moves the WebVideoFrame interface into Platform and removes the now unnecessary VideoFrameChromiumImpl adapter
+ implementation.
+
+ * WebKit.gyp:
+ * public/WebVideoFrame.h:
+ * src/AssertMatchingEnums.cpp:
+ * src/VideoFrameChromiumImpl.cpp: Removed.
+ * src/VideoFrameChromiumImpl.h: Removed.
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::getCurrentFrame):
+ (WebKit::WebMediaPlayerClientImpl::putCurrentFrame):
+ (WebKit::WebMediaPlayerClientImpl::supportsType):
+ * src/WebMediaPlayerClientImpl.h:
+ (WebMediaPlayerClientImpl):
+
+2012-04-12 David Dorwin <ddorwin@chromium.org>
+
+ Add Encrypted Media Extensions events and errors to HTMLMediaElement
+ https://bugs.webkit.org/show_bug.cgi?id=82974
+
+ Reviewed by Adam Barth.
+
+ The new events and errors are behind the ENABLE(ENCRYPTED_MEDIA) feature define.
+ Implementation is based on v0.1 of the draft proposal at
+ http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html#events.
+
+ * public/WebMediaPlayerClient.h:
+ * src/AssertMatchingEnums.cpp:
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::keyAdded):
+ (WebKit):
+ (WebKit::WebMediaPlayerClientImpl::keyError):
+ (WebKit::WebMediaPlayerClientImpl::keyMessage):
+ (WebKit::WebMediaPlayerClientImpl::keyNeeded):
+ * src/WebMediaPlayerClientImpl.h:
+ (WebMediaPlayerClientImpl):
+
+2012-04-12 Kent Tamura <tkent@chromium.org>
+
+ [Chromium] Enable INPUT_TYPE_DATE
+ https://bugs.webkit.org/show_bug.cgi?id=83761
+
+ Reviewed by Kentaro Hara.
+
+ * features.gypi: Turn ENABLE_INPUT_TYPE_DATE on.
+
+2012-04-12 Kent Tamura <tkent@chromium.org>
+
+ [Chromium] Fix !ENABLE(PAGE_POPUP) build
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl): Wrap m_pagePopup with ENABLE(PAGE_POPUP).
+
+2012-04-12 Kent Tamura <tkent@chromium.org>
+
+ [Chromium] Add PagePopup implementation
+ https://bugs.webkit.org/show_bug.cgi?id=81081
+
+ Reviewed by Adam Barth.
+
+ Add WebPagePopupImpl class, which is an implementation of
+ WebCore::PagePopup interface and WebKit::WebPagePopup interface. It's a
+ WebWidget which has a Page object.
+
+ No new tests because this makes no behavior change yet.
+
+ * WebKit.gyp: Add WebPagePopupImpl.h.
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::hasOpenedPopup): Supports the PagePopup.
+ (WebKit::ChromeClientImpl::openPagePopup):
+ just delegate to WebViewImpl::openPagePopup().
+ (WebKit::ChromeClientImpl::closePagePopup): ditto.
+
+ * src/WebPagePopupImpl.cpp:
+ (PagePopupChromeClient):
+ This is a light implementation of ChromeClient for the page in
+ WebPagePopupImpl. This is a friend of WebPagePopupImpl becase of ease of
+ access to its members.
+ (WebKit::PagePopupChromeClient::PagePopupChromeClient):
+ (WebKit::WebPagePopupImpl::WebPagePopupImpl):
+ (WebKit::WebPagePopupImpl::~WebPagePopupImpl):
+ (WebKit::WebPagePopupImpl::init):
+ (WebKit::WebPagePopupImpl::initPage):
+ (WebKit::WebPagePopupImpl::size):
+ (WebKit::WebPagePopupImpl::animate): Calls PageWidgetDelegate::animate().
+ (WebKit::WebPagePopupImpl::composite):
+ (WebKit::WebPagePopupImpl::layout): Calls PageWidgetDelegate::layout().
+ (WebKit::WebPagePopupImpl::paint): Calls PageWidgetDelegate::paint().
+ (WebKit::WebPagePopupImpl::resize):
+ (WebKit::WebPagePopupImpl::handleKeyEvent):
+ (WebKit::WebPagePopupImpl::handleCharEvent):
+ (WebKit::WebPagePopupImpl::handleGestureEvent):
+ (WebKit::WebPagePopupImpl::handleInputEvent):
+ (WebKit::WebPagePopupImpl::setFocus):
+ (WebKit::WebPagePopupImpl::close): Delete the page, and kill itself.
+ (WebKit::WebPagePopupImpl::closePopup):
+ (WebKit::WebPagePopup::create):
+ * src/WebPagePopupImpl.h: Added.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl): Initialize m_pagePopup.
+ (WebKit::WebViewImpl::handleKeyEvent):
+ Renamed from keyEvent(). Forward key events to a PagePopup if it is open.
+ (WebKit::WebViewImpl::handleCharEvent):
+ Renamed from charEvent(). Forward char events to a PagePopup if it is open.
+ (WebKit::WebViewImpl::openPagePopup):
+ Added. Instantiate a WebPagePopupImpl, calculates a good bounding
+ rectangle of the page popup from the specified element rectangle,
+ initialize the WebPagePopupImpl, and stop caret blink.
+ (WebKit::WebViewImpl::closePagePopup):
+ Close the popup, clear m_pagePopup, and resume caret blink.
+ (WebKit::WebViewImpl::setFocus): Hide all the popups.
+ (WebKit::WebViewImpl::hidePopups): Hide the page popup too.
+ * src/WebViewImpl.h:
+ (WebKit::WebViewImpl::hasOpenedPopup): Checks the page popup too.
+
+2012-04-12 Kent Tamura <tkent@chromium.org>
+
+ [Chromium] Move some code of WebViewImpl and WebFrameImpl to PageWidgetDelegate
+ https://bugs.webkit.org/show_bug.cgi?id=83750
+
+ Reviewed by Adam Barth.
+
+ In order to share code in WebViewImpl and the incoming WebPagePopupImpl,
+ we move some code of WebViewImpl and WebFrameImpl to PageWidgetDelegate.
+ PageWidgetDelegate is a set of static functions because we can't use
+ virtual inheritance in this case and we don't want to move WebView's
+ data members to another class.
+
+ No new tests. Just refactoring.
+
+ * WebKit.gyp: Add PageWidgetDelegate.{cpp,h} and WebPagePopupImpl.h.
+ * src/PageWidgetDelegate.cpp: Added.
+ (WebKit::mainFrameView):
+ (WebKit::PageWidgetDelegate::animate):
+ Moved from a part of WebViewImpl::animatie()
+ (WebKit::PageWidgetDelegate::layout):
+ Moved from WebViewImpl::layout() and WebFrameImpl::layout().
+ (WebKit::PageWidgetDelegate::paint):
+ Moved from WebFrameImpl::paint() and paintWithContext().
+ (WebKit::PageWidgetDelegate::handleInputEvent):
+ Moved from a part of WebViewImpl::handleInputEvent().
+ (WebKit::PageWidgetEventHandler::handleMouseMove):
+ Common implementation of an event handling.
+ (WebKit::PageWidgetEventHandler::handleMouseLeave): ditto.
+ (WebKit::PageWidgetEventHandler::handleMouseDown): ditto.
+ (WebKit::PageWidgetEventHandler::handleMouseUp): ditto.
+ (WebKit::PageWidgetEventHandler::handleMouseWheel): ditto.
+ (WebKit::PageWidgetEventHandler::handleTouchEvent): ditto.
+ * src/PageWidgetDelegate.h: Added.
+ * src/WebFrameImpl.cpp:
+ Remove layout(), paintWithContext(), and paint(). They are moved to
+ PageWidgetDelegate.
+ * src/WebFrameImpl.h:
+ (WebFrameImpl): Remove layout(), paintWithContext(), and paint().
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::handleMouseLeave):
+ Renamed from mouseLeave(), use PageWidgetDelegate::handleMouseLeave().
+ (WebKit::WebViewImpl::handleMouseDown):
+ Renamed from mouseDown(), use PageWidgetDelegate::handleMouseDown().
+ (WebKit::WebViewImpl::handleMouseUp):
+ Renamed from mouseUp(), use PageWidgetDelegate::handleMouseUp().
+ (WebKit::WebViewImpl::scrollBy): Calls renamed handleMouseWheel().
+ (WebKit::WebViewImpl::handleGestureEvent): Renamed from gestureEvent().
+ (WebKit::WebViewImpl::handleKeyEvent): Renamed from keyEvent().
+ (WebKit::WebViewImpl::handleCharEvent): Renamed from charEvent().
+ (WebKit::WebViewImpl::updateAnimations): Uses PageWidgetDelegate::animate().
+ (WebKit::WebViewImpl::layout): Uses PageWidgetDelegate::layout().
+ (WebKit::WebViewImpl::paint): Uses PageWidgetDelegate::paint().
+ (WebKit::WebViewImpl::handleInputEvent): Uses PageWidgetDelegate::handleInputEvent().
+ * src/WebViewImpl.h:
+
+2012-04-12 Adrienne Walker <enne@google.com>
+
+ [chromium] Fix Windows compiler warnings in webkit_unit_test target
+ https://bugs.webkit.org/show_bug.cgi?id=83732
+
+ Reviewed by Kent Tamura.
+
+ * tests/CCDamageTrackerTest.cpp:
+ (WebKitTests::TEST_F):
+ * tests/CCLayerImplTest.cpp:
+ (WebCore::TEST):
+ * tests/CCLayerTreeHostCommonTest.cpp:
+ (WebKitTests::TEST):
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::TEST_F):
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore::TEST):
+ * tests/FloatQuadTest.cpp:
+ (WebCore::TEST):
+ * tests/ScrollAnimatorNoneTest.cpp:
+ (TEST_F):
+ * tests/TreeSynchronizerTest.cpp:
+ (WebKitTests::TEST):
+ * tests/WebLayerTest.cpp:
+
+2012-04-11 Alec Flett <alecflett@chromium.org>
+
+ IndexedDB: Stub out WebKit interface for get(IndexedKeyRange)
+ https://bugs.webkit.org/show_bug.cgi?id=83637
+
+ Reviewed by Kent Tamura.
+
+ This is just a stub-out of IDBObjectStore.get(IDBKeyRange) to coordinate
+ a landing in chromium
+
+ * public/WebIDBObjectStore.h:
+ (WebKit::WebIDBObjectStore::get):
+ (WebIDBObjectStore):
+ * src/IDBObjectStoreBackendProxy.cpp:
+ (WebKit::IDBObjectStoreBackendProxy::get):
+ (WebKit):
+ * src/IDBObjectStoreBackendProxy.h:
+ (IDBObjectStoreBackendProxy):
+ * src/WebIDBObjectStoreImpl.cpp:
+ (WebKit::WebIDBObjectStoreImpl::get):
+ (WebKit):
+ * src/WebIDBObjectStoreImpl.h:
+ (WebIDBObjectStoreImpl):
+
+2012-04-11 Kenichi Ishibashi <bashi@chromium.org>
+
+ [chromium] Fix Windows warnings in WebSocketDeflaterTest
+ https://bugs.webkit.org/show_bug.cgi?id=83731
+
+ Reviewed by Kent Tamura.
+
+ Use const char* instead of const char[] to suppress warnings on
+ Windows.
+
+ * tests/WebSocketDeflaterTest.cpp:
+ (WebCore::TEST):
+
+2012-04-11 David Dorwin <ddorwin@chromium.org>
+
+ Add keySystem attribute to canPlayType() for Encrypted Media Extensions
+ https://bugs.webkit.org/show_bug.cgi?id=82973
+
+ Reviewed by Adam Barth.
+
+ The new attribute is behind the ENABLE(ENCRYPTED_MEDIA) feature define.
+ Implementation is based on v0.1 of the draft proposal at
+ http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html#extensions.
+
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::supportsType):
+ * src/WebMediaPlayerClientImpl.h:
+ (WebMediaPlayerClientImpl):
+
+2012-04-10 James Robinson <jamesr@chromium.org>
+
+ [chromium] Add OVERRIDE annotations for cc layer types
+ https://bugs.webkit.org/show_bug.cgi?id=83658
+
+ Reviewed by Daniel Bates.
+
+ This adds OVERRIDE annotations to overrides of functions on these classes:
+ - CCLayerImpl
+ - LayerChromium
+ - TiledLayerChromium
+
+ * src/WebLayerImpl.cpp:
+ * src/WebLayerImpl.h:
+ (WebLayerImpl): Removed unused and empty paintContents() function.
+ * tests/CCLayerIteratorTest.cpp:
+ * tests/CCLayerTreeHostCommonTest.cpp:
+ * tests/CCLayerTreeHostImplTest.cpp:
+ * tests/CCLayerTreeHostTest.cpp:
+ * tests/CCOcclusionTrackerTest.cpp:
+ * tests/CCTiledLayerTestCommon.h:
+ (FakeTiledLayerChromium):
+ * tests/LayerChromiumTest.cpp:
+ * tests/TreeSynchronizerTest.cpp:
+
+2012-04-11 James Robinson <jamesr@chromium.org>
+
+ [chromium] Add OVERRIDE annotations for cc animation-related interfaces
+ https://bugs.webkit.org/show_bug.cgi?id=83650
+
+ Reviewed by Daniel Bates.
+
+ This adds OVERRIDE annotations to the implementations of the following interfaces:
+ - CCAnimationCurve
+ - CCFloatAnimationCurve
+ - CCLayerAnimationControllerClient
+ - CCTransformAnimationCurve
+
+ * tests/CCAnimationTestCommon.h:
+
+2012-04-11 Aaron Colwell <acolwell@chromium.org>
+
+ Remove webkit prefix from Media Source runtime feature name.
+ https://bugs.webkit.org/show_bug.cgi?id=83633
+
+ Reviewed by Adam Barth.
+
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableMediaSource):
+ (WebKit::WebRuntimeFeatures::isMediaSourceEnabled):
+
+2012-04-11 Adrienne Walker <enne@google.com>
+
+ [chromium] Draw missing layer tile checkerboards as checkerboards
+ https://bugs.webkit.org/show_bug.cgi?id=83241
+
+ Reviewed by James Robinson.
+
+ Rename usedCheckerboard to hadMissingTile to avoid confusion. Update
+ tests to not expect SolidColor quads for checkerboards.
+
+ * src/NonCompositedContentHost.cpp:
+ (WebKit::NonCompositedContentHost::NonCompositedContentHost):
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore::appendQuads):
+ * tests/CCSolidColorLayerImplTest.cpp:
+ (CCLayerTestCommon::TEST):
+ * tests/CCTiledLayerImplTest.cpp:
+ (CCLayerTestCommon::TEST):
+ (CCLayerTestCommon::getQuads):
+ * tests/LayerChromiumTest.cpp:
+
+2012-04-11 Ami Fischman <fischman@chromium.org>
+
+ Remove unused WebVideoFrame::Format values
+ https://bugs.webkit.org/show_bug.cgi?id=83625
+
+ Reviewed by Kenneth Russell.
+
+ * public/WebVideoFrame.h:
+ (WebKit):
+ * src/AssertMatchingEnums.cpp:
+
+2012-04-11 'Pavel Feldman' <pfeldman@chromium.org>
+
+ Follow up to r113863: fix chromium inspector interactive test harness.
+
+ * src/js/Tests.js:
+
+2012-04-11 Sadrul Habib Chowdhury <sadrul@chromium.org>
+
+ [chromium] Add Battery Status API support.
+
+ The battery-client (BatteryClientChromium) will notify the client (WebBatteryStatusClient) when to start or stop
+ sending battery status updates. The client, in response will send the notifications to WebViewImpl, which sends
+ this update information to the WebCore::BatteryClient, and it triggers the appropriate javascript-callbacks.
+ The spec is at http://www.w3.org/TR/2011/WD-battery-status-20111129/.
+ https://bugs.webkit.org/show_bug.cgi?id=83284
+
+ Reviewed by Adam Barth.
+
+ * WebKit.gyp:
+ * features.gypi:
+ * public/WebBatteryStatus.h: Added.
+ (WebKit):
+ (WebBatteryStatus):
+ (WebKit::WebBatteryStatus::WebBatteryStatus):
+ * public/WebBatteryStatusClient.h: Added.
+ (WebKit):
+ (WebBatteryStatusClient):
+ (WebKit::WebBatteryStatusClient::~WebBatteryStatusClient):
+ * public/WebView.h:
+ (WebKit):
+ (WebView):
+ (WebKit::WebView::updateBatteryStatus):
+ * public/WebViewClient.h:
+ (WebKit):
+ (WebViewClient):
+ (WebKit::WebViewClient::batteryStatusClient):
+ * src/BatteryClientImpl.cpp: Added.
+ (WebKit):
+ (WebKit::BatteryClientImpl::BatteryClientImpl):
+ (WebKit::BatteryClientImpl::updateBatteryStatus):
+ (WebKit::BatteryClientImpl::setController):
+ (WebKit::BatteryClientImpl::startUpdating):
+ (WebKit::BatteryClientImpl::stopUpdating):
+ (WebKit::BatteryClientImpl::batteryControllerDestroyed):
+ * src/BatteryClientImpl.h: Added.
+ (WebKit):
+ (BatteryClientImpl):
+ (WebKit::BatteryClientImpl::~BatteryClientImpl):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit):
+ (WebKit::WebViewImpl::updateBatteryStatus):
+ * src/WebViewImpl.h:
+ (WebKit):
+ (WebViewImpl):
+
+2012-04-10 Ami Fischman <fischman@chromium.org>
+
+ Roll Chromium DEPS to last-known good revision
+ https://bugs.webkit.org/show_bug.cgi?id=83652
+
+ Unreviewed, just a DEPS roll (131469:131684)
+
+ * DEPS:
+
+2012-04-10 Alexandre Elias <aelias@google.com>
+
+ Add gesture event enums for long-press and pinch
+ https://bugs.webkit.org/show_bug.cgi?id=83640
+
+ Reviewed by James Robinson.
+
+ Add new enum values GestureLongPress and GesturePinchBegin/End/Update,
+ along with no-op default handling.
+
+ * public/WebInputEvent.h:
+ * src/WebInputEventConversion.cpp:
+ (WebKit::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
+ * src/WebPopupMenuImpl.cpp:
+ (WebKit::WebPopupMenuImpl::handleInputEvent):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::gestureEvent):
+
+2012-04-10 James Robinson <jamesr@chromium.org>
+
+ [chromium] Add OVERRIDE annotations for cc tree host and proxy interfaces
+ https://bugs.webkit.org/show_bug.cgi?id=83653
+
+ Reviewed by Adrienne Walker.
+
+ This adds OVERRIDE annotations to the implementations of the following interfaces:
+ - CCLayerTreeHostClient
+ - CCLayerTreeHostImplClient
+ - CCProxy
+ - LayerRendererChromiumClient
+
+ * src/WebLayerTreeViewImpl.h:
+ (WebLayerTreeViewImpl):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+ * tests/CCLayerTreeHostImplTest.cpp:
+ * tests/CCLayerTreeHostTest.cpp:
+ * tests/FakeCCLayerTreeHostClient.h:
+ * tests/LayerRendererChromiumTest.cpp:
+
+2012-04-10 James Robinson <jamesr@chromium.org>
+
+ [chromium] Add OVERRIDE annotations for cc scheduler-related client interfaces
+ https://bugs.webkit.org/show_bug.cgi?id=83646
+
+ Reviewed by Adrienne Walker.
+
+ This adds OVERRIDE annotations to the implementations of the following interfaces:
+ - CCFrameRateControllerClient
+ - CCSchedulerClient
+ - CCTimeSource
+ - CCTimeSourceClient
+ - CCTimerClient
+
+
+ * tests/CCSchedulerTest.cpp:
+ * tests/CCSchedulerTestCommon.h:
+
+2012-04-10 James Robinson <jamesr@chromium.org>
+
+ [chromium] Fold LayerChromium::updateCompositorResources into main update
+ https://bugs.webkit.org/show_bug.cgi?id=83530
+
+ Reviewed by Adrienne Walker.
+
+ Update tests for interface changes.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::CCLayerTreeHostTest::runTest):
+ (WTF::ContentLayerChromiumWithUpdateTracking::update):
+ (WTF::ContentLayerChromiumWithUpdateTracking::idleUpdate):
+ (WTF::ContentLayerChromiumWithUpdateTracking::ContentLayerChromiumWithUpdateTracking):
+ (ContentLayerChromiumWithUpdateTracking):
+ (WTF::CCLayerTreeHostTestOpacityChange::afterTest):
+ (WTF::CCLayerTreeHostTestSetViewportSize::beginTest):
+ (WTF::CCLayerTreeHostTestAtomicCommitWithPartialUpdate::commitCompleteOnCCThread):
+ (WTF::TestLayerChromium::update):
+ (WTF::CCLayerTreeHostTestLayerOcclusion::beginTest):
+ (WTF::CCLayerTreeHostTestContentLayerOcclusion::beginTest):
+ (WTF::CCLayerTreeHostTestLayerOcclusionWithFilters::beginTest):
+ (WTF::CCLayerTreeHostTestManySurfaces::beginTest):
+ * tests/CCTiledLayerTestCommon.cpp:
+ (WebKitTests::FakeLayerTextureUpdater::updateLayerRect):
+ (WebKitTests::FakeTiledLayerChromium::update):
+ * tests/CCTiledLayerTestCommon.h:
+ (FakeLayerTextureUpdater):
+ (FakeTiledLayerChromium):
+ * tests/Canvas2DLayerChromiumTest.cpp:
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::TEST):
+ (WTF::idlePaintRepeat):
+
+2012-04-10 Adam Barth <abarth@webkit.org>
+
+ Limit -apple- and -khtml- to ENABLE(DASHBOARD_SUPPORT)
+ https://bugs.webkit.org/show_bug.cgi?id=83256
+
+ Reviewed by Eric Seidel.
+
+ * features.gypi:
+
+2012-04-10 Tim Dresser <tdresser@chromium.org>
+
+ [Chromium] defaultDeviceScaleFactor != 0 should set deviceScaleFactor = defaultDeviceScaleFactor in the absence of a viewport tag for debugging purposes
+ https://bugs.webkit.org/show_bug.cgi?id=82757
+
+ Reviewed by Darin Fisher.
+
+ If there is no viewport tag, the deviceScaleFactor is set to the defaultDeviceScaleFactor.
+ Tested by: WebFrameTest.DeviceScaleFactorUsesDefaultWithoutViewportTag.
+
+ * src/ChromeClientImpl.cpp:
+ (WebKit):
+ (WebKit::ChromeClientImpl::dispatchViewportPropertiesDidChange):
+ * tests/WebFrameTest.cpp:
+ (WebKit):
+ (FixedLayoutTestWebViewClient):
+ (WebKit::TEST_F):
+ * tests/data/no_viewport_tag.html: Added.
+
+2012-04-10 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r113734.
+ http://trac.webkit.org/changeset/113734
+ https://bugs.webkit.org/show_bug.cgi?id=83606
+
+ causing a bunch of unrelated test failures (Requested by
+ simonjam on #webkit).
+
+ * WebKit.gyp:
+ * features.gypi:
+ * public/WebBatteryStatus.h: Removed.
+ * public/WebBatteryStatusClient.h: Removed.
+ * public/WebView.h:
+ (WebKit):
+ (WebView):
+ * public/WebViewClient.h:
+ (WebKit):
+ * src/BatteryClientImpl.cpp: Removed.
+ * src/BatteryClientImpl.h: Removed.
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ * src/WebViewImpl.h:
+ (WebKit):
+ (WebViewImpl):
+
+2012-04-09 James Robinson <jamesr@chromium.org>
+
+ [chromium] Defer texture id allocation for copies until the actual copy executes
+ https://bugs.webkit.org/show_bug.cgi?id=83514
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCTiledLayerTestCommon.cpp:
+ * tests/CCTiledLayerTestCommon.h:
+ * tests/Canvas2DLayerChromiumTest.cpp:
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::TEST):
+
+2012-04-10 David Dorwin <ddorwin@chromium.org>
+
+ Add Encrypted Media Extensions methods to HTMLMediaElement
+ https://bugs.webkit.org/show_bug.cgi?id=82971
+
+ Reviewed by Adam Barth.
+
+ The extensions are behind the ENABLE(ENCRYPTED_MEDIA) feature define.
+ Implementation is based on v0.1 of the draft proposal at
+ http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html.
+
+ * features.gypi:
+ * public/WebMediaPlayer.h:
+ (WebKit):
+ (WebMediaPlayer):
+ (WebKit::WebMediaPlayer::generateKeyRequest):
+ (WebKit::WebMediaPlayer::addKey):
+ (WebKit::WebMediaPlayer::cancelKeyRequest):
+ * public/WebRuntimeFeatures.h:
+ (WebRuntimeFeatures):
+ * src/AssertMatchingEnums.cpp:
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit):
+ (WebKit::WebMediaPlayerClientImpl::generateKeyRequest):
+ (WebKit::WebMediaPlayerClientImpl::addKey):
+ (WebKit::WebMediaPlayerClientImpl::cancelKeyRequest):
+ * src/WebMediaPlayerClientImpl.h:
+ (WebMediaPlayerClientImpl):
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::isMediaStreamEnabled):
+ (WebKit::WebRuntimeFeatures::enableEncryptedMedia):
+ (WebKit):
+ (WebKit::WebRuntimeFeatures::isEncryptedMediaEnabled):
+
+2012-04-10 Sadrul Habib Chowdhury <sadrul@chromium.org>
+
+ [chromium] Add Battery Status API support.
+
+ The battery-client (BatteryClientChromium) will notify the client (WebBatteryStatusClient) when to start or stop
+ sending battery status updates. The client, in response will send the notifications to WebViewImpl, which sends
+ this update information to the WebCore::BatteryClient, and it triggers the appropriate javascript-callbacks.
+ The spec is at http://www.w3.org/TR/2011/WD-battery-status-20111129/.
+ https://bugs.webkit.org/show_bug.cgi?id=83284
+
+ Reviewed by Adam Barth.
+
+ * WebKit.gyp:
+ * features.gypi:
+ * public/WebBatteryStatus.h: Added.
+ (WebKit):
+ (WebBatteryStatus):
+ (WebKit::WebBatteryStatus::WebBatteryStatus):
+ * public/WebBatteryStatusClient.h: Added.
+ (WebKit):
+ (WebBatteryStatusClient):
+ (WebKit::WebBatteryStatusClient::~WebBatteryStatusClient):
+ * public/WebView.h:
+ (WebKit):
+ (WebView):
+ (WebKit::WebView::updateBatteryStatus):
+ * public/WebViewClient.h:
+ (WebKit):
+ (WebViewClient):
+ (WebKit::WebViewClient::batteryStatusClient):
+ * src/BatteryClientImpl.cpp: Added.
+ (WebKit):
+ (WebKit::BatteryClientImpl::BatteryClientImpl):
+ (WebKit::BatteryClientImpl::updateBatteryStatus):
+ (WebKit::BatteryClientImpl::setController):
+ (WebKit::BatteryClientImpl::startUpdating):
+ (WebKit::BatteryClientImpl::stopUpdating):
+ (WebKit::BatteryClientImpl::batteryControllerDestroyed):
+ * src/BatteryClientImpl.h: Added.
+ (WebKit):
+ (BatteryClientImpl):
+ (WebKit::BatteryClientImpl::~BatteryClientImpl):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit):
+ (WebKit::WebViewImpl::updateBatteryStatus):
+ * src/WebViewImpl.h:
+ (WebKit):
+ (WebViewImpl):
+
+2012-04-10 Zhenyao Mo <zmo@google.com>
+
+ Unreviewed, roll chromium to 131469
+
+ * DEPS:
+
+2012-04-09 Alexander Pavlov <apavlov@chromium.org>
+
+ Web Inspector: [Device Metrics] Introduce the "Fit window" option
+ https://bugs.webkit.org/show_bug.cgi?id=83280
+
+ Implement the scaling of the FrameView to the WebViewImpl size, handle WebViewImpl resizes.
+
+ Reviewed by Pavel Feldman.
+
+ * src/InspectorClientImpl.cpp:
+ (WebKit::InspectorClientImpl::overrideDeviceMetrics):
+ * src/InspectorClientImpl.h:
+ (InspectorClientImpl):
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::DeviceMetricsSupport::DeviceMetricsSupport):
+ (WebKit::DeviceMetricsSupport::setDeviceMetrics):
+ (WebKit::DeviceMetricsSupport::autoZoomPageToFitWidthOnNavigation):
+ (DeviceMetricsSupport):
+ (WebKit::DeviceMetricsSupport::autoZoomPageToFitWidth):
+ (WebKit::DeviceMetricsSupport::webViewResized):
+ (WebKit::DeviceMetricsSupport::applySizeOverrideIfNecessary):
+ (WebKit::DeviceMetricsSupport::ensureOriginalZoomFactor):
+ (WebKit::DeviceMetricsSupport::restore):
+ (WebKit::DeviceMetricsSupport::scaledEmulatedFrameSize):
+ (WebKit::DeviceMetricsSupport::forcedScrollbarDimensions):
+ (WebKit::DeviceMetricsSupport::applySizeOverrideInternal):
+ (WebKit::WebDevToolsAgentImpl::webViewResized):
+ (WebKit):
+ (WebKit::WebDevToolsAgentImpl::overrideDeviceMetrics):
+ (WebKit::WebDevToolsAgentImpl::autoZoomPageToFitWidth):
+ * src/WebDevToolsAgentImpl.h:
+ (WebDevToolsAgentImpl):
+ * src/WebDevToolsAgentPrivate.h:
+ (WebDevToolsAgentPrivate):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::resize):
+
+2012-04-09 Kent Tamura <tkent@chromium.org>
+
+ [Chromium] Remove unused variable, WebViewImpl::m_lastMousePosition.
+ https://bugs.webkit.org/show_bug.cgi?id=83550
+
+ Reviewed by Kentaro Hara.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::mouseMove):
+ * src/WebViewImpl.h:
+
+2012-04-09 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Viewport is not filled when out of texture memory on mac
+ https://bugs.webkit.org/show_bug.cgi?id=83351
+
+ Reviewed by Adrienne Walker.
+
+ * src/NonCompositedContentHost.cpp:
+ (WebKit::NonCompositedContentHost::NonCompositedContentHost):
+ (WebKit::NonCompositedContentHost::setBackgroundColor):
+ * src/WebLayerTreeView.cpp:
+ (WebKit::WebLayerTreeView::setBackgroundColor):
+ (WebKit):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setBackgroundColor):
+ (WebKit):
+ (WebKit::WebViewImplContentPainter::paint):
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+ * src/WebViewImpl.h:
+ (WebCore):
+ (WebViewImpl):
+ * tests/CCLayerImplTest.cpp:
+ (WebCore::TEST):
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::BlendStateCheckLayer::appendQuads):
+ (WebKitTests::TEST_F):
+ (WebKitTests):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF):
+ (CCLayerTreeHostTestCommit):
+ (WTF::CCLayerTreeHostTestCommit::CCLayerTreeHostTestCommit):
+ (WTF::CCLayerTreeHostTestCommit::beginTest):
+ (WTF::CCLayerTreeHostTestCommit::commitCompleteOnCCThread):
+ (WTF::CCLayerTreeHostTestCommit::afterTest):
+ (WTF::TEST_F):
+ (TestLayerChromium):
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebKitTests::TestContentLayerChromium::TestContentLayerChromium):
+ (WebKitTests::TestContentLayerChromium::visibleContentOpaqueRegion):
+ (WebKitTests::TestContentLayerChromium::setOpaqueContentsRect):
+ (TestContentLayerChromium):
+ (WebKitTests::TestContentLayerImpl::TestContentLayerImpl):
+ (TestContentLayerImpl):
+ (WebKitTests::TestContentLayerImpl::visibleContentOpaqueRegion):
+ (WebKitTests::TestContentLayerImpl::setOpaqueContentsRect):
+ * tests/CCTiledLayerImplTest.cpp:
+ * tests/LayerChromiumTest.cpp:
+
+2012-04-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r113656.
+ http://trac.webkit.org/changeset/113656
+ https://bugs.webkit.org/show_bug.cgi?id=83542
+
+ test is broken on chromium-win (Requested by simonjam on
+ #webkit).
+
+ * public/WebIntent.h:
+ (WebIntent):
+ * src/WebIntent.cpp:
+
+2012-04-09 James Robinson <jamesr@chromium.org>
+
+ [chromium] More unreviewed OwnPtr<>::operator= related clang build fixes in unit tests.
+
+ * tests/Canvas2DLayerChromiumTest.cpp:
+ * tests/LayerChromiumTest.cpp:
+
+2012-04-09 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Cull occluded surface quads
+ https://bugs.webkit.org/show_bug.cgi?id=81227
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebKitTests::CCOcclusionTrackerTest::TearDown):
+ (WebKitTests::CCOcclusionTrackerTest::createReplicaLayer):
+ (CCOcclusionTrackerTest):
+ (WebKitTests::CCOcclusionTrackerTest::setReplica):
+ (WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblings::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblingsWithTwoTransforms::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestAnimationOpacity1OnMainThread::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestAnimationOpacity0OnMainThread::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestAnimationTranslateOnMainThread::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceOcclusionTranslatesWithClipping::runMyTest):
+ (WebKitTests):
+ (CCOcclusionTrackerTestReplicaOccluded):
+ (WebKitTests::CCOcclusionTrackerTestReplicaOccluded::runMyTest):
+ (CCOcclusionTrackerTestSurfaceWithReplicaUnoccluded):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceWithReplicaUnoccluded::runMyTest):
+ (CCOcclusionTrackerTestSurfaceAndReplicaOccludedDifferently):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceAndReplicaOccludedDifferently::runMyTest):
+ (CCOcclusionTrackerTestSurfaceChildOfSurface):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceChildOfSurface::runMyTest):
+
+2012-04-09 James Robinson <jamesr@chromium.org>
+
+ [chromium] Unreviewed build fix. OwnPtr<>::operator = breaks the build on clang, but not gcc :(
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::MockLayerTreeHost::create):
+ * tests/Canvas2DLayerChromiumTest.cpp:
+ * tests/LayerChromiumTest.cpp:
+
+2012-04-09 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Make culling work with clipped rects
+ https://bugs.webkit.org/show_bug.cgi?id=83494
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (CCOcclusionTrackerTestLayerBehindCameraDoesNotOcclude):
+ (WebKitTests::CCOcclusionTrackerTestLayerBehindCameraDoesNotOcclude::runMyTest):
+ (WebKitTests):
+ (CCOcclusionTrackerTestLargePixelsOccludeInsideClipRect):
+ (WebKitTests::CCOcclusionTrackerTestLargePixelsOccludeInsideClipRect::runMyTest):
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore::TestCCOcclusionTrackerImpl::TestCCOcclusionTrackerImpl):
+ (WebCore::makeLayer):
+ (WebCore::TEST):
+
+2012-04-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r113613.
+ http://trac.webkit.org/changeset/113613
+ https://bugs.webkit.org/show_bug.cgi?id=83509
+
+ crashing most chromium bots (Requested by simonjam on
+ #webkit).
+
+ * WebKit.gyp:
+ * features.gypi:
+ * public/WebBatteryStatus.h: Removed.
+ * public/WebBatteryStatusClient.h: Removed.
+ * public/WebView.h:
+ (WebKit):
+ (WebView):
+ * public/WebViewClient.h:
+ (WebKit):
+ * src/BatteryClientImpl.cpp: Removed.
+ * src/BatteryClientImpl.h: Removed.
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ * src/WebViewImpl.h:
+ (WebKit):
+ (WebViewImpl):
+
+2012-04-09 James Robinson <jamesr@chromium.org>
+
+ [chromium] CCLayerTreeHost / WebLayerTreeView should be single ownership, not RefCounted
+ https://bugs.webkit.org/show_bug.cgi?id=83413
+
+ Reviewed by Adrienne Walker.
+
+ Updates tests and implementation for RefPtr->OwnPtr switch. One nice benefit is that since WebLayerTreeView is
+ explicitly owned by the user of the API we can safely rely on them managing the lifetime of the client and thus
+ don't have to null check the client all the time.
+
+ * src/WebLayerTreeView.cpp:
+ (WebKit::WebLayerTreeView::reset):
+ (WebKit::WebLayerTreeView::isNull):
+ (WebKit::WebLayerTreeView::initialize):
+ * src/WebLayerTreeViewImpl.cpp:
+ (WebKit::WebLayerTreeViewImpl::create):
+ (WebKit::WebLayerTreeViewImpl::willBeginFrame):
+ (WebKit::WebLayerTreeViewImpl::updateAnimations):
+ (WebKit::WebLayerTreeViewImpl::layout):
+ (WebKit::WebLayerTreeViewImpl::applyScrollAndScale):
+ (WebKit::WebLayerTreeViewImpl::createContext):
+ (WebKit::WebLayerTreeViewImpl::didRecreateContext):
+ (WebKit::WebLayerTreeViewImpl::didCommit):
+ (WebKit::WebLayerTreeViewImpl::didCommitAndDrawFrame):
+ (WebKit::WebLayerTreeViewImpl::didCompleteSwapBuffers):
+ (WebKit::WebLayerTreeViewImpl::scheduleComposite):
+ * src/WebLayerTreeViewImpl.h:
+ (WebLayerTreeViewImpl):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::MockLayerTreeHost::create):
+ (CCLayerTreeHostTest):
+ * tests/Canvas2DLayerChromiumTest.cpp:
+ * tests/LayerChromiumTest.cpp:
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::TEST):
+
+2012-04-09 Joshua Bell <jsbell@chromium.org>
+
+ Unreviewed, rolling out r113473.
+ http://trac.webkit.org/changeset/113473
+ https://bugs.webkit.org/show_bug.cgi?id=83074
+
+ Change does not handle cursor retention of LevelDB iterators
+
+ * WebKit.gypi:
+ * tests/IDBDatabaseBackendTest.cpp: Removed.
+
+2012-04-06 James Robinson <jamesr@chromium.org>
+
+ [chromium] Texture copies should happen after incremental updates to preserve commit atomicity
+ https://bugs.webkit.org/show_bug.cgi?id=83392
+
+ Reviewed by Adrienne Walker.
+
+ * tests/Canvas2DLayerChromiumTest.cpp:
+
+2012-04-09 Sadrul Habib Chowdhury <sadrul@chromium.org>
+
+ [chromium] Add Battery Status API support.
+
+ The battery-client (BatteryClientChromium) will notify the client (WebBatteryStatusClient) when to start or stop
+ sending battery status updates. The client, in response will send the notifications to WebViewImpl, which sends
+ this update information to the WebCore::BatteryClient, and it triggers the appropriate javascript-callbacks.
+ The spec is at http://www.w3.org/TR/2011/WD-battery-status-20111129/.
+ https://bugs.webkit.org/show_bug.cgi?id=83284
+
+ Reviewed by Adam Barth.
+
+ * WebKit.gyp:
+ * features.gypi:
+ * public/WebBatteryStatus.h: Added.
+ (WebKit):
+ (WebBatteryStatus):
+ (WebKit::WebBatteryStatus::WebBatteryStatus):
+ * public/WebBatteryStatusClient.h: Added.
+ (WebKit):
+ (WebBatteryStatusClient):
+ (WebKit::WebBatteryStatusClient::~WebBatteryStatusClient):
+ * public/WebView.h:
+ (WebKit):
+ (WebView):
+ (WebKit::WebView::updateBatteryStatus):
+ * public/WebViewClient.h:
+ (WebKit):
+ (WebViewClient):
+ (WebKit::WebViewClient::batteryStatusClient):
+ * src/BatteryClientImpl.cpp: Added.
+ (WebKit):
+ (WebKit::BatteryClientImpl::BatteryClientImpl):
+ (WebKit::BatteryClientImpl::updateBatteryStatus):
+ (WebKit::BatteryClientImpl::setController):
+ (WebKit::BatteryClientImpl::startUpdating):
+ (WebKit::BatteryClientImpl::stopUpdating):
+ (WebKit::BatteryClientImpl::batteryControllerDestroyed):
+ * src/BatteryClientImpl.h: Added.
+ (WebKit):
+ (BatteryClientImpl):
+ (WebKit::BatteryClientImpl::~BatteryClientImpl):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit):
+ (WebKit::WebViewImpl::updateBatteryStatus):
+ * src/WebViewImpl.h:
+ (WebKit):
+ (WebViewImpl):
+
+2012-04-09 Shawn Singh <shawnsingh@chromium.org>
+
+ [chromium] Fix layer sorting perspective w if w becomes negative
+ https://bugs.webkit.org/show_bug.cgi?id=82997
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerSorterTest.cpp:
+ (WebCore::TEST):
+ (WebCore):
+
+2012-04-09 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Flip transition painting delayed with threaded animations
+ https://bugs.webkit.org/show_bug.cgi?id=82571
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostCommonTest.cpp:
+ (WebKitTests::TEST):
+ (WebKitTests):
+
+2012-04-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r113561.
+ http://trac.webkit.org/changeset/113561
+ https://bugs.webkit.org/show_bug.cgi?id=83487
+
+ broke webkit_unit_tests (Requested by simonjam on #webkit).
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebKitTests):
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore::TestCCOcclusionTrackerImpl::TestCCOcclusionTrackerImpl):
+
+2012-04-09 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Make culling work with clipped rects
+ https://bugs.webkit.org/show_bug.cgi?id=83217
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (CCOcclusionTrackerTestLayerBehindCameraDoesNotOcclude):
+ (WebKitTests::CCOcclusionTrackerTestLayerBehindCameraDoesNotOcclude::runMyTest):
+ (WebKitTests):
+ (CCOcclusionTrackerTestLargePixelsOccludeInsideClipRect):
+ (WebKitTests::CCOcclusionTrackerTestLargePixelsOccludeInsideClipRect::runMyTest):
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore::TestCCOcclusionTrackerImpl::TestCCOcclusionTrackerImpl):
+
+2012-04-06 Ami Fischman <fischman@chromium.org>
+
+ Roll Chromium DEPS
+ https://bugs.webkit.org/show_bug.cgi?id=83389
+
+ Unreviewed, just a DEPS roll (130110:131183)
+
+ * DEPS:
+
+2012-04-06 James Robinson <jamesr@chromium.org>
+
+ WebGL content swapped at wrong time in threaded compositing mode
+ https://bugs.webkit.org/show_bug.cgi?id=82275
+
+ Reviewed by Kenneth Russell.
+
+ * tests/WebGLLayerChromiumTest.cpp:
+ (WebKit::TEST):
+
+2012-04-06 Joshua Bell <jsbell@chromium.org>
+
+ IndexedDB: ObjectStore/Index shouldn't hold reference to backing store
+ https://bugs.webkit.org/show_bug.cgi?id=83074
+
+ Reviewed by Tony Chang.
+
+ * WebKit.gypi:
+ * tests/IDBDatabaseBackendTest.cpp: Added.
+ (WebCore):
+ (MockIDBBackingStore):
+ (WebCore::TEST):
+
+2012-04-06 Kent Tamura <tkent@chromium.org>
+
+ Calendar Picker: Add code to open/close the calendar picker
+ https://bugs.webkit.org/show_bug.cgi?id=83258
+
+ Reviewed by Hajime Morita.
+
+ * features.gypi: Enable ENABLE_PAGE_POPUP for non-Android
+ platforms. This is needed because ENABLE_CALENDAR_PICKER now depends on
+ ENABLE_PAGE_POPUP.
+ * src/ChroemClientImpl.cpp: Add stubs.
+ (WebKit::ChromeClientImpl::openPagePopup):
+ (WebKit::ChromeClientImpl::closePagePopup):
+ * src/ChromeClientImpl.h: Add declarations of openPagePopup() and closePagePopup().
+
+2012-04-05 Hironori Bono <hbono@chromium.org>
+
+ [Chromium] moving a cursor on a misspelled word should not remove a misspelled underline
+ https://bugs.webkit.org/show_bug.cgi?id=83214
+
+ Reviewed by Ryosuke Niwa.
+
+ When Chrome enables asynchronous spellchecking, it adds Spelling markers in the
+ background. For this case, moving a cursor should not remove these markers
+ because it requires Chrome to spellcheck text again. This change prevents
+ removing Spelling markers added by spellcheckers asynchronously.
+
+ * src/ContextMenuClientImpl.cpp:
+ (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): use marker descriptions instead of spellchecking text when Chrome enables asynchronous spellchecking.
+
+2012-04-05 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Record the number of tiles paint-culled instead of the incorrect number of pixels
+ https://bugs.webkit.org/show_bug.cgi?id=82423
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore::TEST):
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::TEST):
+
+2012-04-05 Shawn Singh <shawnsingh@chromium.org>
+
+ [chromium] Need to clip to homogeneous w=0 plane when applying transforms.
+ https://bugs.webkit.org/show_bug.cgi?id=80806
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostCommonTest.cpp:
+ (WebKitTests::TEST):
+ (WebKitTests):
+
+2012-04-05 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Cleanup test, redundant code in CCSchedulerTest.NoBeginFrameWhenDrawFails
+ https://bugs.webkit.org/show_bug.cgi?id=83300
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCSchedulerTest.cpp:
+ (WebKitTests::TEST):
+
+2012-04-05 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r113241.
+ http://trac.webkit.org/changeset/113241
+ https://bugs.webkit.org/show_bug.cgi?id=83293
+
+ Requested by sievers@chromium.org (Requested by zhenyao on
+ #webkit).
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::TEST_F):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::CCLayerTreeHostTest::doBeginTest):
+
+2012-04-05 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r113341.
+ http://trac.webkit.org/changeset/113341
+ https://bugs.webkit.org/show_bug.cgi?id=83299
+
+ bots caught some build errors (Requested by shawnsingh on
+ #webkit).
+
+ * tests/CCLayerTreeHostCommonTest.cpp:
+
+2012-04-05 Ian Vollick <vollick@chromium.org>
+
+ [chromium] Race condition in CCLayerTreeHostTestSynchronizeAnimationStartTimes
+ https://bugs.webkit.org/show_bug.cgi?id=83179
+
+ Reviewed by James Robinson.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::TestHooks::willAnimateLayers):
+ (WTF::MockLayerTreeHostImpl::animateLayers):
+ (WTF::CCLayerTreeHostTestSynchronizeAnimationStartTimes::CCLayerTreeHostTestSynchronizeAnimationStartTimes):
+ (CCLayerTreeHostTestSynchronizeAnimationStartTimes):
+ (WTF::CCLayerTreeHostTestSynchronizeAnimationStartTimes::willAnimateLayers):
+ (WTF::CCLayerTreeHostTestSynchronizeAnimationStartTimes::notifyAnimationStarted):
+
+2012-04-05 Justin Novosad <junov@chromium.org>
+
+ [Chromium] With the skia port, setting LCD text filtering is causing
+ texture cache invalidations of gpu canvas backing store
+ https://bugs.webkit.org/show_bug.cgi?id=74183
+
+ Reviewed by Stephen White.
+
+ Replacing unnecessary usage of SkCanvas::LayerIter with call to
+ SkCanvas::isDrawingToLayer(). Same results, lower overhead, and no
+ GPU texture invalidation.
+
+ * src/WebFontImpl.cpp:
+ (WebKit::WebFontImpl::drawText):
+
+2012-04-05 Lei Zhang <thestig@chromium.org>
+
+ [Chromium] Properly align members in WebInputEvent and subclasses to make Valgrind happy.
+ https://bugs.webkit.org/show_bug.cgi?id=81570
+
+ Reviewed by Darin Fisher.
+
+ * public/WebInputEvent.h:
+ (WebKit):
+ (WebKit::WebInputEvent::WebInputEvent):
+ (WebKeyboardEvent):
+ (WebKit::WebTouchEvent::WebTouchEvent):
+
+2012-04-05 Shawn Singh <shawnsingh@chromium.org>
+
+ [chromium] Need to clip to homogeneous w=0 plane when applying transforms.
+ https://bugs.webkit.org/show_bug.cgi?id=80806
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostCommonTest.cpp:
+ (WebKitTests::TEST):
+ (WebKitTests):
+
+2012-04-05 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r113307.
+ http://trac.webkit.org/changeset/113307
+ https://bugs.webkit.org/show_bug.cgi?id=83288
+
+ Requested by sievers@chromium.org (Requested by zhenyao on
+ #webkit).
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::TEST_F):
+
+2012-04-05 Pavel Feldman <pfeldman@chromium.org>
+
+ Web Inspector: [chromium] clean up WDTFC::saveAs after migration to save()
+ https://bugs.webkit.org/show_bug.cgi?id=83271
+
+ Reviewed by Yury Semikhatsky.
+
+ * public/WebDevToolsFrontendClient.h:
+
+2012-04-05 Hans Wennborg <hans@chromium.org>
+
+ webkit_unit_tests build fix.
+ https://bugs.webkit.org/show_bug.cgi?id=83261
+
+ Unreviewed, webkit_unit_tests buildfix.
+
+ The CCLayerTreeHostTestEmptyContentsShouldNotDraw.runMultiThread test
+ stopped working after r113254.
+
+ Disable it for now.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF):
+ (WTF::TEST_F):
+
+2012-04-05 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] Only shut down V8 if we actually initialized it
+ https://bugs.webkit.org/show_bug.cgi?id=83159
+
+ Reviewed by Pavel Feldman.
+
+ * src/WebKit.cpp:
+ (WebKit::initialize):
+ (WebKit::shutdown):
+
+2012-04-05 Kinuko Yasuda <kinuko@chromium.org>
+
+ Expose DataTransferItem.getAsEntry() to allow users access dropped files as FileEntry
+ https://bugs.webkit.org/show_bug.cgi?id=82592
+
+ Reviewed by David Levin.
+
+ * src/WebDragData.cpp:
+ (WebKit::WebDragData::filesystemId): Added implementation.
+ (WebKit::WebDragData::setFilesystemId): Added implementation.
+
+2012-04-04 Kent Tamura <tkent@chromium.org>
+
+ [Chromium] Calendar Picker: Add localization functions
+ https://bugs.webkit.org/show_bug.cgi?id=83235
+
+ Reviewed by Adam Barth.
+
+ Implement calendarTodayText() and calendarClearText(), which are
+ introduced in http://trac.webkit.org/changeset/113166
+
+ * public/platform/WebLocalizedString.h:
+ Add CalendarClear and CalendarToday.
+ * src/LocalizedStrings.cpp:
+ (WebCore::calendarTodayText): Added.
+ (WebCore::calendarClearText): Added.
+
+2012-04-04 Mark Pilgrim <pilgrim@chromium.org>
+
+ Call histogramEnumeration directly
+ https://bugs.webkit.org/show_bug.cgi?id=83106
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring project to remove the PlatformSupport
+ abstraction from some functions. See bug 82948.
+
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::shouldRunModalDialogDuringPageDismissal):
+ * src/PlatformSupport.cpp:
+ (WebCore):
+
+2012-04-04 Shawn Singh <shawnsingh@chromium.org>
+
+ [chromium] Move recursive renderSurface clearing to CCLayerTreeHostImpl
+ https://bugs.webkit.org/show_bug.cgi?id=82091
+
+ Reviewed by James Robinson.
+
+ * tests/LayerRendererChromiumTest.cpp:
+ (FakeLayerRendererChromiumClient::FakeLayerRendererChromiumClient):
+
+2012-04-04 Daniel Sievers <sievers@chromium.org>
+
+ [Chromium] Always skip draw and readback if there is nothing
+ to draw.
+ https://bugs.webkit.org/show_bug.cgi?id=82680
+
+ This avoids corruption from pushing frames that have no valid
+ content drawn into them.
+ Also in addition to checking for non-existing root layers, check
+ for root layers with no content bounds. It's possible to see those
+ with kForceCompositing mode for empty documents.
+
+ Reviewed by James Robinson.
+
+ Added CCLayerTreeHostTestEmptyContentsShouldNotDraw.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::TEST_F):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::CCLayerTreeHostTest::doBeginTest):
+ (WTF):
+ (CCLayerTreeHostTestEmptyContentsShouldNotDraw):
+ (WTF::CCLayerTreeHostTestEmptyContentsShouldNotDraw::CCLayerTreeHostTestEmptyContentsShouldNotDraw):
+ (WTF::CCLayerTreeHostTestEmptyContentsShouldNotDraw::beginTest):
+ (WTF::CCLayerTreeHostTestEmptyContentsShouldNotDraw::drawLayersOnCCThread):
+ (WTF::CCLayerTreeHostTestEmptyContentsShouldNotDraw::didCommitAndDrawFrame):
+ (WTF::CCLayerTreeHostTestEmptyContentsShouldNotDraw::afterTest):
+ (WTF::TEST_F):
+
+2012-04-04 Mark Pilgrim <pilgrim@chromium.org>
+
+ Call histogramCustomCounts directly
+ https://bugs.webkit.org/show_bug.cgi?id=83112
+
+ Reviewed by Adam Barth.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::paint):
+ (WebKit::WebViewImplContentPainter::paint):
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+ * src/painting/PaintAggregator.cpp:
+
+2012-04-04 Mark Pilgrim <pilgrim@chromium.org>
+
+ Call suddenTerminationChanged directly
+ https://bugs.webkit.org/show_bug.cgi?id=83114
+
+ Reviewed by Adam Barth.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+
+2012-04-04 Adam Barth <abarth@webkit.org>
+
+ figure out how to export webcore symbols from webkit.dll properly
+ https://bugs.webkit.org/show_bug.cgi?id=83105
+
+ Reviewed by Dimitri Glazkov.
+
+ * WebKit.gyp:
+ - We now compile the platform support files as part of webkit.dll
+ to make sure the lib contains the obj files and therefore exports
+ the necessary symbols. In principle, we could use a defs file to
+ achieve the same thing, but those files are a pain to maintain.
+ * src/WebKit.cpp:
+ (WebKit::shutdown):
+ - Unwind our ugly, ugly hack to make the Windows component build
+ work.
+
+2012-04-04 Mark Pilgrim <pilgrim@chromium.org>
+
+ Call sandboxEnabled directly
+ https://bugs.webkit.org/show_bug.cgi?id=83113
+
+ Reviewed by Adam Barth.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+
+2012-04-04 Kausalya Madhusudhanan <kmadhusu@chromium.org>
+
+ [Coverity] Address some uninit constructor values.
+ https://bugs.webkit.org/show_bug.cgi?id=82424
+
+ Reviewed by Stephen White.
+
+ New tests are not required since I did not modify any code behavior. I just initialized the class member variables in the constructor.
+
+ * src/DatabaseObserver.cpp:
+ (WebKit::AllowDatabaseMainThreadBridge::AllowDatabaseMainThreadBridge):
+ * src/LocalFileSystemChromium.cpp:
+ (WebCore):
+
+2012-04-04 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, temporary dirty hack to make Win Debug work again.
+
+ * All.gyp: Temporarily removed TestWebKitAPI target.
+
+2012-04-04 Pavel Feldman <pfeldman@chromium.org>
+
+ Web Inspector: migrate from InspectorFrontendHost.saveAs to InspectorFrontendHost.save.
+ https://bugs.webkit.org/show_bug.cgi?id=83162
+
+ Reviewed by Yury Semikhatsky.
+
+ * public/WebDevToolsFrontendClient.h:
+ * src/InspectorFrontendClientImpl.cpp:
+ (WebKit::InspectorFrontendClientImpl::canSave):
+ (WebKit::InspectorFrontendClientImpl::save):
+ * src/InspectorFrontendClientImpl.h:
+ (InspectorFrontendClientImpl):
+
+2012-04-04 Hans Wennborg <hans@chromium.org>
+
+ WebSpeechRecognizer.h: add missing forward declaration
+ https://bugs.webkit.org/show_bug.cgi?id=83150
+
+ Reviewed by Tony Gentilcore.
+
+ Add missing forward declaration of WebSpeechRecognitionParams.
+
+ * public/WebSpeechRecognizer.h:
+ (WebKit):
+
+2012-04-03 Hans Wennborg <hans@chromium.org>
+
+ Speech JavaScript API: Plumbing for Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=81667
+
+ Reviewed by Darin Fisher.
+
+ Add plumbing for speech recognition.
+
+ The implementer is expected to implement the WebSpeechRecognizer interface.
+ The start(), stop(), and abort() functions of that interface take a
+ WebSpeechRecognitionHandle argument, which identifies the object which has
+ requested the action, and a pointer to a WebSpeechRecognitionClient interface,
+ through which it should send back notifications on progress, errors, etc.
+
+ SpeechRecognitionClientProxy passes data between the WebCore and WebKit layers,
+ implementing the WebCore::SpeechRecognitionClient and WebKit::WebSpeechRecognizerClient
+ interfaces.
+
+ * WebKit.gyp:
+ * public/WebSpeechGrammar.h:
+ (WebCore):
+ (WebKit):
+ (WebSpeechGrammar):
+ (WebKit::WebSpeechGrammar::WebSpeechGrammar):
+ (WebKit::WebSpeechGrammar::~WebSpeechGrammar):
+ * public/WebSpeechRecognitionHandle.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebSpeechRecognitionHandle):
+ (WebKit::WebSpeechRecognitionHandle::~WebSpeechRecognitionHandle):
+ (WebKit::WebSpeechRecognitionHandle::WebSpeechRecognitionHandle):
+ (WebKit::WebSpeechRecognitionHandle::operator=):
+ (WebKit::operator==):
+ (WebKit::operator!=):
+ (WebKit::operator<):
+ * public/WebSpeechRecognitionParams.h:
+ (WebKit):
+ (WebSpeechRecognitionParams):
+ (WebKit::WebSpeechRecognitionParams::grammars):
+ (WebKit::WebSpeechRecognitionParams::language):
+ (WebKit::WebSpeechRecognitionParams::continuous):
+ * public/WebSpeechRecognitionResult.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebSpeechRecognitionResult):
+ (WebKit::WebSpeechRecognitionResult::WebSpeechRecognitionResult):
+ (WebKit::WebSpeechRecognitionResult::~WebSpeechRecognitionResult):
+ * public/WebSpeechRecognizer.h:
+ (WebKit):
+ (WebSpeechRecognizer):
+ (WebKit::WebSpeechRecognizer::start):
+ (WebKit::WebSpeechRecognizer::stop):
+ (WebKit::WebSpeechRecognizer::abort):
+ (WebKit::WebSpeechRecognizer::~WebSpeechRecognizer):
+ * public/WebSpeechRecognizerClient.h: Added.
+ (WebKit):
+ (WebSpeechRecognizerClient):
+ * public/WebViewClient.h:
+ (WebKit):
+ (WebViewClient):
+ (WebKit::WebViewClient::speechRecognizer):
+ * src/SpeechRecognitionClientProxy.cpp: Added.
+ (WebKit):
+ (WebKit::SpeechRecognitionClientProxy::~SpeechRecognitionClientProxy):
+ (WebKit::SpeechRecognitionClientProxy::create):
+ (WebKit::SpeechRecognitionClientProxy::start):
+ (WebKit::SpeechRecognitionClientProxy::stop):
+ (WebKit::SpeechRecognitionClientProxy::abort):
+ (WebKit::SpeechRecognitionClientProxy::didStartAudio):
+ (WebKit::SpeechRecognitionClientProxy::didStartSound):
+ (WebKit::SpeechRecognitionClientProxy::didStartSpeech):
+ (WebKit::SpeechRecognitionClientProxy::didEndSpeech):
+ (WebKit::SpeechRecognitionClientProxy::didEndSound):
+ (WebKit::SpeechRecognitionClientProxy::didEndAudio):
+ (WebKit::SpeechRecognitionClientProxy::didReceiveResult):
+ (WebKit::SpeechRecognitionClientProxy::didReceiveNoMatch):
+ (WebKit::SpeechRecognitionClientProxy::didDeleteResult):
+ (WebKit::SpeechRecognitionClientProxy::didReceiveError):
+ (WebKit::SpeechRecognitionClientProxy::didStart):
+ (WebKit::SpeechRecognitionClientProxy::didEnd):
+ (WebKit::SpeechRecognitionClientProxy::SpeechRecognitionClientProxy):
+ * src/SpeechRecognitionClientProxy.h: Added.
+ (WebKit):
+ (SpeechRecognitionClientProxy):
+ * src/WebSpeechGrammar.cpp: Added.
+ (WebKit):
+ (WebKit::WebSpeechGrammar::reset):
+ (WebKit::WebSpeechGrammar::WebSpeechGrammar):
+ (WebKit::WebSpeechGrammar::operator=):
+ (WebKit::WebSpeechGrammar::src):
+ (WebKit::WebSpeechGrammar::weight):
+ * src/WebSpeechRecognitionHandle.cpp: Added.
+ (WebKit):
+ (WebKit::WebSpeechRecognitionHandle::reset):
+ (WebKit::WebSpeechRecognitionHandle::assign):
+ (WebKit::WebSpeechRecognitionHandle::equals):
+ (WebKit::WebSpeechRecognitionHandle::lessThan):
+ (WebKit::WebSpeechRecognitionHandle::WebSpeechRecognitionHandle):
+ (WebKit::WebSpeechRecognitionHandle::operator=):
+ (WebKit::WebSpeechRecognitionHandle::operator PassRefPtr<SpeechRecognition>):
+ * src/WebSpeechRecognitionParams.cpp: Added.
+ (WebKit):
+ (WebKit::WebSpeechRecognitionParams::WebSpeechRecognitionParams):
+ * src/WebSpeechRecognitionResult.cpp: Added.
+ (WebKit):
+ (WebKit::WebSpeechRecognitionResult::assign):
+ (WebKit::WebSpeechRecognitionResult::reset):
+ (WebKit::WebSpeechRecognitionResult::operator PassRefPtr<WebCore::SpeechRecognitionResult>):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ * src/WebViewImpl.h:
+ (WebKit):
+
+2012-04-04 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r113149.
+ http://trac.webkit.org/changeset/113149
+ https://bugs.webkit.org/show_bug.cgi?id=83126
+
+ for breaking Chromium builders (Requested by pfeldman on
+ #webkit).
+
+ * WebKit.gyp:
+ * public/WebSpeechGrammar.h: Removed.
+ * public/WebSpeechRecognitionHandle.h: Removed.
+ * public/WebSpeechRecognitionParams.h: Removed.
+ * public/WebSpeechRecognitionResult.h: Removed.
+ * public/WebSpeechRecognizer.h: Removed.
+ * public/WebSpeechRecognizerClient.h: Removed.
+ * public/WebViewClient.h:
+ (WebKit):
+ * src/SpeechRecognitionClientProxy.cpp: Removed.
+ * src/SpeechRecognitionClientProxy.h: Removed.
+ * src/WebSpeechGrammar.cpp: Removed.
+ * src/WebSpeechRecognitionHandle.cpp: Removed.
+ * src/WebSpeechRecognitionResult.cpp: Removed.
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ * src/WebViewImpl.h:
+ (WebKit):
+
+2012-04-03 Hans Wennborg <hans@chromium.org>
+
+ Speech JavaScript API: Plumbing for Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=81667
+
+ Reviewed by Darin Fisher.
+
+ Add plumbing for speech recognition.
+
+ The implementer is expected to implement the WebSpeechRecognizer interface.
+ The start(), stop(), and abort() functions of that interface take a
+ WebSpeechRecognitionHandle argument, which identifies the object which has
+ requested the action, and a pointer to a WebSpeechRecognitionClient interface,
+ through which it should send back notifications on progress, errors, etc.
+
+ SpeechRecognitionClientProxy passes data between the WebCore and WebKit layers,
+ implementing the WebCore::SpeechRecognitionClient and WebKit::WebSpeechRecognizerClient
+ interfaces.
+
+ * WebKit.gyp:
+ * public/WebSpeechGrammar.h:
+ (WebCore):
+ (WebKit):
+ (WebSpeechGrammar):
+ (WebKit::WebSpeechGrammar::WebSpeechGrammar):
+ (WebKit::WebSpeechGrammar::~WebSpeechGrammar):
+ * public/WebSpeechRecognitionHandle.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebSpeechRecognitionHandle):
+ (WebKit::WebSpeechRecognitionHandle::~WebSpeechRecognitionHandle):
+ (WebKit::WebSpeechRecognitionHandle::WebSpeechRecognitionHandle):
+ (WebKit::WebSpeechRecognitionHandle::operator=):
+ (WebKit::operator==):
+ (WebKit::operator!=):
+ (WebKit::operator<):
+ * public/WebSpeechRecognitionParams.h:
+ (WebKit):
+ (WebSpeechRecognitionParams):
+ (WebKit::WebSpeechRecognitionParams::grammars):
+ (WebKit::WebSpeechRecognitionParams::language):
+ (WebKit::WebSpeechRecognitionParams::continuous):
+ * public/WebSpeechRecognitionResult.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebSpeechRecognitionResult):
+ (WebKit::WebSpeechRecognitionResult::WebSpeechRecognitionResult):
+ (WebKit::WebSpeechRecognitionResult::~WebSpeechRecognitionResult):
+ * public/WebSpeechRecognizer.h:
+ (WebKit):
+ (WebSpeechRecognizer):
+ (WebKit::WebSpeechRecognizer::start):
+ (WebKit::WebSpeechRecognizer::stop):
+ (WebKit::WebSpeechRecognizer::abort):
+ (WebKit::WebSpeechRecognizer::~WebSpeechRecognizer):
+ * public/WebSpeechRecognizerClient.h: Added.
+ (WebKit):
+ (WebSpeechRecognizerClient):
+ * public/WebViewClient.h:
+ (WebKit):
+ (WebViewClient):
+ (WebKit::WebViewClient::speechRecognizer):
+ * src/SpeechRecognitionClientProxy.cpp: Added.
+ (WebKit):
+ (WebKit::SpeechRecognitionClientProxy::~SpeechRecognitionClientProxy):
+ (WebKit::SpeechRecognitionClientProxy::create):
+ (WebKit::SpeechRecognitionClientProxy::start):
+ (WebKit::SpeechRecognitionClientProxy::stop):
+ (WebKit::SpeechRecognitionClientProxy::abort):
+ (WebKit::SpeechRecognitionClientProxy::didStartAudio):
+ (WebKit::SpeechRecognitionClientProxy::didStartSound):
+ (WebKit::SpeechRecognitionClientProxy::didStartSpeech):
+ (WebKit::SpeechRecognitionClientProxy::didEndSpeech):
+ (WebKit::SpeechRecognitionClientProxy::didEndSound):
+ (WebKit::SpeechRecognitionClientProxy::didEndAudio):
+ (WebKit::SpeechRecognitionClientProxy::didReceiveResult):
+ (WebKit::SpeechRecognitionClientProxy::didReceiveNoMatch):
+ (WebKit::SpeechRecognitionClientProxy::didDeleteResult):
+ (WebKit::SpeechRecognitionClientProxy::didReceiveError):
+ (WebKit::SpeechRecognitionClientProxy::didStart):
+ (WebKit::SpeechRecognitionClientProxy::didEnd):
+ (WebKit::SpeechRecognitionClientProxy::SpeechRecognitionClientProxy):
+ * src/SpeechRecognitionClientProxy.h: Added.
+ (WebKit):
+ (SpeechRecognitionClientProxy):
+ * src/WebSpeechGrammar.cpp: Added.
+ (WebKit):
+ (WebKit::WebSpeechGrammar::reset):
+ (WebKit::WebSpeechGrammar::WebSpeechGrammar):
+ (WebKit::WebSpeechGrammar::operator=):
+ (WebKit::WebSpeechGrammar::src):
+ (WebKit::WebSpeechGrammar::weight):
+ * src/WebSpeechRecognitionHandle.cpp: Added.
+ (WebKit):
+ (WebKit::WebSpeechRecognitionHandle::reset):
+ (WebKit::WebSpeechRecognitionHandle::assign):
+ (WebKit::WebSpeechRecognitionHandle::equals):
+ (WebKit::WebSpeechRecognitionHandle::lessThan):
+ (WebKit::WebSpeechRecognitionHandle::WebSpeechRecognitionHandle):
+ (WebKit::WebSpeechRecognitionHandle::operator=):
+ (WebKit::WebSpeechRecognitionHandle::operator PassRefPtr<SpeechRecognition>):
+ * src/WebSpeechRecognitionParams.cpp: Added.
+ (WebKit):
+ (WebKit::WebSpeechRecognitionParams::WebSpeechRecognitionParams):
+ * src/WebSpeechRecognitionResult.cpp: Added.
+ (WebKit):
+ (WebKit::WebSpeechRecognitionResult::assign):
+ (WebKit::WebSpeechRecognitionResult::reset):
+ (WebKit::WebSpeechRecognitionResult::operator PassRefPtr<WebCore::SpeechRecognitionResult>):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ * src/WebViewImpl.h:
+ (WebKit):
+
+2012-04-03 Yuta Kitamura <yutak@chromium.org>
+
+ Crash in WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel
+ https://bugs.webkit.org/show_bug.cgi?id=82873
+
+ Reviewed by David Levin.
+
+ Change the function signature of WorkerLoaderProxy::postTaskForModeToWorkerContext().
+
+ * src/WebSharedWorkerImpl.cpp:
+ (WebKit::WebSharedWorkerImpl::postTaskForModeToWorkerContext):
+ * src/WebSharedWorkerImpl.h:
+ (WebSharedWorkerImpl):
+ * src/WebWorkerClientImpl.cpp:
+ (WebKit::WebWorkerClientImpl::postTaskForModeToWorkerContext):
+ * src/WebWorkerClientImpl.h:
+ (WebWorkerClientImpl):
+
+2012-04-03 Ian Vollick <vollick@chromium.org>
+
+ [chromium] Include Image.h in TextFieldDecoratorImpl.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=83066
+
+ Reviewed by James Robinson.
+
+ * src/TextFieldDecoratorImpl.cpp:
+
+2012-04-03 Rafael Weinstein <rafaelw@chromium.org>
+
+ Use V8 completion callback API to assert that V8RecursionScope is on the stack whenever invoking script
+ https://bugs.webkit.org/show_bug.cgi?id=79131
+
+ Reviewed by Adam Barth.
+
+ * WebKit.gyp:
+ * public/WebFrame.h:
+ (v8):
+ (WebFrame):
+ * src/WebFrameImpl.cpp:
+ (WebKit):
+ (WebKit::WebFrameImpl::callFunctionEvenIfScriptDisabled):
+ * src/WebFrameImpl.h:
+ (WebFrameImpl):
+ * src/WebKit.cpp:
+ (WebKit):
+ (WebKit::assertV8RecursionScope):
+ (WebKit::initialize):
+ (WebKit::shutdown):
+
+2012-04-03 Adam Barth <abarth@webkit.org>
+
+ Unreviewed. This patch adds an ugly, ugly hack to bandaid over the
+ Windows component build. See comments in the code for details.
+
+ * src/WebKit.cpp:
+ (WebKit::shutdown):
+
+2012-04-03 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, rolling out r113087.
+ http://trac.webkit.org/changeset/113087
+ https://bugs.webkit.org/show_bug.cgi?id=83068
+
+ Breaks Windows builds in other unpredictable ways.
+
+ * WebKit.gyp: Removed the hack.
+
+2012-04-03 W. James MacLean <wjmaclean@chromium.org>
+
+ [chromium] Switch touchpad fling curve physics to absolute (not scaled) curve.
+ https://bugs.webkit.org/show_bug.cgi?id=83061
+
+ Reviewed by James Robinson.
+
+ * tests/PlatformGestureCurveTest.cpp:
+
+2012-04-02 Zhenyao Mo <zmo@google.com>
+
+ Implement WebGLShaderPrecisionFormat
+ https://bugs.webkit.org/show_bug.cgi?id=75925
+
+ Reviewed by Kenneth Russell.
+
+ * src/GraphicsContext3DChromium.cpp: Add getShaderPrecisionFormat().
+ (WebCore):
+ * src/GraphicsContext3DPrivate.h: Ditto.
+ (GraphicsContext3DPrivate):
+ * tests/FakeWebGraphicsContext3D.h: Ditto.
+ (FakeWebGraphicsContext3D):
+
+2012-04-03 Dirk Pranke <dpranke@chromium.org>
+
+ disable incremental linking for debug of webkit
+ https://bugs.webkit.org/show_bug.cgi?id=83068
+
+ Reviewed by Adam Barth.
+
+ Now that we need to export symbols from webkit.dll that are
+ defined in webcore_platform, we have to enable ULDI in order for
+ incremental linking to work (which is used in debug mode).
+
+ * WebKit.gyp:
+
+2012-04-03 Shawn Singh <shawnsingh@chromium.org>
+
+ [chromium] Fix incorrect comment in CCDamageTrackerTest
+ https://bugs.webkit.org/show_bug.cgi?id=82118
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCDamageTrackerTest.cpp:
+ (WebKitTests::TEST_F):
+
+2012-04-03 Adam Barth <abarth@webkit.org>
+
+ Another attempt to fix the Windows build. This uses WebSecurityOrigin
+ has a value type but doesn't include the header.
+
+ * public/WebUserMediaRequest.h:
+ (WebKit):
+
+2012-04-03 'Pavel Feldman' <pfeldman@chromium.org>
+
+ Not reviewed. Follow up to inspector's r113032: change provisional method signature a bit.
+
+ * public/WebDevToolsFrontendClient.h:
+ (WebKit::WebDevToolsFrontendClient::save):
+
+2012-04-03 Bolin Hsu <bhsu@google.com>
+
+ [Chromium] Add click count and modifiers to the factory method of mouse event.
+ https://bugs.webkit.org/show_bug.cgi?id=82502
+
+ Modify WebInputEventFactory::mouseEvent() to take click count
+ and modifiers from input parameters. Sample use cases of these
+ are double click, triple click, Ctrl+click, etc.
+
+ Reviewed by Eric Seidel.
+
+ * public/android/WebInputEventFactory.h:
+ * src/android/WebInputEventFactory.cpp:
+ (WebKit::WebInputEventFactory::mouseEvent):
+
+2012-04-03 Mark Pilgrim <pilgrim@chromium.org>
+
+ Call incrementStatsCounter directly
+ https://bugs.webkit.org/show_bug.cgi?id=83023
+
+ Reviewed by Kentaro Hara.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::WebFrameImpl):
+
+2012-04-03 Sami Kyostila <skyostil@chromium.org>
+
+ [chromium] Canvas2DLayerChromium::updateCompositorResources should flush after copying
+ https://bugs.webkit.org/show_bug.cgi?id=83013
+
+ Reviewed by Stephen White.
+
+ * tests/Canvas2DLayerChromiumTest.cpp: Make sure context is flushed after copying.
+
+2012-04-03 Pavel Feldman <pfeldman@chromium.org>
+
+ Web Inspector: [chromium] add provisional save method into the frontend client.
+ https://bugs.webkit.org/show_bug.cgi?id=83022
+
+ Reviewed by Yury Semikhatsky.
+
+ * public/WebDevToolsFrontendClient.h:
+ (WebKit::WebDevToolsFrontendClient::save):
+
+2012-04-03 Bill Budge <bbudge@chromium.org>
+
+ WebViewImpl doesn't notify the page that the user has canceled fullscreen.
+ https://bugs.webkit.org/show_bug.cgi?id=82760
+
+ Reviewed by Darin Fisher.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::willExitFullScreen):
+ (WebKit::WebViewImpl::exitFullScreenForElement):
+ * src/WebViewImpl.h:
+
+2012-04-02 Kent Tamura <tkent@chromium.org>
+
+ [Chromium] Add WebKit API for WebCore::TextFieldDecorator
+ https://bugs.webkit.org/show_bug.cgi?id=82143
+
+ Reviewed by Dimitri Glazkov.
+
+ Expose WebCore::TextFieldDecorator as
+ WebKit::WebTextFieldDecoratorClient. This change add capability to add
+ decoration buttons to text field <input> elements.
+
+ * WebKit.gyp: Add new files.
+ * public/WebTextFieldDecoratorClient.h: Added.
+ * public/WebView.h:
+ (WebKit): Add addTextFieldDecoratorClient().
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::willAddTextFieldDecorationsTo):
+ Calls willAddDecorationTo() of TextFieldDecorator objects owned by WebViewImpl.
+ (WebKit::ChromeClientImpl::addTextFieldDecorationsTo):
+ Apply TextFieldDecorationElement::decorate() for the specified input element.
+ * src/ChromeClientImpl.h:
+ (ChromeClientImpl): Add new function declarations.
+ * src/TextFieldDecoratorImpl.cpp:
+ Added. This is a bridge of WebCore::TextFieldDecorator and
+ WebKit::WebTextFieldDecoratorClient. This owns CachedImage objects
+ specfied by WebTextFieldDecoratorClient.
+ (WebKit::TextFieldDecoratorImpl::TextFieldDecoratorImpl):
+ (WebKit::TextFieldDecoratorImpl::create):
+ (WebKit::TextFieldDecoratorImpl::~TextFieldDecoratorImpl):
+ (WebKit::TextFieldDecoratorImpl::willAddDecorationTo):
+ (WebKit::TextFieldDecoratorImpl::imageForNormalState):
+ (WebKit::TextFieldDecoratorImpl::imageForDisabledState):
+ (WebKit::TextFieldDecoratorImpl::imageForReadonlyState):
+ (WebKit::TextFieldDecoratorImpl::handleClick):
+ (WebKit::TextFieldDecoratorImpl::willDetach):
+ * src/TextFieldDecoratorImpl.h: Added.
+ (TextFieldDecoratorImpl):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::addTextFieldDecoratorClient):
+ Add implementation of WebView::addTextFieldDecoratorClient().
+ * src/WebViewImpl.h:
+ WebViewImpl owns a vector of TextFieldDecoratorImpl.
+ (WebViewImpl):
+ (WebKit::WebViewImpl::textFieldDecorators):
+
+2012-04-02 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Remove SkCanvas::LayerIter use from OpaqueRegionSkia
+ https://bugs.webkit.org/show_bug.cgi?id=82564
+
+ Reviewed by Stephen White.
+
+ * tests/PlatformContextSkiaTest.cpp:
+ (WebCore):
+ (WebCore::TEST):
+
+2012-04-02 Mark Pilgrim <pilgrim@chromium.org>
+
+ Call decrementStatsCounter directly
+ https://bugs.webkit.org/show_bug.cgi?id=82950
+
+ Reviewed by Adam Barth.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::~WebFrameImpl):
+
+2012-04-02 Alexander Pavlov <apavlov@chromium.org>
+
+ [Chromium] Unreviewed, CCLayerTreeHost runMultiThread is flaky.
+ Related bug: https://bugs.webkit.org/show_bug.cgi?id=80811
+
+ Disabled CCLayerTreeHostTestAddAnimationWithTimingFunction.runMultiThread.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::TEST_F):
+
+2012-04-02 Alexander Pavlov <apavlov@chromium.org>
+
+ Web Inspector: Device metrics emulation should turn off when zero width and height are passed in
+ https://bugs.webkit.org/show_bug.cgi?id=82907
+
+ Currently this also requires the fontScaleFactor of 1 to be passed in, too. However, it results in
+ downsizing the FrameView to (0x0) on navigation with the open Inspector when the emulation is disabled.
+
+ Reviewed by Yury Semikhatsky.
+
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgentImpl::overrideDeviceMetrics):
+
+2012-04-02 Kinuko Yasuda <kinuko@chromium.org>
+
+ Unreviewed, rolling chromium DEPS.
+
+ * DEPS:
+
+2012-04-02 Keishi Hattori <keishi@webkit.org>
+
+ [chromium] Disable ENABLE_INPUT_TYPE_COLOR for aura and android
+ https://bugs.webkit.org/show_bug.cgi?id=82863
+
+ Reviewed by Kent Tamura.
+
+ * features.gypi:
+
+2012-04-02 Adam Barth <abarth@webkit.org>
+
+ [Chromium] Move a number of virtual functions from WebKitPlatformSupport.h into Platform.h
+ https://bugs.webkit.org/show_bug.cgi?id=82865
+
+ Reviewed by Kent Tamura.
+
+ * public/platform/WebKitPlatformSupport.h:
+ (WebKit):
+ (WebKitPlatformSupport):
+
+2012-04-02 Kent Tamura <tkent@chromium.org>
+
+ Add a calendar picker indicator to date-type input fields
+ https://bugs.webkit.org/show_bug.cgi?id=80478
+
+ Reviewed by Hajime Morita.
+
+ * features.gypi: Enable CALENDAR_PICKER for non-Android platforms. This
+ doesn't affect any bahevior because INPUT_TYPE_DATE is disabled.
+
+2012-04-02 Adam Barth <abarth@webkit.org>
+
+ [Chromium] Move another block of headers from WebKit/chromium/public/platform to Platform/chromium/public
+ https://bugs.webkit.org/show_bug.cgi?id=82862
+
+ Rubber-stamped by Eric Seidel.
+
+ * WebKit.gyp:
+ * public/platform/WebAudioBus.h: Replaced.
+ * public/platform/WebAudioDevice.h: Replaced.
+ * public/platform/WebGamepad.h: Replaced.
+ * public/platform/WebGamepads.h: Replaced.
+ * public/platform/WebSocketStreamError.h: Replaced.
+ * public/platform/WebSocketStreamHandle.h: Replaced.
+ * public/platform/WebSocketStreamHandleClient.h: Replaced.
+ * src/WebAudioBus.cpp: Removed.
+
+2012-04-01 Adam Barth <abarth@webkit.org>
+
+ [Chromium] Move thread-related APIs from WebKit into Platform
+ https://bugs.webkit.org/show_bug.cgi?id=82858
+
+ Reviewed by Eric Seidel.
+
+ * WebKit.gyp:
+ * public/platform/WebThread.h: Replaced.
+ * public/platform/WebThreadSafeData.h: Replaced.
+ * src/WebThreadSafeData.cpp: Removed.
+
+2012-04-01 Jon Lee <jonlee@apple.com>
+
+ Rename notification properties and functions
+ https://bugs.webkit.org/show_bug.cgi?id=80482
+ <rdar://problem/10912432>
+
+ Reviewed by Kentaro Hara.
+
+ * src/WebNotification.cpp:
+ (WebKit::WebNotification::replaceId): Refactor to call tag().
+
+2012-03-29 Adam Barth <abarth@webkit.org>
+
+ [Chromium] Delete WebKit/chromium/bridge
+ https://bugs.webkit.org/show_bug.cgi?id=82677
+
+ Reviewed by James Robinson.
+
+ Delete WebKit/chromium/bridge. This was a directory we were
+ experimenting with storing WebCore-namespaced code. Now we're able to
+ actually keep that code in WebCore itself, which is much more sensible.
+
+ * WebKit.gyp:
+ * bridge: Removed.
+ * bridge/DeprecatedPeerConnectionHandler.cpp: Removed.
+ * bridge/DeprecatedPeerConnectionHandlerInternal.cpp: Removed.
+ * bridge/DeprecatedPeerConnectionHandlerInternal.h: Removed.
+ * bridge/MediaStreamCenter.cpp: Removed.
+ * bridge/MediaStreamCenterInternal.cpp: Removed.
+ * bridge/MediaStreamCenterInternal.h: Removed.
+ * bridge/PeerConnection00Handler.cpp: Removed.
+ * bridge/PeerConnection00HandlerInternal.cpp: Removed.
+ * bridge/PeerConnection00HandlerInternal.h: Removed.
+ * public/platform/WebICECandidateDescriptor.h: Replaced.
+ * public/platform/WebICEOptions.h: Replaced.
+ * public/platform/WebKitPlatformSupport.h:
+ (WebKit):
+ (WebKitPlatformSupport):
+ * public/platform/WebMediaHints.h: Replaced.
+ * public/platform/WebMediaStreamCenter.h: Replaced.
+ * public/platform/WebMediaStreamCenterClient.h: Replaced.
+ * public/platform/WebMediaStreamComponent.h: Replaced.
+ * public/platform/WebMediaStreamDescriptor.h: Replaced.
+ * public/platform/WebMediaStreamSource.h: Replaced.
+ * public/platform/WebMediaStreamSourcesRequest.h: Replaced.
+ * public/platform/WebPeerConnection00Handler.h: Replaced.
+ * public/platform/WebPeerConnection00HandlerClient.h: Replaced.
+ * public/platform/WebPeerConnectionHandler.h: Replaced.
+ * public/platform/WebPeerConnectionHandlerClient.h: Replaced.
+ * public/platform/WebSessionDescriptionDescriptor.h: Replaced.
+ * public/platform/WebVector.h: Replaced.
+ * src/WebICECandidateDescriptor.cpp: Removed.
+ * src/WebICEOptions.cpp: Removed.
+ * src/WebMediaHints.cpp: Removed.
+ * src/WebMediaStreamComponent.cpp: Removed.
+ * src/WebMediaStreamDescriptor.cpp: Removed.
+ * src/WebMediaStreamSource.cpp: Removed.
+ * src/WebMediaStreamSourcesRequest.cpp: Removed.
+
+2012-03-30 Adam Barth <abarth@webkit.org>
+
+ [Chromium] Move ResourceHandle to WebCore/platform/network/chromium
+ https://bugs.webkit.org/show_bug.cgi?id=82657
+
+ Reviewed by James Robinson.
+
+ * WebKit.gyp:
+ * src/ResourceHandle.cpp: Removed.
+ * src/ResourceHandleInternal.h: Removed.
+ * src/WrappedResourceRequest.h: Removed.
+ * src/WrappedResourceResponse.h: Removed.
+
+2012-03-30 Adam Barth <abarth@webkit.org>
+
+ Two more link errors. This time it's v8 we're missing.
+
+ * WebKitUnitTests.gyp:
+
+2012-03-30 Adam Barth <abarth@webkit.org>
+
+ Attempt to fix the Windows component build. It seems we're just
+ missing GURL now.
+
+ * WebKitUnitTests.gyp:
+
+2012-03-30 Adam Barth <abarth@webkit.org>
+
+ Attempt to fix the Windows component build. The way we link the unit
+ tests in the component build is kind of nutty. Hopefully this approach
+ will eliminate the duplicate symbols we've been seeing.
+
+ * WebKitUnitTests.gyp:
+
+2012-03-30 Emil A Eklund <eae@chromium.org>
+
+ Change WebKit/WebKit2 platform code to use pixel snapped values
+ https://bugs.webkit.org/show_bug.cgi?id=82549
+
+ Reviewed by Eric Seidel.
+
+ * src/WebAccessibilityObject.cpp:
+ (WebKit::WebAccessibilityObject::boundingBoxRect):
+ Use pixelSnappedBoundingBoxRect instead of boundingBoxRect which returns
+ a LayoutRect.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::characterIndexForPoint):
+ Use roundedPoint instead of point for hit testing as ranges use screen
+ cordinates which are represented with pixel accuracy.
+
+2012-03-30 Adam Barth <abarth@webkit.org>
+
+ https://bugs.webkit.org/show_bug.cgi?id=82582
+ Move CPP files related to ResourceHandle to WebCore/platform
+
+ Reviewed by James Robinson.
+
+ * WebKit.gyp:
+ * src/WebHTTPBody.cpp: Removed.
+ * src/WebHTTPLoadInfo.cpp: Removed.
+ * src/WebURL.cpp: Removed.
+ * src/WebURLError.cpp: Removed.
+ * src/WebURLRequest.cpp: Removed.
+ * src/WebURLRequestPrivate.h: Removed.
+ * src/WebURLResponse.cpp: Removed.
+ * src/WebURLResponsePrivate.h: Removed.
+
+2012-03-30 Dirk Pranke <dpranke@chromium.org>
+
+ Roll chromium DEPS from 129593 to 129574.
+
+ Unreviewed.
+
+ * DEPS:
+
+2012-03-30 Adam Barth <abarth@webkit.org>
+
+ Move CPP files related to ResourceHandle to WebCore/platform
+ https://bugs.webkit.org/show_bug.cgi?id=82582
+
+ Reviewed by James Robinson.
+
+ * WebKit.gyp:
+ * src/WebData.cpp: Removed.
+
+2012-03-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ GEOLOCATION should be implemented as Page Supplement
+ https://bugs.webkit.org/show_bug.cgi?id=82228
+
+ Reviewed by Adam Barth.
+
+ Geolocation is now a Supplement in Page so the interface
+ has changed for setting up the page's geolocation client
+ initially and accessing the controller later.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+
+2012-03-30 Ian Vollick <vollick@chromium.org>
+
+ [chromium] Flaky animation unit test CCLayerTreeHostTestSynchronizeAnimationStartTimes
+ https://bugs.webkit.org/show_bug.cgi?id=82731
+
+ Reviewed by James Robinson.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::CCLayerTreeHostTestSynchronizeAnimationStartTimes::CCLayerTreeHostTestSynchronizeAnimationStartTimes):
+ (WTF::CCLayerTreeHostTestSynchronizeAnimationStartTimes::animateLayers):
+ (CCLayerTreeHostTestSynchronizeAnimationStartTimes):
+ (WTF::CCLayerTreeHostTestSynchronizeAnimationStartTimes::notifyAnimationStarted):
+
+2012-03-30 Ian Vollick <vollick@chromium.org>
+
+ [chromium] assertion being hit in CCLayerAnimationController
+ https://bugs.webkit.org/show_bug.cgi?id=82237
+
+ Reviewed by James Robinson.
+
+ * tests/CCLayerAnimationControllerTest.cpp:
+ (WebKitTests::TEST):
+ (WebKitTests):
+
+2012-03-30 Alexander Pavlov <apavlov@chromium.org>
+
+ [Chromium] Unreviewed Chromium Mac build fix.
+
+ * src/WebDevToolsAgentPrivate.h:
+ (WebKit):
+
+2012-03-30 Alexander Pavlov <apavlov@chromium.org>
+
+ Web Inspector: [Chromium] Implement Chromium-specific part of the device metrics emulation
+ https://bugs.webkit.org/show_bug.cgi?id=82612
+
+ This change implements the Chromium-specific code for overriding the device metrics, such as screen size
+ (by setting the FrameView size) and font zoom factor (necessary for certain emulated devices,)
+ and for painting the gutter overlay covering the WebView area not occupied by the associated FrameView.
+
+ Reviewed by Pavel Feldman.
+
+ * src/InspectorClientImpl.cpp:
+ (WebKit::InspectorClientImpl::canOverrideDeviceMetrics):
+ (WebKit):
+ (WebKit::InspectorClientImpl::overrideDeviceMetrics):
+ (WebKit::InspectorClientImpl::autoZoomPageToFitWidth):
+ * src/InspectorClientImpl.h:
+ (InspectorClientImpl):
+ * src/WebDevToolsAgentImpl.cpp:
+ (OverlayZOrders):
+ (DeviceMetricsSupport):
+ (WebKit::DeviceMetricsSupport::DeviceMetricsSupport):
+ (WebKit::DeviceMetricsSupport::~DeviceMetricsSupport):
+ (WebKit::DeviceMetricsSupport::setDeviceMetrics):
+ (WebKit::DeviceMetricsSupport::autoZoomPageToFitWidth):
+ (WebKit::DeviceMetricsSupport::applySizeOverrideIfNecessary):
+ (WebKit::DeviceMetricsSupport::restore):
+ (WebKit::DeviceMetricsSupport::applySizeOverrideInternal):
+ (WebKit::DeviceMetricsSupport::paintPageOverlay):
+ (WebKit::DeviceMetricsSupport::frameView):
+ (WebKit):
+ (WebKit::WebDevToolsAgentImpl::mainFrameViewCreated):
+ (WebKit::WebDevToolsAgentImpl::metricsOverridden):
+ (WebKit::WebDevToolsAgentImpl::overrideDeviceMetrics):
+ (WebKit::WebDevToolsAgentImpl::autoZoomPageToFitWidth):
+ (WebKit::WebDevToolsAgentImpl::highlight):
+ * src/WebDevToolsAgentImpl.h:
+ (WebCore):
+ (WebKit):
+ (WebDevToolsAgentImpl):
+ * src/WebDevToolsAgentPrivate.h:
+ (WebKit):
+ (WebDevToolsAgentPrivate):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::createFrameView):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::resize):
+ (WebKit::WebViewImpl::setZoomLevel):
+ (WebKit::WebViewImpl::setEmulatedTextZoomFactor):
+ (WebKit):
+ (WebKit::WebViewImpl::updateLayerTreeViewport):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+ (WebKit::WebViewImpl::emulatedTextZoomFactor):
+
+2012-03-30 David Barr <davidbarr@chromium.org>
+
+ Split up top-level .gitignore and .gitattributes
+ https://bugs.webkit.org/show_bug.cgi?id=82687
+
+ Reviewed by Tor Arne Vestbø.
+
+ * .gitignore: Added.
+
+2012-03-30 Mike Reed <reed@google.com>
+
+ pass alpha directly to player, rather than creating a layer (for performance)
+ https://bugs.webkit.org/show_bug.cgi?id=82360
+
+ Reviewed by Stephen White.
+
+ Performance change, existing webkit tests apply.
+
+ * public/WebMediaPlayer.h:
+ (WebMediaPlayer):
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::paintCurrentFrameInContext):
+
+2012-03-30 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
+
+ Add a "preview" state to Page Visibility API implementation
+ https://bugs.webkit.org/show_bug.cgi?id=81355
+
+ Reviewed by Adam Barth.
+
+ Updating the Page Visibility API implementation to the current spec version.
+
+ * public/WebPageVisibilityState.h:
+ * src/AssertMatchingEnums.cpp:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setVisibilityState):
+
+2012-03-30 Keishi Hattori <keishi@webkit.org>
+
+ Change ENABLE_INPUT_COLOR to ENABLE_INPUT_TYPE_COLOR and enable it for chromium
+ https://bugs.webkit.org/show_bug.cgi?id=80972
+
+ Reviewed by Kent Tamura.
+
+ * features.gypi:
+ * src/ChromeClientImpl.cpp:
+ (WebKit):
+ * src/ChromeClientImpl.h:
+ (WebCore):
+ (ChromeClientImpl):
+ * src/ColorChooserProxy.cpp:
+ * src/ColorChooserProxy.h:
+ * src/WebColorChooserClientImpl.cpp:
+ * src/WebColorChooserClientImpl.h:
+
+2012-03-29 Adam Barth <abarth@webkit.org>
+
+ Unreviewed, rolling out r112572.
+ http://trac.webkit.org/changeset/112572
+ https://bugs.webkit.org/show_bug.cgi?id=82582
+
+ Does not compile in Windows component build
+
+ * WebKit.gyp:
+ * src/WebData.cpp: Renamed from Source/WebCore/platform/chromium/support/WebData.cpp.
+ (WebKit):
+ (WebKit::WebData::reset):
+ (WebKit::WebData::assign):
+ (WebKit::WebData::size):
+ (WebKit::WebData::data):
+ (WebKit::WebData::WebData):
+ (WebKit::WebData::operator=):
+ (WebKit::WebData::operator PassRefPtr<SharedBuffer>):
+ * src/WebHTTPBody.cpp: Renamed from Source/WebCore/platform/chromium/support/WebHTTPBody.cpp.
+ (WebKit):
+ (WebKit::WebHTTPBody::initialize):
+ (WebKit::WebHTTPBody::reset):
+ (WebKit::WebHTTPBody::assign):
+ (WebKit::WebHTTPBody::elementCount):
+ (WebKit::WebHTTPBody::elementAt):
+ (WebKit::WebHTTPBody::appendData):
+ (WebKit::WebHTTPBody::appendFile):
+ (WebKit::WebHTTPBody::appendFileRange):
+ (WebKit::WebHTTPBody::appendBlob):
+ (WebKit::WebHTTPBody::identifier):
+ (WebKit::WebHTTPBody::setIdentifier):
+ (WebKit::WebHTTPBody::containsPasswordData):
+ (WebKit::WebHTTPBody::setContainsPasswordData):
+ (WebKit::WebHTTPBody::WebHTTPBody):
+ (WebKit::WebHTTPBody::operator=):
+ (WebKit::WebHTTPBody::operator PassRefPtr<FormData>):
+ (WebKit::WebHTTPBody::ensureMutable):
+ * src/WebHTTPLoadInfo.cpp: Renamed from Source/WebCore/platform/chromium/support/WebHTTPLoadInfo.cpp.
+ (WebKit):
+ (WebKit::WebHTTPLoadInfo::initialize):
+ (WebKit::WebHTTPLoadInfo::reset):
+ (WebKit::WebHTTPLoadInfo::assign):
+ (WebKit::WebHTTPLoadInfo::WebHTTPLoadInfo):
+ (WebKit::WebHTTPLoadInfo::operator WTF::PassRefPtr<WebCore::ResourceLoadInfo>):
+ (WebKit::WebHTTPLoadInfo::httpStatusCode):
+ (WebKit::WebHTTPLoadInfo::setHTTPStatusCode):
+ (WebKit::WebHTTPLoadInfo::httpStatusText):
+ (WebKit::WebHTTPLoadInfo::setHTTPStatusText):
+ (WebKit::WebHTTPLoadInfo::encodedDataLength):
+ (WebKit::WebHTTPLoadInfo::setEncodedDataLength):
+ (WebKit::addHeader):
+ (WebKit::WebHTTPLoadInfo::addRequestHeader):
+ (WebKit::WebHTTPLoadInfo::addResponseHeader):
+ (WebKit::WebHTTPLoadInfo::requestHeadersText):
+ (WebKit::WebHTTPLoadInfo::setRequestHeadersText):
+ (WebKit::WebHTTPLoadInfo::responseHeadersText):
+ (WebKit::WebHTTPLoadInfo::setResponseHeadersText):
+ * src/WebURL.cpp: Renamed from Source/WebCore/platform/chromium/support/WebURL.cpp.
+ (WebKit):
+ (WebKit::WebURL::WebURL):
+ (WebKit::WebURL::operator=):
+ (WebKit::WebURL::operator WebCore::KURL):
+ * src/WebURLError.cpp: Renamed from Source/WebCore/platform/chromium/support/WebURLError.cpp.
+ (WebKit):
+ (WebKit::WebURLError::WebURLError):
+ (WebKit::WebURLError::operator=):
+ (WebKit::WebURLError::operator ResourceError):
+ * src/WebURLRequest.cpp: Renamed from Source/WebCore/platform/chromium/support/WebURLRequest.cpp.
+ (WebURLRequestPrivateImpl):
+ (WebKit::WebURLRequestPrivateImpl::WebURLRequestPrivateImpl):
+ (WebKit::WebURLRequestPrivateImpl::dispose):
+ (WebKit::WebURLRequestPrivateImpl::~WebURLRequestPrivateImpl):
+ (WebKit):
+ (WebKit::WebURLRequest::initialize):
+ (WebKit::WebURLRequest::reset):
+ (WebKit::WebURLRequest::assign):
+ (WebKit::WebURLRequest::isNull):
+ (WebKit::WebURLRequest::url):
+ (WebKit::WebURLRequest::setURL):
+ (WebKit::WebURLRequest::firstPartyForCookies):
+ (WebKit::WebURLRequest::setFirstPartyForCookies):
+ (WebKit::WebURLRequest::allowCookies):
+ (WebKit::WebURLRequest::setAllowCookies):
+ (WebKit::WebURLRequest::allowStoredCredentials):
+ (WebKit::WebURLRequest::setAllowStoredCredentials):
+ (WebKit::WebURLRequest::cachePolicy):
+ (WebKit::WebURLRequest::setCachePolicy):
+ (WebKit::WebURLRequest::httpMethod):
+ (WebKit::WebURLRequest::setHTTPMethod):
+ (WebKit::WebURLRequest::httpHeaderField):
+ (WebKit::WebURLRequest::setHTTPHeaderField):
+ (WebKit::WebURLRequest::addHTTPHeaderField):
+ (WebKit::WebURLRequest::clearHTTPHeaderField):
+ (WebKit::WebURLRequest::visitHTTPHeaderFields):
+ (WebKit::WebURLRequest::httpBody):
+ (WebKit::WebURLRequest::setHTTPBody):
+ (WebKit::WebURLRequest::reportUploadProgress):
+ (WebKit::WebURLRequest::setReportUploadProgress):
+ (WebKit::WebURLRequest::reportLoadTiming):
+ (WebKit::WebURLRequest::setReportRawHeaders):
+ (WebKit::WebURLRequest::reportRawHeaders):
+ (WebKit::WebURLRequest::setReportLoadTiming):
+ (WebKit::WebURLRequest::targetType):
+ (WebKit::WebURLRequest::hasUserGesture):
+ (WebKit::WebURLRequest::setHasUserGesture):
+ (WebKit::WebURLRequest::setTargetType):
+ (WebKit::WebURLRequest::requestorID):
+ (WebKit::WebURLRequest::setRequestorID):
+ (WebKit::WebURLRequest::requestorProcessID):
+ (WebKit::WebURLRequest::setRequestorProcessID):
+ (WebKit::WebURLRequest::appCacheHostID):
+ (WebKit::WebURLRequest::setAppCacheHostID):
+ (WebKit::WebURLRequest::downloadToFile):
+ (WebKit::WebURLRequest::setDownloadToFile):
+ (WebKit::WebURLRequest::extraData):
+ (WebKit::WebURLRequest::setExtraData):
+ (WebKit::WebURLRequest::toMutableResourceRequest):
+ (WebKit::WebURLRequest::toResourceRequest):
+ * src/WebURLRequestPrivate.h: Renamed from Source/WebCore/platform/chromium/support/WebURLRequestPrivate.h.
+ (WebKit):
+ (WebURLRequestPrivate):
+ (WebKit::WebURLRequestPrivate::WebURLRequestPrivate):
+ * src/WebURLResponse.cpp: Renamed from Source/WebCore/platform/chromium/support/WebURLResponse.cpp.
+ (WebURLResponsePrivateImpl):
+ (WebKit::WebURLResponsePrivateImpl::WebURLResponsePrivateImpl):
+ (WebKit::WebURLResponsePrivateImpl::dispose):
+ (WebKit::WebURLResponsePrivateImpl::~WebURLResponsePrivateImpl):
+ (WebKit):
+ (WebKit::WebURLResponse::initialize):
+ (WebKit::WebURLResponse::reset):
+ (WebKit::WebURLResponse::assign):
+ (WebKit::WebURLResponse::isNull):
+ (WebKit::WebURLResponse::url):
+ (WebKit::WebURLResponse::setURL):
+ (WebKit::WebURLResponse::connectionID):
+ (WebKit::WebURLResponse::setConnectionID):
+ (WebKit::WebURLResponse::connectionReused):
+ (WebKit::WebURLResponse::setConnectionReused):
+ (WebKit::WebURLResponse::loadTiming):
+ (WebKit::WebURLResponse::setLoadTiming):
+ (WebKit::WebURLResponse::httpLoadInfo):
+ (WebKit::WebURLResponse::setHTTPLoadInfo):
+ (WebKit::WebURLResponse::responseTime):
+ (WebKit::WebURLResponse::setResponseTime):
+ (WebKit::WebURLResponse::mimeType):
+ (WebKit::WebURLResponse::setMIMEType):
+ (WebKit::WebURLResponse::expectedContentLength):
+ (WebKit::WebURLResponse::setExpectedContentLength):
+ (WebKit::WebURLResponse::textEncodingName):
+ (WebKit::WebURLResponse::setTextEncodingName):
+ (WebKit::WebURLResponse::suggestedFileName):
+ (WebKit::WebURLResponse::setSuggestedFileName):
+ (WebKit::WebURLResponse::httpStatusCode):
+ (WebKit::WebURLResponse::setHTTPStatusCode):
+ (WebKit::WebURLResponse::httpStatusText):
+ (WebKit::WebURLResponse::setHTTPStatusText):
+ (WebKit::WebURLResponse::httpHeaderField):
+ (WebKit::WebURLResponse::setHTTPHeaderField):
+ (WebKit::WebURLResponse::addHTTPHeaderField):
+ (WebKit::WebURLResponse::clearHTTPHeaderField):
+ (WebKit::WebURLResponse::visitHTTPHeaderFields):
+ (WebKit::WebURLResponse::lastModifiedDate):
+ (WebKit::WebURLResponse::setLastModifiedDate):
+ (WebKit::WebURLResponse::appCacheID):
+ (WebKit::WebURLResponse::setAppCacheID):
+ (WebKit::WebURLResponse::appCacheManifestURL):
+ (WebKit::WebURLResponse::setAppCacheManifestURL):
+ (WebKit::WebURLResponse::securityInfo):
+ (WebKit::WebURLResponse::setSecurityInfo):
+ (WebKit::WebURLResponse::toMutableResourceResponse):
+ (WebKit::WebURLResponse::toResourceResponse):
+ (WebKit::WebURLResponse::wasCached):
+ (WebKit::WebURLResponse::setWasCached):
+ (WebKit::WebURLResponse::wasFetchedViaSPDY):
+ (WebKit::WebURLResponse::setWasFetchedViaSPDY):
+ (WebKit::WebURLResponse::wasNpnNegotiated):
+ (WebKit::WebURLResponse::setWasNpnNegotiated):
+ (WebKit::WebURLResponse::wasAlternateProtocolAvailable):
+ (WebKit::WebURLResponse::setWasAlternateProtocolAvailable):
+ (WebKit::WebURLResponse::wasFetchedViaProxy):
+ (WebKit::WebURLResponse::setWasFetchedViaProxy):
+ (WebKit::WebURLResponse::isMultipartPayload):
+ (WebKit::WebURLResponse::setIsMultipartPayload):
+ (WebKit::WebURLResponse::downloadFilePath):
+ (WebKit::WebURLResponse::setDownloadFilePath):
+ (WebKit::WebURLResponse::remoteIPAddress):
+ (WebKit::WebURLResponse::setRemoteIPAddress):
+ (WebKit::WebURLResponse::remotePort):
+ (WebKit::WebURLResponse::setRemotePort):
+ (WebKit::WebURLResponse::extraData):
+ (WebKit::WebURLResponse::setExtraData):
+ * src/WebURLResponsePrivate.h: Renamed from Source/WebCore/platform/chromium/support/WebURLResponsePrivate.h.
+ (WebKit):
+ (WebURLResponsePrivate):
+ (WebKit::WebURLResponsePrivate::WebURLResponsePrivate):
+
+2012-03-29 Adam Barth <abarth@webkit.org>
+
+ Unreviewed, rolling out r112579.
+ http://trac.webkit.org/changeset/112579
+ https://bugs.webkit.org/show_bug.cgi?id=82657
+
+ Does not compile in Windows component build
+
+ * WebKit.gyp:
+ * src/ResourceHandle.cpp: Renamed from Source/WebCore/platform/network/chromium/ResourceHandle.cpp.
+ (WebCore):
+ (WebCore::ResourceHandleInternal::ResourceHandleInternal):
+ (WebCore::ResourceHandleInternal::start):
+ (WebCore::ResourceHandleInternal::cancel):
+ (WebCore::ResourceHandleInternal::setDefersLoading):
+ (WebCore::ResourceHandleInternal::allowStoredCredentials):
+ (WebCore::ResourceHandleInternal::willSendRequest):
+ (WebCore::ResourceHandleInternal::didSendData):
+ (WebCore::ResourceHandleInternal::didReceiveResponse):
+ (WebCore::ResourceHandleInternal::didDownloadData):
+ (WebCore::ResourceHandleInternal::didReceiveData):
+ (WebCore::ResourceHandleInternal::didReceiveCachedMetadata):
+ (WebCore::ResourceHandleInternal::didFinishLoading):
+ (WebCore::ResourceHandleInternal::didFail):
+ (WebCore::ResourceHandleInternal::FromResourceHandle):
+ (WebCore::ResourceHandle::ResourceHandle):
+ (WebCore::ResourceHandle::create):
+ (WebCore::ResourceHandle::firstRequest):
+ (WebCore::ResourceHandle::client):
+ (WebCore::ResourceHandle::setClient):
+ (WebCore::ResourceHandle::setDefersLoading):
+ (WebCore::ResourceHandle::start):
+ (WebCore::ResourceHandle::hasAuthenticationChallenge):
+ (WebCore::ResourceHandle::clearAuthentication):
+ (WebCore::ResourceHandle::cancel):
+ (WebCore::ResourceHandle::~ResourceHandle):
+ (WebCore::ResourceHandle::loadsBlocked):
+ (WebCore::ResourceHandle::loadResourceSynchronously):
+ (WebCore::ResourceHandle::willLoadFromCache):
+ (WebCore::ResourceHandle::cacheMetadata):
+ * src/ResourceHandleInternal.h: Renamed from Source/WebCore/platform/network/chromium/ResourceHandleInternal.h.
+ (WebCore):
+ (ResourceHandleInternal):
+ (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
+ (WebCore::ResourceHandleInternal::setOwner):
+ (WebCore::ResourceHandleInternal::request):
+ (WebCore::ResourceHandleInternal::client):
+ (WebCore::ResourceHandleInternal::setClient):
+ (WebCore::ResourceHandleInternal::loader):
+ * src/WrappedResourceRequest.h: Renamed from Source/WebCore/platform/chromium/support/WrappedResourceRequest.h.
+ (WebKit):
+ (WrappedResourceRequest):
+ (WebKit::WrappedResourceRequest::~WrappedResourceRequest):
+ (WebKit::WrappedResourceRequest::WrappedResourceRequest):
+ (WebKit::WrappedResourceRequest::bind):
+ (Handle):
+ (WebKit::WrappedResourceRequest::Handle::dispose):
+ * src/WrappedResourceResponse.h: Renamed from Source/WebCore/platform/chromium/support/WrappedResourceResponse.h.
+ (WebKit):
+ (WrappedResourceResponse):
+ (WebKit::WrappedResourceResponse::~WrappedResourceResponse):
+ (WebKit::WrappedResourceResponse::WrappedResourceResponse):
+ (WebKit::WrappedResourceResponse::bind):
+ (Handle):
+ (WebKit::WrappedResourceResponse::Handle::dispose):
+
+2012-03-29 Adam Barth <abarth@webkit.org>
+
+ [Chromium] Move ResourceHandle to WebCore/platform/network/chromium
+ https://bugs.webkit.org/show_bug.cgi?id=82657
+
+ Reviewed by James Robinson.
+
+ * WebKit.gyp:
+ * src/ResourceHandle.cpp: Removed.
+ * src/ResourceHandleInternal.h: Removed.
+ * src/WrappedResourceRequest.h: Removed.
+ * src/WrappedResourceResponse.h: Removed.
+
+2012-03-29 Dmitry Lomov <dslomov@google.com>
+
+ [Chromium] WorkerFileSystemContextObserver can reference a deleted WorkerFileSystemCallbacksBridge.
+ https://bugs.webkit.org/show_bug.cgi?id=82565
+
+ WorkerFileSystemCallbacksBridge relies on a cleanUpAfterCallback being called
+ prior to the disposal of the bridge to ensure that WorkerFileSystemContextObserver
+ is unsubscribed and deleted. However cleanUpAfterCallback will only execute if the bridge's
+ callback has executed on the worker thread, and this might not be the case if the worker
+ terminates.
+
+ This patch fixes this by maintaining a RefPtr from WorkerFileSystemContextObserver to
+ WorkerFileSystemCallbacksBridge. This ensures that bridge is not deleted while observer is alive.
+
+ Reviewed by David Levin.
+
+ * src/WorkerFileSystemCallbacksBridge.cpp:
+ (WebKit::WorkerFileSystemContextObserver::create):
+ (WebKit::WorkerFileSystemContextObserver::WorkerFileSystemContextObserver):
+ (WorkerFileSystemContextObserver):
+
+2012-03-29 Adam Barth <abarth@webkit.org>
+
+ Move CPP files related to ResourceHandle to WebCore/platform
+ https://bugs.webkit.org/show_bug.cgi?id=82582
+
+ Reviewed by James Robinson.
+
+ * WebKit.gyp:
+ * src/WebData.cpp: Removed.
+ * src/WebHTTPBody.cpp: Removed.
+ * src/WebHTTPLoadInfo.cpp: Removed.
+ * src/WebURL.cpp: Removed.
+ * src/WebURLError.cpp: Removed.
+ * src/WebURLRequest.cpp: Removed.
+ * src/WebURLRequestPrivate.h: Removed.
+ * src/WebURLResponse.cpp: Removed.
+ * src/WebURLResponsePrivate.h: Removed.
+
+2012-03-29 Michal Mocny <mmocny@google.com>
+
+ [chromium] Ensure framebuffer exists at the start of beginDrawingFrame.
+ https://bugs.webkit.org/show_bug.cgi?id=82569
+
+ Reviewed by James Robinson.
+
+ * tests/LayerRendererChromiumTest.cpp:
+ (FakeLayerRendererChromiumClient::FakeLayerRendererChromiumClient):
+ (FakeLayerRendererChromiumClient::rootLayer):
+ (FakeLayerRendererChromiumClient):
+ (TEST_F):
+
+2012-03-29 Adam Barth <abarth@webkit.org>
+
+ Move createURLLoader() into Platform
+ https://bugs.webkit.org/show_bug.cgi?id=82587
+
+ Reviewed by James Robinson.
+
+ * public/platform/WebKitPlatformSupport.h:
+ (WebKit):
+ (WebKitPlatformSupport):
+ * src/WebKit.cpp:
+ (WebKit::initializeWithoutV8):
+ (WebKit::shutdown):
+
+2012-03-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r112553.
+ http://trac.webkit.org/changeset/112553
+ https://bugs.webkit.org/show_bug.cgi?id=82638
+
+ It made all tests crash on Qt WK2 (Requested by Ossy_away on
+ #webkit).
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+
+2012-03-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ HashMap<>::add should return a more descriptive object
+ https://bugs.webkit.org/show_bug.cgi?id=71063
+
+ Reviewed by Ryosuke Niwa.
+
+ Update code to use AddResult instead of a pair.
+
+ * src/WebHTTPLoadInfo.cpp:
+ (WebKit::addHeader):
+ * src/WebURLResponse.cpp:
+ (WebKit::WebURLResponse::addHTTPHeaderField):
+
+2012-03-29 Mark Pilgrim <pilgrim@chromium.org>
+
+ GEOLOCATION should be implemented as Page Supplement
+ https://bugs.webkit.org/show_bug.cgi?id=82228
+
+ Reviewed by Adam Barth.
+
+ Geolocation is now a Supplement in Page so the interface
+ has changed for setting up the page's geolocation client
+ initially and accessing the controller later.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+
+2012-03-29 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Split off tiled layer constructs for unit tests into a common header
+ https://bugs.webkit.org/show_bug.cgi?id=82425
+
+ Reviewed by Adrienne Walker.
+
+ * WebKit.gypi:
+ * tests/CCTiledLayerTestCommon.cpp: Added.
+ (WebKitTests):
+ (WebKitTests::FakeLayerTextureUpdater::Texture::Texture):
+ (WebKitTests::FakeLayerTextureUpdater::Texture::~Texture):
+ (WebKitTests::FakeLayerTextureUpdater::Texture::updateRect):
+ (WebKitTests::FakeLayerTextureUpdater::Texture::prepareRect):
+ (WebKitTests::FakeLayerTextureUpdater::FakeLayerTextureUpdater):
+ (WebKitTests::FakeLayerTextureUpdater::~FakeLayerTextureUpdater):
+ (WebKitTests::FakeLayerTextureUpdater::prepareToUpdate):
+ (WebKitTests::FakeLayerTextureUpdater::setRectToInvalidate):
+ (WebKitTests::FakeLayerTextureUpdater::createTexture):
+ (WebKitTests::FakeCCTiledLayerImpl::FakeCCTiledLayerImpl):
+ (WebKitTests::FakeCCTiledLayerImpl::~FakeCCTiledLayerImpl):
+ (WebKitTests::FakeTiledLayerChromium::FakeTiledLayerChromium):
+ (WebKitTests::FakeTiledLayerChromium::~FakeTiledLayerChromium):
+ (WebKitTests::FakeTiledLayerChromium::setNeedsDisplayRect):
+ (WebKitTests::FakeTiledLayerChromium::paintContentsIfDirty):
+ (WebKitTests::FakeTiledLayerWithScaledBounds::FakeTiledLayerWithScaledBounds):
+ (WebKitTests::FakeCCTextureUpdater::FakeCCTextureUpdater):
+ * tests/CCTiledLayerTestCommon.h: Added.
+ (WebKitTests):
+ (FakeLayerTextureUpdater):
+ (Texture):
+ (WebKitTests::FakeLayerTextureUpdater::sampledTexelFormat):
+ (WebKitTests::FakeLayerTextureUpdater::lastUpdateRect):
+ (WebKitTests::FakeLayerTextureUpdater::prepareCount):
+ (WebKitTests::FakeLayerTextureUpdater::clearPrepareCount):
+ (WebKitTests::FakeLayerTextureUpdater::updateCount):
+ (WebKitTests::FakeLayerTextureUpdater::clearUpdateCount):
+ (WebKitTests::FakeLayerTextureUpdater::updateRect):
+ (WebKitTests::FakeLayerTextureUpdater::prepareRectCount):
+ (WebKitTests::FakeLayerTextureUpdater::clearPrepareRectCount):
+ (WebKitTests::FakeLayerTextureUpdater::prepareRect):
+ (WebKitTests::FakeLayerTextureUpdater::setOpaquePaintRect):
+ (FakeCCTiledLayerImpl):
+ (FakeTiledLayerChromium):
+ (WebKitTests::FakeTiledLayerChromium::tileSize):
+ (WebKitTests::FakeTiledLayerChromium::lastNeedsDisplayRect):
+ (WebKitTests::FakeTiledLayerChromium::textureManager):
+ (WebKitTests::FakeTiledLayerChromium::fakeLayerTextureUpdater):
+ (WebKitTests::FakeTiledLayerChromium::updateRect):
+ (WebKitTests::FakeTiledLayerChromium::textureUpdater):
+ (WebKitTests::FakeTiledLayerChromium::createTextureUpdaterIfNeeded):
+ (FakeTiledLayerWithScaledBounds):
+ (WebKitTests::FakeTiledLayerWithScaledBounds::setContentBounds):
+ (WebKitTests::FakeTiledLayerWithScaledBounds::contentBounds):
+ (FakeTextureAllocator):
+ (WebKitTests::FakeTextureAllocator::createTexture):
+ (WebKitTests::FakeTextureAllocator::deleteTexture):
+ (FakeTextureCopier):
+ (WebKitTests::FakeTextureCopier::copyTexture):
+ (FakeCCTextureUpdater):
+ (WebKitTests::FakeCCTextureUpdater::textureAllocator):
+ * tests/TextureManagerTest.cpp:
+ * tests/TiledLayerChromiumTest.cpp:
+
+2012-03-29 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Remove unneeded code+fixmes from CCOcclusionTracker
+ https://bugs.webkit.org/show_bug.cgi?id=82380
+
+ Reviewed by Adrienne Walker.
+
+ * WebKit.gypi:
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::TestLayerChromium::paintContentsIfDirty):
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebKitTests::TestCCOcclusionTrackerWithScissor::TestCCOcclusionTrackerWithScissor):
+ (WebKitTests::CCOcclusionTrackerTestIdentityTransforms::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestRotatedChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestTranslatedChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestChildInRotatedChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestVisitTargetTwoTimes::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceRotatedOffAxis::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceWithTwoOpaqueChildren::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblings::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblingsWithTwoTransforms::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestFilters::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestLayerScissorRectOutsideChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestScreenScissorRectOutsideChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestLayerScissorRectOverChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestScreenScissorRectOverChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestLayerScissorRectPartlyOverChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestScreenScissorRectPartlyOverChild::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestLayerScissorRectOverNothing::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestScreenScissorRectOverNothing::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestLayerScissorRectForLayerOffOrigin::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestOpaqueContentsRegionEmpty::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestOpaqueContentsRegionNonEmpty::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTest3dTransform::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestPerspectiveTransform::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestPerspectiveTransformBehindCamera::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestAnimationOpacity1OnMainThread::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestAnimationOpacity0OnMainThread::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestAnimationTranslateOnMainThread::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestSurfaceOcclusionTranslatesToParent::runMyTest):
+ * tests/CCOcclusionTrackerTestCommon.h: Added.
+ (WebKitTests):
+ (TestCCOcclusionTrackerBase):
+ (WebKitTests::TestCCOcclusionTrackerBase::TestCCOcclusionTrackerBase):
+ (WebKitTests::TestCCOcclusionTrackerBase::occlusionInScreenSpace):
+ (WebKitTests::TestCCOcclusionTrackerBase::occlusionInTargetSurface):
+ (WebKitTests::TestCCOcclusionTrackerBase::setOcclusionInScreenSpace):
+ (WebKitTests::TestCCOcclusionTrackerBase::setOcclusionInTargetSurface):
+
+2012-03-29 Dirk Schulze <krit@webkit.org>
+
+ Introduce CSSParserMode in all classes
+ https://bugs.webkit.org/show_bug.cgi?id=82335
+
+ Unreviewed build fix.
+
+ * src/WebDocument.cpp:
+ (WebKit::WebDocument::insertUserStyleSheet):
+
+2012-03-28 Dirk Schulze <krit@webkit.org>
+
+ Introduce CSSParserMode in all classes
+ https://bugs.webkit.org/show_bug.cgi?id=82335
+
+ Use CSSParserMode for setting the parsing mode on parseValue.
+
+ * src/WebDocument.cpp:
+ (WebKit::WebDocument::insertUserStyleSheet):
+
+2012-03-29 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Adding better comments for the WebRTC methods in WebKitPlatformSupport.h
+ https://bugs.webkit.org/show_bug.cgi?id=82588
+
+ Reviewed by Adam Barth.
+
+ * public/platform/WebKitPlatformSupport.h:
+ (WebKitPlatformSupport):
+
+2012-03-28 Kinuko Yasuda <kinuko@chromium.org>
+
+ [chromium] Add isolated filesystem type and WebDragData::filesystem_id for drag-and-drop using File/DirectoryEntry.
+ https://bugs.webkit.org/show_bug.cgi?id=76826
+
+ As proposed on whatwg (http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-November/033814.html)
+ we are implementing better drag-and-drop support using File/Directory
+ Entry objects in FileSystem API, and for the purpose this patch adds
+ a new filesystem type: Isolated filesystem.
+
+ Each filesystem can be distinguished by a filesystem ID that is given
+ by chromium platform code via WebDragData when set of
+ files/directories are dropped.
+
+ This is all platform-specific implementation detail and all the changes
+ are in chromium directory.
+
+ Reviewed by David Levin.
+
+ * public/platform/WebDragData.h:
+ (WebDragData):
+ * public/platform/WebFileSystem.h: Added Isolated type.
+ * src/AsyncFileSystemChromium.cpp:
+ (WebCore::AsyncFileSystemChromium::createIsolatedFileSystemName): Added.
+ (WebCore::AsyncFileSystemChromium::createIsolatedFileSystem): Added.
+ (WebCore::AsyncFileSystemChromium::toURL): Made it not to return URL
+ for isolated filesystem (as we do not support it for now).
+ * src/AsyncFileSystemChromium.h:
+ * src/PlatformSupport.cpp:
+ (WebCore::PlatformSupport::createIsolatedFileSystem): Added.
+ * src/WebDragData.cpp:
+ (WebKit::WebDragData::filesystemId): Added.
+ (WebKit::WebDragData::setFilesystemId): Added.
+
+2012-03-29 Kinuko Yasuda <kinuko@chromium.org>
+
+ Unreviewed; rolling chromium deps to 129583.
+
+ * DEPS:
+
+2012-03-28 Adam Barth <abarth@webkit.org>
+
+ [Chromium] Move APIs related to ResourceHandle into Platform
+ https://bugs.webkit.org/show_bug.cgi?id=82553
+
+ Reviewed by James Robinson.
+
+ These headers are now just forwarding headers to the new location of
+ these headers. These forwarding headers exist to avoid breaking
+ existing users of the API. They will likely be removed (or changed)
+ in the future once we've updated all folks using them.
+
+ * public/platform/WebData.h:
+ * public/platform/WebHTTPBody.h:
+ * public/platform/WebHTTPHeaderVisitor.h:
+ * public/platform/WebHTTPLoadInfo.h:
+ * public/platform/WebPrivateOwnPtr.h:
+ * public/platform/WebURL.h:
+ * public/platform/WebURLError.h:
+ * public/platform/WebURLLoadTiming.h:
+ * public/platform/WebURLLoader.h:
+ * public/platform/WebURLLoaderClient.h:
+ * public/platform/WebURLRequest.h:
+ * public/platform/WebURLResponse.h:
+
+2012-03-28 Bill Budge <bbudge@chromium.org>
+
+ AssociatedURLLoader does not support Cross Origin Redirects when using
+ Access Control.
+ https://bugs.webkit.org/show_bug.cgi?id=82354
+
+ AssociatedURLLoader's internal adapter now overrides didFailRedirectCheck,
+ which cancels the load, causing didFail to notify the client that the
+ load failed. AssociatedURLLoaderTest adds test cases for CORS requests
+ that receive redirects and pass or fail the redirect access check.
+
+ Reviewed by Adam Barth.
+
+ * src/AssociatedURLLoader.cpp:
+ (AssociatedURLLoader::ClientAdapter):
+ (WebKit::AssociatedURLLoader::ClientAdapter::didFailRedirectCheck):
+ (WebKit):
+ * tests/AssociatedURLLoaderTest.cpp:
+ (WebKit):
+ (WebKit::TEST_F):
+
+2012-03-28 Adrienne Walker <enne@google.com>
+
+ [chromium] Fix tiled layer assert for huge layers
+ https://bugs.webkit.org/show_bug.cgi?id=82486
+
+ Reviewed by James Robinson.
+
+ Add test for updating a huge layer that would assert prior to this
+ code. Fix up TilingData tests to use a testing class that provides a
+ safe version of numTiles().
+
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::TEST):
+ (WTF):
+ * tests/TilingDataTest.cpp:
+ (TestTiling):
+ (WebCore::TestTiling::TestTiling):
+ (WebCore::TestTiling::numTiles):
+ (WebCore):
+ (WebCore::TEST):
+
+2012-03-28 Nate Chapin <japhet@chromium.org>
+
+ Remove dispatchDidLoadMainResource callback, since no
+ port implements it.
+ https://bugs.webkit.org/show_bug.cgi?id=82539
+
+ Reviewed by Alexey Proskuryakov.
+
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit):
+ * src/FrameLoaderClientImpl.h:
+ (FrameLoaderClientImpl):
+
+2012-03-28 Dirk Pranke <dpranke@chromium.org>
+
+ Roll chromium from 129300 to 129509.
+
+ Unreviewed, DEPS change.
+
+ * DEPS:
+
+2012-03-28 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r112432.
+ http://trac.webkit.org/changeset/112432
+ https://bugs.webkit.org/show_bug.cgi?id=82536
+
+ Causes ccs3 layout test asserts (Requested by enne on
+ #webkit).
+
+ * tests/TiledLayerChromiumTest.cpp:
+ * tests/TilingDataTest.cpp:
+ (WebCore::TEST):
+
+2012-03-27 Daniel Cheng <dcheng@chromium.org>
+
+ [chromium] Merge ChromiumDataObject and DataTransferItemListChromium.
+ https://bugs.webkit.org/show_bug.cgi?id=82407
+
+ Reviewed by Tony Chang.
+
+ * src/WebDragData.cpp:
+ (WebKit::WebDragData::items):
+
+2012-03-28 Nat Duca <nduca@chromium.org>
+
+ [chromium] Scheduler should not tell FrameRateController to begin a frame when we dont swap
+ https://bugs.webkit.org/show_bug.cgi?id=82516
+
+ Reviewed by James Robinson.
+
+ * tests/CCSchedulerTest.cpp:
+ (WebKitTests::FakeCCSchedulerClient::reset):
+ (WebKitTests::FakeCCSchedulerClient::hasAction):
+ (FakeCCSchedulerClient):
+ (WebKitTests::FakeCCSchedulerClient::scheduledActionDrawAndSwapIfPossible):
+ (WebKitTests::FakeCCSchedulerClient::scheduledActionDrawAndSwapForced):
+ (WebKitTests::FakeCCSchedulerClient::setDrawWillHappen):
+ (WebKitTests::FakeCCSchedulerClient::setSwapWillHappenIfDrawHappens):
+ (WebKitTests::SchedulerClientThatSetNeedsDrawInsideDraw::scheduledActionDrawAndSwapIfPossible):
+ (WebKitTests::SchedulerClientThatSetNeedsDrawInsideDraw::scheduledActionDrawAndSwapForced):
+ (SchedulerClientThatSetNeedsDrawInsideDraw):
+ (WebKitTests::TEST):
+ (WebKitTests::SchedulerClientThatSetNeedsCommitInsideDraw::scheduledActionDrawAndSwapIfPossible):
+ (WebKitTests::SchedulerClientThatSetNeedsCommitInsideDraw::scheduledActionDrawAndSwapForced):
+ (SchedulerClientThatSetNeedsCommitInsideDraw):
+ (WebKitTests):
+
+2012-03-26 Shawn Singh <shawnsingh@chromium.org>
+
+ [chromium] layer->clipRect() is not initialized for layers that create a renderSurface.
+ https://bugs.webkit.org/show_bug.cgi?id=74147
+
+ Reviewed by Adrienne Walker.
+
+ Added 3 more unit tests. One reproduces the clipRect problem in an
+ integrated manner, the other two directly test that clipRects are
+ properly initialized.
+
+ * tests/CCLayerTreeHostCommonTest.cpp:
+ (WebCore::TEST):
+ (WebCore):
+ * tests/CCLayerTreeTestCommon.h:
+ (WebKitTests):
+
+2012-03-28 Adrienne Walker <enne@google.com>
+
+ [chromium] Fix tiled layer assert for huge layers
+ https://bugs.webkit.org/show_bug.cgi?id=82486
+
+ Reviewed by James Robinson.
+
+ Add test for updating a huge layer that would assert prior to this
+ code. Fix up TilingData tests to use a testing class that provides a
+ safe version of numTiles().
+
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::TEST):
+ (WTF):
+ * tests/TilingDataTest.cpp:
+ (TestTiling):
+ (WebCore::TestTiling::TestTiling):
+ (WebCore::TestTiling::numTiles):
+ (WebCore):
+ (WebCore::TEST):
+
+2012-03-28 Tommy Widenflycht <tommyw@google.com>
+
+ [chromium] MediaStream API (JSEP): Introducing WebPeerConnection00Handler
+ https://bugs.webkit.org/show_bug.cgi?id=82450
+
+ Reviewed by Adam Barth.
+
+ Last patch to enable the PeerConnection00 functionality in Chromium introduces
+ WebPeerConnection00Handler and WebPeerConnection00HandlerClient, together with the necessary plumbing.
+
+ * WebKit.gyp:
+ * bridge/PeerConnection00Handler.cpp: Added.
+ (WebCore):
+ (WebCore::PeerConnection00Handler::create):
+ (WebCore::PeerConnection00Handler::PeerConnection00Handler):
+ (WebCore::PeerConnection00Handler::~PeerConnection00Handler):
+ (WebCore::PeerConnection00Handler::createOffer):
+ (WebCore::PeerConnection00Handler::createAnswer):
+ (WebCore::PeerConnection00Handler::setLocalDescription):
+ (WebCore::PeerConnection00Handler::setRemoteDescription):
+ (WebCore::PeerConnection00Handler::localDescription):
+ (WebCore::PeerConnection00Handler::remoteDescription):
+ (WebCore::PeerConnection00Handler::startIce):
+ (WebCore::PeerConnection00Handler::processIceMessage):
+ (WebCore::PeerConnection00Handler::addStream):
+ (WebCore::PeerConnection00Handler::removeStream):
+ (WebCore::PeerConnection00Handler::stop):
+ * bridge/PeerConnection00HandlerInternal.cpp: Added.
+ (WebCore):
+ (WebCore::PeerConnection00HandlerInternal::PeerConnection00HandlerInternal):
+ (WebCore::PeerConnection00HandlerInternal::~PeerConnection00HandlerInternal):
+ (WebCore::PeerConnection00HandlerInternal::createOffer):
+ (WebCore::PeerConnection00HandlerInternal::createAnswer):
+ (WebCore::PeerConnection00HandlerInternal::setLocalDescription):
+ (WebCore::PeerConnection00HandlerInternal::setRemoteDescription):
+ (WebCore::PeerConnection00HandlerInternal::localDescription):
+ (WebCore::PeerConnection00HandlerInternal::remoteDescription):
+ (WebCore::PeerConnection00HandlerInternal::startIce):
+ (WebCore::PeerConnection00HandlerInternal::processIceMessage):
+ (WebCore::PeerConnection00HandlerInternal::addStream):
+ (WebCore::PeerConnection00HandlerInternal::removeStream):
+ (WebCore::PeerConnection00HandlerInternal::stop):
+ (WebCore::PeerConnection00HandlerInternal::didGenerateICECandidate):
+ (WebCore::PeerConnection00HandlerInternal::didChangeReadyState):
+ (WebCore::PeerConnection00HandlerInternal::didChangeICEState):
+ (WebCore::PeerConnection00HandlerInternal::didAddRemoteStream):
+ (WebCore::PeerConnection00HandlerInternal::didRemoveRemoteStream):
+ * bridge/PeerConnection00HandlerInternal.h: Copied from Source/WebCore/platform/mediastream/PeerConnection00Handler.h.
+ (WebKit):
+ (WebCore):
+ (PeerConnection00HandlerInternal):
+ * public/platform/WebKitPlatformSupport.h:
+ (WebKit):
+ (WebKit::WebKitPlatformSupport::createPeerConnection00Handler):
+ * public/platform/WebPeerConnection00Handler.h: Added.
+ (WebKit):
+ (WebPeerConnection00Handler):
+ (WebKit::WebPeerConnection00Handler::~WebPeerConnection00Handler):
+ * public/platform/WebPeerConnection00HandlerClient.h: Added.
+ (WebKit):
+ (WebPeerConnection00HandlerClient):
+ (WebKit::WebPeerConnection00HandlerClient::~WebPeerConnection00HandlerClient):
+ * src/AssertMatchingEnums.cpp:
+
+2012-03-28 James Robinson <jamesr@chromium.org>
+
+ [chromium] Compositor visibility setting must be updated even if not actively compositing
+ https://bugs.webkit.org/show_bug.cgi?id=82406
+
+ Reviewed by Adrienne Walker.
+
+ Propagate the visibility bit to the WebLayerTreeView even when compositing is inactive.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setVisibilityState):
+
+2012-03-28 Fady Samuel <fsamuel@chromium.org>
+
+ [Chromium] Enable Viewport define by default
+ https://bugs.webkit.org/show_bug.cgi?id=79514
+
+ Reviewed by Darin Fisher.
+
+ * features.gypi:
+
+2012-03-27 James Robinson <jamesr@chromium.org>
+
+ [chromium] Transfer wheel fling via WebCompositorInputHandlerClient
+ https://bugs.webkit.org/show_bug.cgi?id=81740
+
+ Reviewed by Adrienne Walker.
+
+ Adds a path for transfering an active wheel fling animation out to the embedder from the compositor and back in
+ to a WebViewImpl via the embedder. This is used when we start a wheel fling animation on the compositor thread
+ but then hit a condition that we can't handle from the compositor, such as registered wheel event listeners or a
+ scrollable area we can't handle.
+
+ New tests added to WebCompositorInputHandlerTest for the transfering logic.
+
+ * public/WebActiveWheelFlingParameters.h: Copied from Source/WebKit/chromium/public/WebCompositorInputHandlerClient.h.
+ (WebKit):
+ (WebActiveWheelFlingParameters):
+ (WebKit::WebActiveWheelFlingParameters::WebActiveWheelFlingParameters):
+ * public/WebCompositorInputHandlerClient.h:
+ (WebKit):
+ (WebCompositorInputHandlerClient):
+ (WebKit::WebCompositorInputHandlerClient::transferActiveWheelFlingAnimation):
+ * public/WebView.h:
+ (WebKit):
+ (WebView):
+ * src/WebCompositorInputHandlerImpl.cpp:
+ (WebKit::WebCompositorInputHandlerImpl::handleGestureFling):
+ (WebKit::WebCompositorInputHandlerImpl::animate):
+ (WebKit::WebCompositorInputHandlerImpl::cancelCurrentFling):
+ (WebKit::WebCompositorInputHandlerImpl::scrollBy):
+ * src/WebCompositorInputHandlerImpl.h:
+ (WebCore):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::transferActiveWheelFlingAnimation):
+ (WebKit):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+ * tests/WebCompositorInputHandlerImplTest.cpp:
+ (WebKit::MockWebCompositorInputHandlerClient::MockWebCompositorInputHandlerClient):
+ (MockWebCompositorInputHandlerClient):
+ (WebKit::TEST):
+ (WebKit::WebCompositorInputHandlerImplTest::WebCompositorInputHandlerImplTest):
+ (WebKit::WebCompositorInputHandlerImplTest::~WebCompositorInputHandlerImplTest):
+ (WebCompositorInputHandlerImplTest):
+ (WebKit::TEST_F):
+ (WebKit):
+
+2012-03-27 James Robinson <jamesr@chromium.org>
+
+ [chromium] Send wheel events to main thread even if we think nothing is scrollable
+ https://bugs.webkit.org/show_bug.cgi?id=82408
+
+ Reviewed by Adrienne Walker.
+
+ * src/WebCompositorInputHandlerImpl.cpp:
+ (WebKit::WebCompositorInputHandlerImpl::handleInputEventInternal):
+
+2012-03-27 Nat Duca <nduca@chromium.org>
+
+ [chromium] Route monotonic clock up from compositor
+ https://bugs.webkit.org/show_bug.cgi?id=82154
+
+ Reviewed by James Robinson.
+
+ * public/WebWidget.h:
+ (WebKit::WebWidget::animate):
+ * src/WebLayerTreeViewImpl.cpp:
+ (WebKit::WebLayerTreeViewImpl::updateAnimations):
+ * src/WebLayerTreeViewImpl.h:
+ (WebLayerTreeViewImpl):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::animate):
+ (WebKit::WebViewImpl::updateAnimations):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+ * tests/FakeCCLayerTreeHostClient.h:
+ (WebCore::FakeCCLayerTreeHostClient::updateAnimations):
+
+2012-03-27 James Robinson <jamesr@chromium.org>
+
+ webkit_unit_tests crashing on chromium lion in CCLayerTreeHostTestCompositeAndReadbackWhileInvisible
+ https://bugs.webkit.org/show_bug.cgi?id=82382
+
+ Reviewed by Adrienne Walker.
+
+ Use UnsignedWithZeroKeyHashTraits trait for the HashSet<WebGLId> m_usedTextures in
+ CompositorFakeWebGraphicsContext3DWithTextureTracking. This set is used to track all textures that are bound in
+ a given context during a test. During ..CompositeAndReadback.. we bind texture id 0. By default, HashSet<T>
+ where T is an unsigned does not allow 0 as a value. WebGLId is typedef'd to unsigned.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (CompositorFakeWebGraphicsContext3DWithTextureTracking):
+
+2012-03-27 James Robinson <jamesr@chromium.org>
+
+ webkit_unit_tests crashing on chromium lion in ScrollbarLayerChromiumTest.resolveScrollLayerPointer
+ https://bugs.webkit.org/show_bug.cgi?id=82381
+
+ Reviewed by Adrienne Walker.
+
+ Use the mock scrollbar theme for this unit test. The real ScrollbarThemeMac isn't compatible with the mocks this
+ test uses and the test isn't designed to cover the theming code, only code inside the compositor.
+
+ * tests/ScrollbarLayerChromiumTest.cpp:
+ (WebCore::TEST):
+
+2012-03-27 Dirk Pranke <dpranke@chromium.org>
+
+ Unreviewed, rolling out r112339.
+ http://trac.webkit.org/changeset/112339
+ https://bugs.webkit.org/show_bug.cgi?id=82354
+
+ webkit_unit_tests crashing on chromium mac bots
+
+ * src/AssociatedURLLoader.cpp:
+ (AssociatedURLLoader::ClientAdapter):
+ * tests/AssociatedURLLoaderTest.cpp:
+ (WebKit::AssociatedURLLoaderTest::TearDown):
+ (WebKit):
+ (WebKit::TEST_F):
+
+2012-03-27 Kausalya Madhusudhanan <kmadhusu@chromium.org>
+
+ [Coverity] Address some uninitialized constructor values.
+ https://bugs.webkit.org/show_bug.cgi?id=82376
+
+ Reviewed by James Robinson.
+
+ New tests are not required since I did not modify any code behavior. I just initialized the class member variables in the constructor.
+
+ * src/WebCompositorInputHandlerImpl.cpp:
+ (WebCore::PlatformGestureToCCGestureAdapter::PlatformGestureToCCGestureAdapter):
+
+2012-03-27 Dirk Pranke <dpranke@chromium.org>
+
+ Roll chromium DEPS to r129300.
+
+ Unreviewed, deps change.
+
+ * DEPS:
+
+2012-03-27 Bill Budge <bbudge@chromium.org>
+
+ AssociatedURLLoader does not support Cross Origin Redirects when using
+ Access Control.
+ https://bugs.webkit.org/show_bug.cgi?id=82354
+
+ AssociatedURLLoader's internal adapter now overrides didFailRedirectCheck,
+ which cancels the load, causing didFail to notify the client that the
+ load failed. AssociatedURLLoaderTest adds test cases for CORS requests
+ that receive redirects and pass or fail the redirect access check.
+
+ Reviewed by Adam Barth.
+
+ * src/AssociatedURLLoader.cpp:
+ (AssociatedURLLoader::ClientAdapter):
+ (WebKit::AssociatedURLLoader::ClientAdapter::didFailRedirectCheck):
+ (WebKit):
+ * tests/AssociatedURLLoaderTest.cpp:
+ (WebKit::TEST_F):
+
+2012-03-27 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Unknown transforms should be treated as non-axis aligned on main thread
+ https://bugs.webkit.org/show_bug.cgi?id=82370
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostCommonTest.cpp:
+ (WebKitTests::TEST):
+
+2012-03-27 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Rename opaqueContentsRegion() to visibleContentOpaqueRegion()
+ https://bugs.webkit.org/show_bug.cgi?id=81689
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::TestLayerChromium::opaqueVisibleContents):
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebCore::TestContentLayerChromium::opaqueVisibleContents):
+ (WebCore::TestContentLayerImpl::opaqueVisibleContents):
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::TEST):
+
+2012-03-27 Dana Jansens <danakj@chromium.org>
+
+ [chromium] A unit test to verify clipping is honored when moving occlusion to parent surface
+ https://bugs.webkit.org/show_bug.cgi?id=81783
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebCore::CCOcclusionTrackerTestSurfaceOcclusionTranslatesToParent::runMyTest):
+ (WebCore):
+ (CCOcclusionTrackerTestSurfaceOcclusionTranslatesWithClipping):
+ (WebCore::CCOcclusionTrackerTestSurfaceOcclusionTranslatesWithClipping::runMyTest):
+
+2012-03-27 James Robinson <jamesr@chromium.org>
+
+ Scrollable plugins not registered properly in ScrollingCoordinator
+ https://bugs.webkit.org/show_bug.cgi?id=82163
+
+ Reviewed by Anders Carlsson.
+
+ Since ScrollbarGroups are ScrollableAreas, they need to be able to report their bounds for the
+ ScrollingCoordinator's calculateNonFastScrollableRegion. This also changes ScrollbarGroups to only be registered
+ as ScrollableAreas on the FrameView's set when they actually have Scrollbars.
+
+ * src/ScrollbarGroup.cpp:
+ (WebKit::ScrollbarGroup::ScrollbarGroup):
+ (WebKit::ScrollbarGroup::~ScrollbarGroup):
+ (WebKit::ScrollbarGroup::scrollbarCreated):
+ (WebKit::ScrollbarGroup::scrollbarDestroyed):
+ (WebKit::ScrollbarGroup::setFrameRect):
+ (WebKit):
+ (WebKit::ScrollbarGroup::scrollableAreaBoundingBox):
+ * src/ScrollbarGroup.h:
+ (ScrollbarGroup):
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::reportGeometry):
+ (WebKit):
+ (WebKit::WebPluginContainerImpl::scrollbarGroup):
+ * src/WebPluginContainerImpl.h:
+ (WebPluginContainerImpl):
+
+2012-03-27 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Make use of common animation unit test methods
+ https://bugs.webkit.org/show_bug.cgi?id=82357
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCAnimationTestCommon.cpp:
+ (WebKitTests::addAnimatedTransformToController):
+ (WebKitTests):
+ * tests/CCAnimationTestCommon.h:
+ (WebKitTests):
+ * tests/CCLayerTreeHostCommonTest.cpp:
+ (WebKitTests::TEST):
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebKitTests):
+ (WebKitTests::CCOcclusionTrackerTestAnimationOpacity1OnMainThread::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestAnimationOpacity0OnMainThread::runMyTest):
+ (WebKitTests::CCOcclusionTrackerTestAnimationTranslateOnMainThread::runMyTest):
+
+2012-03-27 Sami Kyostila <skyostil@chromium.org>
+
+ [chromium] Add TextureCopier for copying texture contents
+ https://bugs.webkit.org/show_bug.cgi?id=80870
+
+ Reviewed by Stephen White.
+
+ Add new test for TextureCopier.
+
+ * WebKit.gypi:
+ * tests/Canvas2DLayerChromiumTest.cpp:
+ * tests/TextureCopierTest.cpp: Added.
+ * tests/TiledLayerChromiumTest.cpp:
+ (FakeTextureCopier):
+ (WTF::FakeTextureCopier::copyTexture):
+ (WTF):
+ (WTF::TEST):
+
+2012-03-27 Stephen White <senorblanco@chromium.org>
+
+ [chromium] Fix filter context usage in webkit_unit_tests.
+ https://bugs.webkit.org/show_bug.cgi?id=82349
+
+ Reviewed by James Robinson.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::CCLayerTreeHostTestLayerOcclusionWithFilters::beginTest):
+ Cancel request for filter context after test run.
+ (WTF::TEST_F):
+ * tests/CCOcclusionTrackerTest.cpp:
+ Re-enable CCLayerTreeHostTestSetSingleLostContext.runMultiThread.
+ (WebCore::CCOcclusionTrackerTest::TearDown):
+ Cancel request for filter context after test run.
+
+2012-03-26 Stephen White <senorblanco@chromium.org>
+
+ Disable CCLayerTreeHostTestSetSingleLostContext.runMultiThread.
+ https://bugs.webkit.org/show_bug.cgi?id=82285
+
+ Reviewed by James Robinson.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::TEST_F):
+
+2012-03-26 Andrew Scherkus <scherkus@chromium.org>
+
+ [chromium] Remove WebMediaElement from Chromium WebKit API.
+ https://bugs.webkit.org/show_bug.cgi?id=82277
+
+ Reviewed by James Robinson.
+
+ This was added in r63859 but is no longer used by anyone.
+
+ * WebKit.gyp:
+ * public/WebMediaElement.h: Removed.
+ * src/WebMediaElement.cpp: Removed.
+
+2012-03-26 Scott Byer <scottbyer@chromium.org>
+
+ Enable layout testing of the scroll animator.
+ https://bugs.webkit.org/show_bug.cgi?id=81858
+ Add a call to the InternalSettings that layout tests can use to
+ turn on scroll animation. Enable animation updates for the
+ Chromium platform DRT when scroll animation has been turned on in
+ a test. This should be a no-op for all current layout tests.
+
+ Reviewed by James Robinson.
+
+ * public/WebSettings.h:
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::scrollAnimatorEnabled):
+ (WebKit):
+ * src/WebSettingsImpl.h:
+ (WebSettingsImpl):
+
+2012-03-26 Nat Duca <nduca@chromium.org>
+
+ [chromium] Add isInputThrottled/didBecomeReadyForAdditionalInput to WebWidget
+ https://bugs.webkit.org/show_bug.cgi?id=82265
+
+ In threaded compositing mode, the WebWidget is self-scheduled,
+ receiving damage and processing it without forwarding that damage
+ up to the embedding WebWidgetClient. In Chromium's case, the
+ client uses the presence of damage to perform input flow
+ control. This patch exposes the need for input flow control to the
+ embedder, while keeping the actual logic about what exactly
+ warrants input flow control inside the implementation.
+
+ Reviewed by James Robinson.
+
+ * public/WebWidget.h:
+ (WebWidget):
+ (WebKit::WebWidget::isInputThrottled):
+ * public/WebWidgetClient.h:
+ (WebWidgetClient):
+ (WebKit::WebWidgetClient::didBecomeReadyForAdditionalInput):
+ * src/WebLayerTreeView.cpp:
+ (WebKit::WebLayerTreeView::commitRequested):
+ (WebKit):
+ * src/WebLayerTreeViewImpl.cpp:
+ (WebKit::WebLayerTreeViewImpl::didCommit):
+ (WebKit):
+ * src/WebLayerTreeViewImpl.h:
+ (WebLayerTreeViewImpl):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::isInputThrottled):
+ (WebKit):
+ (WebKit::WebViewImpl::didCommit):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::MockLayerTreeHostClient::didCommit):
+ (MockLayerTreeHostClient):
+ * tests/FakeCCLayerTreeHostClient.h:
+ (FakeCCLayerTreeHostClient):
+
+2012-03-26 Vangelis Kokkevis <vangelis@chromium.org>
+
+ [chromium] Simplify and fix CCLayerSorter
+ https://bugs.webkit.org/show_bug.cgi?id=82114
+
+ Adjustments to the CCLayerSorter unit tests to account for API changes in the
+ CCLayerSorter class.
+
+ Reviewed by Kenneth Russell.
+
+ * tests/CCLayerSorterTest.cpp:
+ (WebCore):
+ (WebCore::TEST):
+
+2012-03-26 James Robinson <jamesr@chromium.org>
+
+ Scrollable plugins not registered properly in ScrollingCoordinator
+ https://bugs.webkit.org/show_bug.cgi?id=82163
+
+ Reviewed by Anders Carlsson.
+
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::scrollable):
+ * src/WebPluginContainerImpl.h:
+ (WebPluginContainerImpl):
+
+2012-03-26 W. James MacLean <wjmaclean@chromium.org>
+
+ [chromium] Change handleGestureFling() to use CCInputHandlerClient::Wheel.
+ https://bugs.webkit.org/show_bug.cgi?id=82133
+
+ Reviewed by James Robinson.
+
+ * src/WebCompositorInputHandlerImpl.cpp:
+ (WebKit::WebCompositorInputHandlerImpl::handleGestureFling):
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::TEST_F):
+
+2012-03-26 Terry Anderson <tdanderson@chromium.org>
+
+ [chromium] Allow the viewport meta tag to be disabled for testing purposes
+ https://bugs.webkit.org/show_bug.cgi?id=81940
+
+ Reviewed by Adam Barth.
+
+ * public/WebSettings.h:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::dispatchViewportPropertiesDidChange):
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::WebSettingsImpl):
+ (WebKit::WebSettingsImpl::setViewportEnabled):
+ (WebKit):
+ * src/WebSettingsImpl.h:
+ (WebSettingsImpl):
+ (WebKit::WebSettingsImpl::viewportEnabled):
+
+2012-03-25 Nat Duca <nduca@chromium.org>
+
+ [chromium] Route willBeginFrame from compositor to WebWidget
+ https://bugs.webkit.org/show_bug.cgi?id=82171
+
+ Reviewed by Darin Fisher.
+
+ * public/WebWidgetClient.h:
+ (WebWidgetClient):
+ (WebKit::WebWidgetClient::willBeginCompositorFrame):
+ * src/WebLayerTreeViewImpl.cpp:
+ (WebKit::WebLayerTreeViewImpl::willBeginFrame):
+ (WebKit):
+ * src/WebLayerTreeViewImpl.h:
+ (WebLayerTreeViewImpl):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::willBeginFrame):
+ (WebKit):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::MockLayerTreeHostClient::willBeginFrame):
+ (MockLayerTreeHostClient):
+ * tests/FakeCCLayerTreeHostClient.h:
+ (WebCore::FakeCCLayerTreeHostClient::willBeginFrame):
+
+2012-03-25 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Layers with animating transforms should prepaint even if they are not visible yet
+ https://bugs.webkit.org/show_bug.cgi?id=82117
+
+ Reviewed by Adrienne Walker.
+
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::FakeTiledLayerChromium::FakeTiledLayerChromium):
+ (WTF::FakeTiledLayerChromium::tileSize):
+ (FakeTiledLayerChromium):
+ (WTF::TEST):
+ (WTF):
+ (WTF::idlePaintRepeat):
+ (WTF::testHaveOuterTiles):
+
+2012-03-24 Nat Duca <nduca@chromium.org>
+
+ [chromium] Instrument gesture animations with async traces
+ https://bugs.webkit.org/show_bug.cgi?id=82076
+
+ Reviewed by Adrienne Walker.
+
+ * src/WebCompositorInputHandlerImpl.cpp:
+ (WebCore::PlatformGestureToCCGestureAdapter::debugName):
+ (PlatformGestureToCCGestureAdapter):
+
+2012-03-23 Shawn Singh <shawnsingh@chromium.org>
+
+ [chromium] Incorrect replica originTransform used in CCDamageTracker
+ https://bugs.webkit.org/show_bug.cgi?id=82118
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCDamageTrackerTest.cpp:
+ (WebKitTests::TEST_F):
+ (WebKitTests):
+
+2012-03-23 Dana Jansens <danakj@chromium.org>
+
+ [chromium] When prepainting fails, tiles dirty rects may be cleared
+ https://bugs.webkit.org/show_bug.cgi?id=82107
+
+ Reviewed by Adrienne Walker.
+
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::FakeTextureAllocator::createTexture):
+ (WTF::FakeLayerTextureUpdater::Texture::updateRect):
+ (FakeCCTiledLayerImpl):
+ (WTF::FakeCCTiledLayerImpl::hasTextureIdForTileAt):
+ (WTF::TEST):
+ (WTF):
+
+2012-03-23 W. James MacLean <wjmaclean@chromium.org>
+
+ [chromium] CCLayerTreeHostImpl::scrollBegin() should return ScrollFailed for CCInputHandlerClient::Gesture type when wheel handlers found.
+ https://bugs.webkit.org/show_bug.cgi?id=82106
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKit::TEST_F):
+
+2012-03-23 Shawn Singh <shawnsingh@chromium.org>
+
+ [chromium] Fix race bug that clobbers CCLayerImpl updateRect
+ https://bugs.webkit.org/show_bug.cgi?id=82109
+
+ Reviewed by Dirk Pranke.
+
+ * tests/LayerChromiumTest.cpp:
+
+2012-03-23 Daniel Cheng <dcheng@chromium.org>
+
+ [chromium] Support file drag out using DataTransferItemList::add(File)
+ https://bugs.webkit.org/show_bug.cgi?id=81261
+
+ Reviewed by Tony Chang.
+
+ Original patch by Varun Jain <varunjain@chromium.org>.
+ I've updated the original patch to add some asserts for conditions we shouldn't encounter as
+ well as removing some redundant null checks.
+
+ * src/WebDragData.cpp:
+ (WebKit::WebDragData::items):
+
+2012-03-23 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Record painted pixel counts for measuring effectiveness of per-tile painting
+ https://bugs.webkit.org/show_bug.cgi?id=82057
+
+ Reviewed by Adrienne Walker.
+
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::TEST):
+ (WTF):
+
+2012-03-23 Adrienne Walker <enne@google.com>
+
+ [chromium] Fix scrollbarLayerLostContext flaky test crash on 10.6
+ https://bugs.webkit.org/show_bug.cgi?id=82062
+
+ Reviewed by James Robinson.
+
+ Override the paint function so that it becomes a no-op. Painting
+ scrollbars on the impl thread is not yet supported on platforms other
+ than Linux or ChromeOS.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (ScrollbarLayerFakePaint):
+ (WebKitTests::ScrollbarLayerFakePaint::create):
+ (WebKitTests::ScrollbarLayerFakePaint::paint):
+ (WebKitTests::ScrollbarLayerFakePaint::ScrollbarLayerFakePaint):
+ (WebKitTests):
+ (WebKitTests::TEST_F):
+
+2012-03-23 Tommy Widenflycht <tommyw@google.com>
+
+ [chromium] MediaStream API (JSEP): Extending WebMediaStreamCenter
+ https://bugs.webkit.org/show_bug.cgi?id=81924
+
+ Reviewed by Adam Barth.
+
+ Adding the two constructSDP methods.
+
+ * bridge/MediaStreamCenter.cpp:
+ (WebCore::MediaStreamCenter::constructSDP):
+ (WebCore):
+ * bridge/MediaStreamCenterInternal.cpp:
+ (WebCore::MediaStreamCenterInternal::constructSDP):
+ (WebCore):
+ * bridge/MediaStreamCenterInternal.h:
+ (WebCore):
+ (MediaStreamCenterInternal):
+ * public/platform/WebMediaStreamCenter.h:
+ (WebKit):
+ (WebMediaStreamCenter):
+ (WebKit::WebMediaStreamCenter::constructSDP):
+
+2012-03-23 Jonathan Backer <backer@chromium.org>
+
+ [chromium] Remove unused variables from unittest.
+ https://bugs.webkit.org/show_bug.cgi?id=82054
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::TEST_F):
+
+2012-03-23 Ryosuke Niwa <rniwa@webkit.org>
+
+ Chromium DEPS roll r127913:r128426.
+
+ * DEPS:
+
+2012-03-22 Shawn Singh <shawnsingh@chromium.org>
+
+ [chromium] Target surface should be damaged for a new layers even when layer had no changes
+ https://bugs.webkit.org/show_bug.cgi?id=81879
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCDamageTrackerTest.cpp:
+ (WebKitTests::TEST_F):
+ (WebKitTests):
+
+2012-03-22 Adrienne Walker <enne@google.com>
+
+ [chromium] Unreviewed, fix LayerRendererChromiumTest debug unit test errors
+ https://bugs.webkit.org/show_bug.cgi?id=81823
+
+ * tests/LayerRendererChromiumTest.cpp:
+ (FakeLayerRendererChromiumClient):
+
+2012-03-22 Michal Mocny <mmocny@google.com>
+
+ [chromium] Removing failing unit test - CCLayerTreeHostImplTest.visibilityChangeResetsDamage
+ https://bugs.webkit.org/show_bug.cgi?id=82003
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::TEST_F):
+
+2012-03-22 Robert Kroeger <rjkroege@chromium.org>
+
+ [chromium] Halt in progress flings on receipt of key events
+ https://bugs.webkit.org/show_bug.cgi?id=81988
+
+ Reviewed by Adrienne Walker.
+
+ * src/WebCompositorInputHandlerImpl.cpp:
+ (WebKit::WebCompositorInputHandlerImpl::handleInputEventInternal):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::keyEvent):
+
+2012-03-22 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Skip frames when checkerboarding an animation
+ https://bugs.webkit.org/show_bug.cgi?id=81716
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::TEST_F):
+ * tests/CCSchedulerStateMachineTest.cpp:
+ (WebCore::TEST):
+ (WebCore):
+ * tests/CCSchedulerTest.cpp:
+ (WebKitTests::FakeCCSchedulerClient::reset):
+ (WebKitTests::FakeCCSchedulerClient::numDraws):
+ (WebKitTests::FakeCCSchedulerClient::scheduledActionDrawAndSwapIfPossible):
+ (FakeCCSchedulerClient):
+ (WebKitTests::FakeCCSchedulerClient::scheduledActionDrawAndSwapForced):
+ (WebKitTests::FakeCCSchedulerClient::setDrawSuccess):
+ (WebKitTests::TEST):
+ (WebKitTests::SchedulerClientThatSetNeedsDrawInsideDraw::SchedulerClientThatSetNeedsDrawInsideDraw):
+ (WebKitTests::SchedulerClientThatSetNeedsDrawInsideDraw::scheduledActionDrawAndSwapIfPossible):
+ (WebKitTests::SchedulerClientThatSetNeedsDrawInsideDraw::scheduledActionDrawAndSwapForced):
+ (SchedulerClientThatSetNeedsDrawInsideDraw):
+ (WebKitTests):
+ (WebKitTests::SchedulerClientThatSetNeedsCommitInsideDraw::SchedulerClientThatSetNeedsCommitInsideDraw):
+ (WebKitTests::SchedulerClientThatSetNeedsCommitInsideDraw::scheduledActionDrawAndSwapIfPossible):
+ (WebKitTests::SchedulerClientThatSetNeedsCommitInsideDraw::scheduledActionDrawAndSwapForced):
+ (SchedulerClientThatSetNeedsCommitInsideDraw):
+ * tests/CCSchedulerTestCommon.h:
+ (FakeCCFrameRateController):
+ (WebKitTests::FakeCCFrameRateController::FakeCCFrameRateController):
+ (WebKitTests::FakeCCFrameRateController::numFramesPending):
+ (WebKitTests):
+
+2012-03-22 W. James MacLean <wjmaclean@chromium.org>
+
+ [chromium] Force update of nonFastScrollableRegion if target CCLayerImpl has been freshly created.
+ https://bugs.webkit.org/show_bug.cgi?id=81968
+
+ Reviewed by Adrienne Walker.
+
+ * tests/TreeSynchronizerTest.cpp:
+ (WebKitTests::expectTreesAreIdentical):
+ (WebKitTests::TEST):
+ (WebKitTests):
+
+2012-03-22 Michal Mocny <mmocny@google.com>
+
+ [chromium] LayerRendererChromium should use GpuMemoryAllocationChanged callback to explicitly manage framebuffer.
+ https://bugs.webkit.org/show_bug.cgi?id=81823
+
+ Reviewed by Adrienne Walker.
+
+ * WebKit.gypi:
+ * tests/LayerRendererChromiumTest.cpp: Added.
+ (FrameCountingMemoryAllocationSettingContext):
+ (FrameCountingMemoryAllocationSettingContext::FrameCountingMemoryAllocationSettingContext):
+ (FrameCountingMemoryAllocationSettingContext::prepareTexture):
+ (FrameCountingMemoryAllocationSettingContext::setMemoryAllocationChangedCallbackCHROMIUM):
+ (FrameCountingMemoryAllocationSettingContext::getString):
+ (FrameCountingMemoryAllocationSettingContext::frameCount):
+ (FrameCountingMemoryAllocationSettingContext::setMemoryAllocation):
+ (FakeLayerRendererChromiumClient):
+ (FakeLayerRendererChromiumClient::FakeLayerRendererChromiumClient):
+ (FakeLayerRendererChromiumClient::viewportSize):
+ (FakeLayerRendererChromiumClient::settings):
+ (FakeLayerRendererChromiumClient::rootLayer):
+ (FakeLayerRendererChromiumClient::didLoseContext):
+ (FakeLayerRendererChromiumClient::onSwapBuffersComplete):
+ (FakeLayerRendererChromiumClient::setFullRootLayerDamage):
+ (FakeLayerRendererChromiumClient::setFullRootLayerDamageCount):
+ (FakeLayerRendererChromium):
+ (FakeLayerRendererChromium::FakeLayerRendererChromium):
+ (LayerRendererChromiumTest):
+ (LayerRendererChromiumTest::LayerRendererChromiumTest):
+ (LayerRendererChromiumTest::SetUp):
+ (LayerRendererChromiumTest::swapBuffers):
+ (TEST_F):
+
+2012-03-22 Shawn Singh <shawnsingh@chromium.org>
+
+ [chromium] Make CCDamageTracker robust to empty layer lists
+ https://bugs.webkit.org/show_bug.cgi?id=81831
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCDamageTrackerTest.cpp:
+ (WebKitTests::emulateDrawingOneFrame): modified args passed to damage tracker on update.
+
+ (WebKitTests::TEST_F): Added another unit test.
+ (WebKitTests):
+
+2012-03-22 Bernhard Bauer <bauerb@google.com>
+
+ [chromium] Plug-in failing to load shouldn't say "Missing Plug-in"
+ https://bugs.webkit.org/show_bug.cgi?id=81907
+
+ Reviewed by Adam Barth.
+
+ Adding a MissingPluginText value to WebLocalizedString which can be used to override the "Missing Plug-in" message.
+
+ * public/platform/WebLocalizedString.h:
+ * src/LocalizedStrings.cpp:
+ (WebCore::missingPluginText):
+
+2012-03-22 Adrienne Walker <enne@google.com>
+
+ [chromium] Fix scrollbar layers holding onto invalid textures after lost context
+ https://bugs.webkit.org/show_bug.cgi?id=81841
+
+ Reviewed by James Robinson.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::TEST_F):
+ (WebKitTests):
+
+2012-03-22 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Early out in a new prepareToDraw() step if checkerboarding an accelerated animation in order to skip the frame
+ https://bugs.webkit.org/show_bug.cgi?id=81437
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCAnimationTestCommon.cpp:
+ (WebCore):
+ (WebCore::addAnimatedTransform):
+ (WebKitTests::addOpacityTransitionToLayer):
+ (WebKitTests):
+ (WebKitTests::addAnimatedTransformToLayer):
+ * tests/CCAnimationTestCommon.h:
+ (WebCore):
+ (WebKitTests):
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::TEST_F):
+ (DidDrawCheckLayer):
+ (WebKitTests::DidDrawCheckLayer::DidDrawCheckLayer):
+ (MissingTextureAnimatingLayer):
+ (WebKitTests::MissingTextureAnimatingLayer::create):
+ (WebKitTests::MissingTextureAnimatingLayer::MissingTextureAnimatingLayer):
+ (WebKitTests):
+ (WebKitTests::BlendStateCheckLayer::appendQuads):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::TestHooks::prepareToDrawOnCCThread):
+ (WTF::MockLayerTreeHostImpl::prepareToDraw):
+ (MockLayerTreeHostImpl):
+ (WTF::MockLayerTreeHostImpl::drawLayers):
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore::appendQuads):
+ * tests/CCSolidColorLayerImplTest.cpp:
+ (CCLayerTestCommon::TEST):
+ * tests/CCTiledLayerImplTest.cpp:
+ (CCLayerTestCommon::TEST):
+ (CCLayerTestCommon::getQuads):
+ * tests/MockCCQuadCuller.h:
+ (WebCore::MockCCQuadCuller::append):
+
+2012-03-22 W. James MacLean <wjmaclean@chromium.org>
+
+ Rename touchpad fling curve, add curve parameters to constructor.
+ https://bugs.webkit.org/show_bug.cgi?id=81820
+
+ Reviewed by Adrienne Walker.
+
+ * src/WebCompositorInputHandlerImpl.cpp:
+ (WebKit::WebCompositorInputHandlerImpl::handleGestureFling):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::gestureEvent):
+ * tests/PlatformGestureCurveTest.cpp:
+
+2012-03-21 Ian Vollick <vollick@chromium.org>
+
+ [chromium] timing functions are getting incorrectly applied for accelerated css transitions
+ https://bugs.webkit.org/show_bug.cgi?id=81692
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCAnimationTestCommon.cpp:
+ (WebCore::addOpacityTransition):
+ (WebKitTests::addOpacityTransitionToController):
+ (WebKitTests::addOpacityTransitionToLayer):
+ * tests/CCAnimationTestCommon.h:
+ (WebKitTests):
+ * tests/CCLayerAnimationControllerTest.cpp:
+ (WebKitTests::TEST):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::CCLayerTreeHostTest::dispatchAddInstantAnimation):
+ (WTF::CCLayerTreeHostTest::dispatchAddAnimation):
+ (WTF::TEST_F):
+ (WTF):
+ (CCLayerTreeHostTestAddAnimationWithTimingFunction):
+ (WTF::CCLayerTreeHostTestAddAnimationWithTimingFunction::CCLayerTreeHostTestAddAnimationWithTimingFunction):
+ (WTF::CCLayerTreeHostTestAddAnimationWithTimingFunction::beginTest):
+ (WTF::CCLayerTreeHostTestAddAnimationWithTimingFunction::animateLayers):
+ (WTF::CCLayerTreeHostTestAddAnimationWithTimingFunction::afterTest):
+
+2012-03-22 Kenichi Ishibashi <bashi@chromium.org>
+
+ [Chromium] Should check m_socket in SocketStreamHandleInternal::close()
+ https://bugs.webkit.org/show_bug.cgi?id=81860
+
+ Reviewed by Kent Tamura.
+
+ m_socket could be NULL if WebSocket::resume() is called after SocketStreamHandle::didClose() is called.
+ This could happen when the page shows a popup dialog (by using alert()) immediately after closing an WebSocket object.
+
+ * src/SocketStreamHandle.cpp:
+ (WebCore::SocketStreamHandleInternal::close): Ensures m_socket is not NULL.
+
+2012-03-21 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r111616.
+ http://trac.webkit.org/changeset/111616
+ https://bugs.webkit.org/show_bug.cgi?id=81862
+
+ broke chromium mac (Requested by eae on #webkit).
+
+ * tests/CCAnimationTestCommon.cpp:
+ * tests/CCAnimationTestCommon.h:
+ (WebKitTests):
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKit::TEST_F):
+ (DidDrawCheckLayer):
+ (WebKit::DidDrawCheckLayer::DidDrawCheckLayer):
+ (WebKit::BlendStateCheckLayer::appendQuads):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::MockLayerTreeHostImpl::drawLayers):
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore::appendQuads):
+ * tests/CCSolidColorLayerImplTest.cpp:
+ (CCLayerTestCommon::TEST):
+ * tests/CCTiledLayerImplTest.cpp:
+ (CCLayerTestCommon::TEST):
+ (CCLayerTestCommon::getQuads):
+ * tests/MockCCQuadCuller.h:
+ (WebCore::MockCCQuadCuller::append):
+
+2012-03-21 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Early out in a new prepareToDraw() step if checkerboarding an accelerated animation in order to skip the frame
+ https://bugs.webkit.org/show_bug.cgi?id=81437
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCAnimationTestCommon.cpp:
+ (WebCore):
+ (WebCore::addAnimatedTransform):
+ (WebKitTests::addOpacityTransitionToLayer):
+ (WebKitTests):
+ (WebKitTests::addAnimatedTransformToLayer):
+ * tests/CCAnimationTestCommon.h:
+ (WebCore):
+ (WebKitTests):
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKitTests::TEST_F):
+ (DidDrawCheckLayer):
+ (WebKitTests::DidDrawCheckLayer::DidDrawCheckLayer):
+ (MissingTextureAnimatingLayer):
+ (WebKitTests::MissingTextureAnimatingLayer::create):
+ (WebKitTests::MissingTextureAnimatingLayer::MissingTextureAnimatingLayer):
+ (WebKitTests):
+ (WebKitTests::BlendStateCheckLayer::appendQuads):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::TestHooks::prepareToDrawOnCCThread):
+ (WTF::MockLayerTreeHostImpl::prepareToDraw):
+ (MockLayerTreeHostImpl):
+ (WTF::MockLayerTreeHostImpl::drawLayers):
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore::appendQuads):
+ * tests/CCSolidColorLayerImplTest.cpp:
+ (CCLayerTestCommon::TEST):
+ * tests/CCTiledLayerImplTest.cpp:
+ (CCLayerTestCommon::TEST):
+ (CCLayerTestCommon::getQuads):
+ * tests/MockCCQuadCuller.h:
+ (WebCore::MockCCQuadCuller::append):
+
+2012-03-21 Alexandru Chiculita <achicu@adobe.com>
+
+ [CSS Shaders] Make CSS Shaders compile on Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=81435
+
+ Reviewed by Stephen White.
+
+ I've added the ENABLE_CSS_SHADERS flag by default, but kept CSS Shaders disabled using the runtime flag.
+
+ This change adds a new public API to WebSettings with syntax void setExperimentalCSSCustomFilterEnabled(bool).
+
+ * features.gypi:
+ * public/WebSettings.h:
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::setExperimentalCSSCustomFilterEnabled):
+ (WebKit):
+ * src/WebSettingsImpl.h:
+ (WebSettingsImpl):
+
+2012-03-21 David Reveman <reveman@chromium.org>
+
+ [Chromium] GL_EXT_occlusion_query_boolean and GL_CHROMIUM_command_buffer_query support.
+ https://bugs.webkit.org/show_bug.cgi?id=80988
+
+ Reviewed by Adrienne Walker.
+
+ Expose EXT_occlusion_query API to WebKit compositor.
+
+ * src/Extensions3DChromium.cpp:
+ (WebCore::Extensions3DChromium::createQueryEXT):
+ (WebCore):
+ (WebCore::Extensions3DChromium::deleteQueryEXT):
+ (WebCore::Extensions3DChromium::isQueryEXT):
+ (WebCore::Extensions3DChromium::beginQueryEXT):
+ (WebCore::Extensions3DChromium::endQueryEXT):
+ (WebCore::Extensions3DChromium::getQueryivEXT):
+ (WebCore::Extensions3DChromium::getQueryObjectuivEXT):
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore):
+ * src/GraphicsContext3DPrivate.h:
+ (GraphicsContext3DPrivate):
+ * tests/FakeWebGraphicsContext3D.h:
+ (WebKit::FakeWebGraphicsContext3D::createQueryEXT):
+ (WebKit::FakeWebGraphicsContext3D::deleteQueryEXT):
+ (WebKit::FakeWebGraphicsContext3D::isQueryEXT):
+ (WebKit::FakeWebGraphicsContext3D::beginQueryEXT):
+ (WebKit::FakeWebGraphicsContext3D::endQueryEXT):
+ (WebKit::FakeWebGraphicsContext3D::getQueryivEXT):
+ (WebKit::FakeWebGraphicsContext3D::getQueryObjectuivEXT):
+ (FakeWebGraphicsContext3D):
+
+2012-03-21 Tommy Widenflycht <tommyw@google.com>
+
+ [chromium] MediaStream API (JSEP): Enhancing WebMediaHints and WebICEOptions
+ https://bugs.webkit.org/show_bug.cgi?id=81652
+
+ Reviewed by Adam Barth.
+
+ Adding an initialize method to WebMediaHints and WebICEOptions.
+ This is needed for Chromium unittests.
+
+ * public/platform/WebICEOptions.h:
+ (WebKit::WebICEOptions::WebICEOptions):
+ (WebICEOptions):
+ * public/platform/WebMediaHints.h:
+ (WebKit::WebMediaHints::WebMediaHints):
+ (WebMediaHints):
+ * src/AssertMatchingEnums.cpp:
+ * src/WebICEOptions.cpp:
+ (WebKit::WebICEOptions::initialize):
+ (WebKit):
+ (WebKit::WebICEOptions::candidateTypeToUse):
+ * src/WebMediaHints.cpp:
+ (WebKit::WebMediaHints::initialize):
+ (WebKit):
+
+2012-03-21 Tommy Widenflycht <tommyw@google.com>
+
+ [chromium] MediaStream API (JSEP): Introducing WebSessionDescription and WebIceCandidate
+ https://bugs.webkit.org/show_bug.cgi?id=81339
+
+ Reviewed by Adam Barth.
+
+ Simple WebKit representations of the WebCore/platform versions.
+
+ * WebKit.gyp:
+ * public/platform/WebICECandidateDescriptor.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebICECandidateDescriptor):
+ (WebKit::WebICECandidateDescriptor::WebICECandidateDescriptor):
+ (WebKit::WebICECandidateDescriptor::~WebICECandidateDescriptor):
+ (WebKit::WebICECandidateDescriptor::operator=):
+ (WebKit::WebICECandidateDescriptor::isNull):
+ * public/platform/WebSessionDescriptionDescriptor.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebSessionDescriptionDescriptor):
+ (WebKit::WebSessionDescriptionDescriptor::WebSessionDescriptionDescriptor):
+ (WebKit::WebSessionDescriptionDescriptor::~WebSessionDescriptionDescriptor):
+ (WebKit::WebSessionDescriptionDescriptor::operator=):
+ (WebKit::WebSessionDescriptionDescriptor::isNull):
+ * src/WebICECandidateDescriptor.cpp: Added.
+ (WebKit):
+ (WebKit::WebICECandidateDescriptor::WebICECandidateDescriptor):
+ (WebKit::WebICECandidateDescriptor::assign):
+ (WebKit::WebICECandidateDescriptor::reset):
+ (WebKit::WebICECandidateDescriptor::initialize):
+ (WebKit::WebICECandidateDescriptor::operator PassRefPtr<WebCore::IceCandidateDescriptor>):
+ (WebKit::WebICECandidateDescriptor::label):
+ (WebKit::WebICECandidateDescriptor::candidateLine):
+ * src/WebSessionDescriptionDescriptor.cpp: Added.
+ (WebKit):
+ (WebKit::WebSessionDescriptionDescriptor::WebSessionDescriptionDescriptor):
+ (WebKit::WebSessionDescriptionDescriptor::assign):
+ (WebKit::WebSessionDescriptionDescriptor::reset):
+ (WebKit::WebSessionDescriptionDescriptor::operator WTF::PassRefPtr<WebCore::SessionDescriptionDescriptor>):
+ (WebKit::WebSessionDescriptionDescriptor::initialize):
+ (WebKit::WebSessionDescriptionDescriptor::numberOfAddedCandidates):
+ (WebKit::WebSessionDescriptionDescriptor::candidate):
+ (WebKit::WebSessionDescriptionDescriptor::initialSDP):
+
+2012-03-21 Sami Kyostila <skyostil@chromium.org>
+
+ [chromium] Use floating point scroll deltas for layers
+ https://bugs.webkit.org/show_bug.cgi?id=81546
+
+ Reviewed by James Robinson.
+
+ New unit test for accumulating fractional scroll deltas across multiple commits.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (CCLayerTreeHostTestFractionalScroll):
+ (WTF::CCLayerTreeHostTestFractionalScroll::CCLayerTreeHostTestFractionalScroll):
+ (WTF::CCLayerTreeHostTestFractionalScroll::beginTest):
+ (WTF::CCLayerTreeHostTestFractionalScroll::drawLayersOnCCThread):
+ (WTF::CCLayerTreeHostTestFractionalScroll::applyScrollAndScale):
+ (WTF::CCLayerTreeHostTestFractionalScroll::afterTest):
+ (WTF):
+ (WTF::TEST_F):
+
+2012-03-21 Joshua Bell <jsbell@chromium.org>
+
+ [Chromium] IndexedDB: Expose necessary IDB exception codes through WebKit API
+ https://bugs.webkit.org/show_bug.cgi?id=81597
+
+ To fix http://crbug.com/96826 and http://crbug.com/113118 we need to be able throw
+ exceptions from the Chromium side, so expose the necessary members of IDBDatabaseException.
+
+ Reviewed by Darin Fisher.
+
+ * WebKit.gyp:
+ * public/WebIDBDatabaseException.h: Added.
+ (WebKit):
+ * src/AssertMatchingEnums.cpp:
+
+2012-03-21 Tim Dresser <tdresser@chromium.org>
+
+ [chromium] Increase size of Combo Box Options for touch and high DPI devices
+ https://bugs.webkit.org/show_bug.cgi?id=80027
+
+ Reviewed by Darin Fisher.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::gestureEvent):
+ (WebKit::WebViewImpl::applyAutofillSuggestions):
+ * tests/PopupMenuTest.cpp:
+ (WebKit::TestWebViewClient::screenInfo):
+ (WebKit::SelectPopupMenuTest::SetUp):
+ (WebKit::SelectPopupMenuTest::TearDown):
+ (SelectPopupMenuTest):
+
+2012-03-21 Takashi Toyoshima <toyoshim@chromium.org>
+
+ [Chromium] [WebSocket] provide WebFrameClient with a chance of
+ accessing to opening WebSocketStreamHandle.
+ https://bugs.webkit.org/show_bug.cgi?id=78459
+
+ Reviewed by Kent Tamura and Darin Fisher.
+
+ Add dispatchWillOpenSocketStream client function to WebFrameClient with
+ an argument representing an opening SocketStreamHandle.
+ These mechanisms provide embedders with a chance to bind arbitrary
+ data to a WebSocketStreamHandle from WebFrameClient to which the
+ WebSocket object having the WebSocketStreamHandle belongs.
+
+ No new tests because this change just provide mechanisms to embedders.
+
+ * public/WebFrameClient.h: Add dispatchWillOpenSocketStream declaration.
+ (WebKit):
+ (WebFrameClient):
+ (WebKit::WebFrameClient::willOpenSocketStream):
+ * public/platform/WebSocketStreamHandle.h: Add default implementation to virtual functions.
+ (WebKit::WebSocketStreamHandle::connect):
+ (WebKit::WebSocketStreamHandle::send):
+ (WebKit::WebSocketStreamHandle::close):
+ * src/FrameLoaderClientImpl.cpp: Implement dispatchWillOpenSocketStream.
+ (WebKit::FrameLoaderClientImpl::dispatchWillOpenSocketStream):
+ (WebKit):
+ * src/FrameLoaderClientImpl.h: Add dispatchWillOpenSocketStream declaratioin.
+ (FrameLoaderClientImpl):
+ * src/SocketStreamHandle.cpp: Call willOpenSocketStream client function.
+ (WebCore::SocketStreamHandleInternal::connect):
+
+2012-03-21 Ian Vollick <vollick@chromium.org>
+
+ [chromium] timing functions are getting incorrectly applied for accelerated css transitions
+ https://bugs.webkit.org/show_bug.cgi?id=81692
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCAnimationTestCommon.cpp:
+ (WebCore::addOpacityTransition):
+ (WebKitTests::addOpacityTransitionToController):
+ (WebKitTests::addOpacityTransitionToLayer):
+ * tests/CCAnimationTestCommon.h:
+ (WebKitTests):
+ * tests/CCLayerAnimationControllerTest.cpp:
+ (WebKitTests::TEST):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::CCLayerTreeHostTest::dispatchAddInstantAnimation):
+ (WTF::CCLayerTreeHostTest::dispatchAddAnimation):
+ (WTF::TEST_F):
+ (WTF):
+ (CCLayerTreeHostTestAddAnimationWithTimingFunction):
+ (WTF::CCLayerTreeHostTestAddAnimationWithTimingFunction::CCLayerTreeHostTestAddAnimationWithTimingFunction):
+ (WTF::CCLayerTreeHostTestAddAnimationWithTimingFunction::beginTest):
+ (WTF::CCLayerTreeHostTestAddAnimationWithTimingFunction::animateLayers):
+ (WTF::CCLayerTreeHostTestAddAnimationWithTimingFunction::afterTest):
+
+2012-03-21 Ian Vollick <vollick@chromium.org>
+
+ [chromium] Animation events should only be used for synchronizing animation start times
+ https://bugs.webkit.org/show_bug.cgi?id=81484
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF):
+ (CCLayerTreeHostTestSynchronizeAnimationStartTimes):
+ (WTF::CCLayerTreeHostTestSynchronizeAnimationStartTimes::CCLayerTreeHostTestSynchronizeAnimationStartTimes):
+ (WTF::CCLayerTreeHostTestSynchronizeAnimationStartTimes::beginTest):
+ (WTF::CCLayerTreeHostTestSynchronizeAnimationStartTimes::animateLayers):
+ (WTF::CCLayerTreeHostTestSynchronizeAnimationStartTimes::afterTest):
+ (WTF::TEST_F):
+
+2012-03-21 Peter Beverloo <peter@chromium.org>
+
+ [Chromium] Remove Android build-fix when the proper fix rolled into WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=80861
+
+ Reviewed by Tony Chang.
+
+ No longer set the CC.target environment variable as this is no longer
+ required for project file generation.
+
+ * gyp_webkit:
+
+2012-03-21 Peter Beverloo <peter@chromium.org>
+
+ Unreviewed. Rolled DEPS.
+
+ * DEPS:
+
+2012-03-20 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Use origin transform to transform occlusion from surface content space to its target content space
+ https://bugs.webkit.org/show_bug.cgi?id=81730
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebCore):
+ (CCOcclusionTrackerTestSurfaceOcclusionTranslatesToParent):
+ (WebCore::CCOcclusionTrackerTestSurfaceOcclusionTranslatesToParent::runMyTest):
+
+2012-03-20 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Store origin/screen space transforms for surface and replica in the surface
+ https://bugs.webkit.org/show_bug.cgi?id=81296
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostCommonTest.cpp:
+ (WebCore::TEST):
+
+2012-03-20 W. James MacLean <wjmaclean@chromium.org>
+
+ [chromium] Convert TouchFlingPlatformGestureCurve to a 2-D Bezier for better control of curve shape.
+ https://bugs.webkit.org/show_bug.cgi?id=81713
+
+ Reviewed by Dirk Pranke.
+
+ * tests/PlatformGestureCurveTest.cpp:
+
+2012-03-20 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Allow us to disable overdraw metrics when tracing is off
+ https://bugs.webkit.org/show_bug.cgi?id=81431
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebCore::TestCCOcclusionTrackerBase::TestCCOcclusionTrackerBase):
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore::TestCCOcclusionTrackerImpl::TestCCOcclusionTrackerImpl):
+ (WebCore::TEST):
+ (WebCore):
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::TestCCOcclusionTracker::TestCCOcclusionTracker):
+
+2012-03-20 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Use opaque contents for paint culling
+ https://bugs.webkit.org/show_bug.cgi?id=81676
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::TestLayerChromium::opaqueContentsRegion):
+ (WTF::TestLayerChromium::setOpaqueContentsRect):
+ (TestLayerChromium):
+ (CCLayerTreeHostTestContentLayerOcclusion):
+ (WTF::CCLayerTreeHostTestContentLayerOcclusion::CCLayerTreeHostTestContentLayerOcclusion):
+ (WTF::CCLayerTreeHostTestContentLayerOcclusion::beginTest):
+ (WTF::CCLayerTreeHostTestContentLayerOcclusion::afterTest):
+ (WTF):
+
+2012-03-20 W. James MacLean <wjmaclean@chromium.org>
+
+ [chromium] Tune fling physics curve. [Not for review yet]
+ https://bugs.webkit.org/show_bug.cgi?id=81398
+
+ Reviewed by James Robinson.
+
+ * tests/PlatformGestureCurveTest.cpp:
+
+2012-03-20 Ian Vollick <vollick@chromium.org>
+
+ [chromium] Infrastructure to allow animating layers to be only partially updated
+ https://bugs.webkit.org/show_bug.cgi?id=81106
+
+ Reviewed by James Robinson
+
+ * WebKit.gypi:
+ * tests/CCAnimationTestCommon.cpp:
+ (WebKitTests::FakeLayerAnimationControllerClient::FakeLayerAnimationControllerClient):
+ (WebKitTests::FakeLayerAnimationControllerClient::~FakeLayerAnimationControllerClient):
+ * tests/CCAnimationTestCommon.h:
+ (FakeLayerAnimationControllerClient):
+ (WebKitTests::FakeLayerAnimationControllerClient::setOpacityFromAnimation):
+ (WebKitTests::FakeLayerAnimationControllerClient::setTransformFromAnimation):
+ * tests/CCLayerAnimationControllerImplTest.cpp: Removed.
+ * tests/CCLayerAnimationControllerTest.cpp:
+ (WebKitTests::TEST):
+ (WebKitTests):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::CCLayerTreeHostTestAddAnimation::CCLayerTreeHostTestAddAnimation):
+ (WTF::CCLayerTreeHostTestAddAnimation::animateLayers):
+ (CCLayerTreeHostTestAddAnimation):
+ * tests/TreeSynchronizerTest.cpp:
+ (WebKitTests::FakeLayerAnimationController::create):
+ (WebKitTests::FakeLayerAnimationController::FakeLayerAnimationController):
+ (WebKitTests::FakeLayerAnimationController::pushAnimationUpdatesTo):
+ (WebKitTests::TEST):
+
+2012-03-20 Keishi Hattori <keishi@webkit.org>
+
+ [chromium] Marking WebFrameTest.DivAutoZoomParamsTest as failing.
+
+ * tests/WebFrameTest.cpp:
+ (WebKit::TEST_F):
+
+2012-03-19 Adam Barth <abarth@webkit.org>
+
+ Remove support for "magic" iframe
+ https://bugs.webkit.org/show_bug.cgi?id=81590
+
+ Reviewed by Eric Seidel.
+
+ Remove FrameLoaderClient methods that no longer exist.
+
+ * public/WebFrameClient.h:
+ (WebFrameClient):
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit):
+ * src/FrameLoaderClientImpl.h:
+ (FrameLoaderClientImpl):
+
+2012-03-19 Charlie Reis <creis@chromium.org>
+
+ [Chromium] Add registerURLSchemeAsEmptyDocument to WebSecurityPolicy
+ https://bugs.webkit.org/show_bug.cgi?id=81421
+
+ Reviewed by Adam Barth.
+
+ * public/WebSecurityPolicy.h:
+ (WebSecurityPolicy):
+ * src/WebSecurityPolicy.cpp:
+ (WebKit::WebSecurityPolicy::registerURLSchemeAsEmptyDocument):
+ (WebKit):
+
+2012-03-19 Keishi Hattori <keishi@webkit.org>
+
+ [chromium] Fixing build. Adding missing virtual.
+
+ * src/GraphicsContext3DPrivate.h:
+ (GraphicsContext3DPrivate):
+
+2012-03-19 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Push culled tiles that are prepainted
+ https://bugs.webkit.org/show_bug.cgi?id=81552
+
+ Reviewed by Adrienne Walker.
+
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::TEST):
+ (WTF):
+
+2012-03-19 James Robinson <jamesr@chromium.org>
+
+ Unreviewed chromium compile fix - put all TRACE_*s in their own scope explicitly.
+
+ * src/WebCompositorInputHandlerImpl.cpp:
+ (WebKit::WebCompositorInputHandlerImpl::handleInputEventInternal):
+ (WebKit::WebCompositorInputHandlerImpl::handleGestureFling):
+
+2012-03-19 Robert Kroeger <rjkroege@chromium.org>
+
+ [chromium] return true/false on GestureFlingCancel if a fling was stopped
+ https://bugs.webkit.org/show_bug.cgi?id=81563
+
+ Reviewed by James Robinson.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::gestureEvent):
+
+2012-03-19 Michal Mocny <mmocny@google.com>
+
+ [chromium] Adding support for GL_EXT_discard_framebuffer.
+ https://bugs.webkit.org/show_bug.cgi?id=81383
+
+ Reviewed by James Robinson.
+
+ * src/Extensions3DChromium.cpp:
+ (WebCore::Extensions3DChromium::discardFramebufferEXT):
+ (WebCore):
+ (WebCore::Extensions3DChromium::ensureFramebufferCHROMIUM):
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore):
+ * src/GraphicsContext3DPrivate.h:
+ (GraphicsContext3DPrivate):
+ * tests/FakeWebGraphicsContext3D.h:
+ (WebKit::FakeWebGraphicsContext3D::discardFramebufferEXT):
+ (WebKit::FakeWebGraphicsContext3D::ensureFramebufferCHROMIUM):
+ (FakeWebGraphicsContext3D):
+
+2012-03-19 Ian Vollick <vollick@chromium.org>
+
+ [chromium] Times in the cc should be expressed in seconds.
+ https://bugs.webkit.org/show_bug.cgi?id=80514
+
+ Reviewed by James Robinson.
+
+ * tests/CCDelayBasedTimeSourceTest.cpp:
+ (WebKitTests::TEST):
+ * tests/CCFrameRateControllerTest.cpp:
+ (WebKitTests::TEST):
+ * tests/CCSchedulerTestCommon.h:
+ (WebKitTests::FakeCCThread::pendingDelayMs):
+ (WebKitTests::FakeCCDelayBasedTimeSource::create):
+ (WebKitTests::FakeCCDelayBasedTimeSource::setMonotonicallyIncreasingTime):
+ (WebKitTests::FakeCCDelayBasedTimeSource::monotonicallyIncreasingTime):
+ (WebKitTests::FakeCCDelayBasedTimeSource::FakeCCDelayBasedTimeSource):
+ (FakeCCDelayBasedTimeSource):
+ * tests/CCTimerTest.cpp:
+ (WebKitTests::TEST_F):
+
+2012-03-19 Nat Duca <nduca@chromium.org>
+
+ [chromium] Stop deriving WebCompositor from WebCompositorInputHandler
+ https://bugs.webkit.org/show_bug.cgi?id=80586
+
+ Reviewed by Darin Fisher.
+
+ * public/WebCompositor.h:
+ (WebKit):
+ * public/WebCompositorInputHandler.h:
+ (WebCompositorInputHandler):
+ * public/WebWidgetClient.h:
+ (WebWidgetClient):
+ (WebKit::WebWidgetClient::didActivateCompositor):
+ * src/WebCompositorInputHandlerImpl.cpp:
+ (WebKit::WebCompositorInputHandler::fromIdentifier):
+ * src/WebCompositorInputHandlerImpl.h:
+ (WebCompositorInputHandlerImpl):
+
+2012-03-18 James Robinson <jamesr@chromium.org>
+
+ [chromium] Implement fling-by-wheel on compositor thread
+ https://bugs.webkit.org/show_bug.cgi?id=81462
+
+ Reviewed by Adrienne Walker.
+
+ Implement fling-by-wheel and beef up existing unit test coverage considerably by using gmock instead of mocking
+ by hand.
+
+ * src/WebCompositorInputHandlerImpl.cpp:
+ (WebKit::WebCompositorInputHandlerImpl::handleInputEvent):
+ (WebKit):
+ (WebKit::WebCompositorInputHandlerImpl::handleInputEventInternal):
+ (WebKit::WebCompositorInputHandlerImpl::handleGestureFling):
+ (WebKit::WebCompositorInputHandlerImpl::animate):
+ (WebKit::WebCompositorInputHandlerImpl::cancelCurrentFling):
+ (WebKit::WebCompositorInputHandlerImpl::scrollBy):
+ * src/WebCompositorInputHandlerImpl.h:
+ (WebCompositorInputHandlerImpl):
+ * tests/WebCompositorInputHandlerImplTest.cpp:
+
+2012-03-19 Emil A Eklund <eae@chromium.org>
+
+ [mac/chromium] Change platform code to use pixelSnappedRect methods
+ https://bugs.webkit.org/show_bug.cgi?id=81016
+
+ Reviewed by Eric Seidel.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::computeBlockBounds):
+ (WebKit::WebViewImpl::applyAutofillSuggestions):
+ (WebKit::WebViewImpl::refreshAutofillPopup):
+
+2012-03-19 Eric Seidel <eric@webkit.org>
+
+ Fix WTF header include discipline in Chromium WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=81281
+
+ Reviewed by James Robinson.
+
+ * src/CompositionUnderlineBuilder.h:
+ * src/CompositionUnderlineVectorBuilder.h:
+ * src/FrameLoaderClientImpl.cpp:
+ * src/WebArrayBuffer.cpp:
+ * src/WebArrayBufferView.cpp:
+ * src/WebBindings.cpp:
+ * src/WebColorName.cpp:
+ * src/WebGeolocationClientMock.cpp:
+ * src/WebPageSerializer.cpp:
+ * src/WebSocketImpl.cpp:
+ * src/WebViewImpl.cpp:
+ * tests/FrameTestHelpers.cpp:
+
+2012-03-19 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Invalidate/update evicted tiles during commit
+ https://bugs.webkit.org/show_bug.cgi?id=81529
+
+ Reviewed by Adrienne Walker.
+
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::TEST):
+ (WTF):
+
+2012-03-19 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r111207.
+ http://trac.webkit.org/changeset/111207
+ https://bugs.webkit.org/show_bug.cgi?id=81561
+
+ Causing chromium unit test failure (Requested by reveman on
+ #webkit).
+
+ * src/Extensions3DChromium.cpp:
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore):
+ * src/GraphicsContext3DPrivate.h:
+ (GraphicsContext3DPrivate):
+ * tests/FakeWebGraphicsContext3D.h:
+
+2012-03-19 Tommy Widenflycht <tommyw@google.com>
+
+ [chromium] MediaStream API (JSEP): Introducing WebMediaHints and WebIceOptions
+ https://bugs.webkit.org/show_bug.cgi?id=81341
+
+ Reviewed by Darin Fisher.
+
+ Simple WebKit representations of the WebCore/platform versions.
+
+ * WebKit.gyp:
+ * public/platform/WebICEOptions.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebICEOptions):
+ (WebKit::WebICEOptions::WebICEOptions):
+ (WebKit::WebICEOptions::~WebICEOptions):
+ (WebKit::WebICEOptions::operator=):
+ (WebKit::WebICEOptions::isNull):
+ * public/platform/WebMediaHints.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebMediaHints):
+ (WebKit::WebMediaHints::WebMediaHints):
+ (WebKit::WebMediaHints::~WebMediaHints):
+ (WebKit::WebMediaHints::operator=):
+ (WebKit::WebMediaHints::isNull):
+ * src/WebICEOptions.cpp: Added.
+ (WebKit):
+ (WebKit::WebICEOptions::WebICEOptions):
+ (WebKit::WebICEOptions::assign):
+ (WebKit::WebICEOptions::reset):
+ (WebKit::WebICEOptions::candidateTypeToUse):
+ * src/WebMediaHints.cpp: Added.
+ (WebKit):
+ (WebKit::WebMediaHints::WebMediaHints):
+ (WebKit::WebMediaHints::assign):
+ (WebKit::WebMediaHints::reset):
+ (WebKit::WebMediaHints::audio):
+ (WebKit::WebMediaHints::video):
+
+2012-03-19 Michal Mocny <mmocny@google.com>
+
+ [chromium] Updating WebGraphicsContext3D MemoryAllocation callback to accept a struct with have backbuffer suggestion.
+ https://bugs.webkit.org/show_bug.cgi?id=81279
+
+ Reviewed by James Robinson.
+
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GrMemoryAllocationChangedCallback::onGpuMemoryAllocationChanged):
+ (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::onMemoryAllocationChanged):
+ (GraphicsContext3DMemoryAllocationChangedCallbackAdapter):
+
+2012-03-19 David Reveman <reveman@chromium.org>
+
+ [Chromium] GL_EXT_occlusion_query_boolean and GL_CHROMIUM_command_buffer_query support.
+ https://bugs.webkit.org/show_bug.cgi?id=80988
+
+ Reviewed by Adrienne Walker.
+
+ Expose EXT_occlusion_query API to WebKit compositor.
+
+ * src/Extensions3DChromium.cpp:
+ (WebCore::Extensions3DChromium::createQueryEXT):
+ (WebCore):
+ (WebCore::Extensions3DChromium::deleteQueryEXT):
+ (WebCore::Extensions3DChromium::isQueryEXT):
+ (WebCore::Extensions3DChromium::beginQueryEXT):
+ (WebCore::Extensions3DChromium::endQueryEXT):
+ (WebCore::Extensions3DChromium::getQueryivEXT):
+ (WebCore::Extensions3DChromium::getQueryObjectuivEXT):
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore):
+ * src/GraphicsContext3DPrivate.h:
+ (GraphicsContext3DPrivate):
+ * tests/FakeWebGraphicsContext3D.h:
+ (WebKit::FakeWebGraphicsContext3D::createQueryEXT):
+ (WebKit::FakeWebGraphicsContext3D::deleteQueryEXT):
+ (WebKit::FakeWebGraphicsContext3D::isQueryEXT):
+ (WebKit::FakeWebGraphicsContext3D::beginQueryEXT):
+ (WebKit::FakeWebGraphicsContext3D::endQueryEXT):
+ (WebKit::FakeWebGraphicsContext3D::getQueryivEXT):
+ (WebKit::FakeWebGraphicsContext3D::getQueryObjectuivEXT):
+ (FakeWebGraphicsContext3D):
+
+2012-03-19 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Unit test fix, save the sharedQuadState while the quads hold a pointer to it
+ https://bugs.webkit.org/show_bug.cgi?id=81476
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore::appendQuads):
+ (WebCore):
+ (WebCore::TEST):
+
+2012-03-19 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed. Rolled DEPS.
+
+ * DEPS:
+
+2012-03-19 Robert Kroeger <rjkroege@chromium.org>
+
+ [chromium] synthesize wheel events for fling on main thread
+ https://bugs.webkit.org/show_bug.cgi?id=81458
+
+ Support track pad fling by generating a sequence of wheel events.
+
+ Reviewed by James Robinson.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::scrollBy): Call-back from PlatformGestureCurve to dispatch wheel event.
+ (WebKit):
+ (WebKit::WebViewImpl::gestureEvent): Handle GestureFlingStart and GestureFlingCancel.
+ (WebKit::WebViewImpl::updateAnimations): Requests a PlatformGestureCurve to animate forward.
+ (WebKit::WebViewImpl::didCommitLoad): Halt flings on navigations.
+ * src/WebViewImpl.h:
+ (WebCore):
+ (WebViewImpl):
+
+2012-03-19 Keishi Hattori <keishi@webkit.org>
+
+ [chromium] Fix build that was broken by r111137
+
+ Fixed was ambiguous because of MacTypes.h
+
+ * tests/CCLayerTreeHostCommonTest.cpp:
+ (WebCore::addTransformAnimationToLayer):
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebCore::addTransformAnimationToLayer):
+
+2012-03-18 Keishi Hattori <keishi@webkit.org>
+
+ [chromium] Fix test that was broken by r111128
+
+ * tests/ScrollAnimatorNoneTest.cpp:
+ (TEST): ScrollByPixel no longer animates.
+
+2012-03-18 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Don't occlude on main-thread behind layers/surfaces with impl-thread animations
+ https://bugs.webkit.org/show_bug.cgi?id=81354
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebCore):
+ (WebCore::addOpacityAnimationToLayer):
+ (WebCore::addTransformAnimationToLayer):
+ (CCOcclusionTrackerTestAnimationOpacity1OnMainThread):
+ (WebCore::CCOcclusionTrackerTestAnimationOpacity1OnMainThread::runMyTest):
+ (CCOcclusionTrackerTestAnimationOpacity0OnMainThread):
+ (WebCore::CCOcclusionTrackerTestAnimationOpacity0OnMainThread::runMyTest):
+ (CCOcclusionTrackerTestAnimationTranslateOnMainThread):
+ (WebCore::CCOcclusionTrackerTestAnimationTranslateOnMainThread::runMyTest):
+
+2012-03-18 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Animating opacity is not opaque and should create a render surface on main thread
+ https://bugs.webkit.org/show_bug.cgi?id=81401
+
+ Reviewed by James Robinson.
+
+ * tests/CCLayerTreeHostCommonTest.cpp:
+ (WebCore::TEST):
+
+2012-03-18 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Transform animation state should be inherited from parents
+ https://bugs.webkit.org/show_bug.cgi?id=81363
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostCommonTest.cpp:
+ (WebCore::addOpacityAnimationToLayer):
+ (WebCore):
+ (WebCore::addTransformAnimationToLayer):
+ (WebCore::TEST):
+
+2012-03-16 James Robinson <jamesr@chromium.org>
+
+ [chromium] Unify the drawing logic for different layer types that output textures to the compositor
+ https://bugs.webkit.org/show_bug.cgi?id=81286
+
+ Reviewed by Adrienne Walker.
+
+ * tests/Canvas2DLayerChromiumTest.cpp:
+
+2012-03-15 Daniel Cheng <dcheng@chromium.org>
+
+ [chromium] Refactor ClipboardChromium and DataTransferItemList/DataTransferItem to support HTML spec
+ https://bugs.webkit.org/show_bug.cgi?id=76598
+
+ Reviewed by Tony Chang.
+
+ * src/WebDragData.cpp:
+ (WebKit::WebDragData::items):
+ (WebKit::WebDragData::addItem):
+ (WebKit::WebDragData::assign):
+
+2012-03-16 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Add overdraw metrics for texture uploads
+ https://bugs.webkit.org/show_bug.cgi?id=81175
+
+ Reviewed by Adrienne Walker.
+
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::TEST):
+
+2012-03-16 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Remove surface damage client from occlusion tracker
+ https://bugs.webkit.org/show_bug.cgi?id=81242
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebCore):
+
+2012-03-16 Ian Vollick <vollick@chromium.org>
+
+ [chromium] Threaded opacity animation jump to opacity of 0
+ https://bugs.webkit.org/show_bug.cgi?id=80744
+
+ Reviewed by James Robinson.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF):
+ (CCLayerTreeHostTestDoNotSkipLayersWithAnimatedOpacity):
+ (WTF::CCLayerTreeHostTestDoNotSkipLayersWithAnimatedOpacity::CCLayerTreeHostTestDoNotSkipLayersWithAnimatedOpacity):
+ (WTF::CCLayerTreeHostTestDoNotSkipLayersWithAnimatedOpacity::beginTest):
+ (WTF::CCLayerTreeHostTestDoNotSkipLayersWithAnimatedOpacity::animateLayers):
+ (WTF::CCLayerTreeHostTestDoNotSkipLayersWithAnimatedOpacity::commitCompleteOnCCThread):
+ (WTF::CCLayerTreeHostTestDoNotSkipLayersWithAnimatedOpacity::afterTest):
+ (WTF::TEST_F):
+
+2012-03-16 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Changes to overdraw metrics to allow upload tracking
+ https://bugs.webkit.org/show_bug.cgi?id=81222
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore::appendQuads):
+ (WebCore):
+ (WebCore::TEST):
+ * tests/MockCCQuadCuller.h:
+ (WebCore::MockCCQuadCuller::MockCCQuadCuller):
+
+2012-03-16 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Quads that become fully opaque after culling should not use blending
+ https://bugs.webkit.org/show_bug.cgi?id=81235
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKit::BlendStateCheckLayer::appendQuads):
+ (WebKit::BlendStateCheckLayer::setQuadRect):
+ (WebKit::BlendStateCheckLayer::setQuadVisibleRect):
+ (WebKit::BlendStateCheckLayer::setOpaqueContents):
+ (WebKit::BlendStateCheckLayer::setOpaqueContentRect):
+ (WebKit::BlendStateCheckLayer::BlendStateCheckLayer):
+ (BlendStateCheckLayer):
+ (WebKit::TEST_F):
+
+2012-03-15 Hans Wennborg <hans@chromium.org>
+
+ Speech JavaScript API: SpeechRecognition, Controller and Client
+ https://bugs.webkit.org/show_bug.cgi?id=81096
+
+ Reviewed by Adam Barth.
+
+ Provide a SpeechRecognitionController to Page, with a NULL client for
+ now.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+
+2012-03-15 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Fix some assertions in occlusion tracker unit tests
+ https://bugs.webkit.org/show_bug.cgi?id=81308
+
+ Reviewed by James Robinson.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebCore::CCOcclusionTrackerTestSurfaceRotatedOffAxis::runMyTest):
+ (WebCore::CCOcclusionTrackerTestDamageRectOutsideChild::runMyTest):
+ (WebCore::CCOcclusionTrackerTest3dTransform::runMyTest):
+ (WebCore::CCOcclusionTrackerTestPerspectiveTransform::runMyTest):
+
+2012-03-15 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r110941.
+ http://trac.webkit.org/changeset/110941
+ https://bugs.webkit.org/show_bug.cgi?id=81307
+
+ the revert looks innocent. (Requested by morrita on #webkit).
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::ContentLayerChromiumWithUpdateTracking::paintContentsIfDirty):
+ (WTF::ContentLayerChromiumWithUpdateTracking::idlePaintContentsIfDirty):
+ (WTF::TestLayerChromium::paintContentsIfDirty):
+ * tests/Canvas2DLayerChromiumTest.cpp:
+ * tests/TiledLayerChromiumTest.cpp:
+ (TestCCOcclusionTracker):
+ (WTF::TestCCOcclusionTracker::TestCCOcclusionTracker):
+ (WTF::TestCCOcclusionTracker::setOcclusion):
+ (WTF::TestCCOcclusionTracker::layerScissorRectInTargetSurface):
+ (WTF):
+ (WTF::FakeTiledLayerChromium::prepareToUpdate):
+ (WTF::FakeTiledLayerChromium::prepareToUpdateIdle):
+ (WTF::FakeTiledLayerChromium::paintContentsIfDirty):
+ (WTF::TEST):
+
+2012-03-15 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r110929.
+ http://trac.webkit.org/changeset/110929
+ https://bugs.webkit.org/show_bug.cgi?id=81306
+
+ breaking webkit_unit_tests (Requested by morrita on #webkit).
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::ContentLayerChromiumWithUpdateTracking::paintContentsIfDirty):
+ (WTF::ContentLayerChromiumWithUpdateTracking::idlePaintContentsIfDirty):
+ (WTF::TestLayerChromium::paintContentsIfDirty):
+ * tests/Canvas2DLayerChromiumTest.cpp:
+ * tests/TiledLayerChromiumTest.cpp:
+ (WTF::FakeTiledLayerChromium::prepareToUpdate):
+ (WTF::FakeTiledLayerChromium::prepareToUpdateIdle):
+ (WTF::FakeTiledLayerChromium::paintContentsIfDirty):
+ (WTF::TEST):
+
+2012-03-15 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Decide occlusion in paint culling with CCOcclusionTracker
+ https://bugs.webkit.org/show_bug.cgi?id=81181
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::ContentLayerChromiumWithUpdateTracking::paintContentsIfDirty):
+ (WTF::ContentLayerChromiumWithUpdateTracking::idlePaintContentsIfDirty):
+ (WTF::TestLayerChromium::paintContentsIfDirty):
+ * tests/Canvas2DLayerChromiumTest.cpp:
+ * tests/TiledLayerChromiumTest.cpp:
+ (TestCCOcclusionTracker):
+ (WTF::TestCCOcclusionTracker::TestCCOcclusionTracker):
+ (WTF::TestCCOcclusionTracker::setOcclusion):
+ (WTF::TestCCOcclusionTracker::layerScissorRectInTargetSurface):
+ (WTF):
+ (WTF::FakeTiledLayerChromium::prepareToUpdate):
+ (WTF::FakeTiledLayerChromium::prepareToUpdateIdle):
+ (WTF::FakeTiledLayerChromium::paintContentsIfDirty):
+ (WTF::TEST):
+
+2012-03-15 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Move overdraw metrics into a templated class for both paint and draw metrics.
+ https://bugs.webkit.org/show_bug.cgi?id=81156
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore::appendQuads):
+ (WebCore):
+ (WebCore::TEST):
+
+2012-03-07 Jon Lee <jonlee@apple.com>
+
+ Move NotificationContents into Notification
+ https://bugs.webkit.org/show_bug.cgi?id=80487
+ <rdar://problem/10965519>
+
+ Reviewed by Jian Li.
+
+ Refactor to use accessor methods on Notification.
+ * src/WebNotification.cpp:
+ (WebKit::WebNotification::title):
+ (WebKit::WebNotification::body):
+
+2012-03-13 Jon Lee <jonlee@apple.com>
+
+ Deprecate ondisplay()
+ https://bugs.webkit.org/show_bug.cgi?id=80483
+ <rdar://problem/10912432>
+
+ Reviewed by Jian Li.
+
+ * src/WebNotification.cpp:
+ (WebKit::WebNotification::dispatchDisplayEvent): Dispatch the show event.
+
+2012-03-14 W. James MacLean <wjmaclean@chromium.org>
+
+ [chromium] Wire up PlatformGestureCurves for CC, ScrollAnimatorNone.
+ https://bugs.webkit.org/show_bug.cgi?id=80607
+
+ Reviewed by James Robinson.
+
+ * public/WebInputEvent.h:
+ (WebKit::WebInputEvent::isScrollGestureEventType):
+ * src/WebCompositorInputHandlerImpl.cpp:
+ (PlatformGestureToCCGestureAdapter):
+ (WebCore::PlatformGestureToCCGestureAdapter::create):
+ (WebCore::PlatformGestureToCCGestureAdapter::apply):
+ (WebCore::PlatformGestureToCCGestureAdapter::scrollBy):
+ (WebCore::PlatformGestureToCCGestureAdapter::PlatformGestureToCCGestureAdapter):
+ (WebCore):
+ (WebKit::WebCompositorInputHandlerImpl::handleInputEvent):
+ (WebKit::WebCompositorInputHandlerImpl::handleGestureFling):
+ (WebKit):
+ (WebKit::WebCompositorInputHandlerImpl::scrollBy):
+ * src/WebCompositorInputHandlerImpl.h:
+ (WebCore):
+ (WebCompositorInputHandlerImpl):
+ * tests/PlatformGestureCurveTest.cpp:
+ * tests/WebCompositorInputHandlerImplTest.cpp:
+
+2012-03-15 Dana Jansens <danakj@chromium.org>
+
+ [Chromium] REGRESSION(r110596) CCQuadCullerTest.verifyCullChildLinesUpTopLeft fails on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=81083
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore::TEST):
+
+2012-03-15 David Levin <levin@chromium.org>
+
+ Various autoresize fixes.
+ https://bugs.webkit.org/show_bug.cgi?id=81199
+
+ Reviewed by Darin Fisher.
+
+ * public/WebView.h:
+ (WebView): Remove a deprecated api.
+ * src/WebViewImpl.cpp: Ditto.
+ * src/WebViewImpl.h: Ditto.
+ * tests/FrameTestHelpers.cpp:
+ (WebKit::FrameTestHelpers::registerMockedURLLoad): Added an overload with more flexibility.
+ The previous api didn't allow one to request a url with a search string.
+ (FrameTestHelpers):
+ * tests/FrameTestHelpers.h:
+ (FrameTestHelpers): Ditto.
+ * tests/WebViewTest.cpp: Fix the test because calling javascript:
+ was working. Make the test generic and added a lot more tests to cover
+ various possibilities. I avoided using a layout test because there wasn't
+ a way to get the scrollbar state, so I just generalized a test that was already there.
+ * tests/data/specify_size.html: Allow the test to take its size from the search string.
+
+2012-03-15 Peter Beverloo <peter@chromium.org>
+
+ Unreviewed. Rolled DEPS.
+
+ * DEPS:
+
+2012-03-14 Chris Fleizach <cfleizach@apple.com>
+
+ AXDescription for HTML5 footer and ARIA role contentinfo incorrect
+ https://bugs.webkit.org/show_bug.cgi?id=78967
+
+ Reviewed by Beth Dakin.
+
+ * src/LocalizedStrings.cpp:
+
+2012-03-13 Jon Lee <jonlee@apple.com>
+
+ Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
+ https://bugs.webkit.org/show_bug.cgi?id=80922
+ <rdar://problem/11035082>
+
+ Reviewed by Jian Li.
+
+ You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
+ LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
+ new API. Therefore, APIs that are common between the two will have:
+ #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+
+ This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
+ the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
+
+ Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+ * src/AssertMatchingEnums.cpp:
+ * src/NotificationPresenterImpl.cpp:
+ * src/NotificationPresenterImpl.h:
+ * src/WebNotification.cpp:
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableNotifications):
+ (WebKit::WebRuntimeFeatures::isNotificationsEnabled):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+
+2012-03-14 James Robinson <jamesr@chromium.org>
+
+ [chromium] Deprecate renderDirectlyToWebView parameter of WebViewClient::createGraphicsContext3D()
+ https://bugs.webkit.org/show_bug.cgi?id=80523
+
+ Reviewed by Darin Fisher.
+
+ * public/WebViewClient.h:
+ (WebViewClient):
+ (WebKit::WebViewClient::createGraphicsContext3D):
+ * public/platform/WebKitPlatformSupport.h:
+ (WebKit):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::createCompositorGraphicsContext3D):
+
+2012-03-14 James Robinson <jamesr@chromium.org>
+
+ [chromium] Remove canRecoverFromContextLoss attribute, it's unused
+ https://bugs.webkit.org/show_bug.cgi?id=81158
+
+ Reviewed by Stephen White.
+
+ Deletes the canRecoverFromContextLoss attribute from WebCore::GraphicsContext3D::Attributes. This is still left in
+ WebGraphicsContext3D::Attributes, since chromium-side code still references it.
+
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContext3D::create):
+
+2012-03-14 Stephen White <senorblanco@chromium.org>
+
+ [chromium] Fix accelerated Canvas2D with threaded compositing.
+ https://bugs.webkit.org/show_bug.cgi?id=80998
+
+ Reviewed by James Robinson.
+
+ * tests/Canvas2DLayerChromiumTest.cpp:
+ Instantiate a CCLayerTreeHost, so that Canvas2DLayerChromium can
+ retrieve its texture manager. Also move the test into the unnamed
+ namespace -- since it's already using WebCore, there's little reason for
+ it to also be in the namespace.
+ * tests/TreeSynchronizerTest.cpp:
+ (WebKitTests):
+ (WebKitTests::TEST):
+ Add a new test for trying to synchronize NULL tree.
+
+2012-03-14 James Robinson <jamesr@chromium.org>
+
+ [chromium] Provide explicit polling API to check if the platform is capable of accelerated 2d canvas
+ https://bugs.webkit.org/show_bug.cgi?id=80667
+
+ Reviewed by Darin Fisher.
+
+ * public/platform/WebKitPlatformSupport.h:
+ (WebKit::WebKitPlatformSupport::canAccelerate2dCanvas):
+ (WebKitPlatformSupport):
+ * src/PlatformSupport.cpp:
+ (WebCore::PlatformSupport::canAccelerate2dCanvas):
+ (WebCore):
+
+2012-03-14 Andrey Kosyakov <caseq@chromium.org>
+
+ Web Inspector: add didCancelFrame timeline event
+ https://bugs.webkit.org/show_bug.cgi?id=80994
+
+ Reviewed by Pavel Feldman.
+
+ - add intrumentCanceFrame(), called when renderer decides not to
+ render frame after instrumentBeginFrame() was called.
+
+ * public/WebWidget.h:
+ (WebWidget):
+ (WebKit::WebWidget::instrumentCancelFrame):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::instrumentCancelFrame):
+ (WebKit):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+
+2012-03-14 Dana Jansens <danakj@chromium.org>
+
+ Region can acquire an empty span by subtracting an empty Region
+ https://bugs.webkit.org/show_bug.cgi?id=81074
+
+ Reviewed by Anders Carlsson.
+
+ * tests/RegionTest.cpp:
+ (WebCore::TEST):
+ (WebCore):
+
+2012-03-13 Hajime Morrita <morrita@chromium.org>
+
+ Unreviewed, mark verifyCullChildLinesUpTopLeft() as failed.
+
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore):
+ (WebCore::TEST):
+
+2012-03-14 Marja Hölttä <marja@google.com>
+
+ WebHTTPBody: Keep track of whether the data includes passwords.
+ https://bugs.webkit.org/show_bug.cgi?id=81003
+
+ Reviewed by Darin Fisher.
+
+ This change enables Chrome to save HTTP bodies selectively, only
+ if they don't contain passwords.
+
+ * public/platform/WebHTTPBody.h:
+ (WebHTTPBody): Added containsPasswordData, setContainsPasswordData.
+ * src/WebHTTPBody.cpp:
+ (WebKit::WebHTTPBody::containsPasswordData): Added.
+ (WebKit):
+ (WebKit::WebHTTPBody::setContainsPasswordData): Added.
+
+2012-03-14 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed. Rolled DEPS.
+
+ * DEPS:
+
+2012-03-13 Hajime Morrita <morrita@chromium.org>
+
+ Unreviewed, mark verifyCullChildLinesUpTopLeft() as failed.
+
+ * tests/CCQuadCullerTest.cpp:
+ (WebCore):
+ (WebCore::TEST):
+
+2012-03-13 Shawn Singh <shawnsingh@chromium.org>
+
+ [chromium] wrong transform causing incorrect culling
+ https://bugs.webkit.org/show_bug.cgi?id=80471
+
+ Reviewed by James Robinson.
+
+ * tests/CCRenderSurfaceTest.cpp:
+ (WebCore::TEST):
+ (WebCore):
+
+2012-03-13 Nat Duca <nduca@chromium.org>
+
+ [chromium] vsync ticks are needed in invisible tabs when we are still updating resources
+ https://bugs.webkit.org/show_bug.cgi?id=80910
+
+ Reviewed by James Robinson.
+
+ * tests/CCSchedulerStateMachineTest.cpp:
+ (WebCore::TEST):
+ (WebCore):
+
+2012-03-13 Dana Jansens <danakj@chromium.org>
+
+ Region::contains(IntPoint) is slow
+ https://bugs.webkit.org/show_bug.cgi?id=81008
+
+ Reviewed by Anders Carlsson.
+
+ * WebKit.gypi:
+ * tests/RegionTest.cpp: Added.
+ (WebCore):
+ (WebCore::TEST):
+
+2012-03-13 Gavin Peters <gavinp@chromium.org>
+
+ Implement ApplicationCacheHost::canCacheInPageCache() for chromium.
+ https://bugs.webkit.org/show_bug.cgi?id=80905
+
+ Reviewed by Eric Seidel.
+
+ This won't cause chrome to use the PageCache, but it will cause our histogram statistics
+ describing PageCache use to be more accurate.
+
+ * src/ApplicationCacheHost.cpp:
+ (WebCore::ApplicationCacheHost::canCacheInPageCache):
+
+2012-03-13 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Use CCOcclusionTracker for draw culling
+ https://bugs.webkit.org/show_bug.cgi?id=80743
+
+ Reviewed by Adrienne Walker.
+
+ * WebKit.gypi:
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKit::BlendStateCheckLayer::appendQuads):
+ * tests/CCQuadCullerTest.cpp:
+ (TestCCOcclusionTrackerImpl):
+ (WebCore::TestCCOcclusionTrackerImpl::TestCCOcclusionTrackerImpl):
+ (WebCore::TestCCOcclusionTrackerImpl::layerScissorRectInTargetSurface):
+ (WebCore::makeLayer):
+ (WebCore::appendQuads):
+ (WebCore):
+ (WebCore::TEST):
+ * tests/CCSolidColorLayerImplTest.cpp:
+ (CCLayerTestCommon::TEST):
+ * tests/CCTiledLayerImplTest.cpp:
+ (CCLayerTestCommon::TEST):
+ (CCLayerTestCommon::getQuads):
+ * tests/MockCCQuadCuller.h: Added.
+ (WebCore):
+ (MockCCQuadCuller):
+ (WebCore::MockCCQuadCuller::MockCCQuadCuller):
+ (WebCore::MockCCQuadCuller::append):
+ (WebCore::MockCCQuadCuller::quadList):
+
+2012-03-13 Adam Barth <abarth@webkit.org> && Benjamin Poulain <bpoulain@apple.com>
+
+ Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
+ https://bugs.webkit.org/show_bug.cgi?id=78853
+
+ Reviewed by Adam Barth.
+
+ * features.gypi:
+ * src/ChromeClientImpl.cpp:
+ * src/ChromeClientImpl.h:
+ (ChromeClientImpl):
+
+2012-03-13 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Rename PeerConnection to DeprecatedPeerConnection
+ https://bugs.webkit.org/show_bug.cgi?id=80692
+
+ Reviewed by Adam Barth.
+
+ First patch in a series of patches to change the PeerConnection from ROAP to JSEP,
+ see bug 80589 for more information.
+
+ * WebKit.gyp:
+ * bridge/DeprecatedPeerConnectionHandler.cpp: Renamed from Source/WebKit/chromium/bridge/PeerConnectionHandler.cpp.
+ (WebCore):
+ (WebCore::DeprecatedPeerConnectionHandler::create):
+ (WebCore::DeprecatedPeerConnectionHandler::DeprecatedPeerConnectionHandler):
+ (WebCore::DeprecatedPeerConnectionHandler::~DeprecatedPeerConnectionHandler):
+ (WebCore::DeprecatedPeerConnectionHandler::produceInitialOffer):
+ (WebCore::DeprecatedPeerConnectionHandler::handleInitialOffer):
+ (WebCore::DeprecatedPeerConnectionHandler::processSDP):
+ (WebCore::DeprecatedPeerConnectionHandler::processPendingStreams):
+ (WebCore::DeprecatedPeerConnectionHandler::sendDataStreamMessage):
+ (WebCore::DeprecatedPeerConnectionHandler::stop):
+ * bridge/DeprecatedPeerConnectionHandlerInternal.cpp: Renamed from Source/WebKit/chromium/bridge/PeerConnectionHandlerInternal.cpp.
+ (WebCore):
+ (WebCore::DeprecatedPeerConnectionHandlerInternal::DeprecatedPeerConnectionHandlerInternal):
+ (WebCore::DeprecatedPeerConnectionHandlerInternal::~DeprecatedPeerConnectionHandlerInternal):
+ (WebCore::DeprecatedPeerConnectionHandlerInternal::produceInitialOffer):
+ (WebCore::DeprecatedPeerConnectionHandlerInternal::handleInitialOffer):
+ (WebCore::DeprecatedPeerConnectionHandlerInternal::processSDP):
+ (WebCore::DeprecatedPeerConnectionHandlerInternal::processPendingStreams):
+ (WebCore::DeprecatedPeerConnectionHandlerInternal::sendDataStreamMessage):
+ (WebCore::DeprecatedPeerConnectionHandlerInternal::stop):
+ (WebCore::DeprecatedPeerConnectionHandlerInternal::didCompleteICEProcessing):
+ (WebCore::DeprecatedPeerConnectionHandlerInternal::didGenerateSDP):
+ (WebCore::DeprecatedPeerConnectionHandlerInternal::didReceiveDataStreamMessage):
+ (WebCore::DeprecatedPeerConnectionHandlerInternal::didAddRemoteStream):
+ (WebCore::DeprecatedPeerConnectionHandlerInternal::didRemoveRemoteStream):
+ * bridge/DeprecatedPeerConnectionHandlerInternal.h: Renamed from Source/WebKit/chromium/bridge/PeerConnectionHandlerInternal.h.
+ (WebKit):
+ (WebCore):
+ (DeprecatedPeerConnectionHandlerInternal):
+
+2012-03-13 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Use projectQuad to apply inverse mapRect
+ https://bugs.webkit.org/show_bug.cgi?id=80741
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebCore):
+ (CCOcclusionTrackerTest3dTransform):
+ (WebCore::CCOcclusionTrackerTest3dTransform::runMyTest):
+ (CCOcclusionTrackerTestPerspectiveTransform):
+ (WebCore::CCOcclusionTrackerTestPerspectiveTransform::runMyTest):
+ (CCOcclusionTrackerTestPerspectiveTransformBehindCamera):
+ (WebCore::CCOcclusionTrackerTestPerspectiveTransformBehindCamera::runMyTest):
+
+2012-03-13 Gavin Peters <gavinp@chromium.org>
+
+ Make ApplicationCacheHost::canCacheInPageCache() non-const.
+ https://bugs.webkit.org/show_bug.cgi?id=80904
+
+ Reviewed by Alexey Proskuryakov.
+
+ A const pointer to a large object like ApplicationCacheHost is not our standard
+ practice; so remove this (implicit) one. See also https://bugs.webkit.org/show_bug.cgi?id=80898
+
+ * src/ApplicationCacheHost.cpp:
+ (WebCore::ApplicationCacheHost::canCacheInPageCache):
+
+2012-03-13 Kinuko Yasuda <kinuko@chromium.org>
+
+ Allow WebFileChooser to return extra file info (like displayName) in addition to mere file paths
+ https://bugs.webkit.org/show_bug.cgi?id=80719
+
+ Reviewed by Kent Tamura.
+
+ * public/WebFileChooserCompletion.h:
+ (SelectedFileInfo): Added.
+ (WebFileChooserCompletion):
+ (WebKit::WebFileChooserCompletion::didChooseFile): Added an overloaded
+ method that takes SelectedFileInfo.
+ * src/WebFileChooserCompletionImpl.cpp:
+ (WebKit::WebFileChooserCompletionImpl::didChooseFile): Ditto.
+ (WebKit):
+ * src/WebFileChooserCompletionImpl.h:
+ (WebFileChooserCompletionImpl):
+
+2012-03-12 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r110529.
+ http://trac.webkit.org/changeset/110529
+ https://bugs.webkit.org/show_bug.cgi?id=80969
+
+ breaks mac build (Requested by morrita on #webkit).
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebCore):
+
+2012-03-12 Hajime Morrita <morrita@chromium.org>
+
+ Unreviewed Windows build fix.
+
+ * src/WebViewImpl.cpp:
+
+2012-03-12 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Use projectQuad to apply inverse mapRect
+ https://bugs.webkit.org/show_bug.cgi?id=80741
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebCore):
+ (CCOcclusionTrackerTest3dTransform):
+ (WebCore::CCOcclusionTrackerTest3dTransform::runMyTest):
+ (CCOcclusionTrackerTestPerspectiveTransform):
+ (WebCore::CCOcclusionTrackerTestPerspectiveTransform::runMyTest):
+ (CCOcclusionTrackerTestPerspectiveTransformBehindCamera):
+ (WebCore::CCOcclusionTrackerTestPerspectiveTransformBehindCamera::runMyTest):
+
+2012-03-12 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Fix clang build for CCOcclusionTracker tests
+ https://bugs.webkit.org/show_bug.cgi?id=80891
+
+ Reviewed by Adam Barth.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebCore::CCOcclusionTrackerTest::createRoot):
+ (WebCore::CCOcclusionTrackerTest::createLayer):
+ (WebCore::CCOcclusionTrackerTest::createDrawingLayer):
+
+2012-03-12 Stephen White <senorblanco@chromium.org>
+
+ [chromium] Restore canvas2D acceleration after context loss.
+ https://bugs.webkit.org/show_bug.cgi?id=80629
+
+ Reviewed by James Robinson.
+
+ Covered by existing canvas tests, and manual testing (killing the GPU
+ process).
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::sharedGraphicsContext3D):
+
+2012-03-12 Nat Duca <nduca@chromium.org>
+
+ [Chromium] Force compositeAndReadback through regular scheduling flow
+ https://bugs.webkit.org/show_bug.cgi?id=77049
+
+ Reviewed by James Robinson.
+
+ * tests/CCFrameRateControllerTest.cpp:
+ (WebKitTests::FakeCCFrameRateControllerClient::reset):
+ (WebKitTests::FakeCCFrameRateControllerClient::vsyncTicked):
+ (WebKitTests::FakeCCFrameRateControllerClient::vsyncTick):
+ (FakeCCFrameRateControllerClient):
+ (WebKitTests::TEST):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF):
+ (CCLayerTreeHostTestCompositeAndReadbackWhileInvisible):
+ (WTF::CCLayerTreeHostTestCompositeAndReadbackWhileInvisible::CCLayerTreeHostTestCompositeAndReadbackWhileInvisible):
+ (WTF::CCLayerTreeHostTestCompositeAndReadbackWhileInvisible::beginTest):
+ (WTF::CCLayerTreeHostTestCompositeAndReadbackWhileInvisible::didCommitAndDrawFrame):
+ (WTF::CCLayerTreeHostTestCompositeAndReadbackWhileInvisible::afterTest):
+ (WTF::TEST_F):
+ * tests/CCSchedulerStateMachineTest.cpp:
+ (WebCore::StateMachine::setNeedsForcedCommit):
+ (WebCore::StateMachine::needsForcedCommit):
+ (StateMachine):
+ (WebCore::TEST):
+ (WebCore):
+
+2012-03-12 Joshua Bell <jsbell@chromium.org>
+
+ IndexedDB: Handle LevelDB database corruption
+ https://bugs.webkit.org/show_bug.cgi?id=79413
+
+ Reviewed by Tony Chang.
+
+ * WebKit.gyp: Skip LevelDBTest.cpp in shared component builds due to webkit_support dependency
+ * WebKit.gypi: Add LevelDBTest.cpp
+ * tests/LevelDBTest.cpp: Added.
+ (WebCore):
+ (SimpleComparator):
+ (WebCore::SimpleComparator::compare):
+ (WebCore::SimpleComparator::name):
+ (WebCore::encodeString):
+ (WebCore::TEST):
+
+2012-03-12 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Clean up culling tests and templatize to test impl constructs
+ https://bugs.webkit.org/show_bug.cgi?id=80613
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCOcclusionTrackerTest.cpp:
+ (WebCore::TestContentLayerChromium::TestContentLayerChromium):
+ (WebCore::TestContentLayerChromium::opaqueContentsRegion):
+ (WebCore::TestContentLayerChromium::setOpaqueContentsRect):
+ (TestContentLayerChromium):
+ (TestContentLayerImpl):
+ (WebCore::TestContentLayerImpl::TestContentLayerImpl):
+ (WebCore::TestContentLayerImpl::opaqueContentsRegion):
+ (WebCore::TestContentLayerImpl::setOpaqueContentsRect):
+ (WebCore):
+ (WebCore::TestCCOcclusionTrackerBase::TestCCOcclusionTrackerBase):
+ (WebCore::TestCCOcclusionTrackerBase::occlusionInScreenSpace):
+ (WebCore::TestCCOcclusionTrackerBase::occlusionInTargetSurface):
+ (WebCore::TestCCOcclusionTrackerBase::setOcclusionInScreenSpace):
+ (WebCore::TestCCOcclusionTrackerBase::setOcclusionInTargetSurface):
+ (WebCore::TestCCOcclusionTrackerBase::layerScissorRectInTargetSurface):
+ (WebCore::TestDamageClient::damageRect):
+ (CCOcclusionTrackerTestMainThreadTypes):
+ (WebCore::CCOcclusionTrackerTestMainThreadTypes::createLayer):
+ (WebCore::CCOcclusionTrackerTestMainThreadTypes::createContentLayer):
+ (CCOcclusionTrackerTestImplThreadTypes):
+ (WebCore::CCOcclusionTrackerTestImplThreadTypes::createLayer):
+ (WebCore::CCOcclusionTrackerTestImplThreadTypes::createContentLayer):
+ (CCOcclusionTrackerTest):
+ (WebCore::CCOcclusionTrackerTest::TearDown):
+ (WebCore::CCOcclusionTrackerTest::createRoot):
+ (WebCore::CCOcclusionTrackerTest::createLayer):
+ (WebCore::CCOcclusionTrackerTest::createSurface):
+ (WebCore::CCOcclusionTrackerTest::createDrawingLayer):
+ (WebCore::CCOcclusionTrackerTest::createDrawingSurface):
+ (WebCore::CCOcclusionTrackerTest::calcDrawEtc):
+ (WebCore::CCOcclusionTrackerTest::setBaseProperties):
+ (WebCore::CCOcclusionTrackerTest::setProperties):
+ (CCOcclusionTrackerTestIdentityTransforms):
+ (WebCore::CCOcclusionTrackerTestIdentityTransforms::runMyTest):
+ (CCOcclusionTrackerTestRotatedChild):
+ (WebCore::CCOcclusionTrackerTestRotatedChild::runMyTest):
+ (CCOcclusionTrackerTestTranslatedChild):
+ (WebCore::CCOcclusionTrackerTestTranslatedChild::runMyTest):
+ (CCOcclusionTrackerTestChildInRotatedChild):
+ (WebCore::CCOcclusionTrackerTestChildInRotatedChild::runMyTest):
+ (CCOcclusionTrackerTestVisitTargetTwoTimes):
+ (WebCore::CCOcclusionTrackerTestVisitTargetTwoTimes::runMyTest):
+ (CCOcclusionTrackerTestSurfaceRotatedOffAxis):
+ (WebCore::CCOcclusionTrackerTestSurfaceRotatedOffAxis::runMyTest):
+ (CCOcclusionTrackerTestSurfaceWithTwoOpaqueChildren):
+ (WebCore::CCOcclusionTrackerTestSurfaceWithTwoOpaqueChildren::runMyTest):
+ (CCOcclusionTrackerTestOverlappingSurfaceSiblings):
+ (WebCore::CCOcclusionTrackerTestOverlappingSurfaceSiblings::runMyTest):
+ (CCOcclusionTrackerTestOverlappingSurfaceSiblingsWithTwoTransforms):
+ (WebCore::CCOcclusionTrackerTestOverlappingSurfaceSiblingsWithTwoTransforms::runMyTest):
+ (CCOcclusionTrackerTestFilters):
+ (WebCore::CCOcclusionTrackerTestFilters::runMyTest):
+ (CCOcclusionTrackerTestLayerScissorRectOutsideChild):
+ (WebCore::CCOcclusionTrackerTestLayerScissorRectOutsideChild::runMyTest):
+ (CCOcclusionTrackerTestScreenScissorRectOutsideChild):
+ (WebCore::CCOcclusionTrackerTestScreenScissorRectOutsideChild::runMyTest):
+ (CCOcclusionTrackerTestDamageRectOutsideChild):
+ (WebCore::CCOcclusionTrackerTestDamageRectOutsideChild::runMyTest):
+ (CCOcclusionTrackerTestLayerScissorRectOverChild):
+ (WebCore::CCOcclusionTrackerTestLayerScissorRectOverChild::runMyTest):
+ (CCOcclusionTrackerTestScreenScissorRectOverChild):
+ (WebCore::CCOcclusionTrackerTestScreenScissorRectOverChild::runMyTest):
+ (CCOcclusionTrackerTestDamageRectOverChild):
+ (WebCore::CCOcclusionTrackerTestDamageRectOverChild::runMyTest):
+ (CCOcclusionTrackerTestLayerScissorRectPartlyOverChild):
+ (WebCore::CCOcclusionTrackerTestLayerScissorRectPartlyOverChild::runMyTest):
+ (CCOcclusionTrackerTestScreenScissorRectPartlyOverChild):
+ (WebCore::CCOcclusionTrackerTestScreenScissorRectPartlyOverChild::runMyTest):
+ (CCOcclusionTrackerTestDamageRectPartlyOverChild):
+ (WebCore::CCOcclusionTrackerTestDamageRectPartlyOverChild::runMyTest):
+ (CCOcclusionTrackerTestLayerScissorRectOverNothing):
+ (WebCore::CCOcclusionTrackerTestLayerScissorRectOverNothing::runMyTest):
+ (CCOcclusionTrackerTestScreenScissorRectOverNothing):
+ (WebCore::CCOcclusionTrackerTestScreenScissorRectOverNothing::runMyTest):
+ (CCOcclusionTrackerTestDamageRectOverNothing):
+ (WebCore::CCOcclusionTrackerTestDamageRectOverNothing::runMyTest):
+ (CCOcclusionTrackerTestLayerScissorRectForLayerOffOrigin):
+ (WebCore::CCOcclusionTrackerTestLayerScissorRectForLayerOffOrigin::runMyTest):
+ (CCOcclusionTrackerTestOpaqueContentsRegionEmpty):
+ (WebCore::CCOcclusionTrackerTestOpaqueContentsRegionEmpty::runMyTest):
+ (CCOcclusionTrackerTestOpaqueContentsRegionNonEmpty):
+ (WebCore::CCOcclusionTrackerTestOpaqueContentsRegionNonEmpty::runMyTest):
+
2012-03-11 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r110359.
diff --git a/Source/WebKit/chromium/DEPS b/Source/WebKit/chromium/DEPS
index 23e521aa7..15044b59e 100644
--- a/Source/WebKit/chromium/DEPS
+++ b/Source/WebKit/chromium/DEPS
@@ -32,7 +32,7 @@
vars = {
'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
- 'chromium_rev': '125600'
+ 'chromium_rev': '135601'
}
deps = {
@@ -121,6 +121,8 @@ deps = {
Var('chromium_svn')+'/ui@'+Var('chromium_rev'), # needed by app
# other third party
+ 'third_party/pyftpdlib/src':
+ From('chromium_deps', 'src/third_party/pyftpdlib/src'),
'third_party/icu':
From('chromium_deps', 'src/third_party/icu'),
'third_party/ots':
diff --git a/Source/WebKit/chromium/WebKit.gyp b/Source/WebKit/chromium/WebKit.gyp
index 1e1a41665..ea966b1f1 100644
--- a/Source/WebKit/chromium/WebKit.gyp
+++ b/Source/WebKit/chromium/WebKit.gyp
@@ -91,22 +91,18 @@
'WEBKIT_IMPLEMENTATION=1',
],
'sources': [
- 'bridge/MediaStreamCenter.cpp',
- 'bridge/MediaStreamCenterInternal.cpp',
- 'bridge/MediaStreamCenterInternal.h',
- 'bridge/PeerConnectionHandler.cpp',
- 'bridge/PeerConnectionHandlerInternal.cpp',
- 'bridge/PeerConnectionHandlerInternal.h',
+ '<@(webcore_platform_support_files)',
'public/WebAccessibilityNotification.h',
'public/WebAccessibilityObject.h',
'public/WebAccessibilityRole.h',
'public/WebAnimationController.h',
'public/WebApplicationCacheHostClient.h',
'public/WebArrayBuffer.h',
- 'public/WebAttribute.h',
'public/WebAudioSourceProvider.h',
'public/WebAudioSourceProviderClient.h',
'public/WebAutofillClient.h',
+ 'public/WebBatteryStatus.h',
+ 'public/WebBatteryStatusClient.h',
'public/WebBindings.h',
'public/WebBlob.h',
'public/WebCache.h',
@@ -173,11 +169,13 @@
'public/WebGeolocationPosition.h',
'public/WebGlyphCache.h',
'public/WebHistoryItem.h',
+ 'public/WebHitTestResult.h',
'public/WebIDBCallbacks.h',
'public/WebIDBCursor.h',
'public/WebIDBDatabase.h',
'public/WebIDBDatabaseCallbacks.h',
'public/WebIDBDatabaseError.h',
+ 'public/WebIDBDatabaseException.h',
'public/WebIDBFactory.h',
'public/WebIDBIndex.h',
'public/WebIDBKey.h',
@@ -196,7 +194,6 @@
'public/WebIntentServiceInfo.h',
'public/WebKit.h',
'public/WebLabelElement.h',
- 'public/WebMediaElement.h',
'public/WebMediaPlayer.h',
'public/WebMediaPlayerAction.h',
'public/WebMediaPlayerClient.h',
@@ -204,7 +201,6 @@
'public/WebMenuItemInfo.h',
'public/WebMessagePortChannel.h',
'public/WebMessagePortChannelClient.h',
- 'public/WebNamedNodeMap.h',
'public/WebNavigationType.h',
'public/WebNetworkStateNotifier.h',
'public/WebNode.h',
@@ -227,13 +223,15 @@
'public/WebPluginContainer.h',
'public/WebPluginDocument.h',
'public/WebPluginListBuilder.h',
+ 'public/WebPrintScalingOption.h',
'public/WebPopupMenu.h',
'public/WebPopupMenuInfo.h',
'public/WebPopupType.h',
+ 'public/WebPrerendererClient.h',
'public/WebRange.h',
- 'public/WebReferrerPolicy.h',
'public/WebRegularExpression.h',
'public/WebRuntimeFeatures.h',
+ 'public/WebScopedMicrotaskSuppression.h',
'public/WebScopedUserGesture.h',
'public/WebScreenInfo.h',
'public/WebScriptController.h',
@@ -250,23 +248,32 @@
'public/WebSharedWorkerRepository.h',
'public/WebSocket.h',
'public/WebSocketClient.h',
+ 'public/WebSpeechGrammar.h',
'public/WebSpeechInputController.h',
'public/WebSpeechInputListener.h',
'public/WebSpeechInputResult.h',
+ 'public/WebSpeechRecognitionHandle.h',
+ 'public/WebSpeechRecognitionParams.h',
+ 'public/WebSpeechRecognitionResult.h',
+ 'public/WebSpeechRecognizerClient.h',
+ 'public/WebSpeechRecognizer.h',
'public/WebSpellCheckClient.h',
'public/WebStorageArea.h',
'public/WebStorageEventDispatcher.h',
'public/WebStorageNamespace.h',
'public/WebStorageQuotaCallbacks.h',
'public/WebStorageQuotaType.h',
+ 'public/WebSurroundingText.h',
'public/WebStreamTextureClient.h',
'public/WebTextAffinity.h',
'public/WebTextCaseSensitivity.h',
'public/WebTextCheckingCompletion.h',
'public/WebTextCheckingResult.h',
'public/WebTextDirection.h',
+ 'public/WebTextFieldDecoratorClient.h',
'public/WebTextInputType.h',
'public/WebTextRun.h',
+ 'public/WebTimeRange.h',
'public/WebURLLoaderOptions.h',
'public/WebUserMediaClient.h',
'public/WebUserMediaRequest.h',
@@ -318,18 +325,12 @@
'public/platform/WebLayerTreeView.h',
'public/platform/WebLayerTreeViewClient.h',
'public/platform/WebLocalizedString.h',
- 'public/platform/WebMediaStreamCenter.h',
- 'public/platform/WebMediaStreamComponent.h',
- 'public/platform/WebMediaStreamDescriptor.h',
- 'public/platform/WebMediaStreamSource.h',
- 'public/platform/WebMediaStreamSourcesRequest.h',
'public/platform/WebNonCopyable.h',
- 'public/platform/WebPeerConnectionHandler.h',
- 'public/platform/WebPeerConnectionHandlerClient.h',
'public/platform/WebPoint.h',
'public/platform/WebPrivateOwnPtr.h',
'public/platform/WebPrivatePtr.h',
'public/platform/WebRect.h',
+ 'public/platform/WebReferrerPolicy.h',
'public/platform/WebSerializedScriptValue.h',
'public/platform/WebSize.h',
'public/platform/WebSocketStreamError.h',
@@ -373,6 +374,8 @@
'src/AutofillPopupMenuClient.h',
'src/BackForwardListChromium.cpp',
'src/BackForwardListChromium.h',
+ 'src/BatteryClientImpl.cpp',
+ 'src/BatteryClientImpl.h',
'src/BlobRegistryProxy.cpp',
'src/BlobRegistryProxy.h',
'src/CCThreadImpl.cpp',
@@ -458,10 +461,11 @@
'src/PageOverlay.h',
'src/PageOverlayList.cpp',
'src/PageOverlayList.h',
+ 'src/PageWidgetDelegate.cpp',
+ 'src/PageWidgetDelegate.h',
'src/PlatformMessagePortChannel.cpp',
'src/PlatformMessagePortChannel.h',
'src/PlatformSupport.cpp',
- 'src/ResourceHandle.cpp',
'src/ScrollbarGroup.cpp',
'src/ScrollbarGroup.h',
'src/SharedWorkerRepository.cpp',
@@ -469,28 +473,27 @@
'src/SocketStreamHandleInternal.h',
'src/SpeechInputClientImpl.cpp',
'src/SpeechInputClientImpl.h',
+ 'src/SpeechRecognitionClientProxy.cpp',
+ 'src/SpeechRecognitionClientProxy.h',
'src/StorageAreaProxy.cpp',
'src/StorageAreaProxy.h',
- 'src/StorageEventDispatcherChromium.cpp',
'src/StorageEventDispatcherImpl.cpp',
'src/StorageEventDispatcherImpl.h',
'src/StorageInfoChromium.cpp',
'src/StorageNamespaceProxy.cpp',
'src/StorageNamespaceProxy.h',
+ 'src/TextFieldDecoratorImpl.h',
+ 'src/TextFieldDecoratorImpl.cpp',
'src/UserMediaClientImpl.h',
'src/UserMediaClientImpl.cpp',
'src/WebTextCheckingCompletionImpl.h',
'src/WebTextCheckingCompletionImpl.cpp',
'src/WebTextCheckingResult.cpp',
- 'src/VideoFrameChromiumImpl.cpp',
- 'src/VideoFrameChromiumImpl.h',
'src/WebAccessibilityObject.cpp',
'src/WebAnimationControllerImpl.cpp',
'src/WebAnimationControllerImpl.h',
'src/WebArrayBuffer.cpp',
'src/WebArrayBufferView.cpp',
- 'src/WebAttribute.cpp',
- 'src/WebAudioBus.cpp',
'src/WebBindings.cpp',
'src/WebBlob.cpp',
'src/WebBlobData.cpp',
@@ -516,7 +519,6 @@
'src/WebDOMMouseEvent.cpp',
'src/WebDOMMutationEvent.cpp',
'src/WebDOMStringList.cpp',
- 'src/WebData.cpp',
'src/WebDatabase.cpp',
'src/WebDataSourceImpl.cpp',
'src/WebDataSourceImpl.h',
@@ -534,8 +536,6 @@
'src/WebEntities.cpp',
'src/WebEntities.h',
'src/WebExternalTextureLayer.cpp',
- 'src/WebExternalTextureLayerImpl.cpp',
- 'src/WebExternalTextureLayerImpl.h',
'src/WebFileChooserCompletionImpl.cpp',
'src/WebFileChooserCompletionImpl.h',
'src/WebFileSystemCallbacksImpl.cpp',
@@ -557,8 +557,7 @@
'src/WebGlyphCache.cpp',
'src/WebGraphicsContext3D.cpp',
'src/WebHistoryItem.cpp',
- 'src/WebHTTPBody.cpp',
- 'src/WebHTTPLoadInfo.cpp',
+ 'src/WebHitTestResult.cpp',
'src/WebIconLoadingCompletionImpl.cpp',
'src/WebIconLoadingCompletionImpl.h',
'src/WebIDBCallbacksImpl.cpp',
@@ -583,6 +582,7 @@
'src/WebIDBTransactionImpl.h',
'src/WebIDBTransactionCallbacksImpl.cpp',
'src/WebIDBTransactionCallbacksImpl.h',
+ 'src/WebIOSurfaceLayer.cpp',
'src/WebImageCG.cpp',
'src/WebImageDecoder.cpp',
'src/WebImageSkia.cpp',
@@ -601,15 +601,9 @@
'src/WebLayerTreeView.cpp',
'src/WebLayerTreeViewImpl.cpp',
'src/WebLayerTreeViewImpl.h',
- 'src/WebMediaElement.cpp',
'src/WebMediaPlayerClientImpl.cpp',
'src/WebMediaPlayerClientImpl.h',
- 'src/WebMediaStreamComponent.cpp',
- 'src/WebMediaStreamDescriptor.cpp',
'src/WebMediaStreamRegistry.cpp',
- 'src/WebMediaStreamSource.cpp',
- 'src/WebMediaStreamSourcesRequest.cpp',
- 'src/WebNamedNodeMap.cpp',
'src/WebNetworkStateNotifier.cpp',
'src/WebNode.cpp',
'src/WebNodeCollection.cpp',
@@ -617,6 +611,7 @@
'src/WebNotification.cpp',
'src/WebOptionElement.cpp',
'src/WebPagePopupImpl.cpp',
+ 'src/WebPagePopupImpl.h',
'src/WebPageSerializer.cpp',
'src/WebPageSerializerImpl.cpp',
'src/WebPageSerializerImpl.h',
@@ -636,6 +631,7 @@
'src/WebRange.cpp',
'src/WebRegularExpression.cpp',
'src/WebRuntimeFeatures.cpp',
+ 'src/WebScopedMicrotaskSuppression.cpp',
'src/WebScopedUserGesture.cpp',
'src/WebScriptController.cpp',
'src/WebScrollbarImpl.cpp',
@@ -645,6 +641,7 @@
'src/WebSecurityPolicy.cpp',
'src/WebSelectElement.cpp',
'src/WebSerializedScriptValue.cpp',
+ 'src/WebSessionDescriptionDescriptor.cpp',
'src/WebSettingsImpl.cpp',
'src/WebSettingsImpl.h',
'src/WebSharedWorkerImpl.cpp',
@@ -654,26 +651,20 @@
'src/WebSocketImpl.h',
'src/WebSolidColorLayer.cpp',
'src/WebSolidColorLayerImpl.cpp',
+ 'src/WebSpeechGrammar.cpp',
'src/WebSpeechInputResult.cpp',
- 'src/WebStorageAreaImpl.cpp',
- 'src/WebStorageAreaImpl.h',
+ 'src/WebSpeechRecognitionHandle.cpp',
+ 'src/WebSpeechRecognitionResult.cpp',
'src/WebStorageEventDispatcherImpl.cpp',
'src/WebStorageEventDispatcherImpl.h',
- 'src/WebStorageNamespaceImpl.cpp',
- 'src/WebStorageNamespaceImpl.h',
'src/WebStorageQuotaCallbacksImpl.cpp',
'src/WebStorageQuotaCallbacksImpl.h',
+ 'src/WebSurroundingText.cpp',
'src/WebTextRun.cpp',
- 'src/WebThreadSafeData.cpp',
- 'src/WebURL.cpp',
'src/WebURLLoadTiming.cpp',
- 'src/WebURLRequest.cpp',
- 'src/WebURLRequestPrivate.h',
- 'src/WebURLResponse.cpp',
- 'src/WebURLResponsePrivate.h',
- 'src/WebURLError.cpp',
'src/WebScopedUserGesture.cpp',
'src/WebUserMediaRequest.cpp',
+ 'src/WebVideoLayer.cpp',
'src/WebViewImpl.cpp',
'src/WebViewImpl.h',
'src/WebWorkerBase.cpp',
@@ -690,8 +681,6 @@
'src/WorkerFileSystemCallbacksBridge.h',
'src/WorkerFileWriterCallbacksBridge.cpp',
'src/WorkerFileWriterCallbacksBridge.h',
- 'src/WrappedResourceRequest.h',
- 'src/WrappedResourceResponse.h',
'src/win/WebInputEventFactory.cpp',
'src/win/WebScreenInfoFactory.cpp',
],
@@ -748,8 +737,10 @@
# functions defined only in !WEBKIT_IMPLEMENTATION.
'tests/AssociatedURLLoaderTest.cpp',
'tests/FrameTestHelpers.cpp',
+ 'tests/LevelDBTest.cpp',
'tests/PopupMenuTest.cpp',
'tests/RenderTableCellTest.cpp',
+ 'tests/RenderTableRowTest.cpp',
'tests/WebFrameTest.cpp',
'tests/WebPageNewSerializerTest.cpp',
'tests/WebPageSerializerTest.cpp',
@@ -1107,10 +1098,10 @@
'inputs': [
'<@(_script_name)',
'<@(_input_file)',
- '../../WebCore/inspector/front-end/BinarySearch.js',
'../../WebCore/inspector/front-end/HeapSnapshot.js',
+ '../../WebCore/inspector/front-end/HeapSnapshotLoader.js',
'../../WebCore/inspector/front-end/HeapSnapshotWorkerDispatcher.js',
- '../../WebCore/inspector/front-end/PartialQuickSort.js',
+ '../../WebCore/inspector/front-end/utilities.js',
],
'search_path': '../../WebCore/inspector/front-end',
'outputs': ['<(PRODUCT_DIR)/resources/inspector/HeapSnapshotWorker.js'],
diff --git a/Source/WebKit/chromium/WebKit.gypi b/Source/WebKit/chromium/WebKit.gypi
index 87d41bfb9..f85d97920 100644
--- a/Source/WebKit/chromium/WebKit.gypi
+++ b/Source/WebKit/chromium/WebKit.gypi
@@ -67,7 +67,6 @@
'tests/CCDelayBasedTimeSourceTest.cpp',
'tests/CCFrameRateControllerTest.cpp',
'tests/CCKeyframedAnimationCurveTest.cpp',
- 'tests/CCLayerAnimationControllerImplTest.cpp',
'tests/CCLayerAnimationControllerTest.cpp',
'tests/CCLayerImplTest.cpp',
'tests/CCLayerIteratorTest.cpp',
@@ -79,7 +78,9 @@
'tests/CCLayerTreeHostImplTest.cpp',
'tests/CCLayerTreeHostTest.cpp',
'tests/CCLayerTreeTestCommon.h',
+ 'tests/CCMathUtilTest.cpp',
'tests/CCOcclusionTrackerTest.cpp',
+ 'tests/CCOcclusionTrackerTestCommon.h',
'tests/CCQuadCullerTest.cpp',
'tests/CCRenderSurfaceTest.cpp',
'tests/CCSchedulerStateMachineTest.cpp',
@@ -87,12 +88,15 @@
'tests/CCSchedulerTest.cpp',
'tests/CCSolidColorLayerImplTest.cpp',
'tests/CCTiledLayerImplTest.cpp',
+ 'tests/CCTiledLayerTestCommon.h',
+ 'tests/CCTiledLayerTestCommon.cpp',
'tests/CCThreadTaskTest.cpp',
'tests/CCTimerTest.cpp',
'tests/ClipboardChromiumTest.cpp',
'tests/CompositorFakeGraphicsContext3D.h',
'tests/CompositorFakeWebGraphicsContext3D.h',
'tests/DragImageTest.cpp',
+ 'tests/DrawingBufferChromiumTest.cpp',
'tests/FakeCCLayerTreeHostClient.h',
'tests/FakeGraphicsContext3DTest.cpp',
'tests/FakeWebGraphicsContext3D.h',
@@ -106,16 +110,22 @@
'tests/KeyboardTest.cpp',
'tests/KURLTest.cpp',
'tests/LayerChromiumTest.cpp',
+ 'tests/LayerRendererChromiumTest.cpp',
'tests/LayerTextureUpdaterTest.cpp',
+ 'tests/LevelDBTest.cpp',
'tests/LocalizedNumberICUTest.cpp',
+ 'tests/MockCCQuadCuller.h',
'tests/PaintAggregatorTest.cpp',
'tests/PlatformGestureCurveTest.cpp',
'tests/PlatformContextSkiaTest.cpp',
'tests/PODArenaTest.cpp',
'tests/PODIntervalTreeTest.cpp',
'tests/PODRedBlackTreeTest.cpp',
+ 'tests/RegionTest.cpp',
'tests/RenderTableCellTest.cpp',
+ 'tests/RenderTableRowTest.cpp',
'tests/ScrollbarLayerChromiumTest.cpp',
+ 'tests/TextureCopierTest.cpp',
'tests/TextureManagerTest.cpp',
'tests/TiledLayerChromiumTest.cpp',
'tests/TilingDataTest.cpp',
@@ -123,10 +133,9 @@
'tests/TreeTestHelpers.cpp',
'tests/TreeTestHelpers.h',
'tests/WebCompositorInputHandlerImplTest.cpp',
- 'tests/WebExternalTextureLayerImplTest.cpp',
'tests/WebFrameTest.cpp',
- 'tests/WebGLLayerChromiumTest.cpp',
'tests/WebLayerTest.cpp',
+ 'tests/WebMediaPlayerClientImplTest.cpp',
'tests/WebPageNewSerializerTest.cpp',
'tests/WebPageSerializerTest.cpp',
'tests/WebSocketDeflaterTest.cpp',
@@ -139,6 +148,7 @@
'conditions': [
['OS=="win"', {
'webkit_unittest_files': [
+ 'tests/LocaleWinTest.cpp',
# FIXME: Port PopupMenuTest to Linux and Mac.
'tests/PopupMenuTest.cpp',
'tests/TransparencyWinTest.cpp',
diff --git a/Source/WebKit/chromium/WebKitUnitTests.gyp b/Source/WebKit/chromium/WebKitUnitTests.gyp
index d50ad1523..6f1ed11c7 100644
--- a/Source/WebKit/chromium/WebKitUnitTests.gyp
+++ b/Source/WebKit/chromium/WebKitUnitTests.gyp
@@ -55,7 +55,8 @@
'msvs_guid': '7CEFE800-8403-418A-AD6A-2D52C6FC3EAD',
'dependencies': [
'WebKit.gyp:webkit',
- '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
+ '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
+ '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
'<(chromium_src_dir)/testing/gtest.gyp:gtest',
'<(chromium_src_dir)/testing/gmock.gyp:gmock',
'<(chromium_src_dir)/base/base.gyp:base',
@@ -71,6 +72,11 @@
'include_dirs': [
'public',
'src',
+ # WebKit unit tests are allowed to include WebKit and WebCore header files, which may include headers in the
+ # Platform API as <public/WebFoo.h>. Thus we need to have the Platform API include path, but we can't depend
+ # directly on Platform.gyp:webkit_platform since platform cannot link as a separate library. Instead, we just
+ # add the include path directly.
+ '../../Platform/chromium',
],
'conditions': [
['inside_chromium_build==1 and component=="shared_library"', {
@@ -78,6 +84,9 @@
'WEBKIT_DLL_UNITTEST',
],
}, {
+ 'dependencies': [
+ '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
+ ],
'sources': [
'<@(webkit_unittest_files)',
],
diff --git a/Source/WebKit/chromium/bridge/MediaStreamCenterInternal.cpp b/Source/WebKit/chromium/bridge/MediaStreamCenterInternal.cpp
deleted file mode 100644
index a8693b479..000000000
--- a/Source/WebKit/chromium/bridge/MediaStreamCenterInternal.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2012 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"
-
-#if ENABLE(MEDIA_STREAM)
-
-#include "MediaStreamCenterInternal.h"
-
-#include "MediaStreamCenter.h"
-#include "MediaStreamComponent.h"
-#include "MediaStreamSource.h"
-#include "WebKit.h"
-#include "platform/WebKitPlatformSupport.h"
-#include "platform/WebMediaStreamCenter.h"
-#include "platform/WebMediaStreamComponent.h"
-#include "platform/WebMediaStreamDescriptor.h"
-#include "platform/WebMediaStreamSourcesRequest.h"
-#include <wtf/PassOwnPtr.h>
-
-namespace WebCore {
-
-MediaStreamCenterInternal::MediaStreamCenterInternal(MediaStreamCenter* owner)
- : m_private(adoptPtr(WebKit::webKitPlatformSupport()->createMediaStreamCenter(this)))
- , m_owner(owner)
-{
-}
-
-MediaStreamCenterInternal::~MediaStreamCenterInternal()
-{
-}
-
-void MediaStreamCenterInternal::queryMediaStreamSources(PassRefPtr<MediaStreamSourcesQueryClient> client)
-{
- // FIXME: Remove this "short-circuit" and forward to m_private when Chrome has implemented WebMediaStreamCenter.
- MediaStreamSourceVector audioSources, videoSources;
- client->didCompleteQuery(audioSources, videoSources);
-}
-
-void MediaStreamCenterInternal::didSetMediaStreamTrackEnabled(MediaStreamDescriptor* stream, MediaStreamComponent* component)
-{
- if (m_private) {
- if (component->enabled())
- m_private->didEnableMediaStreamTrack(stream, component);
- else
- m_private->didDisableMediaStreamTrack(stream, component);
- }
-}
-
-void MediaStreamCenterInternal::didStopLocalMediaStream(MediaStreamDescriptor* stream)
-{
- if (m_private)
- m_private->didStopLocalMediaStream(stream);
-}
-
-void MediaStreamCenterInternal::didConstructMediaStream(MediaStreamDescriptor* stream)
-{
- if (m_private)
- m_private->didConstructMediaStream(stream);
-}
-
-void MediaStreamCenterInternal::stopLocalMediaStream(const WebKit::WebMediaStreamDescriptor& stream)
-{
- m_owner->endLocalMediaStream(stream);
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM)
diff --git a/Source/WebKit/chromium/bridge/PeerConnectionHandler.cpp b/Source/WebKit/chromium/bridge/PeerConnectionHandler.cpp
deleted file mode 100644
index c59b2d46c..000000000
--- a/Source/WebKit/chromium/bridge/PeerConnectionHandler.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2011 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"
-
-#if ENABLE(MEDIA_STREAM)
-
-#include "PeerConnectionHandler.h"
-
-#include "PeerConnectionHandlerClient.h"
-#include "PeerConnectionHandlerInternal.h"
-
-namespace WebCore {
-
-PassOwnPtr<PeerConnectionHandler> PeerConnectionHandler::create(PeerConnectionHandlerClient* client, const String& serverConfiguration, const String& username)
-{
- return adoptPtr(new PeerConnectionHandler(client, serverConfiguration, username));
-}
-
-PeerConnectionHandler::PeerConnectionHandler(PeerConnectionHandlerClient* client, const String& serverConfiguration, const String& username)
- : m_private(adoptPtr(new PeerConnectionHandlerInternal(client, serverConfiguration, username)))
-{
-}
-
-PeerConnectionHandler::~PeerConnectionHandler()
-{
-}
-
-void PeerConnectionHandler::produceInitialOffer(const MediaStreamDescriptorVector& pendingAddStreams)
-{
- m_private->produceInitialOffer(pendingAddStreams);
-}
-
-void PeerConnectionHandler::handleInitialOffer(const String& sdp)
-{
- m_private->handleInitialOffer(sdp);
-}
-
-void PeerConnectionHandler::processSDP(const String& sdp)
-{
- m_private->processSDP(sdp);
-}
-
-void PeerConnectionHandler::processPendingStreams(const MediaStreamDescriptorVector& pendingAddStreams, const MediaStreamDescriptorVector& pendingRemoveStreams)
-{
- m_private->processPendingStreams(pendingAddStreams, pendingRemoveStreams);
-}
-
-void PeerConnectionHandler::sendDataStreamMessage(const char* data, size_t length)
-{
- m_private->sendDataStreamMessage(data, length);
-}
-
-void PeerConnectionHandler::stop()
-{
- m_private->stop();
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM)
diff --git a/Source/WebKit/chromium/bridge/PeerConnectionHandlerInternal.cpp b/Source/WebKit/chromium/bridge/PeerConnectionHandlerInternal.cpp
deleted file mode 100644
index d8f61f7f0..000000000
--- a/Source/WebKit/chromium/bridge/PeerConnectionHandlerInternal.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (C) 2011 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"
-
-#if ENABLE(MEDIA_STREAM)
-
-#include "PeerConnectionHandlerInternal.h"
-
-#include "PeerConnectionHandlerClient.h"
-#include "SecurityOrigin.h"
-#include "WebKit.h"
-#include "platform/WebKitPlatformSupport.h"
-#include "platform/WebMediaStreamDescriptor.h"
-#include "platform/WebPeerConnectionHandler.h"
-#include "platform/WebPeerConnectionHandlerClient.h"
-#include <wtf/PassOwnPtr.h>
-
-namespace WebCore {
-
-PeerConnectionHandlerInternal::PeerConnectionHandlerInternal(PeerConnectionHandlerClient* client, const String& serverConfiguration, const String& username)
- : m_client(client)
-{
- ASSERT(m_client);
- m_webHandler = adoptPtr(WebKit::webKitPlatformSupport()->createPeerConnectionHandler(this));
- // FIXME: When there is some error reporting avaliable in the PeerConnection object report
- // if we didn't get a WebPeerConnectionHandler instance.
-
- if (m_webHandler) {
- // Dual calls due to API change
- m_webHandler->initialize(serverConfiguration, username);
-
- // DEPRECATED
- m_webHandler->initialize(serverConfiguration, SecurityOrigin::createFromString(username));
- }
-}
-
-PeerConnectionHandlerInternal::~PeerConnectionHandlerInternal()
-{
-}
-
-void PeerConnectionHandlerInternal::produceInitialOffer(const MediaStreamDescriptorVector& pendingAddStreams)
-{
- if (m_webHandler)
- m_webHandler->produceInitialOffer(pendingAddStreams);
-}
-
-void PeerConnectionHandlerInternal::handleInitialOffer(const String& sdp)
-{
- if (m_webHandler)
- m_webHandler->handleInitialOffer(sdp);
-}
-
-void PeerConnectionHandlerInternal::processSDP(const String& sdp)
-{
- if (m_webHandler)
- m_webHandler->processSDP(sdp);
-}
-
-void PeerConnectionHandlerInternal::processPendingStreams(const MediaStreamDescriptorVector& pendingAddStreams, const MediaStreamDescriptorVector& pendingRemoveStreams)
-{
- if (m_webHandler)
- m_webHandler->processPendingStreams(pendingAddStreams, pendingRemoveStreams);
-}
-
-void PeerConnectionHandlerInternal::sendDataStreamMessage(const char* data, size_t length)
-{
- if (m_webHandler)
- m_webHandler->sendDataStreamMessage(data, length);
-}
-
-void PeerConnectionHandlerInternal::stop()
-{
- if (m_webHandler)
- m_webHandler->stop();
-}
-
-void PeerConnectionHandlerInternal::didCompleteICEProcessing()
-{
- if (m_webHandler)
- m_client->didCompleteICEProcessing();
-}
-
-void PeerConnectionHandlerInternal::didGenerateSDP(const WebKit::WebString& sdp)
-{
- if (m_webHandler)
- m_client->didGenerateSDP(sdp);
-}
-
-void PeerConnectionHandlerInternal::didReceiveDataStreamMessage(const char* data, size_t length)
-{
- if (m_webHandler)
- m_client->didReceiveDataStreamMessage(data, length);
-}
-
-void PeerConnectionHandlerInternal::didAddRemoteStream(const WebKit::WebMediaStreamDescriptor& webMediaStreamDescriptor)
-{
- if (m_webHandler)
- m_client->didAddRemoteStream(webMediaStreamDescriptor);
-}
-
-void PeerConnectionHandlerInternal::didRemoveRemoteStream(const WebKit::WebMediaStreamDescriptor& webMediaStreamDescriptor)
-{
- if (m_webHandler)
- m_client->didRemoveRemoteStream(webMediaStreamDescriptor);
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM)
diff --git a/Source/WebKit/chromium/bridge/PeerConnectionHandlerInternal.h b/Source/WebKit/chromium/bridge/PeerConnectionHandlerInternal.h
deleted file mode 100644
index e17fd96b5..000000000
--- a/Source/WebKit/chromium/bridge/PeerConnectionHandlerInternal.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2011 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 PeerConnectionHandlerInternal_h
-#define PeerConnectionHandlerInternal_h
-
-#if ENABLE(MEDIA_STREAM)
-
-#include "MediaStreamDescriptor.h"
-#include "platform/WebPeerConnectionHandlerClient.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebKit {
-class WebPeerConnectionHandler;
-class WebString;
-class WebMediaStreamDescriptor;
-}
-
-namespace WebCore {
-
-class PeerConnectionHandlerClient;
-
-class PeerConnectionHandlerInternal : public WebKit::WebPeerConnectionHandlerClient {
-public:
- PeerConnectionHandlerInternal(PeerConnectionHandlerClient*, const String& serverConfiguration, const String& username);
- ~PeerConnectionHandlerInternal();
-
- virtual void produceInitialOffer(const MediaStreamDescriptorVector& pendingAddStreams);
- virtual void handleInitialOffer(const String& sdp);
- virtual void processSDP(const String& sdp);
- virtual void processPendingStreams(const MediaStreamDescriptorVector& pendingAddStreams, const MediaStreamDescriptorVector& pendingRemoveStreams);
- virtual void sendDataStreamMessage(const char* data, size_t length);
- virtual void stop();
-
- // WebKit::WebPeerConnectionHandlerClient implementation.
- virtual void didCompleteICEProcessing();
- virtual void didGenerateSDP(const WebKit::WebString& sdp);
- virtual void didReceiveDataStreamMessage(const char* data, size_t length);
- virtual void didAddRemoteStream(const WebKit::WebMediaStreamDescriptor&);
- virtual void didRemoveRemoteStream(const WebKit::WebMediaStreamDescriptor&);
-
-private:
- OwnPtr<WebKit::WebPeerConnectionHandler> m_webHandler;
- PeerConnectionHandlerClient* m_client;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM)
-
-#endif // PeerConnectionHandlerInternal_h
diff --git a/Source/WebKit/chromium/features.gypi b/Source/WebKit/chromium/features.gypi
index 5a033c8cf..86054fac1 100644
--- a/Source/WebKit/chromium/features.gypi
+++ b/Source/WebKit/chromium/features.gypi
@@ -33,17 +33,21 @@
'variables': {
'feature_defines': [
'ENABLE_3D_PLUGIN=1',
+ 'ENABLE_BATTERY_STATUS=0',
'ENABLE_BLOB=1',
'ENABLE_BLOB_SLICE=1',
'ENABLE_CHANNEL_MESSAGING=1',
- 'ENABLE_CLIENT_BASED_GEOLOCATION=1',
'ENABLE_CSS_FILTERS=1',
+ 'ENABLE_CSS_IMAGE_SET=1',
+ 'ENABLE_CSS_SHADERS=1',
+ 'ENABLE_DATALIST=1',
'ENABLE_DASHBOARD_SUPPORT=0',
'ENABLE_DATA_TRANSFER_ITEMS=1',
'ENABLE_DETAILS=1',
'ENABLE_DEVICE_ORIENTATION=1',
'ENABLE_DIRECTORY_UPLOAD=1',
'ENABLE_DOWNLOAD_ATTRIBUTE=1',
+ 'ENABLE_ENCRYPTED_MEDIA=1',
'ENABLE_FILE_SYSTEM=1',
'ENABLE_FILTERS=1',
'ENABLE_FULLSCREEN_API=1',
@@ -52,10 +56,8 @@
'ENABLE_GESTURE_EVENTS=1',
'ENABLE_ICONDATABASE=0',
'ENABLE_INDEXED_DATABASE=1',
- 'ENABLE_INPUT_COLOR=0',
'ENABLE_INPUT_SPEECH=1',
- 'ENABLE_INPUT_TYPE_COLOR=0',
- 'ENABLE_INPUT_TYPE_DATE=0',
+ 'ENABLE_INPUT_TYPE_DATE=1',
'ENABLE_INPUT_TYPE_DATETIME=0',
'ENABLE_INPUT_TYPE_DATETIMELOCAL=0',
'ENABLE_INPUT_TYPE_MONTH=0',
@@ -63,8 +65,11 @@
'ENABLE_INPUT_TYPE_WEEK=0',
'ENABLE_JAVASCRIPT_DEBUGGER=1',
'ENABLE_JAVASCRIPT_I18N_API=1',
+ 'ENABLE_LEGACY_CSS_VENDOR_PREFIXES=0',
'ENABLE_LEGACY_NOTIFICATIONS=1',
+ 'ENABLE_LEGACY_WEBKIT_BLOB_BUILDER=1',
'ENABLE_LINK_PREFETCH=1',
+ 'ENABLE_LINK_PRERENDER=1',
'ENABLE_MEDIA_SOURCE=1',
'ENABLE_MEDIA_STATISTICS=1',
'ENABLE_MEDIA_STREAM=1',
@@ -95,7 +100,7 @@
'ENABLE_V8_SCRIPT_DEBUG_SERVER=1',
'ENABLE_VIDEO=1',
'ENABLE_VIDEO_TRACK=1',
- 'ENABLE_VIEWPORT=<(enable_viewport)',
+ 'ENABLE_VIEWPORT=1',
'ENABLE_WEBGL=1',
'ENABLE_WEB_SOCKETS=1',
'ENABLE_WEB_TIMING=1',
@@ -131,13 +136,27 @@
'conditions': [
['OS=="android"', {
'feature_defines': [
+ 'ENABLE_CALENDAR_PICKER=0',
+ 'ENABLE_PAGE_POPUP=0',
'ENABLE_WEB_AUDIO=0',
+ 'WTF_USE_NATIVE_FULLSCREEN_VIDEO=1',
],
}, {
'feature_defines': [
+ 'ENABLE_CALENDAR_PICKER=1',
+ 'ENABLE_PAGE_POPUP=1',
'ENABLE_WEB_AUDIO=1',
],
}],
+ ['OS=="android" or chromeos==1', {
+ 'feature_defines': [
+ 'ENABLE_INPUT_TYPE_COLOR=0',
+ ],
+ }, {
+ 'feature_defines': [
+ 'ENABLE_INPUT_TYPE_COLOR=1',
+ ],
+ }],
['use_accelerated_compositing==1', {
'feature_defines': [
'WTF_USE_ACCELERATED_COMPOSITING=1',
diff --git a/Source/WebKit/chromium/gyp_webkit b/Source/WebKit/chromium/gyp_webkit
index 2e73f4ea6..36f0f431b 100755
--- a/Source/WebKit/chromium/gyp_webkit
+++ b/Source/WebKit/chromium/gyp_webkit
@@ -87,7 +87,6 @@ if __name__ == '__main__':
envsetup_location = os.path.join(chrome_src, 'build', 'android', 'envsetup.sh')
exit(subprocess.call(['bash', '-c', 'source %s && python gyp_webkit --no-envsetup-recursion %s' % (envsetup_location, ' '.join(args))]))
else:
- os.environ['CC.target'] = os.environ['CROSS_CC']
args.remove('--no-envsetup-recursion')
# Add includes.
@@ -120,6 +119,7 @@ if __name__ == '__main__':
'-Dinside_chromium_build=0',
'-Dv8_use_snapshot=false',
'-Dmsvs_use_common_release=0',
+ '-Gmsvs_error_on_missing_sources=1',
# WebKit doesn't use the chromium style checker.
'-Dmake_clang_dir=Source/WebKit/chromium/third_party/llvm-build/Release+Asserts',
diff --git a/Source/WebKit/chromium/public/WebAccessibilityRole.h b/Source/WebKit/chromium/public/WebAccessibilityRole.h
index 196845730..60958f910 100644
--- a/Source/WebKit/chromium/public/WebAccessibilityRole.h
+++ b/Source/WebKit/chromium/public/WebAccessibilityRole.h
@@ -67,6 +67,7 @@ enum WebAccessibilityRole {
WebAccessibilityRoleDocumentRegion,
WebAccessibilityRoleDrawer,
WebAccessibilityRoleEditableText,
+ WebAccessibilityRoleFooter,
WebAccessibilityRoleForm,
WebAccessibilityRoleGrid,
WebAccessibilityRoleGroup,
diff --git a/Source/WebKit/chromium/public/WebActiveWheelFlingParameters.h b/Source/WebKit/chromium/public/WebActiveWheelFlingParameters.h
new file mode 100644
index 000000000..ef277d5fd
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebActiveWheelFlingParameters.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * 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 WebActiveWheelFlingParameters_h
+#define WebActiveWheelFlingParameters_h
+
+#include "platform/WebCommon.h"
+
+#include "platform/WebFloatPoint.h"
+#include "platform/WebPoint.h"
+#include "platform/WebSize.h"
+
+namespace WebKit {
+
+struct WebActiveWheelFlingParameters {
+ WebFloatPoint delta;
+ WebPoint point;
+ WebPoint globalPoint;
+ int modifiers;
+ WebSize cumulativeScroll;
+ double startTime;
+
+ WebActiveWheelFlingParameters()
+ : modifiers(0)
+ , startTime(0)
+ {
+ }
+};
+
+}
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebArrayBuffer.h b/Source/WebKit/chromium/public/WebArrayBuffer.h
index 81c9cb83b..85ba2c30f 100644
--- a/Source/WebKit/chromium/public/WebArrayBuffer.h
+++ b/Source/WebKit/chromium/public/WebArrayBuffer.h
@@ -68,6 +68,7 @@ public:
#if WEBKIT_USING_V8
WEBKIT_EXPORT v8::Handle<v8::Value> toV8Value();
+ WEBKIT_EXPORT static WebArrayBuffer* createFromV8Value(v8::Handle<v8::Value>);
#endif
#if WEBKIT_IMPLEMENTATION
diff --git a/Source/WebKit/chromium/public/WebAttribute.h b/Source/WebKit/chromium/public/WebAttribute.h
deleted file mode 100644
index ff4b3a7f8..000000000
--- a/Source/WebKit/chromium/public/WebAttribute.h
+++ /dev/null
@@ -1,74 +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 WebAttribute_h
-#define WebAttribute_h
-
-#include "platform/WebCommon.h"
-#include "platform/WebPrivatePtr.h"
-
-namespace WebCore { class Attribute; }
-#if WEBKIT_IMPLEMENTATION
-namespace WTF { template <typename T> class PassRefPtr; }
-#endif
-
-namespace WebKit {
-class WebString;
-
-// Provides readonly access to some properties of a DOM attribute.
-class WebAttribute {
-public:
- ~WebAttribute() { reset(); }
-
- WebAttribute() { }
- WebAttribute(const WebAttribute& n) { assign(n); }
- WebAttribute& operator=(const WebAttribute& n)
- {
- assign(n);
- return *this;
- }
-
- WEBKIT_EXPORT void reset();
- WEBKIT_EXPORT void assign(const WebAttribute&);
-
- WEBKIT_EXPORT WebString localName() const;
- WEBKIT_EXPORT WebString value() const;
-
-#if WEBKIT_IMPLEMENTATION
- WebAttribute(const WTF::PassRefPtr<WebCore::Attribute>&);
-#endif
-
-private:
- WebPrivatePtr<WebCore::Attribute> m_private;
-};
-
-} // namespace WebKit
-
-#endif
diff --git a/Source/WebKit/chromium/public/WebAutofillClient.h b/Source/WebKit/chromium/public/WebAutofillClient.h
index 5824f170a..7b48f57db 100644
--- a/Source/WebKit/chromium/public/WebAutofillClient.h
+++ b/Source/WebKit/chromium/public/WebAutofillClient.h
@@ -40,16 +40,26 @@ class WebString;
class WebAutofillClient {
public:
+ enum {
+ MenuItemIDAutocompleteEntry = 0,
+ MenuItemIDWarningMessage = -1,
+ MenuItemIDPasswordEntry = -2,
+ MenuItemIDSeparator = -3,
+ MenuItemIDClearForm = -4,
+ MenuItemIDAutofillOptions = -5,
+ MenuItemIDDataListEntry = -6
+ };
+
// Informs the browser that the user has accepted an Autofill suggestion for
- // a WebNode. |uniqueID| is used as a key into the set of Autofill profiles,
- // and should never be negative. If it is 0, then the suggestion is an
- // Autocomplete suggestion; and |value| stores the suggested text. |index|
- // is an index of the selected suggestion in the list of suggestions provided
- // by the client.
+ // a WebNode. A positive |itemID| is a unique id used to identify the set
+ // of Autofill profiles. If it is AutocompleteEntryMenuItemID, then the
+ // suggestion is an Autocomplete suggestion; and |value| stores the
+ // suggested text. |index| is an index of the selected suggestion in the
+ // list of suggestions provided by the client.
virtual void didAcceptAutofillSuggestion(const WebNode&,
const WebString& value,
const WebString& label,
- int uniqueID,
+ int itemID,
unsigned index) { }
// Informs the browser that the user has selected an Autofill suggestion for
@@ -58,7 +68,7 @@ public:
virtual void didSelectAutofillSuggestion(const WebNode&,
const WebString& name,
const WebString& label,
- int uniqueID) { }
+ int itemID) { }
// Informs the browser that the user has cleared the selection from the
// Autofill suggestions popup. This happens when a user uses the arrow
diff --git a/Source/WebKit/chromium/tests/WebExternalTextureLayerImplTest.cpp b/Source/WebKit/chromium/public/WebBatteryStatus.h
index 583d0df70..b1cf48600 100644
--- a/Source/WebKit/chromium/tests/WebExternalTextureLayerImplTest.cpp
+++ b/Source/WebKit/chromium/public/WebBatteryStatus.h
@@ -23,29 +23,29 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "config.h"
+#ifndef WebBatteryStatus_h
+#define WebBatteryStatus_h
-#include "WebExternalTextureLayerImpl.h"
+#include "platform/WebCommon.h"
-#include <gtest/gtest.h>
-#include <wtf/RefPtr.h>
+namespace WebKit {
-namespace {
-
-using namespace WebKit;
-using WTF::RefPtr;
-
-class WebExternalTextureLayerImplTest : public WebExternalTextureLayerImpl {
+class WebBatteryStatus {
public:
- bool isDrawable() const { return drawsContent(); }
+ WebBatteryStatus()
+ : charging(true)
+ , chargingTime(0.0)
+ , dischargingTime(0.0)
+ , level(0.0)
+ {
+ }
+
+ bool charging;
+ double chargingTime;
+ double dischargingTime;
+ double level;
};
-TEST(WebExternalTextureLayerImpl, testIsDrawable)
-{
- RefPtr<WebExternalTextureLayerImplTest> textureLayer = adoptRef(new WebExternalTextureLayerImplTest());
-
- textureLayer->setTextureId(1);
- EXPECT_TRUE(textureLayer->isDrawable());
-}
+} // namespace WebKit
-}
+#endif // WebBatteryStatus_h
diff --git a/Source/WebKit/chromium/public/WebBatteryStatusClient.h b/Source/WebKit/chromium/public/WebBatteryStatusClient.h
new file mode 100644
index 000000000..1a2a15b00
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebBatteryStatusClient.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * 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 WebBatteryStatusClient_h
+#define WebBatteryStatusClient_h
+
+namespace WebKit {
+
+class WebBatteryStatusClient {
+public:
+ virtual ~WebBatteryStatusClient() { }
+
+ virtual void startUpdating() = 0;
+ virtual void stopUpdating() = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebBatteryStatusClient_h
diff --git a/Source/WebKit/chromium/public/WebCompositor.h b/Source/WebKit/chromium/public/WebCompositor.h
index 32b60e284..3eadef32c 100644
--- a/Source/WebKit/chromium/public/WebCompositor.h
+++ b/Source/WebKit/chromium/public/WebCompositor.h
@@ -26,7 +26,6 @@
#ifndef WebCompositor_h
#define WebCompositor_h
-#include "WebCompositorInputHandler.h"
#include "platform/WebCommon.h"
namespace WebKit {
@@ -34,16 +33,11 @@ namespace WebKit {
class WebInputEvent;
class WebThread;
-#define WEBCOMPOSITOR_HAS_INITIALIZE
-
// This class contains global routines for interacting with the
// compositor.
//
// All calls to the WebCompositor must be made from the main thread.
-//
-// This class currently temporarily inherits from WebCompositorInputHandler
-// while we migrate downstream code to use WebCompositorInputHandler directly.
-class WebCompositor : public WebCompositorInputHandler {
+class WebCompositor {
public:
// Initializes the compositor. Threaded compositing is enabled by passing in
// a non-null WebThread. No compositor classes or methods should be used
diff --git a/Source/WebKit/chromium/public/WebCompositorInputHandler.h b/Source/WebKit/chromium/public/WebCompositorInputHandler.h
index bc58748bd..557da6772 100644
--- a/Source/WebKit/chromium/public/WebCompositorInputHandler.h
+++ b/Source/WebKit/chromium/public/WebCompositorInputHandler.h
@@ -30,7 +30,6 @@
namespace WebKit {
-class WebCompositor;
class WebCompositorInputHandlerClient;
class WebInputEvent;
class WebThread;
@@ -41,7 +40,7 @@ class WebCompositorInputHandler {
public:
// The return value is temporarily WebCompositor until all downstream code
// is switched to use WebCompositorInputHandler.
- WEBKIT_EXPORT static WebCompositor* fromIdentifier(int);
+ WEBKIT_EXPORT static WebCompositorInputHandler* fromIdentifier(int);
virtual void setClient(WebCompositorInputHandlerClient*) = 0;
virtual void handleInputEvent(const WebInputEvent&) = 0;
diff --git a/Source/WebKit/chromium/public/WebCompositorInputHandlerClient.h b/Source/WebKit/chromium/public/WebCompositorInputHandlerClient.h
index e8bb55598..7c911d8f8 100644
--- a/Source/WebKit/chromium/public/WebCompositorInputHandlerClient.h
+++ b/Source/WebKit/chromium/public/WebCompositorInputHandlerClient.h
@@ -28,6 +28,8 @@
namespace WebKit {
+struct WebActiveWheelFlingParameters;
+
class WebCompositorInputHandlerClient {
public:
// Callbacks invoked from the compositor thread.
@@ -42,6 +44,10 @@ public:
// should be forwarded to the WebWidget associated with this compositor for further processing.
virtual void didNotHandleInputEvent(bool sendToWidget) = 0;
+ // Transfers an active wheel fling animation initiated by a previously handled input event out to the client.
+ // FIXME: Make pure virtual once implementation lands on Chromium side.
+ virtual void transferActiveWheelFlingAnimation(const WebActiveWheelFlingParameters&) { }
+
protected:
virtual ~WebCompositorInputHandlerClient() { }
};
diff --git a/Source/WebKit/chromium/public/WebContextMenuData.h b/Source/WebKit/chromium/public/WebContextMenuData.h
index e72a434db..a36372192 100644
--- a/Source/WebKit/chromium/public/WebContextMenuData.h
+++ b/Source/WebKit/chromium/public/WebContextMenuData.h
@@ -34,8 +34,8 @@
#include "WebHistoryItem.h"
#include "WebMenuItemInfo.h"
#include "WebNode.h"
-#include "WebReferrerPolicy.h"
#include "platform/WebPoint.h"
+#include "platform/WebReferrerPolicy.h"
#include "platform/WebString.h"
#include "platform/WebURL.h"
#include "platform/WebVector.h"
diff --git a/Source/WebKit/chromium/public/WebDevToolsFrontendClient.h b/Source/WebKit/chromium/public/WebDevToolsFrontendClient.h
index c09f514c1..0438cd355 100644
--- a/Source/WebKit/chromium/public/WebDevToolsFrontendClient.h
+++ b/Source/WebKit/chromium/public/WebDevToolsFrontendClient.h
@@ -50,7 +50,8 @@ public:
virtual void requestSetDockSide(const WebString& side) { }
virtual void moveWindowBy(const WebFloatPoint&) { }
virtual void openInNewTab(const WebString& side) { }
- virtual void saveAs(const WebString& fileName, const WebString& content) { }
+ virtual void save(const WebString& url, const WebString& content, bool saveAs) { }
+ virtual void append(const WebString& url, const WebString& content) { }
protected:
virtual ~WebDevToolsFrontendClient() {}
diff --git a/Source/WebKit/chromium/public/WebDocument.h b/Source/WebKit/chromium/public/WebDocument.h
index 6725e79e1..6c0df31bc 100644
--- a/Source/WebKit/chromium/public/WebDocument.h
+++ b/Source/WebKit/chromium/public/WebDocument.h
@@ -33,6 +33,7 @@
#include "WebNode.h"
#include "WebSecurityOrigin.h"
+#include "platform/WebReferrerPolicy.h"
#include "platform/WebVector.h"
#if WEBKIT_IMPLEMENTATION
@@ -101,6 +102,7 @@ public:
WEBKIT_EXPORT void cancelFullScreen();
WEBKIT_EXPORT WebElement fullScreenElement() const;
WEBKIT_EXPORT WebDOMEvent createEvent(const WebString& eventType);
+ WEBKIT_EXPORT WebReferrerPolicy referrerPolicy() const;
// Accessibility support. These methods should only be called on the
// top-level document, because one accessibility cache spans all of
diff --git a/Source/WebKit/chromium/public/WebElement.h b/Source/WebKit/chromium/public/WebElement.h
index a3a06121d..84c43b251 100644
--- a/Source/WebKit/chromium/public/WebElement.h
+++ b/Source/WebKit/chromium/public/WebElement.h
@@ -38,7 +38,6 @@ namespace WebCore { class Element; }
#endif
namespace WebKit {
-class WebNamedNodeMap;
struct WebRect;
// Provides access to some properties of a DOM element node.
@@ -57,10 +56,12 @@ struct WebRect;
WEBKIT_EXPORT bool hasAttribute(const WebString&) const;
WEBKIT_EXPORT WebString getAttribute(const WebString&) const;
WEBKIT_EXPORT bool setAttribute(const WebString& name, const WebString& value);
- WEBKIT_EXPORT WebNamedNodeMap attributes() const;
WEBKIT_EXPORT WebString innerText();
WEBKIT_EXPORT WebDocument document() const;
WEBKIT_EXPORT void requestFullScreen();
+ WEBKIT_EXPORT WebString attributeLocalName(unsigned index) const;
+ WEBKIT_EXPORT WebString attributeValue(unsigned index) const;
+ WEBKIT_EXPORT unsigned attributeCount() const;
// Returns the language code specified for this element. This attribute
// is inherited, so the returned value is drawn from the closest parent
diff --git a/Source/WebKit/chromium/public/WebFileChooserCompletion.h b/Source/WebKit/chromium/public/WebFileChooserCompletion.h
index 14bace4c2..9b01d0e41 100644
--- a/Source/WebKit/chromium/public/WebFileChooserCompletion.h
+++ b/Source/WebKit/chromium/public/WebFileChooserCompletion.h
@@ -31,18 +31,36 @@
#ifndef WebFileChooserCompletion_h
#define WebFileChooserCompletion_h
+#include "platform/WebString.h"
+
namespace WebKit {
-class WebString;
template <typename T> class WebVector;
// Gets called back when WebViewClient finished choosing a file.
class WebFileChooserCompletion {
public:
+ struct SelectedFileInfo {
+ // The actual path of the selected file.
+ WebString path;
+
+ // The display name of the file that is to be exposed as File.name in
+ // the DOM layer. If it is empty the base part of the |path| is used.
+ WebString displayName;
+ };
+
// Called with zero or more file names. Zero-lengthed vector means that
// the user cancelled or that file choosing failed. The callback instance
// is destroyed when this method is called.
virtual void didChooseFile(const WebVector<WebString>& fileNames) = 0;
+
+ // Called with zero or more files, given as a vector of SelectedFileInfo.
+ // Zero-lengthed vector means that the user cancelled or that file
+ // choosing failed. The callback instance is destroyed when this method
+ // is called.
+ // FIXME: Deprecate either one of the didChooseFile (and rename it to
+ // didChooseFile*s*).
+ virtual void didChooseFile(const WebVector<SelectedFileInfo>&) { }
protected:
virtual ~WebFileChooserCompletion() {}
};
diff --git a/Source/WebKit/chromium/public/WebFrame.h b/Source/WebKit/chromium/public/WebFrame.h
index 0d5406d52..da795ae8d 100644
--- a/Source/WebKit/chromium/public/WebFrame.h
+++ b/Source/WebKit/chromium/public/WebFrame.h
@@ -33,10 +33,10 @@
#include "WebIconURL.h"
#include "WebNode.h"
-#include "WebReferrerPolicy.h"
#include "WebURLLoaderOptions.h"
#include "platform/WebCanvas.h"
#include "platform/WebFileSystem.h"
+#include "platform/WebReferrerPolicy.h"
#include "platform/WebURL.h"
struct NPObject;
@@ -44,6 +44,8 @@ struct NPObject;
#if WEBKIT_USING_V8
namespace v8 {
class Context;
+class Function;
+class Object;
class Value;
template <class T> class Handle;
template <class T> class Local;
@@ -274,6 +276,18 @@ public:
virtual v8::Handle<v8::Value> executeScriptAndReturnValue(
const WebScriptSource&) = 0;
+ virtual void executeScriptInIsolatedWorld(
+ int worldID, const WebScriptSource* sourcesIn, unsigned numSources,
+ int extensionGroup, WebVector<v8::Local<v8::Value> >* results) = 0;
+
+ // Call the function with the given receiver and arguments, bypassing
+ // canExecute().
+ virtual v8::Handle<v8::Value> callFunctionEvenIfScriptDisabled(
+ v8::Handle<v8::Function>,
+ v8::Handle<v8::Object>,
+ int argc,
+ v8::Handle<v8::Value> argv[]) = 0;
+
// Returns the V8 context for this frame, or an empty handle if there
// is none.
virtual v8::Local<v8::Context> mainWorldScriptContext() const = 0;
@@ -436,6 +450,8 @@ public:
virtual void selectRange(const WebPoint& start, const WebPoint& end) = 0;
+ virtual void selectRange(const WebRange&) = 0;
+
// Printing ------------------------------------------------------------
diff --git a/Source/WebKit/chromium/public/WebFrameClient.h b/Source/WebKit/chromium/public/WebFrameClient.h
index fa6fc7a33..9270d1ab9 100644
--- a/Source/WebKit/chromium/public/WebFrameClient.h
+++ b/Source/WebKit/chromium/public/WebFrameClient.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2011, 2012 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
@@ -63,6 +63,8 @@ class WebMediaPlayerClient;
class WebNode;
class WebPlugin;
class WebSharedWorker;
+class WebSharedWorkerClient;
+class WebSocketStreamHandle;
class WebStorageQuotaCallbacks;
class WebString;
class WebURL;
@@ -70,7 +72,6 @@ class WebURLLoader;
class WebURLRequest;
class WebURLResponse;
class WebWorker;
-class WebSharedWorkerClient;
struct WebPluginParams;
struct WebRect;
struct WebSize;
@@ -284,10 +285,6 @@ public:
// A reflected XSS was encountered in the page and suppressed.
virtual void didDetectXSS(WebFrame*, const WebURL&, bool didBlockEntirePage) { }
- // This frame adopted the resource that is being loaded. This happens when
- // an iframe, that is loading a subresource, is transferred between windows.
- virtual void didAdoptURLLoader(WebURLLoader*) { }
-
// Script notifications ------------------------------------------------
// Script in the page tried to allocate too much memory.
@@ -385,6 +382,11 @@ public:
// object to coordinate replies to the intent invocation.
virtual void dispatchIntent(WebFrame*, const WebIntentRequest&) { }
+ // WebSocket -----------------------------------------------------
+
+ // A WebSocket object is going to open new stream connection.
+ virtual void willOpenSocketStream(WebSocketStreamHandle*) { }
+
// Messages ------------------------------------------------------
// Notifies the embedder that a postMessage was issued on this frame, and
diff --git a/Source/WebKit/chromium/public/WebHitTestResult.h b/Source/WebKit/chromium/public/WebHitTestResult.h
new file mode 100644
index 000000000..8fb9838a4
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebHitTestResult.h
@@ -0,0 +1,71 @@
+/*
+* Copyright (C) 2012 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:
+*
+* 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 WebHitTestResult_h
+#define WebHitTestResult_h
+
+#include "platform/WebPrivateOwnPtr.h"
+
+namespace WebCore {
+class HitTestResult;
+}
+
+namespace WebKit {
+
+class WebNode;
+struct WebPoint;
+
+// Properties of a hit test result, i.e. properties of the nodes at a given point
+// (the hit point) on the page. Both urls may be populated at the same time, for
+// example in the instance of an <img> inside an <a>.
+class WebHitTestResult {
+public:
+ WebHitTestResult() { }
+ WebHitTestResult(const WebHitTestResult& info) { assign(info); }
+ ~WebHitTestResult() { reset(); }
+
+ WEBKIT_EXPORT void assign(const WebHitTestResult&);
+ WEBKIT_EXPORT void reset();
+ WEBKIT_EXPORT bool isNull() const;
+
+ // The node that was hit (only one for point-based tests).
+ WEBKIT_EXPORT WebNode node() const;
+
+ // Coordinates of the point that was hit. Relative to the node.
+ WEBKIT_EXPORT WebPoint localPoint() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebHitTestResult(const WebCore::HitTestResult&);
+ WebHitTestResult& operator=(const WebCore::HitTestResult&);
+ operator WebCore::HitTestResult() const;
+#endif
+
+protected:
+ WebPrivateOwnPtr<WebCore::HitTestResult> m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebIDBCursor.h b/Source/WebKit/chromium/public/WebIDBCursor.h
index 96b1765d8..4e23f0702 100644
--- a/Source/WebKit/chromium/public/WebIDBCursor.h
+++ b/Source/WebKit/chromium/public/WebIDBCursor.h
@@ -62,6 +62,7 @@ public:
}
virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void advance(unsigned long, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void deleteFunction(WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void prefetchContinue(int numberToFetch, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
diff --git a/Source/WebKit/chromium/public/WebIDBDatabase.h b/Source/WebKit/chromium/public/WebIDBDatabase.h
index ff8e1ca4a..f53b02e39 100644
--- a/Source/WebKit/chromium/public/WebIDBDatabase.h
+++ b/Source/WebKit/chromium/public/WebIDBDatabase.h
@@ -28,6 +28,7 @@
#include "WebDOMStringList.h"
#include "WebExceptionCode.h"
+#include "WebIDBKeyPath.h"
#include "platform/WebCommon.h"
namespace WebKit {
@@ -58,7 +59,13 @@ public:
WEBKIT_ASSERT_NOT_REACHED();
return WebDOMStringList();
}
- virtual WebIDBObjectStore* createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction&, WebExceptionCode&)
+ // FIXME: Remove WebString keyPath overload once callers are updated.
+ // http://webkit.org/b/84207
+ virtual WebIDBObjectStore* createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction& transaction, WebExceptionCode& ec)
+ {
+ return createObjectStore(name, WebIDBKeyPath(keyPath), autoIncrement, transaction, ec);
+ }
+ virtual WebIDBObjectStore* createObjectStore(const WebString&, const WebIDBKeyPath&, bool, const WebIDBTransaction&, WebExceptionCode&)
{
WEBKIT_ASSERT_NOT_REACHED();
return 0;
diff --git a/Source/WebKit/chromium/public/WebReferrerPolicy.h b/Source/WebKit/chromium/public/WebIDBDatabaseException.h
index 82710fb22..81b838667 100644
--- a/Source/WebKit/chromium/public/WebReferrerPolicy.h
+++ b/Source/WebKit/chromium/public/WebIDBDatabaseException.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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
@@ -28,18 +28,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebReferrerPolicy_h
-#define WebReferrerPolicy_h
+#ifndef WebIDBDatabaseException_h
+#define WebIDBDatabaseException_h
namespace WebKit {
-enum WebReferrerPolicy {
- WebReferrerPolicyAlways,
- WebReferrerPolicyDefault,
- WebReferrerPolicyNever,
- WebReferrerPolicyOrigin,
+enum WebIDBDatabaseException {
+ WebIDBDatabaseExceptionDataError = 1205,
+ WebIDBDatabaseExceptionQuotaError = 1211,
};
} // namespace WebKit
-#endif
+#endif // WebIDBDatabaseException_h
diff --git a/Source/WebKit/chromium/public/WebIDBIndex.h b/Source/WebKit/chromium/public/WebIDBIndex.h
index b7f526d76..37af02c0c 100644
--- a/Source/WebKit/chromium/public/WebIDBIndex.h
+++ b/Source/WebKit/chromium/public/WebIDBIndex.h
@@ -27,6 +27,7 @@
#define WebIDBIndex_h
#include "WebExceptionCode.h"
+#include "WebIDBKeyPath.h"
#include "WebIDBTransaction.h"
#include "platform/WebString.h"
@@ -51,7 +52,13 @@ public:
WEBKIT_ASSERT_NOT_REACHED();
return WebString();
}
- virtual WebString keyPath() const
+ virtual WebIDBKeyPath keyPath() const
+ {
+ return WebIDBKeyPath(keyPathString());
+ }
+ // FIXME: Remove method once callers are updated.
+ // http://webkit.org/b/84207
+ virtual WebString keyPathString() const
{
WEBKIT_ASSERT_NOT_REACHED();
return WebString();
@@ -70,8 +77,8 @@ public:
virtual void openObjectCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void openKeyCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void count(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void getObject(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void getKey(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void getObject(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void getKey(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
protected:
WebIDBIndex() {}
diff --git a/Source/WebKit/chromium/public/WebIDBKeyPath.h b/Source/WebKit/chromium/public/WebIDBKeyPath.h
index 4c7259f03..97bac06ff 100644
--- a/Source/WebKit/chromium/public/WebIDBKeyPath.h
+++ b/Source/WebKit/chromium/public/WebIDBKeyPath.h
@@ -28,6 +28,7 @@
#include "platform/WebCommon.h"
#include "platform/WebPrivateOwnPtr.h"
+#include "platform/WebString.h"
#include "platform/WebVector.h"
namespace WTF {
@@ -37,14 +38,29 @@ class String;
namespace WebKit {
-class WebString;
-
class WebIDBKeyPath {
public:
WEBKIT_EXPORT static WebIDBKeyPath create(const WebString&);
- WebIDBKeyPath(const WebIDBKeyPath& keyPath) { assign(keyPath); }
+ WEBKIT_EXPORT static WebIDBKeyPath create(const WebVector<WebString>&);
+ WEBKIT_EXPORT static WebIDBKeyPath createNull();
+ WEBKIT_EXPORT WebIDBKeyPath(const WebIDBKeyPath&);
~WebIDBKeyPath() { reset(); }
+ enum Type {
+ NullType = 0,
+ StringType,
+ ArrayType,
+ };
+
+ WEBKIT_EXPORT bool isValid() const;
+ WEBKIT_EXPORT Type type() const;
+ // FIXME: Array-type key paths not yet supported. http://webkit.org/b/84207
+ WebVector<WebString> array() const { WEBKIT_ASSERT_NOT_REACHED(); return WebVector<WebString>(); }
+ WEBKIT_EXPORT WebString string() const;
+
+ // FIXME: Remove these once callers are updated. http://webkit.org/b/84207
+ WEBKIT_EXPORT WebIDBKeyPath(const WebString&);
+ operator const WebString () const { return string(); }
WEBKIT_EXPORT int parseError() const;
WEBKIT_EXPORT void assign(const WebIDBKeyPath&);
WEBKIT_EXPORT void reset();
diff --git a/Source/WebKit/chromium/public/WebIDBObjectStore.h b/Source/WebKit/chromium/public/WebIDBObjectStore.h
index 981f5ec7e..dcf485692 100644
--- a/Source/WebKit/chromium/public/WebIDBObjectStore.h
+++ b/Source/WebKit/chromium/public/WebIDBObjectStore.h
@@ -29,6 +29,7 @@
#include "WebExceptionCode.h"
#include "WebDOMStringList.h"
#include "WebIDBCallbacks.h"
+#include "WebIDBKeyPath.h"
#include "WebIDBTransaction.h"
#include "platform/WebCommon.h"
#include "platform/WebString.h"
@@ -48,7 +49,11 @@ public:
WEBKIT_ASSERT_NOT_REACHED();
return WebString();
}
- virtual WebString keyPath() const
+ virtual WebIDBKeyPath keyPath() const
+ {
+ return WebIDBKeyPath(keyPathString());
+ }
+ virtual WebString keyPathString() const
{
WEBKIT_ASSERT_NOT_REACHED();
return WebString();
@@ -59,7 +64,7 @@ public:
return WebDOMStringList();
}
- virtual void get(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void get(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
enum PutMode {
AddOrUpdate,
@@ -71,8 +76,15 @@ public:
virtual void deleteFunction(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void deleteFunction(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void clear(WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // FIXME: Remove WebString keyPath overload once callers are updated.
+ // http://webkit.org/b/84207
virtual WebIDBIndex* createIndex(const WebString& name, const WebString& keyPath, bool unique, bool multiEntry, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
+ return createIndex(name, WebIDBKeyPath(keyPath), unique, multiEntry, transaction, ec);
+ }
+ virtual WebIDBIndex* createIndex(const WebString&, const WebIDBKeyPath&, bool, bool, const WebIDBTransaction&, WebExceptionCode&)
+ {
WEBKIT_ASSERT_NOT_REACHED();
return 0;
}
diff --git a/Source/WebKit/chromium/public/WebInputElement.h b/Source/WebKit/chromium/public/WebInputElement.h
index 3d1ffb6e0..b1c407c59 100644
--- a/Source/WebKit/chromium/public/WebInputElement.h
+++ b/Source/WebKit/chromium/public/WebInputElement.h
@@ -39,6 +39,8 @@ namespace WebCore { class HTMLInputElement; }
namespace WebKit {
+ class WebNodeCollection;
+
// Provides readonly access to some properties of a DOM input element node.
class WebInputElement : public WebFormControlElement {
public:
@@ -83,6 +85,9 @@ namespace WebKit {
WEBKIT_EXPORT int selectionEnd() const;
WEBKIT_EXPORT bool isValidValue(const WebString&) const;
WEBKIT_EXPORT bool isChecked() const;
+ WEBKIT_EXPORT bool isMultiple() const;
+
+ WEBKIT_EXPORT WebNodeCollection dataListOptions() const;
WEBKIT_EXPORT bool isSpeechInputEnabled() const;
WEBKIT_EXPORT SpeechInputState getSpeechInputState() const;
diff --git a/Source/WebKit/chromium/public/WebInputEvent.h b/Source/WebKit/chromium/public/WebInputEvent.h
index e42e45134..d5d6394f8 100644
--- a/Source/WebKit/chromium/public/WebInputEvent.h
+++ b/Source/WebKit/chromium/public/WebInputEvent.h
@@ -45,16 +45,23 @@ namespace WebKit {
// WARNING! These classes must remain PODs (plain old data). They are
// intended to be "serializable" by copying their raw bytes, so they must
// not contain any non-bit-copyable member variables!
+//
+// Furthermore, the class members need to be packed so they are aligned
+// properly and don't have paddings/gaps, otherwise memory check tools
+// like Valgrind will complain about uninitialized memory usage when
+// transferring these classes over the wire.
+
+#pragma pack(push, 4)
// WebInputEvent --------------------------------------------------------------
class WebInputEvent {
public:
WebInputEvent(unsigned sizeParam = sizeof(WebInputEvent))
- : size(sizeParam)
+ : timeStampSeconds(0.0)
+ , size(sizeParam)
, type(Undefined)
- , modifiers(0)
- , timeStampSeconds(0.0) { }
+ , modifiers(0) { }
// When we use an input method (or an input method editor), we receive
// two events for a keypress. The former event is a keydown, which
@@ -109,6 +116,7 @@ public:
GestureTap,
GestureTapDown,
GestureDoubleTap,
+ GestureLongPress,
GesturePinchBegin,
GesturePinchEnd,
GesturePinchUpdate,
@@ -145,10 +153,10 @@ public:
static const int InputModifiers = ShiftKey | ControlKey | AltKey | MetaKey;
- unsigned size; // The size of this structure, for serialization.
+ double timeStampSeconds; // Seconds since epoch.
+ unsigned size; // The size of this structure, for serialization.
Type type;
int modifiers;
- double timeStampSeconds; // Seconds since epoch.
// Returns true if the WebInputEvent |type| is a mouse event.
static bool isMouseEventType(int type)
@@ -197,6 +205,7 @@ public:
|| type == GestureScrollUpdate
|| type == GestureFlingStart
|| type == GestureFlingCancel
+ || type == GestureTapDown
|| type == GestureTap; // FIXME: Why is GestureTap on this list?
}
};
@@ -225,6 +234,14 @@ public:
// doesn't hurt to have this one around.
int nativeKeyCode;
+ // This identifies whether this event was tagged by the system as being
+ // a "system key" event (see
+ // http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for
+ // details). Other platforms don't have this concept, but it's just
+ // easier to leave it always false than ifdef.
+ // See comment at the top of the file for why an int is used here.
+ bool isSystemKey;
+
// |text| is the text generated by this keystroke. |unmodifiedText| is
// |text|, but unmodified by an concurrently-held modifiers (except
// shift). This is useful for working out shortcut keys. Linux and
@@ -237,17 +254,6 @@ public:
// This is a string identifying the key pressed.
char keyIdentifier[keyIdentifierLengthCap];
- // This identifies whether this event was tagged by the system as being
- // a "system key" event (see
- // http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for
- // details). Other platforms don't have this concept, but it's just
- // easier to leave it always false than ifdef.
- // int is used instead of bool to ensure the size of this structure is
- // strictly aligned to a factor of 4 bytes, otherwise memory check tools
- // like valgrind may complain about uninitialized memory usage when
- // transfering it over the wire.
- int isSystemKey;
-
WebKeyboardEvent(unsigned sizeParam = sizeof(WebKeyboardEvent))
: WebInputEvent(sizeParam)
, windowsKeyCode(0)
@@ -322,13 +328,11 @@ public:
float wheelTicksX;
float wheelTicksY;
- // int is used instead of bool to ensure the size of this structure is
- // strictly aligned to a factor of 4 bytes, otherwise memory check tools
- // like valgrind may complain about uninitialized memory usage when
- // transfering it over the wire.
+ // See comment at the top of the file for why an int is used here.
int scrollByPage;
- bool hasPreciseScrollingDeltas;
+ // See comment at the top of the file for why an int is used here.
+ int hasPreciseScrollingDeltas;
Phase phase;
Phase momentumPhase;
@@ -355,9 +359,11 @@ public:
int globalX;
int globalY;
- // NOTE: |deltaX| and |deltaY| represents the amount to scroll for Scroll gesture events. For Pinch gesture events, |deltaX| represents the scaling/magnification factor.
+ // NOTE: |deltaX| and |deltaY| represents the amount to scroll for Scroll gesture events. For Pinch gesture events, |deltaX| represents the scaling/magnification factor. For Tap and Press events, |deltaX|,|deltaY| and |gammaX|,|gammaY| correspond to the top left and bottom right corners of the ellipse's enlosing rectangle for tap target fuzzing.
float deltaX;
float deltaY;
+ float gammaX;
+ float gammaY;
WebGestureEvent(unsigned sizeParam = sizeof(WebGestureEvent))
: WebInputEvent(sizeParam)
@@ -367,6 +373,8 @@ public:
, globalY(0)
, deltaX(0.0f)
, deltaY(0.0f)
+ , gammaX(0.0f)
+ , gammaY(0.0f)
{
}
};
@@ -398,6 +406,8 @@ public:
}
};
+#pragma pack(pop)
+
} // namespace WebKit
#endif
diff --git a/Source/WebKit/chromium/public/WebIntent.h b/Source/WebKit/chromium/public/WebIntent.h
index d01098fe5..cc080ad99 100644
--- a/Source/WebKit/chromium/public/WebIntent.h
+++ b/Source/WebKit/chromium/public/WebIntent.h
@@ -31,9 +31,12 @@
#ifndef WebIntent_h
#define WebIntent_h
+#include "WebMessagePortChannel.h"
#include "platform/WebCommon.h"
#include "platform/WebPrivatePtr.h"
#include "platform/WebString.h"
+#include "platform/WebURL.h"
+#include "platform/WebVector.h"
namespace WebCore { class Intent; }
@@ -61,6 +64,19 @@ public:
WEBKIT_EXPORT WebString action() const;
WEBKIT_EXPORT WebString type() const;
WEBKIT_EXPORT WebString data() const;
+ WEBKIT_EXPORT WebURL service() const;
+
+ // Retrieve a list of the names of extra metadata associated with the
+ // intent.
+ WEBKIT_EXPORT WebVector<WebString> extrasNames() const;
+
+ // Retrieve the value of an extra metadata element. The argument should
+ // be one of the names retrieved with |extrasNames|. Returns an empty
+ // string if the name is invalid.
+ WEBKIT_EXPORT WebString extrasValue(const WebString&) const;
+
+ // Caller takes ownership of the ports.
+ WEBKIT_EXPORT WebMessagePortChannelArray* messagePortChannelsRelease() const;
#if WEBKIT_IMPLEMENTATION
WebIntent(const WTF::PassRefPtr<WebCore::Intent>&);
diff --git a/Source/WebKit/chromium/public/WebMediaElement.h b/Source/WebKit/chromium/public/WebMediaElement.h
deleted file mode 100644
index f828ea1f6..000000000
--- a/Source/WebKit/chromium/public/WebMediaElement.h
+++ /dev/null
@@ -1,56 +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 WebMediaElement_h
-#define WebMediaElement_h
-
-#include "WebElement.h"
-
-#if WEBKIT_IMPLEMENTATION
-namespace WebCore { class HTMLMediaElement; }
-#endif
-
-namespace WebKit {
-
-class WebMediaPlayer;
-
-class WebMediaElement : public WebElement {
-public:
- WEBKIT_EXPORT WebMediaPlayer* player() const;
-
-#if WEBKIT_IMPLEMENTATION
- WebMediaElement(const WTF::PassRefPtr<WebCore::HTMLMediaElement>&);
- WebMediaElement& operator=(const WTF::PassRefPtr<WebCore::HTMLMediaElement>&);
- operator WTF::PassRefPtr<WebCore::HTMLMediaElement>() const;
-#endif
-};
-} // namespace WebKit
-
-#endif // WebMediaElement_h
diff --git a/Source/WebKit/chromium/public/WebMediaPlayer.h b/Source/WebKit/chromium/public/WebMediaPlayer.h
index 239134963..a2a9fb9b4 100644
--- a/Source/WebKit/chromium/public/WebMediaPlayer.h
+++ b/Source/WebKit/chromium/public/WebMediaPlayer.h
@@ -31,9 +31,10 @@
#ifndef WebMediaPlayer_h
#define WebMediaPlayer_h
+#include "WebTimeRange.h"
#include "WebVideoFrame.h"
#include "platform/WebCanvas.h"
-#include "platform/WebVector.h"
+#include "platform/WebString.h"
namespace WebKit {
@@ -41,57 +42,62 @@ class WebAudioSourceProvider;
class WebAudioSourceProviderClient;
class WebMediaPlayerClient;
class WebStreamTextureClient;
+class WebString;
class WebURL;
struct WebRect;
struct WebSize;
-struct WebTimeRange {
- WebTimeRange() : start(0), end(0) {}
- WebTimeRange(float s, float e) : start(s), end(e) {}
-
- float start;
- float end;
-};
-
-typedef WebVector<WebTimeRange> WebTimeRanges;
-
class WebMediaPlayer {
public:
enum NetworkState {
- Empty,
- Idle,
- Loading,
- Loaded,
- FormatError,
- NetworkError,
- DecodeError,
+ NetworkStateEmpty,
+ NetworkStateIdle,
+ NetworkStateLoading,
+ NetworkStateLoaded,
+ NetworkStateFormatError,
+ NetworkStateNetworkError,
+ NetworkStateDecodeError,
};
enum ReadyState {
- HaveNothing,
- HaveMetadata,
- HaveCurrentData,
- HaveFutureData,
- HaveEnoughData,
+ ReadyStateHaveNothing,
+ ReadyStateHaveMetadata,
+ ReadyStateHaveCurrentData,
+ ReadyStateHaveFutureData,
+ ReadyStateHaveEnoughData,
};
enum MovieLoadType {
- Unknown,
- Download,
- StoredStream,
- LiveStream,
+ MovieLoadTypeUnknown,
+ MovieLoadTypeDownload,
+ MovieLoadTypeStoredStream,
+ MovieLoadTypeLiveStream,
};
enum Preload {
- None,
- MetaData,
- Auto,
+ PreloadNone,
+ PreloadMetaData,
+ PreloadAuto,
+ };
+
+ enum AddIdStatus {
+ AddIdStatusOk,
+ AddIdStatusNotSupported,
+ AddIdStatusReachedIdLimit
};
enum EndOfStreamStatus {
- EosNoError,
- EosNetworkError,
- EosDecodeError,
+ EndOfStreamStatusNoError,
+ EndOfStreamStatusNetworkError,
+ EndOfStreamStatusDecodeError,
+ };
+
+ // Represents synchronous exceptions that can be thrown from the Encrypted
+ // Media methods. This is different from the asynchronous MediaKeyError.
+ enum MediaKeyException {
+ MediaKeyExceptionNoError,
+ MediaKeyExceptionInvalidPlayerState,
+ MediaKeyExceptionKeySystemNotSupported,
};
virtual ~WebMediaPlayer() {}
@@ -116,7 +122,7 @@ public:
virtual void setSize(const WebSize&) = 0;
- virtual void paint(WebCanvas*, const WebRect&) = 0;
+ virtual void paint(WebCanvas*, const WebRect&, uint8_t alpha) = 0;
// True if the loaded media has a playable video/audio track.
virtual bool hasVideo() const = 0;
@@ -167,8 +173,21 @@ public:
virtual WebAudioSourceProvider* audioSourceProvider() { return 0; }
+ virtual AddIdStatus sourceAddId(const WebString& id, const WebString& type) { return AddIdStatusNotSupported; }
+ virtual bool sourceRemoveId(const WebString& id) { return false; }
virtual bool sourceAppend(const unsigned char* data, unsigned length) { return false; }
virtual void sourceEndOfStream(EndOfStreamStatus) { }
+
+ // Returns whether keySystem is supported. If true, the result will be
+ // reported by an event.
+ virtual MediaKeyException generateKeyRequest(const WebString& keySystem, const unsigned char* initData, unsigned initDataLength) { return MediaKeyExceptionKeySystemNotSupported; }
+ virtual MediaKeyException addKey(const WebString& keySystem, const unsigned char* key, unsigned keyLength, const unsigned char* initData, unsigned initDataLength, const WebString& sessionId) { return MediaKeyExceptionKeySystemNotSupported; }
+ virtual MediaKeyException cancelKeyRequest(const WebString& keySystem, const WebString& sessionId) { return MediaKeyExceptionKeySystemNotSupported; }
+
+ // Instuct WebMediaPlayer to enter/exit fullscreen.
+ // Returns true if the player can enter fullscreen.
+ virtual bool enterFullscreen() { return false; }
+ virtual void exitFullscreen() { }
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/public/WebMediaPlayerClient.h b/Source/WebKit/chromium/public/WebMediaPlayerClient.h
index 19ea242ec..786bf5aa7 100644
--- a/Source/WebKit/chromium/public/WebMediaPlayerClient.h
+++ b/Source/WebKit/chromium/public/WebMediaPlayerClient.h
@@ -40,6 +40,21 @@ class WebURL;
class WebMediaPlayerClient {
public:
+ enum MediaKeyErrorCode {
+ MediaKeyErrorCodeUnknown = 1,
+ MediaKeyErrorCodeClient,
+ MediaKeyErrorCodeService,
+ MediaKeyErrorCodeOutput,
+ MediaKeyErrorCodeHardwareChange,
+ MediaKeyErrorCodeDomain,
+ UnknownError = MediaKeyErrorCodeUnknown,
+ ClientError = MediaKeyErrorCodeClient,
+ ServiceError = MediaKeyErrorCodeService,
+ OutputError = MediaKeyErrorCodeOutput,
+ HardwareChangeError = MediaKeyErrorCodeHardwareChange,
+ DomainError = MediaKeyErrorCodeDomain,
+ };
+
virtual void networkStateChanged() = 0;
virtual void readyStateChanged() = 0;
virtual void volumeChanged(float) = 0;
@@ -56,6 +71,10 @@ public:
virtual WebMediaPlayer::Preload preload() const = 0;
virtual void sourceOpened() = 0;
virtual WebKit::WebURL sourceURL() const = 0;
+ virtual void keyAdded(const WebString&, const WebString&) = 0;
+ virtual void keyError(const WebString&, const WebString&, MediaKeyErrorCode, unsigned short systemCode) = 0;
+ virtual void keyMessage(const WebString&, const WebString&, const unsigned char*, unsigned) = 0;
+ virtual void keyNeeded(const WebString&, const WebString&, const unsigned char* initData, unsigned initDataLength) = 0;
virtual void disableAcceleratedCompositing() = 0;
protected:
~WebMediaPlayerClient() { }
diff --git a/Source/WebKit/chromium/public/WebNodeCollection.h b/Source/WebKit/chromium/public/WebNodeCollection.h
index 9707e17fb..b168b6d5b 100644
--- a/Source/WebKit/chromium/public/WebNodeCollection.h
+++ b/Source/WebKit/chromium/public/WebNodeCollection.h
@@ -54,6 +54,8 @@ public:
return *this;
}
+ bool isNull() const { return !m_private; }
+
WEBKIT_EXPORT void reset();
WEBKIT_EXPORT void assign(const WebNodeCollection&);
diff --git a/Source/WebKit/chromium/public/WebPageVisibilityState.h b/Source/WebKit/chromium/public/WebPageVisibilityState.h
index be7705c0d..8eb867fa2 100644
--- a/Source/WebKit/chromium/public/WebPageVisibilityState.h
+++ b/Source/WebKit/chromium/public/WebPageVisibilityState.h
@@ -38,7 +38,8 @@ namespace WebKit {
enum WebPageVisibilityState {
WebPageVisibilityStateVisible,
WebPageVisibilityStateHidden,
- WebPageVisibilityStatePrerender
+ WebPageVisibilityStatePrerender,
+ WebPageVisibilityStatePreview
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebURLRequestPrivate.h b/Source/WebKit/chromium/public/WebPrerendererClient.h
index 1c1b69608..fd148e5e8 100644
--- a/Source/WebKit/chromium/src/WebURLRequestPrivate.h
+++ b/Source/WebKit/chromium/public/WebPrerendererClient.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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
@@ -26,28 +26,23 @@
* 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 WebURLRequestPrivate_h
-#define WebURLRequestPrivate_h
+#ifndef WebPrerendererClient_h
+#define WebPrerendererClient_h
-namespace WebCore { class ResourceRequest; }
+#include "platform/WebCommon.h"
namespace WebKit {
-class WebURLRequestPrivate {
-public:
- WebURLRequestPrivate()
- : m_resourceRequest(0)
- , m_allowStoredCredentials(true) { }
-
- // Called by WebURLRequest when it no longer needs this object.
- virtual void dispose() = 0;
+class WebPrerender;
- WebCore::ResourceRequest* m_resourceRequest;
- bool m_allowStoredCredentials;
+class WebPrerendererClient {
+public:
+ virtual void willAddPrerender(WebPrerender*) = 0;
};
-} // namespace WebKit
+} // namespace WebPrerendererClient_h
-#endif
+#endif // WebPrerendererClient_h
diff --git a/Source/WebKit/chromium/public/WebPrintScalingOption.h b/Source/WebKit/chromium/public/WebPrintScalingOption.h
new file mode 100644
index 000000000..95dbb8984
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPrintScalingOption.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2012 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 WebPrintScalingOption_h
+#define WebPrintScalingOption_h
+
+namespace WebKit {
+
+enum WebPrintScalingOption {
+ WebPrintScalingOptionNone, // Prints the upper left of a page without scaling. Crop the page contents that don't fit on the paper.
+ WebPrintScalingOptionFitToPrintableArea, // Reduces or enlarges each page to fit the printable area of the selected printer paper size.
+ WebPrintScalingOptionSourceSize, // Print output page size is same as the actual source page size. Do not scale/center/fit to printable area.
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebRange.h b/Source/WebKit/chromium/public/WebRange.h
index 907dfd563..37f05ec60 100644
--- a/Source/WebKit/chromium/public/WebRange.h
+++ b/Source/WebKit/chromium/public/WebRange.h
@@ -32,6 +32,7 @@
#define WebRange_h
#include "platform/WebCommon.h"
+#include "platform/WebVector.h"
#if WEBKIT_IMPLEMENTATION
namespace WebCore { class Range; }
@@ -40,6 +41,7 @@ namespace WTF { template <typename T> class PassRefPtr; }
namespace WebKit {
+struct WebFloatQuad;
class WebFrame;
class WebNode;
class WebRangePrivate;
@@ -73,6 +75,8 @@ public:
WEBKIT_EXPORT static WebRange fromDocumentRange(WebFrame*, int start, int length);
+ WEBKIT_EXPORT WebVector<WebFloatQuad> textQuads() const;
+
#if WEBKIT_IMPLEMENTATION
WebRange(const WTF::PassRefPtr<WebCore::Range>&);
WebRange& operator=(const WTF::PassRefPtr<WebCore::Range>&);
diff --git a/Source/WebKit/chromium/public/WebRuntimeFeatures.h b/Source/WebKit/chromium/public/WebRuntimeFeatures.h
index 187ef0f55..0a954e164 100644
--- a/Source/WebKit/chromium/public/WebRuntimeFeatures.h
+++ b/Source/WebKit/chromium/public/WebRuntimeFeatures.h
@@ -109,6 +109,9 @@ public:
WEBKIT_EXPORT static void enableMediaStream(bool);
WEBKIT_EXPORT static bool isMediaStreamEnabled();
+ WEBKIT_EXPORT static void enablePeerConnection(bool);
+ WEBKIT_EXPORT static bool isPeerConnectionEnabled();
+
WEBKIT_EXPORT static void enableFullScreenAPI(bool);
WEBKIT_EXPORT static bool isFullScreenAPIEnabled();
@@ -118,6 +121,9 @@ public:
WEBKIT_EXPORT static void enableMediaSource(bool);
WEBKIT_EXPORT static bool isMediaSourceEnabled();
+ WEBKIT_EXPORT static void enableEncryptedMedia(bool);
+ WEBKIT_EXPORT static bool isEncryptedMediaEnabled();
+
WEBKIT_EXPORT static void enableVideoTrack(bool);
WEBKIT_EXPORT static bool isVideoTrackEnabled();
@@ -130,6 +136,9 @@ public:
WEBKIT_EXPORT static void enableStyleScoped(bool);
WEBKIT_EXPORT static bool isStyleScopedEnabled();
+ WEBKIT_EXPORT static void enableInputTypeDate(bool);
+ WEBKIT_EXPORT static bool isInputTypeDateEnabled();
+
private:
WebRuntimeFeatures();
};
diff --git a/Source/WebKit/chromium/public/WebNamedNodeMap.h b/Source/WebKit/chromium/public/WebScopedMicrotaskSuppression.h
index 796c8d164..826db6955 100644
--- a/Source/WebKit/chromium/public/WebNamedNodeMap.h
+++ b/Source/WebKit/chromium/public/WebScopedMicrotaskSuppression.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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
@@ -28,47 +28,47 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebNamedNodeMap_h
-#define WebNamedNodeMap_h
+#ifndef WebScopedMicrotaskSuppression_h
+#define WebScopedMicrotaskSuppression_h
-#include "platform/WebCommon.h"
-#include "platform/WebPrivatePtr.h"
-
-namespace WebCore { class NamedNodeMap; }
-#if WEBKIT_IMPLEMENTATION
-namespace WTF { template <typename T> class PassRefPtr; }
-#endif
+#include "platform/WebPrivateOwnPtr.h"
namespace WebKit {
-class WebAttribute;
-// Provides readonly access to some properties of a DOM attribute map.
-class WebNamedNodeMap {
+// This class wraps V8RecursionScope::BypassMicrotaskCheckpoint. Please
+// see V8RecursionScope.h for full usage. Short story: Embedder calls into
+// script contexts which also host page script must do one of two things:
+//
+// 1. If the call may cause any page/author script to run, it must be
+// captured for pre/post work (e.g. inspector instrumentation/microtask
+// delivery) and thus be invoked through WebFrame (e.g. executeScript*,
+// callFunction*).
+// 2. If the call will not cause any page/author script to run, the call
+// should be made directly via the v8 context, but the callsite must be
+// accompanied by a stack allocated WebScopedMicrotaskSuppression, e.g.:
+//
+// ...
+// {
+// WebKit::WebScopedMicrotaskSuppression suppression;
+// func->Call(global, argv, args);
+// }
+// ...
+//
+class WebScopedMicrotaskSuppression {
public:
- ~WebNamedNodeMap() { reset(); }
-
- WebNamedNodeMap() { }
- WebNamedNodeMap(const WebNamedNodeMap& n) { assign(n); }
- WebNamedNodeMap& operator=(const WebNamedNodeMap& n)
- {
- assign(n);
- return *this;
- }
+ WebScopedMicrotaskSuppression() { initialize(); }
+ ~WebScopedMicrotaskSuppression() { reset(); }
+private:
+ WEBKIT_EXPORT void initialize();
WEBKIT_EXPORT void reset();
- WEBKIT_EXPORT void assign(const WebNamedNodeMap&);
- WEBKIT_EXPORT unsigned length() const;
- WEBKIT_EXPORT WebAttribute attributeItem(unsigned) const;
-
-#if WEBKIT_IMPLEMENTATION
- WebNamedNodeMap(const WTF::PassRefPtr<WebCore::NamedNodeMap>&);
+#ifndef NDEBUG
+ class Impl;
+ WebPrivateOwnPtr<Impl> m_impl;
#endif
-
-private:
- WebPrivatePtr<WebCore::NamedNodeMap> m_private;
};
-} // namespace WebKit
+} // WebKit
#endif
diff --git a/Source/WebKit/chromium/public/WebSecurityPolicy.h b/Source/WebKit/chromium/public/WebSecurityPolicy.h
index 466d98684..5d9d3de06 100644
--- a/Source/WebKit/chromium/public/WebSecurityPolicy.h
+++ b/Source/WebKit/chromium/public/WebSecurityPolicy.h
@@ -31,8 +31,8 @@
#ifndef WebSecurityPolicy_h
#define WebSecurityPolicy_h
-#include "WebReferrerPolicy.h"
#include "platform/WebCommon.h"
+#include "platform/WebReferrerPolicy.h"
namespace WebKit {
@@ -64,6 +64,10 @@ public:
// Registers a non-HTTP URL scheme which can be sent CORS requests.
WEBKIT_EXPORT static void registerURLSchemeAsCORSEnabled(const WebString&);
+ // Registers a URL scheme as strictly empty documents, allowing them to
+ // commit synchronously.
+ WEBKIT_EXPORT static void registerURLSchemeAsEmptyDocument(const WebString&);
+
// Support for whitelisting access to origins beyond the same-origin policy.
WEBKIT_EXPORT static void addOriginAccessWhitelistEntry(
const WebURL& sourceOrigin, const WebString& destinationProtocol,
diff --git a/Source/WebKit/chromium/public/WebSettings.h b/Source/WebKit/chromium/public/WebSettings.h
index 47aaeece0..ec7d03785 100644
--- a/Source/WebKit/chromium/public/WebSettings.h
+++ b/Source/WebKit/chromium/public/WebSettings.h
@@ -98,6 +98,7 @@ public:
virtual void setWebAudioEnabled(bool) = 0;
virtual void setExperimentalWebGLEnabled(bool) = 0;
virtual void setExperimentalCSSRegionsEnabled(bool) = 0;
+ virtual void setExperimentalCSSCustomFilterEnabled(bool) = 0;
virtual void setOpenGLMultisamplingEnabled(bool) = 0;
virtual void setPrivilegedWebGLExtensionsEnabled(bool) = 0;
virtual void setWebGLErrorsToConsoleEnabled(bool) = 0;
@@ -110,8 +111,6 @@ public:
virtual void setAcceleratedCompositingEnabled(bool) = 0;
virtual void setForceCompositingMode(bool) = 0;
virtual void setMockScrollbarsEnabled(bool) = 0;
- virtual void setCompositeToTextureEnabled(bool) = 0;
- virtual bool compositeToTextureEnabled() const = 0;
virtual void setAcceleratedCompositingFor3DTransformsEnabled(bool) = 0;
virtual void setAcceleratedCompositingForVideoEnabled(bool) = 0;
virtual void setAcceleratedCompositingForCanvasEnabled(bool) = 0;
@@ -138,12 +137,15 @@ public:
virtual void setPasswordEchoDurationInSeconds(double) = 0;
virtual void setShouldPrintBackgrounds(bool) = 0;
virtual void setEnableScrollAnimator(bool) = 0;
+ virtual bool scrollAnimatorEnabled() const = 0;
virtual void setHixie76WebSocketProtocolEnabled(bool) = 0;
virtual void setVisualWordMovementEnabled(bool) = 0;
virtual void setAcceleratedPaintingEnabled(bool) = 0;
virtual void setPerTilePaintingEnabled(bool) = 0;
virtual void setPartialSwapEnabled(bool) = 0;
virtual void setThreadedAnimationEnabled(bool) = 0;
+ virtual void setViewportEnabled(bool) = 0;
+ virtual bool viewportEnabled() const = 0;
protected:
~WebSettings() { }
diff --git a/Source/WebKit/chromium/public/WebSpeechGrammar.h b/Source/WebKit/chromium/public/WebSpeechGrammar.h
new file mode 100644
index 000000000..d3c36523d
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSpeechGrammar.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2012 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebSpeechGrammar_h
+#define WebSpeechGrammar_h
+
+#include "platform/WebCommon.h"
+#include "platform/WebPrivatePtr.h"
+#include "platform/WebURL.h"
+
+namespace WebCore {
+class SpeechGrammar;
+}
+
+namespace WebKit {
+
+class WebSpeechGrammar {
+public:
+ WebSpeechGrammar() { }
+ ~WebSpeechGrammar() { reset(); }
+
+ WEBKIT_EXPORT WebURL src() const;
+ WEBKIT_EXPORT float weight() const;
+
+ WEBKIT_EXPORT void reset();
+
+#if WEBKIT_IMPLEMENTATION
+ WebSpeechGrammar(const WTF::PassRefPtr<WebCore::SpeechGrammar>&);
+ WebSpeechGrammar& operator=(const WTF::PassRefPtr<WebCore::SpeechGrammar>&);
+#endif
+
+private:
+ WebPrivatePtr<WebCore::SpeechGrammar> m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebSpeechGrammar_h
diff --git a/Source/WebKit/chromium/public/WebSpeechRecognitionHandle.h b/Source/WebKit/chromium/public/WebSpeechRecognitionHandle.h
new file mode 100644
index 000000000..fa3cb85bd
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSpeechRecognitionHandle.h
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2012 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebSpeechRecognitionHandle_h
+#define WebSpeechRecognitionHandle_h
+
+#include "platform/WebCommon.h"
+#include "platform/WebPrivatePtr.h"
+
+namespace WebCore {
+class SpeechRecognition;
+}
+
+namespace WebKit {
+
+class WebSpeechRecognitionResult;
+class WebString;
+
+// WebSpeechRecognitionHandle is used by WebSpeechRecognizer to identify a
+// recognition session, and by WebSpeechRecognizerClient to route
+// recognition events.
+class WebSpeechRecognitionHandle {
+public:
+ ~WebSpeechRecognitionHandle() { reset(); }
+ WebSpeechRecognitionHandle() { }
+
+ WebSpeechRecognitionHandle(const WebSpeechRecognitionHandle& other) { assign(other); }
+ WebSpeechRecognitionHandle& operator=(const WebSpeechRecognitionHandle& other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ WEBKIT_EXPORT void reset();
+ WEBKIT_EXPORT void assign(const WebSpeechRecognitionHandle&);
+
+ // Comparison functions are provided so that WebSpeechRecognitionHandle objects
+ // can be stored in a hash map.
+ WEBKIT_EXPORT bool equals(const WebSpeechRecognitionHandle&) const;
+ WEBKIT_EXPORT bool lessThan(const WebSpeechRecognitionHandle&) const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebSpeechRecognitionHandle(const WTF::PassRefPtr<WebCore::SpeechRecognition>&);
+ WebSpeechRecognitionHandle& operator=(const WTF::PassRefPtr<WebCore::SpeechRecognition>&);
+ operator WTF::PassRefPtr<WebCore::SpeechRecognition>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::SpeechRecognition> m_private;
+};
+
+inline bool operator==(const WebSpeechRecognitionHandle& a, const WebSpeechRecognitionHandle& b)
+{
+ return a.equals(b);
+}
+
+inline bool operator!=(const WebSpeechRecognitionHandle& a, const WebSpeechRecognitionHandle& b)
+{
+ return !(a == b);
+}
+
+inline bool operator<(const WebSpeechRecognitionHandle& a, const WebSpeechRecognitionHandle& b)
+{
+ return a.lessThan(b);
+}
+
+} // namespace WebKit
+
+#endif // WebSpeechRecognitionHandle_h
diff --git a/Source/WebKit/chromium/public/WebSpeechRecognitionParams.h b/Source/WebKit/chromium/public/WebSpeechRecognitionParams.h
new file mode 100644
index 000000000..b2dcce055
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSpeechRecognitionParams.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2012 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebSpeechRecognitionParams_h
+#define WebSpeechRecognitionParams_h
+
+#include "WebSpeechGrammar.h"
+#include "platform/WebString.h"
+#include "platform/WebVector.h"
+
+namespace WebKit {
+
+class WebSpeechGrammar;
+
+class WebSpeechRecognitionParams {
+public:
+ WebSpeechRecognitionParams(const WebVector<WebSpeechGrammar>& grammars, const WebString& language, bool continuous)
+ : m_grammars(grammars)
+ , m_language(language)
+ , m_continuous(continuous)
+ {
+ }
+
+ const WebVector<WebSpeechGrammar>& grammars() const { return m_grammars; }
+ const WebString& language() const { return m_language; }
+ bool continuous() const { return m_continuous; }
+
+private:
+ WebVector<WebSpeechGrammar> m_grammars;
+ WebString m_language;
+ bool m_continuous;
+};
+
+} // namespace WebKit
+
+#endif // WebSpeechRecognitionParams_h
diff --git a/Source/WebKit/chromium/public/WebSpeechRecognitionResult.h b/Source/WebKit/chromium/public/WebSpeechRecognitionResult.h
new file mode 100644
index 000000000..899f28556
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSpeechRecognitionResult.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2012 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebSpeechRecognitionResult_h
+#define WebSpeechRecognitionResult_h
+
+#include "platform/WebCommon.h"
+#include "platform/WebPrivatePtr.h"
+#include "platform/WebString.h"
+#include "platform/WebVector.h"
+
+namespace WebCore {
+class SpeechRecognitionResult;
+}
+
+namespace WebKit {
+
+class WebSpeechRecognitionResult {
+public:
+ WebSpeechRecognitionResult() { }
+ ~WebSpeechRecognitionResult() { reset(); }
+
+ WEBKIT_EXPORT void assign(const WebVector<WebString>& transcripts, const WebVector<float>& confidences, bool final);
+ WEBKIT_EXPORT void assign(const WebSpeechRecognitionResult&);
+ WEBKIT_EXPORT void reset();
+
+#if WEBKIT_IMPLEMENTATION
+ operator WTF::PassRefPtr<WebCore::SpeechRecognitionResult>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::SpeechRecognitionResult> m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebSpeechRecognitionResult_h
diff --git a/Source/WebKit/chromium/public/WebSpeechRecognizer.h b/Source/WebKit/chromium/public/WebSpeechRecognizer.h
new file mode 100644
index 000000000..bd8f3c65e
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSpeechRecognizer.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2012 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebSpeechRecognizer_h
+#define WebSpeechRecognizer_h
+
+#include "WebSpeechRecognitionHandle.h"
+#include "platform/WebCommon.h"
+
+namespace WebKit {
+
+class WebSpeechGrammar;
+class WebSpeechRecognitionParams;
+class WebSpeechRecognizerClient;
+
+// Interface for speech recognition, to be implemented by the embedder.
+class WebSpeechRecognizer {
+public:
+ // Start speech recognition for the specified handle using the specified parameters. Notifications on progress, results, and errors will be sent via the client.
+ virtual void start(const WebSpeechRecognitionHandle&, const WebSpeechRecognitionParams&, WebSpeechRecognizerClient*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Stop speech recognition for the specified handle, returning any results for the audio recorded so far. Notifications and errors are sent via the client.
+ virtual void stop(const WebSpeechRecognitionHandle&, WebSpeechRecognizerClient*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Abort speech recognition for the specified handle, discarding any recorded audio. Notifications and errors are sent via the client.
+ virtual void abort(const WebSpeechRecognitionHandle&, WebSpeechRecognizerClient*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+protected:
+ virtual ~WebSpeechRecognizer() { }
+};
+
+} // namespace WebKit
+
+#endif // WebSpeechRecognizer_h
diff --git a/Source/WebKit/chromium/public/WebSpeechRecognizerClient.h b/Source/WebKit/chromium/public/WebSpeechRecognizerClient.h
new file mode 100644
index 000000000..35c637834
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSpeechRecognizerClient.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2012 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebSpeechRecognizerClient_h
+#define WebSpeechRecognizerClient_h
+
+#include "platform/WebVector.h"
+
+namespace WebKit {
+
+class WebSpeechRecognitionResult;
+class WebSpeechRecognitionHandle;
+class WebString;
+
+// A client for reporting progress on speech recognition for a specific handle.
+class WebSpeechRecognizerClient {
+public:
+ // These methods correspond to the events described in the spec:
+ // http://speech-javascript-api-spec.googlecode.com/git/speechapi.html#speechreco-events
+
+ // To be called when the embedder has started to capture audio.
+ virtual void didStartAudio(const WebSpeechRecognitionHandle&) = 0;
+
+ // To be called when some sound, possibly speech, has been detected.
+ // This is expected to be called after didStartAudio.
+ virtual void didStartSound(const WebSpeechRecognitionHandle&) = 0;
+
+ // To be called when speech has been detected.
+ // This is expected to be called after didStartSound.
+ virtual void didStartSpeech(const WebSpeechRecognitionHandle&) = 0;
+
+ // To be called when speech is no longer detected.
+ virtual void didEndSpeech(const WebSpeechRecognitionHandle&) = 0;
+
+ // To be called when sound is no longer detected.
+ // This is expected to be called after didEndSpeech.
+ virtual void didEndSound(const WebSpeechRecognitionHandle&) = 0;
+
+ // To be called when audio capture has stopped.
+ // This is expected to be called after didEndSound.
+ virtual void didEndAudio(const WebSpeechRecognitionHandle&) = 0;
+
+ // To be called when the speech recognizer returns a result.
+ virtual void didReceiveResult(const WebSpeechRecognitionHandle&, const WebSpeechRecognitionResult&, unsigned long resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory) = 0;
+
+ // To be called when the speech recognizer returns a final result with no
+ // recognizion hypothesis.
+ virtual void didReceiveNoMatch(const WebSpeechRecognitionHandle&, const WebSpeechRecognitionResult&) = 0;
+
+ // To be called when the recognizer needs to delete one of the previously
+ // returned interim results.
+ virtual void didDeleteResult(const WebSpeechRecognitionHandle&, unsigned resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory) = 0;
+
+ // To be called when a speech recognition error occurs.
+ // FIXME: Introduce an enum for the error code.
+ virtual void didReceiveError(const WebSpeechRecognitionHandle&, const WebString& message, unsigned short code) = 0;
+
+ // To be called when the recognizer has begun to listen to the audio with
+ // the intention of recognizing.
+ virtual void didStart(const WebSpeechRecognitionHandle&) = 0;
+
+ // To be called when the recognition session has ended. This must always be
+ // called, no matter the reason for the end.
+ virtual void didEnd(const WebSpeechRecognitionHandle&) = 0;
+
+protected:
+ virtual ~WebSpeechRecognizerClient() {}
+};
+
+} // namespace WebKit
+
+#endif // WebSpeechRecognizerClient_h
diff --git a/Source/WebKit/chromium/public/WebStorageEventDispatcher.h b/Source/WebKit/chromium/public/WebStorageEventDispatcher.h
index 88d333a93..4fbc596b2 100644
--- a/Source/WebKit/chromium/public/WebStorageEventDispatcher.h
+++ b/Source/WebKit/chromium/public/WebStorageEventDispatcher.h
@@ -35,17 +35,30 @@
namespace WebKit {
+class WebStorageArea;
+class WebStorageNamespace;
class WebURL;
-// This is used to dispatch storage events to all pages.
-// FIXME: Make this (or something) work for SessionStorage!
class WebStorageEventDispatcher {
public:
- WEBKIT_EXPORT static WebStorageEventDispatcher* create();
+ // Dispatch a local storage event to appropiate documents.
+ WEBKIT_EXPORT static void dispatchLocalStorageEvent(
+ const WebString& key, const WebString& oldValue,
+ const WebString& newValue, const WebURL& origin,
+ const WebURL& pageUrl, WebStorageArea* sourceAreaInstance,
+ bool originatedInProcess);
- virtual ~WebStorageEventDispatcher() { }
+ // Dispatch a session storage event to appropiate documents.
+ WEBKIT_EXPORT static void dispatchSessionStorageEvent(
+ const WebString& key, const WebString& oldValue,
+ const WebString& newValue, const WebURL& origin,
+ const WebURL& pageUrl, const WebStorageNamespace&,
+ WebStorageArea* sourceAreaInstance, bool originatedInProcess);
- // Dispatch the actual event. Doesn't yet work for SessionStorage.
+ // DEPRECATED - The instance methods are going away soon in favor
+ // of the two static dispatch methods above.
+ WEBKIT_EXPORT static WebStorageEventDispatcher* create();
+ virtual ~WebStorageEventDispatcher() { }
virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue,
const WebString& newValue, const WebString& origin,
const WebURL& url, bool isLocalStorage) = 0;
diff --git a/Source/WebKit/chromium/public/WebStorageNamespace.h b/Source/WebKit/chromium/public/WebStorageNamespace.h
index bb748d958..894330717 100644
--- a/Source/WebKit/chromium/public/WebStorageNamespace.h
+++ b/Source/WebKit/chromium/public/WebStorageNamespace.h
@@ -43,23 +43,6 @@ class WebString;
// StorageNamespace to represent LocalStorage for the entire browser.
class WebStorageNamespace {
public:
- // Create a new WebStorageNamespace. LocalStorageNamespaces require a path to specify
- // where the SQLite databases that make LocalStorage data persistent are located.
- // If path is empty, data will not persist. You should call delete on the returned
- // object when you're finished.
- WEBKIT_EXPORT static WebStorageNamespace* createLocalStorageNamespace(const WebString& backingDirectoryPath, unsigned quota);
- WEBKIT_EXPORT static WebStorageNamespace* createSessionStorageNamespace(unsigned quota);
-
- // The quota for each storage area. Suggested by the spec.
- static const unsigned m_localStorageQuota = 5 * 1024 * 1024;
-
- // Since SessionStorage memory is allocated in the browser process, we place a
- // per-origin quota on it. Like LocalStorage there are known attacks against
- // this, so it's more of a sanity check than a real security measure.
- static const unsigned m_sessionStorageQuota = 5 * 1024 * 1024;
-
- static const unsigned noQuota = UINT_MAX;
-
virtual ~WebStorageNamespace() { }
// Create a new WebStorageArea object. Two subsequent calls with the same origin
@@ -70,9 +53,11 @@ public:
// Copy a StorageNamespace. This only makes sense in the case of SessionStorage.
virtual WebStorageNamespace* copy() = 0;
- // Shutdown the StorageNamespace. Write all StorageArea's to disk and disallow new
- // write activity.
- virtual void close() = 0;
+ // Returns true of the two instances represent the same storage namespace.
+ virtual bool isSameNamespace(const WebStorageNamespace&) const { return false; }
+
+ // DEPRECATED
+ virtual void close() { }
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/public/WebSurroundingText.h b/Source/WebKit/chromium/public/WebSurroundingText.h
new file mode 100644
index 000000000..dd2a3c527
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSurroundingText.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2012 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebSurroundingText_h
+#define WebSurroundingText_h
+
+#include "WebNode.h"
+#include "WebRange.h"
+#include "platform/WebPrivateOwnPtr.h"
+#include "platform/WebString.h"
+
+namespace WebCore {
+class SurroundingText;
+}
+
+namespace WebKit {
+
+class WebHitTestResult;
+
+class WebSurroundingText {
+public:
+ WebSurroundingText() { }
+ ~WebSurroundingText() { reset(); }
+
+ WEBKIT_EXPORT bool isNull() const;
+ WEBKIT_EXPORT void reset();
+
+ // Initializes the object go get the surrounding text centered in the position described by the hit test.
+ // The maximum length of the contents retrieved is defined by maxLength.
+ WEBKIT_EXPORT void initialize(const WebHitTestResult&, size_t maxLength);
+
+ // Initializes the object go get the surrounding text centered in the selected offset of the given node.
+ // The maximum length of the contents retrieved is defined by maxLength.
+ WEBKIT_EXPORT void initialize(WebNode textNode, size_t offset, size_t maxLength);
+
+ // Surrounding text content retrieved.
+ WEBKIT_EXPORT WebString textContent() const;
+
+ // Offset in the text content of the initial hit position (or provided offset in the node).
+ WEBKIT_EXPORT size_t hitOffsetInTextContent() const;
+
+ // Convert start/end positions in the content text string into a WebKit text range.
+ WEBKIT_EXPORT WebRange rangeFromContentOffsets(size_t startOffsetInContent, size_t endOffsetInContent);
+
+protected:
+ WebPrivateOwnPtr<WebCore::SurroundingText> m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebTextCheckingCompletion.h b/Source/WebKit/chromium/public/WebTextCheckingCompletion.h
index 32701e4c7..c3010dfd4 100644
--- a/Source/WebKit/chromium/public/WebTextCheckingCompletion.h
+++ b/Source/WebKit/chromium/public/WebTextCheckingCompletion.h
@@ -42,6 +42,7 @@ template <typename T> class WebVector;
class WebTextCheckingCompletion {
public:
virtual void didFinishCheckingText(const WebVector<WebTextCheckingResult>&) = 0;
+ virtual void didCancelCheckingText() { };
protected:
~WebTextCheckingCompletion() { }
};
diff --git a/Source/WebKit/chromium/src/WebMediaStreamSourcesRequest.cpp b/Source/WebKit/chromium/public/WebTextFieldDecoratorClient.h
index ea8868009..a8d29f93e 100644
--- a/Source/WebKit/chromium/src/WebMediaStreamSourcesRequest.cpp
+++ b/Source/WebKit/chromium/public/WebTextFieldDecoratorClient.h
@@ -28,61 +28,44 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "config.h"
+#ifndef WebTextFieldDecoratorClient_h
+#define WebTextFieldDecoratorClient_h
-#if ENABLE(MEDIA_STREAM)
-
-#include "platform/WebMediaStreamSourcesRequest.h"
-
-#include "MediaStreamCenter.h"
-#include "MediaStreamSource.h"
-#include "platform/WebMediaStreamSource.h"
-#include "platform/WebVector.h"
-#include <wtf/Vector.h>
-
-using namespace WebCore;
+#include "platform/WebCString.h"
namespace WebKit {
-WebMediaStreamSourcesRequest::WebMediaStreamSourcesRequest(const PassRefPtr<WebCore::MediaStreamSourcesQueryClient>& queryClient)
- : m_private(queryClient)
-{
-}
-
-void WebMediaStreamSourcesRequest::reset()
-{
- m_private.reset();
-}
+class WebInputElement;
-bool WebMediaStreamSourcesRequest::audio() const
-{
- ASSERT(!isNull());
- return m_private->audio();
-}
+class WebTextFieldDecoratorClient {
+public:
+ // The function should return true if the specified input element should
+ // have a decoration icon. This function is called whenever a text field is
+ // created, and should not take much time.
+ virtual bool shouldAddDecorationTo(const WebInputElement&) = 0;
-bool WebMediaStreamSourcesRequest::video() const
-{
- ASSERT(!isNull());
- return m_private->video();
-}
+ // Image resource name for the normal state. The image is stretched to
+ // font-size x font-size square. The function must return an existing
+ // resource name.
+ virtual WebCString imageNameForNormalState() = 0;
+ // Image resource name for the disabled state. If this function returns an
+ // empty string, imageNameForNormalState() is used even for the disabled
+ // state.
+ virtual WebCString imageNameForDisabledState() = 0;
+ // Image resource name for the disabled state. If this function returns an
+ // empty string, the image same as imageNameForDisabledState() is used.
+ virtual WebCString imageNameForReadOnlyState() = 0;
-void WebMediaStreamSourcesRequest::didCompleteQuery(const WebVector<WebMediaStreamSource>& audioSources, const WebVector<WebMediaStreamSource>& videoSources) const
-{
- ASSERT(!isNull());
- MediaStreamSourceVector audio;
- for (size_t i = 0; i < audioSources.size(); ++i) {
- MediaStreamSource* curr = audioSources[i];
- audio.append(curr);
- }
- MediaStreamSourceVector video;
- for (size_t i = 0; i < videoSources.size(); ++i) {
- MediaStreamSource* curr = videoSources[i];
- video.append(curr);
- }
- m_private->didCompleteQuery(audio, video);
-}
+ // This is called when the decoration icon is clicked.
+ virtual void handleClick(WebInputElement&) = 0;
+ // This is called when the input element loses its renderer. An
+ // implementation of this function should not do something which updates
+ // state of WebKit objects.
+ virtual void willDetach(const WebInputElement&) = 0;
-} // namespace WebKit
+ virtual ~WebTextFieldDecoratorClient() { }
+};
-#endif // ENABLE(MEDIA_STREAM)
+}
+#endif // WebTextFieldDecoratorClient_h
diff --git a/Source/WebKit/chromium/src/WebURLResponsePrivate.h b/Source/WebKit/chromium/public/WebTimeRange.h
index b6d5730b0..d1a3a2098 100644
--- a/Source/WebKit/chromium/src/WebURLResponsePrivate.h
+++ b/Source/WebKit/chromium/public/WebTimeRange.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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
@@ -28,25 +28,23 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebURLResponsePrivate_h
-#define WebURLResponsePrivate_h
+#ifndef WebTimeRange_h
+#define WebTimeRange_h
-#include "platform/WebString.h"
-
-namespace WebCore { class ResourceResponse; }
+#include "platform/WebVector.h"
namespace WebKit {
-class WebURLResponsePrivate {
-public:
- WebURLResponsePrivate() : m_resourceResponse(0) { }
-
- // Called by WebURLResponse when it no longer needs this object.
- virtual void dispose() = 0;
+struct WebTimeRange {
+ WebTimeRange() : start(0), end(0) { }
+ WebTimeRange(float s, float e) : start(s), end(e) { }
- WebCore::ResourceResponse* m_resourceResponse;
+ float start;
+ float end;
};
+typedef WebVector<WebTimeRange> WebTimeRanges;
+
} // namespace WebKit
#endif
diff --git a/Source/WebKit/chromium/public/WebUserMediaClient.h b/Source/WebKit/chromium/public/WebUserMediaClient.h
index 2998159ee..bbdea18c1 100644
--- a/Source/WebKit/chromium/public/WebUserMediaClient.h
+++ b/Source/WebKit/chromium/public/WebUserMediaClient.h
@@ -41,9 +41,6 @@ class WebUserMediaClient {
public:
virtual ~WebUserMediaClient() { }
- // DEPRECATED
- virtual void requestUserMedia(const WebUserMediaRequest&, const WebVector<WebMediaStreamSource>&) { }
-
virtual void requestUserMedia(const WebUserMediaRequest&, const WebVector<WebMediaStreamSource>& audioSources, const WebVector<WebMediaStreamSource>& videoSources) { }
virtual void cancelUserMediaRequest(const WebUserMediaRequest&) = 0;
diff --git a/Source/WebKit/chromium/public/WebUserMediaRequest.h b/Source/WebKit/chromium/public/WebUserMediaRequest.h
index 38fb1898b..54b534e7b 100644
--- a/Source/WebKit/chromium/public/WebUserMediaRequest.h
+++ b/Source/WebKit/chromium/public/WebUserMediaRequest.h
@@ -31,6 +31,7 @@
#ifndef WebUserMediaRequest_h
#define WebUserMediaRequest_h
+#include "WebSecurityOrigin.h"
#include "platform/WebCommon.h"
#include "platform/WebPrivatePtr.h"
@@ -41,7 +42,6 @@ class UserMediaRequest;
namespace WebKit {
class WebMediaStreamSource;
-class WebSecurityOrigin;
class WebString;
template <typename T> class WebVector;
@@ -64,12 +64,8 @@ public:
WEBKIT_EXPORT bool audio() const;
WEBKIT_EXPORT bool video() const;
- WEBKIT_EXPORT bool cameraPreferenceUser() const;
- WEBKIT_EXPORT bool cameraPreferenceEnvironment() const;
- WEBKIT_EXPORT WebSecurityOrigin securityOrigin() const;
- // DEPRECATED
- WEBKIT_EXPORT void requestSucceeded(const WebVector<WebMediaStreamSource>&);
+ WEBKIT_EXPORT WebSecurityOrigin securityOrigin() const;
WEBKIT_EXPORT void requestSucceeded(const WebVector<WebMediaStreamSource>& audioSources, const WebVector<WebMediaStreamSource>& videoSources);
WEBKIT_EXPORT void requestFailed();
diff --git a/Source/WebKit/chromium/public/WebVideoFrame.h b/Source/WebKit/chromium/public/WebVideoFrame.h
index 78790627d..948a7a444 100644
--- a/Source/WebKit/chromium/public/WebVideoFrame.h
+++ b/Source/WebKit/chromium/public/WebVideoFrame.h
@@ -1,69 +1,26 @@
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebVideoFrame_h
-#define WebVideoFrame_h
-
-namespace WebKit {
-
-// A proxy video frame interface to communicate frame data between chromium
-// and WebKit.
-class WebVideoFrame {
-public:
- enum Format {
- FormatInvalid,
- FormatRGB555,
- FormatRGB565,
- FormatRGB24,
- FormatRGB32,
- FormatRGBA,
- FormatYV12,
- FormatYV16,
- FormatNV12,
- FormatEmpty,
- FormatASCII,
- FormatI420,
- FormatNativeTexture,
- };
-
- virtual ~WebVideoFrame() { }
- virtual Format format() const { return FormatInvalid; }
- virtual unsigned width() const { return 0; }
- virtual unsigned height() const { return 0; }
- virtual unsigned planes() const { return 0; }
- virtual int stride(unsigned plane) const { return 0; }
- virtual const void* data(unsigned plane) const { return 0; }
- virtual unsigned textureId() const { return 0; }
- virtual unsigned textureTarget() const { return 0; }
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../Platform/chromium/public/WebVideoFrame.h"
diff --git a/Source/WebKit/chromium/public/WebView.h b/Source/WebKit/chromium/public/WebView.h
index 50cf2eaa0..111ecc641 100644
--- a/Source/WebKit/chromium/public/WebView.h
+++ b/Source/WebKit/chromium/public/WebView.h
@@ -41,6 +41,7 @@ namespace WebKit {
class WebAccessibilityObject;
class WebAutofillClient;
+class WebBatteryStatus;
class WebDevToolsAgent;
class WebDevToolsAgentClient;
class WebDragData;
@@ -50,10 +51,14 @@ class WebGraphicsContext3D;
class WebNode;
class WebPageOverlay;
class WebPermissionClient;
+class WebPrerendererClient;
+class WebRange;
class WebSettings;
class WebSpellCheckClient;
class WebString;
+class WebTextFieldDecoratorClient;
class WebViewClient;
+struct WebActiveWheelFlingParameters;
struct WebMediaPlayerAction;
struct WebPluginAction;
struct WebPoint;
@@ -102,7 +107,11 @@ public:
virtual void setAutofillClient(WebAutofillClient*) = 0;
virtual void setDevToolsAgentClient(WebDevToolsAgentClient*) = 0;
virtual void setPermissionClient(WebPermissionClient*) = 0;
+ // FIXME: After the Prerendering API lands in chrome, remove this staging thunk
+ // for setPrerendererClient().
+ virtual void setPrerendererClient(WebPrerendererClient*) { }
virtual void setSpellCheckClient(WebSpellCheckClient*) = 0;
+ virtual void addTextFieldDecoratorClient(WebTextFieldDecoratorClient*) = 0;
// Options -------------------------------------------------------------
@@ -266,12 +275,6 @@ public:
// Turn off auto-resize.
virtual void disableAutoResizeMode() = 0;
- // DEPRECATED
- virtual void enableAutoResizeMode(
- bool enable,
- const WebSize& minSize,
- const WebSize& maxSize) = 0;
-
// Media ---------------------------------------------------------------
// Performs the specified media player action on the node at the given location.
@@ -352,19 +355,16 @@ public:
// Autofill -----------------------------------------------------------
// Notifies the WebView that Autofill suggestions are available for a node.
- // |uniqueIDs| is a vector of IDs that represent the unique ID of each
- // Autofill profile in the suggestions popup. If a unique ID is 0, then the
- // corresponding suggestion comes from Autocomplete rather than Autofill.
- // If a unique ID is negative, then the corresponding "suggestion" is
- // actually a user-facing warning, e.g. explaining why Autofill is
- // unavailable for the current form.
+ // |itemIDs| is a vector of IDs for the menu items. A positive itemID is a
+ // unique ID for the Autofill entries. Other MenuItemIDs are defined in
+ // WebAutofillClient.h
virtual void applyAutofillSuggestions(
const WebNode&,
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
const WebVector<WebString>& icons,
- const WebVector<int>& uniqueIDs,
- int separatorIndex) = 0;
+ const WebVector<int>& itemIDs,
+ int separatorIndex = -1) = 0;
// Hides any popup (suggestions, selects...) that might be showing.
virtual void hidePopups() = 0;
@@ -434,6 +434,10 @@ public:
// Can be used for allocating resources that the compositor will later access.
virtual WebGraphicsContext3D* sharedGraphicsContext3D() = 0;
+ // Called to inform the WebView that a wheel fling animation was started externally (for instance
+ // by the compositor) but must be completed by the WebView.
+ virtual void transferActiveWheelFlingAnimation(const WebActiveWheelFlingParameters&) = 0;
+
// Visibility -----------------------------------------------------------
// Sets the visibility of the WebView.
@@ -453,12 +457,18 @@ public:
virtual void addPageOverlay(WebPageOverlay*, int /*z-order*/) = 0;
virtual void removePageOverlay(WebPageOverlay*) = 0;
+ // Battery status API support -------------------------------------------
+
+ // Updates the battery status in the BatteryClient. This also triggers the
+ // appropriate JS events (e.g. sends a 'levelchange' event to JS if the
+ // level is changed in this update from the previous update).
+ virtual void updateBatteryStatus(const WebBatteryStatus&) { }
+
// Testing functionality for LayoutTestController -----------------------
// Simulates a compositor lost context.
virtual void loseCompositorContext(int numTimes) = 0;
-
protected:
~WebView() {}
};
diff --git a/Source/WebKit/chromium/public/WebViewClient.h b/Source/WebKit/chromium/public/WebViewClient.h
index b2c0e5665..c4a5e40d2 100644
--- a/Source/WebKit/chromium/public/WebViewClient.h
+++ b/Source/WebKit/chromium/public/WebViewClient.h
@@ -48,6 +48,7 @@
namespace WebKit {
class WebAccessibilityObject;
+class WebBatteryStatusClient;
class WebColorChooser;
class WebColorChooserClient;
class WebDeviceOrientationClient;
@@ -68,6 +69,7 @@ class WebNotificationPresenter;
class WebRange;
class WebSpeechInputController;
class WebSpeechInputListener;
+class WebSpeechRecognizer;
class WebStorageNamespace;
class WebURL;
class WebURLRequest;
@@ -116,8 +118,6 @@ public:
// Creates a graphics context that renders to the client's WebView.
virtual WebGraphicsContext3D* createGraphicsContext3D(const WebGraphicsContext3D::Attributes&) { return 0; }
- // Deprecated, use the first version of this function. If you want an offscreen context, use WebKitPlatformSupport::createOffscreenGraphicsContext3D().
- virtual WebGraphicsContext3D* createGraphicsContext3D(const WebGraphicsContext3D::Attributes&, bool renderDirectlyToWebView) { return 0; }
// Misc ----------------------------------------------------------------
@@ -318,11 +318,18 @@ public:
virtual WebSpeechInputController* speechInputController(
WebSpeechInputListener*) { return 0; }
+ // Access the embedder API for speech recognition services.
+ virtual WebSpeechRecognizer* speechRecognizer() { return 0; }
+
// Device Orientation --------------------------------------------------
// Access the embedder API for device orientation services.
virtual WebDeviceOrientationClient* deviceOrientationClient() { return 0; }
+ // Battery Status ------------------------------------------------------
+
+ // Access the embedder API for battery status services.
+ virtual WebBatteryStatusClient* batteryStatusClient() { return 0; }
// Zoom ----------------------------------------------------------------
diff --git a/Source/WebKit/chromium/public/WebWidget.h b/Source/WebKit/chromium/public/WebWidget.h
index e9712d743..fad319d78 100644
--- a/Source/WebKit/chromium/public/WebWidget.h
+++ b/Source/WebKit/chromium/public/WebWidget.h
@@ -40,6 +40,7 @@
#include "platform/WebSize.h"
#define WEBKIT_HAS_NEW_FULLSCREEN_API 1
+#define WEBWIDGET_HAS_SETCOMPOSITORSURFACEREADY 1
namespace WebKit {
@@ -79,10 +80,10 @@ public:
virtual void didExitFullScreen() { }
// Called to update imperative animation state. This should be called before
- // paint, although the client can rate-limit these calls. When
- // frameBeginTime is 0.0, the WebWidget will determine the frame begin time
- // itself.
- virtual void animate(double frameBeginTime) { }
+ // paint, although the client can rate-limit these calls.
+ //
+ // FIXME: remove this function entirely when inversion patches land.
+ virtual void animate(double ignored) { }
// Called to layout the WebWidget. This MUST be called before Paint,
// and it may result in calls to WebWidgetClient::didInvalidateRect.
@@ -107,11 +108,24 @@ public:
// animate or layout in this case.
virtual void composite(bool finish) = 0;
+ // Indicates that the compositing surface associated with this WebWidget is
+ // ready to use.
+ virtual void setCompositorSurfaceReady() = 0;
+
// Temporary method for the embedder to notify the WebWidget that the widget
// has taken damage, e.g. due to a window expose. This method will be
// removed when the WebWidget inversion patch lands --- http://crbug.com/112837
virtual void setNeedsRedraw() { }
+ // Temporary method for the embedder to check for throttled input. When this
+ // is true, the WebWidget is indicating that it would prefer to not receive
+ // additional input events until
+ // WebWidgetClient::didBecomeReadyForAdditionalInput is called.
+ //
+ // This method will be removed when the WebWidget inversion patch lands ---
+ // http://crbug.com/112837
+ virtual bool isInputThrottled() const { return false; }
+
// Called to inform the WebWidget of a change in theme.
// Implementors that cache rendered copies of widgets need to re-render
// on receiving this message
@@ -195,6 +209,9 @@ public:
// Instrumentation method that marks beginning of frame update that includes
// things like animate()/layout()/paint()/composite().
virtual void instrumentBeginFrame() { }
+ // Cancels the effect of instrumentBeginFrame() in case there were no events
+ // following the call to instrumentBeginFrame().
+ virtual void instrumentCancelFrame() { }
protected:
~WebWidget() { }
diff --git a/Source/WebKit/chromium/public/WebWidgetClient.h b/Source/WebKit/chromium/public/WebWidgetClient.h
index 24cd9c6ac..92dfb3671 100644
--- a/Source/WebKit/chromium/public/WebWidgetClient.h
+++ b/Source/WebKit/chromium/public/WebWidgetClient.h
@@ -56,14 +56,23 @@ public:
virtual void didAutoResize(const WebSize& newSize) { }
// Called when the compositor is enabled or disabled.
- // The WebCompositor identifier can be used on the compositor thread to get access
- // to the WebCompositor instance associated with this WebWidget.
- // If there is no WebCompositor associated with this WebWidget (for example if
- // threaded compositing is not enabled) then calling WebCompositor::fromIdentifier()
+ // The inputHandlerIdentifier can be used on the compositor thread to get access
+ // to the WebCompositorInputHandler instance associated with this WebWidget.
+ // If there is no WebCompositorInputHandler associated with this WebWidget (for example if
+ // threaded compositing is not enabled) then calling WebCompositorInputHandler::fromIdentifier()
// for the specified identifier will return 0.
- virtual void didActivateCompositor(int compositorIdentifier) { }
+ virtual void didActivateCompositor(int inputHandlerIdentifier) { }
virtual void didDeactivateCompositor() { }
+ // Indicates to the embedder that the compositor is about to begin a
+ // frame. This is primarily to signal to flow control mechanisms that a
+ // frame is beginning, not to perform actual painting work.
+ virtual void willBeginCompositorFrame() { }
+
+ // Indicates to the embedder that the WebWidget is ready for additional
+ // input.
+ virtual void didBecomeReadyForAdditionalInput() { }
+
// Called for compositing mode when the draw commands for a WebKit-side
// frame have been issued.
virtual void didCommitAndDrawCompositorFrame() { }
diff --git a/Source/WebKit/chromium/public/android/WebInputEventFactory.h b/Source/WebKit/chromium/public/android/WebInputEventFactory.h
index d49be4187..fb52787a7 100644
--- a/Source/WebKit/chromium/public/android/WebInputEventFactory.h
+++ b/Source/WebKit/chromium/public/android/WebInputEventFactory.h
@@ -59,6 +59,8 @@ public:
int windowY,
MouseEventType,
double timeStampSeconds,
+ int modifiers,
+ int clickCount,
WebMouseEvent::Button = WebMouseEvent::ButtonLeft);
};
diff --git a/Source/WebKit/chromium/public/platform/WebArrayBufferView.h b/Source/WebKit/chromium/public/platform/WebArrayBufferView.h
index 8f2356930..bcdb4b515 100644
--- a/Source/WebKit/chromium/public/platform/WebArrayBufferView.h
+++ b/Source/WebKit/chromium/public/platform/WebArrayBufferView.h
@@ -32,6 +32,13 @@
#include "WebCommon.h"
#include "WebPrivatePtr.h"
+#if WEBKIT_USING_V8
+namespace v8 {
+class Value;
+template <class T> class Handle;
+}
+#endif
+
namespace WTF { class ArrayBufferView; }
namespace WebKit {
@@ -50,6 +57,10 @@ public:
WEBKIT_EXPORT void assign(const WebArrayBufferView&);
WEBKIT_EXPORT void reset();
+#if WEBKIT_USING_V8
+ WEBKIT_EXPORT static WebArrayBufferView* createFromV8Value(v8::Handle<v8::Value>);
+#endif
+
#if WEBKIT_IMPLEMENTATION
WebArrayBufferView(const WTF::PassRefPtr<WTF::ArrayBufferView>&);
WebArrayBufferView& operator=(const WTF::PassRefPtr<WTF::ArrayBufferView>&);
diff --git a/Source/WebKit/chromium/public/platform/WebAudioBus.h b/Source/WebKit/chromium/public/platform/WebAudioBus.h
index 750ae79e2..a01117bce 100644
--- a/Source/WebKit/chromium/public/platform/WebAudioBus.h
+++ b/Source/WebKit/chromium/public/platform/WebAudioBus.h
@@ -1,75 +1,26 @@
/*
- * Copyright (C) 2010, Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ *
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * 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 INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * 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.
+ * 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 WebAudioBus_h
-#define WebAudioBus_h
-
-#include "WebCommon.h"
-
-namespace WebCore { class AudioBus; }
-
-#if WEBKIT_IMPLEMENTATION
-namespace WTF { template <typename T> class PassOwnPtr; }
-#endif
-
-namespace WebKit {
-
-class WebAudioBusPrivate;
-
-// A container for multi-channel linear PCM audio data.
-//
-// WARNING: It is not safe to pass a WebAudioBus across threads!!!
-//
-class WebAudioBus {
-public:
- WebAudioBus() : m_private(0) { }
- ~WebAudioBus() { reset(); }
-
- // initialize() allocates memory of the given length for the given number of channels.
- WEBKIT_EXPORT void initialize(unsigned numberOfChannels, size_t length, double sampleRate);
-
- // reset() releases the memory allocated from initialize().
- WEBKIT_EXPORT void reset();
-
- WEBKIT_EXPORT unsigned numberOfChannels() const;
- WEBKIT_EXPORT size_t length() const;
- WEBKIT_EXPORT double sampleRate() const;
-
- WEBKIT_EXPORT float* channelData(unsigned channelIndex);
-
-#if WEBKIT_IMPLEMENTATION
- WTF::PassOwnPtr<WebCore::AudioBus> release();
-#endif
-
-private:
- // Disallow copy and assign.
- WebAudioBus(const WebAudioBus&);
- void operator=(const WebAudioBus&);
-
- WebCore::AudioBus* m_private;
-};
-
-} // namespace WebKit
-
-#endif // WebAudioBus_h
+#include "../../../../Platform/chromium/public/WebAudioBus.h"
diff --git a/Source/WebKit/chromium/public/platform/WebAudioDevice.h b/Source/WebKit/chromium/public/platform/WebAudioDevice.h
index 00aea975f..67ea5ffbe 100644
--- a/Source/WebKit/chromium/public/platform/WebAudioDevice.h
+++ b/Source/WebKit/chromium/public/platform/WebAudioDevice.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -10,9 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -26,31 +23,4 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebAudioDevice_h
-#define WebAudioDevice_h
-
-#include "WebVector.h"
-
-namespace WebKit {
-
-// Abstract interface to the Chromium audio system.
-
-class WebAudioDevice {
-public:
- class RenderCallback {
- public:
- virtual void render(const WebVector<float*>& audioData, size_t numberOfFrames) = 0;
- protected:
- virtual ~RenderCallback() { }
- };
-
- virtual ~WebAudioDevice() { }
-
- virtual void start() = 0;
- virtual void stop() = 0;
- virtual double sampleRate() = 0;
-};
-
-} // namespace WebKit
-
-#endif // WebAudioDevice_h
+#include "../../../../Platform/chromium/public/WebAudioDevice.h"
diff --git a/Source/WebKit/chromium/public/platform/WebData.h b/Source/WebKit/chromium/public/platform/WebData.h
index 17d3f388c..cec0c63bd 100644
--- a/Source/WebKit/chromium/public/platform/WebData.h
+++ b/Source/WebKit/chromium/public/platform/WebData.h
@@ -1,110 +1,26 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebData_h
-#define WebData_h
-
-#include "WebCommon.h"
-
-#if WEBKIT_IMPLEMENTATION
-namespace WebCore { class SharedBuffer; }
-namespace WTF { template <typename T> class PassRefPtr; }
-#endif
-
-namespace WebKit {
-
-class WebDataPrivate;
-
-// A container for raw bytes. It is inexpensive to copy a WebData object.
-//
-// WARNING: It is not safe to pass a WebData across threads!!!
-//
-class WebData {
-public:
- ~WebData() { reset(); }
-
- WebData() : m_private(0) { }
-
- WebData(const char* data, size_t size) : m_private(0)
- {
- assign(data, size);
- }
-
- template <int N>
- WebData(const char (&data)[N]) : m_private(0)
- {
- assign(data, N - 1);
- }
-
- WebData(const WebData& d) : m_private(0) { assign(d); }
-
- WebData& operator=(const WebData& d)
- {
- assign(d);
- return *this;
- }
-
- WEBKIT_EXPORT void reset();
- WEBKIT_EXPORT void assign(const WebData&);
- WEBKIT_EXPORT void assign(const char* data, size_t size);
-
- WEBKIT_EXPORT size_t size() const;
- WEBKIT_EXPORT const char* data() const;
-
- bool isEmpty() const { return !size(); }
- bool isNull() const { return !m_private; }
-
-#if WEBKIT_IMPLEMENTATION
- WebData(const WTF::PassRefPtr<WebCore::SharedBuffer>&);
- WebData& operator=(const WTF::PassRefPtr<WebCore::SharedBuffer>&);
- operator WTF::PassRefPtr<WebCore::SharedBuffer>() const;
-#else
- template <class C>
- WebData(const C& c) : m_private(0)
- {
- assign(c.data(), c.size());
- }
-
- template <class C>
- WebData& operator=(const C& c)
- {
- assign(c.data(), c.size());
- return *this;
- }
-#endif
-
-private:
- void assign(WebDataPrivate*);
- WebDataPrivate* m_private;
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebData.h"
diff --git a/Source/WebKit/chromium/public/platform/WebDragData.h b/Source/WebKit/chromium/public/platform/WebDragData.h
index a6c82aee1..9666fe4b1 100644
--- a/Source/WebKit/chromium/public/platform/WebDragData.h
+++ b/Source/WebKit/chromium/public/platform/WebDragData.h
@@ -70,6 +70,7 @@ public:
// Only valid when storageType == StorageTypeFilename.
WebString filenameData;
+ WebString displayNameData;
// Only valid when storageType == StorageTypeBinaryData.
WebData binaryData;
@@ -102,6 +103,9 @@ public:
WEBKIT_EXPORT void setItems(const WebVector<Item>&);
WEBKIT_EXPORT void addItem(const Item&);
+ WEBKIT_EXPORT WebString filesystemId() const;
+ WEBKIT_EXPORT void setFilesystemId(const WebString&);
+
#if WEBKIT_IMPLEMENTATION
WebDragData(const WTF::PassRefPtr<WebCore::ChromiumDataObject>&);
WebDragData& operator=(const WTF::PassRefPtr<WebCore::ChromiumDataObject>&);
diff --git a/Source/WebKit/chromium/public/platform/WebFileSystem.h b/Source/WebKit/chromium/public/platform/WebFileSystem.h
index 2562ef1c3..25afb49f0 100644
--- a/Source/WebKit/chromium/public/platform/WebFileSystem.h
+++ b/Source/WebKit/chromium/public/platform/WebFileSystem.h
@@ -46,6 +46,11 @@ public:
enum Type {
TypeTemporary,
TypePersistent,
+
+ // Indicates an isolated filesystem which only exposes a set of files.
+ TypeIsolated,
+
+ // Indicates a non-sandboxed filesystem.
TypeExternal,
};
diff --git a/Source/WebKit/chromium/public/platform/WebGamepad.h b/Source/WebKit/chromium/public/platform/WebGamepad.h
index 788e78ba4..93d08f3c7 100644
--- a/Source/WebKit/chromium/public/platform/WebGamepad.h
+++ b/Source/WebKit/chromium/public/platform/WebGamepad.h
@@ -1,86 +1,26 @@
-// Copyright (C) 2011, 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:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-//
-// THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS BE LIABLE
-// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-// DAMAGE.
-
-#ifndef WebGamepad_h
-#define WebGamepad_h
-
-#include "WebCommon.h"
-
-#if WEBKIT_IMPLEMENTATION
-#include <wtf/Assertions.h>
-#endif
-
-namespace WebKit {
-
-#pragma pack(push, 1)
-
-// This structure is intentionally POD and fixed size so that it can be shared
-// memory between hardware polling threads and the rest of the browser. See
-// also WebGamepads.h.
-class WebGamepad {
-public:
- static const size_t idLengthCap = 128;
- static const size_t axesLengthCap = 16;
- static const size_t buttonsLengthCap = 32;
-
- WebGamepad()
- : connected(false)
- , timestamp(0)
- , axesLength(0)
- , buttonsLength(0)
- {
- id[0] = 0;
- }
-
- // Is there a gamepad connected at this index?
- bool connected;
-
- // Device identifier (based on manufacturer, model, etc.).
- WebUChar id[idLengthCap];
-
- // Monotonically increasing value referring to when the data were last
- // updated.
- unsigned long long timestamp;
-
- // Number of valid entries in the axes array.
- unsigned axesLength;
-
- // Normalized values representing axes, in the range [-1..1].
- float axes[axesLengthCap];
-
- // Number of valid entries in the buttons array.
- unsigned buttonsLength;
-
- // Normalized values representing buttons, in the range [0..1].
- float buttons[buttonsLengthCap];
-};
-
-#if WEBKIT_IMPLEMENTATION
-COMPILE_ASSERT(sizeof(WebGamepad) == 465, WebGamepad_has_wrong_size);
-#endif
-
-#pragma pack(pop)
-
-}
-
-#endif // WebGamepad_h
+/*
+ * Copyright (C) 2012 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:
+ *
+ * 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 "../../../../Platform/chromium/public/WebGamepad.h"
diff --git a/Source/WebKit/chromium/public/platform/WebGamepads.h b/Source/WebKit/chromium/public/platform/WebGamepads.h
index 50e2ab208..b69539029 100644
--- a/Source/WebKit/chromium/public/platform/WebGamepads.h
+++ b/Source/WebKit/chromium/public/platform/WebGamepads.h
@@ -1,62 +1,26 @@
-// Copyright (C) 2011, 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:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-//
-// THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS BE LIABLE
-// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-// DAMAGE.
-
-#ifndef WebGamepads_h
-#define WebGamepads_h
-
-#include "WebGamepad.h"
-
-#if WEBKIT_IMPLEMENTATION
-#include <wtf/Assertions.h>
-#endif
-
-namespace WebKit {
-
-#pragma pack(push, 1)
-
-// This structure is intentionally POD and fixed size so that it can be stored
-// in shared memory between hardware polling threads and the rest of the
-// browser.
-class WebGamepads {
-public:
- WebGamepads()
- : length(0) { }
-
- static const size_t itemsLengthCap = 4;
-
- // Number of valid entries in the items array.
- unsigned length;
-
- // Gamepad data for N separate gamepad devices.
- WebGamepad items[itemsLengthCap];
-};
-
-#if WEBKIT_IMPLEMENTATION
-COMPILE_ASSERT(sizeof(WebGamepads) == 1864, WebGamepads_has_wrong_size);
-#endif
-
-#pragma pack(pop)
-
-}
-
-#endif // WebGamepads_h
+/*
+ * Copyright (C) 2012 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:
+ *
+ * 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 "../../../../Platform/chromium/public/WebGamepads.h"
diff --git a/Source/WebKit/chromium/public/platform/WebHTTPBody.h b/Source/WebKit/chromium/public/platform/WebHTTPBody.h
index e97856320..44754e936 100644
--- a/Source/WebKit/chromium/public/platform/WebHTTPBody.h
+++ b/Source/WebKit/chromium/public/platform/WebHTTPBody.h
@@ -1,109 +1,26 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebHTTPBody_h
-#define WebHTTPBody_h
-
-#include "WebData.h"
-#include "WebNonCopyable.h"
-#include "WebString.h"
-#include "WebURL.h"
-
-#if WEBKIT_IMPLEMENTATION
-namespace WebCore { class FormData; }
-namespace WTF { template <typename T> class PassRefPtr; }
-#endif
-
-namespace WebKit {
-
-class WebHTTPBodyPrivate;
-
-class WebHTTPBody {
-public:
- struct Element {
- enum Type { TypeData, TypeFile, TypeBlob } type;
- WebData data;
- WebString filePath;
- long long fileStart;
- long long fileLength; // -1 means to the end of the file.
- double modificationTime;
- WebURL blobURL;
- };
-
- ~WebHTTPBody() { reset(); }
-
- WebHTTPBody() : m_private(0) { }
- WebHTTPBody(const WebHTTPBody& b) : m_private(0) { assign(b); }
- WebHTTPBody& operator=(const WebHTTPBody& b)
- {
- assign(b);
- return *this;
- }
-
- WEBKIT_EXPORT void initialize();
- WEBKIT_EXPORT void reset();
- WEBKIT_EXPORT void assign(const WebHTTPBody&);
-
- bool isNull() const { return !m_private; }
-
- // Returns the number of elements comprising the http body.
- WEBKIT_EXPORT size_t elementCount() const;
-
- // Sets the values of the element at the given index. Returns false if
- // index is out of bounds.
- WEBKIT_EXPORT bool elementAt(size_t index, Element&) const;
-
- // Append to the list of elements.
- WEBKIT_EXPORT void appendData(const WebData&);
- WEBKIT_EXPORT void appendFile(const WebString&);
- // Passing -1 to fileLength means to the end of the file.
- WEBKIT_EXPORT void appendFileRange(const WebString&, long long fileStart, long long fileLength, double modificationTime);
- WEBKIT_EXPORT void appendBlob(const WebURL&);
-
- // Identifies a particular form submission instance. A value of 0 is
- // used to indicate an unspecified identifier.
- WEBKIT_EXPORT long long identifier() const;
- WEBKIT_EXPORT void setIdentifier(long long);
-
-#if WEBKIT_IMPLEMENTATION
- WebHTTPBody(const WTF::PassRefPtr<WebCore::FormData>&);
- WebHTTPBody& operator=(const WTF::PassRefPtr<WebCore::FormData>&);
- operator WTF::PassRefPtr<WebCore::FormData>() const;
-#endif
-
-private:
- void assign(WebHTTPBodyPrivate*);
- void ensureMutable();
- WebHTTPBodyPrivate* m_private;
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebHTTPBody.h"
diff --git a/Source/WebKit/chromium/public/platform/WebHTTPHeaderVisitor.h b/Source/WebKit/chromium/public/platform/WebHTTPHeaderVisitor.h
index 2ca86c01c..d244c9543 100644
--- a/Source/WebKit/chromium/public/platform/WebHTTPHeaderVisitor.h
+++ b/Source/WebKit/chromium/public/platform/WebHTTPHeaderVisitor.h
@@ -1,48 +1,26 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebHTTPHeaderVisitor_h
-#define WebHTTPHeaderVisitor_h
-
-namespace WebKit {
-
-class WebString;
-
-class WebHTTPHeaderVisitor {
-public:
- virtual void visitHeader(const WebString& name, const WebString& value) = 0;
-
-protected:
- ~WebHTTPHeaderVisitor() { }
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebHTTPHeaderVisitor.h"
diff --git a/Source/WebKit/chromium/public/platform/WebHTTPLoadInfo.h b/Source/WebKit/chromium/public/platform/WebHTTPLoadInfo.h
index 09bf16992..3e3cb3608 100644
--- a/Source/WebKit/chromium/public/platform/WebHTTPLoadInfo.h
+++ b/Source/WebKit/chromium/public/platform/WebHTTPLoadInfo.h
@@ -1,88 +1,26 @@
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebHTTPLoadInfo_h
-#define WebHTTPLoadInfo_h
-
-#include "WebCommon.h"
-#include "WebPrivatePtr.h"
-
-namespace WebCore {
-struct ResourceLoadInfo;
-}
-
-namespace WebKit {
-class WebString;
-
-class WebHTTPLoadInfo {
-public:
- WebHTTPLoadInfo() { initialize(); }
- ~WebHTTPLoadInfo() { reset(); }
- WebHTTPLoadInfo(const WebHTTPLoadInfo& r) { assign(r); }
- WebHTTPLoadInfo& operator =(const WebHTTPLoadInfo& r)
- {
- assign(r);
- return *this;
- }
-
- WEBKIT_EXPORT void initialize();
- WEBKIT_EXPORT void reset();
- WEBKIT_EXPORT void assign(const WebHTTPLoadInfo& r);
-
- WEBKIT_EXPORT int httpStatusCode() const;
- WEBKIT_EXPORT void setHTTPStatusCode(int);
-
- WEBKIT_EXPORT WebString httpStatusText() const;
- WEBKIT_EXPORT void setHTTPStatusText(const WebString&);
-
- WEBKIT_EXPORT long long encodedDataLength() const;
- WEBKIT_EXPORT void setEncodedDataLength(long long);
-
- WEBKIT_EXPORT void addRequestHeader(const WebString& name, const WebString& value);
- WEBKIT_EXPORT void addResponseHeader(const WebString& name, const WebString& value);
-
- WEBKIT_EXPORT WebString requestHeadersText() const;
- WEBKIT_EXPORT void setRequestHeadersText(const WebString&);
-
- WEBKIT_EXPORT WebString responseHeadersText() const;
- WEBKIT_EXPORT void setResponseHeadersText(const WebString&);
-
-#if WEBKIT_IMPLEMENTATION
- WebHTTPLoadInfo(WTF::PassRefPtr<WebCore::ResourceLoadInfo>);
- operator WTF::PassRefPtr<WebCore::ResourceLoadInfo>() const;
-#endif
-
-private:
- WebPrivatePtr<WebCore::ResourceLoadInfo> m_private;
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebHTTPLoadInfo.h"
diff --git a/Source/WebKit/chromium/public/platform/WebICECandidateDescriptor.h b/Source/WebKit/chromium/public/platform/WebICECandidateDescriptor.h
new file mode 100644
index 000000000..56ea93146
--- /dev/null
+++ b/Source/WebKit/chromium/public/platform/WebICECandidateDescriptor.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * 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 "../../../../Platform/chromium/public/WebICECandidateDescriptor.h"
diff --git a/Source/WebKit/chromium/public/platform/WebICEOptions.h b/Source/WebKit/chromium/public/platform/WebICEOptions.h
new file mode 100644
index 000000000..0f2e46000
--- /dev/null
+++ b/Source/WebKit/chromium/public/platform/WebICEOptions.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * 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 "../../../../Platform/chromium/public/WebICEOptions.h"
diff --git a/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h b/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h
index d2c1fd814..ca3762dcb 100644
--- a/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h
+++ b/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h
@@ -31,19 +31,16 @@
#ifndef WebKitPlatformSupport_h
#define WebKitPlatformSupport_h
-#include "WebAudioBus.h"
-#include "WebAudioDevice.h"
+#include "../WebIDBKeyPath.h" // FIXME: Remove with: http://webkit.org/b/84207
#include "WebCommon.h"
-#include "WebData.h"
-#include "WebGamepads.h"
#include "WebGraphicsContext3D.h"
#include "WebLocalizedString.h"
#include "WebSerializedScriptValue.h"
#include "WebString.h"
#include "WebURL.h"
#include "WebVector.h"
-
#include <time.h>
+#include "../../../../Platform/chromium/public/Platform.h"
#ifdef WIN32
typedef void *HANDLE;
@@ -60,31 +57,21 @@ class WebFileSystem;
class WebFileUtilities;
class WebIDBFactory; // FIXME: Does this belong in platform?
class WebIDBKey; // FIXME: Does this belong in platform?
-class WebMediaStreamCenter;
-class WebMediaStreamCenterClient;
class WebMessagePortChannel; // FIXME: Does this belong in platform?
-class WebMimeRegistry;
-class WebPeerConnectionHandler;
-class WebPeerConnectionHandlerClient;
class WebPluginListBuilder; // FIXME: Does this belong in platform?
class WebSandboxSupport;
class WebSharedWorkerRepository; // FIXME: Does this belong in platform?
-class WebSocketStreamHandle;
class WebStorageNamespace; // FIXME: Does this belong in platform?
class WebThemeEngine;
-class WebThread;
-class WebURLLoader;
class WebWorkerRunLoop;
-class WebKitPlatformSupport {
+// FIXME: Eventually all these API will need to move to WebKit::Platform.
+class WebKitPlatformSupport : public Platform {
public:
// Must return non-null.
virtual WebClipboard* clipboard() { return 0; }
// Must return non-null.
- virtual WebMimeRegistry* mimeRegistry() { return 0; }
-
- // Must return non-null.
virtual WebFileUtilities* fileUtilities() { return 0; }
// May return null if sandbox support is not necessary
@@ -106,29 +93,12 @@ public:
// Return a LocalStorage namespace that corresponds to the following path.
virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) { return 0; }
- // Called when storage events fire.
+ // DEPRECATED
virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue,
const WebString& newValue, const WebString& origin,
const WebURL& url, bool isLocalStorage) { }
- // Gamepad -------------------------------------------------------------
-
- virtual void sampleGamepads(WebGamepads& into) { into.length = 0; }
-
-
- // History -------------------------------------------------------------
-
- // Returns the hash for the given canonicalized URL for use in visited
- // link coloring.
- virtual unsigned long long visitedLinkHash(
- const char* canonicalURL, size_t length) { return 0; }
-
- // Returns whether the given link hash is in the user's history. The
- // hash must have been generated by calling VisitedLinkHash().
- virtual bool isLinkVisited(unsigned long long linkHash) { return false; }
-
-
// HTML5 Database ------------------------------------------------------
#ifdef WIN32
@@ -157,49 +127,14 @@ public:
// Indexed Database ----------------------------------------------------
virtual WebIDBFactory* idbFactory() { return 0; }
- virtual void createIDBKeysFromSerializedValuesAndKeyPath(const WebVector<WebSerializedScriptValue>& values, const WebString& keyPath, WebVector<WebIDBKey>& keys) { }
- virtual WebSerializedScriptValue injectIDBKeyIntoSerializedValue(const WebIDBKey& key, const WebSerializedScriptValue& value, const WebString& keyPath) { return WebSerializedScriptValue(); }
-
-
- // Keygen --------------------------------------------------------------
-
- // Handle the <keygen> tag for generating client certificates
- // Returns a base64 encoded signed copy of a public key from a newly
- // generated key pair and the supplied challenge string. keySizeindex
- // specifies the strength of the key.
- virtual WebString signedPublicKeyAndChallengeString(unsigned keySizeIndex,
- const WebKit::WebString& challenge,
- const WebKit::WebURL& url) { return WebString(); }
-
-
-
- // Memory --------------------------------------------------------------
-
- // Returns the current space allocated for the pagefile, in MB.
- // That is committed size for Windows and virtual memory size for POSIX
- virtual size_t memoryUsageMB() { return 0; }
-
- // Same as above, but always returns actual value, without any caches.
- virtual size_t actualMemoryUsageMB() { return 0; }
-
- // If memory usage is below this threshold, do not bother forcing GC.
- virtual size_t lowMemoryUsageMB() { return 256; }
-
- // If memory usage is above this threshold, force GC more aggressively.
- virtual size_t highMemoryUsageMB() { return 1024; }
-
- // Delta of memory usage growth (vs. last actualMemoryUsageMB()) to force GC when memory usage is high.
- virtual size_t highUsageDeltaMB() { return 128; }
-
-
- // Threads -------------------------------------------------------
-
- // Creates an embedder-defined thread.
- virtual WebThread* createThread(const char* name) { return 0; }
-
- // Returns an interface to the current thread. This is owned by the
- // embedder.
- virtual WebThread* currentThread() { return 0; }
+ // FIXME: Remove WebString keyPath overload once callers are updated.
+ // http://webkit.org/b/84207
+ virtual void createIDBKeysFromSerializedValuesAndKeyPath(const WebVector<WebSerializedScriptValue>& values, const WebString& keyPath, WebVector<WebIDBKey>& keys) { createIDBKeysFromSerializedValuesAndKeyPath(values, WebIDBKeyPath(keyPath), keys); }
+ virtual void createIDBKeysFromSerializedValuesAndKeyPath(const WebVector<WebSerializedScriptValue>& values, const WebIDBKeyPath& keyPath, WebVector<WebIDBKey>& keys) { }
+ // FIXME: Remove WebString keyPath overload once callers are updated.
+ // http://webkit.org/b/84207
+ virtual WebSerializedScriptValue injectIDBKeyIntoSerializedValue(const WebIDBKey& key, const WebSerializedScriptValue& value, const WebString& keyPath) { return injectIDBKeyIntoSerializedValue(key, value, WebIDBKeyPath(keyPath)); }
+ virtual WebSerializedScriptValue injectIDBKeyIntoSerializedValue(const WebIDBKey& key, const WebSerializedScriptValue& value, const WebIDBKeyPath& keyPath) { return WebSerializedScriptValue(); }
// Message Ports -------------------------------------------------------
@@ -209,24 +144,6 @@ public:
virtual WebMessagePortChannel* createMessagePortChannel() { return 0; }
- // Network -------------------------------------------------------------
-
- // A suggestion to prefetch IP information for the given hostname.
- virtual void prefetchHostName(const WebString&) { }
-
- // Returns a new WebURLLoader instance.
- virtual WebURLLoader* createURLLoader() { return 0; }
-
- // Returns a new WebSocketStreamHandle instance.
- virtual WebSocketStreamHandle* createSocketStreamHandle() { return 0; }
-
- // Returns the User-Agent string that should be used for the given URL.
- virtual WebString userAgent(const WebURL&) { return WebString(); }
-
- // A suggestion to cache this metadata in association with this URL.
- virtual void cacheMetadata(const WebURL&, double responseTime, const char* data, size_t dataSize) { }
-
-
// Plugins -------------------------------------------------------------
// If refresh is true, then cached information should not be used to
@@ -234,174 +151,38 @@ public:
virtual void getPluginList(bool refresh, WebPluginListBuilder*) { }
- // Profiling -----------------------------------------------------------
-
- virtual void decrementStatsCounter(const char* name) { }
- virtual void incrementStatsCounter(const char* name) { }
-
- // Tracing -------------------------------------------------------------
-
- // Get a pointer to the enabled state of the given trace category. The
- // embedder can dynamically change the enabled state as trace event
- // recording is started and stopped by the application. Only long-lived
- // literal strings should be given as the category name. The implementation
- // expects the returned pointer to be held permanently in a local static. If
- // the unsigned char is non-zero, tracing is enabled. If tracing is enabled,
- // addTraceEvent is expected to be called by the trace event macros.
- virtual const unsigned char* getTraceCategoryEnabledFlag(const char* categoryName) { return 0; }
- // Add a trace event to the platform tracing system. Depending on the actual
- // enabled state, this event may be recorded or dropped. Returns
- // thresholdBeginId for use in a corresponding end addTraceEvent call.
- // - phase specifies the type of event:
- // - BEGIN ('B'): Marks the beginning of a scoped event.
- // - END ('E'): Marks the end of a scoped event.
- // - INSTANT ('I'): Standalone, instantaneous event.
- // - START ('S'): Marks the beginning of an asynchronous event (the end
- // event can occur in a different scope or thread). The id parameter is
- // used to match START/FINISH pairs.
- // - FINISH ('F'): Marks the end of an asynchronous event.
- // - COUNTER ('C'): Used to trace integer quantities that change over
- // time. The argument values are expected to be of type int.
- // - METADATA ('M'): Reserved for internal use.
- // - categoryEnabled is the pointer returned by getTraceCategoryEnabledFlag.
- // - name is the name of the event. Also used to match BEGIN/END and
- // START/FINISH pairs.
- // - id optionally allows events of the same name to be distinguished from
- // each other. For example, to trace the consutruction and destruction of
- // objects, specify the pointer as the id parameter.
- // - numArgs specifies the number of elements in argNames, argTypes, and
- // argValues.
- // - argNames is the array of argument names. Use long-lived literal strings
- // or specify the COPY flag.
- // - argTypes is the array of argument types:
- // - BOOL (1): bool
- // - UINT (2): unsigned long long
- // - INT (3): long long
- // - DOUBLE (4): double
- // - POINTER (5): void*
- // - STRING (6): char* (long-lived null-terminated char* string)
- // - COPY_STRING (7): char* (temporary null-terminated char* string)
- // - argValues is the array of argument values. Each value is the unsigned
- // long long member of a union of all supported types.
- // - thresholdBeginId optionally specifies the value returned by a previous
- // call to addTraceEvent with a BEGIN phase.
- // - threshold is used on an END phase event in conjunction with the
- // thresholdBeginId of a prior BEGIN event. The threshold is the minimum
- // number of microseconds that must have passed since the BEGIN event. If
- // less than threshold microseconds has passed, the BEGIN/END pair is
- // dropped.
- // - flags can be 0 or one or more of the following, ORed together:
- // - COPY (0x1): treat all strings (name, argNames and argValues of type
- // string) as temporary so that they will be copied by addTraceEvent.
- // - HAS_ID (0x2): use the id argument to uniquely identify the event for
- // matching with other events of the same name.
- // - MANGLE_ID (0x4): specify this flag if the id parameter is the value
- // of a pointer.
- virtual int addTraceEvent(
- char phase,
- const unsigned char* categoryEnabledFlag,
- const char* name,
- unsigned long long id,
- int numArgs,
- const char** argNames,
- const unsigned char* argTypes,
- const unsigned long long* argValues,
- int thresholdBeginId,
- long long threshold,
- unsigned char flags) { return -1; }
-
- // Callbacks for reporting histogram data.
- // CustomCounts histogram has exponential bucket sizes, so that min=1, max=1000000, bucketCount=50 would do.
- virtual void histogramCustomCounts(const char* name, int sample, int min, int max, int bucketCount) { }
- // Enumeration histogram buckets are linear, boundaryValue should be larger than any possible sample value.
- virtual void histogramEnumeration(const char* name, int sample, int boundaryValue) { }
-
-
// Resources -----------------------------------------------------------
- // Returns a blob of data corresponding to the named resource.
- virtual WebData loadResource(const char* name) { return WebData(); }
-
- // Decodes the in-memory audio file data and returns the linear PCM audio data in the destinationBus.
- // A sample-rate conversion to sampleRate will occur if the file data is at a different sample-rate.
- // Returns true on success.
- virtual bool loadAudioResource(WebAudioBus* destinationBus, const char* audioFileData, size_t dataSize, double sampleRate) { return false; }
-
// Returns a localized string resource (with substitution parameters).
virtual WebString queryLocalizedString(WebLocalizedString::Name) { return WebString(); }
virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebString& parameter) { return WebString(); }
virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebString& parameter1, const WebString& parameter2) { return WebString(); }
- // Sandbox ------------------------------------------------------------
-
- // In some browsers, a "sandbox" restricts what operations a program
- // is allowed to preform. Such operations are typically abstracted out
- // via this API, but sometimes (like in HTML 5 database opening) WebKit
- // needs to behave differently based on whether it's restricted or not.
- // In these cases (and these cases only) you can call this function.
- // It's OK for this value to be conservitive (i.e. true even if the
- // sandbox isn't active).
- virtual bool sandboxEnabled() { return false; }
-
-
// Shared Workers ------------------------------------------------------
virtual WebSharedWorkerRepository* sharedWorkerRepository() { return 0; }
- // Sudden Termination --------------------------------------------------
-
- // Disable/Enable sudden termination.
- virtual void suddenTerminationChanged(bool enabled) { }
-
-
- // System --------------------------------------------------------------
-
- // Returns a value such as "en-US".
- virtual WebString defaultLocale() { return WebString(); }
-
- // Wall clock time in seconds since the epoch.
- virtual double currentTime() { return 0; }
-
- // Monotonically increasing time in seconds from an arbitrary fixed point in the past.
- // This function is expected to return at least millisecond-precision values. For this reason,
- // it is recommended that the fixed point be no further in the past than the epoch.
- virtual double monotonicallyIncreasingTime() { return 0; }
-
- // WebKit clients must implement this funcion if they use cryptographic randomness.
- virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t length) = 0;
-
- // Delayed work is driven by a shared timer.
- typedef void (*SharedTimerFunction)();
- virtual void setSharedTimerFiredFunction(SharedTimerFunction timerFunction) { }
- virtual void setSharedTimerFireInterval(double) { }
- virtual void stopSharedTimer() { }
-
- // Callable from a background WebKit thread.
- virtual void callOnMainThread(void (*func)(void*), void* context) { }
-
// GPU ----------------------------------------------------------------
//
// May return null if GPU is not supported.
// Returns newly allocated and initialized offscreen WebGraphicsContext3D instance.
virtual WebGraphicsContext3D* createOffscreenGraphicsContext3D(const WebGraphicsContext3D::Attributes&) { return 0; }
- // Audio --------------------------------------------------------------
+ // Returns true if the platform is capable of producing an offscreen context suitable for accelerating 2d canvas.
+ // This will return false if the platform cannot promise that contexts will be preserved across operations like
+ // locking the screen or if the platform cannot provide a context with suitable performance characteristics.
+ //
+ // This value must be checked again after a context loss event as the platform's capabilities may have changed.
+ virtual bool canAccelerate2dCanvas() { return false; }
- virtual double audioHardwareSampleRate() { return 0; }
- virtual size_t audioHardwareBufferSize() { return 0; }
- virtual WebAudioDevice* createAudioDevice(size_t bufferSize, unsigned numberOfChannels, double sampleRate, WebAudioDevice::RenderCallback*) { return 0; }
// FileSystem ----------------------------------------------------------
// Must return non-null.
virtual WebFileSystem* fileSystem() { return 0; }
- // WebRTC ----------------------------------------------------------
-
- // May return null if WebRTC functionality is not avaliable or out of resources.
- virtual WebPeerConnectionHandler* createPeerConnectionHandler(WebPeerConnectionHandlerClient*) { return 0; }
- virtual WebMediaStreamCenter* createMediaStreamCenter(WebMediaStreamCenterClient*) { return 0; }
+ // WebWorker ----------------------------------------------------------
virtual void didStartWorkerRunLoop(const WebWorkerRunLoop&) { }
virtual void didStopWorkerRunLoop(const WebWorkerRunLoop&) { }
diff --git a/Source/WebKit/chromium/public/platform/WebLocalizedString.h b/Source/WebKit/chromium/public/platform/WebLocalizedString.h
index 0483df90b..5e7748ec6 100644
--- a/Source/WebKit/chromium/public/platform/WebLocalizedString.h
+++ b/Source/WebKit/chromium/public/platform/WebLocalizedString.h
@@ -35,46 +35,52 @@ namespace WebKit {
struct WebLocalizedString {
enum Name {
+ AXButtonActionVerb,
+ AXCheckedCheckBoxActionVerb,
+ AXHeadingText,
+ AXImageMapText,
+ AXLinkActionVerb,
+ AXLinkText,
+ AXListMarkerText,
+ AXRadioButtonActionVerb,
+ AXTextFieldActionVerb,
+ AXUncheckedCheckBoxActionVerb,
+ AXWebAreaText,
+ CalendarClear,
+ CalendarToday,
+ DateFormatDayInMonthLabel,
+ DateFormatMonthLabel,
+ DateFormatYearLabel,
DetailsLabel,
- SubmitButtonDefaultLabel,
- InputElementAltText,
- ResetButtonDefaultLabel,
FileButtonChooseFileLabel,
FileButtonChooseMultipleFilesLabel,
FileButtonNoFileSelectedLabel,
+ InputElementAltText,
+ KeygenMenuHighGradeKeySize,
+ KeygenMenuMediumGradeKeySize,
+ MissingPluginText,
MultipleFileUploadText,
+ ResetButtonDefaultLabel,
SearchableIndexIntroduction,
+ SearchMenuClearRecentSearchesText,
SearchMenuNoRecentSearchesText,
SearchMenuRecentSearchesText,
- SearchMenuClearRecentSearchesText,
- AXWebAreaText,
- AXLinkText,
- AXListMarkerText,
- AXImageMapText,
- AXHeadingText,
- AXButtonActionVerb,
- AXRadioButtonActionVerb,
- AXTextFieldActionVerb,
- AXCheckedCheckBoxActionVerb,
- AXUncheckedCheckBoxActionVerb,
- AXLinkActionVerb,
- KeygenMenuHighGradeKeySize,
- KeygenMenuMediumGradeKeySize,
+ SubmitButtonDefaultLabel,
+ ValidationPatternMismatch,
+ ValidationRangeOverflow,
+ ValidationRangeUnderflow,
+ ValidationStepMismatch,
+ ValidationTooLong,
+ ValidationTypeMismatch,
+ ValidationTypeMismatchForEmail,
+ ValidationTypeMismatchForMultipleEmail,
+ ValidationTypeMismatchForURL,
ValidationValueMissing,
ValidationValueMissingForCheckbox,
ValidationValueMissingForFile,
ValidationValueMissingForMultipleFile,
ValidationValueMissingForRadio,
ValidationValueMissingForSelect,
- ValidationTypeMismatch,
- ValidationTypeMismatchForEmail,
- ValidationTypeMismatchForMultipleEmail,
- ValidationTypeMismatchForURL,
- ValidationPatternMismatch,
- ValidationTooLong,
- ValidationRangeUnderflow,
- ValidationRangeOverflow,
- ValidationStepMismatch,
};
};
diff --git a/Source/WebKit/chromium/public/platform/WebMediaHints.h b/Source/WebKit/chromium/public/platform/WebMediaHints.h
new file mode 100644
index 000000000..b27836db5
--- /dev/null
+++ b/Source/WebKit/chromium/public/platform/WebMediaHints.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * 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 "../../../../Platform/chromium/public/WebMediaHints.h"
diff --git a/Source/WebKit/chromium/public/platform/WebMediaStreamCenter.h b/Source/WebKit/chromium/public/platform/WebMediaStreamCenter.h
index 8381a9a4c..80f607ce4 100644
--- a/Source/WebKit/chromium/public/platform/WebMediaStreamCenter.h
+++ b/Source/WebKit/chromium/public/platform/WebMediaStreamCenter.h
@@ -2,53 +2,25 @@
* Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebMediaStreamCenter_h
-#define WebMediaStreamCenter_h
-
-namespace WebKit {
-
-class WebMediaStreamComponent;
-class WebMediaStreamDescriptor;
-class WebMediaStreamSourcesRequest;
-
-class WebMediaStreamCenter {
-public:
- virtual ~WebMediaStreamCenter() { }
-
- virtual void queryMediaStreamSources(const WebMediaStreamSourcesRequest&) = 0;
- virtual void didEnableMediaStreamTrack(const WebMediaStreamDescriptor&, const WebMediaStreamComponent&) = 0;
- virtual void didDisableMediaStreamTrack(const WebMediaStreamDescriptor&, const WebMediaStreamComponent&) = 0;
- virtual void didStopLocalMediaStream(const WebMediaStreamDescriptor&) = 0;
- virtual void didConstructMediaStream(const WebMediaStreamDescriptor&) = 0;
-};
-
-} // namespace WebKit
-
-#endif // WebMediaStreamCenter_h
-
+#include "../../../../Platform/chromium/public/WebMediaStreamCenter.h"
diff --git a/Source/WebKit/chromium/public/platform/WebMediaStreamCenterClient.h b/Source/WebKit/chromium/public/platform/WebMediaStreamCenterClient.h
index 8a0825f90..9c133c0fd 100644
--- a/Source/WebKit/chromium/public/platform/WebMediaStreamCenterClient.h
+++ b/Source/WebKit/chromium/public/platform/WebMediaStreamCenterClient.h
@@ -2,46 +2,25 @@
* Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebMediaStreamCenterClient_h
-#define WebMediaStreamCenterClient_h
-
-namespace WebKit {
-
-class WebMediaStreamDescriptor;
-
-class WebMediaStreamCenterClient {
-public:
- virtual ~WebMediaStreamCenterClient() { }
-
- virtual void stopLocalMediaStream(const WebMediaStreamDescriptor&) = 0;
-};
-
-} // namespace WebKit
-
-#endif // WebMediaStreamCenterClient_h
+#include "../../../../Platform/chromium/public/WebMediaStreamCenterClient.h"
diff --git a/Source/WebKit/chromium/public/platform/WebMediaStreamComponent.h b/Source/WebKit/chromium/public/platform/WebMediaStreamComponent.h
index bee18553f..7e6802880 100644
--- a/Source/WebKit/chromium/public/platform/WebMediaStreamComponent.h
+++ b/Source/WebKit/chromium/public/platform/WebMediaStreamComponent.h
@@ -2,70 +2,25 @@
* Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebMediaStreamComponent_h
-#define WebMediaStreamComponent_h
-
-#include "WebCommon.h"
-#include "WebNonCopyable.h"
-#include "WebPrivatePtr.h"
-
-namespace WebCore {
-class MediaStreamComponent;
-}
-
-namespace WebKit {
-
-class WebMediaStreamSource;
-class WebString;
-
-class WebMediaStreamComponent {
-public:
- WebMediaStreamComponent() { }
- ~WebMediaStreamComponent() { reset(); }
-
- WEBKIT_EXPORT void reset();
- bool isNull() const { return m_private.isNull(); }
-
- WEBKIT_EXPORT WebMediaStreamSource source() const;
- WEBKIT_EXPORT bool isEnabled() const;
-
-#if WEBKIT_IMPLEMENTATION
- WebMediaStreamComponent(WebCore::MediaStreamComponent*);
- WebMediaStreamComponent& operator=(WebCore::MediaStreamComponent*);
- operator WTF::PassRefPtr<WebCore::MediaStreamComponent>() const;
- operator WebCore::MediaStreamComponent*() const;
-#endif
-
-private:
- WebPrivatePtr<WebCore::MediaStreamComponent> m_private;
-};
-
-} // namespace WebKit
-
-#endif // WebMediaStreamComponent_h
+#include "../../../../Platform/chromium/public/WebMediaStreamComponent.h"
diff --git a/Source/WebKit/chromium/public/platform/WebMediaStreamDescriptor.h b/Source/WebKit/chromium/public/platform/WebMediaStreamDescriptor.h
index 4923c97b5..97733a555 100644
--- a/Source/WebKit/chromium/public/platform/WebMediaStreamDescriptor.h
+++ b/Source/WebKit/chromium/public/platform/WebMediaStreamDescriptor.h
@@ -1,86 +1,26 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * 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 INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * 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.
+ * 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 WebMediaStreamDescriptor_h
-#define WebMediaStreamDescriptor_h
-
-#include "WebCommon.h"
-#include "WebNonCopyable.h"
-#include "WebPrivatePtr.h"
-#include "WebVector.h"
-
-namespace WebCore {
-class MediaStreamDescriptor;
-}
-
-namespace WebKit {
-
-class WebMediaStreamComponent;
-class WebMediaStreamSource;
-class WebString;
-
-class WebMediaStreamDescriptor {
-public:
- WebMediaStreamDescriptor() { }
- WebMediaStreamDescriptor(const WebMediaStreamDescriptor& other) { assign(other); }
- ~WebMediaStreamDescriptor() { reset(); }
-
- WebMediaStreamDescriptor& operator=(const WebMediaStreamDescriptor& other)
- {
- assign(other);
- return *this;
- }
-
- WEBKIT_EXPORT void assign(const WebMediaStreamDescriptor&);
-
- // DEPRECATED
- WEBKIT_EXPORT void initialize(const WebString& label, const WebVector<WebMediaStreamSource>&);
-
- WEBKIT_EXPORT void initialize(const WebString& label, const WebVector<WebMediaStreamSource>& audioSources, const WebVector<WebMediaStreamSource>& videoSources);
- WEBKIT_EXPORT void reset();
- bool isNull() const { return m_private.isNull(); }
-
- WEBKIT_EXPORT WebString label() const;
-
- // DEPRECATED
- WEBKIT_EXPORT void sources(WebVector<WebMediaStreamSource>&) const;
-
- WEBKIT_EXPORT void audioSources(WebVector<WebMediaStreamComponent>&) const;
- WEBKIT_EXPORT void videoSources(WebVector<WebMediaStreamComponent>&) const;
-
-#if WEBKIT_IMPLEMENTATION
- WebMediaStreamDescriptor(WebCore::MediaStreamDescriptor*);
- WebMediaStreamDescriptor(const WTF::PassRefPtr<WebCore::MediaStreamDescriptor>&);
- operator WTF::PassRefPtr<WebCore::MediaStreamDescriptor>() const;
- operator WebCore::MediaStreamDescriptor*() const;
- WebMediaStreamDescriptor& operator=(const WTF::PassRefPtr<WebCore::MediaStreamDescriptor>&);
-#endif
-
-private:
- WebPrivatePtr<WebCore::MediaStreamDescriptor> m_private;
-};
-
-} // namespace WebKit
-
-#endif // WebMediaStreamDescriptor_h
+#include "../../../../Platform/chromium/public/WebMediaStreamDescriptor.h"
diff --git a/Source/WebKit/chromium/public/platform/WebMediaStreamSource.h b/Source/WebKit/chromium/public/platform/WebMediaStreamSource.h
index 142d59866..570bfd7e0 100644
--- a/Source/WebKit/chromium/public/platform/WebMediaStreamSource.h
+++ b/Source/WebKit/chromium/public/platform/WebMediaStreamSource.h
@@ -1,86 +1,26 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebMediaStreamSource_h
-#define WebMediaStreamSource_h
-
-#include "WebCommon.h"
-#include "WebNonCopyable.h"
-#include "WebPrivatePtr.h"
-
-namespace WebCore {
-class MediaStreamSource;
-}
-
-namespace WebKit {
-
-class WebString;
-
-class WebMediaStreamSource {
-public:
- enum Type {
- TypeAudio,
- TypeVideo
- };
-
- WebMediaStreamSource() { }
- WebMediaStreamSource(const WebMediaStreamSource& other) { assign(other); }
- ~WebMediaStreamSource() { reset(); }
-
- WebMediaStreamSource& operator=(const WebMediaStreamSource& other)
- {
- assign(other);
- return *this;
- }
-
- WEBKIT_EXPORT void assign(const WebMediaStreamSource&);
-
- WEBKIT_EXPORT void initialize(const WebString& id, Type, const WebString& name);
- WEBKIT_EXPORT void reset();
- bool isNull() const { return m_private.isNull(); }
-
- WEBKIT_EXPORT WebString id() const;
- WEBKIT_EXPORT Type type() const;
- WEBKIT_EXPORT WebString name() const;
-
-#if WEBKIT_IMPLEMENTATION
- WebMediaStreamSource(const WTF::PassRefPtr<WebCore::MediaStreamSource>&);
- WebMediaStreamSource& operator=(WebCore::MediaStreamSource*);
- operator WTF::PassRefPtr<WebCore::MediaStreamSource>() const;
- operator WebCore::MediaStreamSource*() const;
-#endif
-
-private:
- WebPrivatePtr<WebCore::MediaStreamSource> m_private;
-};
-
-} // namespace WebKit
-
-#endif // WebMediaStreamSource_h
+#include "../../../../Platform/chromium/public/WebMediaStreamSource.h"
diff --git a/Source/WebKit/chromium/public/platform/WebMediaStreamSourcesRequest.h b/Source/WebKit/chromium/public/platform/WebMediaStreamSourcesRequest.h
index 7fcc7c275..418215218 100644
--- a/Source/WebKit/chromium/public/platform/WebMediaStreamSourcesRequest.h
+++ b/Source/WebKit/chromium/public/platform/WebMediaStreamSourcesRequest.h
@@ -2,68 +2,25 @@
* Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebMediaStreamSourcesRequest_h
-#define WebMediaStreamSourcesRequest_h
-
-#include "WebCommon.h"
-#include "WebPrivatePtr.h"
-
-namespace WebCore {
-class MediaStreamSourcesQueryClient;
-}
-
-namespace WebKit {
-
-class WebMediaStreamSource;
-template <typename T> class WebVector;
-
-class WebMediaStreamSourcesRequest {
-public:
- WebMediaStreamSourcesRequest() { }
- ~WebMediaStreamSourcesRequest() { reset(); }
-
- WEBKIT_EXPORT void reset();
- bool isNull() const { return m_private.isNull(); }
-
- WEBKIT_EXPORT bool audio() const;
- WEBKIT_EXPORT bool video() const;
-
- WEBKIT_EXPORT void didCompleteQuery(const WebVector<WebMediaStreamSource>& audioSources, const WebVector<WebMediaStreamSource>& videoSources) const;
-
-#if WEBKIT_IMPLEMENTATION
- WebMediaStreamSourcesRequest(const WTF::PassRefPtr<WebCore::MediaStreamSourcesQueryClient>&);
-#endif
-
-private:
- WebPrivatePtr<WebCore::MediaStreamSourcesQueryClient> m_private;
-};
-
-} // namespace WebKit
-
-#endif // WebMediaStreamSourcesRequest_h
+#include "../../../../Platform/chromium/public/WebMediaStreamSourcesRequest.h"
diff --git a/Source/WebKit/chromium/public/platform/WebPeerConnection00Handler.h b/Source/WebKit/chromium/public/platform/WebPeerConnection00Handler.h
new file mode 100644
index 000000000..e87ec99e7
--- /dev/null
+++ b/Source/WebKit/chromium/public/platform/WebPeerConnection00Handler.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * 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 "../../../../Platform/chromium/public/WebPeerConnection00Handler.h"
diff --git a/Source/WebKit/chromium/public/platform/WebPeerConnection00HandlerClient.h b/Source/WebKit/chromium/public/platform/WebPeerConnection00HandlerClient.h
new file mode 100644
index 000000000..e6ba56cfc
--- /dev/null
+++ b/Source/WebKit/chromium/public/platform/WebPeerConnection00HandlerClient.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * 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 "../../../../Platform/chromium/public/WebPeerConnection00HandlerClient.h"
diff --git a/Source/WebKit/chromium/public/platform/WebPeerConnectionHandler.h b/Source/WebKit/chromium/public/platform/WebPeerConnectionHandler.h
index bd2093577..e68710c96 100644
--- a/Source/WebKit/chromium/public/platform/WebPeerConnectionHandler.h
+++ b/Source/WebKit/chromium/public/platform/WebPeerConnectionHandler.h
@@ -1,73 +1,26 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebPeerConnectionHandler_h
-#define WebPeerConnectionHandler_h
-
-#include "../WebSecurityOrigin.h" // FIXME: This is a layering violation.
-#include "WebString.h"
-#include "WebVector.h"
-
-namespace WebKit {
-
-class WebMediaStreamDescriptor;
-class WebPeerConnectionHandlerClient;
-
-// Note:
-// SDP stands for Session Description Protocol, which is intended for describing
-// multimedia sessions for the purposes of session announcement, session
-// invitation, and other forms of multimedia session initiation.
-//
-// More information can be found here:
-// http://tools.ietf.org/html/rfc4566
-// http://en.wikipedia.org/wiki/Session_Description_Protocol
-
-
-class WebPeerConnectionHandler {
-public:
- virtual ~WebPeerConnectionHandler() { }
-
- // DEPRECATED
- virtual void initialize(const WebString& serverConfiguration, const WebSecurityOrigin&) { };
-
- virtual void initialize(const WebString& serverConfiguration, const WebString& username) { };
-
- virtual void produceInitialOffer(const WebVector<WebMediaStreamDescriptor>& pendingAddStreams) = 0;
- virtual void handleInitialOffer(const WebString& sdp) = 0;
- virtual void processSDP(const WebString& sdp) = 0;
- virtual void processPendingStreams(const WebVector<WebMediaStreamDescriptor>& pendingAddStreams, const WebVector<WebMediaStreamDescriptor>& pendingRemoveStreams) = 0;
- virtual void sendDataStreamMessage(const char* data, size_t length) = 0;
-
- virtual void stop() = 0;
-};
-
-} // namespace WebKit
-
-#endif // WebPeerConnectionHandler_h
+#include "../../../../Platform/chromium/public/WebPeerConnectionHandler.h"
diff --git a/Source/WebKit/chromium/public/platform/WebPeerConnectionHandlerClient.h b/Source/WebKit/chromium/public/platform/WebPeerConnectionHandlerClient.h
index f2b1d3297..defa67c45 100644
--- a/Source/WebKit/chromium/public/platform/WebPeerConnectionHandlerClient.h
+++ b/Source/WebKit/chromium/public/platform/WebPeerConnectionHandlerClient.h
@@ -1,52 +1,26 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebPeerConnectionHandlerClient_h
-#define WebPeerConnectionHandlerClient_h
-
-namespace WebKit {
-
-class WebMediaStreamDescriptor;
-class WebString;
-
-class WebPeerConnectionHandlerClient {
-public:
- virtual ~WebPeerConnectionHandlerClient() { }
-
- virtual void didCompleteICEProcessing() = 0;
- virtual void didGenerateSDP(const WebString& sdp) = 0;
- virtual void didReceiveDataStreamMessage(const char* data, size_t length) = 0;
- virtual void didAddRemoteStream(const WebMediaStreamDescriptor&) = 0;
- virtual void didRemoveRemoteStream(const WebMediaStreamDescriptor&) = 0;
-};
-
-} // namespace WebKit
-
-#endif // WebPeerConnectionHandlerClient_h
+#include "../../../../Platform/chromium/public/WebPeerConnectionHandlerClient.h"
diff --git a/Source/WebKit/chromium/public/platform/WebPrivateOwnPtr.h b/Source/WebKit/chromium/public/platform/WebPrivateOwnPtr.h
index 4bcabcfe6..793c127eb 100644
--- a/Source/WebKit/chromium/public/platform/WebPrivateOwnPtr.h
+++ b/Source/WebKit/chromium/public/platform/WebPrivateOwnPtr.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,53 +23,4 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebPrivateOwnPtr_h
-#define WebPrivateOwnPtr_h
-
-#include "WebCommon.h"
-
-namespace WebKit {
-
-// This class is an implementation detail of the WebKit API. It exists
-// to help simplify the implementation of WebKit interfaces that merely
-// wrap a pointer to a WebCore class. It's similar to WebPrivatePtr, but it
-// wraps a naked pointer rather than a reference counted.
-// Note: you must call reset(0) on the implementation side in order to delete
-// the WebCore pointer.
-template <typename T>
-class WebPrivateOwnPtr {
-public:
- WebPrivateOwnPtr() : m_ptr(0) {}
- ~WebPrivateOwnPtr() { WEBKIT_ASSERT(!m_ptr); }
-
-#if WEBKIT_IMPLEMENTATION
- explicit WebPrivateOwnPtr(T* ptr)
- : m_ptr(ptr)
- {
- }
-
- void reset(T* ptr)
- {
- delete m_ptr;
- m_ptr = ptr;
- }
-
- T* get() const { return m_ptr; }
-
- T* operator->() const
- {
- WEBKIT_ASSERT(m_ptr);
- return m_ptr;
- }
-#endif // WEBKIT_IMPLEMENTATION
-
-private:
- T* m_ptr;
-
- WebPrivateOwnPtr(const WebPrivateOwnPtr&);
- void operator=(const WebPrivateOwnPtr&);
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebPrivateOwnPtr.h"
diff --git a/Source/WebKit/chromium/public/platform/WebReferrerPolicy.h b/Source/WebKit/chromium/public/platform/WebReferrerPolicy.h
new file mode 100644
index 000000000..194c45374
--- /dev/null
+++ b/Source/WebKit/chromium/public/platform/WebReferrerPolicy.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2012 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 "../../../../Platform/chromium/public/WebReferrerPolicy.h"
diff --git a/Source/WebKit/chromium/public/platform/WebSessionDescriptionDescriptor.h b/Source/WebKit/chromium/public/platform/WebSessionDescriptionDescriptor.h
new file mode 100644
index 000000000..8b1d2a255
--- /dev/null
+++ b/Source/WebKit/chromium/public/platform/WebSessionDescriptionDescriptor.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * 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 "../../../../Platform/chromium/public/WebSessionDescriptionDescriptor.h"
diff --git a/Source/WebKit/chromium/public/platform/WebSocketStreamError.h b/Source/WebKit/chromium/public/platform/WebSocketStreamError.h
index f52869b3b..166042934 100644
--- a/Source/WebKit/chromium/public/platform/WebSocketStreamError.h
+++ b/Source/WebKit/chromium/public/platform/WebSocketStreamError.h
@@ -1,45 +1,26 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebSocketStreamError_h
-#define WebSocketStreamError_h
-
-#include "WebCommon.h"
-
-namespace WebKit {
-
-class WebSocketStreamError {
-public:
- // FIXME: Define SocketStream Error codes and accessor methods.
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebSocketStreamError.h"
diff --git a/Source/WebKit/chromium/public/platform/WebSocketStreamHandle.h b/Source/WebKit/chromium/public/platform/WebSocketStreamHandle.h
index ededa0e43..0f0ceb93c 100644
--- a/Source/WebKit/chromium/public/platform/WebSocketStreamHandle.h
+++ b/Source/WebKit/chromium/public/platform/WebSocketStreamHandle.h
@@ -1,58 +1,26 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebSocketStreamHandle_h
-#define WebSocketStreamHandle_h
-
-#include "WebCommon.h"
-
-namespace WebKit {
-
-class WebData;
-class WebSocketStreamHandleClient;
-class WebURL;
-
-class WebSocketStreamHandle {
-public:
- virtual ~WebSocketStreamHandle() { }
-
- // Connect new socket stream asynchronously.
- virtual void connect(const WebURL&, WebSocketStreamHandleClient*) = 0;
-
- // Send web socket frame data on the socket stream.
- virtual bool send(const WebData&) = 0;
-
- // Close the socket stream.
- virtual void close() = 0;
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebSocketStreamHandle.h"
diff --git a/Source/WebKit/chromium/public/platform/WebSocketStreamHandleClient.h b/Source/WebKit/chromium/public/platform/WebSocketStreamHandleClient.h
index 82f328c6e..6ad2a27ba 100644
--- a/Source/WebKit/chromium/public/platform/WebSocketStreamHandleClient.h
+++ b/Source/WebKit/chromium/public/platform/WebSocketStreamHandleClient.h
@@ -1,66 +1,26 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebSocketStreamHandleClient_h
-#define WebSocketStreamHandleClient_h
-
-#include "WebCommon.h"
-
-namespace WebKit {
-
-class WebData;
-class WebSocketStreamError;
-class WebSocketStreamHandle;
-class WebURL;
-
-class WebSocketStreamHandleClient {
-public:
-
- // Called when Socket Stream is opened.
- virtual void didOpenStream(WebSocketStreamHandle*, int /* maxPendingSendAllowed */) = 0;
-
- // Called when |amountSent| bytes are sent.
- virtual void didSendData(WebSocketStreamHandle*, int /* amountSent */) = 0;
-
- // Called when data are received.
- virtual void didReceiveData(WebSocketStreamHandle*, const WebData&) = 0;
-
- // Called when Socket Stream is closed.
- virtual void didClose(WebSocketStreamHandle*) = 0;
-
- // Called when Socket Stream has an error.
- virtual void didFail(WebSocketStreamHandle*, const WebSocketStreamError&) = 0;
-
- // FIXME: auth challenge for proxy
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebSocketStreamHandleClient.h"
diff --git a/Source/WebKit/chromium/public/platform/WebThread.h b/Source/WebKit/chromium/public/platform/WebThread.h
index b54bee849..5ad4b46e3 100644
--- a/Source/WebKit/chromium/public/platform/WebThread.h
+++ b/Source/WebKit/chromium/public/platform/WebThread.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -22,51 +22,5 @@
* (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 WebThread_h
-#define WebThread_h
-#include "WebCommon.h"
-
-namespace WebKit {
-
-#define WEBTHREAD_HAS_LONGLONG_CHANGE
-
-// Provides an interface to an embedder-defined thread implementation.
-//
-// Deleting the thread blocks until all pending, non-delayed tasks have been
-// run.
-class WebThread {
-public:
- class Task {
- public:
- virtual ~Task() { }
- virtual void run() = 0;
- };
-
- class TaskObserver {
- public:
- virtual ~TaskObserver() { }
- virtual void didProcessTask() = 0;
- };
-
- virtual void postTask(Task*) = 0;
- virtual void postDelayedTask(Task*, long long delayMs) = 0;
-
- virtual void addTaskObserver(TaskObserver*) { }
- virtual void removeTaskObserver(TaskObserver*) { }
-
- // enterRunLoop() processes tasks posted to this WebThread. This call does not return until some task calls exitRunLoop().
- // WebThread does not support nesting, meaning that once the run loop is entered for a given WebThread it is not valid to
- // call enterRunLoop() again.
- virtual void enterRunLoop() = 0;
-
- // exitRunLoop() runs tasks until there are no tasks available to run, then returns control to the caller of enterRunLoop().
- // Must be called when the WebThread is running.
- virtual void exitRunLoop() = 0;
-
- virtual ~WebThread() { }
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebThread.h"
diff --git a/Source/WebKit/chromium/public/platform/WebThreadSafeData.h b/Source/WebKit/chromium/public/platform/WebThreadSafeData.h
index 19af4df2b..dfb6fadcc 100644
--- a/Source/WebKit/chromium/public/platform/WebThreadSafeData.h
+++ b/Source/WebKit/chromium/public/platform/WebThreadSafeData.h
@@ -1,77 +1,26 @@
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebThreadSafeData_h
-#define WebThreadSafeData_h
-
-#include "WebCommon.h"
-#include "WebPrivatePtr.h"
-
-#if !WEBKIT_IMPLEMENTATION
-#include <string>
-#endif
-
-namespace WebCore { class RawData; }
-
-namespace WebKit {
-
-// A container for raw bytes. It is inexpensive to copy a WebThreadSafeData object.
-// It is safe to pass a WebThreadSafeData across threads!!!
-class WebThreadSafeData {
-public:
- WebThreadSafeData() { }
- ~WebThreadSafeData() { reset(); }
-
- WEBKIT_EXPORT void assign(const WebThreadSafeData&);
- WEBKIT_EXPORT void reset();
-
- WEBKIT_EXPORT size_t size() const;
- WEBKIT_EXPORT const char* data() const;
-
- bool isEmpty() const { return !size(); }
-
-#if WEBKIT_IMPLEMENTATION
- WebThreadSafeData(const WTF::PassRefPtr<WebCore::RawData>&);
- WebThreadSafeData& operator=(const WTF::PassRefPtr<WebCore::RawData>&);
-#else
- operator std::string() const
- {
- size_t len = size();
- return len ? std::string(data(), len) : std::string();
- }
-#endif
-
-private:
- WebPrivatePtr<WebCore::RawData> m_private;
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebThreadSafeData.h"
diff --git a/Source/WebKit/chromium/public/platform/WebURL.h b/Source/WebKit/chromium/public/platform/WebURL.h
index 707ba0896..d28c21b6f 100644
--- a/Source/WebKit/chromium/public/platform/WebURL.h
+++ b/Source/WebKit/chromium/public/platform/WebURL.h
@@ -1,158 +1,26 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebURL_h
-#define WebURL_h
-
-#include "WebCString.h"
-#include <googleurl/src/url_parse.h>
-
-#if WEBKIT_IMPLEMENTATION
-namespace WebCore { class KURL; }
-#else
-#include <googleurl/src/gurl.h>
-#endif
-
-namespace WebKit {
-
-class WebURL {
-public:
- ~WebURL()
- {
- }
-
- WebURL() : m_isValid(false)
- {
- }
-
- WebURL(const WebCString& spec, const url_parse::Parsed& parsed, bool isValid)
- : m_spec(spec)
- , m_parsed(parsed)
- , m_isValid(isValid)
- {
- }
-
- WebURL(const WebURL& s)
- : m_spec(s.m_spec)
- , m_parsed(s.m_parsed)
- , m_isValid(s.m_isValid)
- {
- }
-
- WebURL& operator=(const WebURL& s)
- {
- m_spec = s.m_spec;
- m_parsed = s.m_parsed;
- m_isValid = s.m_isValid;
- return *this;
- }
-
- void assign(const WebCString& spec, const url_parse::Parsed& parsed, bool isValid)
- {
- m_spec = spec;
- m_parsed = parsed;
- m_isValid = isValid;
- }
-
- const WebCString& spec() const
- {
- return m_spec;
- }
-
- const url_parse::Parsed& parsed() const
- {
- return m_parsed;
- }
-
- bool isValid() const
- {
- return m_isValid;
- }
-
- bool isEmpty() const
- {
- return m_spec.isEmpty();
- }
-
- bool isNull() const
- {
- return m_spec.isEmpty();
- }
-
-#if WEBKIT_IMPLEMENTATION
- WebURL(const WebCore::KURL&);
- WebURL& operator=(const WebCore::KURL&);
- operator WebCore::KURL() const;
-#else
- WebURL(const GURL& g)
- : m_spec(g.possibly_invalid_spec())
- , m_parsed(g.parsed_for_possibly_invalid_spec())
- , m_isValid(g.is_valid())
- {
- }
-
- WebURL& operator=(const GURL& g)
- {
- m_spec = g.possibly_invalid_spec();
- m_parsed = g.parsed_for_possibly_invalid_spec();
- m_isValid = g.is_valid();
- return *this;
- }
-
- operator GURL() const
- {
- return isNull() ? GURL() : GURL(m_spec.data(), m_spec.length(), m_parsed, m_isValid);
- }
-#endif
-
-private:
- WebCString m_spec; // UTF-8 encoded
- url_parse::Parsed m_parsed;
- bool m_isValid;
-};
-
-inline bool operator<(const WebURL& a, const WebURL& b)
-{
- return a.spec() < b.spec();
-}
-
-inline bool operator==(const WebURL& a, const WebURL& b)
-{
- return !a.spec().compare(b.spec());
-}
-
-inline bool operator!=(const WebURL& a, const WebURL& b)
-{
- return !(a == b);
-}
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebURL.h"
diff --git a/Source/WebKit/chromium/public/platform/WebURLError.h b/Source/WebKit/chromium/public/platform/WebURLError.h
index 862dbeaa3..8f0c15627 100644
--- a/Source/WebKit/chromium/public/platform/WebURLError.h
+++ b/Source/WebKit/chromium/public/platform/WebURLError.h
@@ -1,73 +1,26 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebURLError_h
-#define WebURLError_h
-
-#include "WebString.h"
-#include "WebURL.h"
-
-#if defined(WEBKIT_IMPLEMENTATION)
-namespace WebCore { class ResourceError; }
-#endif
-
-namespace WebKit {
-
-struct WebURLError {
- // A namespace for "reason" to support various layers generating
- // resource errors. WebKit does not care about the value of this
- // string as it will just be passed via callbacks to the consumer.
- WebString domain;
-
- // A numeric error code detailing the reason for this error. A value
- // of 0 means no error. WebKit does not interpret the meaning of other
- // values and normally just forwards this error information back to the
- // embedder (see for example WebFrameClient).
- int reason;
-
- // A flag showing whether this error should be treated as a cancellation,
- // e.g. we do not show console errors for cancellations.
- bool isCancellation;
-
- // The url that failed to load.
- WebURL unreachableURL;
-
- WebURLError() : reason(0), isCancellation(false) { }
-
-#if defined(WEBKIT_IMPLEMENTATION)
- WebURLError(const WebCore::ResourceError&);
- WebURLError& operator=(const WebCore::ResourceError&);
- operator WebCore::ResourceError() const;
-#endif
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebURLError.h"
diff --git a/Source/WebKit/chromium/public/platform/WebURLLoadTiming.h b/Source/WebKit/chromium/public/platform/WebURLLoadTiming.h
index 839276bfb..7cc0dd844 100644
--- a/Source/WebKit/chromium/public/platform/WebURLLoadTiming.h
+++ b/Source/WebKit/chromium/public/platform/WebURLLoadTiming.h
@@ -1,108 +1,26 @@
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebURLLoadTiming_h
-#define WebURLLoadTiming_h
-
-#include "WebCommon.h"
-#include "WebPrivatePtr.h"
-
-namespace WebCore { class ResourceLoadTiming; }
-
-namespace WebKit {
-class WebString;
-
-class WebURLLoadTiming {
-public:
- ~WebURLLoadTiming() { reset(); }
-
- WebURLLoadTiming() { }
- WebURLLoadTiming(const WebURLLoadTiming& d) { assign(d); }
- WebURLLoadTiming& operator=(const WebURLLoadTiming& d)
- {
- assign(d);
- return *this;
- }
-
- WEBKIT_EXPORT void initialize();
- WEBKIT_EXPORT void reset();
- WEBKIT_EXPORT void assign(const WebURLLoadTiming&);
-
- bool isNull() const { return m_private.isNull(); }
-
- WEBKIT_EXPORT double requestTime() const;
- WEBKIT_EXPORT void setRequestTime(double);
-
- WEBKIT_EXPORT int proxyStart() const;
- WEBKIT_EXPORT void setProxyStart(int);
-
- WEBKIT_EXPORT int proxyEnd() const;
- WEBKIT_EXPORT void setProxyEnd(int);
-
- WEBKIT_EXPORT int dnsStart() const;
- WEBKIT_EXPORT void setDNSStart(int);
-
- WEBKIT_EXPORT int dnsEnd() const;
- WEBKIT_EXPORT void setDNSEnd(int);
-
- WEBKIT_EXPORT int connectStart() const;
- WEBKIT_EXPORT void setConnectStart(int);
-
- WEBKIT_EXPORT int connectEnd() const;
- WEBKIT_EXPORT void setConnectEnd(int);
-
- WEBKIT_EXPORT int sendStart() const;
- WEBKIT_EXPORT void setSendStart(int);
-
- WEBKIT_EXPORT int sendEnd() const;
- WEBKIT_EXPORT void setSendEnd(int);
-
- WEBKIT_EXPORT int receiveHeadersEnd() const;
- WEBKIT_EXPORT void setReceiveHeadersEnd(int);
-
- WEBKIT_EXPORT int sslStart() const;
- WEBKIT_EXPORT void setSSLStart(int);
-
- WEBKIT_EXPORT int sslEnd() const;
- WEBKIT_EXPORT void setSSLEnd(int);
-
-#if WEBKIT_IMPLEMENTATION
- WebURLLoadTiming(const WTF::PassRefPtr<WebCore::ResourceLoadTiming>&);
- WebURLLoadTiming& operator=(const WTF::PassRefPtr<WebCore::ResourceLoadTiming>&);
- operator WTF::PassRefPtr<WebCore::ResourceLoadTiming>() const;
-#endif
-
-private:
- WebPrivatePtr<WebCore::ResourceLoadTiming> m_private;
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebURLLoadTiming.h"
diff --git a/Source/WebKit/chromium/public/platform/WebURLLoader.h b/Source/WebKit/chromium/public/platform/WebURLLoader.h
index a47b986b9..de437843b 100644
--- a/Source/WebKit/chromium/public/platform/WebURLLoader.h
+++ b/Source/WebKit/chromium/public/platform/WebURLLoader.h
@@ -1,71 +1,26 @@
/*
- * Copyright (C) 2009, 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebURLLoader_h
-#define WebURLLoader_h
-
-#include "WebCommon.h"
-
-namespace WebKit {
-
-class WebData;
-class WebURLLoaderClient;
-class WebURLRequest;
-class WebURLResponse;
-struct WebURLError;
-
-class WebURLLoader {
-public:
- // The WebURLLoader may be deleted in a call to its client.
- virtual ~WebURLLoader() {}
-
- // Load the request synchronously, returning results directly to the
- // caller upon completion. There is no mechanism to interrupt a
- // synchronous load!!
- virtual void loadSynchronously(const WebURLRequest&,
- WebURLResponse&, WebURLError&, WebData& data) = 0;
-
- // Load the request asynchronously, sending notifications to the given
- // client. The client will receive no further notifications if the
- // loader is disposed before it completes its work.
- virtual void loadAsynchronously(const WebURLRequest&,
- WebURLLoaderClient*) = 0;
-
- // Cancels an asynchronous load. This will appear as a load error to
- // the client.
- virtual void cancel() = 0;
-
- // Suspends/resumes an asynchronous load.
- virtual void setDefersLoading(bool) = 0;
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebURLLoader.h"
diff --git a/Source/WebKit/chromium/public/platform/WebURLLoaderClient.h b/Source/WebKit/chromium/public/platform/WebURLLoaderClient.h
index 3313a9c03..49cef3e56 100644
--- a/Source/WebKit/chromium/public/platform/WebURLLoaderClient.h
+++ b/Source/WebKit/chromium/public/platform/WebURLLoaderClient.h
@@ -1,78 +1,26 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebURLLoaderClient_h
-#define WebURLLoaderClient_h
-
-namespace WebKit {
-
-class WebURLLoader;
-class WebURLRequest;
-class WebURLResponse;
-struct WebURLError;
-
-class WebURLLoaderClient {
-public:
- // Called when following a redirect. |newRequest| contains the request
- // generated by the redirect. The client may modify |newRequest|.
- virtual void willSendRequest(
- WebURLLoader*, WebURLRequest& newRequest, const WebURLResponse& redirectResponse) { }
-
- // Called to report upload progress. The bytes reported correspond to
- // the HTTP message body.
- virtual void didSendData(
- WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) { }
-
- // Called when response headers are received.
- virtual void didReceiveResponse(WebURLLoader*, const WebURLResponse&) { }
-
- // Called when a chunk of response data is downloaded. This is only called
- // if WebURLRequest's downloadToFile flag was set to true.
- virtual void didDownloadData(WebURLLoader*, int dataLength) { }
-
- // Called when a chunk of response data is received.
- virtual void didReceiveData(WebURLLoader*, const char* data, int dataLength, int encodedDataLength) { }
-
- // Called when a chunk of renderer-generated metadata is received from the cache.
- virtual void didReceiveCachedMetadata(WebURLLoader*, const char* data, int dataLength) { }
-
- // Called when the load completes successfully.
- virtual void didFinishLoading(WebURLLoader*, double finishTime) { }
-
- // Called when the load completes with an error.
- virtual void didFail(WebURLLoader*, const WebURLError&) { }
-
-protected:
- virtual ~WebURLLoaderClient() { }
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebURLLoaderClient.h"
diff --git a/Source/WebKit/chromium/public/platform/WebURLRequest.h b/Source/WebKit/chromium/public/platform/WebURLRequest.h
index adf2f2e23..38c0e52a0 100644
--- a/Source/WebKit/chromium/public/platform/WebURLRequest.h
+++ b/Source/WebKit/chromium/public/platform/WebURLRequest.h
@@ -1,199 +1,26 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebURLRequest_h
-#define WebURLRequest_h
-
-#include "WebCommon.h"
-#include "WebHTTPBody.h"
-
-#if defined(WEBKIT_IMPLEMENTATION)
-namespace WebCore { class ResourceRequest; }
-#endif
-
-namespace WebKit {
-
-class WebCString;
-class WebHTTPBody;
-class WebHTTPHeaderVisitor;
-class WebString;
-class WebURL;
-class WebURLRequestPrivate;
-
-class WebURLRequest {
-public:
- enum CachePolicy {
- UseProtocolCachePolicy, // normal load
- ReloadIgnoringCacheData, // reload
- ReturnCacheDataElseLoad, // back/forward or encoding change - allow stale data
- ReturnCacheDataDontLoad, // results of a post - allow stale data and only use cache
- };
-
- enum TargetType {
- TargetIsMainFrame = 0,
- TargetIsSubframe = 1,
- TargetIsSubresource = 2,
- TargetIsStyleSheet = 3,
- TargetIsScript = 4,
- TargetIsFontResource = 5,
- TargetIsImage = 6,
- TargetIsObject = 7,
- TargetIsMedia = 8,
- TargetIsWorker = 9,
- TargetIsSharedWorker = 10,
- TargetIsPrefetch = 11,
- TargetIsPrerender = 12,
- TargetIsFavicon = 13,
- TargetIsXHR = 14,
- TargetIsTextTrack = 15,
- TargetIsUnspecified = 16,
- };
-
- class ExtraData {
- public:
- virtual ~ExtraData() { }
- };
-
- ~WebURLRequest() { reset(); }
-
- WebURLRequest() : m_private(0) { }
- WebURLRequest(const WebURLRequest& r) : m_private(0) { assign(r); }
- WebURLRequest& operator=(const WebURLRequest& r)
- {
- assign(r);
- return *this;
- }
-
- explicit WebURLRequest(const WebURL& url) : m_private(0)
- {
- initialize();
- setURL(url);
- }
-
- WEBKIT_EXPORT void initialize();
- WEBKIT_EXPORT void reset();
- WEBKIT_EXPORT void assign(const WebURLRequest&);
-
- WEBKIT_EXPORT bool isNull() const;
-
- WEBKIT_EXPORT WebURL url() const;
- WEBKIT_EXPORT void setURL(const WebURL&);
-
- // Used to implement third-party cookie blocking.
- WEBKIT_EXPORT WebURL firstPartyForCookies() const;
- WEBKIT_EXPORT void setFirstPartyForCookies(const WebURL&);
-
- WEBKIT_EXPORT bool allowCookies() const;
- WEBKIT_EXPORT void setAllowCookies(bool);
-
- // Controls whether user name, password, and cookies may be sent with the
- // request. (If false, this overrides allowCookies.)
- WEBKIT_EXPORT bool allowStoredCredentials() const;
- WEBKIT_EXPORT void setAllowStoredCredentials(bool);
-
- WEBKIT_EXPORT CachePolicy cachePolicy() const;
- WEBKIT_EXPORT void setCachePolicy(CachePolicy);
-
- WEBKIT_EXPORT WebString httpMethod() const;
- WEBKIT_EXPORT void setHTTPMethod(const WebString&);
-
- WEBKIT_EXPORT WebString httpHeaderField(const WebString& name) const;
- WEBKIT_EXPORT void setHTTPHeaderField(const WebString& name, const WebString& value);
- WEBKIT_EXPORT void addHTTPHeaderField(const WebString& name, const WebString& value);
- WEBKIT_EXPORT void clearHTTPHeaderField(const WebString& name);
- WEBKIT_EXPORT void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const;
-
- WEBKIT_EXPORT WebHTTPBody httpBody() const;
- WEBKIT_EXPORT void setHTTPBody(const WebHTTPBody&);
-
- // Controls whether upload progress events are generated when a request
- // has a body.
- WEBKIT_EXPORT bool reportUploadProgress() const;
- WEBKIT_EXPORT void setReportUploadProgress(bool);
-
- // Controls whether load timing info is collected for the request.
- WEBKIT_EXPORT bool reportLoadTiming() const;
- WEBKIT_EXPORT void setReportLoadTiming(bool);
-
- // Controls whether actual headers sent and received for request are
- // collected and reported.
- WEBKIT_EXPORT bool reportRawHeaders() const;
- WEBKIT_EXPORT void setReportRawHeaders(bool);
-
- WEBKIT_EXPORT TargetType targetType() const;
- WEBKIT_EXPORT void setTargetType(TargetType);
-
- // True if the request was user initiated.
- WEBKIT_EXPORT bool hasUserGesture() const;
- WEBKIT_EXPORT void setHasUserGesture(bool);
-
- // A consumer controlled value intended to be used to identify the
- // requestor.
- WEBKIT_EXPORT int requestorID() const;
- WEBKIT_EXPORT void setRequestorID(int);
-
- // A consumer controlled value intended to be used to identify the
- // process of the requestor.
- WEBKIT_EXPORT int requestorProcessID() const;
- WEBKIT_EXPORT void setRequestorProcessID(int);
-
- // Allows the request to be matched up with its app cache host.
- WEBKIT_EXPORT int appCacheHostID() const;
- WEBKIT_EXPORT void setAppCacheHostID(int);
-
- // If true, the response body will be downloaded to a file managed by the
- // WebURLLoader. See WebURLResponse::downloadedFilePath.
- WEBKIT_EXPORT bool downloadToFile() const;
- WEBKIT_EXPORT void setDownloadToFile(bool);
-
- // Extra data associated with the underlying resource request. Resource
- // requests can be copied. If non-null, each copy of a resource requests
- // holds a pointer to the extra data, and the extra data pointer will be
- // deleted when the last resource request is destroyed. Setting the extra
- // data pointer will cause the underlying resource request to be
- // dissociated from any existing non-null extra data pointer.
- WEBKIT_EXPORT ExtraData* extraData() const;
- WEBKIT_EXPORT void setExtraData(ExtraData*);
-
-#if defined(WEBKIT_IMPLEMENTATION)
- WebCore::ResourceRequest& toMutableResourceRequest();
- const WebCore::ResourceRequest& toResourceRequest() const;
-#endif
-
-protected:
- void assign(WebURLRequestPrivate*);
-
-private:
- WebURLRequestPrivate* m_private;
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebURLRequest.h"
diff --git a/Source/WebKit/chromium/public/platform/WebURLResponse.h b/Source/WebKit/chromium/public/platform/WebURLResponse.h
index 8d53eac38..29cbd614b 100644
--- a/Source/WebKit/chromium/public/platform/WebURLResponse.h
+++ b/Source/WebKit/chromium/public/platform/WebURLResponse.h
@@ -1,200 +1,26 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebURLResponse_h
-#define WebURLResponse_h
-
-#include "WebCommon.h"
-#include "WebPrivateOwnPtr.h"
-
-#if defined(WEBKIT_IMPLEMENTATION)
-namespace WebCore { class ResourceResponse; }
-#endif
-
-namespace WebKit {
-
-class WebCString;
-class WebHTTPHeaderVisitor;
-class WebHTTPLoadInfo;
-class WebString;
-class WebURL;
-class WebURLLoadTiming;
-class WebURLResponsePrivate;
-
-class WebURLResponse {
-public:
- class ExtraData {
- public:
- virtual ~ExtraData() { }
- };
-
- ~WebURLResponse() { reset(); }
-
- WebURLResponse() : m_private(0) { }
- WebURLResponse(const WebURLResponse& r) : m_private(0) { assign(r); }
- WebURLResponse& operator=(const WebURLResponse& r)
- {
- assign(r);
- return *this;
- }
-
- explicit WebURLResponse(const WebURL& url) : m_private(0)
- {
- initialize();
- setURL(url);
- }
-
- WEBKIT_EXPORT void initialize();
- WEBKIT_EXPORT void reset();
- WEBKIT_EXPORT void assign(const WebURLResponse&);
-
- WEBKIT_EXPORT bool isNull() const;
-
- WEBKIT_EXPORT WebURL url() const;
- WEBKIT_EXPORT void setURL(const WebURL&);
-
- WEBKIT_EXPORT unsigned connectionID() const;
- WEBKIT_EXPORT void setConnectionID(unsigned);
-
- WEBKIT_EXPORT bool connectionReused() const;
- WEBKIT_EXPORT void setConnectionReused(bool);
-
- WEBKIT_EXPORT WebURLLoadTiming loadTiming();
- WEBKIT_EXPORT void setLoadTiming(const WebURLLoadTiming&);
-
- WEBKIT_EXPORT WebHTTPLoadInfo httpLoadInfo();
- WEBKIT_EXPORT void setHTTPLoadInfo(const WebHTTPLoadInfo&);
-
- WEBKIT_EXPORT double responseTime() const;
- WEBKIT_EXPORT void setResponseTime(double);
-
- WEBKIT_EXPORT WebString mimeType() const;
- WEBKIT_EXPORT void setMIMEType(const WebString&);
-
- WEBKIT_EXPORT long long expectedContentLength() const;
- WEBKIT_EXPORT void setExpectedContentLength(long long);
-
- WEBKIT_EXPORT WebString textEncodingName() const;
- WEBKIT_EXPORT void setTextEncodingName(const WebString&);
-
- WEBKIT_EXPORT WebString suggestedFileName() const;
- WEBKIT_EXPORT void setSuggestedFileName(const WebString&);
-
- WEBKIT_EXPORT int httpStatusCode() const;
- WEBKIT_EXPORT void setHTTPStatusCode(int);
-
- WEBKIT_EXPORT WebString httpStatusText() const;
- WEBKIT_EXPORT void setHTTPStatusText(const WebString&);
-
- WEBKIT_EXPORT WebString httpHeaderField(const WebString& name) const;
- WEBKIT_EXPORT void setHTTPHeaderField(const WebString& name, const WebString& value);
- WEBKIT_EXPORT void addHTTPHeaderField(const WebString& name, const WebString& value);
- WEBKIT_EXPORT void clearHTTPHeaderField(const WebString& name);
- WEBKIT_EXPORT void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const;
-
- WEBKIT_EXPORT double lastModifiedDate() const;
- WEBKIT_EXPORT void setLastModifiedDate(double);
-
- WEBKIT_EXPORT long long appCacheID() const;
- WEBKIT_EXPORT void setAppCacheID(long long);
-
- WEBKIT_EXPORT WebURL appCacheManifestURL() const;
- WEBKIT_EXPORT void setAppCacheManifestURL(const WebURL&);
-
- // A consumer controlled value intended to be used to record opaque
- // security info related to this request.
- WEBKIT_EXPORT WebCString securityInfo() const;
- WEBKIT_EXPORT void setSecurityInfo(const WebCString&);
-
-#if defined(WEBKIT_IMPLEMENTATION)
- WebCore::ResourceResponse& toMutableResourceResponse();
- const WebCore::ResourceResponse& toResourceResponse() const;
-#endif
-
- // Flag whether this request was served from the disk cache entry.
- WEBKIT_EXPORT bool wasCached() const;
- WEBKIT_EXPORT void setWasCached(bool);
-
- // Flag whether this request was loaded via the SPDY protocol or not.
- // SPDY is an experimental web protocol, see http://dev.chromium.org/spdy
- WEBKIT_EXPORT bool wasFetchedViaSPDY() const;
- WEBKIT_EXPORT void setWasFetchedViaSPDY(bool);
-
- // Flag whether this request was loaded after the TLS/Next-Protocol-Negotiation was used.
- // This is related to SPDY.
- WEBKIT_EXPORT bool wasNpnNegotiated() const;
- WEBKIT_EXPORT void setWasNpnNegotiated(bool);
-
- // Flag whether this request was made when "Alternate-Protocol: xxx"
- // is present in server's response.
- WEBKIT_EXPORT bool wasAlternateProtocolAvailable() const;
- WEBKIT_EXPORT void setWasAlternateProtocolAvailable(bool);
-
- // Flag whether this request was loaded via an explicit proxy (HTTP, SOCKS, etc).
- WEBKIT_EXPORT bool wasFetchedViaProxy() const;
- WEBKIT_EXPORT void setWasFetchedViaProxy(bool);
-
- // Flag whether this request is part of a multipart response.
- WEBKIT_EXPORT bool isMultipartPayload() const;
- WEBKIT_EXPORT void setIsMultipartPayload(bool);
-
- // This indicates the location of a downloaded response if the
- // WebURLRequest had the downloadToFile flag set to true. This file path
- // remains valid for the lifetime of the WebURLLoader used to create it.
- WEBKIT_EXPORT WebString downloadFilePath() const;
- WEBKIT_EXPORT void setDownloadFilePath(const WebString&);
-
- // Remote IP address of the socket which fetched this resource.
- WEBKIT_EXPORT WebString remoteIPAddress() const;
- WEBKIT_EXPORT void setRemoteIPAddress(const WebString&);
-
- // Remote port number of the socket which fetched this resource.
- WEBKIT_EXPORT unsigned short remotePort() const;
- WEBKIT_EXPORT void setRemotePort(unsigned short);
-
- // Extra data associated with the underlying resource response. Resource
- // responses can be copied. If non-null, each copy of a resource response
- // holds a pointer to the extra data, and the extra data pointer will be
- // deleted when the last resource response is destroyed. Setting the extra
- // data pointer will cause the underlying resource response to be
- // dissociated from any existing non-null extra data pointer.
- WEBKIT_EXPORT ExtraData* extraData() const;
- WEBKIT_EXPORT void setExtraData(ExtraData*);
-
-protected:
- void assign(WebURLResponsePrivate*);
-
-private:
- WebURLResponsePrivate* m_private;
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebURLResponse.h"
diff --git a/Source/WebKit/chromium/public/platform/WebVector.h b/Source/WebKit/chromium/public/platform/WebVector.h
index bb02abcdf..372147789 100644
--- a/Source/WebKit/chromium/public/platform/WebVector.h
+++ b/Source/WebKit/chromium/public/platform/WebVector.h
@@ -1,186 +1,26 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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:
+ * 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.
+ * 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 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.
+ * 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 WebVector_h
-#define WebVector_h
-
-#include "WebCommon.h"
-
-#include <algorithm>
-
-namespace WebKit {
-
-// A simple vector class.
-//
-// Sample usage:
-//
-// void Foo(WebVector<int>& result)
-// {
-// WebVector<int> data(10);
-// for (size_t i = 0; i < data.size(); ++i)
-// data[i] = ...
-// result.swap(data);
-// }
-//
-// It is also possible to assign from other types of random access
-// containers:
-//
-// void Foo(const std::vector<std::string>& input)
-// {
-// WebVector<WebCString> cstrings = input;
-// ...
-// }
-//
-template <typename T>
-class WebVector {
-public:
- typedef T ValueType;
-
- ~WebVector()
- {
- destroy();
- }
-
- explicit WebVector(size_t size = 0)
- {
- initialize(size);
- }
-
- WebVector(const WebVector<T>& other)
- {
- initializeFrom(other.m_ptr, other.m_size);
- }
-
- template <typename C>
- WebVector(const C& other)
- {
- initializeFrom(other.size() ? &other[0] : 0, other.size());
- }
-
- WebVector& operator=(const WebVector& other)
- {
- if (this != &other)
- assign(other);
- return *this;
- }
-
- template <typename C>
- WebVector<T>& operator=(const C& other)
- {
- if (this != reinterpret_cast<const WebVector<T>*>(&other))
- assign(other);
- return *this;
- }
-
- template <typename C>
- void assign(const C& other)
- {
- assign(other.size() ? &other[0] : 0, other.size());
- }
-
- template <typename U>
- void assign(const U* values, size_t size)
- {
- destroy();
- initializeFrom(values, size);
- }
-
- size_t size() const { return m_size; }
- bool isEmpty() const { return !m_size; }
-
- T& operator[](size_t i)
- {
- WEBKIT_ASSERT(i < m_size);
- return m_ptr[i];
- }
- const T& operator[](size_t i) const
- {
- WEBKIT_ASSERT(i < m_size);
- return m_ptr[i];
- }
-
- bool contains(const T& value) const
- {
- for (size_t i = 0; i < m_size; i++) {
- if (m_ptr[i] == value)
- return true;
- }
- return false;
- }
-
- T* data() { return m_ptr; }
- const T* data() const { return m_ptr; }
-
- void swap(WebVector<T>& other)
- {
- std::swap(m_ptr, other.m_ptr);
- std::swap(m_size, other.m_size);
- }
-
-private:
- void initialize(size_t size)
- {
- m_size = size;
- if (!m_size)
- m_ptr = 0;
- else {
- m_ptr = static_cast<T*>(::operator new(sizeof(T) * m_size));
- for (size_t i = 0; i < m_size; ++i)
- new (&m_ptr[i]) T();
- }
- }
-
- template <typename U>
- void initializeFrom(const U* values, size_t size)
- {
- m_size = size;
- if (!m_size)
- m_ptr = 0;
- else {
- m_ptr = static_cast<T*>(::operator new(sizeof(T) * m_size));
- for (size_t i = 0; i < m_size; ++i)
- new (&m_ptr[i]) T(values[i]);
- }
- }
-
- void destroy()
- {
- for (size_t i = 0; i < m_size; ++i)
- m_ptr[i].~T();
- ::operator delete(m_ptr);
- }
-
- T* m_ptr;
- size_t m_size;
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebVector.h"
diff --git a/Source/WebKit/chromium/src/ApplicationCacheHost.cpp b/Source/WebKit/chromium/src/ApplicationCacheHost.cpp
index 73f258b0c..bbf740dfd 100644
--- a/Source/WebKit/chromium/src/ApplicationCacheHost.cpp
+++ b/Source/WebKit/chromium/src/ApplicationCacheHost.cpp
@@ -193,10 +193,12 @@ void ApplicationCacheHost::maybeLoadFallbackSynchronously(const ResourceRequest&
// N/A to the chromium port
}
-bool ApplicationCacheHost::canCacheInPageCache() const
+bool ApplicationCacheHost::canCacheInPageCache()
{
- // N/A to the chromium port which doesn't use the page cache.
- return false;
+ // Chromium doesn't use the page cache, however, that's controlled by WebCore::Settings, which has usesPageCache() return
+ // false. So we return an hyptothetical here: Chromium won't end up using the PageCache, but the statistics in PageCache.cpp
+ // will be reported correctly for re-evaluating that decision.
+ return !isApplicationCacheEnabled() || status() == UNCACHED;
}
void ApplicationCacheHost::setDOMApplicationCache(DOMApplicationCache* domApplicationCache)
diff --git a/Source/WebKit/chromium/src/AssertMatchingEnums.cpp b/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
index ac6fa0447..9f39fc372 100644
--- a/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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
@@ -36,28 +36,32 @@
#include "AXObjectCache.h"
#include "AccessibilityObject.h"
#include "ApplicationCacheHost.h"
-#include "AsyncFileSystem.h"
#include "ContentSecurityPolicy.h"
#include "DocumentMarker.h"
#include "EditorInsertAction.h"
#include "ExceptionCode.h"
#include "FileError.h"
#include "FileMetadata.h"
+#include "FileSystemType.h"
+#include "FilterOperation.h"
#include "FontDescription.h"
#include "FontSmoothingMode.h"
#include "GeolocationError.h"
#include "GeolocationPosition.h"
#include "HTMLInputElement.h"
+#include "IDBDatabaseException.h"
#include "IDBFactoryBackendInterface.h"
#include "IDBKey.h"
+#include "IceOptions.h"
#include "IconURL.h"
#include "MediaPlayer.h"
#include "MediaStreamSource.h"
#include "NotificationClient.h"
#include "PageVisibilityState.h"
#include "PasteboardPrivate.h"
+#include "PeerConnection00.h"
#include "PlatformCursor.h"
-#include "SecurityPolicy.h"
+#include "ReferrerPolicy.h"
#include "Settings.h"
#include "StorageInfo.h"
#include "TextAffinity.h"
@@ -66,7 +70,6 @@
#include "UserContentTypes.h"
#include "UserScriptTypes.h"
#include "UserStyleSheetTypes.h"
-#include "VideoFrameChromium.h"
#include "WebAccessibilityNotification.h"
#include "WebAccessibilityObject.h"
#include "WebApplicationCacheHost.h"
@@ -78,27 +81,32 @@
#include "WebFontDescription.h"
#include "WebGeolocationError.h"
#include "WebGeolocationPosition.h"
+#include "WebIDBDatabaseException.h"
#include "WebIDBFactory.h"
#include "WebIDBKey.h"
#include "WebIconURL.h"
#include "WebInputElement.h"
#include "WebMediaPlayer.h"
+#include "WebMediaPlayerClient.h"
#include "WebNotificationPresenter.h"
#include "WebPageVisibilityState.h"
-#include "WebReferrerPolicy.h"
#include "WebScrollbar.h"
#include "WebSettings.h"
#include "WebStorageQuotaError.h"
#include "WebStorageQuotaType.h"
#include "WebTextAffinity.h"
#include "WebTextCaseSensitivity.h"
-#include "WebTextCheckingType.h"
#include "WebTextCheckingResult.h"
-#include "WebVideoFrame.h"
+#include "WebTextCheckingType.h"
#include "WebView.h"
#include "platform/WebClipboard.h"
#include "platform/WebFileSystem.h"
+#include "platform/WebICEOptions.h"
#include "platform/WebMediaStreamSource.h"
+#include "platform/WebPeerConnection00Handler.h"
+#include "platform/WebPeerConnection00HandlerClient.h"
+#include <public/WebFilterOperation.h>
+#include <public/WebReferrerPolicy.h>
#include <wtf/Assertions.h>
#include <wtf/text/StringImpl.h>
@@ -212,6 +220,7 @@ COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTreeGrid, TreeGridRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTreeItemRole, TreeItemRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDirectory, DirectoryRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleEditableText, EditableTextRole);
+COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleFooter, FooterRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleListItem, ListItemRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleParagraph, ParagraphRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLabel, LabelRole);
@@ -310,6 +319,15 @@ COMPILE_ASSERT_MATCHING_ENUM(WebEditingActionTyped, EditorInsertActionTyped);
COMPILE_ASSERT_MATCHING_ENUM(WebEditingActionPasted, EditorInsertActionPasted);
COMPILE_ASSERT_MATCHING_ENUM(WebEditingActionDropped, EditorInsertActionDropped);
+COMPILE_ASSERT_MATCHING_ENUM(WebBasicColorMatrixFilterOperation::BasicColorMatrixFilterTypeGrayscale, FilterOperation::GRAYSCALE);
+COMPILE_ASSERT_MATCHING_ENUM(WebBasicColorMatrixFilterOperation::BasicColorMatrixFilterTypeSepia, FilterOperation::SEPIA);
+COMPILE_ASSERT_MATCHING_ENUM(WebBasicColorMatrixFilterOperation::BasicColorMatrixFilterTypeSaturate, FilterOperation::SATURATE);
+COMPILE_ASSERT_MATCHING_ENUM(WebBasicColorMatrixFilterOperation::BasicColorMatrixFilterTypeHueRotate, FilterOperation::HUE_ROTATE);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebBasicComponentTransferFilterOperation::BasicComponentTransferFilterTypeInvert, FilterOperation::INVERT);
+COMPILE_ASSERT_MATCHING_ENUM(WebBasicComponentTransferFilterOperation::BasicComponentTransferFilterTypeBrightness, FilterOperation::BRIGHTNESS);
+COMPILE_ASSERT_MATCHING_ENUM(WebBasicComponentTransferFilterOperation::BasicComponentTransferFilterTypeContrast, FilterOperation::CONTRAST);
+
COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyNone, FontDescription::NoFamily);
COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyStandard, FontDescription::StandardFamily);
COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilySerif, FontDescription::SerifFamily);
@@ -361,39 +379,57 @@ COMPILE_ASSERT_MATCHING_ENUM(WebNode::NotationNode, Node::NOTATION_NODE);
COMPILE_ASSERT_MATCHING_ENUM(WebNode::XPathNamespaceNode, Node::XPATH_NAMESPACE_NODE);
#if ENABLE(VIDEO)
-COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Empty, MediaPlayer::Empty);
-COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Idle, MediaPlayer::Idle);
-COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Loading, MediaPlayer::Loading);
-COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Loaded, MediaPlayer::Loaded);
-COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::FormatError, MediaPlayer::FormatError);
-COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::NetworkError, MediaPlayer::NetworkError);
-COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::DecodeError, MediaPlayer::DecodeError);
-
-COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::HaveNothing, MediaPlayer::HaveNothing);
-COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::HaveMetadata, MediaPlayer::HaveMetadata);
-COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::HaveCurrentData, MediaPlayer::HaveCurrentData);
-COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::HaveFutureData, MediaPlayer::HaveFutureData);
-COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::HaveEnoughData, MediaPlayer::HaveEnoughData);
-
-COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Unknown, MediaPlayer::Unknown);
-COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Download, MediaPlayer::Download);
-COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::StoredStream, MediaPlayer::StoredStream);
-COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::LiveStream, MediaPlayer::LiveStream);
-
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatInvalid, VideoFrameChromium::Invalid);
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatRGB555, VideoFrameChromium::RGB555);
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatRGB565, VideoFrameChromium::RGB565);
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatRGB24, VideoFrameChromium::RGB24);
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatRGB32, VideoFrameChromium::RGB32);
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatRGBA, VideoFrameChromium::RGBA);
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatYV12, VideoFrameChromium::YV12);
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatYV16, VideoFrameChromium::YV16);
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatNV12, VideoFrameChromium::NV12);
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatEmpty, VideoFrameChromium::Empty);
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatASCII, VideoFrameChromium::ASCII);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::NetworkStateEmpty, MediaPlayer::Empty);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::NetworkStateIdle, MediaPlayer::Idle);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::NetworkStateLoading, MediaPlayer::Loading);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::NetworkStateLoaded, MediaPlayer::Loaded);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::NetworkStateFormatError, MediaPlayer::FormatError);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::NetworkStateNetworkError, MediaPlayer::NetworkError);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::NetworkStateDecodeError, MediaPlayer::DecodeError);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::ReadyStateHaveNothing, MediaPlayer::HaveNothing);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::ReadyStateHaveMetadata, MediaPlayer::HaveMetadata);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::ReadyStateHaveCurrentData, MediaPlayer::HaveCurrentData);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::ReadyStateHaveFutureData, MediaPlayer::HaveFutureData);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::ReadyStateHaveEnoughData, MediaPlayer::HaveEnoughData);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::MovieLoadTypeUnknown, MediaPlayer::Unknown);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::MovieLoadTypeDownload, MediaPlayer::Download);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::MovieLoadTypeStoredStream, MediaPlayer::StoredStream);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::MovieLoadTypeLiveStream, MediaPlayer::LiveStream);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::PreloadNone, MediaPlayer::None);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::PreloadMetaData, MediaPlayer::MetaData);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::PreloadAuto, MediaPlayer::Auto);
+
+#if ENABLE(MEDIA_SOURCE)
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::AddIdStatusOk, MediaPlayer::Ok);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::AddIdStatusNotSupported, MediaPlayer::NotSupported);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::AddIdStatusReachedIdLimit, MediaPlayer::ReachedIdLimit);
+#endif
+
+#if ENABLE(ENCRYPTED_MEDIA)
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::EndOfStreamStatusNoError, MediaPlayer::EosNoError);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::EndOfStreamStatusNetworkError, MediaPlayer::EosNetworkError);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::EndOfStreamStatusDecodeError, MediaPlayer::EosDecodeError);
#endif
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(ENCRYPTED_MEDIA)
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::MediaKeyExceptionNoError, MediaPlayer::NoError);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::MediaKeyExceptionInvalidPlayerState, MediaPlayer::InvalidPlayerState);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported, MediaPlayer::KeySystemNotSupported);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayerClient::MediaKeyErrorCodeUnknown, MediaPlayerClient::UnknownError);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayerClient::MediaKeyErrorCodeClient, MediaPlayerClient::ClientError);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayerClient::MediaKeyErrorCodeService, MediaPlayerClient::ServiceError);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayerClient::MediaKeyErrorCodeOutput, MediaPlayerClient::OutputError);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayerClient::MediaKeyErrorCodeHardwareChange, MediaPlayerClient::HardwareChangeError);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayerClient::MediaKeyErrorCodeDomain, MediaPlayerClient::DomainError);
+#endif
+
+#endif
+
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
COMPILE_ASSERT_MATCHING_ENUM(WebNotificationPresenter::PermissionAllowed, NotificationClient::PermissionAllowed);
COMPILE_ASSERT_MATCHING_ENUM(WebNotificationPresenter::PermissionNotAllowed, NotificationClient::PermissionNotAllowed);
COMPILE_ASSERT_MATCHING_ENUM(WebNotificationPresenter::PermissionDenied, NotificationClient::PermissionDenied);
@@ -424,6 +460,9 @@ COMPILE_ASSERT_MATCHING_ENUM(WebView::UserContentInjectInTopFrameOnly, InjectInT
COMPILE_ASSERT_MATCHING_ENUM(WebView::UserStyleInjectInExistingDocuments, InjectInExistingDocuments);
COMPILE_ASSERT_MATCHING_ENUM(WebView::UserStyleInjectInSubsequentDocuments, InjectInSubsequentDocuments);
+COMPILE_ASSERT_MATCHING_ENUM(WebIDBDatabaseExceptionDataError, IDBDatabaseException::DATA_ERR);
+COMPILE_ASSERT_MATCHING_ENUM(WebIDBDatabaseExceptionQuotaError, IDBDatabaseException::QUOTA_ERR);
+
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::InvalidType, IDBKey::InvalidType);
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::ArrayType, IDBKey::ArrayType);
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::StringType, IDBKey::StringType);
@@ -431,8 +470,10 @@ COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::DateType, IDBKey::DateType);
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NumberType, IDBKey::NumberType);
#if ENABLE(FILE_SYSTEM)
-COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypeTemporary, AsyncFileSystem::Temporary);
-COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypePersistent, AsyncFileSystem::Persistent);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypeTemporary, FileSystemTypeTemporary);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypePersistent, FileSystemTypePersistent);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypeExternal, FileSystemTypeExternal);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypeIsolated, FileSystemTypeIsolated);
COMPILE_ASSERT_MATCHING_ENUM(WebFileInfo::TypeUnknown, FileMetadata::TypeUnknown);
COMPILE_ASSERT_MATCHING_ENUM(WebFileInfo::TypeFile, FileMetadata::TypeFile);
COMPILE_ASSERT_MATCHING_ENUM(WebFileInfo::TypeDirectory, FileMetadata::TypeDirectory);
@@ -493,16 +534,39 @@ COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarParentRenderLayer, Platfor
COMPILE_ASSERT_MATCHING_ENUM(WebPageVisibilityStateVisible, PageVisibilityStateVisible);
COMPILE_ASSERT_MATCHING_ENUM(WebPageVisibilityStateHidden, PageVisibilityStateHidden);
COMPILE_ASSERT_MATCHING_ENUM(WebPageVisibilityStatePrerender, PageVisibilityStatePrerender);
+COMPILE_ASSERT_MATCHING_ENUM(WebPageVisibilityStatePreview, PageVisibilityStatePreview);
#if ENABLE(MEDIA_STREAM)
COMPILE_ASSERT_MATCHING_ENUM(WebMediaStreamSource::TypeAudio, MediaStreamSource::TypeAudio);
COMPILE_ASSERT_MATCHING_ENUM(WebMediaStreamSource::TypeVideo, MediaStreamSource::TypeVideo);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebICEOptions::CandidateTypeAll, IceOptions::ALL);
+COMPILE_ASSERT_MATCHING_ENUM(WebICEOptions::CandidateTypeNoRelay, IceOptions::NO_RELAY);
+COMPILE_ASSERT_MATCHING_ENUM(WebICEOptions::CandidateTypeOnlyRelay, IceOptions::ONLY_RELAY);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00Handler::ActionSDPOffer, PeerConnection00::SDP_OFFER);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00Handler::ActionSDPPRanswer, PeerConnection00::SDP_PRANSWER);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00Handler::ActionSDPAnswer, PeerConnection00::SDP_ANSWER);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateNew, PeerConnection00::NEW);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateOpening, PeerConnection00::OPENING);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateNegotiating, PeerConnection00::OPENING);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateActive, PeerConnection00::ACTIVE);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateClosed, PeerConnection00::CLOSED);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateGathering, PeerConnection00::ICE_GATHERING);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateWaiting, PeerConnection00::ICE_WAITING);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateChecking, PeerConnection00::ICE_CHECKING);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateConnected, PeerConnection00::ICE_CONNECTED);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateCompleted, PeerConnection00::ICE_COMPLETED);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateFailed, PeerConnection00::ICE_FAILED);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateClosed, PeerConnection00::ICE_CLOSED);
#endif
-COMPILE_ASSERT_MATCHING_ENUM(WebReferrerPolicyAlways, SecurityPolicy::ReferrerPolicyAlways);
-COMPILE_ASSERT_MATCHING_ENUM(WebReferrerPolicyDefault, SecurityPolicy::ReferrerPolicyDefault);
-COMPILE_ASSERT_MATCHING_ENUM(WebReferrerPolicyNever, SecurityPolicy::ReferrerPolicyNever);
-COMPILE_ASSERT_MATCHING_ENUM(WebReferrerPolicyOrigin, SecurityPolicy::ReferrerPolicyOrigin);
+COMPILE_ASSERT_MATCHING_ENUM(WebReferrerPolicyAlways, ReferrerPolicyAlways);
+COMPILE_ASSERT_MATCHING_ENUM(WebReferrerPolicyDefault, ReferrerPolicyDefault);
+COMPILE_ASSERT_MATCHING_ENUM(WebReferrerPolicyNever, ReferrerPolicyNever);
+COMPILE_ASSERT_MATCHING_ENUM(WebReferrerPolicyOrigin, ReferrerPolicyOrigin);
COMPILE_ASSERT_MATCHING_ENUM(WebContentSecurityPolicyTypeReportOnly, ContentSecurityPolicy::ReportOnly);
COMPILE_ASSERT_MATCHING_ENUM(WebContentSecurityPolicyTypeEnforcePolicy, ContentSecurityPolicy::EnforcePolicy);
diff --git a/Source/WebKit/chromium/src/AssociatedURLLoader.cpp b/Source/WebKit/chromium/src/AssociatedURLLoader.cpp
index 0c3a0cf55..f1c2aab30 100644
--- a/Source/WebKit/chromium/src/AssociatedURLLoader.cpp
+++ b/Source/WebKit/chromium/src/AssociatedURLLoader.cpp
@@ -140,6 +140,7 @@ public:
virtual void didReceiveCachedMetadata(const char*, int /*dataLength*/);
virtual void didFinishLoading(unsigned long /*identifier*/, double /*finishTime*/);
virtual void didFail(const ResourceError&);
+ virtual void didFailRedirectCheck();
virtual bool isDocumentThreadableLoaderClient() { return true; }
@@ -263,6 +264,11 @@ void AssociatedURLLoader::ClientAdapter::didFail(const ResourceError& error)
notifyError(&m_errorTimer);
}
+void AssociatedURLLoader::ClientAdapter::didFailRedirectCheck()
+{
+ m_loader->cancel();
+}
+
void AssociatedURLLoader::ClientAdapter::setDelayedError(const ResourceError& error)
{
didFail(error);
diff --git a/Source/WebKit/chromium/src/AsyncFileSystemChromium.cpp b/Source/WebKit/chromium/src/AsyncFileSystemChromium.cpp
index 8d8a3fedc..d2026d330 100644
--- a/Source/WebKit/chromium/src/AsyncFileSystemChromium.cpp
+++ b/Source/WebKit/chromium/src/AsyncFileSystemChromium.cpp
@@ -51,10 +51,11 @@ namespace WebCore {
namespace {
-// ChromeOS-specific filesystem type.
-const AsyncFileSystem::Type externalType = static_cast<AsyncFileSystem::Type>(WebKit::WebFileSystem::TypeExternal);
+// For isolated filesystem.
+const char isolatedPathPrefix[] = "isolated";
+
+// For external filesystem.
const char externalPathPrefix[] = "external";
-const size_t externalPathPrefixLength = sizeof(externalPathPrefix) - 1;
// Specialized callback class for createSnapshotFileAndReadMetadata.
class SnapshotFileCallbacks : public AsyncFileSystemCallbacks {
@@ -101,7 +102,7 @@ bool AsyncFileSystem::isAvailable()
}
// static
-bool AsyncFileSystem::crackFileSystemURL(const KURL& url, AsyncFileSystem::Type& type, String& filePath)
+bool AsyncFileSystem::crackFileSystemURL(const KURL& url, FileSystemType& type, String& filePath)
{
if (!url.protocolIs("filesystem"))
return false;
@@ -109,51 +110,26 @@ bool AsyncFileSystem::crackFileSystemURL(const KURL& url, AsyncFileSystem::Type&
if (url.innerURL()) {
String typeString = url.innerURL()->path().substring(1);
if (typeString == temporaryPathPrefix)
- type = Temporary;
+ type = FileSystemTypeTemporary;
else if (typeString == persistentPathPrefix)
- type = Persistent;
+ type = FileSystemTypePersistent;
else if (typeString == externalPathPrefix)
- type = externalType;
+ type = FileSystemTypeExternal;
else
return false;
filePath = decodeURLEscapeSequences(url.path());
- } else {
- // FIXME: Remove this clause once http://codereview.chromium.org/7811006
- // lands, which makes this dead code.
- KURL originURL(ParsedURLString, url.path());
- String path = decodeURLEscapeSequences(originURL.path());
- if (path.isEmpty() || path[0] != '/')
- return false;
- path = path.substring(1);
-
- if (path.startsWith(temporaryPathPrefix)) {
- type = Temporary;
- path = path.substring(temporaryPathPrefixLength);
- } else if (path.startsWith(persistentPathPrefix)) {
- type = Persistent;
- path = path.substring(persistentPathPrefixLength);
- } else if (path.startsWith(externalPathPrefix)) {
- type = externalType;
- path = path.substring(externalPathPrefixLength);
- } else
- return false;
-
- if (path.isEmpty() || path[0] != '/')
- return false;
-
- filePath.swap(path);
}
return true;
}
// static
-bool AsyncFileSystem::isValidType(Type type)
+bool AsyncFileSystem::isValidType(FileSystemType type)
{
- return type == Temporary || type == Persistent || type == static_cast<Type>(WebKit::WebFileSystem::TypeExternal);
+ return type == FileSystemTypeTemporary || type == FileSystemTypePersistent || type == FileSystemTypeExternal;
}
-AsyncFileSystemChromium::AsyncFileSystemChromium(AsyncFileSystem::Type type, const KURL& rootURL)
+AsyncFileSystemChromium::AsyncFileSystemChromium(FileSystemType type, const KURL& rootURL)
: AsyncFileSystem(type)
, m_webFileSystem(WebKit::webKitPlatformSupport()->fileSystem())
, m_filesystemRootURL(rootURL)
@@ -161,17 +137,50 @@ AsyncFileSystemChromium::AsyncFileSystemChromium(AsyncFileSystem::Type type, con
ASSERT(m_webFileSystem);
}
+// static
+String AsyncFileSystemChromium::createIsolatedFileSystemName(const String& storageIdentifier, const String& filesystemId)
+{
+ StringBuilder filesystemName;
+ filesystemName.append(storageIdentifier);
+ filesystemName.append(":");
+ filesystemName.append(isolatedPathPrefix);
+ filesystemName.append("_");
+ filesystemName.append(filesystemId);
+ return filesystemName.toString();
+}
+
+// static
+PassOwnPtr<AsyncFileSystem> AsyncFileSystemChromium::createIsolatedFileSystem(const String& originString, const String& filesystemId)
+{
+ // The rootURL is used in succeeding filesystem requests sent to the
+ // chromium and is validated each time in the browser process.
+ StringBuilder rootURL;
+ rootURL.append("filesystem:");
+ rootURL.append(originString);
+ rootURL.append("/");
+ rootURL.append(isolatedPathPrefix);
+ rootURL.append("/");
+ rootURL.append(filesystemId);
+ rootURL.append("/");
+
+ return AsyncFileSystemChromium::create(FileSystemTypeIsolated, KURL(ParsedURLString, rootURL.toString()));
+}
+
AsyncFileSystemChromium::~AsyncFileSystemChromium()
{
}
-String AsyncFileSystemChromium::toURL(const String& originString, const String& fullPath)
+KURL AsyncFileSystemChromium::toURL(const String& originString, const String& fullPath) const
{
ASSERT(!originString.isEmpty());
if (originString == "null")
- return String();
+ return KURL();
+
+ // For now we don't support toURL for isolated filesystem (until we resolve the isolated filesystem lifetime issue).
+ if (type() == FileSystemTypeIsolated)
+ return KURL();
- if (type() == externalType) {
+ if (type() == FileSystemTypeExternal) {
// For external filesystem originString could be different from what we have in m_filesystemRootURL.
StringBuilder result;
result.append("filesystem:");
@@ -179,12 +188,12 @@ String AsyncFileSystemChromium::toURL(const String& originString, const String&
result.append("/");
result.append(externalPathPrefix);
result.append(encodeWithURLEscapeSequences(fullPath));
- return result.toString();
+ return KURL(ParsedURLString, result.toString());
}
// For regular types we can just call virtualPathToFileSystemURL which appends the fullPath to the m_filesystemRootURL that should look like 'filesystem:<origin>/<typePrefix>'.
ASSERT(SecurityOrigin::create(m_filesystemRootURL)->toString() == originString);
- return virtualPathToFileSystemURL(fullPath);
+ return KURL(ParsedURLString, virtualPathToFileSystemURL(fullPath));
}
void AsyncFileSystemChromium::move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
diff --git a/Source/WebKit/chromium/src/AsyncFileSystemChromium.h b/Source/WebKit/chromium/src/AsyncFileSystemChromium.h
index 8255d8e72..e827855a0 100644
--- a/Source/WebKit/chromium/src/AsyncFileSystemChromium.h
+++ b/Source/WebKit/chromium/src/AsyncFileSystemChromium.h
@@ -47,14 +47,17 @@ class KURL;
class AsyncFileSystemChromium : public AsyncFileSystem {
public:
- static PassOwnPtr<AsyncFileSystem> create(AsyncFileSystem::Type type, const KURL& rootURL)
+ static PassOwnPtr<AsyncFileSystem> create(FileSystemType type, const KURL& rootURL)
{
return adoptPtr(new AsyncFileSystemChromium(type, rootURL));
}
+ static String createIsolatedFileSystemName(const String& storageIdentifier, const String& filesystemId);
+ static PassOwnPtr<AsyncFileSystem> createIsolatedFileSystem(const String& originString, const String& filesystemId);
+
virtual ~AsyncFileSystemChromium();
- virtual String toURL(const String& originString, const String& fullPath);
+ virtual KURL toURL(const String& originString, const String& fullPath) const;
virtual void move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
virtual void copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
virtual void remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
@@ -69,7 +72,7 @@ public:
virtual void createSnapshotFileAndReadMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
protected:
- AsyncFileSystemChromium(AsyncFileSystem::Type, const KURL& rootURL);
+ AsyncFileSystemChromium(FileSystemType, const KURL& rootURL);
PassOwnPtr<AsyncFileSystemCallbacks> createSnapshotFileCallback(const KURL& internalBlobURL, PassOwnPtr<AsyncFileSystemCallbacks>) const;
diff --git a/Source/WebKit/chromium/src/AudioDestinationChromium.cpp b/Source/WebKit/chromium/src/AudioDestinationChromium.cpp
index 6c82385c8..44558de87 100644
--- a/Source/WebKit/chromium/src/AudioDestinationChromium.cpp
+++ b/Source/WebKit/chromium/src/AudioDestinationChromium.cpp
@@ -32,9 +32,12 @@
#include "AudioDestinationChromium.h"
+#include "AudioPullFIFO.h"
#include "WebKit.h"
#include "platform/WebKitPlatformSupport.h"
+#include <public/Platform.h>
+
using namespace WebKit;
namespace WebCore {
@@ -61,14 +64,14 @@ AudioDestinationChromium::AudioDestinationChromium(AudioSourceProvider& provider
, m_isPlaying(false)
{
// Use the optimal buffer size recommended by the audio backend.
- m_callbackBufferSize = webKitPlatformSupport()->audioHardwareBufferSize();
+ m_callbackBufferSize = WebKit::Platform::current()->audioHardwareBufferSize();
// Quick exit if the requested size is too large.
ASSERT(m_callbackBufferSize + renderBufferSize <= fifoSize);
if (m_callbackBufferSize + renderBufferSize > fifoSize)
return;
- m_audioDevice = adoptPtr(webKitPlatformSupport()->createAudioDevice(m_callbackBufferSize, numberOfChannels, sampleRate, this));
+ m_audioDevice = adoptPtr(WebKit::Platform::current()->createAudioDevice(m_callbackBufferSize, numberOfChannels, sampleRate, this));
ASSERT(m_audioDevice);
// Create a FIFO to handle the possibility of the callback size
@@ -76,7 +79,7 @@ AudioDestinationChromium::AudioDestinationChromium(AudioSourceProvider& provider
// contains enough data, the data will be provided directly.
// Otherwise, the FIFO will call the provider enough times to
// satisfy the request for data.
- m_fifo = adoptPtr(new FIFO(provider, numberOfChannels, fifoSize, renderBufferSize));
+ m_fifo = adoptPtr(new AudioPullFIFO(provider, numberOfChannels, fifoSize, renderBufferSize));
}
AudioDestinationChromium::~AudioDestinationChromium()
@@ -102,7 +105,7 @@ void AudioDestinationChromium::stop()
float AudioDestination::hardwareSampleRate()
{
- return static_cast<float>(webKitPlatformSupport()->audioHardwareSampleRate());
+ return static_cast<float>(WebKit::Platform::current()->audioHardwareSampleRate());
}
// Pulls on our provider to get the rendered audio stream.
@@ -125,125 +128,6 @@ void AudioDestinationChromium::render(const WebVector<float*>& audioData, size_t
m_fifo->consume(&m_renderBus, numberOfFrames);
}
-AudioDestinationChromium::FIFO::FIFO(AudioSourceProvider& provider, unsigned numberOfChannels, size_t fifoLength, size_t providerSize)
- : m_provider(provider)
- , m_fifoAudioBus(numberOfChannels, fifoLength)
- , m_fifoLength(fifoLength)
- , m_framesInFifo(0)
- , m_readIndex(0)
- , m_writeIndex(0)
- , m_providerSize(providerSize)
- , m_tempBus(numberOfChannels, providerSize)
-{
-}
-
-void AudioDestinationChromium::FIFO::consume(AudioBus* destination, size_t framesToConsume)
-{
- bool isGood = destination && (framesToConsume <= m_fifoLength);
- ASSERT(isGood);
- if (!isGood)
- return;
-
- if (framesToConsume > m_framesInFifo) {
- // We don't have enough data in the FIFO to fulfill the
- // request. Ask for more data.
- fillBuffer(framesToConsume - m_framesInFifo);
- }
-
- // We have enough data now. Copy the requested number of samples
- // to the destination.
-
- size_t part1Length;
- size_t part2Length;
- findWrapLengths(m_readIndex, framesToConsume, part1Length, part2Length);
-
- size_t numberOfChannels = m_fifoAudioBus.numberOfChannels();
-
- for (size_t channelIndex = 0; channelIndex < numberOfChannels; ++channelIndex) {
- float* destinationData = destination->channel(channelIndex)->mutableData();
- const float* sourceData = m_fifoAudioBus.channel(channelIndex)->data();
-
- bool isCopyGood = ((m_readIndex < m_fifoLength)
- && (m_readIndex + part1Length) <= m_fifoLength
- && (part1Length <= destination->length())
- && (part1Length + part2Length) <= destination->length());
- ASSERT(isCopyGood);
- if (!isCopyGood)
- return;
-
- memcpy(destinationData, sourceData + m_readIndex, part1Length * sizeof(*sourceData));
- // Handle wrap around of the FIFO, if needed.
- if (part2Length > 0)
- memcpy(destinationData + part1Length, sourceData, part2Length * sizeof(*sourceData));
- }
- m_readIndex = updateIndex(m_readIndex, framesToConsume);
- m_framesInFifo -= framesToConsume;
- ASSERT(m_framesInFifo >= 0);
-}
-
-void AudioDestinationChromium::FIFO::findWrapLengths(size_t index, size_t size, size_t& part1Length, size_t& part2Length)
-{
- ASSERT(index < m_fifoLength && size <= m_fifoLength);
- if (index < m_fifoLength && size <= m_fifoLength) {
- if (index + size > m_fifoLength) {
- // Need to wrap. Figure out the length of each piece.
- part1Length = m_fifoLength - index;
- part2Length = size - part1Length;
- } else {
- // No wrap needed.
- part1Length = size;
- part2Length = 0;
- }
- } else {
- // Invalid values for index or size. Set the part lengths to
- // zero so nothing is copied.
- part1Length = 0;
- part2Length = 0;
- }
-}
-
-void AudioDestinationChromium::FIFO::fillBuffer(size_t numberOfFrames)
-{
- // Keep asking the provider to give us data until we have received
- // at least |numberOfFrames| of data. Stuff the data into the
- // FIFO.
- size_t framesProvided = 0;
-
- while (framesProvided < numberOfFrames) {
- m_provider.provideInput(&m_tempBus, m_providerSize);
-
- size_t part1Length;
- size_t part2Length;
- findWrapLengths(m_writeIndex, m_providerSize, part1Length, part2Length);
-
- size_t numberOfChannels = m_fifoAudioBus.numberOfChannels();
-
- for (size_t channelIndex = 0; channelIndex < numberOfChannels; ++channelIndex) {
- float* destination = m_fifoAudioBus.channel(channelIndex)->mutableData();
- const float* source = m_tempBus.channel(channelIndex)->data();
-
- bool isCopyGood = (part1Length <= m_providerSize
- && (part1Length + part2Length) <= m_providerSize
- && (m_writeIndex < m_fifoLength)
- && (m_writeIndex + part1Length) <= m_fifoLength
- && part2Length < m_fifoLength);
- ASSERT(isCopyGood);
- if (!isCopyGood)
- return;
-
- memcpy(destination + m_writeIndex, source, part1Length * sizeof(*destination));
- // Handle wrap around of the FIFO, if needed.
- if (part2Length > 0)
- memcpy(destination, source + part1Length, part2Length * sizeof(*destination));
- }
-
- m_framesInFifo += m_providerSize;
- ASSERT(m_framesInFifo <= m_fifoLength);
- m_writeIndex = updateIndex(m_writeIndex, m_providerSize);
- framesProvided += m_providerSize;
- }
-}
-
} // namespace WebCore
#endif // ENABLE(WEB_AUDIO)
diff --git a/Source/WebKit/chromium/src/AudioDestinationChromium.h b/Source/WebKit/chromium/src/AudioDestinationChromium.h
index 3d1af2a1a..dfe5ebd7c 100644
--- a/Source/WebKit/chromium/src/AudioDestinationChromium.h
+++ b/Source/WebKit/chromium/src/AudioDestinationChromium.h
@@ -39,6 +39,8 @@ namespace WebKit { class WebAudioDevice; }
namespace WebCore {
+class AudioPullFIFO;
+
// An AudioDestination using Chromium's audio system
class AudioDestinationChromium : public AudioDestination, public WebKit::WebAudioDevice::RenderCallback {
@@ -56,64 +58,13 @@ public:
virtual void render(const WebKit::WebVector<float*>& audioData, size_t numberOfFrames);
private:
- // A FIFO (First In First Out) buffer to handle mismatches in the
- // audio backend hardware buffer size and the Web Audio render size.
- class FIFO {
- public:
- // Create a FIFO that gets data from |provider|. The FIFO will
- // be large enough to hold |fifoLength| frames of data of
- // |numberOfChannels| channels. The AudioSourceProvider will
- // be asked to produce |providerSize| frames when the FIFO
- // needs more data.
- FIFO(AudioSourceProvider& provider, unsigned numberOfChannels, size_t fifoLength, size_t providerSize);
-
- // Read |framesToConsume| frames from the FIFO into the
- // destination. If the FIFO does not have enough data, we ask
- // the |provider| to get more data to fulfill the request.
- void consume(AudioBus* destination, size_t framesToConsume);
-
- private:
- // Update the FIFO index by the step, with appropriate
- // wrapping around the endpoint.
- int updateIndex(int index, int step) { return (index + step) % m_fifoLength; }
-
- void findWrapLengths(size_t index, size_t providerSize, size_t& part1Length, size_t& part2Length);
-
- // Fill the FIFO buffer with at least |numberOfFrames| more data.
- void fillBuffer(size_t numberOfFrames);
-
- // The provider of the data in our FIFO.
- AudioSourceProvider& m_provider;
-
- // The FIFO itself. In reality, the FIFO is a circular buffer.
- AudioBus m_fifoAudioBus;
-
- // The total available space in the FIFO.
- size_t m_fifoLength;
-
- // The number of actual elements in the FIFO
- size_t m_framesInFifo;
-
- // Where to start reading from the FIFO.
- size_t m_readIndex;
-
- // Where to start writing to the FIFO.
- size_t m_writeIndex;
-
- // Number of frames of data that the provider will produce per call.
- unsigned int m_providerSize;
-
- // Temporary workspace to hold the data from the provider.
- AudioBus m_tempBus;
- };
-
-AudioSourceProvider& m_provider;
+ AudioSourceProvider& m_provider;
AudioBus m_renderBus;
float m_sampleRate;
bool m_isPlaying;
OwnPtr<WebKit::WebAudioDevice> m_audioDevice;
size_t m_callbackBufferSize;
- OwnPtr<FIFO> m_fifo;
+ OwnPtr<AudioPullFIFO> m_fifo;
};
} // namespace WebCore
diff --git a/Source/WebKit/chromium/src/AutofillPopupMenuClient.cpp b/Source/WebKit/chromium/src/AutofillPopupMenuClient.cpp
index c84ea12f6..4e643029a 100644
--- a/Source/WebKit/chromium/src/AutofillPopupMenuClient.cpp
+++ b/Source/WebKit/chromium/src/AutofillPopupMenuClient.cpp
@@ -32,7 +32,6 @@
#include "AutofillPopupMenuClient.h"
#include "CSSFontSelector.h"
-#include "CSSStyleSelector.h"
#include "CSSValueKeywords.h"
#include "Chrome.h"
#include "Frame.h"
@@ -40,6 +39,7 @@
#include "HTMLInputElement.h"
#include "Page.h"
#include "RenderTheme.h"
+#include "StyleResolver.h"
#include "WebAutofillClient.h"
#include "WebNode.h"
#include "WebViewClient.h"
@@ -52,9 +52,9 @@ using namespace WebCore;
namespace WebKit {
AutofillPopupMenuClient::AutofillPopupMenuClient()
- : m_separatorIndex(-1)
- , m_selectedIndex(-1)
+ : m_selectedIndex(-1)
, m_textField(0)
+ , m_useLegacyBehavior(false)
{
}
@@ -64,37 +64,25 @@ AutofillPopupMenuClient::~AutofillPopupMenuClient()
unsigned AutofillPopupMenuClient::getSuggestionsCount() const
{
- return m_names.size() + ((m_separatorIndex == -1) ? 0 : 1);
+ return m_names.size();
}
WebString AutofillPopupMenuClient::getSuggestion(unsigned listIndex) const
{
- int index = convertListIndexToInternalIndex(listIndex);
- if (index == -1)
- return WebString();
-
- ASSERT(index >= 0 && static_cast<size_t>(index) < m_names.size());
- return m_names[index];
+ ASSERT(listIndex < m_names.size());
+ return m_names[listIndex];
}
WebString AutofillPopupMenuClient::getLabel(unsigned listIndex) const
{
- int index = convertListIndexToInternalIndex(listIndex);
- if (index == -1)
- return WebString();
-
- ASSERT(index >= 0 && static_cast<size_t>(index) < m_labels.size());
- return m_labels[index];
+ ASSERT(listIndex < m_labels.size());
+ return m_labels[listIndex];
}
WebString AutofillPopupMenuClient::getIcon(unsigned listIndex) const
{
- int index = convertListIndexToInternalIndex(listIndex);
- if (index == -1)
- return WebString();
-
- ASSERT(index >= 0 && static_cast<size_t>(index) < m_icons.size());
- return m_icons[index];
+ ASSERT(listIndex < m_icons.size());
+ return m_icons[listIndex];
}
void AutofillPopupMenuClient::removeSuggestionAtIndex(unsigned listIndex)
@@ -102,26 +90,17 @@ void AutofillPopupMenuClient::removeSuggestionAtIndex(unsigned listIndex)
if (!canRemoveSuggestionAtIndex(listIndex))
return;
- int index = convertListIndexToInternalIndex(listIndex);
-
- ASSERT(static_cast<unsigned>(index) < m_names.size());
-
- m_names.remove(index);
- m_labels.remove(index);
- m_icons.remove(index);
- m_uniqueIDs.remove(index);
+ ASSERT(listIndex < m_names.size());
- // Shift the separator index if necessary.
- if (m_separatorIndex != -1)
- m_separatorIndex--;
+ m_names.remove(listIndex);
+ m_labels.remove(listIndex);
+ m_icons.remove(listIndex);
+ m_itemIDs.remove(listIndex);
}
bool AutofillPopupMenuClient::canRemoveSuggestionAtIndex(unsigned listIndex)
{
- // Only allow deletion of items before the separator that have unique id 0
- // (i.e. are autocomplete rather than autofill items).
- int index = convertListIndexToInternalIndex(listIndex);
- return !m_uniqueIDs[index] && (m_separatorIndex == -1 || listIndex < static_cast<unsigned>(m_separatorIndex));
+ return m_itemIDs[listIndex] == WebAutofillClient::MenuItemIDAutocompleteEntry || m_itemIDs[listIndex] == WebAutofillClient::MenuItemIDPasswordEntry;
}
void AutofillPopupMenuClient::valueChanged(unsigned listIndex, bool fireEvents)
@@ -130,15 +109,22 @@ void AutofillPopupMenuClient::valueChanged(unsigned listIndex, bool fireEvents)
if (!webView)
return;
- if (m_separatorIndex != -1 && listIndex > static_cast<unsigned>(m_separatorIndex))
- --listIndex;
-
ASSERT(listIndex < m_names.size());
+ if (m_useLegacyBehavior) {
+ for (size_t i = 0; i < m_itemIDs.size(); ++i) {
+ if (m_itemIDs[i] == WebAutofillClient::MenuItemIDSeparator) {
+ if (listIndex > i)
+ listIndex--;
+ break;
+ }
+ }
+ }
+
webView->autofillClient()->didAcceptAutofillSuggestion(WebNode(getTextField()),
m_names[listIndex],
m_labels[listIndex],
- m_uniqueIDs[listIndex],
+ m_itemIDs[listIndex],
listIndex);
}
@@ -148,15 +134,12 @@ void AutofillPopupMenuClient::selectionChanged(unsigned listIndex, bool fireEven
if (!webView)
return;
- if (m_separatorIndex != -1 && listIndex > static_cast<unsigned>(m_separatorIndex))
- --listIndex;
-
ASSERT(listIndex < m_names.size());
webView->autofillClient()->didSelectAutofillSuggestion(WebNode(getTextField()),
m_names[listIndex],
m_labels[listIndex],
- m_uniqueIDs[listIndex]);
+ m_itemIDs[listIndex]);
}
void AutofillPopupMenuClient::selectionCleared()
@@ -228,17 +211,12 @@ void AutofillPopupMenuClient::popupDidHide()
bool AutofillPopupMenuClient::itemIsSeparator(unsigned listIndex) const
{
- return (m_separatorIndex != -1 && static_cast<unsigned>(m_separatorIndex) == listIndex);
+ return m_itemIDs[listIndex] == WebAutofillClient::MenuItemIDSeparator;
}
bool AutofillPopupMenuClient::itemIsWarning(unsigned listIndex) const
{
- int index = convertListIndexToInternalIndex(listIndex);
- if (index == -1)
- return false;
-
- ASSERT(index >= 0 && static_cast<size_t>(index) < m_uniqueIDs.size());
- return m_uniqueIDs[index] < 0;
+ return m_itemIDs[listIndex] == WebAutofillClient::MenuItemIDWarningMessage;
}
void AutofillPopupMenuClient::setTextFromItem(unsigned listIndex)
@@ -248,7 +226,7 @@ void AutofillPopupMenuClient::setTextFromItem(unsigned listIndex)
FontSelector* AutofillPopupMenuClient::fontSelector() const
{
- return m_textField->document()->styleSelector()->fontSelector();
+ return m_textField->document()->styleResolver()->fontSelector();
}
HostWindow* AutofillPopupMenuClient::hostWindow() const
@@ -269,20 +247,36 @@ void AutofillPopupMenuClient::initialize(
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
const WebVector<WebString>& icons,
- const WebVector<int>& uniqueIDs,
+ const WebVector<int>& itemIDs,
int separatorIndex)
{
ASSERT(names.size() == labels.size());
ASSERT(names.size() == icons.size());
- ASSERT(names.size() == uniqueIDs.size());
- ASSERT(separatorIndex < static_cast<int>(names.size()));
+ ASSERT(names.size() == itemIDs.size());
m_selectedIndex = -1;
m_textField = textField;
- // The suggestions must be set before initializing the
- // AutofillPopupMenuClient.
- setSuggestions(names, labels, icons, uniqueIDs, separatorIndex);
+ if (separatorIndex == -1) {
+ // The suggestions must be set before initializing the
+ // AutofillPopupMenuClient.
+ setSuggestions(names, labels, icons, itemIDs);
+ } else {
+ m_useLegacyBehavior = true;
+ WebVector<WebString> namesWithSeparator(names.size() + 1);
+ WebVector<WebString> labelsWithSeparator(labels.size() + 1);
+ WebVector<WebString> iconsWithSeparator(icons.size() + 1);
+ WebVector<int> itemIDsWithSeparator(itemIDs.size() + 1);
+ for (size_t i = 0; i < names.size(); ++i) {
+ size_t j = i < static_cast<size_t>(separatorIndex) ? i : i + 1;
+ namesWithSeparator[j] = names[i];
+ labelsWithSeparator[j] = labels[i];
+ iconsWithSeparator[j] = icons[i];
+ itemIDsWithSeparator[j] = itemIDs[i];
+ }
+ itemIDsWithSeparator[separatorIndex] = WebAutofillClient::MenuItemIDSeparator;
+ setSuggestions(namesWithSeparator, labelsWithSeparator, iconsWithSeparator, itemIDsWithSeparator);
+ }
FontDescription regularFontDescription;
RenderTheme::defaultTheme()->systemFont(CSSValueWebkitControl,
@@ -291,7 +285,7 @@ void AutofillPopupMenuClient::initialize(
regularFontDescription.setComputedSize(style->fontDescription().computedSize());
Font regularFont(regularFontDescription, 0, 0);
- regularFont.update(textField->document()->styleSelector()->fontSelector());
+ regularFont.update(textField->document()->styleResolver()->fontSelector());
// The direction of text in popup menu is set the same as the direction of
// the input element: textField.
m_regularStyle = adoptPtr(new PopupMenuStyle(Color::black, Color::white, regularFont, true, false,
@@ -313,42 +307,28 @@ void AutofillPopupMenuClient::initialize(
void AutofillPopupMenuClient::setSuggestions(const WebVector<WebString>& names,
const WebVector<WebString>& labels,
const WebVector<WebString>& icons,
- const WebVector<int>& uniqueIDs,
- int separatorIndex)
+ const WebVector<int>& itemIDs)
{
ASSERT(names.size() == labels.size());
ASSERT(names.size() == icons.size());
- ASSERT(names.size() == uniqueIDs.size());
- ASSERT(separatorIndex < static_cast<int>(names.size()));
+ ASSERT(names.size() == itemIDs.size());
m_names.clear();
m_labels.clear();
m_icons.clear();
- m_uniqueIDs.clear();
+ m_itemIDs.clear();
for (size_t i = 0; i < names.size(); ++i) {
m_names.append(names[i]);
m_labels.append(labels[i]);
m_icons.append(icons[i]);
- m_uniqueIDs.append(uniqueIDs[i]);
+ m_itemIDs.append(itemIDs[i]);
}
- m_separatorIndex = separatorIndex;
-
// Try to preserve selection if possible.
if (getSelectedIndex() >= static_cast<int>(names.size()))
setSelectedIndex(-1);
}
-int AutofillPopupMenuClient::convertListIndexToInternalIndex(unsigned listIndex) const
-{
- if (listIndex == static_cast<unsigned>(m_separatorIndex))
- return -1;
-
- if (m_separatorIndex == -1 || listIndex < static_cast<unsigned>(m_separatorIndex))
- return listIndex;
- return listIndex - 1;
-}
-
WebViewImpl* AutofillPopupMenuClient::getWebView() const
{
Frame* frame = m_textField->document()->frame();
diff --git a/Source/WebKit/chromium/src/AutofillPopupMenuClient.h b/Source/WebKit/chromium/src/AutofillPopupMenuClient.h
index 73cc180e0..588e19bec 100644
--- a/Source/WebKit/chromium/src/AutofillPopupMenuClient.h
+++ b/Source/WebKit/chromium/src/AutofillPopupMenuClient.h
@@ -106,20 +106,15 @@ public:
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
const WebVector<WebString>& icons,
- const WebVector<int>& uniqueIDs,
+ const WebVector<int>& itemIDs,
int separatorIndex);
void setSuggestions(const WebVector<WebString>& names,
const WebVector<WebString>& labels,
const WebVector<WebString>& icons,
- const WebVector<int>& uniqueIDs,
- int separatorIndex);
+ const WebVector<int>& itemIDs);
private:
- // Convert the specified index from an index into the visible list (which might
- // include a separator entry) to an index to |m_names| and |m_labels|.
- // Returns -1 if the given index points to the separator.
- int convertListIndexToInternalIndex(unsigned) const;
WebViewImpl* getWebView() const;
WebCore::HTMLInputElement* getTextField() const { return m_textField.get(); }
WebCore::RenderStyle* textFieldStyle() const;
@@ -133,10 +128,7 @@ private:
Vector<WTF::String> m_names;
Vector<WTF::String> m_labels;
Vector<WTF::String> m_icons;
- Vector<int> m_uniqueIDs;
-
- // The index of the separator. -1 if there is no separator.
- int m_separatorIndex;
+ Vector<int> m_itemIDs;
// The index of the selected item. -1 if there is no selected item.
int m_selectedIndex;
@@ -144,6 +136,9 @@ private:
RefPtr<WebCore::HTMLInputElement> m_textField;
OwnPtr<WebCore::PopupMenuStyle> m_regularStyle;
OwnPtr<WebCore::PopupMenuStyle> m_warningStyle;
+
+ // Use legacy behavior while the chromium side hasn't been updated.
+ bool m_useLegacyBehavior;
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/bridge/MediaStreamCenter.cpp b/Source/WebKit/chromium/src/BatteryClientImpl.cpp
index 99f636d53..136c9123d 100644
--- a/Source/WebKit/chromium/bridge/MediaStreamCenter.cpp
+++ b/Source/WebKit/chromium/src/BatteryClientImpl.cpp
@@ -29,46 +29,54 @@
*/
#include "config.h"
+#include "BatteryClientImpl.h"
-#if ENABLE(MEDIA_STREAM)
+#if ENABLE(BATTERY_STATUS)
-#include "MediaStreamCenter.h"
+#include "BatteryController.h"
+#include "BatteryStatus.h"
+#include "EventNames.h"
+#include "WebBatteryStatusClient.h"
+#include <wtf/RefPtr.h>
-#include "MediaStreamCenterInternal.h"
-#include "MediaStreamDescriptor.h"
-#include <wtf/PassOwnPtr.h>
+namespace WebKit {
-namespace WebCore {
-
-MediaStreamCenter::MediaStreamCenter()
- : m_private(adoptPtr(new MediaStreamCenterInternal(this)))
+BatteryClientImpl::BatteryClientImpl(WebBatteryStatusClient* client)
+ : m_client(client)
+ , m_controller(0)
{
}
-MediaStreamCenter::~MediaStreamCenter()
+void BatteryClientImpl::updateBatteryStatus(const WebBatteryStatus& batteryStatus)
{
+ if (m_controller) {
+ RefPtr<WebCore::BatteryStatus> status = WebCore::BatteryStatus::create(batteryStatus.charging, batteryStatus.chargingTime, batteryStatus.dischargingTime, batteryStatus.level);
+ m_controller->updateBatteryStatus(status);
+ }
}
-void MediaStreamCenter::queryMediaStreamSources(PassRefPtr<MediaStreamSourcesQueryClient> client)
+void BatteryClientImpl::setController(WebCore::BatteryController* controller)
{
- m_private->queryMediaStreamSources(client);
+ m_controller = controller;
}
-void MediaStreamCenter::didSetMediaStreamTrackEnabled(MediaStreamDescriptor* stream, MediaStreamComponent* component)
+void BatteryClientImpl::startUpdating()
{
- m_private->didSetMediaStreamTrackEnabled(stream, component);
+ if (m_client)
+ m_client->startUpdating();
}
-void MediaStreamCenter::didStopLocalMediaStream(MediaStreamDescriptor* stream)
+void BatteryClientImpl::stopUpdating()
{
- m_private->didStopLocalMediaStream(stream);
+ if (m_client)
+ m_client->stopUpdating();
}
-void MediaStreamCenter::didConstructMediaStream(MediaStreamDescriptor* stream)
+void BatteryClientImpl::batteryControllerDestroyed()
{
- m_private->didConstructMediaStream(stream);
+ m_controller = 0;
}
-} // namespace WebCore
+} // namespace WebKit
-#endif // ENABLE(MEDIA_STREAM)
+#endif // ENABLE(BATTERY_STATUS)
diff --git a/Source/WebKit/chromium/src/WebStorageNamespaceImpl.h b/Source/WebKit/chromium/src/BatteryClientImpl.h
index 10406c127..a3b1fa5d8 100644
--- a/Source/WebKit/chromium/src/WebStorageNamespaceImpl.h
+++ b/Source/WebKit/chromium/src/BatteryClientImpl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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
@@ -28,26 +28,38 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebStorageNamespaceImpl_h
-#define WebStorageNamespaceImpl_h
+#ifndef BatteryClientImpl_h
+#define BatteryClientImpl_h
-#include "StorageNamespaceImpl.h"
-#include "WebStorageNamespace.h"
+#if ENABLE(BATTERY_STATUS)
+
+#include "BatteryClient.h"
+#include "WebBatteryStatus.h"
namespace WebKit {
-class WebStorageNamespaceImpl : public WebStorageNamespace {
+class WebBatteryStatusClient;
+
+class BatteryClientImpl : public WebCore::BatteryClient {
public:
- WebStorageNamespaceImpl(PassRefPtr<WebCore::StorageNamespace> storageNamespace);
- virtual ~WebStorageNamespaceImpl();
- virtual WebStorageArea* createStorageArea(const WebString& origin);
- virtual WebStorageNamespace* copy();
- virtual void close();
+ explicit BatteryClientImpl(WebBatteryStatusClient*);
+ virtual ~BatteryClientImpl() { }
+
+ void updateBatteryStatus(const WebBatteryStatus&);
+
+ // WebCore::BatteryClient methods:
+ virtual void setController(WebCore::BatteryController*) OVERRIDE;
+ virtual void startUpdating() OVERRIDE;
+ virtual void stopUpdating() OVERRIDE;
+ virtual void batteryControllerDestroyed() OVERRIDE;
private:
- RefPtr<WebCore::StorageNamespace> m_storageNamespace;
+ WebBatteryStatusClient* m_client;
+ WebCore::BatteryController* m_controller;
};
-} // namespace WebKit
+} // namespce WebKit
+
+#endif // ENABLE(BATTERY_STATUS)
-#endif // WebStorageNamespaceImpl_h
+#endif // BatteryClientImpl_h
diff --git a/Source/WebKit/chromium/src/BlobRegistryProxy.h b/Source/WebKit/chromium/src/BlobRegistryProxy.h
index 6f2ebb254..05c854f5b 100644
--- a/Source/WebKit/chromium/src/BlobRegistryProxy.h
+++ b/Source/WebKit/chromium/src/BlobRegistryProxy.h
@@ -47,7 +47,6 @@ public:
virtual void registerBlobURL(const KURL&, const KURL& srcURL);
virtual void unregisterBlobURL(const KURL&);
- virtual PassRefPtr<ResourceHandle> createResourceHandle(const ResourceRequest&, ResourceHandleClient*) { return 0; }
virtual bool loadResourceSynchronously(const ResourceRequest&, ResourceError&, ResourceResponse&, Vector<char>& data) { return false; }
private:
diff --git a/Source/WebKit/chromium/src/CCThreadImpl.cpp b/Source/WebKit/chromium/src/CCThreadImpl.cpp
index 1c9a447ac..ef7bb5cb3 100644
--- a/Source/WebKit/chromium/src/CCThreadImpl.cpp
+++ b/Source/WebKit/chromium/src/CCThreadImpl.cpp
@@ -103,7 +103,7 @@ ThreadIdentifier CCThreadImpl::threadID() const
CCThreadImpl::CCThreadImpl(WebThread* thread)
: m_thread(thread)
{
- if (thread == webKitPlatformSupport()->currentThread()) {
+ if (thread == WebKit::Platform::current()->currentThread()) {
m_threadID = currentThread();
return;
}
diff --git a/Source/WebKit/chromium/src/ChromeClientImpl.cpp b/Source/WebKit/chromium/src/ChromeClientImpl.cpp
index ad35382b9..fac80d993 100644
--- a/Source/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/Source/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -34,7 +34,7 @@
#include "AXObjectCache.h"
#include "AccessibilityObject.h"
-#if ENABLE(INPUT_COLOR)
+#if ENABLE(INPUT_TYPE_COLOR)
#include "ColorChooser.h"
#include "ColorChooserClient.h"
#include "ColorChooserProxy.h"
@@ -51,8 +51,8 @@
#include "FrameLoadRequest.h"
#include "FrameView.h"
#include "Geolocation.h"
-#include "GeolocationService.h"
#include "GraphicsLayer.h"
+#include "HTMLInputElement.h"
#include "HTMLNames.h"
#include "HitTestResult.h"
#include "Icon.h"
@@ -69,11 +69,12 @@
#include "SearchPopupMenuChromium.h"
#include "SecurityOrigin.h"
#include "Settings.h"
+#include "TextFieldDecorationElement.h"
#if USE(V8)
#include "V8Proxy.h"
#endif
#include "WebAccessibilityObject.h"
-#if ENABLE(INPUT_COLOR)
+#if ENABLE(INPUT_TYPE_COLOR)
#include "WebColorChooser.h"
#include "WebColorChooserClientImpl.h"
#endif
@@ -100,6 +101,7 @@
#include "WebWindowFeatures.h"
#include "WindowFeatures.h"
#include "WrappedResourceRequest.h"
+#include <public/Platform.h>
#include <wtf/text/StringBuilder.h>
#include <wtf/text/StringConcatenate.h>
#include <wtf/unicode/CharacterNames.h>
@@ -316,7 +318,7 @@ WebNavigationPolicy ChromeClientImpl::getNavigationPolicy()
policy = WebNavigationPolicyNewBackgroundTab;
return policy;
}
-
+
void ChromeClientImpl::show()
{
if (!m_webView->client())
@@ -640,14 +642,16 @@ void ChromeClientImpl::setToolTip(const String& tooltipText, TextDirection dir)
void ChromeClientImpl::dispatchViewportPropertiesDidChange(const ViewportArguments& arguments) const
{
#if ENABLE(VIEWPORT)
- if (!m_webView->isFixedLayoutModeEnabled() || !m_webView->client() || !m_webView->page())
+ if (!m_webView->settings()->viewportEnabled() || !m_webView->isFixedLayoutModeEnabled() || !m_webView->client() || !m_webView->page())
return;
+ bool useDefaultDeviceScaleFactor = false;
ViewportArguments args;
- if (arguments == args)
+ if (arguments == args) {
// Default viewport arguments passed in. This is a signal to reset the viewport.
args.width = ViewportArguments::ValueDesktopWidth;
- else
+ useDefaultDeviceScaleFactor = true;
+ } else
args = arguments;
FrameView* frameView = m_webView->mainFrameImpl()->frameView();
@@ -672,7 +676,10 @@ void ChromeClientImpl::dispatchViewportPropertiesDidChange(const ViewportArgumen
// FIXME: Investigate the impact this has on layout/rendering if any.
// This exposes the correct device scale to javascript and media queries.
- m_webView->setDeviceScaleFactor(computed.devicePixelRatio);
+ if (useDefaultDeviceScaleFactor && settings->defaultDeviceScaleFactor())
+ m_webView->setDeviceScaleFactor(settings->defaultDeviceScaleFactor());
+ else
+ m_webView->setDeviceScaleFactor(computed.devicePixelRatio);
m_webView->setPageScaleFactorLimits(computed.minimumScale, computed.maximumScale);
m_webView->setPageScaleFactorPreservingScrollOffset(computed.initialScale * computed.devicePixelRatio);
#endif
@@ -699,7 +706,7 @@ void ChromeClientImpl::reachedApplicationCacheOriginQuota(SecurityOrigin*, int64
ASSERT_NOT_REACHED();
}
-#if ENABLE(INPUT_COLOR)
+#if ENABLE(INPUT_TYPE_COLOR)
PassOwnPtr<ColorChooser> ChromeClientImpl::createColorChooser(ColorChooserClient* chooserClient, const Color& initialColor)
{
WebViewClient* client = m_webView->client();
@@ -772,6 +779,22 @@ void ChromeClientImpl::popupOpened(PopupContainer* popupContainer,
const IntRect& bounds,
bool handleExternally)
{
+ // For Autofill popups, if the popup will not be fully visible, we shouldn't
+ // show it at all. Among other things, this prevents users from being able
+ // to interact via the keyboard with an invisible popup.
+ if (popupContainer->popupType() == PopupContainer::Suggestion) {
+ FrameView* view = m_webView->page()->mainFrame()->view();
+ IntRect visibleRect = view->visibleContentRect(true /* include scrollbars */);
+ // |bounds| is in screen coordinates, so make sure to convert it to
+ // content coordinates prior to comparing to |visibleRect|.
+ IntRect screenRect = bounds;
+ screenRect.setLocation(view->screenToContents(bounds.location()));
+ if (!visibleRect.contains(screenRect)) {
+ m_webView->hideAutofillPopup();
+ return;
+ }
+ }
+
if (!m_webView->client())
return;
@@ -888,20 +911,6 @@ bool ChromeClientImpl::paintCustomOverhangArea(GraphicsContext* context, const I
return false;
}
-// FIXME: Remove ChromeClientImpl::requestGeolocationPermissionForFrame and ChromeClientImpl::cancelGeolocationPermissionRequestForFrame
-// once all ports have moved to client-based geolocation (see https://bugs.webkit.org/show_bug.cgi?id=40373 ).
-// For client-based geolocation, these methods are now implemented as WebGeolocationClient::requestPermission and WebGeolocationClient::cancelPermissionRequest.
-// (see https://bugs.webkit.org/show_bug.cgi?id=50061 ).
-void ChromeClientImpl::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
-{
- ASSERT_NOT_REACHED();
-}
-
-void ChromeClientImpl::cancelGeolocationPermissionRequestForFrame(Frame* frame, Geolocation* geolocation)
-{
- ASSERT_NOT_REACHED();
-}
-
#if USE(ACCELERATED_COMPOSITING)
void ChromeClientImpl::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer)
{
@@ -984,7 +993,7 @@ bool ChromeClientImpl::selectItemAlignmentFollowsMenuWritingDirection()
bool ChromeClientImpl::hasOpenedPopup() const
{
- return !!m_webView->selectPopup();
+ return m_webView->hasOpenedPopup();
}
PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(PopupMenuClient* client) const
@@ -1000,6 +1009,41 @@ PassRefPtr<SearchPopupMenu> ChromeClientImpl::createSearchPopupMenu(PopupMenuCli
return adoptRef(new SearchPopupMenuChromium(client));
}
+#if ENABLE(PAGE_POPUP)
+PagePopup* ChromeClientImpl::openPagePopup(PagePopupClient* client, const IntRect& originBoundsInRootView)
+{
+ return m_webView->openPagePopup(client, originBoundsInRootView);
+}
+
+void ChromeClientImpl::closePagePopup(PagePopup* popup)
+{
+ m_webView->closePagePopup(popup);
+}
+#endif
+
+bool ChromeClientImpl::willAddTextFieldDecorationsTo(HTMLInputElement* input)
+{
+ ASSERT(input);
+ const Vector<OwnPtr<TextFieldDecorator> >& decorators = m_webView->textFieldDecorators();
+ for (unsigned i = 0; i < decorators.size(); ++i) {
+ if (decorators[i]->willAddDecorationTo(input))
+ return true;
+ }
+ return false;
+}
+
+void ChromeClientImpl::addTextFieldDecorationsTo(HTMLInputElement* input)
+{
+ ASSERT(willAddTextFieldDecorationsTo(input));
+ const Vector<OwnPtr<TextFieldDecorator> >& decorators = m_webView->textFieldDecorators();
+ for (unsigned i = 0; i < decorators.size(); ++i) {
+ if (!decorators[i]->willAddDecorationTo(input))
+ continue;
+ RefPtr<TextFieldDecorationElement> decoration = TextFieldDecorationElement::create(input->document(), decorators[i].get());
+ decoration->decorate(input);
+ }
+}
+
bool ChromeClientImpl::shouldRunModalDialogDuringPageDismissal(const DialogType& dialogType, const String& dialogMessage, FrameLoader::PageDismissalType dismissalType) const
{
const char* kDialogs[] = {"alert", "confirm", "prompt", "showModalDialog"};
@@ -1010,7 +1054,7 @@ bool ChromeClientImpl::shouldRunModalDialogDuringPageDismissal(const DialogType&
int dismissal = static_cast<int>(dismissalType) - 1; // Exclude NoDismissal.
ASSERT(0 <= dismissal && dismissal < static_cast<int>(arraysize(kDismissals)));
- PlatformSupport::histogramEnumeration("Renderer.ModalDialogsDuringPageDismissal", dismissal * arraysize(kDialogs) + dialog, arraysize(kDialogs) * arraysize(kDismissals));
+ WebKit::Platform::current()->histogramEnumeration("Renderer.ModalDialogsDuringPageDismissal", dismissal * arraysize(kDialogs) + dialog, arraysize(kDialogs) * arraysize(kDismissals));
m_webView->mainFrame()->addMessageToConsole(WebConsoleMessage(WebConsoleMessage::LevelError, makeString("Blocked ", kDialogs[dialog], "('", dialogMessage, "') during ", kDismissals[dismissal], ".")));
diff --git a/Source/WebKit/chromium/src/ChromeClientImpl.h b/Source/WebKit/chromium/src/ChromeClientImpl.h
index c34945404..5894177e0 100644
--- a/Source/WebKit/chromium/src/ChromeClientImpl.h
+++ b/Source/WebKit/chromium/src/ChromeClientImpl.h
@@ -39,7 +39,7 @@
namespace WebCore {
class AccessibilityObject;
-#if ENABLE(INPUT_COLOR)
+#if ENABLE(INPUT_TYPE_COLOR)
class ColorChooser;
class ColorChooserClient;
#endif
@@ -137,9 +137,7 @@ public:
virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t totalSpaceNeeded);
virtual bool paintCustomOverhangArea(WebCore::GraphicsContext*, const WebCore::IntRect&, const WebCore::IntRect&, const WebCore::IntRect&);
- virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
- virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*);
-#if ENABLE(INPUT_COLOR)
+#if ENABLE(INPUT_TYPE_COLOR)
virtual PassOwnPtr<WebCore::ColorChooser> createColorChooser(WebCore::ColorChooserClient*, const WebCore::Color&) OVERRIDE;
#endif
virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>);
@@ -197,6 +195,12 @@ public:
virtual bool hasOpenedPopup() const OVERRIDE;
virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const;
virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const;
+#if ENABLE(PAGE_POPUP)
+ virtual WebCore::PagePopup* openPagePopup(WebCore::PagePopupClient*, const WebCore::IntRect&) OVERRIDE;
+ virtual void closePagePopup(WebCore::PagePopup*) OVERRIDE;
+#endif
+ virtual bool willAddTextFieldDecorationsTo(WebCore::HTMLInputElement*) OVERRIDE;
+ virtual void addTextFieldDecorationsTo(WebCore::HTMLInputElement*) OVERRIDE;
virtual bool shouldRunModalDialogDuringPageDismissal(const DialogType&, const String& dialogMessage, WebCore::FrameLoader::PageDismissalType) const;
diff --git a/Source/WebKit/chromium/src/ChromiumCurrentTime.cpp b/Source/WebKit/chromium/src/ChromiumCurrentTime.cpp
index e591112da..25090fdd0 100644
--- a/Source/WebKit/chromium/src/ChromiumCurrentTime.cpp
+++ b/Source/WebKit/chromium/src/ChromiumCurrentTime.cpp
@@ -38,12 +38,12 @@ namespace WTF {
double currentTime()
{
- return WebKit::webKitPlatformSupport()->currentTime();
+ return WebKit::Platform::current()->currentTime();
}
double monotonicallyIncreasingTime()
{
- return WebKit::webKitPlatformSupport()->monotonicallyIncreasingTime();
+ return WebKit::Platform::current()->monotonicallyIncreasingTime();
}
} // namespace WTF
diff --git a/Source/WebKit/chromium/src/ChromiumOSRandomSource.cpp b/Source/WebKit/chromium/src/ChromiumOSRandomSource.cpp
index 182f5e76e..9a31f4ae4 100644
--- a/Source/WebKit/chromium/src/ChromiumOSRandomSource.cpp
+++ b/Source/WebKit/chromium/src/ChromiumOSRandomSource.cpp
@@ -32,13 +32,14 @@
#include <wtf/OSRandomSource.h>
#include "WebKit.h"
-#include "platform/WebKitPlatformSupport.h"
+
+#include <public/Platform.h>
namespace WTF {
void cryptographicallyRandomValuesFromOS(unsigned char* buffer, size_t length)
{
- WebKit::webKitPlatformSupport()->cryptographicallyRandomValues(buffer, length);
+ WebKit::Platform::current()->cryptographicallyRandomValues(buffer, length);
}
}
diff --git a/Source/WebKit/chromium/src/ChromiumThreading.cpp b/Source/WebKit/chromium/src/ChromiumThreading.cpp
index e68d8d497..bc677f3c9 100644
--- a/Source/WebKit/chromium/src/ChromiumThreading.cpp
+++ b/Source/WebKit/chromium/src/ChromiumThreading.cpp
@@ -40,7 +40,7 @@ namespace WTF {
void ChromiumThreading::callOnMainThread(void (*func)(void*), void* context)
{
- WebKit::webKitPlatformSupport()->callOnMainThread(func, context);
+ WebKit::Platform::current()->callOnMainThread(func, context);
}
} // namespace WTF
diff --git a/Source/WebKit/chromium/src/ColorChooserProxy.cpp b/Source/WebKit/chromium/src/ColorChooserProxy.cpp
index dae1b127d..6cf72d524 100644
--- a/Source/WebKit/chromium/src/ColorChooserProxy.cpp
+++ b/Source/WebKit/chromium/src/ColorChooserProxy.cpp
@@ -30,7 +30,7 @@
#include "WebColorChooser.h"
#include "platform/WebColor.h"
-#if ENABLE(INPUT_COLOR)
+#if ENABLE(INPUT_TYPE_COLOR)
namespace WebKit {
@@ -59,4 +59,4 @@ void ColorChooserProxy::endChooser()
}
-#endif // ENABLE(INPUT_COLOR)
+#endif // ENABLE(INPUT_TYPE_COLOR)
diff --git a/Source/WebKit/chromium/src/ColorChooserProxy.h b/Source/WebKit/chromium/src/ColorChooserProxy.h
index 56a9980f2..987f67b3c 100644
--- a/Source/WebKit/chromium/src/ColorChooserProxy.h
+++ b/Source/WebKit/chromium/src/ColorChooserProxy.h
@@ -31,7 +31,7 @@
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
-#if ENABLE(INPUT_COLOR)
+#if ENABLE(INPUT_TYPE_COLOR)
namespace WebKit {
@@ -49,6 +49,6 @@ private:
} // namespace WebKit
-#endif // ENABLE(INPUT_COLOR)
+#endif // ENABLE(INPUT_TYPE_COLOR)
#endif // ColorChooserProxy_h
diff --git a/Source/WebKit/chromium/src/CompositionUnderlineBuilder.h b/Source/WebKit/chromium/src/CompositionUnderlineBuilder.h
index 3a3a95edf..73e07cb55 100644
--- a/Source/WebKit/chromium/src/CompositionUnderlineBuilder.h
+++ b/Source/WebKit/chromium/src/CompositionUnderlineBuilder.h
@@ -32,7 +32,7 @@
#define CompositionUnderlineBuilder_h
#include "Editor.h"
-#include "Vector.h"
+#include <wtf/Vector.h>
#include "WebCompositionUnderline.h"
#include "platform/WebVector.h"
diff --git a/Source/WebKit/chromium/src/CompositionUnderlineVectorBuilder.h b/Source/WebKit/chromium/src/CompositionUnderlineVectorBuilder.h
index 4f0ae43cb..b12b92cc6 100644
--- a/Source/WebKit/chromium/src/CompositionUnderlineVectorBuilder.h
+++ b/Source/WebKit/chromium/src/CompositionUnderlineVectorBuilder.h
@@ -32,7 +32,7 @@
#define CompositionUnderlineVectorBuilder_h
#include "Editor.h"
-#include "Vector.h"
+#include <wtf/Vector.h>
#include "WebCompositionUnderline.h"
#include "platform/WebVector.h"
diff --git a/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp b/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
index 4712eff7d..4491ea1ca 100644
--- a/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
+++ b/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
@@ -37,6 +37,7 @@
#include "ContextMenuController.h"
#include "Document.h"
#include "DocumentLoader.h"
+#include "DocumentMarkerController.h"
#include "Editor.h"
#include "EventHandler.h"
#include "FrameLoader.h"
@@ -54,6 +55,7 @@
#include "Page.h"
#include "PlatformString.h"
#include "RenderWidget.h"
+#include "Settings.h"
#include "TextBreakIterator.h"
#include "Widget.h"
@@ -272,7 +274,25 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
static_cast<HTMLInputElement*>(r.innerNonSharedNode())->isSpeechEnabled();
}
#endif
- if (m_webView->focusedWebCoreFrame()->editor()->isContinuousSpellCheckingEnabled()) {
+ // When Chrome enables asynchronous spellchecking, its spellchecker adds spelling markers to misspelled
+ // words and attaches suggestions to these markers in the background. Therefore, when a user right-clicks
+ // a mouse on a word, Chrome just needs to find a spelling marker on the word instread of spellchecking it.
+ if (selectedFrame->settings() && selectedFrame->settings()->asynchronousSpellCheckingEnabled()) {
+ RefPtr<Range> range = selectedFrame->selection()->toNormalizedRange();
+ Vector<DocumentMarker*> markers = selectedFrame->document()->markers()->markersInRange(range.get(), DocumentMarker::Spelling);
+ if (!markers.isEmpty()) {
+ Vector<String> suggestions;
+ for (size_t i = 0; i < markers.size(); ++i) {
+ if (!markers[i]->description().isEmpty()) {
+ Vector<String> descriptions;
+ markers[i]->description().split('\n', descriptions);
+ suggestions.append(descriptions);
+ }
+ }
+ data.dictionarySuggestions = suggestions;
+ data.misspelledWord = selectMisspelledWord(defaultMenu, selectedFrame);
+ }
+ } else if (m_webView->focusedWebCoreFrame()->editor()->isContinuousSpellCheckingEnabled()) {
data.isSpellCheckingEnabled = true;
// Spellchecking might be enabled for the field, but could be disabled on the node.
if (m_webView->focusedWebCoreFrame()->editor()->isSpellCheckingEnabledInFocusedNode()) {
diff --git a/Source/WebKit/chromium/src/DatabaseObserver.cpp b/Source/WebKit/chromium/src/DatabaseObserver.cpp
index 2196c9b44..322e800ec 100644
--- a/Source/WebKit/chromium/src/DatabaseObserver.cpp
+++ b/Source/WebKit/chromium/src/DatabaseObserver.cpp
@@ -92,7 +92,8 @@ public:
private:
AllowDatabaseMainThreadBridge(WebCore::WorkerLoaderProxy* workerLoaderProxy, const String& mode, WebCommonWorkerClient* commonClient, WebFrame* frame, const String& name, const String& displayName, unsigned long estimatedSize)
- : m_workerLoaderProxy(workerLoaderProxy)
+ : m_result(false)
+ , m_workerLoaderProxy(workerLoaderProxy)
{
WebWorkerBase::dispatchTaskToMainThread(
createCallbackTask(&allowDatabaseTask, mode, WebCore::AllowCrossThreadAccess(commonClient),
diff --git a/Source/WebKit/chromium/src/Extensions3DChromium.cpp b/Source/WebKit/chromium/src/Extensions3DChromium.cpp
index 73397bd2b..84ad0f78a 100644
--- a/Source/WebKit/chromium/src/Extensions3DChromium.cpp
+++ b/Source/WebKit/chromium/src/Extensions3DChromium.cpp
@@ -107,6 +107,16 @@ void Extensions3DChromium::setVisibilityCHROMIUM(bool visibility)
m_private->setVisibilityCHROMIUM(visibility);
}
+void Extensions3DChromium::discardFramebufferEXT(GC3Denum target, GC3Dsizei numAttachments, const GC3Denum* attachments)
+{
+ m_private->discardFramebufferEXT(target, numAttachments, attachments);
+}
+
+void Extensions3DChromium::ensureFramebufferCHROMIUM()
+{
+ m_private->ensureFramebufferCHROMIUM();
+}
+
void Extensions3DChromium::setGpuMemoryAllocationChangedCallbackCHROMIUM(PassOwnPtr<GpuMemoryAllocationChangedCallbackCHROMIUM> callback)
{
m_private->setGpuMemoryAllocationChangedCallbackCHROMIUM(callback);
@@ -160,6 +170,41 @@ void Extensions3DChromium::texStorage2DEXT(unsigned int target, int levels, unsi
m_private->texStorage2DEXT(target, levels, internalFormat, width, height);
}
+Platform3DObject Extensions3DChromium::createQueryEXT()
+{
+ return m_private->createQueryEXT();
+}
+
+void Extensions3DChromium::deleteQueryEXT(Platform3DObject query)
+{
+ m_private->deleteQueryEXT(query);
+}
+
+GC3Dboolean Extensions3DChromium::isQueryEXT(Platform3DObject query)
+{
+ return m_private->isQueryEXT(query);
+}
+
+void Extensions3DChromium::beginQueryEXT(GC3Denum target, Platform3DObject query)
+{
+ m_private->beginQueryEXT(target, query);
+}
+
+void Extensions3DChromium::endQueryEXT(GC3Denum target)
+{
+ m_private->endQueryEXT(target);
+}
+
+void Extensions3DChromium::getQueryivEXT(GC3Denum target, GC3Denum pname, GC3Dint* params)
+{
+ m_private->getQueryivEXT(target, pname, params);
+}
+
+void Extensions3DChromium::getQueryObjectuivEXT(Platform3DObject query, GC3Denum pname, GC3Duint* params)
+{
+ m_private->getQueryObjectuivEXT(query, pname, params);
+}
+
} // namespace WebCore
#endif // ENABLE(WEBGL)
diff --git a/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index 2dada5c50..abe1e98b4 100644
--- a/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
* Copyright (C) 2011 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -37,19 +37,19 @@
#include "Document.h"
#include "DocumentLoader.h"
#include "FormState.h"
-#include "FrameLoader.h"
#include "FrameLoadRequest.h"
+#include "FrameLoader.h"
#include "FrameNetworkingContextImpl.h"
#include "FrameView.h"
-#include "HTTPParsers.h"
-#include "HistoryItem.h"
-#include "HitTestResult.h"
#include "HTMLAppletElement.h"
#include "HTMLFormElement.h" // needed by FormState.h
#include "HTMLNames.h"
+#include "HTTPParsers.h"
+#include "HistoryItem.h"
+#include "HitTestResult.h"
#include "IntentRequest.h"
-#include "MessageEvent.h"
#include "MIMETypeRegistry.h"
+#include "MessageEvent.h"
#include "MouseEvent.h"
#include "Page.h"
#include "PlatformString.h"
@@ -59,7 +59,7 @@
#include "ResourceHandleInternal.h"
#include "ResourceLoader.h"
#include "Settings.h"
-#include "StringExtras.h"
+#include "SocketStreamHandleInternal.h"
#include "WebDOMEvent.h"
#include "WebDataSourceImpl.h"
#include "WebDevToolsAgentPrivate.h"
@@ -69,8 +69,6 @@
#include "WebFrameImpl.h"
#include "WebIntentRequest.h"
#include "WebKit.h"
-#include "platform/WebKitPlatformSupport.h"
-#include <public/WebMimeRegistry.h>
#include "WebNode.h"
#include "WebPermissionClient.h"
#include "WebPlugin.h"
@@ -78,14 +76,19 @@
#include "WebPluginLoadObserver.h"
#include "WebPluginParams.h"
#include "WebSecurityOrigin.h"
-#include "platform/WebURL.h"
-#include "platform/WebURLError.h"
-#include "platform/WebVector.h"
+#include "platform/WebSocketStreamHandle.h"
#include "WebViewClient.h"
#include "WebViewImpl.h"
#include "WindowFeatures.h"
#include "WrappedResourceRequest.h"
#include "WrappedResourceResponse.h"
+#include "platform/WebKitPlatformSupport.h"
+#include "platform/WebURL.h"
+#include "platform/WebURLError.h"
+#include "platform/WebVector.h"
+#include <public/WebMimeRegistry.h>
+
+#include <wtf/StringExtras.h>
#include <wtf/text/CString.h>
#if USE(V8)
@@ -107,7 +110,6 @@ enum {
FrameLoaderClientImpl::FrameLoaderClientImpl(WebFrameImpl* frame)
: m_webFrame(frame)
- , m_hasRepresentation(false)
, m_sentInitialResponseToPlugin(false)
, m_nextNavigationPolicy(WebNavigationPolicyIgnore)
{
@@ -132,10 +134,6 @@ void FrameLoaderClientImpl::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*
{
if (m_webFrame->client())
m_webFrame->client()->didClearWindowObject(m_webFrame);
-
- WebViewImpl* webview = m_webFrame->viewImpl();
- if (webview->devToolsAgentPrivate())
- webview->devToolsAgentPrivate()->didClearWindowObject(m_webFrame);
}
void FrameLoaderClientImpl::documentElementAvailable()
@@ -147,6 +145,9 @@ void FrameLoaderClientImpl::documentElementAvailable()
#if USE(V8)
void FrameLoaderClientImpl::didCreateScriptContext(v8::Handle<v8::Context> context, int extensionGroup, int worldId)
{
+ WebViewImpl* webview = m_webFrame->viewImpl();
+ if (webview->devToolsAgentPrivate())
+ webview->devToolsAgentPrivate()->didCreateScriptContext(m_webFrame, worldId);
if (m_webFrame->client())
m_webFrame->client()->didCreateScriptContext(m_webFrame, context, extensionGroup, worldId);
}
@@ -270,11 +271,6 @@ void FrameLoaderClientImpl::makeDocumentView()
m_webFrame->createFrameView();
}
-void FrameLoaderClientImpl::makeRepresentation(DocumentLoader*)
-{
- m_hasRepresentation = true;
-}
-
void FrameLoaderClientImpl::forceLayout()
{
// FIXME
@@ -1033,10 +1029,10 @@ void FrameLoaderClientImpl::dispatchUnableToImplementPolicy(const ResourceError&
m_webFrame->client()->unableToImplementPolicyWithError(m_webFrame, error);
}
-void FrameLoaderClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form)
+void FrameLoaderClientImpl::dispatchWillSendSubmitEvent(PassRefPtr<FormState> prpFormState)
{
if (m_webFrame->client())
- m_webFrame->client()->willSendSubmitEvent(m_webFrame, WebFormElement(form));
+ m_webFrame->client()->willSendSubmitEvent(m_webFrame, WebFormElement(prpFormState->form()));
}
void FrameLoaderClientImpl::dispatchWillSubmitForm(FramePolicyFunction function,
@@ -1047,16 +1043,6 @@ void FrameLoaderClientImpl::dispatchWillSubmitForm(FramePolicyFunction function,
(m_webFrame->frame()->loader()->policyChecker()->*function)(PolicyUse);
}
-void FrameLoaderClientImpl::dispatchDidLoadMainResource(DocumentLoader*)
-{
- // FIXME
-}
-
-void FrameLoaderClientImpl::revertToProvisionalState(DocumentLoader*)
-{
- m_hasRepresentation = true;
-}
-
void FrameLoaderClientImpl::setMainDocumentError(DocumentLoader*,
const ResourceError& error)
{
@@ -1153,18 +1139,12 @@ void FrameLoaderClientImpl::committedLoad(DocumentLoader* loader, const char* da
}
}
-void FrameLoaderClientImpl::finishedLoading(DocumentLoader* dl)
+void FrameLoaderClientImpl::finishedLoading(DocumentLoader*)
{
if (m_pluginWidget) {
m_pluginWidget->didFinishLoading();
m_pluginWidget = 0;
m_sentInitialResponseToPlugin = false;
- } else {
- // This is necessary to create an empty document. See bug 634004.
- // However, we only want to do this if makeRepresentation has been called, to
- // match the behavior on the Mac.
- if (m_hasRepresentation)
- dl->writer()->setEncoding("", false);
}
}
@@ -1308,7 +1288,7 @@ bool FrameLoaderClientImpl::canShowMIMEType(const String& mimeType) const
// mimeType strings are supposed to be ASCII, but if they are not for some
// reason, then it just means that the mime type will fail all of these "is
// supported" checks and go down the path of an unhandled mime type.
- if (webKitPlatformSupport()->mimeRegistry()->supportsMIMEType(mimeType) == WebMimeRegistry::IsSupported)
+ if (WebKit::Platform::current()->mimeRegistry()->supportsMIMEType(mimeType) == WebMimeRegistry::IsSupported)
return true;
// If Chrome is started with the --disable-plugins switch, pluginData is null.
@@ -1396,7 +1376,7 @@ void FrameLoaderClientImpl::setTitle(const StringWithDirection& title, const KUR
String FrameLoaderClientImpl::userAgent(const KURL& url)
{
- return webKitPlatformSupport()->userAgent(url);
+ return WebKit::Platform::current()->userAgent(url);
}
void FrameLoaderClientImpl::savePlatformDataToCachedFrame(CachedFrame*)
@@ -1459,33 +1439,6 @@ PassRefPtr<Frame> FrameLoaderClientImpl::createFrame(
return m_webFrame->createChildFrame(frameRequest, ownerElement);
}
-void FrameLoaderClientImpl::didTransferChildFrameToNewDocument(Page*)
-{
- ASSERT(m_webFrame->frame()->ownerElement());
-
- WebFrameImpl* newParent = static_cast<WebFrameImpl*>(m_webFrame->parent());
- if (!newParent || !newParent->client())
- return;
-
- // Replace the client since the old client may be destroyed when the
- // previous page is closed.
- m_webFrame->setClient(newParent->client());
-}
-
-void FrameLoaderClientImpl::transferLoadingResourceFromPage(ResourceLoader* loader, const ResourceRequest& request, Page* oldPage)
-{
- assignIdentifierToInitialRequest(loader->identifier(), loader->documentLoader(), request);
-
- WebFrameImpl* oldWebFrame = WebFrameImpl::fromFrame(oldPage->mainFrame());
- if (oldWebFrame && oldWebFrame->client())
- oldWebFrame->client()->removeIdentifierForRequest(loader->identifier());
-
- ResourceHandle* handle = loader->handle();
- WebURLLoader* webURLLoader = ResourceHandleInternal::FromResourceHandle(handle)->loader();
- if (webURLLoader && m_webFrame->client())
- m_webFrame->client()->didAdoptURLLoader(webURLLoader);
-}
-
PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin(
const IntSize& size, // FIXME: how do we use this?
HTMLPlugInElement* element,
@@ -1649,4 +1602,9 @@ void FrameLoaderClientImpl::dispatchIntent(PassRefPtr<WebCore::IntentRequest> in
}
#endif
+void FrameLoaderClientImpl::dispatchWillOpenSocketStream(SocketStreamHandle* handle)
+{
+ m_webFrame->client()->willOpenSocketStream(SocketStreamHandleInternal::toWebSocketStreamHandle(handle));
+}
+
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/FrameLoaderClientImpl.h b/Source/WebKit/chromium/src/FrameLoaderClientImpl.h
index 53d5997e8..df7e0f123 100644
--- a/Source/WebKit/chromium/src/FrameLoaderClientImpl.h
+++ b/Source/WebKit/chromium/src/FrameLoaderClientImpl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
* Copyright (C) 2011 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -72,7 +72,7 @@ public:
virtual bool hasWebView() const;
virtual bool hasFrameView() const;
- virtual void makeRepresentation(WebCore::DocumentLoader*);
+ virtual void makeRepresentation(WebCore::DocumentLoader*) { }
virtual void forceLayout();
virtual void forceLayoutForNonHTML();
virtual void setCopiesOnScroll();
@@ -116,10 +116,9 @@ public:
virtual void dispatchDecidePolicyForNavigationAction(WebCore::FramePolicyFunction function, const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, PassRefPtr<WebCore::FormState> form_state);
virtual void cancelPolicyCheck();
virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&);
- virtual void dispatchWillSendSubmitEvent(WebCore::HTMLFormElement*);
+ virtual void dispatchWillSendSubmitEvent(PassRefPtr<WebCore::FormState>);
virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction, PassRefPtr<WebCore::FormState>);
- virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*);
- virtual void revertToProvisionalState(WebCore::DocumentLoader*);
+ virtual void revertToProvisionalState(WebCore::DocumentLoader*) { }
virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&);
virtual void willChangeEstimatedProgress() { }
virtual void didChangeEstimatedProgress() { }
@@ -177,8 +176,6 @@ public:
WebCore::HTMLFrameOwnerElement* ownerElement,
const WTF::String& referrer, bool allowsScrolling,
int marginWidth, int marginHeight);
- virtual void didTransferChildFrameToNewDocument(WebCore::Page*);
- virtual void transferLoadingResourceFromPage(WebCore::ResourceLoader*, const WebCore::ResourceRequest&, WebCore::Page*);
virtual PassRefPtr<WebCore::Widget> createPlugin(
const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&,
const Vector<WTF::String>&, const Vector<WTF::String>&,
@@ -212,6 +209,8 @@ public:
virtual void dispatchIntent(PassRefPtr<WebCore::IntentRequest>) OVERRIDE;
#endif
+ virtual void dispatchWillOpenSocketStream(WebCore::SocketStreamHandle*) OVERRIDE;
+
private:
void makeDocumentView();
@@ -226,11 +225,6 @@ private:
// the web frame object is guaranteed to exist.
WebFrameImpl* m_webFrame;
- // True if makeRepresentation was called. We don't actually have a concept
- // of a "representation", but we need to know when we're expected to have one.
- // See finishedLoading().
- bool m_hasRepresentation;
-
// Used to help track client redirects. When a provisional load starts, it
// has no redirects in its chain. But in the case of client redirects, we want
// to add that initial load as a redirect. When we get a new provisional load
diff --git a/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp b/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp
index 4bfa2e5bc..60919a20c 100644
--- a/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp
+++ b/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp
@@ -174,13 +174,13 @@ public:
{
}
- virtual void onGpuMemoryAllocationChanged(size_t gpuResourceSizeInBytes)
+ virtual void onGpuMemoryAllocationChanged(Extensions3DChromium::GpuMemoryAllocationCHROMIUM allocation)
{
GrContext* context = m_context->grContext();
if (!context)
return;
- if (!gpuResourceSizeInBytes) {
+ if (!allocation.gpuResourceSizeInBytes) {
context->freeGpuResources();
context->setTextureCacheLimits(0, 0);
} else
@@ -318,7 +318,7 @@ PassRefPtr<ImageData> GraphicsContext3DPrivate::paintRenderingResultsToImageData
getDrawingParameters(drawingBuffer, m_impl.get(), &framebufferId, &width, &height);
RefPtr<ImageData> imageData = ImageData::create(IntSize(width, height));
- unsigned char* pixels = imageData->data()->data()->data();
+ unsigned char* pixels = imageData->data()->data();
size_t bufferSize = 4 * width * height;
m_impl->readBackFramebuffer(pixels, bufferSize, framebufferId, width, height);
@@ -612,6 +612,8 @@ String GraphicsContext3DPrivate::getShaderInfoLog(Platform3DObject shader)
return m_impl->getShaderInfoLog(shader);
}
+DELEGATE_TO_IMPL_4(getShaderPrecisionFormat, GC3Denum, GC3Denum, GC3Dint*, GC3Dint*)
+
String GraphicsContext3DPrivate::getShaderSource(Platform3DObject shader)
{
return m_impl->getShaderSource(shader);
@@ -879,6 +881,9 @@ DELEGATE_TO_IMPL_1(unmapTexSubImage2DCHROMIUM, const void*)
DELEGATE_TO_IMPL_1(setVisibilityCHROMIUM, bool);
+DELEGATE_TO_IMPL_3(discardFramebufferEXT, GC3Denum, GC3Dsizei, const GC3Denum*);
+DELEGATE_TO_IMPL(ensureFramebufferCHROMIUM);
+
DELEGATE_TO_IMPL_10(blitFramebufferCHROMIUM, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dbitfield, GC3Denum)
DELEGATE_TO_IMPL_5(renderbufferStorageMultisampleCHROMIUM, GC3Denum, GC3Dsizei, GC3Denum, GC3Dsizei, GC3Dsizei)
@@ -889,6 +894,14 @@ DELEGATE_TO_IMPL_1R(getTranslatedShaderSourceANGLE, Platform3DObject, String)
DELEGATE_TO_IMPL_5(texImageIOSurface2DCHROMIUM, GC3Denum, GC3Dint, GC3Dint, GC3Duint, GC3Duint)
DELEGATE_TO_IMPL_5(texStorage2DEXT, GC3Denum, GC3Dint, GC3Duint, GC3Dint, GC3Dint)
+DELEGATE_TO_IMPL_R(createQueryEXT, Platform3DObject)
+DELEGATE_TO_IMPL_1(deleteQueryEXT, Platform3DObject)
+DELEGATE_TO_IMPL_1R(isQueryEXT, Platform3DObject, GC3Dboolean)
+DELEGATE_TO_IMPL_2(beginQueryEXT, GC3Denum, Platform3DObject)
+DELEGATE_TO_IMPL_1(endQueryEXT, GC3Denum)
+DELEGATE_TO_IMPL_3(getQueryivEXT, GC3Denum, GC3Denum, GC3Dint*)
+DELEGATE_TO_IMPL_3(getQueryObjectuivEXT, Platform3DObject, GC3Denum, GC3Duint*)
+
//----------------------------------------------------------------------
// GraphicsContext3D
//
@@ -1026,7 +1039,6 @@ PassRefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attri
webAttributes.stencil = attrs.stencil;
webAttributes.antialias = attrs.antialias;
webAttributes.premultipliedAlpha = attrs.premultipliedAlpha;
- webAttributes.canRecoverFromContextLoss = attrs.canRecoverFromContextLoss;
webAttributes.noExtensions = attrs.noExtensions;
webAttributes.shareResources = attrs.shareResources;
webAttributes.preferDiscreteGPU = attrs.preferDiscreteGPU;
@@ -1145,6 +1157,7 @@ DELEGATE_TO_INTERNAL_1R(getProgramInfoLog, Platform3DObject, String)
DELEGATE_TO_INTERNAL_3(getRenderbufferParameteriv, GC3Denum, GC3Denum, GC3Dint*)
DELEGATE_TO_INTERNAL_3(getShaderiv, Platform3DObject, GC3Denum, GC3Dint*)
DELEGATE_TO_INTERNAL_1R(getShaderInfoLog, Platform3DObject, String)
+DELEGATE_TO_INTERNAL_4(getShaderPrecisionFormat, GC3Denum, GC3Denum, GC3Dint*, GC3Dint*)
DELEGATE_TO_INTERNAL_1R(getShaderSource, Platform3DObject, String)
DELEGATE_TO_INTERNAL_1R(getString, GC3Denum, String)
DELEGATE_TO_INTERNAL_3(getTexParameterfv, GC3Denum, GC3Denum, GC3Dfloat*)
@@ -1361,8 +1374,14 @@ public:
virtual void onMemoryAllocationChanged(size_t gpuResourceSizeInBytes)
{
+ // FIXME: Remove this once clients start using WebGraphicsMemoryAllocation exclusively.
+ onMemoryAllocationChanged(WebKit::WebGraphicsMemoryAllocation(gpuResourceSizeInBytes, true));
+ }
+
+ virtual void onMemoryAllocationChanged(WebKit::WebGraphicsMemoryAllocation allocation)
+ {
if (m_memoryAllocationChangedCallback)
- m_memoryAllocationChangedCallback->onGpuMemoryAllocationChanged(gpuResourceSizeInBytes);
+ m_memoryAllocationChangedCallback->onGpuMemoryAllocationChanged(Extensions3DChromium::GpuMemoryAllocationCHROMIUM(allocation.gpuResourceSizeInBytes, allocation.suggestHaveBackbuffer));
}
private:
diff --git a/Source/WebKit/chromium/src/GraphicsContext3DPrivate.h b/Source/WebKit/chromium/src/GraphicsContext3DPrivate.h
index be9db4287..b79898971 100644
--- a/Source/WebKit/chromium/src/GraphicsContext3DPrivate.h
+++ b/Source/WebKit/chromium/src/GraphicsContext3DPrivate.h
@@ -59,7 +59,7 @@ public:
// be used on any other thread.
static PassRefPtr<GraphicsContext3D> createGraphicsContextFromWebContext(PassOwnPtr<WebKit::WebGraphicsContext3D>, GraphicsContext3D::RenderStyle, bool preserveDrawingBuffer = false);
- ~GraphicsContext3DPrivate();
+ virtual ~GraphicsContext3DPrivate();
// Helper function to provide access to the lower-level WebGraphicsContext3D,
// which is needed for subordinate contexts like WebGL's to share resources
@@ -164,6 +164,7 @@ public:
void getRenderbufferParameteriv(GC3Denum target, GC3Denum pname, GC3Dint* value);
void getShaderiv(Platform3DObject, GC3Denum pname, GC3Dint* value);
String getShaderInfoLog(Platform3DObject);
+ void getShaderPrecisionFormat(GC3Denum shaderType, GC3Denum precisionType, GC3Dint* range, GC3Dint* precision);
String getShaderSource(Platform3DObject);
String getString(GC3Denum name);
@@ -282,6 +283,10 @@ public:
// GL_CHROMIUM_set_visibility
void setVisibilityCHROMIUM(bool);
+ // GL_EXT_discard_framebuffer
+ virtual void discardFramebufferEXT(GC3Denum target, GC3Dsizei numAttachments, const GC3Denum* attachments);
+ virtual void ensureFramebufferCHROMIUM();
+
// GL_CHROMIUM_gpu_memory_manager
void setGpuMemoryAllocationChangedCallbackCHROMIUM(PassOwnPtr<Extensions3DChromium::GpuMemoryAllocationChangedCallbackCHROMIUM>);
@@ -307,6 +312,15 @@ public:
// GL_EXT_texture_storage
void texStorage2DEXT(GC3Denum target, GC3Dint levels, GC3Duint internalformat, GC3Dint width, GC3Dint height);
+ // GL_EXT_occlusion_query
+ Platform3DObject createQueryEXT();
+ void deleteQueryEXT(Platform3DObject);
+ GC3Dboolean isQueryEXT(Platform3DObject);
+ void beginQueryEXT(GC3Denum, Platform3DObject);
+ void endQueryEXT(GC3Denum);
+ void getQueryivEXT(GC3Denum, GC3Denum, GC3Dint*);
+ void getQueryObjectuivEXT(Platform3DObject, GC3Denum, GC3Duint*);
+
private:
GraphicsContext3DPrivate(PassOwnPtr<WebKit::WebGraphicsContext3D>, bool preserveDrawingBuffer);
diff --git a/Source/WebKit/chromium/src/IDBCursorBackendProxy.cpp b/Source/WebKit/chromium/src/IDBCursorBackendProxy.cpp
index 428c37f5e..2a62b926f 100644
--- a/Source/WebKit/chromium/src/IDBCursorBackendProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBCursorBackendProxy.cpp
@@ -79,6 +79,11 @@ void IDBCursorBackendProxy::update(PassRefPtr<SerializedScriptValue> value, Pass
m_idbCursor->update(value, new WebIDBCallbacksImpl(callbacks), ec);
}
+void IDBCursorBackendProxy::advance(unsigned long count, PassRefPtr<IDBCallbacks> callbacks, ExceptionCode& ec)
+{
+ m_idbCursor->advance(count, new WebIDBCallbacksImpl(callbacks), ec);
+}
+
void IDBCursorBackendProxy::continueFunction(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, ExceptionCode& ec)
{
m_idbCursor->continueFunction(key, new WebIDBCallbacksImpl(callbacks), ec);
diff --git a/Source/WebKit/chromium/src/IDBCursorBackendProxy.h b/Source/WebKit/chromium/src/IDBCursorBackendProxy.h
index cfe6daf5d..24a3e42c4 100644
--- a/Source/WebKit/chromium/src/IDBCursorBackendProxy.h
+++ b/Source/WebKit/chromium/src/IDBCursorBackendProxy.h
@@ -47,6 +47,7 @@ public:
virtual PassRefPtr<WebCore::IDBKey> primaryKey() const;
virtual PassRefPtr<WebCore::SerializedScriptValue> value() const;
virtual void update(PassRefPtr<WebCore::SerializedScriptValue>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::ExceptionCode&);
+ virtual void advance(unsigned long, PassRefPtr<WebCore::IDBCallbacks>, WebCore::ExceptionCode&);
virtual void continueFunction(PassRefPtr<WebCore::IDBKey>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::ExceptionCode&);
virtual void deleteFunction(PassRefPtr<WebCore::IDBCallbacks>, WebCore::ExceptionCode&);
virtual void prefetchContinue(int numberToFetch, PassRefPtr<WebCore::IDBCallbacks>, WebCore::ExceptionCode&) { ASSERT_NOT_REACHED(); } // Only used in the backend.
diff --git a/Source/WebKit/chromium/src/IDBIndexBackendProxy.cpp b/Source/WebKit/chromium/src/IDBIndexBackendProxy.cpp
index bc2c836f8..0014f2959 100644
--- a/Source/WebKit/chromium/src/IDBIndexBackendProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBIndexBackendProxy.cpp
@@ -67,7 +67,7 @@ String IDBIndexBackendProxy::storeName()
String IDBIndexBackendProxy::keyPath()
{
- return m_webIDBIndex->keyPath();
+ return m_webIDBIndex->keyPath().string();
}
bool IDBIndexBackendProxy::unique()
@@ -104,20 +104,20 @@ void IDBIndexBackendProxy::openKeyCursor(PassRefPtr<IDBKeyRange> keyRange, unsig
m_webIDBIndex->openKeyCursor(keyRange, direction, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
-void IDBIndexBackendProxy::get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
+void IDBIndexBackendProxy::get(PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
// 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_webIDBIndex->getObject(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
+ m_webIDBIndex->getObject(keyRange, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
-void IDBIndexBackendProxy::getKey(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
+void IDBIndexBackendProxy::getKey(PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
// 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_webIDBIndex->getKey(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
+ m_webIDBIndex->getKey(keyRange, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/IDBIndexBackendProxy.h b/Source/WebKit/chromium/src/IDBIndexBackendProxy.h
index 4ce8c876b..42e0eabbe 100644
--- a/Source/WebKit/chromium/src/IDBIndexBackendProxy.h
+++ b/Source/WebKit/chromium/src/IDBIndexBackendProxy.h
@@ -50,8 +50,8 @@ public:
virtual void openCursor(PassRefPtr<WebCore::IDBKeyRange>, unsigned short direction, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void openKeyCursor(PassRefPtr<WebCore::IDBKeyRange>, unsigned short direction, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void count(PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
- virtual void get(PassRefPtr<WebCore::IDBKey>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
- virtual void getKey(PassRefPtr<WebCore::IDBKey>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
+ virtual void get(PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
+ virtual void getKey(PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
private:
IDBIndexBackendProxy(PassOwnPtr<WebIDBIndex>);
diff --git a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
index 485487ac0..21a5dd856 100755
--- a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
@@ -66,7 +66,7 @@ String IDBObjectStoreBackendProxy::name() const
String IDBObjectStoreBackendProxy::keyPath() const
{
- return m_webIDBObjectStore->keyPath();
+ return m_webIDBObjectStore->keyPath().string();
}
PassRefPtr<DOMStringList> IDBObjectStoreBackendProxy::indexNames() const
@@ -74,12 +74,12 @@ PassRefPtr<DOMStringList> IDBObjectStoreBackendProxy::indexNames() const
return m_webIDBObjectStore->indexNames();
}
-void IDBObjectStoreBackendProxy::get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
+void IDBObjectStoreBackendProxy::get(PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
// 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(), ec);
+ m_webIDBObjectStore->get(keyRange, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
void IDBObjectStoreBackendProxy::put(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
diff --git a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h
index c19a0f0a4..5e1189186 100644
--- a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h
+++ b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h
@@ -46,7 +46,7 @@ public:
virtual String keyPath() const;
virtual PassRefPtr<WebCore::DOMStringList> indexNames() const;
- virtual void get(PassRefPtr<WebCore::IDBKey>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
+ virtual void get(PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void put(PassRefPtr<WebCore::SerializedScriptValue>, PassRefPtr<WebCore::IDBKey>, PutMode, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void deleteFunction(PassRefPtr<WebCore::IDBKey>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void deleteFunction(PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
diff --git a/Source/WebKit/chromium/src/InspectorClientImpl.cpp b/Source/WebKit/chromium/src/InspectorClientImpl.cpp
index 317b57693..17bd16111 100644
--- a/Source/WebKit/chromium/src/InspectorClientImpl.cpp
+++ b/Source/WebKit/chromium/src/InspectorClientImpl.cpp
@@ -128,6 +128,28 @@ void InspectorClientImpl::clearBrowserCookies()
agent->clearBrowserCookies();
}
+bool InspectorClientImpl::canOverrideDeviceMetrics()
+{
+ return true;
+}
+
+void InspectorClientImpl::overrideDeviceMetrics(int width, int height, float fontScaleFactor, bool fitWindow)
+{
+ if (WebDevToolsAgentImpl* agent = devToolsAgent())
+ agent->overrideDeviceMetrics(width, height, fontScaleFactor, fitWindow);
+}
+
+void InspectorClientImpl::autoZoomPageToFitWidth()
+{
+ if (WebDevToolsAgentImpl* agent = devToolsAgent())
+ agent->autoZoomPageToFitWidth();
+}
+
+bool InspectorClientImpl::supportsFrameInstrumentation()
+{
+ return true;
+}
+
WebDevToolsAgentImpl* InspectorClientImpl::devToolsAgent()
{
return static_cast<WebDevToolsAgentImpl*>(m_inspectedWebView->devToolsAgent());
diff --git a/Source/WebKit/chromium/src/InspectorClientImpl.h b/Source/WebKit/chromium/src/InspectorClientImpl.h
index b16b6f468..bdb9b336d 100644
--- a/Source/WebKit/chromium/src/InspectorClientImpl.h
+++ b/Source/WebKit/chromium/src/InspectorClientImpl.h
@@ -63,6 +63,13 @@ public:
virtual void clearBrowserCache();
virtual bool canClearBrowserCookies();
virtual void clearBrowserCookies();
+
+ virtual bool canOverrideDeviceMetrics();
+ virtual void overrideDeviceMetrics(int, int, float, bool);
+ virtual void autoZoomPageToFitWidth();
+
+ virtual bool supportsFrameInstrumentation();
+
private:
WebDevToolsAgentImpl* devToolsAgent();
diff --git a/Source/WebKit/chromium/src/InspectorFrontendClientImpl.cpp b/Source/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
index ee2e89a42..af90bad6c 100644
--- a/Source/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
+++ b/Source/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
@@ -129,14 +129,19 @@ void InspectorFrontendClientImpl::openInNewTab(const String& url)
m_client->openInNewTab(url);
}
-bool InspectorFrontendClientImpl::canSaveAs()
+bool InspectorFrontendClientImpl::canSave()
{
return true;
}
-void InspectorFrontendClientImpl::saveAs(const String& fileName, const String& content)
+void InspectorFrontendClientImpl::save(const String& url, const String& content, bool forceSaveAs)
{
- m_client->saveAs(fileName, content);
+ m_client->save(url, content, forceSaveAs);
+}
+
+void InspectorFrontendClientImpl::append(const String& url, const String& content)
+{
+ m_client->append(url, content);
}
void InspectorFrontendClientImpl::inspectedURLChanged(const String& url)
diff --git a/Source/WebKit/chromium/src/InspectorFrontendClientImpl.h b/Source/WebKit/chromium/src/InspectorFrontendClientImpl.h
index 4f7a72b96..1aedc1f03 100644
--- a/Source/WebKit/chromium/src/InspectorFrontendClientImpl.h
+++ b/Source/WebKit/chromium/src/InspectorFrontendClientImpl.h
@@ -69,8 +69,9 @@ public:
virtual void openInNewTab(const String& url);
- virtual bool canSaveAs();
- virtual void saveAs(const WTF::String& fileName, const WTF::String& content);
+ virtual bool canSave();
+ virtual void save(const WTF::String& urk, const WTF::String& content, bool forceSaveAs);
+ virtual void append(const WTF::String& urk, const WTF::String& content);
virtual void inspectedURLChanged(const WTF::String&);
diff --git a/Source/WebKit/chromium/src/LocalFileSystemChromium.cpp b/Source/WebKit/chromium/src/LocalFileSystemChromium.cpp
index be263bea1..5f6d52750 100644
--- a/Source/WebKit/chromium/src/LocalFileSystemChromium.cpp
+++ b/Source/WebKit/chromium/src/LocalFileSystemChromium.cpp
@@ -33,12 +33,12 @@
#if ENABLE(FILE_SYSTEM)
-#include "AsyncFileSystem.h"
#include "CrossThreadTask.h"
#include "Document.h"
#include "ErrorCallback.h"
#include "FileSystemCallback.h"
#include "FileSystemCallbacks.h"
+#include "FileSystemType.h"
#include "PlatformString.h"
#include "WebFileError.h"
#include "platform/WebFileSystem.h"
@@ -108,7 +108,8 @@ public:
private:
AllowFileSystemMainThreadBridge(WebCore::WorkerLoaderProxy* workerLoaderProxy, const String& mode, WebCommonWorkerClient* commonClient)
- : m_workerLoaderProxy(workerLoaderProxy)
+ : m_result(false)
+ , m_workerLoaderProxy(workerLoaderProxy)
{
WebWorkerBase::dispatchTaskToMainThread(createCallbackTask(&allowFileSystemTask, mode, AllowCrossThreadAccess(commonClient), this));
}
@@ -152,7 +153,7 @@ bool allowFileSystemForWorker(WebCommonWorkerClient* commonClient)
return bridge->result();
}
-void openFileSystemForWorker(WebCommonWorkerClient* commonClient, WebFileSystem::Type type, long long size, bool create, WebFileSystemCallbacks* callbacks, bool synchronous)
+void openFileSystemForWorker(WebCommonWorkerClient* commonClient, WebFileSystem::Type type, long long size, bool create, WebFileSystemCallbacks* callbacks, FileSystemSynchronousType synchronousType)
{
WorkerScriptController* controller = WorkerScriptController::controllerForContext();
WorkerContext* workerContext = controller->workerContext();
@@ -167,7 +168,7 @@ void openFileSystemForWorker(WebCommonWorkerClient* commonClient, WebFileSystem:
RefPtr<WorkerFileSystemCallbacksBridge> bridge = WorkerFileSystemCallbacksBridge::create(workerLoaderProxy, workerContext, callbacks);
bridge->postOpenFileSystemToMainThread(commonClient, type, size, create, mode);
- if (synchronous) {
+ if (synchronousType == SynchronousFileSystem) {
if (runLoop.runInMode(workerContext, mode) == MessageQueueTerminated)
bridge->stop();
}
@@ -182,7 +183,7 @@ static void openFileSystemNotAllowed(ScriptExecutionContext*, PassOwnPtr<AsyncFi
callbacks->didFail(WebKit::WebFileErrorAbort);
}
-static void openFileSystemHelper(ScriptExecutionContext* context, AsyncFileSystem::Type type, PassOwnPtr<AsyncFileSystemCallbacks> callbacks, bool synchronous, long long size, CreationFlag create)
+static void openFileSystemHelper(ScriptExecutionContext* context, FileSystemType type, PassOwnPtr<AsyncFileSystemCallbacks> callbacks, FileSystemSynchronousType synchronousType, long long size, CreationFlag create)
{
bool allowed = true;
ASSERT(context);
@@ -202,7 +203,7 @@ static void openFileSystemHelper(ScriptExecutionContext* context, AsyncFileSyste
if (!allowFileSystemForWorker(webWorker->commonClient()))
allowed = false;
else
- openFileSystemForWorker(webWorker->commonClient(), static_cast<WebFileSystem::Type>(type), size, create == CreateIfNotPresent, new WebFileSystemCallbacksImpl(callbacks, type, context, synchronous), synchronous);
+ openFileSystemForWorker(webWorker->commonClient(), static_cast<WebFileSystem::Type>(type), size, create == CreateIfNotPresent, new WebFileSystemCallbacksImpl(callbacks, type, context, synchronousType), synchronousType);
#else
ASSERT_NOT_REACHED();
@@ -215,14 +216,14 @@ static void openFileSystemHelper(ScriptExecutionContext* context, AsyncFileSyste
}
}
-void LocalFileSystem::readFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, PassOwnPtr<AsyncFileSystemCallbacks> callbacks, bool synchronous)
+void LocalFileSystem::readFileSystem(ScriptExecutionContext* context, FileSystemType type, PassOwnPtr<AsyncFileSystemCallbacks> callbacks, FileSystemSynchronousType synchronousType)
{
- openFileSystemHelper(context, type, callbacks, synchronous, 0, OpenExisting);
+ openFileSystemHelper(context, type, callbacks, synchronousType, 0, OpenExisting);
}
-void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks, bool synchronous)
+void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, FileSystemType type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks, FileSystemSynchronousType synchronousType)
{
- openFileSystemHelper(context, type, callbacks, synchronous, size, CreateIfNotPresent);
+ openFileSystemHelper(context, type, callbacks, synchronousType, size, CreateIfNotPresent);
}
} // namespace WebCore
diff --git a/Source/WebKit/chromium/src/LocalizedStrings.cpp b/Source/WebKit/chromium/src/LocalizedStrings.cpp
index 917180b66..6af49515f 100644
--- a/Source/WebKit/chromium/src/LocalizedStrings.cpp
+++ b/Source/WebKit/chromium/src/LocalizedStrings.cpp
@@ -158,6 +158,12 @@ String AXDefinitionListDefinitionText()
return String("definition");
}
+String AXFooterRoleDescriptionText()
+{
+ notImplemented();
+ return String("footer");
+}
+
String AXButtonActionVerb()
{
return query(WebLocalizedString::AXButtonActionVerb);
@@ -200,8 +206,7 @@ String AXMenuListActionVerb()
String missingPluginText()
{
- notImplemented();
- return String("Missing Plug-in");
+ return query(WebLocalizedString::MissingPluginText);
}
String crashedPluginText()
@@ -391,4 +396,31 @@ String validationMessageStepMismatchText(const String& base, const String& step)
return query(WebLocalizedString::ValidationStepMismatch, base, step);
}
+#if ENABLE(CALENDAR_PICKER)
+String calendarTodayText()
+{
+ return query(WebLocalizedString::CalendarToday);
+}
+
+String calendarClearText()
+{
+ return query(WebLocalizedString::CalendarClear);
+}
+
+String dateFormatYearText()
+{
+ return query(WebLocalizedString::DateFormatYearLabel);
+}
+
+String dateFormatMonthText()
+{
+ return query(WebLocalizedString::DateFormatMonthLabel);
+}
+
+String dateFormatDayInMonthText()
+{
+ return query(WebLocalizedString::DateFormatDayInMonthLabel);
+}
+#endif
+
} // namespace WebCore
diff --git a/Source/WebKit/chromium/src/NonCompositedContentHost.cpp b/Source/WebKit/chromium/src/NonCompositedContentHost.cpp
index b6b1a2294..6d11d8a59 100644
--- a/Source/WebKit/chromium/src/NonCompositedContentHost.cpp
+++ b/Source/WebKit/chromium/src/NonCompositedContentHost.cpp
@@ -46,10 +46,10 @@ NonCompositedContentHost::NonCompositedContentHost(PassOwnPtr<WebCore::LayerPain
#endif
m_graphicsLayer->setDrawsContent(true);
m_graphicsLayer->platformLayer()->setIsNonCompositedContent(true);
-#if !ENABLE(RUBBER_BANDING)
- m_graphicsLayer->platformLayer()->setBackgroundCoversViewport(true);
-#endif
m_graphicsLayer->platformLayer()->setOpaque(true);
+#if !OS(ANDROID)
+ m_graphicsLayer->platformLayer()->setDrawCheckerboardForMissingTiles(true);
+#endif
}
NonCompositedContentHost::~NonCompositedContentHost()
@@ -58,10 +58,7 @@ NonCompositedContentHost::~NonCompositedContentHost()
void NonCompositedContentHost::setBackgroundColor(const WebCore::Color& color)
{
- if (color.isValid())
- m_graphicsLayer->platformLayer()->setBackgroundColor(color);
- else
- m_graphicsLayer->platformLayer()->setBackgroundColor(WebCore::Color::white);
+ m_graphicsLayer->platformLayer()->setBackgroundColor(color);
}
void NonCompositedContentHost::setScrollLayer(WebCore::GraphicsLayer* layer)
diff --git a/Source/WebKit/chromium/src/NotificationPresenterImpl.cpp b/Source/WebKit/chromium/src/NotificationPresenterImpl.cpp
index 99a7ea378..683e66faa 100644
--- a/Source/WebKit/chromium/src/NotificationPresenterImpl.cpp
+++ b/Source/WebKit/chromium/src/NotificationPresenterImpl.cpp
@@ -31,7 +31,7 @@
#include "config.h"
#include "NotificationPresenterImpl.h"
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#include "KURL.h"
#include "Notification.h"
@@ -111,4 +111,4 @@ void NotificationPresenterImpl::requestPermission(ScriptExecutionContext* contex
} // namespace WebKit
-#endif // ENABLE(NOTIFICATIONS)
+#endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
diff --git a/Source/WebKit/chromium/src/NotificationPresenterImpl.h b/Source/WebKit/chromium/src/NotificationPresenterImpl.h
index cad5b8801..d29699eca 100644
--- a/Source/WebKit/chromium/src/NotificationPresenterImpl.h
+++ b/Source/WebKit/chromium/src/NotificationPresenterImpl.h
@@ -37,7 +37,7 @@
#include <wtf/HashMap.h>
#include <wtf/PassRefPtr.h>
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
namespace WebKit {
@@ -56,7 +56,12 @@ public:
virtual void notificationObjectDestroyed(WebCore::Notification* object);
virtual void notificationControllerDestroyed();
virtual WebCore::NotificationClient::Permission checkPermission(WebCore::ScriptExecutionContext*);
- virtual void requestPermission(WebCore::ScriptExecutionContext* , WTF::PassRefPtr<WebCore::VoidCallback> callback);
+#if ENABLE(LEGACY_NOTIFICATIONS)
+ virtual void requestPermission(WebCore::ScriptExecutionContext*, WTF::PassRefPtr<WebCore::VoidCallback> callback);
+#endif
+#if ENABLE(NOTIFICATIONS)
+ virtual void requestPermission(WebCore::ScriptExecutionContext*, WTF::PassRefPtr<WebCore::NotificationPermissionCallback> callback) { }
+#endif
virtual void cancelRequestsForPermission(WebCore::ScriptExecutionContext*) {}
private:
@@ -66,6 +71,6 @@ private:
} // namespace WebKit
-#endif // ENABLE(NOTIFICATIONS)
+#endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#endif
diff --git a/Source/WebKit/chromium/src/PageWidgetDelegate.cpp b/Source/WebKit/chromium/src/PageWidgetDelegate.cpp
new file mode 100644
index 000000000..058bae024
--- /dev/null
+++ b/Source/WebKit/chromium/src/PageWidgetDelegate.cpp
@@ -0,0 +1,221 @@
+/*
+ * Copyright (C) 2012 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 "PageWidgetDelegate.h"
+
+#include "Frame.h"
+#include "FrameView.h"
+#include "PageOverlayList.h"
+#include "WebInputEvent.h"
+#include "WebInputEventConversion.h"
+#include "painting/GraphicsContextBuilder.h"
+#include <wtf/CurrentTime.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+static inline FrameView* mainFrameView(Page* page)
+{
+ if (!page)
+ return 0;
+ // FIXME: Can we remove this check?
+ if (!page->mainFrame())
+ return 0;
+ return page->mainFrame()->view();
+}
+
+void PageWidgetDelegate::animate(Page* page, double monotonicFrameBeginTime)
+{
+#if ENABLE(REQUEST_ANIMATION_FRAME)
+ FrameView* view = mainFrameView(page);
+ if (!view)
+ return;
+ view->serviceScriptedAnimations(monotonicFrameBeginTime);
+#endif
+}
+
+void PageWidgetDelegate::layout(Page* page)
+{
+ FrameView* view = mainFrameView(page);
+ if (!view)
+ return;
+ // In order for our child HWNDs (NativeWindowWidgets) to update properly,
+ // they need to be told that we are updating the screen. The problem is that
+ // the native widgets need to recalculate their clip region and not overlap
+ // any of our non-native widgets. To force the resizing, call
+ // setFrameRect(). This will be a quick operation for most frames, but the
+ // NativeWindowWidgets will update a proper clipping region.
+ view->setFrameRect(view->frameRect());
+
+ // setFrameRect may have the side-effect of causing existing page layout to
+ // be invalidated, so layout needs to be called last.
+ view->updateLayoutAndStyleIfNeededRecursive();
+}
+
+void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas* canvas, const WebRect& rect)
+{
+ if (rect.isEmpty())
+ return;
+ GraphicsContextBuilder builder(canvas);
+ GraphicsContext& gc = builder.context();
+ IntRect dirtyRect(rect);
+ gc.save();
+ FrameView* view = mainFrameView(page);
+ // FIXME: Can we remove the mainFrame()->document() check?
+ if (view && page->mainFrame()->document()) {
+ gc.clip(dirtyRect);
+ view->paint(&gc, dirtyRect);
+ if (overlays)
+ overlays->paintWebFrame(gc);
+ } else
+ gc.fillRect(dirtyRect, Color::white, ColorSpaceDeviceRGB);
+ gc.restore();
+}
+
+bool PageWidgetDelegate::handleInputEvent(Page* page, PageWidgetEventHandler& handler, const WebInputEvent& event)
+{
+ Frame* frame = page ? page->mainFrame() : 0;
+ switch (event.type) {
+
+ // FIXME: WebKit seems to always return false on mouse events processing
+ // methods. For now we'll assume it has processed them (as we are only
+ // interested in whether keyboard events are processed).
+ case WebInputEvent::MouseMove:
+ if (!frame || !frame->view())
+ return true;
+ handler.handleMouseMove(*frame, *static_cast<const WebMouseEvent*>(&event));
+ return true;
+ case WebInputEvent::MouseLeave:
+ if (!frame || !frame->view())
+ return true;
+ handler.handleMouseLeave(*frame, *static_cast<const WebMouseEvent*>(&event));
+ return true;
+ case WebInputEvent::MouseDown:
+ if (!frame || !frame->view())
+ return true;
+ handler.handleMouseDown(*frame, *static_cast<const WebMouseEvent*>(&event));
+ return true;
+ case WebInputEvent::MouseUp:
+ if (!frame || !frame->view())
+ return true;
+ handler.handleMouseUp(*frame, *static_cast<const WebMouseEvent*>(&event));
+ return true;
+
+ case WebInputEvent::MouseWheel:
+ if (!frame || !frame->view())
+ return false;
+ return handler.handleMouseWheel(*frame, *static_cast<const WebMouseWheelEvent*>(&event));
+
+ case WebInputEvent::RawKeyDown:
+ case WebInputEvent::KeyDown:
+ case WebInputEvent::KeyUp:
+ return handler.handleKeyEvent(*static_cast<const WebKeyboardEvent*>(&event));
+
+ case WebInputEvent::Char:
+ return handler.handleCharEvent(*static_cast<const WebKeyboardEvent*>(&event));
+
+#if ENABLE(GESTURE_EVENTS)
+ case WebInputEvent::GestureScrollBegin:
+ case WebInputEvent::GestureScrollEnd:
+ case WebInputEvent::GestureScrollUpdate:
+ case WebInputEvent::GestureFlingStart:
+ case WebInputEvent::GestureFlingCancel:
+ case WebInputEvent::GestureTap:
+ case WebInputEvent::GestureTapDown:
+ case WebInputEvent::GestureDoubleTap:
+ return handler.handleGestureEvent(*static_cast<const WebGestureEvent*>(&event));
+#endif
+
+#if ENABLE(TOUCH_EVENTS)
+ case WebInputEvent::TouchStart:
+ case WebInputEvent::TouchMove:
+ case WebInputEvent::TouchEnd:
+ case WebInputEvent::TouchCancel:
+ if (!frame || !frame->view())
+ return false;
+ return handler.handleTouchEvent(*frame, *static_cast<const WebTouchEvent*>(&event));
+#endif
+
+#if ENABLE(GESTURE_EVENTS)
+ case WebInputEvent::GesturePinchBegin:
+ case WebInputEvent::GesturePinchEnd:
+ case WebInputEvent::GesturePinchUpdate:
+ // FIXME: Once PlatformGestureEvent is updated to support pinch, this
+ // should call handleGestureEvent, just like it currently does for
+ // gesture scroll.
+ return false;
+#endif
+
+ default:
+ return false;
+ }
+}
+
+// ----------------------------------------------------------------
+// Default handlers for PageWidgetEventHandler
+
+void PageWidgetEventHandler::handleMouseMove(Frame& mainFrame, const WebMouseEvent& event)
+{
+ // We call mouseMoved here instead of handleMouseMovedEvent because we need
+ // our ChromeClientImpl to receive changes to the mouse position and tooltip
+ // text, and mouseMoved handles all of that.
+ mainFrame.eventHandler()->mouseMoved(PlatformMouseEventBuilder(mainFrame.view(), event));
+}
+
+void PageWidgetEventHandler::handleMouseLeave(Frame& mainFrame, const WebMouseEvent& event)
+{
+ mainFrame.eventHandler()->handleMouseMoveEvent(PlatformMouseEventBuilder(mainFrame.view(), event));
+}
+
+void PageWidgetEventHandler::handleMouseDown(Frame& mainFrame, const WebMouseEvent& event)
+{
+ mainFrame.eventHandler()->handleMousePressEvent(PlatformMouseEventBuilder(mainFrame.view(), event));
+}
+
+void PageWidgetEventHandler::handleMouseUp(Frame& mainFrame, const WebMouseEvent& event)
+{
+ mainFrame.eventHandler()->handleMouseReleaseEvent(PlatformMouseEventBuilder(mainFrame.view(), event));
+}
+
+bool PageWidgetEventHandler::handleMouseWheel(Frame& mainFrame, const WebMouseWheelEvent& event)
+{
+ return mainFrame.eventHandler()->handleWheelEvent(PlatformWheelEventBuilder(mainFrame.view(), event));
+}
+
+#if ENABLE(TOUCH_EVENTS)
+bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEvent& event)
+{
+ return mainFrame.eventHandler()->handleTouchEvent(PlatformTouchEventBuilder(mainFrame.view(), event));
+}
+#endif
+
+}
diff --git a/Source/WebKit/chromium/src/PageWidgetDelegate.h b/Source/WebKit/chromium/src/PageWidgetDelegate.h
new file mode 100644
index 000000000..dbbe269ac
--- /dev/null
+++ b/Source/WebKit/chromium/src/PageWidgetDelegate.h
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2012 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 PageWidgetDelegate_h
+#define PageWidgetDelegate_h
+
+#include "Page.h"
+#include "WebWidget.h"
+#include "platform/WebCanvas.h"
+#include <wtf/OwnPtr.h>
+
+namespace WebCore {
+class Frame;
+class Page;
+}
+
+namespace WebKit {
+
+class PageOverlayList;
+class WebGestureEvent;
+class WebInputEvent;
+class WebKeyboardEvent;
+class WebMouseEvent;
+class WebMouseWheelEvent;
+class WebTouchEvent;
+
+class PageWidgetEventHandler {
+public:
+ virtual void handleMouseMove(WebCore::Frame& mainFrame, const WebMouseEvent&);
+ virtual void handleMouseLeave(WebCore::Frame& mainFrame, const WebMouseEvent&);
+ virtual void handleMouseDown(WebCore::Frame& mainFrame, const WebMouseEvent&);
+ virtual void handleMouseUp(WebCore::Frame& mainFrame, const WebMouseEvent&);
+ virtual bool handleMouseWheel(WebCore::Frame& mainFrame, const WebMouseWheelEvent&);
+ virtual bool handleKeyEvent(const WebKeyboardEvent&) = 0;
+ virtual bool handleCharEvent(const WebKeyboardEvent&) = 0;
+#if ENABLE(GESTURE_EVENTS)
+ virtual bool handleGestureEvent(const WebGestureEvent&) = 0;
+#endif
+#if ENABLE(TOUCH_EVENTS)
+ virtual bool handleTouchEvent(WebCore::Frame& mainFrame, const WebTouchEvent&);
+#endif
+ virtual ~PageWidgetEventHandler() { }
+};
+
+
+// Common implementation of WebViewImpl and WebPagePopupImpl.
+class PageWidgetDelegate {
+public:
+ static void animate(WebCore::Page*, double monotonicFrameBeginTime);
+ static void layout(WebCore::Page*);
+ static void paint(WebCore::Page*, PageOverlayList*, WebCanvas*, const WebRect&);
+ static bool handleInputEvent(WebCore::Page*, PageWidgetEventHandler&, const WebInputEvent&);
+
+private:
+ PageWidgetDelegate() { }
+};
+
+}
+#endif
diff --git a/Source/WebKit/chromium/src/PlatformSupport.cpp b/Source/WebKit/chromium/src/PlatformSupport.cpp
index 63be0245c..de9810dbd 100644
--- a/Source/WebKit/chromium/src/PlatformSupport.cpp
+++ b/Source/WebKit/chromium/src/PlatformSupport.cpp
@@ -61,7 +61,6 @@
#include "platform/WebString.h"
#include "platform/WebURL.h"
#include "platform/WebVector.h"
-#include <public/WebMimeRegistry.h>
#if USE(CG)
#include <CoreGraphics/CGContext.h>
@@ -86,12 +85,12 @@
#include "NativeImageSkia.h"
#endif
+#include "AsyncFileSystemChromium.h"
#include "BitmapImage.h"
#include "ClipboardChromium.h"
#include "Cookie.h"
#include "Document.h"
#include "FrameView.h"
-#include "GamepadList.h"
#include "GraphicsContext.h"
#include "IDBFactoryBackendProxy.h"
#include "KURL.h"
@@ -102,6 +101,7 @@
#include "Worker.h"
#include "WorkerContextProxy.h"
+#include <public/WebMimeRegistry.h>
#include <wtf/Assertions.h>
// We are part of the WebKit implementation.
@@ -144,13 +144,6 @@ static WebCookieJar* getCookieJar(const Document* document)
return cookieJar;
}
-// Cache ----------------------------------------------------------------------
-
-void PlatformSupport::cacheMetadata(const KURL& url, double responseTime, const Vector<char>& data)
-{
- webKitPlatformSupport()->cacheMetadata(url, responseTime, data.data(), data.size());
-}
-
// Clipboard ------------------------------------------------------------------
uint64_t PlatformSupport::clipboardSequenceNumber(PasteboardPrivate::ClipboardBuffer buffer)
@@ -314,13 +307,6 @@ bool PlatformSupport::cookiesEnabled(const Document* document)
return result;
}
-// DNS ------------------------------------------------------------------------
-
-void PlatformSupport::prefetchDNS(const String& hostname)
-{
- webKitPlatformSupport()->prefetchHostName(hostname);
-}
-
// File ------------------------------------------------------------------------
bool PlatformSupport::fileExists(const String& path)
@@ -417,6 +403,18 @@ int PlatformSupport::writeToFile(PlatformFileHandle handle, const char* data, in
return webKitPlatformSupport()->fileUtilities()->writeToFile(handle, data, length);
}
+#if ENABLE(FILE_SYSTEM)
+String PlatformSupport::createIsolatedFileSystemName(const String& storageIdentifier, const String& filesystemId)
+{
+ return AsyncFileSystemChromium::createIsolatedFileSystemName(storageIdentifier, filesystemId);
+}
+
+PassOwnPtr<AsyncFileSystem> PlatformSupport::createIsolatedFileSystem(const String& originString, const String& filesystemId)
+{
+ return AsyncFileSystemChromium::createIsolatedFileSystem(originString, filesystemId);
+}
+#endif
+
// Font -----------------------------------------------------------------------
#if OS(WINDOWS)
@@ -534,48 +532,6 @@ PassRefPtr<SerializedScriptValue> PlatformSupport::injectIDBKeyIntoSerializedVal
return webKitPlatformSupport()->injectIDBKeyIntoSerializedValue(key, value, keyPath);
}
-// Gamepad --------------------------------------------------------------------
-
-void PlatformSupport::sampleGamepads(GamepadList* into)
-{
- WebGamepads gamepads;
-
- webKitPlatformSupport()->sampleGamepads(gamepads);
-
- for (unsigned i = 0; i < WebKit::WebGamepads::itemsLengthCap; ++i) {
- WebGamepad& webGamepad = gamepads.items[i];
- if (i < gamepads.length && webGamepad.connected) {
- RefPtr<Gamepad> gamepad = into->item(i);
- if (!gamepad)
- gamepad = Gamepad::create();
- gamepad->id(webGamepad.id);
- gamepad->index(i);
- gamepad->timestamp(webGamepad.timestamp);
- gamepad->axes(webGamepad.axesLength, webGamepad.axes);
- gamepad->buttons(webGamepad.buttonsLength, webGamepad.buttons);
- into->set(i, gamepad);
- } else
- into->set(i, 0);
- }
-}
-
-// Keygen ---------------------------------------------------------------------
-
-String PlatformSupport::signedPublicKeyAndChallengeString(
- unsigned keySizeIndex, const String& challenge, const KURL& url)
-{
- return webKitPlatformSupport()->signedPublicKeyAndChallengeString(keySizeIndex,
- WebString(challenge),
- WebURL(url));
-}
-
-// Language -------------------------------------------------------------------
-
-String PlatformSupport::computedDefaultLanguage()
-{
- return webKitPlatformSupport()->defaultLocale();
-}
-
// LayoutTestMode -------------------------------------------------------------
bool PlatformSupport::layoutTestMode()
@@ -583,46 +539,6 @@ bool PlatformSupport::layoutTestMode()
return WebKit::layoutTestMode();
}
-// MimeType -------------------------------------------------------------------
-
-bool PlatformSupport::isSupportedImageMIMEType(const String& mimeType)
-{
- return webKitPlatformSupport()->mimeRegistry()->supportsImageMIMEType(mimeType)
- != WebMimeRegistry::IsNotSupported;
-}
-
-bool PlatformSupport::isSupportedJavaScriptMIMEType(const String& mimeType)
-{
- return webKitPlatformSupport()->mimeRegistry()->supportsJavaScriptMIMEType(mimeType)
- != WebMimeRegistry::IsNotSupported;
-}
-
-bool PlatformSupport::isSupportedNonImageMIMEType(const String& mimeType)
-{
- return webKitPlatformSupport()->mimeRegistry()->supportsNonImageMIMEType(mimeType)
- != WebMimeRegistry::IsNotSupported;
-}
-
-String PlatformSupport::mimeTypeForExtension(const String& extension)
-{
- return webKitPlatformSupport()->mimeRegistry()->mimeTypeForExtension(extension);
-}
-
-String PlatformSupport::wellKnownMimeTypeForExtension(const String& extension)
-{
- return webKitPlatformSupport()->mimeRegistry()->wellKnownMimeTypeForExtension(extension);
-}
-
-String PlatformSupport::mimeTypeFromFile(const String& path)
-{
- return webKitPlatformSupport()->mimeRegistry()->mimeTypeFromFile(path);
-}
-
-String PlatformSupport::preferredExtensionForMIMEType(const String& mimeType)
-{
- return webKitPlatformSupport()->mimeRegistry()->preferredExtensionForMIMEType(mimeType);
-}
-
// Plugin ---------------------------------------------------------------------
bool PlatformSupport::plugins(bool refresh, Vector<PluginInfo>* results)
@@ -655,15 +571,6 @@ PassRefPtr<Image> PlatformSupport::loadPlatformImageResource(const char* name)
#if ENABLE(WEB_AUDIO)
-PassOwnPtr<AudioBus> PlatformSupport::loadPlatformAudioResource(const char* name, double sampleRate)
-{
- const WebData& resource = webKitPlatformSupport()->loadResource(name);
- if (resource.isEmpty())
- return nullptr;
-
- return decodeAudioFileData(resource.data(), resource.size(), sampleRate);
-}
-
PassOwnPtr<AudioBus> PlatformSupport::decodeAudioFileData(const char* data, size_t size, double sampleRate)
{
WebAudioBus webAudioBus;
@@ -674,13 +581,6 @@ PassOwnPtr<AudioBus> PlatformSupport::decodeAudioFileData(const char* data, size
#endif // ENABLE(WEB_AUDIO)
-// Sandbox --------------------------------------------------------------------
-
-bool PlatformSupport::sandboxEnabled()
-{
- return webKitPlatformSupport()->sandboxEnabled();
-}
-
// SharedTimers ---------------------------------------------------------------
void PlatformSupport::setSharedTimerFiredFunction(void (*func)())
@@ -693,40 +593,6 @@ void PlatformSupport::setSharedTimerFireInterval(double interval)
webKitPlatformSupport()->setSharedTimerFireInterval(interval);
}
-void PlatformSupport::stopSharedTimer()
-{
- webKitPlatformSupport()->stopSharedTimer();
-}
-
-// StatsCounters --------------------------------------------------------------
-
-void PlatformSupport::decrementStatsCounter(const char* name)
-{
- webKitPlatformSupport()->decrementStatsCounter(name);
-}
-
-void PlatformSupport::incrementStatsCounter(const char* name)
-{
- webKitPlatformSupport()->incrementStatsCounter(name);
-}
-
-void PlatformSupport::histogramCustomCounts(const char* name, int sample, int min, int max, int bucketCount)
-{
- webKitPlatformSupport()->histogramCustomCounts(name, sample, min, max, bucketCount);
-}
-
-void PlatformSupport::histogramEnumeration(const char* name, int sample, int boundaryValue)
-{
- webKitPlatformSupport()->histogramEnumeration(name, sample, boundaryValue);
-}
-
-// Sudden Termination ---------------------------------------------------------
-
-void PlatformSupport::suddenTerminationChanged(bool enabled)
-{
- webKitPlatformSupport()->suddenTerminationChanged(enabled);
-}
-
// Theming --------------------------------------------------------------------
#if OS(WINDOWS)
@@ -1032,31 +898,6 @@ void PlatformSupport::notifyJSOutOfMemory(Frame* frame)
webFrame->client()->didExhaustMemoryAvailableForScript(webFrame);
}
-int PlatformSupport::memoryUsageMB()
-{
- return static_cast<int>(webKitPlatformSupport()->memoryUsageMB());
-}
-
-int PlatformSupport::actualMemoryUsageMB()
-{
- return static_cast<int>(webKitPlatformSupport()->actualMemoryUsageMB());
-}
-
-int PlatformSupport::lowMemoryUsageMB()
-{
- return static_cast<int>(webKitPlatformSupport()->lowMemoryUsageMB());
-}
-
-int PlatformSupport::highMemoryUsageMB()
-{
- return static_cast<int>(webKitPlatformSupport()->highMemoryUsageMB());
-}
-
-int PlatformSupport::highUsageDeltaMB()
-{
- return static_cast<int>(webKitPlatformSupport()->highUsageDeltaMB());
-}
-
int PlatformSupport::screenHorizontalDPI(Widget* widget)
{
WebWidgetClient* client = toWebWidgetClient(widget);
@@ -1136,4 +977,9 @@ WorkerContextProxy* WorkerContextProxy::create(Worker* worker)
}
#endif
+bool PlatformSupport::canAccelerate2dCanvas()
+{
+ return webKitPlatformSupport()->canAccelerate2dCanvas();
+}
+
} // namespace WebCore
diff --git a/Source/WebKit/chromium/src/ResourceHandle.cpp b/Source/WebKit/chromium/src/ResourceHandle.cpp
deleted file mode 100644
index 6b2eb05ea..000000000
--- a/Source/WebKit/chromium/src/ResourceHandle.cpp
+++ /dev/null
@@ -1,297 +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 "ResourceHandle.h"
-
-#include "PlatformSupport.h"
-#include "ResourceHandleClient.h"
-#include "ResourceHandleInternal.h"
-#include "ResourceRequest.h"
-#include "SharedBuffer.h"
-
-#include "WebKit.h"
-#include "platform/WebKitPlatformSupport.h"
-#include "platform/WebURLError.h"
-#include "platform/WebURLLoader.h"
-#include "platform/WebURLLoaderClient.h"
-#include "platform/WebURLRequest.h"
-#include "platform/WebURLResponse.h"
-#include "WrappedResourceRequest.h"
-#include "WrappedResourceResponse.h"
-
-using namespace WebKit;
-
-namespace WebCore {
-
-// ResourceHandleInternal -----------------------------------------------------
-ResourceHandleInternal::ResourceHandleInternal(const ResourceRequest& request, ResourceHandleClient* client)
- : m_request(request)
- , m_owner(0)
- , m_client(client)
- , m_state(ConnectionStateNew)
-{ }
-
-void ResourceHandleInternal::start()
-{
- if (m_state != ConnectionStateNew)
- CRASH();
- m_state = ConnectionStateStarted;
-
- m_loader = adoptPtr(webKitPlatformSupport()->createURLLoader());
- ASSERT(m_loader);
-
- WrappedResourceRequest wrappedRequest(m_request);
- wrappedRequest.setAllowStoredCredentials(allowStoredCredentials());
- m_loader->loadAsynchronously(wrappedRequest, this);
-}
-
-void ResourceHandleInternal::cancel()
-{
- m_state = ConnectionStateCanceled;
- m_loader->cancel();
-
- // Do not make any further calls to the client.
- m_client = 0;
-}
-
-void ResourceHandleInternal::setDefersLoading(bool value)
-{
- m_loader->setDefersLoading(value);
-}
-
-bool ResourceHandleInternal::allowStoredCredentials() const
-{
- return m_client && m_client->shouldUseCredentialStorage(m_owner);
-}
-
-void ResourceHandleInternal::willSendRequest(
- WebURLLoader*, WebURLRequest& request, const WebURLResponse& response)
-{
- ASSERT(m_client);
- ASSERT(!request.isNull());
- ASSERT(!response.isNull());
- m_client->willSendRequest(m_owner, request.toMutableResourceRequest(), response.toResourceResponse());
-}
-
-void ResourceHandleInternal::didSendData(
- WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent)
-{
- ASSERT(m_client);
- m_client->didSendData(m_owner, bytesSent, totalBytesToBeSent);
-}
-
-void ResourceHandleInternal::didReceiveResponse(WebURLLoader*, const WebURLResponse& response)
-{
- ASSERT(m_client);
- ASSERT(!response.isNull());
- bool isMultipart = response.isMultipartPayload();
- bool isValidStateTransition = (m_state == ConnectionStateStarted || m_state == ConnectionStateReceivedResponse);
- // In the case of multipart loads, calls to didReceiveData & didReceiveResponse can be interleaved.
- if (!isMultipart && !isValidStateTransition)
- CRASH();
- m_state = ConnectionStateReceivedResponse;
- m_client->didReceiveResponse(m_owner, response.toResourceResponse());
-}
-
-void ResourceHandleInternal::didDownloadData(WebURLLoader*, int dataLength)
-{
- ASSERT(m_client);
- if (m_state != ConnectionStateReceivedResponse)
- CRASH();
-
- m_client->didDownloadData(m_owner, dataLength);
-}
-
-void ResourceHandleInternal::didReceiveData(WebURLLoader*, const char* data, int dataLength, int encodedDataLength)
-{
- ASSERT(m_client);
- if (m_state != ConnectionStateReceivedResponse && m_state != ConnectionStateReceivingData)
- CRASH();
- m_state = ConnectionStateReceivingData;
-
- m_client->didReceiveData(m_owner, data, dataLength, encodedDataLength);
-}
-
-void ResourceHandleInternal::didReceiveCachedMetadata(WebURLLoader*, const char* data, int dataLength)
-{
- ASSERT(m_client);
- if (m_state != ConnectionStateReceivedResponse && m_state != ConnectionStateReceivingData)
- CRASH();
-
- m_client->didReceiveCachedMetadata(m_owner, data, dataLength);
-}
-
-void ResourceHandleInternal::didFinishLoading(WebURLLoader*, double finishTime)
-{
- ASSERT(m_client);
- if (m_state != ConnectionStateReceivedResponse && m_state != ConnectionStateReceivingData)
- CRASH();
- m_state = ConnectionStateFinishedLoading;
- m_client->didFinishLoading(m_owner, finishTime);
-}
-
-void ResourceHandleInternal::didFail(WebURLLoader*, const WebURLError& error)
-{
- ASSERT(m_client);
- m_state = ConnectionStateFailed;
- m_client->didFail(m_owner, error);
-}
-
-ResourceHandleInternal* ResourceHandleInternal::FromResourceHandle(ResourceHandle* handle)
-{
- return handle->d.get();
-}
-
-// ResourceHandle -------------------------------------------------------------
-
-ResourceHandle::ResourceHandle(const ResourceRequest& request,
- ResourceHandleClient* client,
- bool defersLoading,
- bool shouldContentSniff)
- : d(adoptPtr(new ResourceHandleInternal(request, client)))
-{
- d->setOwner(this);
-
- // FIXME: Figure out what to do with the bool params.
-}
-
-PassRefPtr<ResourceHandle> ResourceHandle::create(NetworkingContext* context,
- const ResourceRequest& request,
- ResourceHandleClient* client,
- bool defersLoading,
- bool shouldContentSniff)
-{
- RefPtr<ResourceHandle> newHandle = adoptRef(new ResourceHandle(
- request, client, defersLoading, shouldContentSniff));
-
- if (newHandle->start(context))
- return newHandle.release();
-
- return 0;
-}
-
-ResourceRequest& ResourceHandle::firstRequest()
-{
- return d->request();
-}
-
-ResourceHandleClient* ResourceHandle::client() const
-{
- return d->client();
-}
-
-void ResourceHandle::setClient(ResourceHandleClient* client)
-{
- d->setClient(client);
-}
-
-void ResourceHandle::setDefersLoading(bool value)
-{
- d->setDefersLoading(value);
-}
-
-bool ResourceHandle::start(NetworkingContext* context)
-{
- d->start();
- return true;
-}
-
-bool ResourceHandle::hasAuthenticationChallenge() const
-{
- return false;
-}
-
-void ResourceHandle::clearAuthentication()
-{
-}
-
-void ResourceHandle::cancel()
-{
- d->cancel();
-}
-
-ResourceHandle::~ResourceHandle()
-{
- d->setOwner(0);
-}
-
-bool ResourceHandle::loadsBlocked()
-{
- return false; // This seems to be related to sync XMLHttpRequest...
-}
-
-// static
-void ResourceHandle::loadResourceSynchronously(NetworkingContext* context,
- const ResourceRequest& request,
- StoredCredentials storedCredentials,
- ResourceError& error,
- ResourceResponse& response,
- Vector<char>& data)
-{
- OwnPtr<WebURLLoader> loader = adoptPtr(webKitPlatformSupport()->createURLLoader());
- ASSERT(loader);
-
- WrappedResourceRequest requestIn(request);
- requestIn.setAllowStoredCredentials(storedCredentials == AllowStoredCredentials);
- WrappedResourceResponse responseOut(response);
- WebURLError errorOut;
- WebData dataOut;
-
- loader->loadSynchronously(requestIn, responseOut, errorOut, dataOut);
-
- error = errorOut;
- data.clear();
- data.append(dataOut.data(), dataOut.size());
-}
-
-// static
-bool ResourceHandle::willLoadFromCache(ResourceRequest& request, Frame*)
-{
- // This method is used to determine if a POST request can be repeated from
- // cache, but you cannot really know until you actually try to read from the
- // cache. Even if we checked now, something else could come along and wipe
- // out the cache entry by the time we fetch it.
- //
- // So, we always say yes here, to prevent the FrameLoader from initiating a
- // reload. Then in FrameLoaderClientImpl::dispatchWillSendRequest, we
- // fix-up the cache policy of the request to force a load from the cache.
- //
- ASSERT(request.httpMethod() == "POST");
- return true;
-}
-
-// static
-void ResourceHandle::cacheMetadata(const ResourceResponse& response, const Vector<char>& data)
-{
- PlatformSupport::cacheMetadata(response.url(), response.responseTime(), data);
-}
-
-} // namespace WebCore
diff --git a/Source/WebKit/chromium/src/ResourceHandleInternal.h b/Source/WebKit/chromium/src/ResourceHandleInternal.h
deleted file mode 100644
index 02bbe7313..000000000
--- a/Source/WebKit/chromium/src/ResourceHandleInternal.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2011 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 ResourceHandleInternal_h
-#define ResourceHandleInternal_h
-
-#include "ResourceRequest.h"
-#include "platform/WebCommon.h"
-#include "platform/WebURLLoader.h"
-#include "platform/WebURLLoaderClient.h"
-
-namespace WebCore {
-
-class ResourceHandle;
-class ResourceHandleClient;
-
-class ResourceHandleInternal : public WebKit::WebURLLoaderClient {
-public:
- ResourceHandleInternal(const ResourceRequest&, ResourceHandleClient*);
-
- virtual ~ResourceHandleInternal() { }
-
- void start();
- void cancel();
- void setDefersLoading(bool);
- bool allowStoredCredentials() const;
-
- // WebURLLoaderClient methods:
- virtual void willSendRequest(WebKit::WebURLLoader*, WebKit::WebURLRequest&, const WebKit::WebURLResponse&);
- virtual void didSendData(WebKit::WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent);
- virtual void didReceiveResponse(WebKit::WebURLLoader*, const WebKit::WebURLResponse&);
- virtual void didDownloadData(WebKit::WebURLLoader*, int dataLength);
- virtual void didReceiveData(WebKit::WebURLLoader*, const char* data, int dataLength, int encodedDataLength);
-
- virtual void didReceiveCachedMetadata(WebKit::WebURLLoader*, const char* data, int dataLength);
- virtual void didFinishLoading(WebKit::WebURLLoader*, double finishTime);
- virtual void didFail(WebKit::WebURLLoader*, const WebKit::WebURLError&);
-
- enum ConnectionState {
- ConnectionStateNew,
- ConnectionStateStarted,
- ConnectionStateReceivedResponse,
- ConnectionStateReceivingData,
- ConnectionStateFinishedLoading,
- ConnectionStateCanceled,
- ConnectionStateFailed,
- };
-
- void setOwner(ResourceHandle* owner) { m_owner = owner; }
- ResourceRequest& request() { return m_request; }
- ResourceHandleClient* client() const { return m_client; }
- void setClient(ResourceHandleClient* client) { m_client = client; }
- WebKit::WebURLLoader* loader() const { return m_loader.get(); }
-
- static ResourceHandleInternal* FromResourceHandle(ResourceHandle*);
-
-private:
- ResourceRequest m_request;
- ResourceHandle* m_owner;
- ResourceHandleClient* m_client;
- OwnPtr<WebKit::WebURLLoader> m_loader;
-
- // Used for sanity checking to make sure we don't experience illegal state
- // transitions.
- ConnectionState m_state;
-};
-
-} // namespace WebCore
-
-#endif
diff --git a/Source/WebKit/chromium/src/ScrollbarGroup.cpp b/Source/WebKit/chromium/src/ScrollbarGroup.cpp
index 579dc7aa7..19fdbade4 100644
--- a/Source/WebKit/chromium/src/ScrollbarGroup.cpp
+++ b/Source/WebKit/chromium/src/ScrollbarGroup.cpp
@@ -36,23 +36,23 @@ using namespace WebCore;
namespace WebKit {
-ScrollbarGroup::ScrollbarGroup(FrameView* frameView)
+ScrollbarGroup::ScrollbarGroup(FrameView* frameView, const IntRect& frameRect)
: m_frameView(frameView)
+ , m_frameRect(frameRect)
, m_horizontalScrollbar(0)
, m_verticalScrollbar(0)
{
- m_frameView->addScrollableArea(this);
}
ScrollbarGroup::~ScrollbarGroup()
{
ASSERT(!m_horizontalScrollbar);
ASSERT(!m_verticalScrollbar);
- m_frameView->removeScrollableArea(this);
}
void ScrollbarGroup::scrollbarCreated(WebScrollbarImpl* scrollbar)
{
+ bool hadScrollbars = m_horizontalScrollbar || m_verticalScrollbar;
if (scrollbar->scrollbar()->orientation() == HorizontalScrollbar) {
ASSERT(!m_horizontalScrollbar);
m_horizontalScrollbar = scrollbar;
@@ -62,6 +62,11 @@ void ScrollbarGroup::scrollbarCreated(WebScrollbarImpl* scrollbar)
m_verticalScrollbar = scrollbar;
didAddVerticalScrollbar(scrollbar->scrollbar());
}
+
+ if (!hadScrollbars) {
+ m_frameView->addScrollableArea(this);
+ m_frameView->setNeedsLayout();
+ }
}
void ScrollbarGroup::scrollbarDestroyed(WebScrollbarImpl* scrollbar)
@@ -74,6 +79,11 @@ void ScrollbarGroup::scrollbarDestroyed(WebScrollbarImpl* scrollbar)
willRemoveVerticalScrollbar(scrollbar->scrollbar());
m_verticalScrollbar = 0;
}
+
+ if (!m_horizontalScrollbar && !m_verticalScrollbar) {
+ m_frameView->removeScrollableArea(this);
+ m_frameView->setNeedsLayout();
+ }
}
void ScrollbarGroup::setLastMousePosition(const IntPoint& point)
@@ -129,6 +139,16 @@ ScrollableArea* ScrollbarGroup::enclosingScrollableArea() const
return 0;
}
+void ScrollbarGroup::setFrameRect(const IntRect& frameRect)
+{
+ m_frameRect = frameRect;
+}
+
+IntRect ScrollbarGroup::scrollableAreaBoundingBox() const
+{
+ return m_frameRect;
+}
+
bool ScrollbarGroup::isScrollCornerVisible() const
{
return false;
diff --git a/Source/WebKit/chromium/src/ScrollbarGroup.h b/Source/WebKit/chromium/src/ScrollbarGroup.h
index 44be2cf51..aeb44052f 100644
--- a/Source/WebKit/chromium/src/ScrollbarGroup.h
+++ b/Source/WebKit/chromium/src/ScrollbarGroup.h
@@ -40,12 +40,13 @@ class WebScrollbarImpl;
class ScrollbarGroup : public WebCore::ScrollableArea {
public:
- explicit ScrollbarGroup(WebCore::FrameView*);
+ ScrollbarGroup(WebCore::FrameView*, const WebCore::IntRect& frameRect);
~ScrollbarGroup();
void scrollbarCreated(WebScrollbarImpl*);
void scrollbarDestroyed(WebScrollbarImpl*);
void setLastMousePosition(const WebCore::IntPoint&);
+ void setFrameRect(const WebCore::IntRect&);
// WebCore::ScrollableArea methods
virtual int scrollSize(WebCore::ScrollbarOrientation) const;
@@ -72,10 +73,12 @@ public:
virtual bool shouldSuspendScrollAnimations() const;
virtual void scrollbarStyleChanged(int newStyle, bool forceUpdate);
virtual bool isOnActivePage() const;
+ virtual WebCore::IntRect scrollableAreaBoundingBox() const;
private:
WebCore::FrameView* m_frameView;
WebCore::IntPoint m_lastMousePosition;
+ WebCore::IntRect m_frameRect;
WebScrollbarImpl* m_horizontalScrollbar;
WebScrollbarImpl* m_verticalScrollbar;
};
diff --git a/Source/WebKit/chromium/src/SharedWorkerRepository.cpp b/Source/WebKit/chromium/src/SharedWorkerRepository.cpp
index e7aae4263..70b800b5c 100644
--- a/Source/WebKit/chromium/src/SharedWorkerRepository.cpp
+++ b/Source/WebKit/chromium/src/SharedWorkerRepository.cpp
@@ -171,8 +171,8 @@ void SharedWorkerScriptLoader::notifyFinished()
InspectorInstrumentation::scriptImported(m_worker->scriptExecutionContext(), m_scriptLoader->identifier(), m_scriptLoader->script());
// Pass the script off to the worker, then send a connect event.
m_webWorker->startWorkerContext(m_url, m_name, m_worker->scriptExecutionContext()->userAgent(m_url), m_scriptLoader->script(),
- m_worker->scriptExecutionContext()->contentSecurityPolicy()->policy(),
- static_cast<WebKit::WebContentSecurityPolicyType>(m_worker->scriptExecutionContext()->contentSecurityPolicy()->headerType()),
+ m_worker->scriptExecutionContext()->contentSecurityPolicy()->deprecatedHeader(),
+ static_cast<WebKit::WebContentSecurityPolicyType>(m_worker->scriptExecutionContext()->contentSecurityPolicy()->deprecatedHeaderType()),
m_responseAppCacheID);
sendConnect();
}
diff --git a/Source/WebKit/chromium/src/SocketStreamHandle.cpp b/Source/WebKit/chromium/src/SocketStreamHandle.cpp
index 298e733a4..5eed90011 100644
--- a/Source/WebKit/chromium/src/SocketStreamHandle.cpp
+++ b/Source/WebKit/chromium/src/SocketStreamHandle.cpp
@@ -61,9 +61,12 @@ SocketStreamHandleInternal::~SocketStreamHandleInternal()
void SocketStreamHandleInternal::connect(const KURL& url)
{
- m_socket = adoptPtr(webKitPlatformSupport()->createSocketStreamHandle());
+ m_socket = adoptPtr(WebKit::Platform::current()->createSocketStreamHandle());
LOG(Network, "connect");
ASSERT(m_socket);
+ ASSERT(m_handle);
+ if (m_handle->m_client)
+ m_handle->m_client->willOpenSocketStream(m_handle);
m_socket->connect(url, this);
}
@@ -89,7 +92,8 @@ int SocketStreamHandleInternal::send(const char* data, int len)
void SocketStreamHandleInternal::close()
{
LOG(Network, "close");
- m_socket->close();
+ if (m_socket)
+ m_socket->close();
}
void SocketStreamHandleInternal::didOpenStream(WebSocketStreamHandle* socketHandle, int maxPendingSendAllowed)
diff --git a/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.cpp b/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.cpp
new file mode 100644
index 000000000..2754c415a
--- /dev/null
+++ b/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.cpp
@@ -0,0 +1,163 @@
+/*
+ * Copyright (C) 2012 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SpeechRecognitionClientProxy.h"
+
+#include "SpeechGrammarList.h"
+#include "SpeechRecognition.h"
+#include "SpeechRecognitionError.h"
+#include "SpeechRecognitionResult.h"
+#include "SpeechRecognitionResultList.h"
+#include "WebSpeechGrammar.h"
+#include "WebSpeechRecognitionHandle.h"
+#include "WebSpeechRecognitionParams.h"
+#include "WebSpeechRecognitionResult.h"
+#include "WebSpeechRecognizer.h"
+#include <wtf/PassOwnPtr.h>
+#include <wtf/PassRefPtr.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+SpeechRecognitionClientProxy::~SpeechRecognitionClientProxy()
+{
+}
+
+PassOwnPtr<SpeechRecognitionClientProxy> SpeechRecognitionClientProxy::create(WebSpeechRecognizer* recognizer)
+{
+ return adoptPtr(new SpeechRecognitionClientProxy(recognizer));
+}
+
+void SpeechRecognitionClientProxy::start(SpeechRecognition* recognition, const SpeechGrammarList* grammarList, const String& lang, bool continuous)
+{
+ WebVector<WebSpeechGrammar> webSpeechGrammars(static_cast<size_t>(grammarList->length()));
+ for (unsigned long i = 0; i < grammarList->length(); ++i)
+ webSpeechGrammars[i] = grammarList->item(i);
+
+ m_recognizer->start(WebSpeechRecognitionHandle(recognition), WebSpeechRecognitionParams(webSpeechGrammars, lang, continuous), this);
+}
+
+void SpeechRecognitionClientProxy::stop(SpeechRecognition* recognition)
+{
+ m_recognizer->stop(WebSpeechRecognitionHandle(recognition), this);
+}
+
+void SpeechRecognitionClientProxy::abort(SpeechRecognition* recognition)
+{
+ m_recognizer->abort(WebSpeechRecognitionHandle(recognition), this);
+}
+
+void SpeechRecognitionClientProxy::didStartAudio(const WebSpeechRecognitionHandle& handle)
+{
+ RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ recognition->didStartAudio();
+}
+
+void SpeechRecognitionClientProxy::didStartSound(const WebSpeechRecognitionHandle& handle)
+{
+ RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ recognition->didStartSound();
+}
+
+void SpeechRecognitionClientProxy::didStartSpeech(const WebSpeechRecognitionHandle& handle)
+{
+ RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ recognition->didStartSpeech();
+}
+
+void SpeechRecognitionClientProxy::didEndSpeech(const WebSpeechRecognitionHandle& handle)
+{
+ RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ recognition->didEndSpeech();
+}
+
+void SpeechRecognitionClientProxy::didEndSound(const WebSpeechRecognitionHandle& handle)
+{
+ RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ recognition->didEndSound();
+}
+
+void SpeechRecognitionClientProxy::didEndAudio(const WebSpeechRecognitionHandle& handle)
+{
+ RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ recognition->didEndAudio();
+}
+
+void SpeechRecognitionClientProxy::didReceiveResult(const WebSpeechRecognitionHandle& handle, const WebSpeechRecognitionResult& result, unsigned long resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory)
+{
+ RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+
+ Vector<RefPtr<SpeechRecognitionResult> > resultHistoryVector(resultHistory.size());
+ for (size_t i = 0; i < resultHistory.size(); ++i)
+ resultHistoryVector[i] = static_cast<PassRefPtr<SpeechRecognitionResult> >(resultHistory[i]);
+
+ recognition->didReceiveResult(result, resultIndex, SpeechRecognitionResultList::create(resultHistoryVector));
+
+}
+
+void SpeechRecognitionClientProxy::didReceiveNoMatch(const WebSpeechRecognitionHandle& handle, const WebSpeechRecognitionResult& result)
+{
+ RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ recognition->didReceiveNoMatch(result);
+}
+
+void SpeechRecognitionClientProxy::didDeleteResult(const WebSpeechRecognitionHandle& handle, unsigned resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory)
+{
+ RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+
+ Vector<RefPtr<SpeechRecognitionResult> > resultHistoryVector(resultHistory.size());
+ for (size_t i = 0; i < resultHistory.size(); ++i)
+ resultHistoryVector[i] = static_cast<PassRefPtr<SpeechRecognitionResult> >(resultHistory[i]);
+
+ recognition->didDeleteResult(resultIndex, SpeechRecognitionResultList::create(resultHistoryVector));
+}
+
+void SpeechRecognitionClientProxy::didReceiveError(const WebSpeechRecognitionHandle& handle, const WebString& message, unsigned short code)
+{
+ RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ SpeechRecognitionError::Code errorCode = static_cast<SpeechRecognitionError::Code>(code);
+ recognition->didReceiveError(SpeechRecognitionError::create(errorCode, message));
+}
+
+void SpeechRecognitionClientProxy::didStart(const WebSpeechRecognitionHandle& handle)
+{
+ RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ recognition->didStart();
+}
+
+void SpeechRecognitionClientProxy::didEnd(const WebSpeechRecognitionHandle& handle)
+{
+ RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ recognition->didEnd();
+}
+
+SpeechRecognitionClientProxy::SpeechRecognitionClientProxy(WebSpeechRecognizer* recognizer)
+ : m_recognizer(recognizer)
+{
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.h b/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.h
new file mode 100644
index 000000000..a35541ea4
--- /dev/null
+++ b/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2012 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SpeechRecognitionClientProxy_h
+#define SpeechRecognitionClientProxy_h
+
+#include "PlatformString.h"
+#include "SpeechRecognitionClient.h"
+#include "WebSpeechRecognizerClient.h"
+#include <wtf/Compiler.h>
+#include <wtf/PassOwnPtr.h>
+
+namespace WebKit {
+
+class WebSpeechRecognizer;
+class WebString;
+
+class SpeechRecognitionClientProxy : public WebCore::SpeechRecognitionClient, public WebSpeechRecognizerClient {
+public:
+ ~SpeechRecognitionClientProxy();
+
+ // Constructing a proxy object with a 0 WebSpeechRecognizer is safe in
+ // itself, but attempting to call start/stop/abort on it will crash.
+ static PassOwnPtr<SpeechRecognitionClientProxy> create(WebSpeechRecognizer*);
+
+ // WebCore::SpeechRecognitionClient:
+ virtual void start(WebCore::SpeechRecognition*, const WebCore::SpeechGrammarList*, const String& lang, bool continuous) OVERRIDE;
+ virtual void stop(WebCore::SpeechRecognition*) OVERRIDE;
+ virtual void abort(WebCore::SpeechRecognition*) OVERRIDE;
+
+ // WebSpeechRecognizerClient:
+ virtual void didStartAudio(const WebSpeechRecognitionHandle&) OVERRIDE;
+ virtual void didStartSound(const WebSpeechRecognitionHandle&) OVERRIDE;
+ virtual void didStartSpeech(const WebSpeechRecognitionHandle&) OVERRIDE;
+ virtual void didEndSpeech(const WebSpeechRecognitionHandle&) OVERRIDE;
+ virtual void didEndSound(const WebSpeechRecognitionHandle&) OVERRIDE;
+ virtual void didEndAudio(const WebSpeechRecognitionHandle&) OVERRIDE;
+ virtual void didReceiveResult(const WebSpeechRecognitionHandle&, const WebSpeechRecognitionResult&, unsigned long resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory) OVERRIDE;
+ virtual void didReceiveNoMatch(const WebSpeechRecognitionHandle&, const WebSpeechRecognitionResult&) OVERRIDE;
+ virtual void didDeleteResult(const WebSpeechRecognitionHandle&, unsigned resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory) OVERRIDE;
+ virtual void didReceiveError(const WebSpeechRecognitionHandle&, const WebString& message, unsigned short code) OVERRIDE;
+ virtual void didStart(const WebSpeechRecognitionHandle&) OVERRIDE;
+ virtual void didEnd(const WebSpeechRecognitionHandle&) OVERRIDE;
+
+private:
+ SpeechRecognitionClientProxy(WebSpeechRecognizer*);
+
+ WebSpeechRecognizer* m_recognizer;
+};
+
+}; // namespace WebKit
+
+#endif // SpeechRecognitionClientProxy_h
diff --git a/Source/WebKit/chromium/src/StorageAreaProxy.cpp b/Source/WebKit/chromium/src/StorageAreaProxy.cpp
index c707eb05a..11eb7cec3 100644
--- a/Source/WebKit/chromium/src/StorageAreaProxy.cpp
+++ b/Source/WebKit/chromium/src/StorageAreaProxy.cpp
@@ -35,8 +35,9 @@
#include "Page.h"
#include "PageGroup.h"
#include "SecurityOrigin.h"
-#include "StorageAreaImpl.h"
+#include "Storage.h"
#include "StorageEvent.h"
+#include "StorageNamespaceProxy.h"
#include "WebFrameImpl.h"
#include "WebPermissionClient.h"
@@ -122,6 +123,7 @@ bool StorageAreaProxy::contains(const String& key, Frame* frame) const
return !getItem(key, frame).isNull();
}
+// FIXME: remove this method and the calls to it from our setters after multi-side patch landing is done.
// Copied from WebCore/storage/StorageEventDispatcher.cpp out of necessity. It's probably best to keep it current.
void StorageAreaProxy::storageEvent(const String& key, const String& oldValue, const String& newValue, StorageType storageType, SecurityOrigin* securityOrigin, Frame* sourceFrame)
{
@@ -140,6 +142,8 @@ void StorageAreaProxy::storageEvent(const String& key, const String& oldValue, c
}
for (unsigned i = 0; i < frames.size(); ++i) {
+ // FIXME: maybe only raise if the window has an onstorage listener
+ // attached to avoid creating the Storage instance.
ExceptionCode ec = 0;
Storage* storage = frames[i]->domWindow()->sessionStorage(ec);
if (!ec)
@@ -157,6 +161,8 @@ void StorageAreaProxy::storageEvent(const String& key, const String& oldValue, c
}
for (unsigned i = 0; i < frames.size(); ++i) {
+ // FIXME: maybe only raise if the window has an onstorage listener
+ // attached to avoid creating the Storage instance.
ExceptionCode ec = 0;
Storage* storage = frames[i]->domWindow()->localStorage(ec);
if (!ec)
@@ -174,4 +180,76 @@ bool StorageAreaProxy::canAccessStorage(Frame* frame) const
return !webView->permissionClient() || webView->permissionClient()->allowStorage(webFrame, m_storageType == LocalStorage);
}
+void StorageAreaProxy::dispatchLocalStorageEvent(const String& pageGroupName, const String& key, const String& oldValue, const String& newValue,
+ SecurityOrigin* securityOrigin, const KURL& pageURL, WebKit::WebStorageArea* sourceAreaInstance, bool originatedInProcess)
+{
+ // FIXME: Multi-sided patch engineering alert !
+ // step 1: this method gets defined and implemented in webkit/webcore with the early return.
+ // step 2: this method starts getting called by chromium still with the early return.
+ // step 3: This class's setters are modified to no longer raise SessionStorage
+ // events for inprocess changes and this early return is removed.
+ if (originatedInProcess)
+ return;
+
+ const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroupName)->pages();
+ for (HashSet<Page*>::const_iterator it = pages.begin(); it != pages.end(); ++it) {
+ for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
+ if (frame->document()->securityOrigin()->equal(securityOrigin) && !isEventSource(frame->domWindow()->optionalLocalStorage(), sourceAreaInstance)) {
+ // FIXME: maybe only raise if the window has an onstorage listener attached to avoid creating the Storage instance.
+ ExceptionCode ec = 0;
+ Storage* storage = frame->domWindow()->localStorage(ec);
+ if (!ec)
+ frame->document()->enqueueWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, pageURL, storage));
+ }
+ }
+ }
+}
+
+static Page* findPageWithSessionStorageNamespace(const String& pageGroupName, const WebKit::WebStorageNamespace& sessionNamespace)
+{
+ const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroupName)->pages();
+ for (HashSet<Page*>::const_iterator it = pages.begin(); it != pages.end(); ++it) {
+ const bool createIfNeeded = true;
+ StorageNamespaceProxy* proxy = static_cast<StorageNamespaceProxy*>((*it)->sessionStorage(createIfNeeded));
+ if (proxy->isSameNamespace(sessionNamespace))
+ return *it;
+ }
+ return 0;
+}
+
+void StorageAreaProxy::dispatchSessionStorageEvent(const String& pageGroupName, const String& key, const String& oldValue, const String& newValue,
+ SecurityOrigin* securityOrigin, const KURL& pageURL, const WebKit::WebStorageNamespace& sessionNamespace,
+ WebKit::WebStorageArea* sourceAreaInstance, bool originatedInProcess)
+{
+ // FIXME: Multi-sided patch engineering alert !
+ // step 1: this method gets defined and implemented in webkit/webcore with the early return.
+ // step 2: this method starts getting called by chromium still with the early return.
+ // step 3: This class's setters are modified to no longer raise SessionStorage
+ // events for inprocess changes and this early return is removed.
+ if (originatedInProcess)
+ return;
+
+ Page* page = findPageWithSessionStorageNamespace(pageGroupName, sessionNamespace);
+ if (!page)
+ return;
+
+ for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
+ if (frame->document()->securityOrigin()->equal(securityOrigin) && !isEventSource(frame->domWindow()->optionalSessionStorage(), sourceAreaInstance)) {
+ // FIXME: maybe only raise if the window has an onstorage listener attached to avoid creating the Storage instance.
+ ExceptionCode ec = 0;
+ Storage* storage = frame->domWindow()->sessionStorage(ec);
+ if (!ec)
+ frame->document()->enqueueWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, pageURL, storage));
+ }
+ }
+}
+
+bool StorageAreaProxy::isEventSource(Storage* storage, WebKit::WebStorageArea* sourceAreaInstance)
+{
+ if (!storage)
+ return false;
+ StorageAreaProxy* areaProxy = static_cast<StorageAreaProxy*>(storage->area());
+ return areaProxy->m_storageArea == sourceAreaInstance;
+}
+
} // namespace WebCore
diff --git a/Source/WebKit/chromium/src/StorageAreaProxy.h b/Source/WebKit/chromium/src/StorageAreaProxy.h
index 2949a5227..ab2357470 100644
--- a/Source/WebKit/chromium/src/StorageAreaProxy.h
+++ b/Source/WebKit/chromium/src/StorageAreaProxy.h
@@ -28,12 +28,18 @@
#include "StorageArea.h"
-namespace WebKit { class WebStorageArea; }
+namespace WebKit {
+class WebStorageArea;
+class WebStorageNamespace;
+}
namespace WebCore {
class Frame;
+class KURL;
+class Page;
class SecurityOrigin;
+class Storage;
class StorageAreaProxy : public StorageArea {
public:
@@ -51,10 +57,20 @@ public:
virtual bool disabledByPrivateBrowsingInFrame(const Frame*) const { return false; }
+ static void dispatchLocalStorageEvent(
+ const String& pageGroupName, const String& key, const String& oldValue, const String& newValue,
+ SecurityOrigin*, const KURL& pageURL, WebKit::WebStorageArea* sourceAreaInstance, bool originatedInProcess);
+ static void dispatchSessionStorageEvent(
+ const String& pageGroupName, const String& key, const String& oldValue, const String& newValue,
+ SecurityOrigin*, const KURL& pageURL, const WebKit::WebStorageNamespace&,
+ WebKit::WebStorageArea* sourceAreaInstance, bool originatedInProcess);
+
private:
void storageEvent(const String& key, const String& oldValue, const String& newValue, StorageType, SecurityOrigin*, Frame* sourceFrame);
bool canAccessStorage(Frame*) const;
+ static bool isEventSource(Storage*, WebKit::WebStorageArea* sourceAreaInstance);
+
OwnPtr<WebKit::WebStorageArea> m_storageArea;
StorageType m_storageType;
};
diff --git a/Source/WebKit/chromium/src/StorageEventDispatcherChromium.cpp b/Source/WebKit/chromium/src/StorageEventDispatcherChromium.cpp
deleted file mode 100644
index 0fa899cc4..000000000
--- a/Source/WebKit/chromium/src/StorageEventDispatcherChromium.cpp
+++ /dev/null
@@ -1,52 +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 "StorageEventDispatcher.h"
-
-#include "SecurityOrigin.h"
-#include "StorageArea.h"
-
-#include "WebKit.h"
-#include "platform/WebKitPlatformSupport.h"
-#include "platform/WebString.h"
-#include "platform/WebURL.h"
-
-namespace WebCore {
-
-void StorageEventDispatcher::dispatch(const String& key, const String& oldValue,
- const String& newValue, StorageType storageType,
- SecurityOrigin* origin, Frame* sourceFrame)
-{
- ASSERT(!sourceFrame); // Sad, but true.
- WebKit::webKitPlatformSupport()->dispatchStorageEvent(key, oldValue, newValue, origin->toString(), WebKit::WebURL(), storageType == LocalStorage);
-}
-
-} // namespace WebCore
diff --git a/Source/WebKit/chromium/src/StorageEventDispatcherImpl.cpp b/Source/WebKit/chromium/src/StorageEventDispatcherImpl.cpp
index 7ee3eb2b1..e948b597c 100644
--- a/Source/WebKit/chromium/src/StorageEventDispatcherImpl.cpp
+++ b/Source/WebKit/chromium/src/StorageEventDispatcherImpl.cpp
@@ -41,6 +41,8 @@
#include "SecurityOrigin.h"
#include "StorageEvent.h"
+// FIXME: delete this almost obsolete file soon
+
namespace WebCore {
StorageEventDispatcherImpl::StorageEventDispatcherImpl(const String& groupName)
diff --git a/Source/WebKit/chromium/src/StorageNamespaceProxy.cpp b/Source/WebKit/chromium/src/StorageNamespaceProxy.cpp
index 6a5cbd960..5c37e396c 100644
--- a/Source/WebKit/chromium/src/StorageNamespaceProxy.cpp
+++ b/Source/WebKit/chromium/src/StorageNamespaceProxy.cpp
@@ -82,7 +82,7 @@ PassRefPtr<StorageArea> StorageNamespaceProxy::storageArea(PassRefPtr<SecurityOr
void StorageNamespaceProxy::close()
{
- m_storageNamespace->close();
+ // N/A to the chromium port.
}
void StorageNamespaceProxy::clearOriginForDeletion(SecurityOrigin* origin)
@@ -100,4 +100,9 @@ void StorageNamespaceProxy::sync()
ASSERT_NOT_REACHED();
}
+bool StorageNamespaceProxy::isSameNamespace(const WebKit::WebStorageNamespace& sessionNamespace)
+{
+ return m_storageNamespace->isSameNamespace(sessionNamespace);
+}
+
} // namespace WebCore
diff --git a/Source/WebKit/chromium/src/StorageNamespaceProxy.h b/Source/WebKit/chromium/src/StorageNamespaceProxy.h
index 6cced8955..f1b45fc5b 100644
--- a/Source/WebKit/chromium/src/StorageNamespaceProxy.h
+++ b/Source/WebKit/chromium/src/StorageNamespaceProxy.h
@@ -39,13 +39,14 @@ public:
virtual ~StorageNamespaceProxy();
virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>);
virtual PassRefPtr<StorageNamespace> copy();
+
virtual void close();
-
virtual void clearOriginForDeletion(SecurityOrigin*);
virtual void clearAllOriginsForDeletion();
-
virtual void sync();
+ bool isSameNamespace(const WebKit::WebStorageNamespace&);
+
private:
OwnPtr<WebKit::WebStorageNamespace> m_storageNamespace;
StorageType m_storageType;
diff --git a/Source/WebKit/chromium/src/TextFieldDecoratorImpl.cpp b/Source/WebKit/chromium/src/TextFieldDecoratorImpl.cpp
new file mode 100644
index 000000000..e58c022ee
--- /dev/null
+++ b/Source/WebKit/chromium/src/TextFieldDecoratorImpl.cpp
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2012 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 "TextFieldDecoratorImpl.h"
+
+#include "CachedImage.h"
+#include "HTMLInputElement.h"
+#include "Image.h"
+#include "WebInputElement.h"
+#include "WebTextFieldDecoratorClient.h"
+
+namespace WebKit {
+
+using namespace WebCore;
+
+inline TextFieldDecoratorImpl::TextFieldDecoratorImpl(WebTextFieldDecoratorClient* client)
+ : m_client(client)
+{
+ ASSERT(client);
+}
+
+PassOwnPtr<TextFieldDecoratorImpl> TextFieldDecoratorImpl::create(WebTextFieldDecoratorClient* client)
+{
+ return adoptPtr(new TextFieldDecoratorImpl(client));
+}
+
+TextFieldDecoratorImpl::~TextFieldDecoratorImpl()
+{
+}
+
+bool TextFieldDecoratorImpl::willAddDecorationTo(HTMLInputElement* input)
+{
+ ASSERT(input);
+ return m_client->shouldAddDecorationTo(WebInputElement(input));
+}
+
+CachedImage* TextFieldDecoratorImpl::imageForNormalState()
+{
+ if (!m_cachedImageForNormalState) {
+ WebCString imageName = m_client->imageNameForNormalState();
+ ASSERT(!imageName.isEmpty());
+ RefPtr<Image> image = Image::loadPlatformResource(imageName.data());
+ m_cachedImageForNormalState = new CachedImage(image.get());
+ // The CachedImage owns a RefPtr to the Image.
+ }
+ return m_cachedImageForNormalState.get();
+}
+
+CachedImage* TextFieldDecoratorImpl::imageForDisabledState()
+{
+ if (!m_cachedImageForDisabledState) {
+ WebCString imageName = m_client->imageNameForDisabledState();
+ if (imageName.isEmpty())
+ m_cachedImageForDisabledState = imageForNormalState();
+ else {
+ RefPtr<Image> image = Image::loadPlatformResource(imageName.data());
+ m_cachedImageForDisabledState = new CachedImage(image.get());
+ }
+ }
+ return m_cachedImageForDisabledState.get();
+}
+
+CachedImage* TextFieldDecoratorImpl::imageForReadonlyState()
+{
+ if (!m_cachedImageForReadonlyState) {
+ WebCString imageName = m_client->imageNameForReadOnlyState();
+ if (imageName.isEmpty())
+ m_cachedImageForDisabledState = imageForDisabledState();
+ else {
+ RefPtr<Image> image = Image::loadPlatformResource(imageName.data());
+ m_cachedImageForReadonlyState = new CachedImage(image.get());
+ }
+ }
+ return m_cachedImageForReadonlyState.get();
+}
+
+void TextFieldDecoratorImpl::handleClick(HTMLInputElement* input)
+{
+ ASSERT(input);
+ WebInputElement webInput(input);
+ m_client->handleClick(webInput);
+}
+
+void TextFieldDecoratorImpl::willDetach(HTMLInputElement* input)
+{
+ ASSERT(input);
+ WebInputElement webInput(input);
+ m_client->willDetach(webInput);
+}
+
+}
diff --git a/Source/WebKit/chromium/bridge/MediaStreamCenterInternal.h b/Source/WebKit/chromium/src/TextFieldDecoratorImpl.h
index f5c3d8ada..667475282 100644
--- a/Source/WebKit/chromium/bridge/MediaStreamCenterInternal.h
+++ b/Source/WebKit/chromium/src/TextFieldDecoratorImpl.h
@@ -28,46 +28,37 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MediaStreamCenterInternal_h
-#define MediaStreamCenterInternal_h
+#ifndef TextFieldDecoratorImpl_h
+#define TextFieldDecoratorImpl_h
-#if ENABLE(MEDIA_STREAM)
-
-#include "platform/WebMediaStreamCenterClient.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/PassRefPtr.h>
+#include "CachedResourceHandle.h"
+#include "TextFieldDecorationElement.h"
namespace WebKit {
-class WebMediaStreamCenter;
-}
-namespace WebCore {
+class WebTextFieldDecoratorClient;
-class MediaStreamCenter;
-class MediaStreamComponent;
-class MediaStreamDescriptor;
-class MediaStreamSourcesQueryClient;
-
-class MediaStreamCenterInternal : public WebKit::WebMediaStreamCenterClient {
+class TextFieldDecoratorImpl : public WebCore::TextFieldDecorator {
public:
- explicit MediaStreamCenterInternal(MediaStreamCenter*);
- ~MediaStreamCenterInternal();
+ static PassOwnPtr<TextFieldDecoratorImpl> create(WebTextFieldDecoratorClient*);
+ virtual ~TextFieldDecoratorImpl();
- void queryMediaStreamSources(PassRefPtr<MediaStreamSourcesQueryClient>);
- void didSetMediaStreamTrackEnabled(MediaStreamDescriptor*, MediaStreamComponent*);
- void didStopLocalMediaStream(MediaStreamDescriptor*);
- void didConstructMediaStream(MediaStreamDescriptor*);
+private:
+ virtual bool willAddDecorationTo(WebCore::HTMLInputElement*) OVERRIDE;
+ virtual WebCore::CachedImage* imageForNormalState() OVERRIDE;
+ virtual WebCore::CachedImage* imageForDisabledState() OVERRIDE;
+ virtual WebCore::CachedImage* imageForReadonlyState() OVERRIDE;
+ virtual void handleClick(WebCore::HTMLInputElement*) OVERRIDE;
+ virtual void willDetach(WebCore::HTMLInputElement*) OVERRIDE;
- // From WebKit::WebMediaStreamCenterClient.
- virtual void stopLocalMediaStream(const WebKit::WebMediaStreamDescriptor&);
+ TextFieldDecoratorImpl(WebTextFieldDecoratorClient*);
-private:
- OwnPtr<WebKit::WebMediaStreamCenter> m_private;
- MediaStreamCenter* m_owner;
+ WebTextFieldDecoratorClient* m_client;
+ WebCore::CachedResourceHandle<WebCore::CachedImage> m_cachedImageForNormalState;
+ WebCore::CachedResourceHandle<WebCore::CachedImage> m_cachedImageForDisabledState;
+ WebCore::CachedResourceHandle<WebCore::CachedImage> m_cachedImageForReadonlyState;
};
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM)
+}
-#endif // MediaStreamCenterInternal_h
+#endif // TextFieldDecoratorImpl_h
diff --git a/Source/WebKit/chromium/src/UserMediaClientImpl.cpp b/Source/WebKit/chromium/src/UserMediaClientImpl.cpp
index 9c0bf58e1..ca8a98dcb 100644
--- a/Source/WebKit/chromium/src/UserMediaClientImpl.cpp
+++ b/Source/WebKit/chromium/src/UserMediaClientImpl.cpp
@@ -58,12 +58,6 @@ void UserMediaClientImpl::requestUserMedia(PassRefPtr<UserMediaRequest> prpReque
if (m_client) {
RefPtr<UserMediaRequest> request = prpRequest;
- // FIXME: Cleanup when the chromium code has switched to the split sources implementation.
- MediaStreamSourceVector combinedSources;
- combinedSources.append(audioSources);
- combinedSources.append(videoSources);
- m_client->requestUserMedia(PassRefPtr<UserMediaRequest>(request.get()), combinedSources);
-
m_client->requestUserMedia(request.release(), audioSources, videoSources);
}
}
diff --git a/Source/WebKit/chromium/src/VideoFrameChromiumImpl.cpp b/Source/WebKit/chromium/src/VideoFrameChromiumImpl.cpp
deleted file mode 100644
index fcce939f7..000000000
--- a/Source/WebKit/chromium/src/VideoFrameChromiumImpl.cpp
+++ /dev/null
@@ -1,138 +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 "VideoFrameChromiumImpl.h"
-
-#include "VideoFrameChromium.h"
-#include "WebVideoFrame.h"
-
-using namespace WebCore;
-
-namespace WebKit {
-
-WebVideoFrame* VideoFrameChromiumImpl::toWebVideoFrame(VideoFrameChromium* videoFrame)
-{
- VideoFrameChromiumImpl* wrappedFrame = static_cast<VideoFrameChromiumImpl*>(videoFrame);
- if (wrappedFrame)
- return wrappedFrame->m_webVideoFrame;
- return 0;
-}
-
-VideoFrameChromiumImpl::VideoFrameChromiumImpl(WebVideoFrame* webVideoFrame)
- : m_webVideoFrame(webVideoFrame)
-{
-}
-
-VideoFrameChromium::Format VideoFrameChromiumImpl::format() const
-{
- if (m_webVideoFrame)
- return static_cast<VideoFrameChromium::Format>(m_webVideoFrame->format());
- return Invalid;
-}
-
-unsigned VideoFrameChromiumImpl::width() const
-{
- if (m_webVideoFrame)
- return m_webVideoFrame->width();
- return 0;
-}
-
-unsigned VideoFrameChromiumImpl::width(unsigned plane) const
-{
- unsigned planeWidth = width();
- if (format() == YV12 && plane != static_cast<unsigned>(yPlane))
- planeWidth /= 2;
- return planeWidth;
-}
-
-unsigned VideoFrameChromiumImpl::height() const
-{
- if (m_webVideoFrame)
- return m_webVideoFrame->height();
- return 0;
-}
-
-unsigned VideoFrameChromiumImpl::height(unsigned plane) const
-{
- unsigned planeHeight = height();
- if (format() == YV12 && plane != static_cast<unsigned>(yPlane))
- planeHeight /= 2;
- return planeHeight;
-}
-
-unsigned VideoFrameChromiumImpl::planes() const
-{
- if (m_webVideoFrame)
- return m_webVideoFrame->planes();
- return 0;
-}
-
-int VideoFrameChromiumImpl::stride(unsigned plane) const
-{
- if (m_webVideoFrame)
- return m_webVideoFrame->stride(plane);
- return 0;
-}
-
-const void* VideoFrameChromiumImpl::data(unsigned plane) const
-{
- if (m_webVideoFrame)
- return m_webVideoFrame->data(plane);
- return 0;
-}
-
-const IntSize VideoFrameChromiumImpl::requiredTextureSize(unsigned plane) const
-{
- return IntSize(stride(plane), height(plane));
-}
-
-bool VideoFrameChromiumImpl::hasPaddingBytes(unsigned plane) const
-{
- if (m_webVideoFrame)
- return stride(plane) - width(plane) > 0;
- return false;
-}
-
-unsigned VideoFrameChromiumImpl::textureId() const
-{
- if (m_webVideoFrame)
- return m_webVideoFrame->textureId();
- return 0;
-}
-
-unsigned VideoFrameChromiumImpl::textureTarget() const
-{
- if (m_webVideoFrame)
- return m_webVideoFrame->textureTarget();
- return 0;
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/VideoFrameChromiumImpl.h b/Source/WebKit/chromium/src/VideoFrameChromiumImpl.h
deleted file mode 100644
index 67920866f..000000000
--- a/Source/WebKit/chromium/src/VideoFrameChromiumImpl.h
+++ /dev/null
@@ -1,69 +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 VideoFrameChromiumImpl_h
-#define VideoFrameChromiumImpl_h
-
-#include "VideoFrameChromium.h"
-#include "WebVideoFrame.h"
-
-namespace WebKit {
-
-// A wrapper class for WebKit::WebVideoFrame. Objects can be created in WebKit
-// and used in WebCore because of the VideoFrameChromium interface.
-class VideoFrameChromiumImpl : public WebCore::VideoFrameChromium {
-public:
- // Converts a WebCore::VideoFrameChromium to a WebKit::WebVideoFrame.
- static WebVideoFrame* toWebVideoFrame(WebCore::VideoFrameChromium*);
-
- // Creates a VideoFrameChromiumImpl object to wrap the given WebVideoFrame.
- // The VideoFrameChromiumImpl does not take ownership of the WebVideoFrame
- // and should not free the frame's memory.
- VideoFrameChromiumImpl(WebVideoFrame*);
- virtual Format format() const;
- virtual unsigned width() const;
- virtual unsigned width(unsigned plane) const;
- virtual unsigned height() const;
- virtual unsigned height(unsigned plane) const;
- virtual unsigned planes() const;
- virtual int stride(unsigned plane) const;
- virtual const void* data(unsigned plane) const;
- virtual const WebCore::IntSize requiredTextureSize(unsigned plane) const;
- virtual bool hasPaddingBytes(unsigned plane) const;
- virtual unsigned textureId() const;
- virtual unsigned textureTarget() const;
-
-private:
- WebVideoFrame* m_webVideoFrame;
-};
-
-} // namespace WebKit
-
-#endif
diff --git a/Source/WebKit/chromium/src/WebAccessibilityObject.cpp b/Source/WebKit/chromium/src/WebAccessibilityObject.cpp
index 489347bf2..f556dbdf4 100644
--- a/Source/WebKit/chromium/src/WebAccessibilityObject.cpp
+++ b/Source/WebKit/chromium/src/WebAccessibilityObject.cpp
@@ -493,7 +493,7 @@ WebRect WebAccessibilityObject::boundingBoxRect() const
return WebRect();
m_private->updateBackingStore();
- return m_private->boundingBoxRect();
+ return m_private->pixelSnappedBoundingBoxRect();
}
double WebAccessibilityObject::estimatedLoadingProgress() const
diff --git a/Source/WebKit/chromium/src/WebArrayBuffer.cpp b/Source/WebKit/chromium/src/WebArrayBuffer.cpp
index 888c048e4..d43874b63 100644
--- a/Source/WebKit/chromium/src/WebArrayBuffer.cpp
+++ b/Source/WebKit/chromium/src/WebArrayBuffer.cpp
@@ -31,8 +31,8 @@
#include "config.h"
#include "WebArrayBuffer.h"
-#include "ArrayBuffer.h"
#include "V8ArrayBuffer.h"
+#include <wtf/ArrayBuffer.h>
#include <wtf/PassOwnPtr.h>
using namespace WebCore;
@@ -74,6 +74,14 @@ v8::Handle<v8::Value> WebArrayBuffer::toV8Value()
{
return V8ArrayBuffer::wrap(m_private.get());
}
+
+WebArrayBuffer* WebArrayBuffer::createFromV8Value(v8::Handle<v8::Value> value)
+{
+ if (!V8ArrayBuffer::HasInstance(value))
+ return 0;
+ WTF::ArrayBuffer* buffer = V8ArrayBuffer::toNative(value->ToObject());
+ return new WebArrayBuffer(buffer);
+}
#endif
WebArrayBuffer::WebArrayBuffer(const WTF::PassRefPtr<WTF::ArrayBuffer>& blob)
diff --git a/Source/WebKit/chromium/src/WebArrayBufferView.cpp b/Source/WebKit/chromium/src/WebArrayBufferView.cpp
index f7bb5c9da..5d5f573b9 100644
--- a/Source/WebKit/chromium/src/WebArrayBufferView.cpp
+++ b/Source/WebKit/chromium/src/WebArrayBufferView.cpp
@@ -29,7 +29,8 @@
#include "config.h"
#include "platform/WebArrayBufferView.h"
-#include "ArrayBufferView.h"
+#include "V8ArrayBufferView.h"
+#include <wtf/ArrayBufferView.h>
using namespace WTF;
@@ -60,6 +61,16 @@ unsigned WebArrayBufferView::byteLength() const
return m_private->byteLength();
}
+#if WEBKIT_USING_V8
+WebArrayBufferView* WebArrayBufferView::createFromV8Value(v8::Handle<v8::Value> value)
+{
+ if (!WebCore::V8ArrayBufferView::HasInstance(value))
+ return 0;
+ ArrayBufferView* view = WebCore::V8ArrayBufferView::toNative(value->ToObject());
+ return new WebArrayBufferView(view);
+}
+#endif
+
WebArrayBufferView::WebArrayBufferView(const PassRefPtr<ArrayBufferView>& value)
: m_private(value)
{
diff --git a/Source/WebKit/chromium/src/WebAttribute.cpp b/Source/WebKit/chromium/src/WebAttribute.cpp
deleted file mode 100644
index 500fd3556..000000000
--- a/Source/WebKit/chromium/src/WebAttribute.cpp
+++ /dev/null
@@ -1,67 +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 "WebAttribute.h"
-
-#include "Attribute.h"
-#include "platform/WebString.h"
-#include <wtf/PassRefPtr.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-void WebAttribute::reset()
-{
- m_private.reset();
-}
-
-void WebAttribute::assign(const WebAttribute& other)
-{
- m_private = other.m_private;
-}
-
-WebAttribute::WebAttribute(const PassRefPtr<Attribute>& other)
- : m_private(other)
-{
-}
-
-WebString WebAttribute::localName() const
-{
- return WebString(m_private->localName());
-}
-
-WebString WebAttribute::value() const
-{
- return WebString(m_private->value());
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebAudioBus.cpp b/Source/WebKit/chromium/src/WebAudioBus.cpp
deleted file mode 100644
index cc447ba20..000000000
--- a/Source/WebKit/chromium/src/WebAudioBus.cpp
+++ /dev/null
@@ -1,132 +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:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "platform/WebAudioBus.h"
-
-#if ENABLE(WEB_AUDIO)
-#include "AudioBus.h"
-#else
-namespace WebCore {
-class AudioBus {
-};
-} // namespace WebCore
-#endif
-
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-class WebAudioBusPrivate : public AudioBus {
-};
-
-void WebAudioBus::initialize(unsigned numberOfChannels, size_t length, double sampleRate)
-{
-#if ENABLE(WEB_AUDIO)
- AudioBus* audioBus = new AudioBus(numberOfChannels, length);
- audioBus->setSampleRate(sampleRate);
-
- if (m_private)
- delete m_private;
- m_private = static_cast<WebAudioBusPrivate*>(audioBus);
-#else
- ASSERT_NOT_REACHED();
-#endif
-}
-
-void WebAudioBus::reset()
-{
-#if ENABLE(WEB_AUDIO)
- delete m_private;
- m_private = 0;
-#else
- ASSERT_NOT_REACHED();
-#endif
-}
-
-unsigned WebAudioBus::numberOfChannels() const
-{
-#if ENABLE(WEB_AUDIO)
- if (!m_private)
- return 0;
- return m_private->numberOfChannels();
-#else
- ASSERT_NOT_REACHED();
- return 0;
-#endif
-}
-
-size_t WebAudioBus::length() const
-{
-#if ENABLE(WEB_AUDIO)
- if (!m_private)
- return 0;
- return m_private->length();
-#else
- ASSERT_NOT_REACHED();
- return 0;
-#endif
-}
-
-double WebAudioBus::sampleRate() const
-{
-#if ENABLE(WEB_AUDIO)
- if (!m_private)
- return 0;
- return m_private->sampleRate();
-#else
- ASSERT_NOT_REACHED();
- return 0;
-#endif
-}
-
-float* WebAudioBus::channelData(unsigned channelIndex)
-{
-#if ENABLE(WEB_AUDIO)
- if (!m_private)
- return 0;
- ASSERT(channelIndex < numberOfChannels());
- return m_private->channel(channelIndex)->mutableData();
-#else
- ASSERT_NOT_REACHED();
- return 0;
-#endif
-}
-
-PassOwnPtr<AudioBus> WebAudioBus::release()
-{
-#if ENABLE(WEB_AUDIO)
- OwnPtr<AudioBus> audioBus(adoptPtr(static_cast<AudioBus*>(m_private)));
- m_private = 0;
- return audioBus.release();
-#else
- ASSERT_NOT_REACHED();
- return nullptr;
-#endif
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebBindings.cpp b/Source/WebKit/chromium/src/WebBindings.cpp
index e69100ab1..c4f40df3d 100644
--- a/Source/WebKit/chromium/src/WebBindings.cpp
+++ b/Source/WebKit/chromium/src/WebBindings.cpp
@@ -35,7 +35,7 @@
#include "npruntime_priv.h"
#if USE(V8)
-#include "ArrayBufferView.h"
+#include <wtf/ArrayBufferView.h>
#include "DOMWindow.h"
#include "NPV8Object.h" // for PrivateIdentifier
#include "Range.h"
diff --git a/Source/WebKit/chromium/src/WebColorChooserClientImpl.cpp b/Source/WebKit/chromium/src/WebColorChooserClientImpl.cpp
index c4f8e69a4..c7ec47149 100644
--- a/Source/WebKit/chromium/src/WebColorChooserClientImpl.cpp
+++ b/Source/WebKit/chromium/src/WebColorChooserClientImpl.cpp
@@ -29,7 +29,7 @@
#include "Color.h"
#include "ColorChooserClient.h"
-#if ENABLE(INPUT_COLOR)
+#if ENABLE(INPUT_TYPE_COLOR)
namespace WebKit {
@@ -57,4 +57,4 @@ void WebColorChooserClientImpl::didEndChooser()
}
-#endif // ENABLE(INPUT_COLOR)
+#endif // ENABLE(INPUT_TYPE_COLOR)
diff --git a/Source/WebKit/chromium/src/WebColorChooserClientImpl.h b/Source/WebKit/chromium/src/WebColorChooserClientImpl.h
index bf735d89d..d5a085da8 100644
--- a/Source/WebKit/chromium/src/WebColorChooserClientImpl.h
+++ b/Source/WebKit/chromium/src/WebColorChooserClientImpl.h
@@ -28,7 +28,7 @@
#include "WebColorChooserClient.h"
-#if ENABLE(INPUT_COLOR)
+#if ENABLE(INPUT_TYPE_COLOR)
namespace WebCore {
class ColorChooserClient;
@@ -50,6 +50,6 @@ private:
}
-#endif // ENABLE(INPUT_COLOR)
+#endif // ENABLE(INPUT_TYPE_COLOR)
#endif // WebColorChooserClientImpl_h
diff --git a/Source/WebKit/chromium/src/WebColorName.cpp b/Source/WebKit/chromium/src/WebColorName.cpp
index 04d8ed8a8..984afe7b2 100644
--- a/Source/WebKit/chromium/src/WebColorName.cpp
+++ b/Source/WebKit/chromium/src/WebColorName.cpp
@@ -34,7 +34,7 @@
#include "CSSValueKeywords.h"
#include "Color.h"
#include "RenderTheme.h"
-#include "UnusedParam.h"
+#include <wtf/UnusedParam.h>
#include <public/WebColor.h>
using namespace::WebCore;
diff --git a/Source/WebKit/chromium/src/WebCompositorImpl.cpp b/Source/WebKit/chromium/src/WebCompositorImpl.cpp
index 07361ed78..91d8b1be6 100644
--- a/Source/WebKit/chromium/src/WebCompositorImpl.cpp
+++ b/Source/WebKit/chromium/src/WebCompositorImpl.cpp
@@ -58,7 +58,7 @@ void WebCompositorImpl::initialize(WebThread* implThread)
ASSERT(!s_initialized);
s_initialized = true;
- s_mainThread = CCThreadImpl::create(webKitPlatformSupport()->currentThread()).leakPtr();
+ s_mainThread = CCThreadImpl::create(WebKit::Platform::current()->currentThread()).leakPtr();
CCProxy::setMainThread(s_mainThread);
if (implThread) {
s_implThread = CCThreadImpl::create(implThread).leakPtr();
diff --git a/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp b/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp
index c2dbee3b4..8e0c613a4 100644
--- a/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp
@@ -27,12 +27,16 @@
#include "WebCompositorInputHandlerImpl.h"
+#include "PlatformGestureCurveTarget.h"
+#include "TouchpadFlingPlatformGestureCurve.h"
+#include "TraceEvent.h"
#include "WebCompositorImpl.h"
#include "WebCompositorInputHandlerClient.h"
#include "WebInputEvent.h"
#include "WebKit.h"
-#include "platform/WebKitPlatformSupport.h"
+#include "cc/CCActiveGestureAnimation.h"
#include "cc/CCProxy.h"
+#include "platform/WebKitPlatformSupport.h"
#include <wtf/ThreadingPrimitives.h>
using namespace WebCore;
@@ -44,6 +48,42 @@ PassOwnPtr<CCInputHandler> CCInputHandler::create(CCInputHandlerClient* inputHan
return WebKit::WebCompositorInputHandlerImpl::create(inputHandlerClient);
}
+class PlatformGestureToCCGestureAdapter : public CCGestureCurve, public PlatformGestureCurveTarget {
+public:
+ static PassOwnPtr<CCGestureCurve> create(PassOwnPtr<PlatformGestureCurve> platformCurve)
+ {
+ return adoptPtr(new PlatformGestureToCCGestureAdapter(platformCurve));
+ }
+
+ virtual const char* debugName() const
+ {
+ return m_curve->debugName();
+ }
+
+ virtual bool apply(double time, CCGestureCurveTarget* target)
+ {
+ ASSERT(target);
+ m_target = target;
+ return m_curve->apply(time, this);
+ }
+
+ virtual void scrollBy(const IntPoint& scrollDelta)
+ {
+ ASSERT(m_target);
+ m_target->scrollBy(scrollDelta);
+ }
+
+private:
+ PlatformGestureToCCGestureAdapter(PassOwnPtr<PlatformGestureCurve> curve)
+ : m_curve(curve)
+ , m_target(0)
+ {
+ }
+
+ OwnPtr<PlatformGestureCurve> m_curve;
+ CCGestureCurveTarget* m_target;
+};
+
}
namespace WebKit {
@@ -52,9 +92,9 @@ namespace WebKit {
int WebCompositorInputHandlerImpl::s_nextAvailableIdentifier = 1;
HashSet<WebCompositorInputHandlerImpl*>* WebCompositorInputHandlerImpl::s_compositors = 0;
-WebCompositor* WebCompositorInputHandler::fromIdentifier(int identifier)
+WebCompositorInputHandler* WebCompositorInputHandler::fromIdentifier(int identifier)
{
- return static_cast<WebCompositor*>(WebCompositorInputHandlerImpl::fromIdentifier(identifier));
+ return WebCompositorInputHandlerImpl::fromIdentifier(identifier);
}
PassOwnPtr<WebCompositorInputHandlerImpl> WebCompositorInputHandlerImpl::create(WebCore::CCInputHandlerClient* inputHandlerClient)
@@ -85,7 +125,7 @@ WebCompositorInputHandlerImpl::WebCompositorInputHandlerImpl(CCInputHandlerClien
, m_expectScrollUpdateEnd(false)
, m_expectPinchUpdateEnd(false)
#endif
- , m_scrollStarted(false)
+ , m_gestureScrollStarted(false)
{
ASSERT(CCProxy::isImplThread());
@@ -121,23 +161,41 @@ void WebCompositorInputHandlerImpl::handleInputEvent(const WebInputEvent& event)
ASSERT(CCProxy::isImplThread());
ASSERT(m_client);
+ WebCompositorInputHandlerImpl::EventDisposition disposition = handleInputEventInternal(event);
+ switch (disposition) {
+ case DidHandle:
+ m_client->didHandleInputEvent();
+ break;
+ case DidNotHandle:
+ m_client->didNotHandleInputEvent(true /* sendToWidget */);
+ break;
+ case DropEvent:
+ m_client->didNotHandleInputEvent(false /* sendToWidget */);
+ break;
+ }
+}
+
+WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::handleInputEventInternal(const WebInputEvent& event)
+{
if (event.type == WebInputEvent::MouseWheel) {
const WebMouseWheelEvent& wheelEvent = *static_cast<const WebMouseWheelEvent*>(&event);
CCInputHandlerClient::ScrollStatus scrollStatus = m_inputHandlerClient->scrollBegin(IntPoint(wheelEvent.x, wheelEvent.y), CCInputHandlerClient::Wheel);
switch (scrollStatus) {
- case CCInputHandlerClient::ScrollStarted:
+ case CCInputHandlerClient::ScrollStarted: {
+ TRACE_EVENT_INSTANT2("cc", "WebCompositorInputHandlerImpl::handleInput wheel scroll", "deltaX", -wheelEvent.deltaX, "deltaY", -wheelEvent.deltaY);
m_inputHandlerClient->scrollBy(IntSize(-wheelEvent.deltaX, -wheelEvent.deltaY));
m_inputHandlerClient->scrollEnd();
- m_client->didHandleInputEvent();
- return;
+ return DidHandle;
+ }
case CCInputHandlerClient::ScrollIgnored:
- m_client->didNotHandleInputEvent(false /* sendToWidget */);
- return;
+ // FIXME: This should be DropEvent, but in cases where we fail to properly sync scrollability it's safer to send the
+ // event to the main thread. Change back to DropEvent once we have synchronization bugs sorted out.
+ return DidNotHandle;
case CCInputHandlerClient::ScrollFailed:
- break;
+ return DidNotHandle;
}
} else if (event.type == WebInputEvent::GestureScrollBegin) {
- ASSERT(!m_scrollStarted);
+ ASSERT(!m_gestureScrollStarted);
ASSERT(!m_expectScrollUpdateEnd);
#ifndef NDEBUG
m_expectScrollUpdateEnd = true;
@@ -146,58 +204,92 @@ void WebCompositorInputHandlerImpl::handleInputEvent(const WebInputEvent& event)
CCInputHandlerClient::ScrollStatus scrollStatus = m_inputHandlerClient->scrollBegin(IntPoint(gestureEvent.x, gestureEvent.y), CCInputHandlerClient::Gesture);
switch (scrollStatus) {
case CCInputHandlerClient::ScrollStarted:
- m_scrollStarted = true;
- m_client->didHandleInputEvent();
- return;
- case CCInputHandlerClient::ScrollIgnored:
- m_client->didNotHandleInputEvent(false /* sendToWidget */);
- return;
+ m_gestureScrollStarted = true;
+ return DidHandle;
case CCInputHandlerClient::ScrollFailed:
- break;
+ return DidNotHandle;
+ case CCInputHandlerClient::ScrollIgnored:
+ return DropEvent;
}
} else if (event.type == WebInputEvent::GestureScrollUpdate) {
ASSERT(m_expectScrollUpdateEnd);
- if (m_scrollStarted) {
- const WebGestureEvent& gestureEvent = *static_cast<const WebGestureEvent*>(&event);
- m_inputHandlerClient->scrollBy(IntSize(-gestureEvent.deltaX, -gestureEvent.deltaY));
- m_client->didHandleInputEvent();
- return;
- }
+
+ if (!m_gestureScrollStarted)
+ return DidNotHandle;
+
+ const WebGestureEvent& gestureEvent = *static_cast<const WebGestureEvent*>(&event);
+ m_inputHandlerClient->scrollBy(IntSize(-gestureEvent.deltaX, -gestureEvent.deltaY));
+ return DidHandle;
} else if (event.type == WebInputEvent::GestureScrollEnd) {
ASSERT(m_expectScrollUpdateEnd);
#ifndef NDEBUG
m_expectScrollUpdateEnd = false;
#endif
- if (m_scrollStarted) {
- m_inputHandlerClient->scrollEnd();
- m_client->didHandleInputEvent();
- m_scrollStarted = false;
- return;
- }
+ if (!m_gestureScrollStarted)
+ return DidNotHandle;
+
+ m_inputHandlerClient->scrollEnd();
+ m_gestureScrollStarted = false;
+ return DidHandle;
} else if (event.type == WebInputEvent::GesturePinchBegin) {
ASSERT(!m_expectPinchUpdateEnd);
#ifndef NDEBUG
m_expectPinchUpdateEnd = true;
#endif
m_inputHandlerClient->pinchGestureBegin();
- m_client->didHandleInputEvent();
- return;
+ return DidHandle;
} else if (event.type == WebInputEvent::GesturePinchEnd) {
ASSERT(m_expectPinchUpdateEnd);
#ifndef NDEBUG
m_expectPinchUpdateEnd = false;
#endif
m_inputHandlerClient->pinchGestureEnd();
- m_client->didHandleInputEvent();
- return;
+ return DidHandle;
} else if (event.type == WebInputEvent::GesturePinchUpdate) {
ASSERT(m_expectPinchUpdateEnd);
const WebGestureEvent& gestureEvent = *static_cast<const WebGestureEvent*>(&event);
m_inputHandlerClient->pinchGestureUpdate(gestureEvent.deltaX, IntPoint(gestureEvent.x, gestureEvent.y));
- m_client->didHandleInputEvent();
- return;
+ return DidHandle;
+ } else if (event.type == WebInputEvent::GestureFlingStart) {
+ const WebGestureEvent& gestureEvent = *static_cast<const WebGestureEvent*>(&event);
+ return handleGestureFling(gestureEvent);
+ } else if (event.type == WebInputEvent::GestureFlingCancel) {
+ if (cancelCurrentFling())
+ return DidHandle;
+ } else if (WebInputEvent::isKeyboardEventType(event.type)) {
+ cancelCurrentFling();
+ }
+
+ return DidNotHandle;
+}
+
+WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::handleGestureFling(const WebGestureEvent& gestureEvent)
+{
+ CCInputHandlerClient::ScrollStatus scrollStatus = m_inputHandlerClient->scrollBegin(IntPoint(gestureEvent.x, gestureEvent.y), CCInputHandlerClient::Wheel);
+ switch (scrollStatus) {
+ case CCInputHandlerClient::ScrollStarted: {
+ TRACE_EVENT_INSTANT0("cc", "WebCompositorInputHandlerImpl::handleGestureFling::started");
+ OwnPtr<PlatformGestureCurve> flingCurve = TouchpadFlingPlatformGestureCurve::create(FloatPoint(gestureEvent.deltaX, gestureEvent.deltaY));
+ m_wheelFlingAnimation = CCActiveGestureAnimation::create(PlatformGestureToCCGestureAdapter::create(flingCurve.release()), this);
+ m_wheelFlingParameters.delta = WebFloatPoint(gestureEvent.deltaX, gestureEvent.deltaY);
+ m_wheelFlingParameters.point = WebPoint(gestureEvent.x, gestureEvent.y);
+ m_wheelFlingParameters.globalPoint = WebPoint(gestureEvent.globalX, gestureEvent.globalY);
+ m_wheelFlingParameters.modifiers = gestureEvent.modifiers;
+ m_inputHandlerClient->scheduleAnimation();
+ return DidHandle;
+ }
+ case CCInputHandlerClient::ScrollFailed: {
+ TRACE_EVENT_INSTANT0("cc", "WebCompositorInputHandlerImpl::handleGestureFling::failed");
+ return DidNotHandle;
+ }
+ case CCInputHandlerClient::ScrollIgnored: {
+ TRACE_EVENT_INSTANT0("cc", "WebCompositorInputHandlerImpl::handleGestureFling::ignored");
+ // We still pass the curve to the main thread if there's nothing scrollable, in case something
+ // registers a handler before the curve is over.
+ return DidNotHandle;
+ }
}
- m_client->didNotHandleInputEvent(true /* sendToWidget */);
+ return DidNotHandle;
}
int WebCompositorInputHandlerImpl::identifier() const
@@ -206,8 +298,67 @@ int WebCompositorInputHandlerImpl::identifier() const
return m_identifier;
}
-void WebCompositorInputHandlerImpl::willDraw(double monotonicTime)
+void WebCompositorInputHandlerImpl::animate(double monotonicTime)
{
+ if (!m_wheelFlingAnimation)
+ return;
+
+ if (!m_wheelFlingParameters.startTime)
+ m_wheelFlingParameters.startTime = monotonicTime;
+
+ if (m_wheelFlingAnimation->animate(monotonicTime))
+ m_inputHandlerClient->scheduleAnimation();
+ else {
+ TRACE_EVENT_INSTANT0("cc", "WebCompositorInputHandlerImpl::animate::flingOver");
+ cancelCurrentFling();
+ }
+}
+
+bool WebCompositorInputHandlerImpl::cancelCurrentFling()
+{
+ bool hadFlingAnimation = m_wheelFlingAnimation;
+ TRACE_EVENT_INSTANT1("cc", "WebCompositorInputHandlerImpl::cancelCurrentFling", "hadFlingAnimation", hadFlingAnimation);
+ m_wheelFlingAnimation.clear();
+ m_wheelFlingParameters = WebActiveWheelFlingParameters();
+ return hadFlingAnimation;
+}
+
+void WebCompositorInputHandlerImpl::scrollBy(const IntPoint& increment)
+{
+ if (increment == IntPoint::zero())
+ return;
+
+ TRACE_EVENT2("cc", "WebCompositorInputHandlerImpl::scrollBy", "x", increment.x(), "y", increment.y());
+ WebMouseWheelEvent syntheticWheel;
+ syntheticWheel.type = WebInputEvent::MouseWheel;
+ syntheticWheel.deltaX = increment.x();
+ syntheticWheel.deltaY = increment.y();
+ syntheticWheel.hasPreciseScrollingDeltas = true;
+ syntheticWheel.x = m_wheelFlingParameters.point.x;
+ syntheticWheel.y = m_wheelFlingParameters.point.y;
+ syntheticWheel.globalX = m_wheelFlingParameters.globalPoint.x;
+ syntheticWheel.globalY = m_wheelFlingParameters.globalPoint.y;
+ syntheticWheel.modifiers = m_wheelFlingParameters.modifiers;
+
+ WebCompositorInputHandlerImpl::EventDisposition disposition = handleInputEventInternal(syntheticWheel);
+ switch (disposition) {
+ case DidHandle:
+ m_wheelFlingParameters.cumulativeScroll.width += increment.x();
+ m_wheelFlingParameters.cumulativeScroll.height += increment.y();
+ case DropEvent:
+ break;
+ case DidNotHandle:
+ TRACE_EVENT_INSTANT0("cc", "WebCompositorInputHandlerImpl::scrollBy::AbortFling");
+ // If we got a DidNotHandle, that means we need to deliver wheels on the main thread.
+ // In this case we need to schedule a commit and transfer the fling curve over to the main
+ // thread and run the rest of the wheels from there.
+ // This can happen when flinging a page that contains a scrollable subarea that we can't
+ // scroll on the thread if the fling starts outside the subarea but then is flung "under" the
+ // pointer.
+ m_client->transferActiveWheelFlingAnimation(m_wheelFlingParameters);
+ cancelCurrentFling();
+ break;
+ }
}
}
diff --git a/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.h b/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.h
index 83b4bd546..64647105b 100644
--- a/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.h
+++ b/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.h
@@ -26,8 +26,11 @@
#ifndef WebCompositorInputHandlerImpl_h
#define WebCompositorInputHandlerImpl_h
+#include "WebActiveWheelFlingParameters.h"
#include "WebCompositor.h"
#include "WebCompositorInputHandler.h"
+#include "WebInputEvent.h"
+#include "cc/CCGestureCurve.h"
#include "cc/CCInputHandler.h"
#include <wtf/HashSet.h>
#include <wtf/Noncopyable.h>
@@ -38,6 +41,8 @@ class Mutex;
}
namespace WebCore {
+class IntPoint;
+class CCGestureCurveTarget;
class CCInputHandlerClient;
class CCThread;
}
@@ -46,8 +51,7 @@ namespace WebKit {
class WebCompositorInputHandlerClient;
-// Temporarily subclassing from WebCompositor while downstream changes land.
-class WebCompositorInputHandlerImpl : public WebCompositor, public WebCore::CCInputHandler {
+class WebCompositorInputHandlerImpl : public WebCompositorInputHandler, public WebCore::CCInputHandler, public WebCore::CCGestureCurveTarget {
WTF_MAKE_NONCOPYABLE(WebCompositorInputHandlerImpl);
public:
static PassOwnPtr<WebCompositorInputHandlerImpl> create(WebCore::CCInputHandlerClient*);
@@ -55,17 +59,34 @@ public:
virtual ~WebCompositorInputHandlerImpl();
- // WebCompositor implementation
+ // WebCompositorInputHandler implementation.
virtual void setClient(WebCompositorInputHandlerClient*);
virtual void handleInputEvent(const WebInputEvent&);
- // WebCore::CCInputHandler implementation
+ // WebCore::CCInputHandler implementation.
virtual int identifier() const;
- virtual void willDraw(double monotonicTime);
+ virtual void animate(double monotonicTime);
+
+ // WebCore::CCGestureCurveTarget implementation.
+ virtual void scrollBy(const WebCore::IntPoint&);
private:
explicit WebCompositorInputHandlerImpl(WebCore::CCInputHandlerClient*);
+ enum EventDisposition { DidHandle, DidNotHandle, DropEvent };
+ // This function processes the input event and determines the disposition, but does not make
+ // any calls out to the WebCompositorInputHandlerClient. Some input types defer to helpers.
+ EventDisposition handleInputEventInternal(const WebInputEvent&);
+
+ EventDisposition handleGestureFling(const WebGestureEvent&);
+
+ // Returns true if we actually had an active fling to cancel.
+ bool cancelCurrentFling();
+
+ OwnPtr<WebCore::CCActiveGestureAnimation> m_wheelFlingAnimation;
+ // Parameters for the active fling animation, stored in case we need to transfer it out later.
+ WebActiveWheelFlingParameters m_wheelFlingParameters;
+
WebCompositorInputHandlerClient* m_client;
int m_identifier;
WebCore::CCInputHandlerClient* m_inputHandlerClient;
@@ -74,7 +95,7 @@ private:
bool m_expectScrollUpdateEnd;
bool m_expectPinchUpdateEnd;
#endif
- bool m_scrollStarted;
+ bool m_gestureScrollStarted;
static int s_nextAvailableIdentifier;
static HashSet<WebCompositorInputHandlerImpl*>* s_compositors;
diff --git a/Source/WebKit/chromium/src/WebContentLayer.cpp b/Source/WebKit/chromium/src/WebContentLayer.cpp
index 7b37333e5..5290e2f35 100644
--- a/Source/WebKit/chromium/src/WebContentLayer.cpp
+++ b/Source/WebKit/chromium/src/WebContentLayer.cpp
@@ -46,16 +46,6 @@ bool WebContentLayer::drawsContent() const
return constUnwrap<WebContentLayerImpl>()->drawsContent();
}
-void WebContentLayer::invalidateRect(const WebFloatRect& dirtyRect)
-{
- unwrap<WebContentLayerImpl>()->setNeedsDisplayRect(dirtyRect);
-}
-
-void WebContentLayer::invalidate()
-{
- unwrap<WebContentLayerImpl>()->setNeedsDisplay();
-}
-
WebContentLayer::WebContentLayer(const PassRefPtr<WebContentLayerImpl>& node)
: WebLayer(node)
{
diff --git a/Source/WebKit/chromium/src/WebData.cpp b/Source/WebKit/chromium/src/WebData.cpp
deleted file mode 100644
index 53f447402..000000000
--- a/Source/WebKit/chromium/src/WebData.cpp
+++ /dev/null
@@ -1,103 +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 "platform/WebData.h"
-
-#include "SharedBuffer.h"
-
-using namespace WebCore;
-
-namespace WebKit {
-
-class WebDataPrivate : public SharedBuffer {
-};
-
-void WebData::reset()
-{
- if (m_private) {
- m_private->deref();
- m_private = 0;
- }
-}
-
-void WebData::assign(const WebData& other)
-{
- WebDataPrivate* p = const_cast<WebDataPrivate*>(other.m_private);
- if (p)
- p->ref();
- assign(p);
-}
-
-void WebData::assign(const char* data, size_t size)
-{
- assign(static_cast<WebDataPrivate*>(
- SharedBuffer::create(data, size).leakRef()));
-}
-
-size_t WebData::size() const
-{
- if (!m_private)
- return 0;
- return const_cast<WebDataPrivate*>(m_private)->size();
-}
-
-const char* WebData::data() const
-{
- if (!m_private)
- return 0;
- return const_cast<WebDataPrivate*>(m_private)->data();
-}
-
-WebData::WebData(const PassRefPtr<SharedBuffer>& buffer)
- : m_private(static_cast<WebDataPrivate*>(buffer.leakRef()))
-{
-}
-
-WebData& WebData::operator=(const PassRefPtr<SharedBuffer>& buffer)
-{
- assign(static_cast<WebDataPrivate*>(buffer.leakRef()));
- return *this;
-}
-
-WebData::operator PassRefPtr<SharedBuffer>() const
-{
- return PassRefPtr<SharedBuffer>(const_cast<WebDataPrivate*>(m_private));
-}
-
-void WebData::assign(WebDataPrivate* p)
-{
- // p is already ref'd for us by the caller
- if (m_private)
- m_private->deref();
- m_private = p;
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebDatabase.cpp b/Source/WebKit/chromium/src/WebDatabase.cpp
index 9ea6ee9b5..d8eb64da4 100644
--- a/Source/WebKit/chromium/src/WebDatabase.cpp
+++ b/Source/WebKit/chromium/src/WebDatabase.cpp
@@ -48,6 +48,7 @@ public:
String displayName() const { return String(); }
unsigned long long estimatedSize() const { return 0; }
SecurityOrigin* securityOrigin() const { return 0; }
+ bool isSyncDatabase() const { return false; }
};
}
#endif // !ENABLE(SQL_DATABASE)
diff --git a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
index 52eb37400..d39ff8af9 100644
--- a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
+++ b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
@@ -32,6 +32,8 @@
#include "WebDevToolsAgentImpl.h"
#include "ExceptionCode.h"
+#include "Frame.h"
+#include "FrameView.h"
#include "GraphicsContext.h"
#include "InjectedScriptHost.h"
#include "InspectorBackendDispatcher.h"
@@ -45,6 +47,7 @@
#include "PageScriptDebugServer.h"
#include "painting/GraphicsContextBuilder.h"
#include "PlatformString.h"
+#include "RenderView.h"
#include "ResourceError.h"
#include "ResourceRequest.h"
#include "ResourceResponse.h"
@@ -63,10 +66,19 @@
#include "WebViewClient.h"
#include "WebViewImpl.h"
#include <wtf/CurrentTime.h>
+#include <wtf/MathExtras.h>
#include <wtf/Noncopyable.h>
#include <wtf/OwnPtr.h>
using namespace WebCore;
+using namespace std;
+
+namespace OverlayZOrders {
+static const int viewportGutter = 97;
+
+// Use 99 as a big z-order number so that highlight is above other overlays.
+static const int highlight = 99;
+}
namespace WebKit {
@@ -173,6 +185,190 @@ private:
OwnPtr<WebDevToolsAgent::MessageDescriptor> m_descriptor;
};
+class DeviceMetricsSupport : public WebPageOverlay {
+public:
+ DeviceMetricsSupport(WebViewImpl* webView)
+ : m_webView(webView)
+ , m_fitWindow(false)
+ , m_originalZoomFactor(0)
+ {
+ m_webView->addPageOverlay(this, OverlayZOrders::viewportGutter);
+ }
+
+ ~DeviceMetricsSupport()
+ {
+ restore();
+ m_webView->removePageOverlay(this);
+ }
+
+ void setDeviceMetrics(int width, int height, float textZoomFactor, bool fitWindow)
+ {
+ WebCore::FrameView* view = frameView();
+ if (!view)
+ return;
+
+ m_emulatedFrameSize = WebSize(width, height);
+ m_fitWindow = fitWindow;
+ m_originalZoomFactor = 0;
+ m_webView->setEmulatedTextZoomFactor(textZoomFactor);
+ applySizeOverrideInternal(view, FitWindowAllowed);
+ autoZoomPageToFitWidth(view->frame());
+
+ m_webView->sendResizeEventAndRepaint();
+ }
+
+ void autoZoomPageToFitWidthOnNavigation(Frame* frame)
+ {
+ FrameView* frameView = frame->view();
+ applySizeOverrideInternal(frameView, FitWindowNotAllowed);
+ m_originalZoomFactor = 0;
+ applySizeOverrideInternal(frameView, FitWindowAllowed);
+ autoZoomPageToFitWidth(frame);
+ }
+
+ void autoZoomPageToFitWidth(Frame* frame)
+ {
+ if (!frame)
+ return;
+
+ frame->setTextZoomFactor(m_webView->emulatedTextZoomFactor());
+ WebSize scaledFrameSize = scaledEmulatedFrameSize(frame->view());
+ ensureOriginalZoomFactor(frame->view());
+ double sizeRatio = static_cast<double>(scaledFrameSize.width) / m_emulatedFrameSize.width;
+ frame->setPageAndTextZoomFactors(sizeRatio * m_originalZoomFactor, m_webView->emulatedTextZoomFactor());
+ Document* doc = frame->document();
+ doc->styleResolverChanged(RecalcStyleImmediately);
+ doc->updateLayout();
+ }
+
+ void webViewResized()
+ {
+ if (!m_fitWindow)
+ return;
+
+ applySizeOverrideIfNecessary();
+ autoZoomPageToFitWidth(m_webView->mainFrameImpl()->frame());
+ }
+
+ void applySizeOverrideIfNecessary()
+ {
+ FrameView* view = frameView();
+ if (!view)
+ return;
+
+ applySizeOverrideInternal(view, FitWindowAllowed);
+ }
+
+private:
+ enum FitWindowFlag { FitWindowAllowed, FitWindowNotAllowed };
+
+ void ensureOriginalZoomFactor(FrameView* frameView)
+ {
+ if (m_originalZoomFactor)
+ return;
+
+ m_webView->setPageScaleFactor(1, WebPoint());
+ m_webView->setZoomLevel(false, 0);
+ WebSize scaledEmulatedSize = scaledEmulatedFrameSize(frameView);
+ Document* document = frameView->frame()->document();
+ double denominator = document->renderView() ? document->renderView()->viewWidth() : frameView->contentsWidth();
+ if (!denominator)
+ denominator = 1;
+ m_originalZoomFactor = static_cast<double>(scaledEmulatedSize.width) / denominator;
+ }
+
+ void restore()
+ {
+ WebCore::FrameView* view = frameView();
+ if (!view)
+ return;
+
+ m_webView->setZoomLevel(false, 0);
+ m_webView->setEmulatedTextZoomFactor(1);
+ view->setHorizontalScrollbarLock(false);
+ view->setVerticalScrollbarLock(false);
+ view->setScrollbarModes(ScrollbarAuto, ScrollbarAuto, false, false);
+ view->resize(IntSize(m_webView->size()));
+ m_webView->sendResizeEventAndRepaint();
+ }
+
+ WebSize scaledEmulatedFrameSize(FrameView* frameView)
+ {
+ if (!m_fitWindow)
+ return m_emulatedFrameSize;
+
+ WebSize scrollbarDimensions = forcedScrollbarDimensions(frameView);
+
+ int overrideWidth = m_emulatedFrameSize.width;
+ int overrideHeight = m_emulatedFrameSize.height;
+
+ WebSize webViewSize = m_webView->size();
+ int availableViewWidth = max(webViewSize.width - scrollbarDimensions.width, 1);
+ int availableViewHeight = max(webViewSize.height - scrollbarDimensions.height, 1);
+
+ double widthRatio = static_cast<double>(overrideWidth) / availableViewWidth;
+ double heightRatio = static_cast<double>(overrideHeight) / availableViewHeight;
+ double dimensionRatio = max(widthRatio, heightRatio);
+ overrideWidth = static_cast<int>(ceil(static_cast<double>(overrideWidth) / dimensionRatio));
+ overrideHeight = static_cast<int>(ceil(static_cast<double>(overrideHeight) / dimensionRatio));
+
+ return WebSize(overrideWidth, overrideHeight);
+ }
+
+ WebSize forcedScrollbarDimensions(FrameView* frameView)
+ {
+ frameView->setScrollbarModes(ScrollbarAlwaysOn, ScrollbarAlwaysOn, true, true);
+
+ int verticalScrollbarWidth = 0;
+ int horizontalScrollbarHeight = 0;
+ if (Scrollbar* verticalBar = frameView->verticalScrollbar())
+ verticalScrollbarWidth = !verticalBar->isOverlayScrollbar() ? verticalBar->width() : 0;
+ if (Scrollbar* horizontalBar = frameView->horizontalScrollbar())
+ horizontalScrollbarHeight = !horizontalBar->isOverlayScrollbar() ? horizontalBar->height() : 0;
+ return WebSize(verticalScrollbarWidth, horizontalScrollbarHeight);
+ }
+
+ void applySizeOverrideInternal(FrameView* frameView, FitWindowFlag fitWindowFlag)
+ {
+ WebSize scrollbarDimensions = forcedScrollbarDimensions(frameView);
+
+ WebSize effectiveEmulatedSize = (fitWindowFlag == FitWindowAllowed) ? scaledEmulatedFrameSize(frameView) : m_emulatedFrameSize;
+ int overrideWidth = effectiveEmulatedSize.width + scrollbarDimensions.width;
+ int overrideHeight = effectiveEmulatedSize.height + scrollbarDimensions.height;
+
+ if (IntSize(overrideWidth, overrideHeight) != frameView->size())
+ frameView->resize(overrideWidth, overrideHeight);
+
+ Document* doc = frameView->frame()->document();
+ doc->styleResolverChanged(RecalcStyleImmediately);
+ doc->updateLayout();
+ }
+
+ virtual void paintPageOverlay(WebCanvas* canvas)
+ {
+ FrameView* frameView = this->frameView();
+ if (!frameView)
+ return;
+
+ GraphicsContextBuilder builder(canvas);
+ GraphicsContext& gc = builder.context();
+ gc.clipOut(IntRect(IntPoint(), frameView->size()));
+ gc.setFillColor(Color::darkGray, ColorSpaceDeviceRGB);
+ gc.drawRect(IntRect(IntPoint(), m_webView->size()));
+ }
+
+ WebCore::FrameView* frameView()
+ {
+ return m_webView->mainFrameImpl() ? m_webView->mainFrameImpl()->frameView() : 0;
+ }
+
+ WebViewImpl* m_webView;
+ WebSize m_emulatedFrameSize;
+ bool m_fitWindow;
+ double m_originalZoomFactor;
+};
+
+
WebDevToolsAgentImpl::WebDevToolsAgentImpl(
WebViewImpl* webViewImpl,
WebDevToolsAgentClient* client)
@@ -224,13 +420,51 @@ void WebDevToolsAgentImpl::didNavigate()
ClientMessageLoopAdapter::didNavigate();
}
-void WebDevToolsAgentImpl::didClearWindowObject(WebFrameImpl* webframe)
+void WebDevToolsAgentImpl::didCreateScriptContext(WebFrameImpl* webframe, int worldId)
{
- WebCore::V8Proxy* proxy = WebCore::V8Proxy::retrieve(webframe->frame());
- if (proxy && webframe->frame()->script()->canExecuteScripts(NotAboutToExecuteScript))
+ // Skip non main world contexts.
+ if (worldId)
+ return;
+ if (WebCore::V8Proxy* proxy = WebCore::V8Proxy::retrieve(webframe->frame()))
proxy->setContextDebugId(m_hostId);
}
+void WebDevToolsAgentImpl::mainFrameViewCreated(WebFrameImpl* webFrame)
+{
+ if (m_metricsSupport)
+ m_metricsSupport->applySizeOverrideIfNecessary();
+}
+
+bool WebDevToolsAgentImpl::metricsOverridden()
+{
+ return !!m_metricsSupport;
+}
+
+void WebDevToolsAgentImpl::webViewResized()
+{
+ if (m_metricsSupport)
+ m_metricsSupport->webViewResized();
+}
+
+void WebDevToolsAgentImpl::overrideDeviceMetrics(int width, int height, float fontScaleFactor, bool fitWindow)
+{
+ if (!width && !height) {
+ if (m_metricsSupport)
+ m_metricsSupport.clear();
+ return;
+ }
+
+ if (!m_metricsSupport)
+ m_metricsSupport = adoptPtr(new DeviceMetricsSupport(m_webViewImpl));
+ m_metricsSupport->setDeviceMetrics(width, height, fontScaleFactor, fitWindow);
+}
+
+void WebDevToolsAgentImpl::autoZoomPageToFitWidth()
+{
+ if (m_metricsSupport)
+ m_metricsSupport->autoZoomPageToFitWidthOnNavigation(m_webViewImpl->mainFrameImpl()->frame());
+}
+
void WebDevToolsAgentImpl::dispatchOnInspectorBackend(const WebString& message)
{
inspectorController()->dispatchMessageFromFrontend(message);
@@ -282,8 +516,7 @@ void WebDevToolsAgentImpl::paintPageOverlay(WebCanvas* canvas)
void WebDevToolsAgentImpl::highlight()
{
- // Use 99 as a big z-order number so that highlight is above other overlays.
- m_webViewImpl->addPageOverlay(this, 99);
+ m_webViewImpl->addPageOverlay(this, OverlayZOrders::highlight);
}
void WebDevToolsAgentImpl::hideHighlight()
diff --git a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h
index 66fd6c6ee..1c8e025e8 100644
--- a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h
+++ b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h
@@ -35,6 +35,7 @@
#include "WebDevToolsAgentPrivate.h"
#include "WebPageOverlay.h"
+#include "platform/WebSize.h"
#include <wtf/Forward.h>
#include <wtf/OwnPtr.h>
@@ -42,6 +43,7 @@
namespace WebCore {
class Document;
class Frame;
+class FrameView;
class GraphicsContext;
class InspectorClient;
class InspectorController;
@@ -50,6 +52,7 @@ class Node;
namespace WebKit {
+class DeviceMetricsSupport;
class WebDevToolsAgentClient;
class WebFrame;
class WebFrameImpl;
@@ -68,7 +71,10 @@ public:
virtual ~WebDevToolsAgentImpl();
// WebDevToolsAgentPrivate implementation.
- virtual void didClearWindowObject(WebFrameImpl* frame);
+ virtual void didCreateScriptContext(WebFrameImpl*, int worldId);
+ virtual void mainFrameViewCreated(WebFrameImpl*);
+ virtual bool metricsOverridden();
+ virtual void webViewResized();
// WebDevToolsAgent implementation.
virtual void attach();
@@ -95,6 +101,9 @@ public:
virtual void clearBrowserCache();
virtual void clearBrowserCookies();
+ virtual void overrideDeviceMetrics(int width, int height, float fontScaleFactor, bool fitWindow);
+ virtual void autoZoomPageToFitWidth();
+
int hostId() { return m_hostId; }
// WebPageOverlay
@@ -108,6 +117,7 @@ private:
WebDevToolsAgentClient* m_client;
WebViewImpl* m_webViewImpl;
bool m_attached;
+ OwnPtr<DeviceMetricsSupport> m_metricsSupport;
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebDevToolsAgentPrivate.h b/Source/WebKit/chromium/src/WebDevToolsAgentPrivate.h
index 7038a5e5c..06f5f1815 100644
--- a/Source/WebKit/chromium/src/WebDevToolsAgentPrivate.h
+++ b/Source/WebKit/chromium/src/WebDevToolsAgentPrivate.h
@@ -35,14 +35,26 @@
namespace WebKit {
class WebFrameImpl;
+struct WebSize;
class WebDevToolsAgentPrivate : public WebDevToolsAgent {
public:
- // Notifications from FrameLoaderClientImpl:
- // The window object for the frame has been cleared of any extra properties
- // that may have been set by script from the previously loaded document.
- virtual void didClearWindowObject(WebFrameImpl*) = 0;
+ // Notification from FrameLoaderClientImpl:
+ // New context has been created for a given world in given frame. Any
+ // processing hat needs to happen before the first script is evaluated
+ // in this context should be done here.
+ virtual void didCreateScriptContext(WebFrameImpl*, int worldId) = 0;
+
+ // A new FrameView has been created for the specified WebFrame using
+ // the Frame::createView() call.
+ virtual void mainFrameViewCreated(WebFrameImpl*) = 0;
+
+ // Returns true if the device metrics override mode is enabled.
+ virtual bool metricsOverridden() = 0;
+
+ // WebViewImpl has been resized.
+ virtual void webViewResized() = 0;
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebDocument.cpp b/Source/WebKit/chromium/src/WebDocument.cpp
index 80fbdf1d9..11639566c 100644
--- a/Source/WebKit/chromium/src/WebDocument.cpp
+++ b/Source/WebKit/chromium/src/WebDocument.cpp
@@ -32,6 +32,7 @@
#include "WebDocument.h"
#include "AXObjectCache.h"
+#include "CSSParserMode.h"
#include "CSSStyleSheet.h"
#include "Document.h"
#include "DocumentLoader.h"
@@ -177,9 +178,9 @@ void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLev
{
RefPtr<Document> document = unwrap<Document>();
- RefPtr<CSSStyleSheet> parsedSheet = CSSStyleSheet::create(document.get());
+ RefPtr<StyleSheetInternal> parsedSheet = StyleSheetInternal::create(document.get());
parsedSheet->setIsUserStyleSheet(level == UserStyleUserLevel);
- parsedSheet->parseString(sourceCode, !document->inQuirksMode());
+ parsedSheet->parseString(sourceCode);
document->addUserSheet(parsedSheet.release());
}
@@ -208,6 +209,11 @@ WebDOMEvent WebDocument::createEvent(const WebString& eventType)
return event;
}
+WebReferrerPolicy WebDocument::referrerPolicy() const
+{
+ return static_cast<WebReferrerPolicy>(constUnwrap<Document>()->referrerPolicy());
+}
+
WebAccessibilityObject WebDocument::accessibilityObject() const
{
const Document* document = constUnwrap<Document>();
diff --git a/Source/WebKit/chromium/src/WebDragData.cpp b/Source/WebKit/chromium/src/WebDragData.cpp
index 322dfbaeb..61d86a388 100644
--- a/Source/WebKit/chromium/src/WebDragData.cpp
+++ b/Source/WebKit/chromium/src/WebDragData.cpp
@@ -33,6 +33,8 @@
#include "ChromiumDataObject.h"
#include "ClipboardMimeTypes.h"
+#include "DataTransferItem.h"
+#include "DraggedIsolatedFileSystem.h"
#include "platform/WebData.h"
#include "platform/WebString.h"
#include "platform/WebURL.h"
@@ -69,57 +71,34 @@ void WebDragData::assign(const WebDragData& other)
WebVector<WebDragData::Item> WebDragData::items() const
{
Vector<Item> itemList;
- const HashSet<String>& types = m_private->types();
- if (types.contains(mimeTypeTextPlain)) {
- Item item;
- item.storageType = Item::StorageTypeString;
- item.stringType = String(mimeTypeTextPlain);
- bool ignored;
- item.stringData = m_private->getData(mimeTypeTextPlain, ignored);
+ for (size_t i = 0; i < m_private->length(); ++i) {
+ ChromiumDataObjectItem* originalItem = m_private->item(i).get();
+ WebDragData::Item item;
+ if (originalItem->kind() == DataTransferItem::kindString) {
+ item.storageType = Item::StorageTypeString;
+ item.stringType = originalItem->type();
+ item.stringData = originalItem->internalGetAsString();
+ } else if (originalItem->kind() == DataTransferItem::kindFile) {
+ if (originalItem->sharedBuffer()) {
+ item.storageType = Item::StorageTypeBinaryData;
+ item.binaryData = originalItem->sharedBuffer();
+ } else if (originalItem->isFilename()) {
+ item.storageType = Item::StorageTypeFilename;
+ RefPtr<WebCore::Blob> blob = originalItem->getAsFile();
+ if (blob->isFile()) {
+ File* file = static_cast<File*>(blob.get());
+ item.filenameData = file->path();
+ item.displayNameData = file->name();
+ } else
+ ASSERT_NOT_REACHED();
+ } else
+ ASSERT_NOT_REACHED();
+ } else
+ ASSERT_NOT_REACHED();
+ item.title = originalItem->title();
+ item.baseURL = originalItem->baseURL();
itemList.append(item);
}
- if (types.contains(mimeTypeTextURIList)) {
- Item item;
- item.storageType = Item::StorageTypeString;
- item.stringType = String(mimeTypeTextURIList);
- bool ignored;
- item.stringData = m_private->getData(mimeTypeURL, ignored);
- item.title = m_private->urlTitle();
- itemList.append(item);
- }
- if (types.contains(mimeTypeTextHTML)) {
- Item item;
- item.storageType = Item::StorageTypeString;
- item.stringType = String(mimeTypeTextHTML);
- bool ignored;
- item.stringData = m_private->getData(mimeTypeTextHTML, ignored);
- item.baseURL = m_private->htmlBaseUrl();
- itemList.append(item);
- }
- if (types.contains(mimeTypeDownloadURL)) {
- Item item;
- item.storageType = Item::StorageTypeString;
- item.stringType = String(mimeTypeDownloadURL);
- bool ignored;
- item.stringData = m_private->getData(mimeTypeDownloadURL, ignored);
- itemList.append(item);
- }
- const HashMap<String, String>& customData = m_private->customData();
- for (HashMap<String, String>::const_iterator it = customData.begin(); it != customData.end(); ++it) {
- Item item;
- item.storageType = Item::StorageTypeString;
- item.stringType = it->first;
- item.stringData = it->second;
- itemList.append(item);
- }
- if (m_private->fileContent()) {
- Item item;
- item.storageType = Item::StorageTypeBinaryData;
- item.binaryData = m_private->fileContent();
- item.title = m_private->fileContentFilename();
- itemList.append(item);
- }
- // We don't handle filenames here, since they are never used for dragging out.
return itemList;
}
@@ -135,14 +114,15 @@ void WebDragData::addItem(const Item& item)
ensureMutable();
switch (item.storageType) {
case Item::StorageTypeString:
- m_private->setData(item.stringType, item.stringData);
if (String(item.stringType) == mimeTypeTextURIList)
- m_private->setUrlTitle(item.title);
+ m_private->setURLAndTitle(item.stringData, item.title);
else if (String(item.stringType) == mimeTypeTextHTML)
- m_private->setHtmlBaseUrl(item.baseURL);
+ m_private->setHTMLAndBaseURL(item.stringData, item.baseURL);
+ else
+ m_private->setData(item.stringType, item.stringData);
return;
case Item::StorageTypeFilename:
- m_private->addFilename(item.filenameData);
+ m_private->addFilename(item.filenameData, item.displayNameData);
return;
case Item::StorageTypeBinaryData:
// This should never happen when dragging in.
@@ -150,6 +130,26 @@ void WebDragData::addItem(const Item& item)
}
}
+WebString WebDragData::filesystemId() const
+{
+#if ENABLE(FILE_SYSTEM)
+ ASSERT(!isNull());
+ DraggedIsolatedFileSystem* filesystem = DraggedIsolatedFileSystem::from(m_private);
+ if (filesystem)
+ return filesystem->filesystemId();
+#endif
+ return WebString();
+}
+
+void WebDragData::setFilesystemId(const WebString& filesystemId)
+{
+#if ENABLE(FILE_SYSTEM)
+ // The ID is an opaque string, given by and validated by chromium port.
+ ensureMutable();
+ DraggedIsolatedFileSystem::provideTo(m_private, DraggedIsolatedFileSystem::supplementName(), DraggedIsolatedFileSystem::create(filesystemId));
+#endif
+}
+
WebDragData::WebDragData(const WTF::PassRefPtr<WebCore::ChromiumDataObject>& data)
: m_private(static_cast<WebDragDataPrivate*>(data.leakRef()))
{
@@ -168,7 +168,6 @@ WebDragData::operator WTF::PassRefPtr<WebCore::ChromiumDataObject>() const
void WebDragData::assign(WebDragDataPrivate* p)
{
- ASSERT(!p || p->storageMode() == ChromiumDataObject::Buffered);
// p is already ref'd for us by the caller
if (m_private)
m_private->deref();
diff --git a/Source/WebKit/chromium/src/WebElement.cpp b/Source/WebKit/chromium/src/WebElement.cpp
index e6a1b6e4e..1cef30d60 100644
--- a/Source/WebKit/chromium/src/WebElement.cpp
+++ b/Source/WebKit/chromium/src/WebElement.cpp
@@ -39,7 +39,6 @@
#include "RenderObject.h"
#include <wtf/PassRefPtr.h>
-#include "WebNamedNodeMap.h"
using namespace WebCore;
@@ -83,9 +82,25 @@ bool WebElement::setAttribute(const WebString& attrName, const WebString& attrVa
return !exceptionCode;
}
-WebNamedNodeMap WebElement::attributes() const
+unsigned WebElement::attributeCount() const
{
- return WebNamedNodeMap(m_private->attributes());
+ if (!constUnwrap<Element>()->hasAttributes())
+ return 0;
+ return constUnwrap<Element>()->attributeCount();
+}
+
+WebString WebElement::attributeLocalName(unsigned index) const
+{
+ if (index >= attributeCount())
+ return WebString();
+ return constUnwrap<Element>()->attributeItem(index)->localName();
+}
+
+WebString WebElement::attributeValue(unsigned index) const
+{
+ if (index >= attributeCount())
+ return WebString();
+ return constUnwrap<Element>()->attributeItem(index)->value();
}
WebString WebElement::innerText()
diff --git a/Source/WebKit/chromium/src/WebExternalTextureLayer.cpp b/Source/WebKit/chromium/src/WebExternalTextureLayer.cpp
index c9ba0bc7b..8f7b58a9d 100644
--- a/Source/WebKit/chromium/src/WebExternalTextureLayer.cpp
+++ b/Source/WebKit/chromium/src/WebExternalTextureLayer.cpp
@@ -24,67 +24,41 @@
*/
#include "config.h"
-#include "platform/WebExternalTextureLayer.h"
+#include <public/WebExternalTextureLayer.h>
-#include "platform/WebFloatRect.h"
-#include "WebExternalTextureLayerImpl.h"
+#include "TextureLayerChromium.h"
+#include <public/WebFloatRect.h>
+#include <public/WebSize.h>
+
+using namespace WebCore;
namespace WebKit {
WebExternalTextureLayer WebExternalTextureLayer::create()
{
- return WebExternalTextureLayer(WebExternalTextureLayerImpl::create());
+ RefPtr<TextureLayerChromium> layer = TextureLayerChromium::create(0);
+ layer->setIsDrawable(true);
+ return WebExternalTextureLayer(layer.release());
}
void WebExternalTextureLayer::setTextureId(unsigned id)
{
- unwrap<WebExternalTextureLayerImpl>()->setTextureId(id);
-}
-
-unsigned WebExternalTextureLayer::textureId() const
-{
- return constUnwrap<WebExternalTextureLayerImpl>()->textureId();
+ unwrap<TextureLayerChromium>()->setTextureId(id);
}
void WebExternalTextureLayer::setFlipped(bool flipped)
{
- unwrap<WebExternalTextureLayerImpl>()->setFlipped(flipped);
-}
-
-bool WebExternalTextureLayer::flipped() const
-{
- return constUnwrap<WebExternalTextureLayerImpl>()->flipped();
+ unwrap<TextureLayerChromium>()->setFlipped(flipped);
}
void WebExternalTextureLayer::setUVRect(const WebFloatRect& rect)
{
- unwrap<WebExternalTextureLayerImpl>()->setUVRect(rect);
-}
-
-WebFloatRect WebExternalTextureLayer::uvRect() const
-{
- return WebFloatRect(constUnwrap<WebExternalTextureLayerImpl>()->uvRect());
-}
-
-void WebExternalTextureLayer::invalidateRect(const WebFloatRect& updateRect)
-{
- unwrap<WebExternalTextureLayerImpl>()->setNeedsDisplayRect(updateRect);
-}
-
-WebExternalTextureLayer::WebExternalTextureLayer(const PassRefPtr<WebExternalTextureLayerImpl>& node)
- : WebLayer(node)
-{
-}
-
-WebExternalTextureLayer& WebExternalTextureLayer::operator=(const PassRefPtr<WebExternalTextureLayerImpl>& node)
-{
- m_private = node;
- return *this;
+ unwrap<TextureLayerChromium>()->setUVRect(rect);
}
-WebExternalTextureLayer::operator PassRefPtr<WebExternalTextureLayerImpl>() const
+WebExternalTextureLayer::WebExternalTextureLayer(PassRefPtr<TextureLayerChromium> layer)
+ : WebLayer(layer)
{
- return static_cast<WebExternalTextureLayerImpl*>(m_private.get());
}
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebFileChooserCompletionImpl.cpp b/Source/WebKit/chromium/src/WebFileChooserCompletionImpl.cpp
index d7583c5dd..73452d0d0 100644
--- a/Source/WebKit/chromium/src/WebFileChooserCompletionImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFileChooserCompletionImpl.cpp
@@ -44,14 +44,20 @@ WebFileChooserCompletionImpl::~WebFileChooserCompletionImpl()
void WebFileChooserCompletionImpl::didChooseFile(const WebVector<WebString>& fileNames)
{
- if (fileNames.size() == 1)
- m_fileChooser->chooseFile(fileNames[0]);
- else if (fileNames.size() > 0) {
- Vector<WTF::String> paths;
- for (size_t i = 0; i < fileNames.size(); ++i)
- paths.append(fileNames[i]);
- m_fileChooser->chooseFiles(paths);
- }
+ Vector<WebCore::FileChooserFileInfo> fileInfo;
+ for (size_t i = 0; i < fileNames.size(); ++i)
+ fileInfo.append(WebCore::FileChooserFileInfo(fileNames[i]));
+ m_fileChooser->chooseFiles(fileInfo);
+ // This object is no longer needed.
+ delete this;
+}
+
+void WebFileChooserCompletionImpl::didChooseFile(const WebVector<SelectedFileInfo>& files)
+{
+ Vector<WebCore::FileChooserFileInfo> fileInfo;
+ for (size_t i = 0; i < files.size(); ++i)
+ fileInfo.append(WebCore::FileChooserFileInfo(files[i].path, files[i].displayName));
+ m_fileChooser->chooseFiles(fileInfo);
// This object is no longer needed.
delete this;
}
diff --git a/Source/WebKit/chromium/src/WebFileChooserCompletionImpl.h b/Source/WebKit/chromium/src/WebFileChooserCompletionImpl.h
index 06a0577b0..3ac63a5e8 100644
--- a/Source/WebKit/chromium/src/WebFileChooserCompletionImpl.h
+++ b/Source/WebKit/chromium/src/WebFileChooserCompletionImpl.h
@@ -49,6 +49,7 @@ public:
WebFileChooserCompletionImpl(PassRefPtr<WebCore::FileChooser> chooser);
~WebFileChooserCompletionImpl();
virtual void didChooseFile(const WebVector<WebString>& fileNames);
+ virtual void didChooseFile(const WebVector<SelectedFileInfo>& files);
private:
RefPtr<WebCore::FileChooser> m_fileChooser;
};
diff --git a/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp b/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
index 984cebfdc..c110e7c22 100644
--- a/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
@@ -47,11 +47,11 @@ using namespace WebCore;
namespace WebKit {
-WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<AsyncFileSystemCallbacks> callbacks, AsyncFileSystem::Type type, WebCore::ScriptExecutionContext* context, bool synchronous)
+WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<AsyncFileSystemCallbacks> callbacks, FileSystemType type, WebCore::ScriptExecutionContext* context, FileSystemSynchronousType synchronousType)
: m_callbacks(callbacks)
, m_type(type)
, m_context(context)
- , m_synchronous(synchronous)
+ , m_synchronousType(synchronousType)
{
ASSERT(m_callbacks);
}
@@ -92,7 +92,7 @@ void WebFileSystemCallbacksImpl::didOpenFileSystem(const WebString& name, const
#if ENABLE(WORKERS)
if (m_context && m_context->isWorkerContext()) {
- m_callbacks->didOpenFileSystem(name, WorkerAsyncFileSystemChromium::create(m_context, m_type, rootURL, m_synchronous));
+ m_callbacks->didOpenFileSystem(name, WorkerAsyncFileSystemChromium::create(m_context, m_type, rootURL, m_synchronousType));
return;
}
#endif
diff --git a/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.h b/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
index d2be57434..76e8cdf8f 100644
--- a/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
+++ b/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
@@ -31,9 +31,9 @@
#ifndef WebFileSystemCallbacksImpl_h
#define WebFileSystemCallbacksImpl_h
-#include "AsyncFileSystem.h"
-#include "platform/WebFileSystem.h"
+#include "FileSystemType.h"
#include "WebFileSystemCallbacks.h"
+#include "platform/WebFileSystem.h"
#include "platform/WebVector.h"
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
@@ -52,7 +52,7 @@ class WebURL;
class WebFileSystemCallbacksImpl : public WebFileSystemCallbacks {
public:
- WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::AsyncFileSystemCallbacks>, WebCore::AsyncFileSystem::Type = WebCore::AsyncFileSystem::Temporary, WebCore::ScriptExecutionContext* = 0, bool synchronous = false);
+ WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::AsyncFileSystemCallbacks>, WebCore::FileSystemType = WebCore::FileSystemTypeTemporary, WebCore::ScriptExecutionContext* = 0, WebCore::FileSystemSynchronousType = WebCore::AsynchronousFileSystem);
virtual ~WebFileSystemCallbacksImpl();
virtual void didSucceed();
@@ -65,11 +65,11 @@ private:
OwnPtr<WebCore::AsyncFileSystemCallbacks> m_callbacks;
// Used for openFileSystem callbacks.
- WebCore::AsyncFileSystem::Type m_type;
+ WebCore::FileSystemType m_type;
// Used for worker's openFileSystem callbacks.
WebCore::ScriptExecutionContext* m_context;
- bool m_synchronous;
+ WebCore::FileSystemSynchronousType m_synchronousType;
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebFontImpl.cpp b/Source/WebKit/chromium/src/WebFontImpl.cpp
index c92a1f567..f6cf39dbe 100644
--- a/Source/WebKit/chromium/src/WebFontImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFontImpl.cpp
@@ -113,24 +113,19 @@ void WebFontImpl::drawText(WebCanvas* canvas, const WebTextRun& run, const WebFl
gc.restore();
#if defined(WIN32)
- if (canvasIsOpaque && SkColorGetA(color) == 0xFF) {
- SkCanvas::LayerIter iter(const_cast<SkCanvas*>(canvas), false);
- iter.next(); // There is always at least one layer.
- bool multipleLayers = !iter.done();
- if (!multipleLayers) {
- // The text drawing logic on Windows ignores the alpha component
- // intentionally, for performance reasons.
- // (Please see TransparencyAwareFontPainter::initializeForGDI in
- // FontChromiumWin.cpp.)
- const SkBitmap& bitmap = canvas->getTopDevice()->accessBitmap(true);
- IntRect textBounds = estimateTextBounds(run, leftBaseline);
- IntRect destRect = gc.getCTM().mapRect(textBounds);
- destRect.intersect(IntRect(0, 0, bitmap.width(), bitmap.height()));
- for (int y = destRect.y(), maxY = destRect.maxY(); y < maxY; y++) {
- uint32_t* row = bitmap.getAddr32(0, y);
- for (int x = destRect.x(), maxX = destRect.maxX(); x < maxX; x++)
- row[x] |= (0xFF << SK_A32_SHIFT);
- }
+ if (canvasIsOpaque && SkColorGetA(color) == 0xFF && !canvas->isDrawingToLayer()) {
+ // The text drawing logic on Windows ignores the alpha component
+ // intentionally, for performance reasons.
+ // (Please see TransparencyAwareFontPainter::initializeForGDI in
+ // FontChromiumWin.cpp.)
+ const SkBitmap& bitmap = canvas->getTopDevice()->accessBitmap(true);
+ IntRect textBounds = estimateTextBounds(run, leftBaseline);
+ IntRect destRect = gc.getCTM().mapRect(textBounds);
+ destRect.intersect(IntRect(0, 0, bitmap.width(), bitmap.height()));
+ for (int y = destRect.y(), maxY = destRect.maxY(); y < maxY; y++) {
+ uint32_t* row = bitmap.getAddr32(0, y);
+ for (int x = destRect.x(), maxX = destRect.maxX(); x < maxX; x++)
+ row[x] |= (0xFF << SK_A32_SHIFT);
}
}
#endif
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.cpp b/Source/WebKit/chromium/src/WebFrameImpl.cpp
index 39897c823..d0e6fe238 100644
--- a/Source/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFrameImpl.cpp
@@ -79,13 +79,13 @@
#include "DOMUtilitiesPrivate.h"
#include "DOMWindow.h"
#include "Document.h"
-#include "DocumentFragment.h" // Only needed for ReplaceSelectionCommand.h :(
#include "DocumentLoader.h"
#include "DocumentMarker.h"
#include "DocumentMarkerController.h"
#include "Editor.h"
#include "EventHandler.h"
#include "EventListenerWrapper.h"
+#include "FileSystemType.h"
#include "FocusController.h"
#include "FontCache.h"
#include "FormState.h"
@@ -109,7 +109,6 @@
#include "Node.h"
#include "Page.h"
#include "PageOverlay.h"
-#include "painting/GraphicsContextBuilder.h"
#include "Performance.h"
#include "PlatformSupport.h"
#include "PluginDocument.h"
@@ -120,7 +119,6 @@
#include "RenderTreeAsText.h"
#include "RenderView.h"
#include "RenderWidget.h"
-#include "ReplaceSelectionCommand.h"
#include "ResourceHandle.h"
#include "ResourceRequest.h"
#include "SchemeRegistry.h"
@@ -142,6 +140,7 @@
#include "WebDOMEvent.h"
#include "WebDOMEventListener.h"
#include "WebDataSourceImpl.h"
+#include "WebDevToolsAgentPrivate.h"
#include "WebDocument.h"
#include "WebFindOptions.h"
#include "WebFormElement.h"
@@ -153,19 +152,21 @@
#include "WebPerformance.h"
#include "WebPlugin.h"
#include "WebPluginContainerImpl.h"
-#include "platform/WebPoint.h"
#include "WebRange.h"
-#include "platform/WebRect.h"
#include "WebScriptSource.h"
#include "WebSecurityOrigin.h"
-#include "platform/WebSize.h"
-#include "platform/WebURLError.h"
-#include "platform/WebVector.h"
#include "WebViewImpl.h"
#include "XPathResult.h"
#include "markup.h"
+#include "painting/GraphicsContextBuilder.h"
+#include "platform/WebPoint.h"
+#include "platform/WebRect.h"
+#include "platform/WebSize.h"
+#include "platform/WebURLError.h"
+#include "platform/WebVector.h"
#include <algorithm>
+#include <public/Platform.h>
#include <wtf/CurrentTime.h>
#if USE(V8)
@@ -827,7 +828,7 @@ void WebFrameImpl::executeScriptInIsolatedWorld(
sourcesIn[i].code, sourcesIn[i].url, position));
}
- m_frame->script()->evaluateInIsolatedWorld(worldID, sources, extensionGroup);
+ m_frame->script()->evaluateInIsolatedWorld(worldID, sources, extensionGroup, 0);
}
void WebFrameImpl::setIsolatedWorldSecurityOrigin(int worldID, const WebSecurityOrigin& securityOrigin)
@@ -894,6 +895,37 @@ v8::Handle<v8::Value> WebFrameImpl::executeScriptAndReturnValue(const WebScriptS
return m_frame->script()->executeScript(ScriptSourceCode(source.code, source.url, position)).v8Value();
}
+void WebFrameImpl::executeScriptInIsolatedWorld(
+ int worldID, const WebScriptSource* sourcesIn, unsigned numSources,
+ int extensionGroup, WebVector<v8::Local<v8::Value> >* results)
+{
+ Vector<ScriptSourceCode> sources;
+
+ for (unsigned i = 0; i < numSources; ++i) {
+ TextPosition position(OrdinalNumber::fromOneBasedInt(sourcesIn[i].startLine), OrdinalNumber::first());
+ sources.append(ScriptSourceCode(sourcesIn[i].code, sourcesIn[i].url, position));
+ }
+
+ if (results) {
+ Vector<ScriptValue> scriptResults;
+ m_frame->script()->evaluateInIsolatedWorld(worldID, sources, extensionGroup, &scriptResults);
+ WebVector<v8::Local<v8::Value> > v8Results(scriptResults.size());
+ for (unsigned i = 0; i < scriptResults.size(); i++)
+ v8Results[i] = v8::Local<v8::Value>::New(scriptResults[i].v8Value());
+ results->swap(v8Results);
+ } else
+ m_frame->script()->evaluateInIsolatedWorld(worldID, sources, extensionGroup, 0);
+}
+
+// Call the function with the given receiver and arguments, bypassing canExecuteScripts.
+v8::Handle<v8::Value> WebFrameImpl::callFunctionEvenIfScriptDisabled(v8::Handle<v8::Function> function,
+ v8::Handle<v8::Object> receiver,
+ int argc,
+ v8::Handle<v8::Value> argv[])
+{
+ return m_frame->script()->callFunctionEvenIfScriptDisabled(function, receiver, argc, argv).v8Value();
+}
+
// Returns the V8 context for this frame, or an empty handle if there is none.
v8::Local<v8::Context> WebFrameImpl::mainWorldScriptContext() const
{
@@ -907,7 +939,7 @@ v8::Handle<v8::Value> WebFrameImpl::createFileSystem(WebFileSystem::Type type,
const WebString& name,
const WebString& path)
{
- return toV8(DOMFileSystem::create(frame()->document(), name, AsyncFileSystemChromium::create(static_cast<AsyncFileSystem::Type>(type), KURL(ParsedURLString, path.utf8().data()))));
+ return toV8(DOMFileSystem::create(frame()->document(), name, AsyncFileSystemChromium::create(static_cast<FileSystemType>(type), KURL(ParsedURLString, path.utf8().data()))));
}
v8::Handle<v8::Value> WebFrameImpl::createFileEntry(WebFileSystem::Type type,
@@ -916,7 +948,7 @@ v8::Handle<v8::Value> WebFrameImpl::createFileEntry(WebFileSystem::Type type,
const WebString& filePath,
bool isDirectory)
{
- RefPtr<DOMFileSystemBase> fileSystem = DOMFileSystem::create(frame()->document(), fileSystemName, AsyncFileSystemChromium::create(static_cast<AsyncFileSystem::Type>(type), KURL(ParsedURLString, fileSystemPath.utf8().data())));
+ RefPtr<DOMFileSystemBase> fileSystem = DOMFileSystem::create(frame()->document(), fileSystemName, AsyncFileSystemChromium::create(static_cast<FileSystemType>(type), KURL(ParsedURLString, fileSystemPath.utf8().data())));
if (isDirectory)
return toV8(DirectoryEntry::create(fileSystem, filePath));
return toV8(FileEntry::create(fileSystem, filePath));
@@ -1189,7 +1221,7 @@ size_t WebFrameImpl::characterIndexForPoint(const WebPoint& webPoint) const
IntPoint point = frame()->view()->windowToContents(webPoint);
HitTestResult result = frame()->eventHandler()->hitTestResultAtPoint(point, false);
- RefPtr<Range> range = frame()->rangeForPoint(result.point());
+ RefPtr<Range> range = frame()->rangeForPoint(result.roundedPoint());
if (!range)
return notFound;
@@ -1380,6 +1412,13 @@ void WebFrameImpl::selectRange(const WebPoint& start, const WebPoint& end)
frame()->selection()->setSelection(selection, CharacterGranularity);
}
+void WebFrameImpl::selectRange(const WebRange& webRange)
+{
+ RefPtr<Range> range = static_cast<PassRefPtr<Range> >(webRange);
+ if (range)
+ frame()->selection()->setSelectedRange(range.get(), WebCore::VP_DEFAULT_AFFINITY, false);
+}
+
VisiblePosition WebFrameImpl::visiblePositionForWindowPoint(const WebPoint& point)
{
HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move;
@@ -1974,13 +2013,13 @@ WebFrameImpl::WebFrameImpl(WebFrameClient* client)
, m_identifier(generateFrameIdentifier())
, m_inSameDocumentHistoryLoad(false)
{
- PlatformSupport::incrementStatsCounter(webFrameActiveCount);
+ WebKit::Platform::current()->incrementStatsCounter(webFrameActiveCount);
frameCount++;
}
WebFrameImpl::~WebFrameImpl()
{
- PlatformSupport::decrementStatsCounter(webFrameActiveCount);
+ WebKit::Platform::current()->decrementStatsCounter(webFrameActiveCount);
frameCount--;
cancelPendingScopingEffort();
@@ -2045,35 +2084,6 @@ PassRefPtr<Frame> WebFrameImpl::createChildFrame(
return childFrame.release();
}
-void WebFrameImpl::layout()
-{
- // layout this frame
- FrameView* view = m_frame->view();
- if (view)
- view->updateLayoutAndStyleIfNeededRecursive();
-}
-
-void WebFrameImpl::paintWithContext(GraphicsContext& gc, const WebRect& rect)
-{
- IntRect dirtyRect(rect);
- gc.save();
- if (m_frame->document() && frameView()) {
- gc.clip(dirtyRect);
- frameView()->paint(&gc, dirtyRect);
- if (viewImpl()->pageOverlays())
- viewImpl()->pageOverlays()->paintWebFrame(gc);
- } else
- gc.fillRect(dirtyRect, Color::white, ColorSpaceDeviceRGB);
- gc.restore();
-}
-
-void WebFrameImpl::paint(WebCanvas* canvas, const WebRect& rect)
-{
- if (rect.isEmpty())
- return;
- paintWithContext(GraphicsContextBuilder(canvas).context(), rect);
-}
-
void WebFrameImpl::createFrameView()
{
ASSERT(m_frame); // If m_frame doesn't exist, we probably didn't init properly.
@@ -2083,6 +2093,9 @@ void WebFrameImpl::createFrameView()
m_frame->createView(webView->size(), Color::white, webView->isTransparent(), webView->fixedLayoutSize(), isMainFrame ? webView->isFixedLayoutModeEnabled() : 0);
if (webView->shouldAutoResize() && isMainFrame)
m_frame->view()->enableAutoSizeMode(true, webView->minAutoSize(), webView->maxAutoSize());
+
+ if (isMainFrame && webView->devToolsAgentPrivate())
+ webView->devToolsAgentPrivate()->mainFrameViewCreated(this);
}
WebFrameImpl* WebFrameImpl::fromFrame(Frame* frame)
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.h b/Source/WebKit/chromium/src/WebFrameImpl.h
index 700f6ea40..c3acc1afb 100644
--- a/Source/WebKit/chromium/src/WebFrameImpl.h
+++ b/Source/WebKit/chromium/src/WebFrameImpl.h
@@ -62,6 +62,8 @@ class WebPluginContainerImpl;
class WebView;
class WebViewImpl;
+template <typename T> class WebVector;
+
// Implementation of WebFrame, note that this is a reference counted object.
class WebFrameImpl : public WebFrame, public RefCounted<WebFrameImpl> {
public:
@@ -110,6 +112,14 @@ public:
#if WEBKIT_USING_V8
virtual v8::Handle<v8::Value> executeScriptAndReturnValue(
const WebScriptSource&);
+ virtual void executeScriptInIsolatedWorld(
+ int worldID, const WebScriptSource* sourcesIn, unsigned numSources,
+ int extensionGroup, WebVector<v8::Local<v8::Value> >* results);
+ virtual v8::Handle<v8::Value> callFunctionEvenIfScriptDisabled(
+ v8::Handle<v8::Function>,
+ v8::Handle<v8::Object>,
+ int argc,
+ v8::Handle<v8::Value> argv[]);
virtual v8::Local<v8::Context> mainWorldScriptContext() const;
virtual v8::Handle<v8::Value> createFileSystem(WebFileSystem::Type,
const WebString& name,
@@ -165,6 +175,7 @@ public:
virtual WebString selectionAsMarkup() const;
virtual bool selectWordAroundCaret();
virtual void selectRange(const WebPoint& start, const WebPoint& end);
+ virtual void selectRange(const WebRange&);
virtual int printBegin(const WebSize& pageSize,
const WebNode& constrainToNode,
int printerDPI,
@@ -225,9 +236,6 @@ public:
PassRefPtr<WebCore::Frame> createChildFrame(
const WebCore::FrameLoadRequest&, WebCore::HTMLFrameOwnerElement*);
- void layout();
- void paint(WebCanvas*, const WebRect&);
- void paintWithContext(WebCore::GraphicsContext&, const WebRect&);
void createFrameView();
static WebFrameImpl* fromFrame(WebCore::Frame* frame);
diff --git a/Source/WebKit/chromium/src/WebGeolocationClientMock.cpp b/Source/WebKit/chromium/src/WebGeolocationClientMock.cpp
index 0ad47da31..3d9630707 100644
--- a/Source/WebKit/chromium/src/WebGeolocationClientMock.cpp
+++ b/Source/WebKit/chromium/src/WebGeolocationClientMock.cpp
@@ -31,7 +31,7 @@
#include "config.h"
#include "WebGeolocationClientMock.h"
-#include "CurrentTime.h"
+#include <wtf/CurrentTime.h>
#include "Geolocation.h"
#include "GeolocationClientMock.h"
#include "GeolocationError.h"
diff --git a/Source/WebKit/chromium/src/WebHTTPBody.cpp b/Source/WebKit/chromium/src/WebHTTPBody.cpp
deleted file mode 100644
index d67a70190..000000000
--- a/Source/WebKit/chromium/src/WebHTTPBody.cpp
+++ /dev/null
@@ -1,184 +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 "platform/WebHTTPBody.h"
-
-#include "FormData.h"
-
-using namespace WebCore;
-
-namespace WebKit {
-
-class WebHTTPBodyPrivate : public FormData {
-};
-
-void WebHTTPBody::initialize()
-{
- assign(static_cast<WebHTTPBodyPrivate*>(FormData::create().leakRef()));
-}
-
-void WebHTTPBody::reset()
-{
- assign(0);
-}
-
-void WebHTTPBody::assign(const WebHTTPBody& other)
-{
- WebHTTPBodyPrivate* p = const_cast<WebHTTPBodyPrivate*>(other.m_private);
- if (p)
- p->ref();
- assign(p);
-}
-
-size_t WebHTTPBody::elementCount() const
-{
- ASSERT(!isNull());
- return m_private->elements().size();
-}
-
-bool WebHTTPBody::elementAt(size_t index, Element& result) const
-{
- ASSERT(!isNull());
-
- if (index >= m_private->elements().size())
- return false;
-
- const FormDataElement& element = m_private->elements()[index];
-
- result.data.reset();
- result.filePath.reset();
- result.fileStart = 0;
- result.fileLength = 0;
- result.modificationTime = 0.0;
- result.blobURL = KURL();
-
- switch (element.m_type) {
- case FormDataElement::data:
- result.type = Element::TypeData;
- result.data.assign(element.m_data.data(), element.m_data.size());
- break;
- case FormDataElement::encodedFile:
- result.type = Element::TypeFile;
- result.filePath = element.m_filename;
-#if ENABLE(BLOB)
- result.fileStart = element.m_fileStart;
- result.fileLength = element.m_fileLength;
- result.modificationTime = element.m_expectedFileModificationTime;
-#endif
- break;
-#if ENABLE(BLOB)
- case FormDataElement::encodedBlob:
- result.type = Element::TypeBlob;
- result.blobURL = element.m_blobURL;
- break;
-#endif
- default:
- ASSERT_NOT_REACHED();
- return false;
- }
-
- return true;
-}
-
-void WebHTTPBody::appendData(const WebData& data)
-{
- ensureMutable();
- // FIXME: FormDataElement::m_data should be a SharedBuffer<char>. Then we
- // could avoid this buffer copy.
- m_private->appendData(data.data(), data.size());
-}
-
-void WebHTTPBody::appendFile(const WebString& filePath)
-{
- ensureMutable();
- m_private->appendFile(filePath);
-}
-
-void WebHTTPBody::appendFileRange(const WebString& filePath, long long fileStart, long long fileLength, double modificationTime)
-{
-#if ENABLE(BLOB)
- ensureMutable();
- m_private->appendFileRange(filePath, fileStart, fileLength, modificationTime);
-#endif
-}
-
-void WebHTTPBody::appendBlob(const WebURL& blobURL)
-{
-#if ENABLE(BLOB)
- ensureMutable();
- m_private->appendBlob(blobURL);
-#endif
-}
-
-long long WebHTTPBody::identifier() const
-{
- ASSERT(!isNull());
- return m_private->identifier();
-}
-
-void WebHTTPBody::setIdentifier(long long identifier)
-{
- ensureMutable();
- return m_private->setIdentifier(identifier);
-}
-
-WebHTTPBody::WebHTTPBody(const PassRefPtr<FormData>& data)
- : m_private(static_cast<WebHTTPBodyPrivate*>(data.leakRef()))
-{
-}
-
-WebHTTPBody& WebHTTPBody::operator=(const PassRefPtr<FormData>& data)
-{
- assign(static_cast<WebHTTPBodyPrivate*>(data.leakRef()));
- return *this;
-}
-
-WebHTTPBody::operator PassRefPtr<FormData>() const
-{
- return m_private;
-}
-
-void WebHTTPBody::assign(WebHTTPBodyPrivate* p)
-{
- // p is already ref'd for us by the caller
- if (m_private)
- m_private->deref();
- m_private = p;
-}
-
-void WebHTTPBody::ensureMutable()
-{
- ASSERT(!isNull());
- if (!m_private->hasOneRef())
- assign(static_cast<WebHTTPBodyPrivate*>(m_private->copy().leakRef()));
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebHTTPLoadInfo.cpp b/Source/WebKit/chromium/src/WebHTTPLoadInfo.cpp
deleted file mode 100644
index e3dce8c5a..000000000
--- a/Source/WebKit/chromium/src/WebHTTPLoadInfo.cpp
+++ /dev/null
@@ -1,147 +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 "platform/WebHTTPLoadInfo.h"
-
-#include "ResourceLoadInfo.h"
-#include "ResourceResponse.h"
-#include "platform/WebHTTPHeaderVisitor.h"
-#include "platform/WebString.h"
-
-using namespace WebCore;
-
-namespace WebKit {
-
-void WebHTTPLoadInfo::initialize()
-{
- m_private = adoptRef(new ResourceLoadInfo());
-}
-
-void WebHTTPLoadInfo::reset()
-{
- m_private.reset();
-}
-
-void WebHTTPLoadInfo::assign(const WebHTTPLoadInfo& r)
-{
- m_private = r.m_private;
-}
-
-WebHTTPLoadInfo::WebHTTPLoadInfo(WTF::PassRefPtr<WebCore::ResourceLoadInfo> value)
-{
- m_private = value;
-}
-
-WebHTTPLoadInfo::operator WTF::PassRefPtr<WebCore::ResourceLoadInfo>() const
-{
- return m_private.get();
-}
-
-int WebHTTPLoadInfo::httpStatusCode() const
-{
- ASSERT(!m_private.isNull());
- return m_private->httpStatusCode;
-}
-
-void WebHTTPLoadInfo::setHTTPStatusCode(int statusCode)
-{
- ASSERT(!m_private.isNull());
- m_private->httpStatusCode = statusCode;
-}
-
-WebString WebHTTPLoadInfo::httpStatusText() const
-{
- ASSERT(!m_private.isNull());
- return m_private->httpStatusText;
-}
-
-void WebHTTPLoadInfo::setHTTPStatusText(const WebString& statusText)
-{
- ASSERT(!m_private.isNull());
- m_private->httpStatusText = statusText;
-}
-
-long long WebHTTPLoadInfo::encodedDataLength() const
-{
- ASSERT(!m_private.isNull());
- return m_private->encodedDataLength;
-}
-
-void WebHTTPLoadInfo::setEncodedDataLength(long long encodedDataLength)
-{
- ASSERT(!m_private.isNull());
- m_private->encodedDataLength = encodedDataLength;
-}
-
-static void addHeader(HTTPHeaderMap* map, const WebString& name, const WebString& value)
-{
- pair<HTTPHeaderMap::iterator, bool> result = map->add(name, value);
- if (!result.second)
- result.first->second += ", " + String(value);
-}
-
-void WebHTTPLoadInfo::addRequestHeader(const WebString& name, const WebString& value)
-{
- ASSERT(!m_private.isNull());
- addHeader(&m_private->requestHeaders, name, value);
-}
-
-void WebHTTPLoadInfo::addResponseHeader(const WebString& name, const WebString& value)
-{
- ASSERT(!m_private.isNull());
- addHeader(&m_private->responseHeaders, name, value);
-}
-
-WebString WebHTTPLoadInfo::requestHeadersText() const
-{
- ASSERT(!m_private.isNull());
- return m_private->requestHeadersText;
-}
-
-void WebHTTPLoadInfo::setRequestHeadersText(const WebString& headersText)
-{
- ASSERT(!m_private.isNull());
- m_private->requestHeadersText = headersText;
-}
-
-WebString WebHTTPLoadInfo::responseHeadersText() const
-{
- ASSERT(!m_private.isNull());
- return m_private->responseHeadersText;
-}
-
-void WebHTTPLoadInfo::setResponseHeadersText(const WebString& headersText)
-{
- ASSERT(!m_private.isNull());
- m_private->responseHeadersText = headersText;
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebHitTestResult.cpp b/Source/WebKit/chromium/src/WebHitTestResult.cpp
new file mode 100644
index 000000000..5f806b80c
--- /dev/null
+++ b/Source/WebKit/chromium/src/WebHitTestResult.cpp
@@ -0,0 +1,84 @@
+/*
+* Copyright (C) 2012 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:
+*
+* 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 "WebHitTestResult.h"
+
+#include "Element.h"
+#include "HitTestResult.h"
+#include "KURL.h"
+#include "Node.h"
+#include "RenderObject.h"
+#include "VisiblePosition.h"
+#include "WebNode.h"
+
+#include "platform/WebPoint.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebNode WebHitTestResult::node() const
+{
+ return WebNode(m_private->innerNode());
+}
+
+WebPoint WebHitTestResult::localPoint() const
+{
+ return roundedIntPoint(m_private->localPoint());
+}
+
+WebHitTestResult::WebHitTestResult(const HitTestResult& result)
+{
+ m_private.reset(new HitTestResult(result));
+}
+
+WebHitTestResult& WebHitTestResult::operator=(const HitTestResult& result)
+{
+ m_private.reset(new HitTestResult(result));
+ return *this;
+}
+
+WebHitTestResult::operator HitTestResult() const
+{
+ return *m_private.get();
+}
+
+bool WebHitTestResult::isNull() const
+{
+ return !m_private.get();
+}
+
+void WebHitTestResult::assign(const WebHitTestResult& info)
+{
+ m_private.reset(new HitTestResult(info));
+}
+
+void WebHitTestResult::reset()
+{
+ m_private.reset(0);
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebIDBCursorImpl.cpp b/Source/WebKit/chromium/src/WebIDBCursorImpl.cpp
index 66ed709c5..6f10efe9e 100644
--- a/Source/WebKit/chromium/src/WebIDBCursorImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBCursorImpl.cpp
@@ -72,6 +72,11 @@ void WebIDBCursorImpl::update(const WebSerializedScriptValue& value, WebIDBCallb
m_idbCursorBackend->update(value, IDBCallbacksProxy::create(adoptPtr(callbacks)), ec);
}
+void WebIDBCursorImpl::advance(unsigned long count, WebIDBCallbacks* callbacks, WebExceptionCode& ec)
+{
+ m_idbCursorBackend->advance(count, IDBCallbacksProxy::create(adoptPtr(callbacks)), ec);
+}
+
void WebIDBCursorImpl::continueFunction(const WebIDBKey& key, WebIDBCallbacks* callbacks, WebExceptionCode& ec)
{
m_idbCursorBackend->continueFunction(key, IDBCallbacksProxy::create(adoptPtr(callbacks)), ec);
diff --git a/Source/WebKit/chromium/src/WebIDBCursorImpl.h b/Source/WebKit/chromium/src/WebIDBCursorImpl.h
index 59fbc3343..418675142 100644
--- a/Source/WebKit/chromium/src/WebIDBCursorImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBCursorImpl.h
@@ -49,6 +49,7 @@ public:
virtual WebIDBKey primaryKey() const;
virtual WebSerializedScriptValue value() const;
virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*, WebExceptionCode&);
+ virtual void advance(unsigned long, WebIDBCallbacks*, WebExceptionCode&);
virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*, WebExceptionCode&);
virtual void deleteFunction(WebIDBCallbacks*, WebExceptionCode&);
virtual void prefetchContinue(int numberToFetch, WebIDBCallbacks*, WebExceptionCode&);
diff --git a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h
index 6f83775be..f73be5705 100644
--- a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h
@@ -53,7 +53,10 @@ public:
virtual WebString version() const;
virtual WebDOMStringList objectStoreNames() const;
- virtual WebIDBObjectStore* createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction&, WebExceptionCode&);
+ // FIXME: Remove WebString keyPath overload once callers are updated.
+ // http://webkit.org/b/84207
+ virtual WebIDBObjectStore* createObjectStore(const WebString&, const WebString&, bool, const WebIDBTransaction&, WebExceptionCode&);
+ virtual WebIDBObjectStore* createObjectStore(const WebString& name, const WebIDBKeyPath& keyPath, bool autoIncrement, const WebIDBTransaction& transaction, WebExceptionCode& ec) { return createObjectStore(name, keyPath.string(), autoIncrement, transaction, ec); }
virtual void deleteObjectStore(const WebString& name, const WebIDBTransaction&, WebExceptionCode&);
virtual void setVersion(const WebString& version, WebIDBCallbacks*, WebExceptionCode&);
virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, WebExceptionCode&);
diff --git a/Source/WebKit/chromium/src/WebIDBIndexImpl.cpp b/Source/WebKit/chromium/src/WebIDBIndexImpl.cpp
index 710e300f9..170939567 100644
--- a/Source/WebKit/chromium/src/WebIDBIndexImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBIndexImpl.cpp
@@ -58,7 +58,14 @@ WebString WebIDBIndexImpl::storeName() const
return m_backend->storeName();
}
-WebString WebIDBIndexImpl::keyPath() const
+WebIDBKeyPath WebIDBIndexImpl::keyPath() const
+{
+ return WebIDBKeyPath(m_backend->keyPath());
+}
+
+// FIXME: Remove this method once callers are updated.
+// http://webkit.org/b/84207
+WebString WebIDBIndexImpl::keyPathString() const
{
return m_backend->keyPath();
}
@@ -88,12 +95,12 @@ void WebIDBIndexImpl::count(const WebIDBKeyRange& keyRange, WebIDBCallbacks* ca
m_backend->count(keyRange, IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
}
-void WebIDBIndexImpl::getObject(const WebIDBKey& keyRange, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
+void WebIDBIndexImpl::getObject(const WebIDBKeyRange& keyRange, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
m_backend->get(keyRange, IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
}
-void WebIDBIndexImpl::getKey(const WebIDBKey& keyRange, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
+void WebIDBIndexImpl::getKey(const WebIDBKeyRange& keyRange, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
m_backend->getKey(keyRange, IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
}
diff --git a/Source/WebKit/chromium/src/WebIDBIndexImpl.h b/Source/WebKit/chromium/src/WebIDBIndexImpl.h
index 226feb8e3..d8b1129d0 100644
--- a/Source/WebKit/chromium/src/WebIDBIndexImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBIndexImpl.h
@@ -45,15 +45,18 @@ public:
virtual WebString name() const;
virtual WebString storeName() const;
- virtual WebString keyPath() const;
+ virtual WebIDBKeyPath keyPath() const;
+ // FIXME: Remove this method once callers are updated.
+ // http://webkit.org/b/84207
+ virtual WebString keyPathString() const;
virtual bool unique() const;
virtual bool multiEntry() const;
virtual void openObjectCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
virtual void openKeyCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
virtual void count(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
- virtual void getObject(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
- virtual void getKey(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
+ virtual void getObject(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
+ virtual void getKey(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
private:
WTF::RefPtr<WebCore::IDBIndexBackendInterface> m_backend;
diff --git a/Source/WebKit/chromium/src/WebIDBKeyPath.cpp b/Source/WebKit/chromium/src/WebIDBKeyPath.cpp
index 74f357e40..bcf5dbd0d 100644
--- a/Source/WebKit/chromium/src/WebIDBKeyPath.cpp
+++ b/Source/WebKit/chromium/src/WebIDBKeyPath.cpp
@@ -37,20 +37,78 @@ using namespace WebCore;
namespace WebKit {
+WebIDBKeyPath WebIDBKeyPath::create(const WebVector<WebString>&)
+{
+ // FIXME: Array-type key paths not yet supported. http://webkit.org/b/84207
+ WEBKIT_ASSERT_NOT_REACHED();
+ return createNull();
+}
+
WebIDBKeyPath WebIDBKeyPath::create(const WebString& keyPath)
{
+ if (keyPath.isNull())
+ return createNull();
+
WTF::Vector<WTF::String> idbElements;
IDBKeyPathParseError idbError;
IDBParseKeyPath(keyPath, idbElements, idbError);
return WebIDBKeyPath(idbElements, static_cast<int>(idbError));
}
+WebIDBKeyPath WebIDBKeyPath::createNull()
+{
+ return WebIDBKeyPath(WebString());
+}
+
+WebIDBKeyPath::WebIDBKeyPath(const WebIDBKeyPath& keyPath)
+{
+ assign(keyPath);
+}
+
WebIDBKeyPath::WebIDBKeyPath(const WTF::Vector<WTF::String>& elements, int parseError)
: m_private(new WTF::Vector<WTF::String>(elements))
, m_parseError(parseError)
{
}
+bool WebIDBKeyPath::isValid() const
+{
+ return m_parseError == IDBKeyPathParseErrorNone;
+}
+
+WebIDBKeyPath::Type WebIDBKeyPath::type() const
+{
+ return m_private.get() ? StringType : NullType;
+}
+
+WebString WebIDBKeyPath::string() const
+{
+ if (!m_private.get())
+ return WebString();
+
+ // FIXME: Store the complete string instead of rebuilding it.
+ // http://webkit.org/b/84207
+ WTF::String string("");
+ WTF::Vector<WTF::String>& array = *m_private.get();
+ for (size_t i = 0; i < array.size(); ++i) {
+ if (i)
+ string.append(".");
+ string.append(array[i]);
+ }
+ return WebString(string);
+}
+
+WebIDBKeyPath::WebIDBKeyPath(const WebString& keyPath)
+ : m_parseError(IDBKeyPathParseErrorNone)
+{
+ if (!keyPath.isNull()) {
+ m_private.reset(new WTF::Vector<WTF::String>());
+ IDBKeyPathParseError idbParseError;
+ IDBParseKeyPath(keyPath, *m_private.get(), idbParseError);
+ m_parseError = idbParseError;
+ }
+}
+
int WebIDBKeyPath::parseError() const
{
return m_parseError;
@@ -59,7 +117,10 @@ int WebIDBKeyPath::parseError() const
void WebIDBKeyPath::assign(const WebIDBKeyPath& keyPath)
{
m_parseError = keyPath.m_parseError;
- m_private.reset(new WTF::Vector<WTF::String>(keyPath));
+ if (keyPath.m_private.get())
+ m_private.reset(new WTF::Vector<WTF::String>(keyPath));
+ else
+ m_private.reset(0);
}
void WebIDBKeyPath::reset()
@@ -69,6 +130,7 @@ void WebIDBKeyPath::reset()
WebIDBKeyPath::operator const WTF::Vector<WTF::String, 0>&() const
{
+ ASSERT(m_private.get());
return *m_private.get();
}
diff --git a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
index 55a6add57..624a4e5b3 100755
--- a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
@@ -57,7 +57,14 @@ WebString WebIDBObjectStoreImpl::name() const
return m_objectStore->name();
}
-WebString WebIDBObjectStoreImpl::keyPath() const
+WebIDBKeyPath WebIDBObjectStoreImpl::keyPath() const
+{
+ return WebIDBKeyPath(m_objectStore->keyPath());
+}
+
+// FIXME: Remove this method once callers are updated.
+// http://webkit.org/b/84207
+WebString WebIDBObjectStoreImpl::keyPathString() const
{
return m_objectStore->keyPath();
}
@@ -67,9 +74,9 @@ WebDOMStringList WebIDBObjectStoreImpl::indexNames() const
return m_objectStore->indexNames();
}
-void WebIDBObjectStoreImpl::get(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
+void WebIDBObjectStoreImpl::get(const WebIDBKeyRange& keyRange, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
- m_objectStore->get(key, IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
+ m_objectStore->get(keyRange, IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
}
void WebIDBObjectStoreImpl::put(const WebSerializedScriptValue& value, const WebIDBKey& key, PutMode putMode, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
diff --git a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h
index d2202fc7f..ee3b222ac 100644
--- a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h
@@ -46,18 +46,22 @@ public:
~WebIDBObjectStoreImpl();
WebString name() const;
- WebString keyPath() const;
+ WebIDBKeyPath keyPath() const;
+ // FIXME: Remove this method once callers are updated.
+ // http://webkit.org/b/84207
+ WebString keyPathString() const;
WebDOMStringList indexNames() const;
- void get(const WebIDBKey& key, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
+ void get(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
void put(const WebSerializedScriptValue&, const WebIDBKey&, PutMode, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
void deleteFunction(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
void deleteFunction(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
void clear(WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
- // FIXME: Remove once callers are updated.
- WebIDBIndex* createIndex(const WebString& name, const WebString& keyPath, bool unique, const WebIDBTransaction& transaction, WebExceptionCode& ec) { return createIndex(name, keyPath, unique, false, transaction, ec); }
- WebIDBIndex* createIndex(const WebString& name, const WebString& keyPath, bool unique, bool multiEntry, const WebIDBTransaction&, WebExceptionCode&);
+ // FIXME: Remove WebString keyPath overload once callers are updated.
+ // http://webkit.org/b/84207
+ WebIDBIndex* createIndex(const WebString&, const WebString&, bool, bool, const WebIDBTransaction&, WebExceptionCode&);
+ WebIDBIndex* createIndex(const WebString& name, const WebIDBKeyPath& keyPath, bool unique, bool multiEntry, const WebIDBTransaction& transaction, WebExceptionCode& ec) { return createIndex(name, keyPath.string(), unique, multiEntry, transaction, ec); }
WebIDBIndex* index(const WebString& name, WebExceptionCode&);
void deleteIndex(const WebString& name, const WebIDBTransaction&, WebExceptionCode&);
diff --git a/Source/WebKit/chromium/src/WebExternalTextureLayerImpl.cpp b/Source/WebKit/chromium/src/WebIOSurfaceLayer.cpp
index ec6c29060..77db0c877 100644
--- a/Source/WebKit/chromium/src/WebExternalTextureLayerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIOSurfaceLayer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -24,34 +24,30 @@
*/
#include "config.h"
-#include "WebExternalTextureLayerImpl.h"
+#include <public/WebIOSurfaceLayer.h>
-#include "GraphicsContext.h"
-#include "platform/WebCanvas.h"
+#include "IOSurfaceLayerChromium.h"
+#include <public/WebSize.h>
using namespace WebCore;
namespace WebKit {
-PassRefPtr<WebExternalTextureLayerImpl> WebExternalTextureLayerImpl::create()
+WebIOSurfaceLayer WebIOSurfaceLayer::create()
{
- return adoptRef(new WebExternalTextureLayerImpl());
+ RefPtr<IOSurfaceLayerChromium> layer = IOSurfaceLayerChromium::create();
+ layer->setIsDrawable(true);
+ return WebIOSurfaceLayer(layer.release());
}
-WebExternalTextureLayerImpl::WebExternalTextureLayerImpl()
- : PluginLayerChromium()
+void WebIOSurfaceLayer::setIOSurfaceProperties(unsigned ioSurfaceId, WebSize size)
{
- setFlipped(false);
- setIsDrawable(true);
+ unwrap<IOSurfaceLayerChromium>()->setIOSurfaceProperties(ioSurfaceId, size);
}
-WebExternalTextureLayerImpl::~WebExternalTextureLayerImpl()
+WebIOSurfaceLayer::WebIOSurfaceLayer(PassRefPtr<IOSurfaceLayerChromium> layer)
+ : WebLayer(layer)
{
}
-bool WebExternalTextureLayerImpl::drawsContent() const
-{
- return !!textureId() && LayerChromium::drawsContent();
-}
-
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebInputElement.cpp b/Source/WebKit/chromium/src/WebInputElement.cpp
index f5d52da80..c0037a0ef 100644
--- a/Source/WebKit/chromium/src/WebInputElement.cpp
+++ b/Source/WebKit/chromium/src/WebInputElement.cpp
@@ -31,9 +31,11 @@
#include "config.h"
#include "WebInputElement.h"
+#include "HTMLDataListElement.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
#include "TextControlInnerElements.h"
+#include "WebNodeCollection.h"
#include "platform/WebString.h"
#include <wtf/PassRefPtr.h>
@@ -151,6 +153,21 @@ bool WebInputElement::isChecked() const
return constUnwrap<HTMLInputElement>()->checked();
}
+bool WebInputElement::isMultiple() const
+{
+ return constUnwrap<HTMLInputElement>()->multiple();
+}
+
+WebNodeCollection WebInputElement::dataListOptions() const
+{
+#if ENABLE(DATALIST)
+ HTMLDataListElement* dataList = static_cast<HTMLDataListElement*>(constUnwrap<HTMLInputElement>()->list());
+ if (dataList)
+ return WebNodeCollection(dataList->options());
+#endif
+ return WebNodeCollection();
+}
+
bool WebInputElement::isSpeechInputEnabled() const
{
#if ENABLE(INPUT_SPEECH)
@@ -218,5 +235,4 @@ WebInputElement* toWebInputElement(WebElement* webElement)
return static_cast<WebInputElement*>(webElement);
}
-
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebInputEvent.cpp b/Source/WebKit/chromium/src/WebInputEvent.cpp
index 8ca1cffd4..d204dfac2 100644
--- a/Source/WebKit/chromium/src/WebInputEvent.cpp
+++ b/Source/WebKit/chromium/src/WebInputEvent.cpp
@@ -43,6 +43,38 @@ using namespace WebCore;
namespace WebKit {
+class SameSizeAsWebInputEvent {
+ int inputData[5];
+};
+
+class SameSizeAsWebKeyboardEvent : public SameSizeAsWebInputEvent {
+ int keyboardData[12];
+};
+
+class SameSizeAsWebMouseEvent : public SameSizeAsWebInputEvent {
+ int mouseData[10];
+};
+
+class SameSizeAsWebMouseWheelEvent : public SameSizeAsWebMouseEvent {
+ int mousewheelData[8];
+};
+
+class SameSizeAsWebGestureEvent : public SameSizeAsWebInputEvent {
+ int gestureData[8];
+};
+
+class SameSizeAsWebTouchEvent : public SameSizeAsWebInputEvent {
+ WebTouchPoint touchPoints[3 * WebTouchEvent::touchesLengthCap];
+ int touchData[3];
+};
+
+COMPILE_ASSERT(sizeof(WebInputEvent) == sizeof(SameSizeAsWebInputEvent), WebInputEvent_has_gaps);
+COMPILE_ASSERT(sizeof(WebKeyboardEvent) == sizeof(SameSizeAsWebKeyboardEvent), WebKeyboardEvent_has_gaps);
+COMPILE_ASSERT(sizeof(WebMouseEvent) == sizeof(SameSizeAsWebMouseEvent), WebMouseEvent_has_gaps);
+COMPILE_ASSERT(sizeof(WebMouseWheelEvent) == sizeof(SameSizeAsWebMouseWheelEvent), WebMouseWheelEvent_has_gaps);
+COMPILE_ASSERT(sizeof(WebGestureEvent) == sizeof(SameSizeAsWebGestureEvent), WebGestureEvent_has_gaps);
+COMPILE_ASSERT(sizeof(WebTouchEvent) == sizeof(SameSizeAsWebTouchEvent), WebTouchEvent_has_gaps);
+
static const char* staticKeyIdentifiers(unsigned short keyCode)
{
switch (keyCode) {
diff --git a/Source/WebKit/chromium/src/WebInputEventConversion.cpp b/Source/WebKit/chromium/src/WebInputEventConversion.cpp
index 5cf0ccaec..b4055a91e 100644
--- a/Source/WebKit/chromium/src/WebInputEventConversion.cpp
+++ b/Source/WebKit/chromium/src/WebInputEventConversion.cpp
@@ -155,11 +155,18 @@ PlatformGestureEventBuilder::PlatformGestureEventBuilder(Widget* widget, const W
case WebInputEvent::GestureDoubleTap:
m_type = PlatformEvent::GestureDoubleTap;
break;
+ case WebInputEvent::GestureLongPress:
+ m_type = PlatformEvent::GestureLongPress;
+ break;
case WebInputEvent::GesturePinchBegin:
+ m_type = PlatformEvent::GesturePinchBegin;
+ break;
case WebInputEvent::GesturePinchEnd:
+ m_type = PlatformEvent::GesturePinchEnd;
+ break;
case WebInputEvent::GesturePinchUpdate:
- // FIXME: Once PlatformGestureEvent is updated to support pinch, this should set m_type to appropriate PlatformEvent type.
- ASSERT_NOT_REACHED();
+ m_type = PlatformEvent::GesturePinchUpdate;
+ break;
default:
ASSERT_NOT_REACHED();
}
@@ -167,6 +174,8 @@ PlatformGestureEventBuilder::PlatformGestureEventBuilder(Widget* widget, const W
m_globalPosition = IntPoint(e.globalX, e.globalY);
m_deltaX = e.deltaX;
m_deltaY = e.deltaY;
+ m_gammaX = e.gammaX;
+ m_gammaY = e.gammaY;
m_timestamp = e.timeStampSeconds;
m_modifiers = 0;
diff --git a/Source/WebKit/chromium/src/WebIntent.cpp b/Source/WebKit/chromium/src/WebIntent.cpp
index 77d766d76..ce4e15bd6 100644
--- a/Source/WebKit/chromium/src/WebIntent.cpp
+++ b/Source/WebKit/chromium/src/WebIntent.cpp
@@ -32,7 +32,9 @@
#include "WebIntent.h"
#include "Intent.h"
+#include "PlatformMessagePortChannel.h"
#include "SerializedScriptValue.h"
+#include <wtf/HashMap.h>
namespace WebKit {
@@ -102,4 +104,56 @@ WebString WebIntent::data() const
#endif
}
+WebURL WebIntent::service() const
+{
+#if ENABLE(WEB_INTENTS)
+ return WebURL(m_private->service());
+#else
+ return WebURL();
+#endif
+}
+
+WebMessagePortChannelArray* WebIntent::messagePortChannelsRelease() const
+{
+ // Note: see PlatformMessagePortChannel::postMessageToRemote.
+ WebMessagePortChannelArray* webChannels = 0;
+ WebCore::MessagePortChannelArray* messagePorts = m_private->messagePorts();
+ if (messagePorts) {
+ webChannels = new WebMessagePortChannelArray(messagePorts->size());
+ for (size_t i = 0; i < messagePorts->size(); ++i) {
+ WebCore::PlatformMessagePortChannel* platformChannel = messagePorts->at(i)->channel();
+ (*webChannels)[i] = platformChannel->webChannelRelease();
+ (*webChannels)[i]->setClient(0);
+ }
+ }
+
+ return webChannels;
+}
+
+WebVector<WebString> WebIntent::extrasNames() const
+{
+#if ENABLE(WEB_INTENTS)
+ size_t numExtras = m_private->extras().size();
+ WebVector<WebString> keyStrings(numExtras);
+ WTF::HashMap<String, String>::const_iterator::Keys keyIter = m_private->extras().begin().keys();
+ for (size_t i = 0; keyIter != m_private->extras().end().keys(); ++keyIter, ++i)
+ keyStrings[i] = *keyIter;
+ return keyStrings;
+#else
+ return WebVector<WebString>();
+#endif
+}
+
+WebString WebIntent::extrasValue(const WebString& name) const
+{
+#if ENABLE(WEB_INTENTS)
+ WTF::HashMap<String, String>::const_iterator val = m_private->extras().find(name);
+ if (val == m_private->extras().end())
+ return WebString();
+ return val->second;
+#else
+ return WebString();
+#endif
+}
+
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebKit.cpp b/Source/WebKit/chromium/src/WebKit.cpp
index 77858c4e7..da54cca50 100644
--- a/Source/WebKit/chromium/src/WebKit.cpp
+++ b/Source/WebKit/chromium/src/WebKit.cpp
@@ -37,23 +37,24 @@
#include "Settings.h"
#include "TextEncoding.h"
#include "V8Binding.h"
+#include "V8RecursionScope.h"
#include "WebKitMutationObserver.h"
-#include "platform/WebKitPlatformSupport.h"
#include "WebMediaPlayerClientImpl.h"
#include "WebSocket.h"
-#include "platform/WebThread.h"
#include "WorkerContextExecutionProxy.h"
+#include "platform/WebKitPlatformSupport.h"
+#include "platform/WebThread.h"
#include "v8.h"
-
-#if OS(DARWIN)
-#include "WebSystemInterface.h"
-#endif
-
+#include <public/Platform.h>
#include <wtf/Assertions.h>
#include <wtf/MainThread.h>
#include <wtf/Threading.h>
#include <wtf/text/AtomicString.h>
+#if OS(DARWIN)
+#include "WebSystemInterface.h"
+#endif
+
namespace WebKit {
#if ENABLE(MUTATION_OBSERVERS)
@@ -88,6 +89,13 @@ static bool generateEntropy(unsigned char* buffer, size_t length)
return false;
}
+#ifndef NDEBUG
+static void assertV8RecursionScope()
+{
+ ASSERT(!isMainThread() || WebCore::V8RecursionScope::properlyUsed());
+}
+#endif
+
void initialize(WebKitPlatformSupport* webKitPlatformSupport)
{
initializeWithoutV8(webKitPlatformSupport);
@@ -99,6 +107,9 @@ void initialize(WebKitPlatformSupport* webKitPlatformSupport)
#if ENABLE(MUTATION_OBSERVERS)
// currentThread will always be non-null in production, but can be null in Chromium unit tests.
if (WebThread* currentThread = webKitPlatformSupport->currentThread()) {
+#ifndef NDEBUG
+ v8::V8::AddCallCompletedCallback(&assertV8RecursionScope);
+#endif
ASSERT(!s_endOfTaskRunner);
s_endOfTaskRunner = new EndOfTaskRunner;
currentThread->addTaskObserver(s_endOfTaskRunner);
@@ -118,6 +129,7 @@ void initializeWithoutV8(WebKitPlatformSupport* webKitPlatformSupport)
ASSERT(webKitPlatformSupport);
ASSERT(!s_webKitPlatformSupport);
s_webKitPlatformSupport = webKitPlatformSupport;
+ Platform::initialize(s_webKitPlatformSupport);
WTF::initializeThreading();
WTF::initializeMainThread();
@@ -136,8 +148,13 @@ void initializeWithoutV8(WebKitPlatformSupport* webKitPlatformSupport)
void shutdown()
{
+ // WebKit might have been initialized without V8, so be careful not to invoke
+ // V8 specific functions, if V8 was not properly initialized.
#if ENABLE(MUTATION_OBSERVERS)
if (s_endOfTaskRunner) {
+#ifndef NDEBUG
+ v8::V8::RemoveCallCompletedCallback(&assertV8RecursionScope);
+#endif
ASSERT(s_webKitPlatformSupport->currentThread());
s_webKitPlatformSupport->currentThread()->removeTaskObserver(s_endOfTaskRunner);
delete s_endOfTaskRunner;
@@ -145,6 +162,7 @@ void shutdown()
}
#endif
s_webKitPlatformSupport = 0;
+ Platform::shutdown();
}
WebKitPlatformSupport* webKitPlatformSupport()
diff --git a/Source/WebKit/chromium/src/WebLayer.cpp b/Source/WebKit/chromium/src/WebLayer.cpp
index f31c5a8c3..ecf7452fc 100644
--- a/Source/WebKit/chromium/src/WebLayer.cpp
+++ b/Source/WebKit/chromium/src/WebLayer.cpp
@@ -26,13 +26,15 @@
#include "config.h"
#include "platform/WebLayer.h"
-#include "platform/WebFloatPoint.h"
#include "Color.h"
#include "LayerChromium.h"
#include "SkMatrix44.h"
#include "TransformationMatrix.h"
#include "WebLayerImpl.h"
-#include "platform/WebSize.h"
+#include <public/WebFilterOperations.h>
+#include <public/WebFloatPoint.h>
+#include <public/WebFloatRect.h>
+#include <public/WebSize.h>
using namespace WebCore;
@@ -94,6 +96,16 @@ bool WebLayer::equals(const WebLayer& n) const
return (m_private.get() == n.m_private.get());
}
+void WebLayer::invalidateRect(const WebFloatRect& dirtyRect)
+{
+ m_private->setNeedsDisplayRect(dirtyRect);
+}
+
+void WebLayer::invalidate()
+{
+ m_private->setNeedsDisplay();
+}
+
WebLayer WebLayer::rootLayer() const
{
return WebLayer(const_cast<LayerChromium*>(m_private->rootLayer()));
@@ -241,6 +253,16 @@ void WebLayer::setDebugBorderWidth(float width)
m_private->setDebugBorderWidth(width);
}
+void WebLayer::setFilters(const WebFilterOperations& filters)
+{
+ m_private->setFilters(filters.toFilterOperations());
+}
+
+void WebLayer::setBackgroundFilters(const WebFilterOperations& filters)
+{
+ m_private->setBackgroundFilters(filters.toFilterOperations());
+}
+
WebLayer::WebLayer(const PassRefPtr<LayerChromium>& node)
: m_private(node)
{
diff --git a/Source/WebKit/chromium/src/WebLayerImpl.cpp b/Source/WebKit/chromium/src/WebLayerImpl.cpp
index 13721be0c..16e1206ca 100644
--- a/Source/WebKit/chromium/src/WebLayerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebLayerImpl.cpp
@@ -47,8 +47,4 @@ WebLayerImpl::~WebLayerImpl()
{
}
-void WebLayerImpl::paintContents(GraphicsContext&, const IntRect& clip)
-{
-}
-
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebLayerImpl.h b/Source/WebKit/chromium/src/WebLayerImpl.h
index 3884c42bc..7e4e75062 100644
--- a/Source/WebKit/chromium/src/WebLayerImpl.h
+++ b/Source/WebKit/chromium/src/WebLayerImpl.h
@@ -38,7 +38,6 @@ public:
protected:
WebLayerImpl();
virtual ~WebLayerImpl();
- virtual void paintContents(WebCore::GraphicsContext&, const WebCore::IntRect& clip);
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebLayerTreeView.cpp b/Source/WebKit/chromium/src/WebLayerTreeView.cpp
index 3314dc2f5..6c18f6742 100644
--- a/Source/WebKit/chromium/src/WebLayerTreeView.cpp
+++ b/Source/WebKit/chromium/src/WebLayerTreeView.cpp
@@ -41,7 +41,6 @@ WebLayerTreeView::Settings::operator CCSettings() const
{
CCSettings settings;
settings.acceleratePainting = acceleratePainting;
- settings.compositeOffscreen = compositeOffscreen;
settings.showFPSCounter = showFPSCounter;
settings.showPlatformLayerTree = showPlatformLayerTree;
settings.refreshRate = refreshRate;
@@ -55,23 +54,24 @@ WebLayerTreeView::Settings::operator CCSettings() const
void WebLayerTreeView::reset()
{
- m_private.reset();
+ m_private.reset(0);
}
-void WebLayerTreeView::assign(const WebLayerTreeView& other)
+bool WebLayerTreeView::isNull() const
{
- m_private = other.m_private;
+ return !m_private.get();
}
-bool WebLayerTreeView::equals(const WebLayerTreeView& n) const
+bool WebLayerTreeView::initialize(WebLayerTreeViewClient* client, const WebLayer& root, const WebLayerTreeView::Settings& settings)
{
- return (m_private.get() == n.m_private.get());
+ // We have to leak the pointer here into a WebPrivateOwnPtr. We free this object in reset().
+ m_private.reset(WebLayerTreeViewImpl::create(client, root, settings).leakPtr());
+ return !isNull();
}
-bool WebLayerTreeView::initialize(WebLayerTreeViewClient* client, const WebLayer& root, const WebLayerTreeView::Settings& settings)
+void WebLayerTreeView::setSurfaceReady()
{
- m_private = WebLayerTreeViewImpl::create(client, root, settings);
- return !isNull();
+ m_private->setSurfaceReady();
}
void WebLayerTreeView::setRootLayer(WebLayer *root)
@@ -97,6 +97,11 @@ WebSize WebLayerTreeView::viewportSize() const
return WebSize(m_private->viewportSize());
}
+void WebLayerTreeView::setBackgroundColor(WebColor color)
+{
+ m_private->setBackgroundColor(color);
+}
+
void WebLayerTreeView::setVisible(bool visible)
{
m_private->setVisible(visible);
@@ -122,6 +127,11 @@ void WebLayerTreeView::setNeedsRedraw()
m_private->setNeedsRedraw();
}
+bool WebLayerTreeView::commitRequested() const
+{
+ return m_private->commitRequested();
+}
+
void WebLayerTreeView::composite()
{
if (CCProxy::hasImplThread())
diff --git a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp
index 335879b66..161f9e932 100644
--- a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp
+++ b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp
@@ -41,13 +41,13 @@ using namespace WebCore;
namespace WebKit {
-PassRefPtr<WebLayerTreeViewImpl> WebLayerTreeViewImpl::create(WebLayerTreeViewClient* client, const WebLayer& root, const WebLayerTreeView::Settings& settings)
+PassOwnPtr<WebLayerTreeViewImpl> WebLayerTreeViewImpl::create(WebLayerTreeViewClient* client, const WebLayer& root, const WebLayerTreeView::Settings& settings)
{
- RefPtr<WebLayerTreeViewImpl> host = adoptRef(new WebLayerTreeViewImpl(client, settings));
+ OwnPtr<WebLayerTreeViewImpl> host = adoptPtr(new WebLayerTreeViewImpl(client, settings));
if (!host->initialize())
- return 0;
+ return nullptr;
host->setRootLayer(root);
- return host;
+ return host.release();
}
WebLayerTreeViewImpl::WebLayerTreeViewImpl(WebLayerTreeViewClient* client, const WebLayerTreeView::Settings& settings)
@@ -60,28 +60,28 @@ WebLayerTreeViewImpl::~WebLayerTreeViewImpl()
{
}
-void WebLayerTreeViewImpl::updateAnimations(double frameBeginTime)
+void WebLayerTreeViewImpl::willBeginFrame()
+{
+ m_client->willBeginFrame();
+}
+
+void WebLayerTreeViewImpl::updateAnimations(double monotonicFrameBeginTime)
{
- if (m_client)
- m_client->updateAnimations(frameBeginTime);
+ m_client->updateAnimations(monotonicFrameBeginTime);
}
void WebLayerTreeViewImpl::layout()
{
- if (m_client)
- m_client->layout();
+ m_client->layout();
}
void WebLayerTreeViewImpl::applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale)
{
- if (m_client)
- m_client->applyScrollAndScale(WebSize(scrollDelta), pageScale);
+ m_client->applyScrollAndScale(WebSize(scrollDelta), pageScale);
}
PassRefPtr<GraphicsContext3D> WebLayerTreeViewImpl::createContext()
{
- if (!m_client)
- return 0;
OwnPtr<WebGraphicsContext3D> webContext = adoptPtr(m_client->createContext3D());
if (!webContext)
return 0;
@@ -91,26 +91,27 @@ PassRefPtr<GraphicsContext3D> WebLayerTreeViewImpl::createContext()
void WebLayerTreeViewImpl::didRecreateContext(bool success)
{
- if (m_client)
- m_client->didRebindGraphicsContext(success);
+ m_client->didRebindGraphicsContext(success);
+}
+
+void WebLayerTreeViewImpl::didCommit()
+{
+ m_client->didCommit();
}
void WebLayerTreeViewImpl::didCommitAndDrawFrame()
{
- if (m_client)
- m_client->didCommitAndDrawFrame();
+ m_client->didCommitAndDrawFrame();
}
void WebLayerTreeViewImpl::didCompleteSwapBuffers()
{
- if (m_client)
- m_client->didCompleteSwapBuffers();
+ m_client->didCompleteSwapBuffers();
}
void WebLayerTreeViewImpl::scheduleComposite()
{
- if (m_client)
- m_client->scheduleComposite();
+ m_client->scheduleComposite();
}
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h
index b1b26d0fc..dcd3e2925 100644
--- a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h
+++ b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h
@@ -28,7 +28,7 @@
#include "platform/WebLayerTreeView.h"
#include "cc/CCLayerTreeHost.h"
-#include <wtf/PassRefPtr.h>
+#include <wtf/PassOwnPtr.h>
namespace WebKit {
class WebLayer;
@@ -36,21 +36,24 @@ class WebLayerTreeViewClient;
class WebLayerTreeViewImpl : public WebCore::CCLayerTreeHost, public WebCore::CCLayerTreeHostClient {
public:
- static PassRefPtr<WebLayerTreeViewImpl> create(WebLayerTreeViewClient*, const WebLayer& root, const WebLayerTreeView::Settings&);
-
-private:
- WebLayerTreeViewImpl(WebLayerTreeViewClient*, const WebLayerTreeView::Settings&);
+ static PassOwnPtr<WebLayerTreeViewImpl> create(WebLayerTreeViewClient*, const WebLayer& root, const WebLayerTreeView::Settings&);
virtual ~WebLayerTreeViewImpl();
- virtual void updateAnimations(double frameBeginTime);
- virtual void layout();
- virtual void applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale);
- virtual PassRefPtr<WebCore::GraphicsContext3D> createContext();
- virtual void didRecreateContext(bool success);
- virtual void didCommitAndDrawFrame();
- virtual void didCompleteSwapBuffers();
+
+ virtual void willBeginFrame() OVERRIDE;
+ virtual void updateAnimations(double monotonicFrameBeginTime) OVERRIDE;
+ virtual void layout() OVERRIDE;
+ virtual void applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale) OVERRIDE;
+ virtual PassRefPtr<WebCore::GraphicsContext3D> createContext() OVERRIDE;
+ virtual void didRecreateContext(bool success) OVERRIDE;
+ virtual void didCommit() OVERRIDE;
+ virtual void didCommitAndDrawFrame() OVERRIDE;
+ virtual void didCompleteSwapBuffers() OVERRIDE;
// Only used in the single threaded path.
- virtual void scheduleComposite();
+ virtual void scheduleComposite() OVERRIDE;
+
+private:
+ WebLayerTreeViewImpl(WebLayerTreeViewClient*, const WebLayerTreeView::Settings&);
WebLayerTreeViewClient* m_client;
};
diff --git a/Source/WebKit/chromium/src/WebMediaElement.cpp b/Source/WebKit/chromium/src/WebMediaElement.cpp
deleted file mode 100644
index 4adda1ed9..000000000
--- a/Source/WebKit/chromium/src/WebMediaElement.cpp
+++ /dev/null
@@ -1,64 +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 "WebMediaElement.h"
-
-#include "HTMLMediaElement.h"
-#include "MediaPlayer.h"
-#include "WebMediaPlayer.h"
-#include "WebMediaPlayerClientImpl.h"
-#include <wtf/PassRefPtr.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-WebMediaPlayer* WebMediaElement::player() const
-{
- return WebMediaPlayerClientImpl::fromMediaElement(this)->mediaPlayer();
-}
-
-WebMediaElement::WebMediaElement(const PassRefPtr<HTMLMediaElement>& elem)
- : WebElement(elem)
-{
-}
-
-WebMediaElement& WebMediaElement::operator=(const PassRefPtr<HTMLMediaElement>& elem)
-{
- m_private = elem;
- return *this;
-}
-
-WebMediaElement::operator PassRefPtr<HTMLMediaElement>() const
-{
- return static_cast<HTMLMediaElement*>(m_private.get());
-}
-} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
index 74c4a7200..8ba03f04a 100644
--- a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
+++ b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
@@ -16,16 +16,14 @@
#include "KURL.h"
#include "MediaPlayer.h"
#include "NotImplemented.h"
+#include "PlatformContextSkia.h"
#include "RenderView.h"
#include "TimeRanges.h"
-#include "VideoFrameChromium.h"
-#include "VideoFrameChromiumImpl.h"
#include "VideoLayerChromium.h"
#include "WebAudioSourceProvider.h"
#include "WebFrameClient.h"
#include "WebFrameImpl.h"
#include "WebKit.h"
-#include "WebMediaElement.h"
#include "WebMediaPlayer.h"
#include "WebViewImpl.h"
#include "cc/CCProxy.h"
@@ -42,11 +40,6 @@
#include "RenderLayerCompositor.h"
#endif
-// WebCommon.h defines WEBKIT_USING_SKIA so this has to be included last.
-#if WEBKIT_USING_SKIA
-#include "PlatformContextSkia.h"
-#endif
-
#include <wtf/Assertions.h>
#include <wtf/text/CString.h>
@@ -87,12 +80,6 @@ void WebMediaPlayerClientImpl::registerSelf(MediaEngineRegistrar registrar)
}
}
-WebMediaPlayerClientImpl* WebMediaPlayerClientImpl::fromMediaElement(const WebMediaElement* element)
-{
- PlatformMedia pm = element->constUnwrap<HTMLMediaElement>()->platformMedia();
- return static_cast<WebMediaPlayerClientImpl*>(pm.media.chromiumMediaPlayer);
-}
-
WebMediaPlayer* WebMediaPlayerClientImpl::mediaPlayer() const
{
return m_webMediaPlayer.get();
@@ -122,9 +109,9 @@ void WebMediaPlayerClientImpl::readyStateChanged()
ASSERT(m_mediaPlayer);
m_mediaPlayer->readyStateChanged();
#if USE(ACCELERATED_COMPOSITING)
- if (hasVideo() && supportsAcceleratedRendering() && !m_videoLayer) {
- m_videoLayer = VideoLayerChromium::create(this);
- m_videoLayer->setOpaque(m_opaque);
+ if (hasVideo() && supportsAcceleratedRendering() && m_videoLayer.isNull()) {
+ m_videoLayer = WebVideoLayer::create(this);
+ m_videoLayer.setOpaque(m_opaque);
}
#endif
}
@@ -151,8 +138,8 @@ void WebMediaPlayerClientImpl::repaint()
{
ASSERT(m_mediaPlayer);
#if USE(ACCELERATED_COMPOSITING)
- if (m_videoLayer && supportsAcceleratedRendering())
- m_videoLayer->setNeedsDisplay();
+ if (!m_videoLayer.isNull() && supportsAcceleratedRendering())
+ m_videoLayer.invalidate();
#endif
m_mediaPlayer->repaint();
}
@@ -179,8 +166,8 @@ void WebMediaPlayerClientImpl::setOpaque(bool opaque)
{
#if USE(ACCELERATED_COMPOSITING)
m_opaque = opaque;
- if (m_videoLayer)
- m_videoLayer->setOpaque(m_opaque);
+ if (!m_videoLayer.isNull())
+ m_videoLayer.setOpaque(m_opaque);
#endif
}
@@ -228,6 +215,56 @@ WebKit::WebURL WebMediaPlayerClientImpl::sourceURL() const
#endif
}
+void WebMediaPlayerClientImpl::keyAdded(const WebString& keySystem, const WebString& sessionId)
+{
+#if ENABLE(ENCRYPTED_MEDIA)
+ ASSERT(m_mediaPlayer);
+ m_mediaPlayer->keyAdded(keySystem, sessionId);
+#else
+ UNUSED_PARAM(keySystem);
+ UNUSED_PARAM(sessionId);
+#endif
+}
+
+void WebMediaPlayerClientImpl::keyError(const WebString& keySystem, const WebString& sessionId, MediaKeyErrorCode errorCode, unsigned short systemCode)
+{
+#if ENABLE(ENCRYPTED_MEDIA)
+ ASSERT(m_mediaPlayer);
+ m_mediaPlayer->keyError(keySystem, sessionId, static_cast<MediaPlayerClient::MediaKeyErrorCode>(errorCode), systemCode);
+#else
+ UNUSED_PARAM(keySystem);
+ UNUSED_PARAM(sessionId);
+ UNUSED_PARAM(errorCode);
+ UNUSED_PARAM(systemCode);
+#endif
+}
+
+void WebMediaPlayerClientImpl::keyMessage(const WebString& keySystem, const WebString& sessionId, const unsigned char* message, unsigned messageLength)
+{
+#if ENABLE(ENCRYPTED_MEDIA)
+ ASSERT(m_mediaPlayer);
+ m_mediaPlayer->keyMessage(keySystem, sessionId, message, messageLength);
+#else
+ UNUSED_PARAM(keySystem);
+ UNUSED_PARAM(sessionId);
+ UNUSED_PARAM(message);
+ UNUSED_PARAM(messageLength);
+#endif
+}
+
+void WebMediaPlayerClientImpl::keyNeeded(const WebString& keySystem, const WebString& sessionId, const unsigned char* initData, unsigned initDataLength)
+{
+#if ENABLE(ENCRYPTED_MEDIA)
+ ASSERT(m_mediaPlayer);
+ m_mediaPlayer->keyNeeded(keySystem, sessionId, initData, initDataLength);
+#else
+ UNUSED_PARAM(keySystem);
+ UNUSED_PARAM(sessionId);
+ UNUSED_PARAM(initData);
+ UNUSED_PARAM(initDataLength);
+#endif
+}
+
void WebMediaPlayerClientImpl::disableAcceleratedCompositing()
{
m_supportsAcceleratedCompositing = false;
@@ -278,7 +315,7 @@ void WebMediaPlayerClientImpl::cancelLoad()
PlatformLayer* WebMediaPlayerClientImpl::platformLayer() const
{
ASSERT(m_supportsAcceleratedCompositing);
- return m_videoLayer.get();
+ return m_videoLayer.unwrap<VideoLayerChromium>();
}
#endif
@@ -302,7 +339,38 @@ void WebMediaPlayerClientImpl::pause()
m_webMediaPlayer->pause();
}
+#if USE(NATIVE_FULLSCREEN_VIDEO)
+bool WebMediaPlayerClientImpl::enterFullscreen() const
+{
+ if (m_webMediaPlayer)
+ return m_webMediaPlayer->enterFullscreen();
+ return false;
+}
+
+void WebMediaPlayerClientImpl::exitFullscreen()
+{
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->exitFullscreen();
+}
+#endif
+
#if ENABLE(MEDIA_SOURCE)
+WebCore::MediaPlayer::AddIdStatus WebMediaPlayerClientImpl::sourceAddId(const String& id, const String& type)
+{
+ if (!m_webMediaPlayer)
+ return WebCore::MediaPlayer::NotSupported;
+
+ return static_cast<WebCore::MediaPlayer::AddIdStatus>(m_webMediaPlayer->sourceAddId(id, type));
+}
+
+bool WebMediaPlayerClientImpl::sourceRemoveId(const String& id)
+{
+ if (!m_webMediaPlayer)
+ return false;
+
+ return m_webMediaPlayer->sourceRemoveId(id);
+}
+
bool WebMediaPlayerClientImpl::sourceAppend(const unsigned char* data, unsigned length)
{
if (m_webMediaPlayer)
@@ -317,6 +385,35 @@ void WebMediaPlayerClientImpl::sourceEndOfStream(WebCore::MediaPlayer::EndOfStre
}
#endif
+#if ENABLE(ENCRYPTED_MEDIA)
+MediaPlayer::MediaKeyException WebMediaPlayerClientImpl::generateKeyRequest(const String& keySystem, const unsigned char* initData, unsigned initDataLength)
+{
+ if (!m_webMediaPlayer)
+ return MediaPlayer::InvalidPlayerState;
+
+ WebMediaPlayer::MediaKeyException result = m_webMediaPlayer->generateKeyRequest(keySystem, initData, initDataLength);
+ return static_cast<MediaPlayer::MediaKeyException>(result);
+}
+
+MediaPlayer::MediaKeyException WebMediaPlayerClientImpl::addKey(const String& keySystem, const unsigned char* key, unsigned keyLength, const unsigned char* initData, unsigned initDataLength, const String& sessionId)
+{
+ if (!m_webMediaPlayer)
+ return MediaPlayer::InvalidPlayerState;
+
+ WebMediaPlayer::MediaKeyException result = m_webMediaPlayer->addKey(keySystem, key, keyLength, initData, initDataLength, sessionId);
+ return static_cast<MediaPlayer::MediaKeyException>(result);
+}
+
+MediaPlayer::MediaKeyException WebMediaPlayerClientImpl::cancelKeyRequest(const String& keySystem, const String& sessionId)
+{
+ if (!m_webMediaPlayer)
+ return MediaPlayer::InvalidPlayerState;
+
+ WebMediaPlayer::MediaKeyException result = m_webMediaPlayer->cancelKeyRequest(keySystem, sessionId);
+ return static_cast<MediaPlayer::MediaKeyException>(result);
+}
+#endif
+
void WebMediaPlayerClientImpl::prepareToPlay()
{
if (m_delayingLoad)
@@ -502,20 +599,9 @@ void WebMediaPlayerClientImpl::paintCurrentFrameInContext(GraphicsContext* conte
// Since we're accessing platformContext() directly we have to manually
// check.
if (m_webMediaPlayer && !context->paintingDisabled()) {
-#if WEBKIT_USING_SKIA
PlatformGraphicsContext* platformContext = context->platformContext();
WebCanvas* canvas = platformContext->canvas();
-
- canvas->saveLayerAlpha(0, platformContext->getNormalizedAlpha());
-
- m_webMediaPlayer->paint(canvas, rect);
-
- canvas->restore();
-#elif WEBKIT_USING_CG
- m_webMediaPlayer->paint(context->platformContext(), rect);
-#else
- notImplemented();
-#endif
+ m_webMediaPlayer->paint(canvas, rect, platformContext->getNormalizedAlpha());
}
}
@@ -595,40 +681,37 @@ bool WebMediaPlayerClientImpl::supportsAcceleratedRendering() const
bool WebMediaPlayerClientImpl::acceleratedRenderingInUse()
{
- return m_videoLayer && m_videoLayer->layerTreeHost();
+ return !m_videoLayer.isNull() && m_videoLayer.active();
}
-void WebMediaPlayerClientImpl::setVideoFrameProviderClient(VideoFrameProvider::Client* client)
+void WebMediaPlayerClientImpl::setVideoFrameProviderClient(WebVideoFrameProvider::Client* client)
{
MutexLocker locker(m_compositingMutex);
+ if (m_videoFrameProviderClient)
+ m_videoFrameProviderClient->stopUsingProvider();
m_videoFrameProviderClient = client;
if (m_webMediaPlayer)
m_webMediaPlayer->setStreamTextureClient(client ? this : 0);
}
-VideoFrameChromium* WebMediaPlayerClientImpl::getCurrentFrame()
+WebVideoFrame* WebMediaPlayerClientImpl::getCurrentFrame()
{
MutexLocker locker(m_compositingMutex);
ASSERT(!m_currentVideoFrame);
- if (m_webMediaPlayer) {
- WebVideoFrame* webkitVideoFrame = m_webMediaPlayer->getCurrentFrame();
- if (webkitVideoFrame)
- m_currentVideoFrame = adoptPtr(new VideoFrameChromiumImpl(webkitVideoFrame));
- }
- return m_currentVideoFrame.get();
+ if (m_webMediaPlayer)
+ m_currentVideoFrame = m_webMediaPlayer->getCurrentFrame();
+ return m_currentVideoFrame;
}
-void WebMediaPlayerClientImpl::putCurrentFrame(VideoFrameChromium* videoFrame)
+void WebMediaPlayerClientImpl::putCurrentFrame(WebVideoFrame* videoFrame)
{
MutexLocker locker(m_compositingMutex);
ASSERT(videoFrame == m_currentVideoFrame);
if (!videoFrame)
return;
- if (m_webMediaPlayer) {
- m_webMediaPlayer->putCurrentFrame(
- VideoFrameChromiumImpl::toWebVideoFrame(videoFrame));
- }
- m_currentVideoFrame.clear();
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->putCurrentFrame(videoFrame);
+ m_currentVideoFrame = 0;
}
#endif
@@ -658,10 +741,18 @@ void WebMediaPlayerClientImpl::getSupportedTypes(HashSet<String>& supportedTypes
notImplemented();
}
+#if ENABLE(ENCRYPTED_MEDIA)
+MediaPlayer::SupportsType WebMediaPlayerClientImpl::supportsType(const String& type,
+ const String& codecs,
+ const String& keySystem)
+{
+#else
MediaPlayer::SupportsType WebMediaPlayerClientImpl::supportsType(const String& type,
const String& codecs)
{
- WebMimeRegistry::SupportsType supportsType = webKitPlatformSupport()->mimeRegistry()->supportsMediaMIMEType(type, codecs);
+ String keySystem;
+#endif
+ WebMimeRegistry::SupportsType supportsType = WebKit::Platform::current()->mimeRegistry()->supportsMediaMIMEType(type, codecs, keySystem);
switch (supportsType) {
default:
@@ -702,10 +793,10 @@ void WebMediaPlayerClientImpl::didUpdateMatrix(const float* matrix)
WebMediaPlayerClientImpl::WebMediaPlayerClientImpl()
: m_mediaPlayer(0)
+ , m_currentVideoFrame(0)
, m_delayingLoad(false)
, m_preload(MediaPlayer::MetaData)
#if USE(ACCELERATED_COMPOSITING)
- , m_videoLayer(0)
, m_supportsAcceleratedCompositing(false)
, m_opaque(false)
, m_videoFrameProviderClient(0)
diff --git a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h
index d85e0d1fc..3afb1f5e5 100644
--- a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h
+++ b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h
@@ -35,12 +35,11 @@
#include "AudioSourceProvider.h"
#include "MediaPlayerPrivate.h"
-#include "VideoFrameChromium.h"
-#include "VideoFrameProvider.h"
-#include "VideoLayerChromium.h"
#include "WebAudioSourceProviderClient.h"
#include "WebMediaPlayerClient.h"
#include "WebStreamTextureClient.h"
+#include <public/WebVideoFrameProvider.h>
+#include <public/WebVideoLayer.h>
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
@@ -49,14 +48,13 @@ namespace WebCore { class AudioSourceProviderClient; }
namespace WebKit {
class WebAudioSourceProvider;
-class WebMediaElement;
class WebMediaPlayer;
// This class serves as a bridge between WebCore::MediaPlayer and
// WebKit::WebMediaPlayer.
class WebMediaPlayerClientImpl : public WebCore::MediaPlayerPrivateInterface
#if USE(ACCELERATED_COMPOSITING)
- , public WebCore::VideoFrameProvider
+ , public WebVideoFrameProvider
#endif
, public WebMediaPlayerClient
, public WebStreamTextureClient {
@@ -66,8 +64,6 @@ public:
static void setIsEnabled(bool);
static void registerSelf(WebCore::MediaEngineRegistrar);
- static WebMediaPlayerClientImpl* fromMediaElement(const WebMediaElement* element);
-
// Returns the encapsulated WebKit::WebMediaPlayer.
WebMediaPlayer* mediaPlayer() const;
@@ -89,6 +85,10 @@ public:
virtual WebMediaPlayer::Preload preload() const;
virtual void sourceOpened();
virtual WebKit::WebURL sourceURL() const;
+ virtual void keyAdded(const WebString& keySystem, const WebString& sessionId);
+ virtual void keyError(const WebString& keySystem, const WebString& sessionId, MediaKeyErrorCode, unsigned short systemCode);
+ virtual void keyMessage(const WebString& keySystem, const WebString& sessionId, const unsigned char* message, unsigned messageLength);
+ virtual void keyNeeded(const WebString& keySystem, const WebString& sessionId, const unsigned char* initData, unsigned initDataLength);
virtual void disableAcceleratedCompositing();
// MediaPlayerPrivateInterface methods:
@@ -134,6 +134,10 @@ public:
virtual unsigned droppedFrameCount() const;
virtual unsigned audioDecodedByteCount() const;
virtual unsigned videoDecodedByteCount() const;
+#if USE(NATIVE_FULLSCREEN_VIDEO)
+ virtual bool enterFullscreen() const;
+ virtual void exitFullscreen();
+#endif
#if ENABLE(WEB_AUDIO)
virtual WebCore::AudioSourceProvider* audioSourceProvider();
@@ -142,30 +146,44 @@ public:
#if USE(ACCELERATED_COMPOSITING)
virtual bool supportsAcceleratedRendering() const;
- // VideoFrameProvider methods:
- virtual void setVideoFrameProviderClient(VideoFrameProvider::Client*);
- virtual WebCore::VideoFrameChromium* getCurrentFrame();
- virtual void putCurrentFrame(WebCore::VideoFrameChromium*);
+ // WebVideoFrameProvider methods:
+ virtual void setVideoFrameProviderClient(WebVideoFrameProvider::Client*);
+ virtual WebVideoFrame* getCurrentFrame();
+ virtual void putCurrentFrame(WebVideoFrame*);
#endif
#if ENABLE(MEDIA_SOURCE)
+ virtual WebCore::MediaPlayer::AddIdStatus sourceAddId(const String& id, const String& type);
+ virtual bool sourceRemoveId(const String&);
virtual bool sourceAppend(const unsigned char* data, unsigned length);
virtual void sourceEndOfStream(WebCore::MediaPlayer::EndOfStreamStatus);
#endif
+#if ENABLE(ENCRYPTED_MEDIA)
+ virtual WebCore::MediaPlayer::MediaKeyException generateKeyRequest(const String& keySystem, const unsigned char* initData, unsigned initDataLength) OVERRIDE;
+ virtual WebCore::MediaPlayer::MediaKeyException addKey(const String& keySystem, const unsigned char* key, unsigned keyLength, const unsigned char* initData, unsigned initDataLength, const String& sessionId) OVERRIDE;
+ virtual WebCore::MediaPlayer::MediaKeyException cancelKeyRequest(const String& keySystem, const String& sessionId) OVERRIDE;
+#endif
+
// WebStreamTextureClient methods:
virtual void didReceiveFrame();
virtual void didUpdateMatrix(const float*);
-private:
+protected:
WebMediaPlayerClientImpl();
+private:
void startDelayedLoad();
void loadInternal();
static PassOwnPtr<WebCore::MediaPlayerPrivateInterface> create(WebCore::MediaPlayer*);
static void getSupportedTypes(WTF::HashSet<WTF::String>&);
+#if ENABLE(ENCRYPTED_MEDIA)
+ static WebCore::MediaPlayer::SupportsType supportsType(
+ const WTF::String& type, const WTF::String& codecs, const String& keySystem);
+#else
static WebCore::MediaPlayer::SupportsType supportsType(
const WTF::String& type, const WTF::String& codecs);
+#endif
#if USE(ACCELERATED_COMPOSITING)
bool acceleratedRenderingInUse();
#endif
@@ -173,15 +191,15 @@ private:
Mutex m_compositingMutex; // Guards m_currentVideoFrame and m_videoFrameProviderClient.
WebCore::MediaPlayer* m_mediaPlayer;
OwnPtr<WebMediaPlayer> m_webMediaPlayer;
- OwnPtr<WebCore::VideoFrameChromium> m_currentVideoFrame;
+ WebVideoFrame* m_currentVideoFrame;
String m_url;
bool m_delayingLoad;
WebCore::MediaPlayer::Preload m_preload;
#if USE(ACCELERATED_COMPOSITING)
- RefPtr<WebCore::VideoLayerChromium> m_videoLayer;
+ WebVideoLayer m_videoLayer;
bool m_supportsAcceleratedCompositing;
bool m_opaque;
- VideoFrameProvider::Client* m_videoFrameProviderClient;
+ WebVideoFrameProvider::Client* m_videoFrameProviderClient;
#endif
static bool m_isEnabled;
diff --git a/Source/WebKit/chromium/src/WebMediaStreamDescriptor.cpp b/Source/WebKit/chromium/src/WebMediaStreamDescriptor.cpp
deleted file mode 100644
index 9faa4fd85..000000000
--- a/Source/WebKit/chromium/src/WebMediaStreamDescriptor.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (C) 2011 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"
-
-#if ENABLE(MEDIA_STREAM)
-
-#include "platform/WebMediaStreamDescriptor.h"
-
-#include "MediaStreamComponent.h"
-#include "MediaStreamDescriptor.h"
-#include "MediaStreamSource.h"
-#include "platform/WebMediaStreamComponent.h"
-#include "platform/WebMediaStreamSource.h"
-#include "platform/WebString.h"
-#include <wtf/Vector.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-WebMediaStreamDescriptor::WebMediaStreamDescriptor(const PassRefPtr<WebCore::MediaStreamDescriptor>& mediaStreamDescriptor)
- : m_private(mediaStreamDescriptor)
-{
-}
-
-WebMediaStreamDescriptor::WebMediaStreamDescriptor(WebCore::MediaStreamDescriptor* mediaStreamDescriptor)
- : m_private(mediaStreamDescriptor)
-{
-}
-
-void WebMediaStreamDescriptor::reset()
-{
- m_private.reset();
-}
-
-WebString WebMediaStreamDescriptor::label() const
-{
- return m_private->label();
-}
-
-// FIXME: Cleanup when the chromium code has switched to the split sources implementation.
-void WebMediaStreamDescriptor::sources(WebVector<WebMediaStreamSource>& webSources) const
-{
- size_t numberOfAudioSources = m_private->numberOfAudioComponents();
- size_t numberOfVideoSources = m_private->numberOfVideoComponents();
- WebVector<WebMediaStreamSource> result(numberOfAudioSources + numberOfVideoSources);
- size_t i = 0;
- for (size_t j = 0; j < numberOfAudioSources; ++i, ++j)
- result[i] = m_private->audioComponent(j)->source();
- for (size_t j = 0; j < numberOfVideoSources; ++i, ++j)
- result[i] = m_private->videoComponent(j)->source();
- webSources.swap(result);
-}
-
-void WebMediaStreamDescriptor::audioSources(WebVector<WebMediaStreamComponent>& webSources) const
-{
- size_t numberOfSources = m_private->numberOfAudioComponents();
- WebVector<WebMediaStreamComponent> result(numberOfSources);
- for (size_t i = 0; i < numberOfSources; ++i)
- result[i] = m_private->audioComponent(i);
- webSources.swap(result);
-}
-
-void WebMediaStreamDescriptor::videoSources(WebVector<WebMediaStreamComponent>& webSources) const
-{
- size_t numberOfSources = m_private->numberOfVideoComponents();
- WebVector<WebMediaStreamComponent> result(numberOfSources);
- for (size_t i = 0; i < numberOfSources; ++i)
- result[i] = m_private->videoComponent(i);
- webSources.swap(result);
-}
-
-WebMediaStreamDescriptor& WebMediaStreamDescriptor::operator=(const PassRefPtr<WebCore::MediaStreamDescriptor>& mediaStreamDescriptor)
-{
- m_private = mediaStreamDescriptor;
- return *this;
-}
-
-WebMediaStreamDescriptor::operator PassRefPtr<WebCore::MediaStreamDescriptor>() const
-{
- return m_private.get();
-}
-
-WebMediaStreamDescriptor::operator WebCore::MediaStreamDescriptor*() const
-{
- return m_private.get();
-}
-
-// FIXME: Cleanup when the chromium code has switched to the split sources implementation.
-void WebMediaStreamDescriptor::initialize(const WebString& label, const WebVector<WebMediaStreamSource>& sources)
-{
- MediaStreamSourceVector audio, video;
- for (size_t i = 0; i < sources.size(); ++i) {
- MediaStreamSource* curr = sources[i];
- if (curr->type() == MediaStreamSource::TypeAudio)
- audio.append(curr);
- else if (curr->type() == MediaStreamSource::TypeVideo)
- video.append(curr);
- }
- m_private = MediaStreamDescriptor::create(label, audio, video);
-}
-
-void WebMediaStreamDescriptor::initialize(const WebString& label, const WebVector<WebMediaStreamSource>& audioSources, const WebVector<WebMediaStreamSource>& videoSources)
-{
- MediaStreamSourceVector audio, video;
- for (size_t i = 0; i < audioSources.size(); ++i) {
- MediaStreamSource* curr = audioSources[i];
- audio.append(curr);
- }
- for (size_t i = 0; i < videoSources.size(); ++i) {
- MediaStreamSource* curr = videoSources[i];
- video.append(curr);
- }
- m_private = MediaStreamDescriptor::create(label, audio, video);
-}
-
-void WebMediaStreamDescriptor::assign(const WebMediaStreamDescriptor& other)
-{
- m_private = other.m_private;
-}
-
-} // namespace WebKit
-
-#endif // ENABLE(MEDIA_STREAM)
-
diff --git a/Source/WebKit/chromium/src/WebMediaStreamSource.cpp b/Source/WebKit/chromium/src/WebMediaStreamSource.cpp
deleted file mode 100644
index a9fac4b06..000000000
--- a/Source/WebKit/chromium/src/WebMediaStreamSource.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2011 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"
-
-#if ENABLE(MEDIA_STREAM)
-
-#include "platform/WebMediaStreamSource.h"
-
-#include "MediaStreamSource.h"
-#include "platform/WebString.h"
-#include <wtf/Vector.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-WebMediaStreamSource::WebMediaStreamSource(const PassRefPtr<MediaStreamSource>& mediaStreamSource)
- : m_private(mediaStreamSource)
-{
-}
-
-WebMediaStreamSource& WebMediaStreamSource::operator=(WebCore::MediaStreamSource* mediaStreamSource)
-{
- m_private = mediaStreamSource;
- return *this;
-}
-
-void WebMediaStreamSource::assign(const WebMediaStreamSource& other)
-{
- m_private = other.m_private;
-}
-
-void WebMediaStreamSource::reset()
-{
- m_private.reset();
-}
-
-WebMediaStreamSource::operator PassRefPtr<MediaStreamSource>() const
-{
- return m_private.get();
-}
-
-WebMediaStreamSource::operator MediaStreamSource*() const
-{
- return m_private.get();
-}
-
-void WebMediaStreamSource::initialize(const WebString& id, Type type, const WebString& name)
-{
- m_private = MediaStreamSource::create(id, static_cast<MediaStreamSource::Type>(type), name);
-}
-
-WebString WebMediaStreamSource::id() const
-{
- ASSERT(!m_private.isNull());
- return m_private.get()->id();
-}
-
-WebMediaStreamSource::Type WebMediaStreamSource::type() const
-{
- ASSERT(!m_private.isNull());
- return static_cast<Type>(m_private.get()->type());
-}
-
-WebString WebMediaStreamSource::name() const
-{
- ASSERT(!m_private.isNull());
- return m_private.get()->name();
-}
-
-} // namespace WebKit
-
-#endif // ENABLE(MEDIA_STREAM)
-
diff --git a/Source/WebKit/chromium/src/WebNamedNodeMap.cpp b/Source/WebKit/chromium/src/WebNamedNodeMap.cpp
deleted file mode 100644
index ba5f29625..000000000
--- a/Source/WebKit/chromium/src/WebNamedNodeMap.cpp
+++ /dev/null
@@ -1,70 +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 "WebNamedNodeMap.h"
-
-#include "Element.h"
-#include "NamedNodeMap.h"
-#include "Node.h"
-#include "WebAttribute.h"
-#include "WebNode.h"
-#include <wtf/PassRefPtr.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-void WebNamedNodeMap::reset()
-{
- m_private.reset();
-}
-
-void WebNamedNodeMap::assign(const WebNamedNodeMap& other)
-{
- m_private = other.m_private;
-}
-
-WebNamedNodeMap::WebNamedNodeMap(const PassRefPtr<NamedNodeMap>& other)
- : m_private(other)
-{
-}
-
-unsigned WebNamedNodeMap::length() const
-{
- return m_private->length();
-}
-
-WebAttribute WebNamedNodeMap::attributeItem(unsigned index) const
-{
- return WebAttribute(m_private->element()->attributeItem(index));
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebNotification.cpp b/Source/WebKit/chromium/src/WebNotification.cpp
index 849dc4f67..f6e981d3c 100644
--- a/Source/WebKit/chromium/src/WebNotification.cpp
+++ b/Source/WebKit/chromium/src/WebNotification.cpp
@@ -31,7 +31,7 @@
#include "config.h"
#include "WebNotification.h"
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#include "Event.h"
#include "Notification.h"
@@ -88,13 +88,13 @@ WebURL WebNotification::iconURL() const
WebString WebNotification::title() const
{
ASSERT(!isHTML());
- return m_private->contents().title;
+ return m_private->title();
}
WebString WebNotification::body() const
{
ASSERT(!isHTML());
- return m_private->contents().body;
+ return m_private->body();
}
WebTextDirection WebNotification::direction() const
@@ -106,7 +106,7 @@ WebTextDirection WebNotification::direction() const
WebString WebNotification::replaceId() const
{
- return m_private->replaceId();
+ return m_private->tag();
}
void WebNotification::detachPresenter()
@@ -116,7 +116,10 @@ void WebNotification::detachPresenter()
void WebNotification::dispatchDisplayEvent()
{
+#if ENABLE(LEGACY_NOTIFICATIONS)
dispatchEvent("display");
+#endif
+ dispatchEvent("show");
}
void WebNotification::dispatchErrorEvent(const WebKit::WebString& /* errorMessage */)
@@ -174,4 +177,4 @@ void WebNotification::assign(WebNotificationPrivate* p)
} // namespace WebKit
-#endif // ENABLE(NOTIFICATIONS)
+#endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
diff --git a/Source/WebKit/chromium/src/WebPagePopupImpl.cpp b/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
index bc810c7b1..1ad417bad 100644
--- a/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 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
@@ -29,21 +29,299 @@
*/
#include "config.h"
+#include "WebPagePopupImpl.h"
+#include "Chrome.h"
+#include "EmptyClients.h"
+#include "FileChooser.h"
+#include "FocusController.h"
+#include "FormState.h"
+#include "FrameView.h"
+#include "HTMLFormElement.h"
+#include "Page.h"
+#include "PagePopupClient.h"
+#include "PageWidgetDelegate.h"
+#include "Settings.h"
+#include "WebInputEvent.h"
+#include "WebInputEventConversion.h"
#include "WebPagePopup.h"
+#include "WebViewImpl.h"
+#include "WebWidgetClient.h"
+
+using namespace WebCore;
+using namespace std;
namespace WebKit {
+#if ENABLE(PAGE_POPUP)
+
+class PagePopupChromeClient : public EmptyChromeClient {
+ WTF_MAKE_NONCOPYABLE(PagePopupChromeClient);
+ WTF_MAKE_FAST_ALLOCATED;
+
+public:
+ explicit PagePopupChromeClient(WebPagePopupImpl* popup)
+ : m_popup(popup)
+ {
+ ASSERT(m_popup->widgetClient());
+ }
+
+private:
+ virtual void closeWindowSoon() OVERRIDE
+ {
+ m_popup->closePopup();
+ }
+
+ virtual FloatRect windowRect() OVERRIDE
+ {
+ return FloatRect(m_popup->m_windowRectInScreen.x, m_popup->m_windowRectInScreen.y, m_popup->m_windowRectInScreen.width, m_popup->m_windowRectInScreen.height);
+ }
+
+ virtual void setWindowRect(const FloatRect& rect) OVERRIDE
+ {
+ IntRect intRect(rect);
+ const WebRect currentRect = m_popup->m_windowRectInScreen;
+ if (intRect.x() == currentRect.x && intRect.y() == currentRect.y && m_popup->m_isPutAboveOrigin)
+ intRect.setY(currentRect.y + currentRect.height - intRect.height());
+ m_popup->m_windowRectInScreen = intRect;
+ m_popup->widgetClient()->setWindowRect(m_popup->m_windowRectInScreen);
+ }
+
+ virtual void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, unsigned int lineNumber, const String&) OVERRIDE
+ {
+#ifndef NDEBUG
+ fprintf(stderr, "CONSOLE MESSSAGE:%u: %s\n", lineNumber, message.utf8().data());
+#else
+ UNUSED_PARAM(message);
+ UNUSED_PARAM(lineNumber);
+#endif
+ }
+
+ virtual void invalidateContentsAndRootView(const IntRect& paintRect, bool) OVERRIDE
+ {
+ if (paintRect.isEmpty())
+ return;
+ m_popup->widgetClient()->didInvalidateRect(paintRect);
+ }
+
+ virtual void scroll(const IntSize& scrollDelta, const IntRect& scrollRect, const IntRect& clipRect) OVERRIDE
+ {
+ m_popup->widgetClient()->didScrollRect(scrollDelta.width(), scrollDelta.height(), intersection(scrollRect, clipRect));
+ }
+
+ virtual void invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate) OVERRIDE
+ {
+ invalidateContentsAndRootView(updateRect, immediate);
+ }
+
+ virtual void scheduleAnimation() OVERRIDE
+ {
+ m_popup->widgetClient()->scheduleAnimation();
+ }
+
+ virtual void* webView() const OVERRIDE
+ {
+ return m_popup->m_webView;
+ }
+
+ WebPagePopupImpl* m_popup;
+};
+
// WebPagePopupImpl ----------------------------------------------------------------
-// FIXME: WebPagePopupImpl implementation will be written here.
+WebPagePopupImpl::WebPagePopupImpl(WebWidgetClient* client)
+ : m_widgetClient(client)
+ , m_isPutAboveOrigin(false)
+{
+ ASSERT(client);
+}
+
+WebPagePopupImpl::~WebPagePopupImpl()
+{
+ ASSERT(!m_page);
+}
+
+bool WebPagePopupImpl::init(WebViewImpl* webView, PagePopupClient* popupClient, const IntRect& originBoundsInRootView)
+{
+ ASSERT(webView);
+ ASSERT(popupClient);
+ m_webView = webView;
+ m_popupClient = popupClient;
+
+ WebSize rootViewSize = webView->size();
+ IntSize popupSize = popupClient->contentSize();
+ IntRect popupBoundsInRootView(IntPoint(max(0, originBoundsInRootView.x()), max(0, originBoundsInRootView.maxY())), popupSize);
+ if (popupBoundsInRootView.maxY() > rootViewSize.height) {
+ popupBoundsInRootView.setY(max(0, originBoundsInRootView.y() - popupSize.height()));
+ m_isPutAboveOrigin = true;
+ }
+ if (popupBoundsInRootView.maxX() > rootViewSize.width)
+ popupBoundsInRootView.setX(max(0, rootViewSize.width - popupSize.width()));
+ IntRect boundsInScreen = webView->page()->chrome()->rootViewToScreen(popupBoundsInRootView);
+
+ m_widgetClient->setWindowRect(boundsInScreen);
+ m_windowRectInScreen = boundsInScreen;
+ if (!initPage())
+ return false;
+ m_widgetClient->show(WebNavigationPolicy());
+
+ setFocus(true);
+
+ return true;
+}
+
+bool WebPagePopupImpl::initPage()
+{
+ Page::PageClients pageClients;
+ fillWithEmptyClients(pageClients);
+ m_chromeClient = adoptPtr(new PagePopupChromeClient(this));
+ pageClients.chromeClient = m_chromeClient.get();
+
+ m_page = adoptPtr(new Page(pageClients));
+ m_page->settings()->setScriptEnabled(true);
+ m_page->settings()->setAllowScriptsToCloseWindows(true);
+
+ static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClient;
+ RefPtr<Frame> frame = Frame::create(m_page.get(), 0, emptyFrameLoaderClient);
+ frame->setView(FrameView::create(frame.get()));
+ frame->init();
+ frame->view()->resize(m_popupClient->contentSize());
+ frame->view()->setTransparent(false);
+
+ DocumentWriter* writer = frame->loader()->activeDocumentLoader()->writer();
+ writer->setMIMEType("text/html");
+ writer->setEncoding("UTF-8", false);
+ writer->begin();
+ m_popupClient->writeDocument(*writer);
+ writer->end();
+
+ frame->script()->installFunctionsForPagePopup(frame.get(), m_popupClient);
+ return true;
+}
+
+WebSize WebPagePopupImpl::size()
+{
+ return m_popupClient->contentSize();
+}
+
+void WebPagePopupImpl::animate(double)
+{
+ PageWidgetDelegate::animate(m_page.get(), monotonicallyIncreasingTime());
+}
+
+void WebPagePopupImpl::setCompositorSurfaceReady()
+{
+}
+
+void WebPagePopupImpl::composite(bool)
+{
+}
+
+void WebPagePopupImpl::layout()
+{
+ PageWidgetDelegate::layout(m_page.get());
+}
+
+void WebPagePopupImpl::paint(WebCanvas* canvas, const WebRect& rect)
+{
+ PageWidgetDelegate::paint(m_page.get(), 0, canvas, rect);
+}
+
+void WebPagePopupImpl::resize(const WebSize& newSize)
+{
+ if (m_page)
+ m_page->mainFrame()->view()->resize(newSize);
+ m_widgetClient->didInvalidateRect(WebRect(0, 0, newSize.width, newSize.height));
+}
+
+bool WebPagePopupImpl::handleKeyEvent(const WebKeyboardEvent&)
+{
+ // The main WebView receives key events and forward them to this via handleKeyEvent().
+ ASSERT_NOT_REACHED();
+ return false;
+}
+
+bool WebPagePopupImpl::handleCharEvent(const WebKeyboardEvent&)
+{
+ // The main WebView receives key events and forward them to this via handleKeyEvent().
+ ASSERT_NOT_REACHED();
+ return false;
+}
+
+#if ENABLE(GESTURE_EVENTS)
+bool WebPagePopupImpl::handleGestureEvent(const WebGestureEvent& event)
+{
+ if (!m_page || !m_page->mainFrame() || !m_page->mainFrame()->view())
+ return false;
+ Frame& frame = *m_page->mainFrame();
+ return frame.eventHandler()->handleGestureEvent(PlatformGestureEventBuilder(frame.view(), event));
+}
+#endif
+
+bool WebPagePopupImpl::handleInputEvent(const WebInputEvent& event)
+{
+ return PageWidgetDelegate::handleInputEvent(m_page.get(), *this, event);
+}
+
+bool WebPagePopupImpl::handleKeyEvent(const PlatformKeyboardEvent& event)
+{
+ if (!m_page->mainFrame() || !m_page->mainFrame()->view())
+ return false;
+ return m_page->mainFrame()->eventHandler()->keyEvent(event);
+}
+
+void WebPagePopupImpl::setFocus(bool enable)
+{
+ if (!m_page)
+ return;
+ m_page->focusController()->setFocused(enable);
+ if (enable)
+ m_page->focusController()->setActive(true);
+}
+
+void WebPagePopupImpl::close()
+{
+ m_page.clear();
+ m_widgetClient = 0;
+ deref();
+}
+
+void WebPagePopupImpl::closePopup()
+{
+ if (m_page) {
+ m_page->setGroupName(String());
+ m_page->mainFrame()->loader()->stopAllLoaders();
+ m_page->mainFrame()->loader()->stopLoading(UnloadEventPolicyNone);
+ }
+ // m_widgetClient might be 0 because this widget might be already closed.
+ if (m_widgetClient) {
+ // closeWidgetSoon() will call this->close() later.
+ m_widgetClient->closeWidgetSoon();
+ }
+
+ m_popupClient->didClosePopup();
+}
+
+#endif // ENABLE(PAGE_POPUP)
// WebPagePopup ----------------------------------------------------------------
-WebPagePopup* WebPagePopup::create(WebWidgetClient*)
+WebPagePopup* WebPagePopup::create(WebWidgetClient* client)
{
- // FIXME: Returns a WebPagePopupImpl object.
+#if ENABLE(PAGE_POPUP)
+ if (!client)
+ CRASH();
+ // A WebPagePopupImpl instance usually has two references.
+ // - One owned by the instance itself. It represents the visible widget.
+ // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
+ // WebPagePopupImpl to close.
+ // We need them because the closing operation is asynchronous and the widget
+ // can be closed while the WebViewImpl is unaware of it.
+ return adoptRef(new WebPagePopupImpl(client)).leakRef();
+#else
+ UNUSED_PARAM(client);
return 0;
+#endif
}
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebPagePopupImpl.h b/Source/WebKit/chromium/src/WebPagePopupImpl.h
new file mode 100644
index 000000000..2e1c8c3f3
--- /dev/null
+++ b/Source/WebKit/chromium/src/WebPagePopupImpl.h
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2012 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 WebPagePopupImpl_h
+#define WebPagePopupImpl_h
+
+#if ENABLE(PAGE_POPUP)
+
+#include "PagePopup.h"
+#include "PageWidgetDelegate.h"
+#include "WebPagePopup.h"
+#include <wtf/OwnPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+class Page;
+class PagePopupClient;
+class PlatformKeyboardEvent;
+}
+
+namespace WebKit {
+
+class PagePopupChromeClient;
+class WebViewImpl;
+
+class WebPagePopupImpl : public WebPagePopup,
+ public PageWidgetEventHandler,
+ public WebCore::PagePopup,
+ public RefCounted<WebPagePopupImpl> {
+ WTF_MAKE_NONCOPYABLE(WebPagePopupImpl);
+ WTF_MAKE_FAST_ALLOCATED;
+
+public:
+ virtual ~WebPagePopupImpl();
+ bool init(WebViewImpl*, WebCore::PagePopupClient*, const WebCore::IntRect& originBoundsInRootView);
+ bool handleKeyEvent(const WebCore::PlatformKeyboardEvent&);
+ void closePopup();
+ WebWidgetClient* widgetClient() const { return m_widgetClient; }
+
+private:
+ // WebWidget functions
+ virtual WebSize size() OVERRIDE;
+ virtual void animate(double) OVERRIDE;
+ virtual void setCompositorSurfaceReady() OVERRIDE;
+ virtual void composite(bool) OVERRIDE;
+ virtual void layout() OVERRIDE;
+ virtual void paint(WebCanvas*, const WebRect&) OVERRIDE;
+ virtual void resize(const WebSize&) OVERRIDE;
+ virtual void close() OVERRIDE;
+ virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE;
+ virtual void setFocus(bool) OVERRIDE;
+
+ // PageWidgetEventHandler functions
+ virtual bool handleKeyEvent(const WebKeyboardEvent&) OVERRIDE;
+ virtual bool handleCharEvent(const WebKeyboardEvent&) OVERRIDE;
+#if ENABLE(GESTURE_EVENTS)
+ virtual bool handleGestureEvent(const WebGestureEvent&) OVERRIDE;
+#endif
+
+ explicit WebPagePopupImpl(WebWidgetClient*);
+ bool initPage();
+
+ WebWidgetClient* m_widgetClient;
+ WebRect m_windowRectInScreen;
+ WebViewImpl* m_webView;
+ OwnPtr<WebCore::Page> m_page;
+ OwnPtr<PagePopupChromeClient> m_chromeClient;
+ WebCore::PagePopupClient* m_popupClient;
+ bool m_isPutAboveOrigin;
+
+ friend class WebPagePopup;
+ friend class PagePopupChromeClient;
+};
+
+} // namespace WebKit
+#endif // ENABLE(PAGE_POPUP)
+#endif // WebPagePopupImpl_h
diff --git a/Source/WebKit/chromium/src/WebPageSerializer.cpp b/Source/WebKit/chromium/src/WebPageSerializer.cpp
index 1ad70b1b4..6adac2d6b 100644
--- a/Source/WebKit/chromium/src/WebPageSerializer.cpp
+++ b/Source/WebKit/chromium/src/WebPageSerializer.cpp
@@ -41,19 +41,18 @@
#include "KURL.h"
#include "MHTMLArchive.h"
#include "PageSerializer.h"
-#include "Vector.h"
-
#include "platform/WebCString.h"
+#include "platform/WebString.h"
+#include "platform/WebURL.h"
+#include "platform/WebVector.h"
#include "WebFrame.h"
#include "WebFrameImpl.h"
#include "WebPageSerializerClient.h"
#include "WebPageSerializerImpl.h"
-#include "platform/WebString.h"
-#include "platform/WebURL.h"
-#include "platform/WebVector.h"
#include "WebView.h"
#include "WebViewImpl.h"
+#include <wtf/Vector.h>
#include <wtf/text/StringConcatenate.h>
using namespace WebCore;
diff --git a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
index a71703b15..a4a585b96 100644
--- a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
@@ -33,7 +33,6 @@
#include "Chrome.h"
#include "ChromeClientImpl.h"
-#include "PluginLayerChromium.h"
#include "ScrollbarGroup.h"
#include "platform/WebClipboard.h"
#include "WebCursorInfo.h"
@@ -328,23 +327,31 @@ void WebPluginContainerImpl::reportGeometry()
m_webPlugin->updateGeometry(windowRect, clipRect, cutOutRects, isVisible());
- if (m_scrollbarGroup)
+ if (m_scrollbarGroup) {
m_scrollbarGroup->scrollAnimator()->contentsResized();
+ m_scrollbarGroup->setFrameRect(frameRect());
+ }
}
-void WebPluginContainerImpl::setBackingTextureId(unsigned id)
+void WebPluginContainerImpl::setBackingTextureId(unsigned textureId)
{
#if USE(ACCELERATED_COMPOSITING)
- unsigned currId = m_platformLayer->textureId();
- if (currId == id)
+ if (m_textureId == textureId)
return;
- m_platformLayer->setTextureId(id);
+ ASSERT(m_ioSurfaceLayer.isNull());
+
+ if (m_textureLayer.isNull())
+ m_textureLayer = WebExternalTextureLayer::create();
+ m_textureLayer.setTextureId(textureId);
+
// If anyone of the IDs is zero we need to switch between hardware
// and software compositing. This is done by triggering a style recalc
// on the container element.
- if (!(currId * id))
+ if (!m_textureId || !textureId)
m_element->setNeedsStyleRecalc(WebCore::SyntheticStyleChange);
+
+ m_textureId = textureId;
#endif
}
@@ -352,26 +359,34 @@ void WebPluginContainerImpl::setBackingIOSurfaceId(int width,
int height,
uint32_t ioSurfaceId)
{
-#if OS(DARWIN) && USE(ACCELERATED_COMPOSITING)
- uint32_t currentId = m_platformLayer->getIOSurfaceId();
- if (ioSurfaceId == currentId)
+#if USE(ACCELERATED_COMPOSITING)
+ if (ioSurfaceId == m_ioSurfaceId)
return;
- m_platformLayer->setIOSurfaceProperties(width, height, ioSurfaceId);
+ ASSERT(m_textureLayer.isNull());
+
+ if (m_ioSurfaceLayer.isNull())
+ m_ioSurfaceLayer = WebIOSurfaceLayer::create();
+ m_ioSurfaceLayer.setIOSurfaceProperties(ioSurfaceId, WebSize(width, height));
// If anyone of the IDs is zero we need to switch between hardware
// and software compositing. This is done by triggering a style recalc
// on the container element.
- if (!(ioSurfaceId * currentId))
+ if (!ioSurfaceId || !m_ioSurfaceId)
m_element->setNeedsStyleRecalc(WebCore::SyntheticStyleChange);
+
+ m_ioSurfaceId = ioSurfaceId;
#endif
}
void WebPluginContainerImpl::commitBackingTexture()
{
#if USE(ACCELERATED_COMPOSITING)
- if (m_platformLayer)
- m_platformLayer->setNeedsDisplay();
+ if (!m_textureLayer.isNull())
+ m_textureLayer.invalidate();
+
+ if (!m_ioSurfaceLayer.isNull())
+ m_ioSurfaceLayer.invalidate();
#endif
}
@@ -438,8 +453,11 @@ void WebPluginContainerImpl::zoomLevelChanged(double zoomLevel)
void WebPluginContainerImpl::setOpaque(bool opaque)
{
#if USE(ACCELERATED_COMPOSITING)
- if (m_platformLayer)
- m_platformLayer->setOpaque(opaque);
+ if (!m_textureLayer.isNull())
+ m_textureLayer.setOpaque(opaque);
+
+ if (!m_ioSurfaceLayer.isNull())
+ m_ioSurfaceLayer.setOpaque(opaque);
#endif
}
@@ -451,10 +469,10 @@ bool WebPluginContainerImpl::isRectTopmost(const WebRect& rect)
// hitTestResultAtPoint() takes a padding rectangle.
// FIXME: We'll be off by 1 when the width or height is even.
- IntRect windowRect = convertToContainingWindow(static_cast<IntRect>(rect));
- LayoutPoint center = windowRect.center();
+ IntRect documentRect(x() + rect.x, y() + rect.y, rect.width, rect.height);
+ LayoutPoint center = documentRect.center();
// Make the rect we're checking (the point surrounded by padding rects) contained inside the requested rect. (Note that -1/2 is 0.)
- LayoutSize padding((windowRect.width() - 1) / 2, (windowRect.height() - 1) / 2);
+ LayoutSize padding((documentRect.width() - 1) / 2, (documentRect.height() - 1) / 2);
HitTestResult result =
page->mainFrame()->eventHandler()->hitTestResultAtPoint(center, false, false, DontHitTestScrollbars, HitTestRequest::ReadOnly | HitTestRequest::Active, padding);
const HitTestResult::NodeSet& nodes = result.rectBasedTestResult();
@@ -514,15 +532,18 @@ void WebPluginContainerImpl::willDestroyPluginLoadObserver(WebPluginLoadObserver
#if USE(ACCELERATED_COMPOSITING)
WebCore::LayerChromium* WebPluginContainerImpl::platformLayer() const
{
- return (m_platformLayer->textureId() || m_platformLayer->getIOSurfaceId()) ? m_platformLayer.get() : 0;
+ if (m_textureId)
+ return m_textureLayer.unwrap<LayerChromium>();
+ if (m_ioSurfaceId)
+ return m_ioSurfaceLayer.unwrap<LayerChromium>();
+ return 0;
}
#endif
-
ScrollbarGroup* WebPluginContainerImpl::scrollbarGroup()
{
if (!m_scrollbarGroup)
- m_scrollbarGroup = adoptPtr(new ScrollbarGroup(m_element->document()->frame()->view()));
+ m_scrollbarGroup = adoptPtr(new ScrollbarGroup(m_element->document()->frame()->view(), frameRect()));
return m_scrollbarGroup.get();
}
@@ -555,7 +576,8 @@ WebPluginContainerImpl::WebPluginContainerImpl(WebCore::HTMLPlugInElement* eleme
, m_element(element)
, m_webPlugin(webPlugin)
#if USE(ACCELERATED_COMPOSITING)
- , m_platformLayer(PluginLayerChromium::create())
+ , m_textureId(0)
+ , m_ioSurfaceId(0)
#endif
{
}
diff --git a/Source/WebKit/chromium/src/WebPluginContainerImpl.h b/Source/WebKit/chromium/src/WebPluginContainerImpl.h
index 9d970f2f8..04878455c 100644
--- a/Source/WebKit/chromium/src/WebPluginContainerImpl.h
+++ b/Source/WebKit/chromium/src/WebPluginContainerImpl.h
@@ -35,6 +35,8 @@
#include "WebPluginContainer.h"
#include "Widget.h"
+#include <public/WebExternalTextureLayer.h>
+#include <public/WebIOSurfaceLayer.h>
#include <wtf/OwnPtr.h>
#include <wtf/PassRefPtr.h>
#include <wtf/Vector.h>
@@ -48,7 +50,6 @@ class IntRect;
class KeyboardEvent;
class LayerChromium;
class MouseEvent;
-class PluginLayerChromium;
class ResourceError;
class ResourceResponse;
class WheelEvent;
@@ -173,7 +174,13 @@ private:
Vector<WebPluginLoadObserver*> m_pluginLoadObservers;
#if USE(ACCELERATED_COMPOSITING)
- RefPtr<WebCore::PluginLayerChromium> m_platformLayer;
+ // A composited plugin will either have no composited layer, a texture layer, or an IOSurface layer.
+ // It will never have both a texture and IOSurface output.
+ unsigned m_textureId;
+ WebExternalTextureLayer m_textureLayer;
+
+ unsigned m_ioSurfaceId;
+ WebIOSurfaceLayer m_ioSurfaceLayer;
#endif
// The associated scrollbar group object, created lazily. Used for Pepper
diff --git a/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp b/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
index 3f328f55b..1f0b7668a 100644
--- a/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
@@ -207,6 +207,11 @@ void WebPopupMenuImpl::themeChanged()
notImplemented();
}
+void WebPopupMenuImpl::setCompositorSurfaceReady()
+{
+ notImplemented();
+}
+
void WebPopupMenuImpl::composite(bool)
{
notImplemented();
@@ -269,18 +274,16 @@ bool WebPopupMenuImpl::handleInputEvent(const WebInputEvent& inputEvent)
case WebInputEvent::GestureTap:
case WebInputEvent::GestureTapDown:
case WebInputEvent::GestureDoubleTap:
+ case WebInputEvent::GestureLongPress:
+ case WebInputEvent::GesturePinchBegin:
+ case WebInputEvent::GesturePinchEnd:
+ case WebInputEvent::GesturePinchUpdate:
return handleGestureEvent(*static_cast<const WebGestureEvent*>(&inputEvent));
case WebInputEvent::Undefined:
case WebInputEvent::MouseEnter:
case WebInputEvent::ContextMenu:
return false;
-
- case WebInputEvent::GesturePinchBegin:
- case WebInputEvent::GesturePinchEnd:
- case WebInputEvent::GesturePinchUpdate:
- // FIXME: Once PlatformGestureEvent is updated to support pinch, this should call handleGestureEvent, just like it currently does for gesture scroll.
- return false;
}
return false;
}
diff --git a/Source/WebKit/chromium/src/WebPopupMenuImpl.h b/Source/WebKit/chromium/src/WebPopupMenuImpl.h
index a3fddb6d0..c22a0bbec 100644
--- a/Source/WebKit/chromium/src/WebPopupMenuImpl.h
+++ b/Source/WebKit/chromium/src/WebPopupMenuImpl.h
@@ -75,6 +75,7 @@ public:
virtual void layout() OVERRIDE;
virtual void paint(WebCanvas*, const WebRect&) OVERRIDE;
virtual void themeChanged() OVERRIDE;
+ virtual void setCompositorSurfaceReady() OVERRIDE;
virtual void composite(bool finish) OVERRIDE;
virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE;
virtual void mouseCaptureLost() OVERRIDE;
diff --git a/Source/WebKit/chromium/src/WebRange.cpp b/Source/WebKit/chromium/src/WebRange.cpp
index 05a421251..be24dd793 100644
--- a/Source/WebKit/chromium/src/WebRange.cpp
+++ b/Source/WebKit/chromium/src/WebRange.cpp
@@ -33,10 +33,12 @@
#include "Document.h"
#include "Frame.h"
+#include "FrameView.h"
#include "Range.h"
#include "TextIterator.h"
#include "WebFrameImpl.h"
#include "WebNode.h"
+#include "platform/WebFloatQuad.h"
#include "platform/WebString.h"
#include <wtf/PassRefPtr.h>
@@ -99,6 +101,27 @@ WebRange WebRange::fromDocumentRange(WebFrame* frame, int start, int length)
return TextIterator::rangeFromLocationAndLength(scope, start, length);
}
+WebVector<WebFloatQuad> WebRange::textQuads() const
+{
+ if (isNull())
+ return WebVector<WebFloatQuad>();
+
+ Frame* frame = m_private->ownerDocument() ? m_private->ownerDocument()->frame() : 0;
+ if (!frame)
+ return WebVector<WebFloatQuad>();
+
+ Vector<FloatQuad> quads;
+ m_private->textQuads(quads);
+ for (unsigned i = 0; i < quads.size(); ++i) {
+ quads[i].setP1(frame->view()->contentsToWindow(roundedIntPoint(quads[i].p1())));
+ quads[i].setP2(frame->view()->contentsToWindow(roundedIntPoint(quads[i].p2())));
+ quads[i].setP3(frame->view()->contentsToWindow(roundedIntPoint(quads[i].p3())));
+ quads[i].setP4(frame->view()->contentsToWindow(roundedIntPoint(quads[i].p4())));
+ }
+
+ return quads;
+}
+
WebRange::WebRange(const WTF::PassRefPtr<WebCore::Range>& range)
: m_private(static_cast<WebRangePrivate*>(range.leakRef()))
{
diff --git a/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp b/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
index d297a828c..f6478e4ba 100644
--- a/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -116,14 +116,14 @@ bool WebRuntimeFeatures::isSocketsEnabled()
void WebRuntimeFeatures::enableNotifications(bool enable)
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
RuntimeEnabledFeatures::setWebkitNotificationsEnabled(enable);
#endif
}
bool WebRuntimeFeatures::isNotificationsEnabled()
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
return RuntimeEnabledFeatures::webkitNotificationsEnabled();
#else
return false;
@@ -358,6 +358,24 @@ bool WebRuntimeFeatures::isMediaStreamEnabled()
#endif
}
+void WebRuntimeFeatures::enablePeerConnection(bool enable)
+{
+#if ENABLE(MEDIA_STREAM)
+ RuntimeEnabledFeatures::setPeerConnectionEnabled(enable);
+#else
+ UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isPeerConnectionEnabled()
+{
+#if ENABLE(MEDIA_STREAM)
+ return RuntimeEnabledFeatures::peerConnectionEnabled();
+#else
+ return false;
+#endif
+}
+
void WebRuntimeFeatures::enableFullScreenAPI(bool enable)
{
#if ENABLE(FULLSCREEN_API)
@@ -397,7 +415,7 @@ bool WebRuntimeFeatures::isPointerLockEnabled()
void WebRuntimeFeatures::enableMediaSource(bool enable)
{
#if ENABLE(MEDIA_SOURCE)
- RuntimeEnabledFeatures::setWebkitMediaSourceEnabled(enable);
+ RuntimeEnabledFeatures::setMediaSourceEnabled(enable);
#else
UNUSED_PARAM(enable);
#endif
@@ -406,7 +424,25 @@ void WebRuntimeFeatures::enableMediaSource(bool enable)
bool WebRuntimeFeatures::isMediaSourceEnabled()
{
#if ENABLE(MEDIA_SOURCE)
- return RuntimeEnabledFeatures::webkitMediaSourceEnabled();
+ return RuntimeEnabledFeatures::mediaSourceEnabled();
+#else
+ return false;
+#endif
+}
+
+void WebRuntimeFeatures::enableEncryptedMedia(bool enable)
+{
+#if ENABLE(ENCRYPTED_MEDIA)
+ RuntimeEnabledFeatures::setEncryptedMediaEnabled(enable);
+#else
+ UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isEncryptedMediaEnabled()
+{
+#if ENABLE(ENCRYPTED_MEDIA)
+ return RuntimeEnabledFeatures::encryptedMediaEnabled();
#else
return false;
#endif
@@ -484,5 +520,22 @@ bool WebRuntimeFeatures::isStyleScopedEnabled()
#endif
}
+void WebRuntimeFeatures::enableInputTypeDate(bool enable)
+{
+#if ENABLE(INPUT_TYPE_DATE)
+ RuntimeEnabledFeatures::setInputTypeDateEnabled(enable);
+#else
+ UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isInputTypeDateEnabled()
+{
+#if ENABLE(INPUT_TYPE_DATE)
+ return RuntimeEnabledFeatures::inputTypeDateEnabled();
+#else
+ return false;
+#endif
+}
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebURL.cpp b/Source/WebKit/chromium/src/WebScopedMicrotaskSuppression.cpp
index 4beaf2ed9..7d165c189 100644
--- a/Source/WebKit/chromium/src/WebURL.cpp
+++ b/Source/WebKit/chromium/src/WebScopedMicrotaskSuppression.cpp
@@ -29,30 +29,29 @@
*/
#include "config.h"
-#include "platform/WebURL.h"
+#include "WebScopedMicrotaskSuppression.h"
-#include "KURL.h"
+#include "V8RecursionScope.h"
+#include <wtf/OwnPtr.h>
namespace WebKit {
-WebURL::WebURL(const WebCore::KURL& url)
- : m_spec(url.utf8String())
- , m_parsed(url.parsed())
- , m_isValid(url.isValid())
-{
-}
+#ifndef NDEBUG
+class WebScopedMicrotaskSuppression::Impl : public WebCore::V8RecursionScope::MicrotaskSuppression { };
+#endif
-WebURL& WebURL::operator=(const WebCore::KURL& url)
+void WebScopedMicrotaskSuppression::initialize()
{
- m_spec = url.utf8String();
- m_parsed = url.parsed();
- m_isValid = url.isValid();
- return *this;
+#ifndef NDEBUG
+ m_impl.reset(new Impl());
+#endif
}
-WebURL::operator WebCore::KURL() const
+void WebScopedMicrotaskSuppression::reset()
{
- return WebCore::KURL(m_spec, m_parsed, m_isValid);
+#ifndef NDEBUG
+ m_impl.reset(0);
+#endif
}
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebSecurityPolicy.cpp b/Source/WebKit/chromium/src/WebSecurityPolicy.cpp
index 01162779e..a14a36dcd 100644
--- a/Source/WebKit/chromium/src/WebSecurityPolicy.cpp
+++ b/Source/WebKit/chromium/src/WebSecurityPolicy.cpp
@@ -68,6 +68,11 @@ void WebSecurityPolicy::registerURLSchemeAsCORSEnabled(const WebString& scheme)
SchemeRegistry::registerURLSchemeAsCORSEnabled(scheme);
}
+void WebSecurityPolicy::registerURLSchemeAsEmptyDocument(const WebString& scheme)
+{
+ SchemeRegistry::registerURLSchemeAsEmptyDocument(scheme);
+}
+
void WebSecurityPolicy::addOriginAccessWhitelistEntry(
const WebURL& sourceOrigin,
const WebString& destinationProtocol,
@@ -102,7 +107,7 @@ bool WebSecurityPolicy::shouldHideReferrer(const WebURL& url, const WebString& r
WebString WebSecurityPolicy::generateReferrerHeader(WebReferrerPolicy referrerPolicy, const WebURL& url, const WebString& referrer)
{
- return SecurityPolicy::generateReferrerHeader(static_cast<SecurityPolicy::ReferrerPolicy>(referrerPolicy), url, referrer);
+ return SecurityPolicy::generateReferrerHeader(static_cast<ReferrerPolicy>(referrerPolicy), url, referrer);
}
void WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs(const WebString& scheme)
diff --git a/Source/WebKit/chromium/src/WebMediaStreamComponent.cpp b/Source/WebKit/chromium/src/WebSessionDescriptionDescriptor.cpp
index 644bcf77b..e8f96e568 100644
--- a/Source/WebKit/chromium/src/WebMediaStreamComponent.cpp
+++ b/Source/WebKit/chromium/src/WebSessionDescriptionDescriptor.cpp
@@ -32,10 +32,10 @@
#if ENABLE(MEDIA_STREAM)
-#include "platform/WebMediaStreamComponent.h"
+#include "platform/WebSessionDescriptionDescriptor.h"
-#include "MediaStreamComponent.h"
-#include "platform/WebMediaStreamSource.h"
+#include "SessionDescriptionDescriptor.h"
+#include "platform/WebICECandidateDescriptor.h"
#include "platform/WebString.h"
#include <wtf/Vector.h>
@@ -43,42 +43,47 @@ using namespace WebCore;
namespace WebKit {
-WebMediaStreamComponent::WebMediaStreamComponent(WebCore::MediaStreamComponent* mediaStreamComponent)
- : m_private(mediaStreamComponent)
+WebSessionDescriptionDescriptor::WebSessionDescriptionDescriptor(const PassRefPtr<SessionDescriptionDescriptor>& sessionDescription)
+ : m_private(sessionDescription)
{
}
-WebMediaStreamComponent& WebMediaStreamComponent::operator=(WebCore::MediaStreamComponent* mediaStreamComponent)
+void WebSessionDescriptionDescriptor::assign(const WebSessionDescriptionDescriptor& other)
{
- m_private = mediaStreamComponent;
- return *this;
+ m_private = other.m_private;
}
-void WebMediaStreamComponent::reset()
+void WebSessionDescriptionDescriptor::reset()
{
m_private.reset();
}
-WebMediaStreamComponent::operator PassRefPtr<MediaStreamComponent>() const
+WebSessionDescriptionDescriptor::operator WTF::PassRefPtr<WebCore::SessionDescriptionDescriptor>()
{
return m_private.get();
}
-WebMediaStreamComponent::operator MediaStreamComponent*() const
+void WebSessionDescriptionDescriptor::initialize(const WebString& sdp)
{
- return m_private.get();
+ m_private = SessionDescriptionDescriptor::create(sdp);
+}
+
+size_t WebSessionDescriptionDescriptor::numberOfAddedCandidates() const
+{
+ ASSERT(!m_private.isNull());
+ return m_private.get()->numberOfAddedCandidates();
}
-bool WebMediaStreamComponent::isEnabled() const
+WebICECandidateDescriptor WebSessionDescriptionDescriptor::candidate(size_t index) const
{
ASSERT(!m_private.isNull());
- return m_private.get()->enabled();
+ return m_private.get()->candidate(index);
}
-WebMediaStreamSource WebMediaStreamComponent::source() const
+WebString WebSessionDescriptionDescriptor::initialSDP() const
{
ASSERT(!m_private.isNull());
- return WebMediaStreamSource(m_private.get()->source());
+ return m_private.get()->initialSDP();
}
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.cpp b/Source/WebKit/chromium/src/WebSettingsImpl.cpp
index 3b3a84f98..190981988 100644
--- a/Source/WebKit/chromium/src/WebSettingsImpl.cpp
+++ b/Source/WebKit/chromium/src/WebSettingsImpl.cpp
@@ -47,9 +47,9 @@ namespace WebKit {
WebSettingsImpl::WebSettingsImpl(Settings* settings)
: m_settings(settings)
- , m_compositeToTextureEnabled(false)
, m_showFPSCounter(false)
, m_showPlatformLayerTree(false)
+ , m_viewportEnabled(false)
{
ASSERT(settings);
}
@@ -298,6 +298,11 @@ void WebSettingsImpl::setExperimentalCSSRegionsEnabled(bool enabled)
m_settings->setCSSRegionsEnabled(enabled);
}
+void WebSettingsImpl::setExperimentalCSSCustomFilterEnabled(bool enabled)
+{
+ m_settings->setCSSCustomFilterEnabled(enabled);
+}
+
void WebSettingsImpl::setOpenGLMultisamplingEnabled(bool enabled)
{
m_settings->setOpenGLMultisamplingEnabled(enabled);
@@ -349,11 +354,6 @@ void WebSettingsImpl::setMockScrollbarsEnabled(bool enabled)
m_settings->setMockScrollbarsEnabled(enabled);
}
-void WebSettingsImpl::setCompositeToTextureEnabled(bool enabled)
-{
- m_compositeToTextureEnabled = enabled;
-}
-
void WebSettingsImpl::setAcceleratedCompositingFor3DTransformsEnabled(bool enabled)
{
m_settings->setAcceleratedCompositingFor3DTransformsEnabled(enabled);
@@ -492,6 +492,15 @@ void WebSettingsImpl::setEnableScrollAnimator(bool enabled)
#endif
}
+bool WebSettingsImpl::scrollAnimatorEnabled() const
+{
+#if ENABLE(SMOOTH_SCROLLING)
+ return m_settings->scrollAnimatorEnabled();
+#else
+ return false;
+#endif
+}
+
void WebSettingsImpl::setHixie76WebSocketProtocolEnabled(bool enabled)
{
#if ENABLE(WEB_SOCKETS)
@@ -553,4 +562,9 @@ void WebSettingsImpl::setThreadedAnimationEnabled(bool enabled)
m_settings->setThreadedAnimationEnabled(enabled);
}
+void WebSettingsImpl::setViewportEnabled(bool enabled)
+{
+ m_viewportEnabled = enabled;
+}
+
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.h b/Source/WebKit/chromium/src/WebSettingsImpl.h
index 7024b5164..3ea9dce38 100644
--- a/Source/WebKit/chromium/src/WebSettingsImpl.h
+++ b/Source/WebKit/chromium/src/WebSettingsImpl.h
@@ -90,6 +90,7 @@ public:
virtual void setWebAudioEnabled(bool);
virtual void setExperimentalWebGLEnabled(bool);
virtual void setExperimentalCSSRegionsEnabled(bool);
+ virtual void setExperimentalCSSCustomFilterEnabled(bool);
virtual void setOpenGLMultisamplingEnabled(bool);
virtual void setPrivilegedWebGLExtensionsEnabled(bool);
virtual void setWebGLErrorsToConsoleEnabled(bool);
@@ -102,8 +103,6 @@ public:
virtual void setAcceleratedCompositingEnabled(bool);
virtual void setForceCompositingMode(bool);
virtual void setMockScrollbarsEnabled(bool);
- virtual void setCompositeToTextureEnabled(bool);
- virtual bool compositeToTextureEnabled() const { return m_compositeToTextureEnabled; }
virtual void setAcceleratedCompositingFor3DTransformsEnabled(bool);
virtual void setAcceleratedCompositingForVideoEnabled(bool);
virtual void setAcceleratedCompositingForPluginsEnabled(bool);
@@ -130,6 +129,7 @@ public:
virtual void setPasswordEchoDurationInSeconds(double);
virtual void setShouldPrintBackgrounds(bool);
virtual void setEnableScrollAnimator(bool);
+ virtual bool scrollAnimatorEnabled() const;
virtual void setHixie76WebSocketProtocolEnabled(bool);
virtual void setVisualWordMovementEnabled(bool);
virtual void setShouldDisplaySubtitles(bool);
@@ -139,12 +139,14 @@ public:
virtual void setPerTilePaintingEnabled(bool);
virtual void setPartialSwapEnabled(bool);
virtual void setThreadedAnimationEnabled(bool);
+ virtual void setViewportEnabled(bool);
+ virtual bool viewportEnabled() const { return m_viewportEnabled; }
private:
WebCore::Settings* m_settings;
- bool m_compositeToTextureEnabled;
bool m_showFPSCounter;
bool m_showPlatformLayerTree;
+ bool m_viewportEnabled;
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebSharedWorkerImpl.cpp b/Source/WebKit/chromium/src/WebSharedWorkerImpl.cpp
index 3fa19d25d..301c75e36 100644
--- a/Source/WebKit/chromium/src/WebSharedWorkerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebSharedWorkerImpl.cpp
@@ -320,10 +320,11 @@ void WebSharedWorkerImpl::postTaskToLoader(PassOwnPtr<ScriptExecutionContext::Ta
m_loadingDocument->postTask(task);
}
-void WebSharedWorkerImpl::postTaskForModeToWorkerContext(
+bool WebSharedWorkerImpl::postTaskForModeToWorkerContext(
PassOwnPtr<ScriptExecutionContext::Task> task, const String& mode)
{
m_workerThread->runLoop().postTaskForMode(task, mode);
+ return true;
}
diff --git a/Source/WebKit/chromium/src/WebSharedWorkerImpl.h b/Source/WebKit/chromium/src/WebSharedWorkerImpl.h
index b98a2c9d7..4041592b5 100644
--- a/Source/WebKit/chromium/src/WebSharedWorkerImpl.h
+++ b/Source/WebKit/chromium/src/WebSharedWorkerImpl.h
@@ -86,7 +86,7 @@ public:
// WebCore::WorkerLoaderProxy methods:
virtual void postTaskToLoader(PassOwnPtr<WebCore::ScriptExecutionContext::Task>);
- virtual void postTaskForModeToWorkerContext(
+ virtual bool postTaskForModeToWorkerContext(
PassOwnPtr<WebCore::ScriptExecutionContext::Task>, const WTF::String& mode);
// WebFrameClient methods to support resource loading thru the 'shadow page'.
diff --git a/Source/WebKit/chromium/src/WebSocketImpl.cpp b/Source/WebKit/chromium/src/WebSocketImpl.cpp
index 30a6033d3..179303ad9 100644
--- a/Source/WebKit/chromium/src/WebSocketImpl.cpp
+++ b/Source/WebKit/chromium/src/WebSocketImpl.cpp
@@ -31,7 +31,7 @@
#include "config.h"
#include "WebSocketImpl.h"
-#include "ArrayBuffer.h"
+#include <wtf/ArrayBuffer.h>
#include "Document.h"
#include "KURL.h"
#if ENABLE(WEB_SOCKETS)
diff --git a/Source/WebKit/chromium/src/WebSpeechGrammar.cpp b/Source/WebKit/chromium/src/WebSpeechGrammar.cpp
new file mode 100644
index 000000000..b28509de8
--- /dev/null
+++ b/Source/WebKit/chromium/src/WebSpeechGrammar.cpp
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2012 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebSpeechGrammar.h"
+
+#include "SpeechGrammar.h"
+#include <wtf/PassRefPtr.h>
+
+namespace WebKit {
+
+void WebSpeechGrammar::reset()
+{
+ m_private.reset();
+}
+
+WebSpeechGrammar::WebSpeechGrammar(const PassRefPtr<WebCore::SpeechGrammar>& value)
+ : m_private(value)
+{
+}
+
+WebSpeechGrammar& WebSpeechGrammar::operator=(const WTF::PassRefPtr<WebCore::SpeechGrammar>& value)
+{
+ m_private = value;
+ return *this;
+}
+
+WebURL WebSpeechGrammar::src() const
+{
+ WEBKIT_ASSERT(m_private.get());
+ return m_private->src();
+}
+
+float WebSpeechGrammar::weight() const
+{
+ WEBKIT_ASSERT(m_private.get());
+ return m_private->weight();
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebSpeechRecognitionHandle.cpp b/Source/WebKit/chromium/src/WebSpeechRecognitionHandle.cpp
new file mode 100644
index 000000000..a555673c2
--- /dev/null
+++ b/Source/WebKit/chromium/src/WebSpeechRecognitionHandle.cpp
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2012 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebSpeechRecognitionHandle.h"
+
+#include "SpeechRecognition.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebSpeechRecognitionHandle::reset()
+{
+ m_private.reset();
+}
+
+void WebSpeechRecognitionHandle::assign(const WebSpeechRecognitionHandle& other)
+{
+ m_private = other.m_private;
+}
+
+bool WebSpeechRecognitionHandle::equals(const WebSpeechRecognitionHandle& other) const
+{
+ return (m_private.get() == other.m_private.get());
+}
+
+bool WebSpeechRecognitionHandle::lessThan(const WebSpeechRecognitionHandle& other) const
+{
+ return (m_private.get() < other.m_private.get());
+}
+
+WebSpeechRecognitionHandle::WebSpeechRecognitionHandle(const PassRefPtr<SpeechRecognition>& speechRecognition)
+ : m_private(speechRecognition)
+{
+}
+
+WebSpeechRecognitionHandle& WebSpeechRecognitionHandle::operator=(const PassRefPtr<SpeechRecognition>& speechRecognition)
+{
+ m_private = speechRecognition;
+ return *this;
+}
+
+WebSpeechRecognitionHandle::operator PassRefPtr<SpeechRecognition>() const
+{
+ return m_private.get();
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebSpeechRecognitionResult.cpp b/Source/WebKit/chromium/src/WebSpeechRecognitionResult.cpp
new file mode 100644
index 000000000..b546f88d1
--- /dev/null
+++ b/Source/WebKit/chromium/src/WebSpeechRecognitionResult.cpp
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2012 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebSpeechRecognitionResult.h"
+
+#include "SpeechRecognitionAlternative.h"
+#include "SpeechRecognitionResult.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/Vector.h>
+
+namespace WebKit {
+
+void WebSpeechRecognitionResult::assign(const WebSpeechRecognitionResult& other)
+{
+ m_private = other.m_private;
+}
+
+void WebSpeechRecognitionResult::assign(const WebVector<WebString>& transcripts, const WebVector<float>& confidences, bool final)
+{
+ ASSERT(transcripts.size() == confidences.size());
+
+ Vector<RefPtr<WebCore::SpeechRecognitionAlternative> > alternatives(transcripts.size());
+ for (size_t i = 0; i < transcripts.size(); ++i)
+ alternatives[i] = WebCore::SpeechRecognitionAlternative::create(transcripts[i], confidences[i]);
+
+ m_private = WebCore::SpeechRecognitionResult::create(alternatives, final);
+}
+
+void WebSpeechRecognitionResult::reset()
+{
+ m_private.reset();
+}
+
+WebSpeechRecognitionResult::operator PassRefPtr<WebCore::SpeechRecognitionResult>() const
+{
+ return m_private.get();
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebStorageAreaImpl.cpp b/Source/WebKit/chromium/src/WebStorageAreaImpl.cpp
deleted file mode 100644
index 7f0a83a16..000000000
--- a/Source/WebKit/chromium/src/WebStorageAreaImpl.cpp
+++ /dev/null
@@ -1,93 +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 "WebStorageAreaImpl.h"
-
-#include "ExceptionCode.h"
-
-#include "platform/WebString.h"
-#include "platform/WebURL.h"
-
-namespace WebKit {
-
-const WebURL* WebStorageAreaImpl::storageEventURL = 0;
-
-WebStorageAreaImpl::WebStorageAreaImpl(PassRefPtr<WebCore::StorageArea> storageArea)
- : m_storageArea(storageArea)
-{
-}
-
-WebStorageAreaImpl::~WebStorageAreaImpl()
-{
-}
-
-unsigned WebStorageAreaImpl::length()
-{
- return m_storageArea->length(0);
-}
-
-WebString WebStorageAreaImpl::key(unsigned index)
-{
- return m_storageArea->key(index, 0);
-}
-
-WebString WebStorageAreaImpl::getItem(const WebString& key)
-{
- return m_storageArea->getItem(key, 0);
-}
-
-void WebStorageAreaImpl::setItem(const WebString& key, const WebString& value, const WebURL& url, Result& result, WebString& oldValue)
-{
- int exceptionCode = 0;
-
- ScopedStorageEventURL scope(url);
- oldValue = m_storageArea->setItem(key, value, exceptionCode, 0);
-
- if (exceptionCode) {
- ASSERT(exceptionCode == WebCore::QUOTA_EXCEEDED_ERR);
- result = ResultBlockedByQuota;
- } else
- result = ResultOK;
-}
-
-void WebStorageAreaImpl::removeItem(const WebString& key, const WebURL& url, WebString& oldValue)
-{
- ScopedStorageEventURL scope(url);
- oldValue = m_storageArea->removeItem(key, 0);
-}
-
-void WebStorageAreaImpl::clear(const WebURL& url, bool& somethingCleared)
-{
- ScopedStorageEventURL scope(url);
- somethingCleared = m_storageArea->clear(0);
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebStorageAreaImpl.h b/Source/WebKit/chromium/src/WebStorageAreaImpl.h
deleted file mode 100644
index b973188b8..000000000
--- a/Source/WebKit/chromium/src/WebStorageAreaImpl.h
+++ /dev/null
@@ -1,79 +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 WebStorageAreaImpl_h
-#define WebStorageAreaImpl_h
-
-#include "StorageAreaImpl.h"
-#include "WebStorageArea.h"
-
-namespace WebKit {
-
-class WebStorageAreaImpl : public WebStorageArea {
-public:
- WebStorageAreaImpl(PassRefPtr<WebCore::StorageArea> storageArea);
- virtual ~WebStorageAreaImpl();
- virtual unsigned length();
- virtual WebString key(unsigned index);
- virtual WebString getItem(const WebString& key);
- virtual void setItem(const WebString& key, const WebString& value, const WebURL&, Result&, WebString& oldValue);
- virtual void removeItem(const WebString& key, const WebURL& url, WebString& oldValue);
- virtual void clear(const WebURL& url, bool& somethingCleared);
-
- // For storage events in single-process mode and test shell.
- static const WebURL* currentStorageEventURL() { return storageEventURL; }
-
-private:
- class ScopedStorageEventURL {
- public:
- ScopedStorageEventURL(const WebURL& url)
- {
- // FIXME: Once storage events are fired async in WebKit (as they should
- // be) this can be ASSERTed to be 0 rather than saved.
- m_existingStorageEventURL = storageEventURL;
- storageEventURL = &url;
- }
- ~ScopedStorageEventURL()
- {
- storageEventURL = m_existingStorageEventURL;
- }
-
- private:
- const WebURL* m_existingStorageEventURL;
- };
-
- static const WebURL* storageEventURL;
-
- RefPtr<WebCore::StorageArea> m_storageArea;
-};
-
-} // namespace WebKit
-
-#endif // WebStorageAreaImpl_h
diff --git a/Source/WebKit/chromium/src/WebStorageEventDispatcherImpl.cpp b/Source/WebKit/chromium/src/WebStorageEventDispatcherImpl.cpp
index f1548cd66..c8036aa74 100644
--- a/Source/WebKit/chromium/src/WebStorageEventDispatcherImpl.cpp
+++ b/Source/WebKit/chromium/src/WebStorageEventDispatcherImpl.cpp
@@ -33,8 +33,8 @@
#include "KURL.h"
#include "SecurityOrigin.h"
+#include "StorageAreaProxy.h"
-#include "WebStorageAreaImpl.h"
#include "platform/WebURL.h"
#include <wtf/PassOwnPtr.h>
@@ -42,6 +42,33 @@ namespace WebKit {
extern const char* pageGroupName;
+void WebStorageEventDispatcher::dispatchLocalStorageEvent(
+ const WebString& key, const WebString& oldValue,
+ const WebString& newValue, const WebURL& origin,
+ const WebURL& pageURL, WebStorageArea* sourceAreaInstance,
+ bool originatedInProcess)
+{
+ RefPtr<WebCore::SecurityOrigin> securityOrigin = WebCore::SecurityOrigin::create(origin);
+ WebCore::StorageAreaProxy::dispatchLocalStorageEvent(
+ pageGroupName, key, oldValue, newValue, securityOrigin.get(), pageURL,
+ sourceAreaInstance, originatedInProcess);
+}
+
+void WebStorageEventDispatcher::dispatchSessionStorageEvent(
+ const WebString& key, const WebString& oldValue,
+ const WebString& newValue, const WebURL& origin,
+ const WebURL& pageURL, const WebStorageNamespace& sessionNamespace,
+ WebStorageArea* sourceAreaInstance, bool originatedInProcess)
+{
+ RefPtr<WebCore::SecurityOrigin> securityOrigin = WebCore::SecurityOrigin::create(origin);
+ WebCore::StorageAreaProxy::dispatchSessionStorageEvent(
+ pageGroupName, key, oldValue, newValue, securityOrigin.get(), pageURL,
+ sessionNamespace, sourceAreaInstance, originatedInProcess);
+}
+
+
+// FIXME: remove the WebStorageEventDispatcherImpl class soon.
+
WebStorageEventDispatcher* WebStorageEventDispatcher::create()
{
return new WebStorageEventDispatcherImpl();
@@ -55,15 +82,11 @@ WebStorageEventDispatcherImpl::WebStorageEventDispatcherImpl()
void WebStorageEventDispatcherImpl::dispatchStorageEvent(const WebString& key, const WebString& oldValue,
const WebString& newValue, const WebString& origin,
- const WebURL& passedInURL, bool isLocalStorage)
+ const WebURL& pageURL, bool isLocalStorage)
{
- // Hack for single-process mode and test shell.
- const WebURL* storageAreaImplURL = WebStorageAreaImpl::currentStorageEventURL();
- const WebURL& url = storageAreaImplURL ? *storageAreaImplURL : passedInURL;
-
WebCore::StorageType storageType = isLocalStorage ? WebCore::LocalStorage : WebCore::SessionStorage;
RefPtr<WebCore::SecurityOrigin> securityOrigin = WebCore::SecurityOrigin::createFromString(origin);
- m_eventDispatcher->dispatchStorageEvent(key, oldValue, newValue, securityOrigin.get(), url, storageType);
+ m_eventDispatcher->dispatchStorageEvent(key, oldValue, newValue, securityOrigin.get(), pageURL, storageType);
}
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebStorageEventDispatcherImpl.h b/Source/WebKit/chromium/src/WebStorageEventDispatcherImpl.h
index 748963639..b03c6b7a6 100644
--- a/Source/WebKit/chromium/src/WebStorageEventDispatcherImpl.h
+++ b/Source/WebKit/chromium/src/WebStorageEventDispatcherImpl.h
@@ -37,14 +37,13 @@
namespace WebKit {
+// DEPRECATED - to be removed when removing the instance methods in the public api.
class WebStorageEventDispatcherImpl : public WebStorageEventDispatcher {
public:
WebStorageEventDispatcherImpl();
-
virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue,
const WebString& newValue, const WebString& origin,
const WebURL&, bool isLocalStorage);
-
private:
OwnPtr<WebCore::StorageEventDispatcherImpl> m_eventDispatcher;
};
diff --git a/Source/WebKit/chromium/src/WebStorageNamespaceImpl.cpp b/Source/WebKit/chromium/src/WebStorageNamespaceImpl.cpp
deleted file mode 100644
index bb436195a..000000000
--- a/Source/WebKit/chromium/src/WebStorageNamespaceImpl.cpp
+++ /dev/null
@@ -1,75 +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 "WebStorageNamespaceImpl.h"
-
-#include "SecurityOrigin.h"
-#include "WebStorageAreaImpl.h"
-#include "platform/WebString.h"
-
-namespace WebKit {
-
-WebStorageNamespace* WebStorageNamespace::createLocalStorageNamespace(const WebString& path, unsigned quota)
-{
- return new WebStorageNamespaceImpl(WebCore::StorageNamespaceImpl::localStorageNamespace(path, quota));
-}
-
-WebStorageNamespace* WebStorageNamespace::createSessionStorageNamespace(unsigned quota)
-{
- return new WebStorageNamespaceImpl(WebCore::StorageNamespaceImpl::sessionStorageNamespace(quota));
-}
-
-WebStorageNamespaceImpl::WebStorageNamespaceImpl(PassRefPtr<WebCore::StorageNamespace> storageNamespace)
- : m_storageNamespace(storageNamespace)
-{
-}
-
-WebStorageNamespaceImpl::~WebStorageNamespaceImpl()
-{
-}
-
-WebStorageArea* WebStorageNamespaceImpl::createStorageArea(const WebString& originString)
-{
- RefPtr<WebCore::SecurityOrigin> origin = WebCore::SecurityOrigin::createFromString(originString);
- return new WebStorageAreaImpl(m_storageNamespace->storageArea(origin.release()));
-}
-
-WebStorageNamespace* WebStorageNamespaceImpl::copy()
-{
- return new WebStorageNamespaceImpl(m_storageNamespace->copy());
-}
-
-void WebStorageNamespaceImpl::close()
-{
- m_storageNamespace->close();
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebSurroundingText.cpp b/Source/WebKit/chromium/src/WebSurroundingText.cpp
new file mode 100644
index 000000000..26bb39255
--- /dev/null
+++ b/Source/WebKit/chromium/src/WebSurroundingText.cpp
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2012 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebSurroundingText.h"
+
+#include "Element.h"
+#include "Node.h"
+#include "Range.h"
+#include "RenderObject.h"
+#include "SurroundingText.h"
+#include "Text.h"
+#include "VisiblePosition.h"
+#include "WebHitTestResult.h"
+
+#include "platform/WebPoint.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebSurroundingText::initialize(const WebHitTestResult& hitTestInfo, size_t maxLength)
+{
+ Node* node = hitTestInfo.node().unwrap<Node>();
+ if (!node || !node->renderer())
+ return;
+
+ VisiblePosition visiblePosition(node->renderer()->positionForPoint(static_cast<IntPoint>(hitTestInfo.localPoint())));
+ if (visiblePosition.isNull())
+ return;
+
+ m_private.reset(new SurroundingText(visiblePosition, maxLength));
+}
+
+void WebSurroundingText::initialize(WebNode textNode, size_t offset, size_t maxLength)
+{
+ Node* node = textNode.unwrap<Node>();
+ if (!node || !node->isTextNode() || offset >= node->nodeValue().length())
+ return;
+
+ m_private.reset(new SurroundingText(VisiblePosition(Position(toText(node), offset).parentAnchoredEquivalent(), DOWNSTREAM), maxLength));
+}
+
+WebString WebSurroundingText::textContent() const
+{
+ return m_private->content();
+}
+
+size_t WebSurroundingText::hitOffsetInTextContent() const
+{
+ return m_private->positionOffsetInContent();
+}
+
+WebRange WebSurroundingText::rangeFromContentOffsets(size_t startOffsetInContent, size_t endOffsetInContent)
+{
+ return m_private->rangeFromContentOffsets(startOffsetInContent, endOffsetInContent);
+}
+
+bool WebSurroundingText::isNull() const
+{
+ return !m_private.get();
+}
+
+void WebSurroundingText::reset()
+{
+ m_private.reset(0);
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp b/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp
index 0d6e4db78..957663634 100644
--- a/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp
+++ b/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp
@@ -51,7 +51,13 @@ static Vector<TextCheckingResult> toCoreResults(const WebVector<WebTextCheckingR
void WebTextCheckingCompletionImpl::didFinishCheckingText(const WebVector<WebTextCheckingResult>& results)
{
- m_spellChecker->didCheck(m_identifier, toCoreResults(results));
+ m_spellChecker->didCheckSucceeded(m_identifier, toCoreResults(results));
+ delete this;
+}
+
+void WebTextCheckingCompletionImpl::didCancelCheckingText()
+{
+ m_spellChecker->didCheckCanceled(m_identifier);
delete this;
}
diff --git a/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.h b/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.h
index dee114adc..175d25cd4 100644
--- a/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.h
+++ b/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.h
@@ -47,6 +47,7 @@ public:
}
virtual void didFinishCheckingText(const WebVector<WebTextCheckingResult>&);
+ virtual void didCancelCheckingText();
private:
virtual ~WebTextCheckingCompletionImpl() { }
diff --git a/Source/WebKit/chromium/src/WebThreadSafeData.cpp b/Source/WebKit/chromium/src/WebThreadSafeData.cpp
deleted file mode 100755
index 7bad9c134..000000000
--- a/Source/WebKit/chromium/src/WebThreadSafeData.cpp
+++ /dev/null
@@ -1,75 +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 "platform/WebThreadSafeData.h"
-
-#include "BlobData.h"
-
-using namespace WebCore;
-
-namespace WebKit {
-
-void WebThreadSafeData::reset()
-{
- m_private.reset();
-}
-
-void WebThreadSafeData::assign(const WebThreadSafeData& other)
-{
- m_private = other.m_private;
-}
-
-size_t WebThreadSafeData::size() const
-{
- if (m_private.isNull())
- return 0;
- return m_private->length();
-}
-
-const char* WebThreadSafeData::data() const
-{
- if (m_private.isNull())
- return 0;
- return m_private->data();
-}
-
-WebThreadSafeData::WebThreadSafeData(const PassRefPtr<RawData>& data)
- : m_private(data.leakRef())
-{
-}
-
-WebThreadSafeData& WebThreadSafeData::operator=(const PassRefPtr<RawData>& data)
-{
- m_private = data;
- return *this;
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebURLError.cpp b/Source/WebKit/chromium/src/WebURLError.cpp
deleted file mode 100644
index 95236820d..000000000
--- a/Source/WebKit/chromium/src/WebURLError.cpp
+++ /dev/null
@@ -1,72 +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 "platform/WebURLError.h"
-
-#include "KURL.h"
-#include "ResourceError.h"
-#include <wtf/text/CString.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-WebURLError::WebURLError(const ResourceError& error)
-{
- *this = error;
-}
-
-WebURLError& WebURLError::operator=(const ResourceError& error)
-{
- if (error.isNull())
- *this = WebURLError();
- else {
- domain = error.domain();
- reason = error.errorCode();
- unreachableURL = KURL(ParsedURLString, error.failingURL());
- isCancellation = error.isCancellation();
- }
- return *this;
-}
-
-WebURLError::operator ResourceError() const
-{
- if (!reason)
- return ResourceError();
- CString spec = unreachableURL.spec();
- ResourceError resourceError = ResourceError(domain, reason,
- String::fromUTF8(spec.data(),
- spec.length()), String());
- resourceError.setIsCancellation(isCancellation);
- return resourceError;
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebURLRequest.cpp b/Source/WebKit/chromium/src/WebURLRequest.cpp
deleted file mode 100644
index cbac8247d..000000000
--- a/Source/WebKit/chromium/src/WebURLRequest.cpp
+++ /dev/null
@@ -1,347 +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 "platform/WebURLRequest.h"
-
-#include "ResourceRequest.h"
-
-#include "platform/WebHTTPBody.h"
-#include "platform/WebHTTPHeaderVisitor.h"
-#include "platform/WebURL.h"
-#include "WebURLRequestPrivate.h"
-
-using namespace WebCore;
-
-namespace WebKit {
-
-namespace {
-
-class ExtraDataContainer : public ResourceRequest::ExtraData {
-public:
- static PassRefPtr<ExtraDataContainer> create(WebURLRequest::ExtraData* extraData) { return adoptRef(new ExtraDataContainer(extraData)); }
-
- virtual ~ExtraDataContainer() { }
-
- WebURLRequest::ExtraData* extraData() const { return m_extraData.get(); }
-
-private:
- explicit ExtraDataContainer(WebURLRequest::ExtraData* extraData)
- : m_extraData(adoptPtr(extraData))
- {
- }
-
- OwnPtr<WebURLRequest::ExtraData> m_extraData;
-};
-
-} // namespace
-
-// The standard implementation of WebURLRequestPrivate, which maintains
-// ownership of a ResourceRequest instance.
-class WebURLRequestPrivateImpl : public WebURLRequestPrivate {
-public:
- WebURLRequestPrivateImpl()
- {
- m_resourceRequest = &m_resourceRequestAllocation;
- }
-
- WebURLRequestPrivateImpl(const WebURLRequestPrivate* p)
- : m_resourceRequestAllocation(*p->m_resourceRequest)
- {
- m_resourceRequest = &m_resourceRequestAllocation;
- m_allowStoredCredentials = p->m_allowStoredCredentials;
- }
-
- virtual void dispose() { delete this; }
-
-private:
- virtual ~WebURLRequestPrivateImpl() { }
-
- ResourceRequest m_resourceRequestAllocation;
-};
-
-void WebURLRequest::initialize()
-{
- assign(new WebURLRequestPrivateImpl());
-}
-
-void WebURLRequest::reset()
-{
- assign(0);
-}
-
-void WebURLRequest::assign(const WebURLRequest& r)
-{
- if (&r != this)
- assign(r.m_private ? new WebURLRequestPrivateImpl(r.m_private) : 0);
-}
-
-bool WebURLRequest::isNull() const
-{
- return !m_private || m_private->m_resourceRequest->isNull();
-}
-
-WebURL WebURLRequest::url() const
-{
- return m_private->m_resourceRequest->url();
-}
-
-void WebURLRequest::setURL(const WebURL& url)
-{
- m_private->m_resourceRequest->setURL(url);
-}
-
-WebURL WebURLRequest::firstPartyForCookies() const
-{
- return m_private->m_resourceRequest->firstPartyForCookies();
-}
-
-void WebURLRequest::setFirstPartyForCookies(const WebURL& firstPartyForCookies)
-{
- m_private->m_resourceRequest->setFirstPartyForCookies(firstPartyForCookies);
-}
-
-bool WebURLRequest::allowCookies() const
-{
- return m_private->m_resourceRequest->allowCookies();
-}
-
-void WebURLRequest::setAllowCookies(bool allowCookies)
-{
- m_private->m_resourceRequest->setAllowCookies(allowCookies);
-}
-
-bool WebURLRequest::allowStoredCredentials() const
-{
- return m_private->m_allowStoredCredentials;
-}
-
-void WebURLRequest::setAllowStoredCredentials(bool allowStoredCredentials)
-{
- m_private->m_allowStoredCredentials = allowStoredCredentials;
-}
-
-WebURLRequest::CachePolicy WebURLRequest::cachePolicy() const
-{
- return static_cast<WebURLRequest::CachePolicy>(
- m_private->m_resourceRequest->cachePolicy());
-}
-
-void WebURLRequest::setCachePolicy(CachePolicy cachePolicy)
-{
- m_private->m_resourceRequest->setCachePolicy(
- static_cast<ResourceRequestCachePolicy>(cachePolicy));
-}
-
-WebString WebURLRequest::httpMethod() const
-{
- return m_private->m_resourceRequest->httpMethod();
-}
-
-void WebURLRequest::setHTTPMethod(const WebString& httpMethod)
-{
- m_private->m_resourceRequest->setHTTPMethod(httpMethod);
-}
-
-WebString WebURLRequest::httpHeaderField(const WebString& name) const
-{
- return m_private->m_resourceRequest->httpHeaderField(name);
-}
-
-void WebURLRequest::setHTTPHeaderField(const WebString& name, const WebString& value)
-{
- m_private->m_resourceRequest->setHTTPHeaderField(name, value);
-}
-
-void WebURLRequest::addHTTPHeaderField(const WebString& name, const WebString& value)
-{
- m_private->m_resourceRequest->addHTTPHeaderField(name, value);
-}
-
-void WebURLRequest::clearHTTPHeaderField(const WebString& name)
-{
- // FIXME: Add a clearHTTPHeaderField method to ResourceRequest.
- const HTTPHeaderMap& map = m_private->m_resourceRequest->httpHeaderFields();
- const_cast<HTTPHeaderMap*>(&map)->remove(name);
-}
-
-void WebURLRequest::visitHTTPHeaderFields(WebHTTPHeaderVisitor* visitor) const
-{
- const HTTPHeaderMap& map = m_private->m_resourceRequest->httpHeaderFields();
- for (HTTPHeaderMap::const_iterator it = map.begin(); it != map.end(); ++it)
- visitor->visitHeader(it->first, it->second);
-}
-
-WebHTTPBody WebURLRequest::httpBody() const
-{
- return WebHTTPBody(m_private->m_resourceRequest->httpBody());
-}
-
-void WebURLRequest::setHTTPBody(const WebHTTPBody& httpBody)
-{
- m_private->m_resourceRequest->setHTTPBody(httpBody);
-}
-
-bool WebURLRequest::reportUploadProgress() const
-{
- return m_private->m_resourceRequest->reportUploadProgress();
-}
-
-void WebURLRequest::setReportUploadProgress(bool reportUploadProgress)
-{
- m_private->m_resourceRequest->setReportUploadProgress(reportUploadProgress);
-}
-
-bool WebURLRequest::reportLoadTiming() const
-{
- return m_private->m_resourceRequest->reportLoadTiming();
-}
-
-void WebURLRequest::setReportRawHeaders(bool reportRawHeaders)
-{
- m_private->m_resourceRequest->setReportRawHeaders(reportRawHeaders);
-}
-
-bool WebURLRequest::reportRawHeaders() const
-{
- return m_private->m_resourceRequest->reportRawHeaders();
-}
-
-void WebURLRequest::setReportLoadTiming(bool reportLoadTiming)
-{
- m_private->m_resourceRequest->setReportLoadTiming(reportLoadTiming);
-}
-
-WebURLRequest::TargetType WebURLRequest::targetType() const
-{
- // FIXME: Temporary special case until downstream chromium.org knows of the new TargetTypes.
- TargetType targetType = static_cast<TargetType>(m_private->m_resourceRequest->targetType());
- if (targetType == TargetIsTextTrack || targetType == TargetIsUnspecified)
- return TargetIsSubresource;
- return targetType;
-}
-
-bool WebURLRequest::hasUserGesture() const
-{
- return m_private->m_resourceRequest->hasUserGesture();
-}
-
-void WebURLRequest::setHasUserGesture(bool hasUserGesture)
-{
- m_private->m_resourceRequest->setHasUserGesture(hasUserGesture);
-}
-
-void WebURLRequest::setTargetType(TargetType targetType)
-{
- m_private->m_resourceRequest->setTargetType(
- static_cast<ResourceRequest::TargetType>(targetType));
-}
-
-int WebURLRequest::requestorID() const
-{
- return m_private->m_resourceRequest->requestorID();
-}
-
-void WebURLRequest::setRequestorID(int requestorID)
-{
- m_private->m_resourceRequest->setRequestorID(requestorID);
-}
-
-int WebURLRequest::requestorProcessID() const
-{
- return m_private->m_resourceRequest->requestorProcessID();
-}
-
-void WebURLRequest::setRequestorProcessID(int requestorProcessID)
-{
- m_private->m_resourceRequest->setRequestorProcessID(requestorProcessID);
-}
-
-int WebURLRequest::appCacheHostID() const
-{
- return m_private->m_resourceRequest->appCacheHostID();
-}
-
-void WebURLRequest::setAppCacheHostID(int appCacheHostID)
-{
- m_private->m_resourceRequest->setAppCacheHostID(appCacheHostID);
-}
-
-bool WebURLRequest::downloadToFile() const
-{
- return m_private->m_resourceRequest->downloadToFile();
-}
-
-void WebURLRequest::setDownloadToFile(bool downloadToFile)
-{
- m_private->m_resourceRequest->setDownloadToFile(downloadToFile);
-}
-
-WebURLRequest::ExtraData* WebURLRequest::extraData() const
-{
- RefPtr<ResourceRequest::ExtraData> data = m_private->m_resourceRequest->extraData();
- if (!data)
- return 0;
- return static_cast<ExtraDataContainer*>(data.get())->extraData();
-}
-
-void WebURLRequest::setExtraData(WebURLRequest::ExtraData* extraData)
-{
- m_private->m_resourceRequest->setExtraData(ExtraDataContainer::create(extraData));
-}
-
-ResourceRequest& WebURLRequest::toMutableResourceRequest()
-{
- ASSERT(m_private);
- ASSERT(m_private->m_resourceRequest);
-
- return *m_private->m_resourceRequest;
-}
-
-const ResourceRequest& WebURLRequest::toResourceRequest() const
-{
- ASSERT(m_private);
- ASSERT(m_private->m_resourceRequest);
-
- return *m_private->m_resourceRequest;
-}
-
-void WebURLRequest::assign(WebURLRequestPrivate* p)
-{
- // Subclasses may call this directly so a self-assignment check is needed
- // here as well as in the public assign method.
- if (m_private == p)
- return;
- if (m_private)
- m_private->dispose();
- m_private = p;
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebURLResponse.cpp b/Source/WebKit/chromium/src/WebURLResponse.cpp
deleted file mode 100644
index ec212e517..000000000
--- a/Source/WebKit/chromium/src/WebURLResponse.cpp
+++ /dev/null
@@ -1,447 +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 "platform/WebURLResponse.h"
-
-#include "ResourceResponse.h"
-#include "ResourceLoadTiming.h"
-
-#include "platform/WebHTTPHeaderVisitor.h"
-#include "platform/WebHTTPLoadInfo.h"
-#include "platform/WebString.h"
-#include "platform/WebURL.h"
-#include "platform/WebURLLoadTiming.h"
-#include "WebURLResponsePrivate.h"
-
-#include <wtf/RefPtr.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-namespace {
-
-class ExtraDataContainer : public ResourceResponse::ExtraData {
-public:
- static PassRefPtr<ExtraDataContainer> create(WebURLResponse::ExtraData* extraData) { return adoptRef(new ExtraDataContainer(extraData)); }
-
- virtual ~ExtraDataContainer() { }
-
- WebURLResponse::ExtraData* extraData() const { return m_extraData.get(); }
-
-private:
- explicit ExtraDataContainer(WebURLResponse::ExtraData* extraData)
- : m_extraData(adoptPtr(extraData))
- {
- }
-
- OwnPtr<WebURLResponse::ExtraData> m_extraData;
-};
-
-} // namespace
-
-// The standard implementation of WebURLResponsePrivate, which maintains
-// ownership of a ResourceResponse instance.
-class WebURLResponsePrivateImpl : public WebURLResponsePrivate {
-public:
- WebURLResponsePrivateImpl()
- {
- m_resourceResponse = &m_resourceResponseAllocation;
- }
-
- WebURLResponsePrivateImpl(const WebURLResponsePrivate* p)
- : m_resourceResponseAllocation(*p->m_resourceResponse)
- {
- m_resourceResponse = &m_resourceResponseAllocation;
- }
-
- virtual void dispose() { delete this; }
-
-private:
- virtual ~WebURLResponsePrivateImpl() { }
-
- ResourceResponse m_resourceResponseAllocation;
-};
-
-void WebURLResponse::initialize()
-{
- assign(new WebURLResponsePrivateImpl());
-}
-
-void WebURLResponse::reset()
-{
- assign(0);
-}
-
-void WebURLResponse::assign(const WebURLResponse& r)
-{
- if (&r != this)
- assign(r.m_private ? new WebURLResponsePrivateImpl(r.m_private) : 0);
-}
-
-bool WebURLResponse::isNull() const
-{
- return !m_private || m_private->m_resourceResponse->isNull();
-}
-
-WebURL WebURLResponse::url() const
-{
- return m_private->m_resourceResponse->url();
-}
-
-void WebURLResponse::setURL(const WebURL& url)
-{
- m_private->m_resourceResponse->setURL(url);
-}
-
-unsigned WebURLResponse::connectionID() const
-{
- return m_private->m_resourceResponse->connectionID();
-}
-
-void WebURLResponse::setConnectionID(unsigned connectionID)
-{
- m_private->m_resourceResponse->setConnectionID(connectionID);
-}
-
-bool WebURLResponse::connectionReused() const
-{
- return m_private->m_resourceResponse->connectionReused();
-}
-
-void WebURLResponse::setConnectionReused(bool connectionReused)
-{
- m_private->m_resourceResponse->setConnectionReused(connectionReused);
-}
-
-WebURLLoadTiming WebURLResponse::loadTiming()
-{
- return WebURLLoadTiming(m_private->m_resourceResponse->resourceLoadTiming());
-}
-
-void WebURLResponse::setLoadTiming(const WebURLLoadTiming& timing)
-{
- RefPtr<ResourceLoadTiming> loadTiming = PassRefPtr<ResourceLoadTiming>(timing);
- m_private->m_resourceResponse->setResourceLoadTiming(loadTiming.release());
-}
-
-WebHTTPLoadInfo WebURLResponse::httpLoadInfo()
-{
- return WebHTTPLoadInfo(m_private->m_resourceResponse->resourceLoadInfo());
-}
-
-void WebURLResponse::setHTTPLoadInfo(const WebHTTPLoadInfo& value)
-{
- m_private->m_resourceResponse->setResourceLoadInfo(value);
-}
-
-double WebURLResponse::responseTime() const
-{
- return m_private->m_resourceResponse->responseTime();
-}
-
-void WebURLResponse::setResponseTime(double responseTime)
-{
- m_private->m_resourceResponse->setResponseTime(responseTime);
-}
-
-WebString WebURLResponse::mimeType() const
-{
- return m_private->m_resourceResponse->mimeType();
-}
-
-void WebURLResponse::setMIMEType(const WebString& mimeType)
-{
- m_private->m_resourceResponse->setMimeType(mimeType);
-}
-
-long long WebURLResponse::expectedContentLength() const
-{
- return m_private->m_resourceResponse->expectedContentLength();
-}
-
-void WebURLResponse::setExpectedContentLength(long long expectedContentLength)
-{
- m_private->m_resourceResponse->setExpectedContentLength(expectedContentLength);
-}
-
-WebString WebURLResponse::textEncodingName() const
-{
- return m_private->m_resourceResponse->textEncodingName();
-}
-
-void WebURLResponse::setTextEncodingName(const WebString& textEncodingName)
-{
- m_private->m_resourceResponse->setTextEncodingName(textEncodingName);
-}
-
-WebString WebURLResponse::suggestedFileName() const
-{
- return m_private->m_resourceResponse->suggestedFilename();
-}
-
-void WebURLResponse::setSuggestedFileName(const WebString& suggestedFileName)
-{
- m_private->m_resourceResponse->setSuggestedFilename(suggestedFileName);
-}
-
-int WebURLResponse::httpStatusCode() const
-{
- return m_private->m_resourceResponse->httpStatusCode();
-}
-
-void WebURLResponse::setHTTPStatusCode(int httpStatusCode)
-{
- m_private->m_resourceResponse->setHTTPStatusCode(httpStatusCode);
-}
-
-WebString WebURLResponse::httpStatusText() const
-{
- return m_private->m_resourceResponse->httpStatusText();
-}
-
-void WebURLResponse::setHTTPStatusText(const WebString& httpStatusText)
-{
- m_private->m_resourceResponse->setHTTPStatusText(httpStatusText);
-}
-
-WebString WebURLResponse::httpHeaderField(const WebString& name) const
-{
- return m_private->m_resourceResponse->httpHeaderField(name);
-}
-
-void WebURLResponse::setHTTPHeaderField(const WebString& name, const WebString& value)
-{
- m_private->m_resourceResponse->setHTTPHeaderField(name, value);
-}
-
-void WebURLResponse::addHTTPHeaderField(const WebString& name, const WebString& value)
-{
- if (name.isNull() || value.isNull())
- return;
- // FIXME: Add an addHTTPHeaderField method to ResourceResponse.
- const HTTPHeaderMap& map = m_private->m_resourceResponse->httpHeaderFields();
- String valueStr(value);
- pair<HTTPHeaderMap::iterator, bool> result =
- const_cast<HTTPHeaderMap*>(&map)->add(name, valueStr);
- if (!result.second)
- result.first->second += ", " + valueStr;
-}
-
-void WebURLResponse::clearHTTPHeaderField(const WebString& name)
-{
- // FIXME: Add a clearHTTPHeaderField method to ResourceResponse.
- const HTTPHeaderMap& map = m_private->m_resourceResponse->httpHeaderFields();
- const_cast<HTTPHeaderMap*>(&map)->remove(name);
-}
-
-void WebURLResponse::visitHTTPHeaderFields(WebHTTPHeaderVisitor* visitor) const
-{
- const HTTPHeaderMap& map = m_private->m_resourceResponse->httpHeaderFields();
- for (HTTPHeaderMap::const_iterator it = map.begin(); it != map.end(); ++it)
- visitor->visitHeader(it->first, it->second);
-}
-
-double WebURLResponse::lastModifiedDate() const
-{
- return static_cast<double>(m_private->m_resourceResponse->lastModifiedDate());
-}
-
-void WebURLResponse::setLastModifiedDate(double lastModifiedDate)
-{
- m_private->m_resourceResponse->setLastModifiedDate(static_cast<time_t>(lastModifiedDate));
-}
-
-long long WebURLResponse::appCacheID() const
-{
- return m_private->m_resourceResponse->appCacheID();
-}
-
-void WebURLResponse::setAppCacheID(long long appCacheID)
-{
- m_private->m_resourceResponse->setAppCacheID(appCacheID);
-}
-
-WebURL WebURLResponse::appCacheManifestURL() const
-{
- return m_private->m_resourceResponse->appCacheManifestURL();
-}
-
-void WebURLResponse::setAppCacheManifestURL(const WebURL& url)
-{
- m_private->m_resourceResponse->setAppCacheManifestURL(url);
-}
-
-WebCString WebURLResponse::securityInfo() const
-{
- // FIXME: getSecurityInfo is misnamed.
- return m_private->m_resourceResponse->getSecurityInfo();
-}
-
-void WebURLResponse::setSecurityInfo(const WebCString& securityInfo)
-{
- m_private->m_resourceResponse->setSecurityInfo(securityInfo);
-}
-
-ResourceResponse& WebURLResponse::toMutableResourceResponse()
-{
- ASSERT(m_private);
- ASSERT(m_private->m_resourceResponse);
-
- return *m_private->m_resourceResponse;
-}
-
-const ResourceResponse& WebURLResponse::toResourceResponse() const
-{
- ASSERT(m_private);
- ASSERT(m_private->m_resourceResponse);
-
- return *m_private->m_resourceResponse;
-}
-
-bool WebURLResponse::wasCached() const
-{
- return m_private->m_resourceResponse->wasCached();
-}
-
-void WebURLResponse::setWasCached(bool value)
-{
- m_private->m_resourceResponse->setWasCached(value);
-}
-
-bool WebURLResponse::wasFetchedViaSPDY() const
-{
- return m_private->m_resourceResponse->wasFetchedViaSPDY();
-}
-
-void WebURLResponse::setWasFetchedViaSPDY(bool value)
-{
- m_private->m_resourceResponse->setWasFetchedViaSPDY(value);
-}
-
-bool WebURLResponse::wasNpnNegotiated() const
-{
- return m_private->m_resourceResponse->wasNpnNegotiated();
-}
-
-void WebURLResponse::setWasNpnNegotiated(bool value)
-{
- m_private->m_resourceResponse->setWasNpnNegotiated(value);
-}
-
-bool WebURLResponse::wasAlternateProtocolAvailable() const
-{
- return m_private->m_resourceResponse->wasAlternateProtocolAvailable();
-}
-
-void WebURLResponse::setWasAlternateProtocolAvailable(bool value)
-{
- m_private->m_resourceResponse->setWasAlternateProtocolAvailable(value);
-}
-
-bool WebURLResponse::wasFetchedViaProxy() const
-{
- return m_private->m_resourceResponse->wasFetchedViaProxy();
-}
-
-void WebURLResponse::setWasFetchedViaProxy(bool value)
-{
- m_private->m_resourceResponse->setWasFetchedViaProxy(value);
-}
-
-bool WebURLResponse::isMultipartPayload() const
-{
- return m_private->m_resourceResponse->isMultipartPayload();
-}
-
-void WebURLResponse::setIsMultipartPayload(bool value)
-{
- m_private->m_resourceResponse->setIsMultipartPayload(value);
-}
-
-WebString WebURLResponse::downloadFilePath() const
-{
- const File* downloadedFile = m_private->m_resourceResponse->downloadedFile();
- if (downloadedFile)
- return downloadedFile->path();
- return WebString();
-}
-
-void WebURLResponse::setDownloadFilePath(const WebString& downloadFilePath)
-{
- m_private->m_resourceResponse->setDownloadedFile(downloadFilePath.isEmpty() ? 0 : File::create(downloadFilePath));
-}
-
-WebString WebURLResponse::remoteIPAddress() const
-{
- return m_private->m_resourceResponse->remoteIPAddress();
-}
-
-void WebURLResponse::setRemoteIPAddress(const WebString& remoteIPAddress)
-{
- m_private->m_resourceResponse->setRemoteIPAddress(remoteIPAddress);
-}
-
-unsigned short WebURLResponse::remotePort() const
-{
- return m_private->m_resourceResponse->remotePort();
-}
-
-void WebURLResponse::setRemotePort(unsigned short remotePort)
-{
- m_private->m_resourceResponse->setRemotePort(remotePort);
-}
-
-WebURLResponse::ExtraData* WebURLResponse::extraData() const
-{
- RefPtr<ResourceResponse::ExtraData> data = m_private->m_resourceResponse->extraData();
- if (!data)
- return 0;
- return static_cast<ExtraDataContainer*>(data.get())->extraData();
-}
-
-void WebURLResponse::setExtraData(WebURLResponse::ExtraData* extraData)
-{
- m_private->m_resourceResponse->setExtraData(ExtraDataContainer::create(extraData));
-}
-
-void WebURLResponse::assign(WebURLResponsePrivate* p)
-{
- // Subclasses may call this directly so a self-assignment check is needed
- // here as well as in the public assign method.
- if (m_private == p)
- return;
- if (m_private)
- m_private->dispose();
- m_private = p;
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebUserMediaRequest.cpp b/Source/WebKit/chromium/src/WebUserMediaRequest.cpp
index 5a76c83b0..dcd270385 100644
--- a/Source/WebKit/chromium/src/WebUserMediaRequest.cpp
+++ b/Source/WebKit/chromium/src/WebUserMediaRequest.cpp
@@ -70,16 +70,6 @@ bool WebUserMediaRequest::video() const
return m_private->video();
}
-bool WebUserMediaRequest::cameraPreferenceUser() const
-{
- return m_private->cameraPreferenceUser();
-}
-
-bool WebUserMediaRequest::cameraPreferenceEnvironment() const
-{
- return m_private->cameraPreferenceEnvironment();
-}
-
WebSecurityOrigin WebUserMediaRequest::securityOrigin() const
{
ASSERT(m_private->scriptExecutionContext());
@@ -105,24 +95,6 @@ void WebUserMediaRequest::requestSucceeded(const WebVector<WebMediaStreamSource>
m_private->succeed(audio, video);
}
-// FIXME: Cleanup when the chromium code has switched to the split sources implementation.
-void WebUserMediaRequest::requestSucceeded(const WebVector<WebMediaStreamSource>& sources)
-{
- if (m_private.isNull())
- return;
-
- MediaStreamSourceVector audio, video;
- for (size_t i = 0; i < sources.size(); ++i) {
- MediaStreamSource* curr = sources[i];
- if (curr->type() == MediaStreamSource::TypeAudio)
- audio.append(curr);
- else if (curr->type() == MediaStreamSource::TypeVideo)
- video.append(curr);
- }
-
- m_private->succeed(audio, video);
-}
-
void WebUserMediaRequest::requestFailed()
{
m_private->fail();
diff --git a/Source/WebKit/chromium/src/WebExternalTextureLayerImpl.h b/Source/WebKit/chromium/src/WebVideoLayer.cpp
index 7b73e7080..0f342155d 100644
--- a/Source/WebKit/chromium/src/WebExternalTextureLayerImpl.h
+++ b/Source/WebKit/chromium/src/WebVideoLayer.cpp
@@ -23,24 +23,25 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebExternalTextureLayerImpl_h
-#define WebExternalTextureLayerImpl_h
-
-#include "PluginLayerChromium.h"
-#include <wtf/PassRefPtr.h>
+#include "config.h"
+#include "VideoLayerChromium.h"
+#include <public/WebVideoLayer.h>
namespace WebKit {
-class WebExternalTextureLayerImpl : public WebCore::PluginLayerChromium {
-public:
- static PassRefPtr<WebExternalTextureLayerImpl> create();
+WebVideoLayer WebVideoLayer::create(WebVideoFrameProvider* provider)
+{
+ return WebVideoLayer(WebCore::VideoLayerChromium::create(provider));
+}
-protected:
- WebExternalTextureLayerImpl();
- virtual ~WebExternalTextureLayerImpl();
- virtual bool drawsContent() const;
-};
+WebVideoLayer::WebVideoLayer(PassRefPtr<WebCore::VideoLayerChromium> layer)
+ : WebLayer(layer)
+{
+}
-} // namespace WebKit
+bool WebVideoLayer::active() const
+{
+ return m_private->layerTreeHost();
+}
-#endif // WebExternalTextureLayerImpl_h
+} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp
index 52a022ce9..4318dc79d 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.cpp
+++ b/Source/WebKit/chromium/src/WebViewImpl.cpp
@@ -31,13 +31,14 @@
#include "config.h"
#include "WebViewImpl.h"
-#include "AutofillPopupMenuClient.h"
#include "AXObjectCache.h"
+#include "ActivePlatformGestureAnimation.h"
+#include "AutofillPopupMenuClient.h"
#include "BackForwardListChromium.h"
-#include "cc/CCProxy.h"
-#include "CSSStyleSelector.h"
+#include "BatteryClientImpl.h"
#include "CSSValueKeywords.h"
#include "Chrome.h"
+#include "Color.h"
#include "ColorSpace.h"
#include "CompositionUnderlineVectorBuilder.h"
#include "ContextMenu.h"
@@ -63,6 +64,7 @@
#include "FrameTree.h"
#include "FrameView.h"
#include "GeolocationClientProxy.h"
+#include "GeolocationController.h"
#include "GraphicsContext.h"
#include "GraphicsContext3D.h"
#include "GraphicsContext3DPrivate.h"
@@ -85,6 +87,8 @@
#include "Page.h"
#include "PageGroup.h"
#include "PageGroupLoadDeferrer.h"
+#include "PagePopupClient.h"
+#include "PageWidgetDelegate.h"
#include "Pasteboard.h"
#include "PlatformContextSkia.h"
#include "PlatformKeyboardEvent.h"
@@ -106,46 +110,55 @@
#include "Settings.h"
#include "SharedGraphicsContext3D.h"
#include "SpeechInputClientImpl.h"
+#include "SpeechRecognitionClientProxy.h"
+#include "StyleResolver.h"
+#include "TextFieldDecoratorImpl.h"
#include "TextIterator.h"
#include "Timer.h"
+#include "TouchpadFlingPlatformGestureCurve.h"
#include "TraceEvent.h"
-#include "TypingCommand.h"
#include "UserGestureIndicator.h"
-#include "Vector.h"
#include "WebAccessibilityObject.h"
+#include "WebActiveWheelFlingParameters.h"
#include "WebAutofillClient.h"
#include "WebCompositorImpl.h"
#include "WebDevToolsAgentImpl.h"
#include "WebDevToolsAgentPrivate.h"
-#include "platform/WebDragData.h"
#include "WebFrameImpl.h"
-#include "platform/WebGraphicsContext3D.h"
-#include "platform/WebImage.h"
#include "WebInputElement.h"
#include "WebInputEvent.h"
#include "WebInputEventConversion.h"
#include "WebKit.h"
-#include "platform/WebKitPlatformSupport.h"
-#include "platform/WebLayer.h"
-#include "platform/WebLayerTreeView.h"
#include "WebMediaPlayerAction.h"
#include "WebNode.h"
+#include "WebPagePopupImpl.h"
#include "WebPlugin.h"
#include "WebPluginAction.h"
#include "WebPluginContainerImpl.h"
-#include "platform/WebPoint.h"
#include "WebPopupMenuImpl.h"
#include "WebRange.h"
-#include "platform/WebRect.h"
#include "WebRuntimeFeatures.h"
#include "WebSettingsImpl.h"
+#include "WebViewClient.h"
+#include "WheelEvent.h"
+#include "cc/CCProxy.h"
+#include "painting/GraphicsContextBuilder.h"
+#include "platform/WebDragData.h"
+#include "platform/WebImage.h"
+#include "platform/WebKitPlatformSupport.h"
#include "platform/WebString.h"
#include "platform/WebVector.h"
-#include "WebViewClient.h"
-#include <wtf/ByteArray.h>
+#include <public/Platform.h>
+#include <public/WebFloatPoint.h>
+#include <public/WebGraphicsContext3D.h>
+#include <public/WebLayer.h>
+#include <public/WebLayerTreeView.h>
+#include <public/WebPoint.h>
+#include <public/WebRect.h>
#include <wtf/CurrentTime.h>
#include <wtf/MainThread.h>
#include <wtf/RefPtr.h>
+#include <wtf/Uint8ClampedArray.h>
#if ENABLE(GESTURE_EVENTS)
#include "PlatformGestureEvent.h"
@@ -176,7 +189,7 @@ using namespace std;
// (such as due to a double tap gesture or find in page etc.). These are
// experimentally determined.
static const int touchPointPadding = 32;
-static const float minScaleDifference = 0.01;
+static const float minScaleDifference = 0.01f;
static const float doubleTapZoomContentDefaultMargin = 5;
static const float doubleTapZoomContentMinimumMargin = 2;
@@ -313,6 +326,18 @@ void WebViewImpl::setSpellCheckClient(WebSpellCheckClient* spellCheckClient)
m_spellCheckClient = spellCheckClient;
}
+void WebViewImpl::addTextFieldDecoratorClient(WebTextFieldDecoratorClient* client)
+{
+ ASSERT(client);
+ // We limit the number of decorators because it affects performance of text
+ // field creation. If you'd like to add more decorators, consider moving
+ // your decorator or existing decorators to WebCore.
+ const unsigned maximumNumberOfDecorators = 8;
+ if (m_textFieldDecorators.size() >= maximumNumberOfDecorators)
+ CRASH();
+ m_textFieldDecorators.append(TextFieldDecoratorImpl::create(client));
+}
+
WebViewImpl::WebViewImpl(WebViewClient* client)
: m_client(client)
, m_autofillClient(0)
@@ -349,20 +374,30 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
, m_isTransparent(false)
, m_tabsToLinks(false)
, m_dragScrollTimer(adoptPtr(new DragScrollTimer))
+ , m_isCancelingFullScreen(false)
#if USE(ACCELERATED_COMPOSITING)
, m_rootGraphicsLayer(0)
, m_isAcceleratedCompositingActive(false)
, m_compositorCreationFailed(false)
, m_recreatingGraphicsContext(false)
+ , m_compositorSurfaceReady(false)
#endif
#if ENABLE(INPUT_SPEECH)
, m_speechInputClient(SpeechInputClientImpl::create(client))
#endif
+#if ENABLE(SCRIPTED_SPEECH)
+ , m_speechRecognitionClient(SpeechRecognitionClientProxy::create(client ? client->speechRecognizer() : 0))
+#endif
, m_deviceOrientationClientProxy(adoptPtr(new DeviceOrientationClientProxy(client ? client->deviceOrientationClient() : 0)))
, m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? client->geolocationClient() : 0)))
+#if ENABLE(BATTERY_STATUS)
+ , m_batteryClient(adoptPtr(new BatteryClientImpl(client ? client->batteryStatusClient() : 0)))
+#endif
+ , m_emulatedTextZoomFactor(1)
#if ENABLE(MEDIA_STREAM)
, m_userMediaClientImpl(this)
#endif
+ , m_flingModifier(0)
{
// WebKit/win/WebView.cpp does the same thing, except they call the
// KJS specific wrapper around this method. We need to have threading
@@ -370,16 +405,12 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
WTF::initializeThreading();
WTF::initializeMainThread();
- // set to impossible point so we always get the first mouse pos
- m_lastMousePosition = WebPoint(-1, -1);
-
Page::PageClients pageClients;
pageClients.chromeClient = &m_chromeClientImpl;
pageClients.contextMenuClient = &m_contextMenuClientImpl;
pageClients.editorClient = &m_editorClientImpl;
pageClients.dragClient = &m_dragClientImpl;
pageClients.inspectorClient = &m_inspectorClientImpl;
- pageClients.geolocationClient = m_geolocationClientProxy.get();
pageClients.backForwardClient = BackForwardListChromium::create(this);
m_page = adoptPtr(new Page(pageClients));
@@ -389,13 +420,21 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
#if ENABLE(INPUT_SPEECH)
provideSpeechInputTo(m_page.get(), m_speechInputClient.get());
#endif
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(SCRIPTED_SPEECH)
+ provideSpeechRecognitionTo(m_page.get(), m_speechRecognitionClient.get());
+#endif
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
provideNotification(m_page.get(), notificationPresenterImpl());
#endif
provideDeviceOrientationTo(m_page.get(), m_deviceOrientationClientProxy.get());
- m_geolocationClientProxy->setController(m_page->geolocationController());
+ provideGeolocationTo(m_page.get(), m_geolocationClientProxy.get());
+ m_geolocationClientProxy->setController(GeolocationController::from(m_page.get()));
+#if ENABLE(BATTERY_STATUS)
+ provideBatteryTo(m_page.get(), m_batteryClient.get());
+#endif
+
m_page->setGroupName(pageGroupName);
#if ENABLE(PAGE_VISIBILITY_API)
@@ -433,38 +472,14 @@ void WebViewImpl::setTabKeyCyclesThroughElements(bool value)
m_page->setTabKeyCyclesThroughElements(value);
}
-void WebViewImpl::mouseMove(const WebMouseEvent& event)
+void WebViewImpl::handleMouseLeave(Frame& mainFrame, const WebMouseEvent& event)
{
- if (!mainFrameImpl() || !mainFrameImpl()->frameView())
- return;
-
- m_lastMousePosition = WebPoint(event.x, event.y);
-
- // We call mouseMoved here instead of handleMouseMovedEvent because we need
- // our ChromeClientImpl to receive changes to the mouse position and
- // tooltip text, and mouseMoved handles all of that.
- mainFrameImpl()->frame()->eventHandler()->mouseMoved(
- PlatformMouseEventBuilder(mainFrameImpl()->frameView(), event));
-}
-
-void WebViewImpl::mouseLeave(const WebMouseEvent& event)
-{
- // This event gets sent as the main frame is closing. In that case, just
- // ignore it.
- if (!mainFrameImpl() || !mainFrameImpl()->frameView())
- return;
-
m_client->setMouseOverURL(WebURL());
-
- mainFrameImpl()->frame()->eventHandler()->handleMouseMoveEvent(
- PlatformMouseEventBuilder(mainFrameImpl()->frameView(), event));
+ PageWidgetEventHandler::handleMouseLeave(mainFrame, event);
}
-void WebViewImpl::mouseDown(const WebMouseEvent& event)
+void WebViewImpl::handleMouseDown(Frame& mainFrame, const WebMouseEvent& event)
{
- if (!mainFrameImpl() || !mainFrameImpl()->frameView())
- return;
-
// If there is a select popup open, close it as the user is clicking on
// the page (outside of the popup). We also save it so we can prevent a
// click on the select element from immediately reopening the popup.
@@ -488,8 +503,7 @@ void WebViewImpl::mouseDown(const WebMouseEvent& event)
m_mouseCaptureNode = hitNode;
}
- mainFrameImpl()->frame()->eventHandler()->handleMousePressEvent(
- PlatformMouseEventBuilder(mainFrameImpl()->frameView(), event));
+ PageWidgetEventHandler::handleMouseDown(mainFrame, event);
if (m_selectPopup && m_selectPopup == selectPopup) {
// That click triggered a select popup which is the same as the one that
@@ -540,11 +554,8 @@ void WebViewImpl::mouseContextMenu(const WebMouseEvent& event)
// implementation...
}
-void WebViewImpl::mouseUp(const WebMouseEvent& event)
+void WebViewImpl::handleMouseUp(Frame& mainFrame, const WebMouseEvent& event)
{
- if (!mainFrameImpl() || !mainFrameImpl()->frameView())
- return;
-
#if OS(UNIX) && !OS(DARWIN)
// 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
@@ -582,8 +593,7 @@ void WebViewImpl::mouseUp(const WebMouseEvent& event)
}
#endif
- mainFrameImpl()->frame()->eventHandler()->handleMouseReleaseEvent(
- PlatformMouseEventBuilder(mainFrameImpl()->frameView(), event));
+ PageWidgetEventHandler::handleMouseUp(mainFrame, event);
#if OS(WINDOWS)
// Dispatch the contextmenu event regardless of if the click was swallowed.
@@ -593,17 +603,89 @@ void WebViewImpl::mouseUp(const WebMouseEvent& event)
#endif
}
-bool WebViewImpl::mouseWheel(const WebMouseWheelEvent& event)
+void WebViewImpl::scrollBy(const WebCore::IntPoint& delta)
{
- PlatformWheelEventBuilder platformEvent(mainFrameImpl()->frameView(), event);
- return mainFrameImpl()->frame()->eventHandler()->handleWheelEvent(platformEvent);
+ WebMouseWheelEvent syntheticWheel;
+ const float tickDivisor = WebCore::WheelEvent::tickMultiplier;
+
+ syntheticWheel.deltaX = delta.x();
+ syntheticWheel.deltaY = delta.y();
+ syntheticWheel.wheelTicksX = delta.x() / tickDivisor;
+ syntheticWheel.wheelTicksY = delta.y() / tickDivisor;
+ syntheticWheel.hasPreciseScrollingDeltas = true;
+ syntheticWheel.x = m_lastWheelPosition.x;
+ syntheticWheel.y = m_lastWheelPosition.y;
+ syntheticWheel.globalX = m_lastWheelGlobalPosition.x;
+ syntheticWheel.globalY = m_lastWheelGlobalPosition.y;
+ syntheticWheel.modifiers = m_flingModifier;
+
+ if (m_page && m_page->mainFrame() && m_page->mainFrame()->view())
+ handleMouseWheel(*m_page->mainFrame(), syntheticWheel);
}
#if ENABLE(GESTURE_EVENTS)
-bool WebViewImpl::gestureEvent(const WebGestureEvent& event)
+bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
+{
+ switch (event.type) {
+ case WebInputEvent::GestureFlingStart: {
+ m_lastWheelPosition = WebPoint(event.x, event.y);
+ m_lastWheelGlobalPosition = WebPoint(event.globalX, event.globalY);
+ m_flingModifier = event.modifiers;
+ // FIXME: Make the curve parametrizable from the browser.
+ m_gestureAnimation = ActivePlatformGestureAnimation::create(TouchpadFlingPlatformGestureCurve::create(FloatPoint(event.deltaX, event.deltaY)), this);
+ scheduleAnimation();
+ return true;
+ }
+ case WebInputEvent::GestureFlingCancel:
+ if (m_gestureAnimation) {
+ m_gestureAnimation.clear();
+ return true;
+ }
+ return false;
+ case WebInputEvent::GestureTap: {
+ PlatformGestureEventBuilder platformEvent(mainFrameImpl()->frameView(), event);
+ RefPtr<WebCore::PopupContainer> selectPopup;
+ selectPopup = m_selectPopup;
+ hideSelectPopup();
+ ASSERT(!m_selectPopup);
+ bool gestureHandled = mainFrameImpl()->frame()->eventHandler()->handleGestureEvent(platformEvent);
+ if (m_selectPopup && m_selectPopup == selectPopup) {
+ // That tap triggered a select popup which is the same as the one that
+ // was showing before the tap. It means the user tapped the select
+ // while the popup was showing, and as a result we first closed then
+ // immediately reopened the select popup. It needs to be closed.
+ hideSelectPopup();
+ }
+ return gestureHandled;
+ }
+ case WebInputEvent::GestureScrollBegin:
+ case WebInputEvent::GestureScrollEnd:
+ case WebInputEvent::GestureScrollUpdate:
+ case WebInputEvent::GestureTapDown:
+ case WebInputEvent::GestureDoubleTap:
+ case WebInputEvent::GestureLongPress:
+ case WebInputEvent::GesturePinchBegin:
+ case WebInputEvent::GesturePinchEnd:
+ case WebInputEvent::GesturePinchUpdate: {
+ PlatformGestureEventBuilder platformEvent(mainFrameImpl()->frameView(), event);
+ return mainFrameImpl()->frame()->eventHandler()->handleGestureEvent(platformEvent);
+ }
+ default:
+ ASSERT_NOT_REACHED();
+ }
+ return false;
+}
+
+void WebViewImpl::transferActiveWheelFlingAnimation(const WebActiveWheelFlingParameters& parameters)
{
- PlatformGestureEventBuilder platformEvent(mainFrameImpl()->frameView(), event);
- return mainFrameImpl()->frame()->eventHandler()->handleGestureEvent(platformEvent);
+ TRACE_EVENT0("webkit", "WebViewImpl::transferActiveWheelFlingAnimation");
+ ASSERT(!m_gestureAnimation);
+ m_lastWheelPosition = parameters.point;
+ m_lastWheelGlobalPosition = parameters.globalPoint;
+ m_flingModifier = parameters.modifiers;
+ OwnPtr<PlatformGestureCurve> curve = TouchpadFlingPlatformGestureCurve::create(parameters.delta, IntPoint(parameters.cumulativeScroll));
+ m_gestureAnimation = ActivePlatformGestureAnimation::create(curve.release(), this, parameters.startTime);
+ scheduleAnimation();
}
void WebViewImpl::startPageScaleAnimation(const IntPoint& scroll, bool useAnchor, float newScale, double durationSec)
@@ -613,12 +695,16 @@ void WebViewImpl::startPageScaleAnimation(const IntPoint& scroll, bool useAnchor
}
#endif
-bool WebViewImpl::keyEvent(const WebKeyboardEvent& event)
+bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event)
{
ASSERT((event.type == WebInputEvent::RawKeyDown)
|| (event.type == WebInputEvent::KeyDown)
|| (event.type == WebInputEvent::KeyUp));
+ // Halt an in-progress fling on a key event.
+ if (m_gestureAnimation)
+ m_gestureAnimation.clear();
+
// Please refer to the comments explaining the m_suppressNextKeypressEvent
// member.
// The m_suppressNextKeypressEvent is set if the KeyDown is handled by
@@ -631,6 +717,16 @@ bool WebViewImpl::keyEvent(const WebKeyboardEvent& event)
// not the page.
if (m_selectPopup)
return m_selectPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
+#if ENABLE(PAGE_POPUP)
+ if (m_pagePopup) {
+ m_pagePopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
+ // We need to ignore the next Char event after this otherwise pressing
+ // enter when selecting an item in the popup will go to the page.
+ if (WebInputEvent::RawKeyDown == event.type)
+ m_suppressNextKeypressEvent = true;
+ return true;
+ }
+#endif
// Give Autocomplete a chance to consume the key events it is interested in.
if (autocompleteHandleKeyEvent(event))
@@ -727,7 +823,7 @@ bool WebViewImpl::autocompleteHandleKeyEvent(const WebKeyboardEvent& event)
return false;
}
-bool WebViewImpl::charEvent(const WebKeyboardEvent& event)
+bool WebViewImpl::handleCharEvent(const WebKeyboardEvent& event)
{
ASSERT(event.type == WebInputEvent::Char);
@@ -743,6 +839,10 @@ bool WebViewImpl::charEvent(const WebKeyboardEvent& event)
// not the page.
if (m_selectPopup)
return m_selectPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
+#if ENABLE(PAGE_POPUP)
+ if (m_pagePopup)
+ return m_pagePopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
+#endif
Frame* frame = focusedWebCoreFrame();
if (!frame)
@@ -773,18 +873,6 @@ bool WebViewImpl::charEvent(const WebKeyboardEvent& event)
return true;
}
-#if ENABLE(TOUCH_EVENTS)
-bool WebViewImpl::touchEvent(const WebTouchEvent& event)
-{
- if (!mainFrameImpl() || !mainFrameImpl()->frameView())
- return false;
-
- PlatformTouchEventBuilder touchEventBuilder(mainFrameImpl()->frameView(), event);
- bool defaultPrevented = mainFrameImpl()->frame()->eventHandler()->handleTouchEvent(touchEventBuilder);
- return defaultPrevented;
-}
-#endif
-
#if ENABLE(GESTURE_EVENTS)
WebRect WebViewImpl::computeBlockBounds(const WebRect& rect, AutoZoomType zoomType)
{
@@ -807,7 +895,7 @@ WebRect WebViewImpl::computeBlockBounds(const WebRect& rect, AutoZoomType zoomTy
// Return the bounding box in the window coordinate system.
if (node) {
- IntRect rect = node->Node::getRect();
+ IntRect rect = node->Node::getPixelSnappedRect();
Frame* frame = node->document()->frame();
return frame->view()->contentsToWindow(rect);
}
@@ -1105,6 +1193,42 @@ void WebViewImpl::popupClosed(WebCore::PopupContainer* popupContainer)
}
}
+#if ENABLE(PAGE_POPUP)
+PagePopup* WebViewImpl::openPagePopup(PagePopupClient* client, const IntRect& originBoundsInRootView)
+{
+ ASSERT(client);
+ if (hasOpenedPopup())
+ hidePopups();
+ ASSERT(!m_pagePopup);
+
+ WebWidget* popupWidget = m_client->createPopupMenu(WebPopupTypePage);
+ ASSERT(popupWidget);
+ m_pagePopup = static_cast<WebPagePopupImpl*>(popupWidget);
+ if (!m_pagePopup->init(this, client, originBoundsInRootView)) {
+ m_pagePopup->closePopup();
+ m_pagePopup = 0;
+ }
+
+ if (Frame* frame = focusedWebCoreFrame())
+ frame->selection()->setCaretVisible(false);
+ return m_pagePopup.get();
+}
+
+void WebViewImpl::closePagePopup(PagePopup* popup)
+{
+ ASSERT(popup);
+ WebPagePopupImpl* popupImpl = static_cast<WebPagePopupImpl*>(popup);
+ ASSERT(m_pagePopup.get() == popupImpl);
+ if (m_pagePopup.get() != popupImpl)
+ return;
+ m_pagePopup->closePopup();
+ m_pagePopup = 0;
+
+ if (Frame* frame = focusedWebCoreFrame())
+ frame->selection()->pageActivationChanged();
+}
+#endif
+
void WebViewImpl::hideAutofillPopup()
{
if (m_autofillPopupShowing) {
@@ -1171,8 +1295,14 @@ void WebViewImpl::resize(const WebSize& newSize)
return;
m_size = newSize;
- if (mainFrameImpl()->frameView())
- mainFrameImpl()->frameView()->resize(m_size.width, m_size.height);
+ WebDevToolsAgentPrivate* agentPrivate = devToolsAgentPrivate();
+ if (agentPrivate && agentPrivate->metricsOverridden())
+ agentPrivate->webViewResized();
+ else {
+ WebFrameImpl* webFrame = mainFrameImpl();
+ if (webFrame->frameView())
+ webFrame->frameView()->resize(newSize.width, newSize.height);
+ }
sendResizeEventAndRepaint();
}
@@ -1224,8 +1354,14 @@ void WebViewImpl::willExitFullScreen()
return;
if (Document* doc = m_fullScreenFrame->document()) {
- if (doc->webkitIsFullScreen())
+ if (doc->webkitIsFullScreen()) {
+ // When the client exits from full screen we have to call webkitCancelFullScreen to
+ // notify the document. While doing that, suppress notifications back to the client.
+ m_isCancelingFullScreen = true;
+ doc->webkitCancelFullScreen();
+ m_isCancelingFullScreen = false;
doc->webkitWillExitFullScreenForElement(0);
+ }
}
#endif
}
@@ -1250,61 +1386,71 @@ void WebViewImpl::instrumentBeginFrame()
InspectorInstrumentation::didBeginFrame(m_page.get());
}
-void WebViewImpl::animate(double frameBeginTime)
+void WebViewImpl::instrumentCancelFrame()
+{
+ InspectorInstrumentation::didCancelFrame(m_page.get());
+}
+
+#if ENABLE(BATTERY_STATUS)
+void WebViewImpl::updateBatteryStatus(const WebBatteryStatus& status)
+{
+ m_batteryClient->updateBatteryStatus(status);
+}
+#endif
+
+void WebViewImpl::setCompositorSurfaceReady()
+{
+ m_compositorSurfaceReady = true;
+ if (!m_layerTreeView.isNull())
+ m_layerTreeView.setSurfaceReady();
+}
+
+void WebViewImpl::animate(double)
{
#if ENABLE(REQUEST_ANIMATION_FRAME)
- // FIXME: remove this zero-check once render_widget has been modified to
- // pass in a frameBeginTime.
- if (!frameBeginTime)
- frameBeginTime = currentTime();
+ double monotonicFrameBeginTime = monotonicallyIncreasingTime();
#if USE(ACCELERATED_COMPOSITING)
// In composited mode, we always go through the compositor so it can apply
// appropriate flow-control mechanisms.
if (isAcceleratedCompositingActive())
- m_layerTreeView.updateAnimations(frameBeginTime);
+ m_layerTreeView.updateAnimations(monotonicFrameBeginTime);
else
#endif
- updateAnimations(frameBeginTime);
+ updateAnimations(monotonicFrameBeginTime);
#endif
}
-void WebViewImpl::updateAnimations(double frameBeginTime)
+void WebViewImpl::willBeginFrame()
+{
+ instrumentBeginFrame();
+ m_client->willBeginCompositorFrame();
+}
+
+void WebViewImpl::updateAnimations(double monotonicFrameBeginTime)
{
#if ENABLE(REQUEST_ANIMATION_FRAME)
TRACE_EVENT("WebViewImpl::updateAnimations", this, 0);
- WebFrameImpl* webframe = mainFrameImpl();
- if (!webframe)
- return;
- FrameView* view = webframe->frameView();
- if (!view)
+ // Create synthetic wheel events as necessary for fling.
+ if (m_gestureAnimation) {
+ if (m_gestureAnimation->animate(monotonicFrameBeginTime))
+ scheduleAnimation();
+ else
+ m_gestureAnimation.clear();
+ }
+
+ if (!m_page)
return;
- view->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(frameBeginTime));
+
+ PageWidgetDelegate::animate(m_page.get(), monotonicFrameBeginTime);
#endif
}
void WebViewImpl::layout()
{
TRACE_EVENT("WebViewImpl::layout", this, 0);
-
- WebFrameImpl* webframe = mainFrameImpl();
- if (webframe) {
- // In order for our child HWNDs (NativeWindowWidgets) to update properly,
- // they need to be told that we are updating the screen. The problem is
- // that the native widgets need to recalculate their clip region and not
- // overlap any of our non-native widgets. To force the resizing, call
- // setFrameRect(). This will be a quick operation for most frames, but
- // the NativeWindowWidgets will update a proper clipping region.
- FrameView* view = webframe->frameView();
- if (view)
- view->setFrameRect(view->frameRect());
-
- // setFrameRect may have the side-effect of causing existing page
- // layout to be invalidated, so layout needs to be called last.
-
- webframe->layout();
- }
+ PageWidgetDelegate::layout(m_page.get());
}
#if USE(ACCELERATED_COMPOSITING)
@@ -1327,7 +1473,7 @@ void WebViewImpl::doPixelReadbackToCanvas(WebCanvas* canvas, const IntRect& rect
IntRect invertRect(rect.x(), bitmapHeight - rect.maxY(), rect.width(), rect.height());
OwnPtr<ImageBuffer> imageBuffer(ImageBuffer::create(rect.size()));
- RefPtr<ByteArray> pixelArray(ByteArray::create(rect.width() * rect.height() * 4));
+ RefPtr<Uint8ClampedArray> pixelArray(Uint8ClampedArray::createUninitialized(rect.width() * rect.height() * 4));
if (imageBuffer && pixelArray) {
m_layerTreeView.compositeAndReadback(pixelArray->data(), invertRect);
imageBuffer->putByteArray(Premultiplied, pixelArray.get(), rect.size(), IntRect(IntPoint(), rect.size()), IntPoint());
@@ -1357,13 +1503,11 @@ void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect)
#endif
} else {
double paintStart = currentTime();
- WebFrameImpl* webframe = mainFrameImpl();
- if (webframe)
- webframe->paint(canvas, rect);
+ PageWidgetDelegate::paint(m_page.get(), pageOverlays(), canvas, rect);
double paintEnd = currentTime();
double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart);
- PlatformSupport::histogramCustomCounts("Renderer4.SoftwarePaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
- PlatformSupport::histogramCustomCounts("Renderer4.SoftwarePaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30);
+ WebKit::Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
+ WebKit::Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30);
}
}
@@ -1403,6 +1547,15 @@ void WebViewImpl::setNeedsRedraw()
#endif
}
+bool WebViewImpl::isInputThrottled() const
+{
+#if USE(ACCELERATED_COMPOSITING)
+ if (!m_layerTreeView.isNull() && isAcceleratedCompositingActive())
+ return m_layerTreeView.commitRequested();
+#endif
+ return false;
+}
+
void WebViewImpl::loseCompositorContext(int numTimes)
{
#if USE(ACCELERATED_COMPOSITING)
@@ -1427,6 +1580,15 @@ void WebViewImpl::enterFullScreenForElement(WebCore::Element* element)
return;
}
+#if USE(NATIVE_FULLSCREEN_VIDEO)
+ if (element && element->isMediaElement()) {
+ HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(element);
+ if (mediaElement->player() && mediaElement->player()->enterFullscreen())
+ m_provisionalFullScreenElement = element;
+ return;
+ }
+#endif
+
// We need to transition to fullscreen mode.
if (m_client && m_client->enterFullScreen())
m_provisionalFullScreenElement = element;
@@ -1434,6 +1596,17 @@ void WebViewImpl::enterFullScreenForElement(WebCore::Element* element)
void WebViewImpl::exitFullScreenForElement(WebCore::Element* element)
{
+ // The client is exiting full screen, so don't send a notification.
+ if (m_isCancelingFullScreen)
+ return;
+#if USE(NATIVE_FULLSCREEN_VIDEO)
+ if (element && element->isMediaElement()) {
+ HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(element);
+ if (mediaElement->player())
+ mediaElement->player()->exitFullscreen();
+ return;
+ }
+#endif
if (m_client)
m_client->exitFullScreen();
}
@@ -1504,79 +1677,8 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent)
return true;
}
- bool handled = true;
-
- // FIXME: WebKit seems to always return false on mouse events processing
- // methods. For now we'll assume it has processed them (as we are only
- // interested in whether keyboard events are processed).
- switch (inputEvent.type) {
- case WebInputEvent::MouseMove:
- mouseMove(*static_cast<const WebMouseEvent*>(&inputEvent));
- break;
-
- case WebInputEvent::MouseLeave:
- mouseLeave(*static_cast<const WebMouseEvent*>(&inputEvent));
- break;
-
- case WebInputEvent::MouseWheel:
- handled = mouseWheel(*static_cast<const WebMouseWheelEvent*>(&inputEvent));
- break;
-
- case WebInputEvent::MouseDown:
- mouseDown(*static_cast<const WebMouseEvent*>(&inputEvent));
- break;
-
- case WebInputEvent::MouseUp:
- mouseUp(*static_cast<const WebMouseEvent*>(&inputEvent));
- break;
-
- case WebInputEvent::RawKeyDown:
- case WebInputEvent::KeyDown:
- case WebInputEvent::KeyUp:
- handled = keyEvent(*static_cast<const WebKeyboardEvent*>(&inputEvent));
- break;
-
- case WebInputEvent::Char:
- handled = charEvent(*static_cast<const WebKeyboardEvent*>(&inputEvent));
- break;
-
-#if ENABLE(GESTURE_EVENTS)
- case WebInputEvent::GestureScrollBegin:
- case WebInputEvent::GestureScrollEnd:
- case WebInputEvent::GestureScrollUpdate:
- case WebInputEvent::GestureFlingStart:
- case WebInputEvent::GestureFlingCancel:
- case WebInputEvent::GestureTap:
- case WebInputEvent::GestureTapDown:
- case WebInputEvent::GestureDoubleTap:
- handled = gestureEvent(*static_cast<const WebGestureEvent*>(&inputEvent));
- break;
-#endif
-
-#if ENABLE(TOUCH_EVENTS)
- case WebInputEvent::TouchStart:
- case WebInputEvent::TouchMove:
- case WebInputEvent::TouchEnd:
- case WebInputEvent::TouchCancel:
- handled = touchEvent(*static_cast<const WebTouchEvent*>(&inputEvent));
- break;
-#endif
-
-#if ENABLE(GESTURE_EVENTS)
- case WebInputEvent::GesturePinchBegin:
- case WebInputEvent::GesturePinchEnd:
- case WebInputEvent::GesturePinchUpdate:
- // FIXME: Once PlatformGestureEvent is updated to support pinch, this should call handleGestureEvent, just like it currently does for gesture scroll.
- handled = false;
- break;
-#endif
-
- default:
- handled = false;
- }
-
+ bool handled = PageWidgetDelegate::handleInputEvent(m_page.get(), *this, inputEvent);
m_currentInputEvent = 0;
-
return handled;
}
@@ -1615,8 +1717,7 @@ void WebViewImpl::setFocus(bool enable)
}
m_imeAcceptEvents = true;
} else {
- hideAutofillPopup();
- hideSelectPopup();
+ hidePopups();
// Clear focus on the currently focused frame if any.
if (!m_page)
@@ -2103,9 +2204,9 @@ double WebViewImpl::setZoomLevel(bool textOnly, double zoomLevel)
else {
float zoomFactor = static_cast<float>(zoomLevelToZoomFactor(m_zoomLevel));
if (textOnly)
- frame->setPageAndTextZoomFactors(1, zoomFactor);
+ frame->setPageAndTextZoomFactors(1, zoomFactor * m_emulatedTextZoomFactor);
else
- frame->setPageAndTextZoomFactors(zoomFactor, 1);
+ frame->setPageAndTextZoomFactors(zoomFactor, m_emulatedTextZoomFactor);
}
return m_zoomLevel;
}
@@ -2263,14 +2364,6 @@ void WebViewImpl::disableAutoResizeMode()
configureAutoResizeMode();
}
-void WebViewImpl::enableAutoResizeMode(bool enable, const WebSize& minSize, const WebSize& maxSize)
-{
- if (enable)
- enableAutoResizeMode(minSize, maxSize);
- else
- disableAutoResizeMode();
-}
-
void WebViewImpl::setPageScaleFactorLimits(float minPageScale, float maxPageScale)
{
m_pageDefinedMinimumPageScaleFactor = minPageScale;
@@ -2658,12 +2751,11 @@ void WebViewImpl::applyAutofillSuggestions(
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
const WebVector<WebString>& icons,
- const WebVector<int>& uniqueIDs,
+ const WebVector<int>& itemIDs,
int separatorIndex)
{
ASSERT(names.size() == labels.size());
- ASSERT(names.size() == uniqueIDs.size());
- ASSERT(separatorIndex < static_cast<int>(names.size()));
+ ASSERT(names.size() == itemIDs.size());
if (names.isEmpty()) {
hideAutofillPopup();
@@ -2688,19 +2780,24 @@ void WebViewImpl::applyAutofillSuggestions(
m_autofillPopupClient = adoptPtr(new AutofillPopupMenuClient);
m_autofillPopupClient->initialize(
- inputElem, names, labels, icons, uniqueIDs, separatorIndex);
+ inputElem, names, labels, icons, itemIDs, separatorIndex);
if (!m_autofillPopup) {
+ PopupContainerSettings popupSettings = autofillPopupSettings;
+ popupSettings.defaultDeviceScaleFactor =
+ m_page->settings()->defaultDeviceScaleFactor();
+ if (!popupSettings.defaultDeviceScaleFactor)
+ popupSettings.defaultDeviceScaleFactor = 1;
m_autofillPopup = PopupContainer::create(m_autofillPopupClient.get(),
PopupContainer::Suggestion,
- autofillPopupSettings);
+ popupSettings);
}
if (m_autofillPopupShowing) {
refreshAutofillPopup();
} else {
- m_autofillPopup->showInRect(focusedNode->getRect(), focusedNode->ownerDocument()->view(), 0);
m_autofillPopupShowing = true;
+ m_autofillPopup->showInRect(focusedNode->getPixelSnappedRect(), focusedNode->ownerDocument()->view(), 0);
}
}
@@ -2708,6 +2805,10 @@ void WebViewImpl::hidePopups()
{
hideSelectPopup();
hideAutofillPopup();
+#if ENABLE(PAGE_POPUP)
+ if (m_pagePopup)
+ closePagePopup(m_pagePopup.get());
+#endif
}
void WebViewImpl::performCustomContextMenuAction(unsigned action)
@@ -2837,6 +2938,8 @@ void WebViewImpl::didCommitLoad(bool* isNewNavigation, bool isNavigationWithinPa
m_observedNewNavigation = false;
if (!isNavigationWithinPage)
m_pageScaleFactorIsSet = false;
+
+ m_gestureAnimation.clear();
}
void WebViewImpl::layoutUpdated(WebFrameImpl* webframe)
@@ -2876,6 +2979,14 @@ bool WebViewImpl::useExternalPopupMenus()
return shouldUseExternalPopupMenus;
}
+void WebViewImpl::setEmulatedTextZoomFactor(float textZoomFactor)
+{
+ m_emulatedTextZoomFactor = textZoomFactor;
+ Frame* frame = mainFrameImpl()->frame();
+ if (frame)
+ frame->setPageAndTextZoomFactors(frame->pageZoomFactor(), m_emulatedTextZoomFactor);
+}
+
bool WebViewImpl::navigationPolicyFromMouseEvent(unsigned short button,
bool ctrl, bool shift,
bool alt, bool meta,
@@ -2952,7 +3063,7 @@ void WebViewImpl::setOverlayLayer(WebCore::GraphicsLayer* layer)
}
}
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterImpl* WebViewImpl::notificationPresenterImpl()
{
if (!m_notificationPresenter.isInitialized() && m_client)
@@ -2971,16 +3082,11 @@ void WebViewImpl::refreshAutofillPopup()
return;
}
- IntRect oldBounds = m_autofillPopup->frameRect();
- m_autofillPopup->refresh(focusedWebCoreNode()->getRect());
- IntRect newBounds = m_autofillPopup->frameRect();
+ WebRect newWidgetRect = m_autofillPopup->refresh(focusedWebCoreNode()->getPixelSnappedRect());
// Let's resize the backing window if necessary.
- if (oldBounds != newBounds) {
- WebPopupMenuImpl* popupMenu =
- static_cast<WebPopupMenuImpl*>(m_autofillPopup->client());
- if (popupMenu)
- popupMenu->client()->setWindowRect(m_chromeClientImpl.rootViewToScreen(newBounds));
- }
+ WebPopupMenuImpl* popupMenu = static_cast<WebPopupMenuImpl*>(m_autofillPopup->client());
+ if (popupMenu && popupMenu->client()->windowRect() != newWidgetRect)
+ popupMenu->client()->setWindowRect(newWidgetRect);
}
Node* WebViewImpl::focusedWebCoreNode()
@@ -3089,6 +3195,14 @@ NonCompositedContentHost* WebViewImpl::nonCompositedContentHost()
return m_nonCompositedContentHost.get();
}
+void WebViewImpl::setBackgroundColor(const WebCore::Color& color)
+{
+ WebCore::Color documentBackgroundColor = color.isValid() ? color : WebCore::Color::white;
+ WebColor webDocumentBackgroundColor = documentBackgroundColor.rgb();
+ m_nonCompositedContentHost->setBackgroundColor(documentBackgroundColor);
+ m_layerTreeView.setBackgroundColor(webDocumentBackgroundColor);
+}
+
#if ENABLE(REQUEST_ANIMATION_FRAME)
void WebViewImpl::scheduleAnimation()
{
@@ -3121,11 +3235,10 @@ public:
view->paintContents(&context, contentRect);
double paintEnd = currentTime();
double pixelsPerSec = (contentRect.width() * contentRect.height()) / (paintEnd - paintStart);
- PlatformSupport::histogramCustomCounts("Renderer4.AccelRootPaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
- PlatformSupport::histogramCustomCounts("Renderer4.AccelRootPaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30);
-
- m_webViewImpl->nonCompositedContentHost()->setBackgroundColor(view->documentBackgroundColor());
+ WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelRootPaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
+ WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelRootPaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30);
+ m_webViewImpl->setBackgroundColor(view->documentBackgroundColor());
}
private:
@@ -3139,7 +3252,7 @@ private:
void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
{
- PlatformSupport::histogramEnumeration("GPU.setIsAcceleratedCompositingActive", active * 2 + m_isAcceleratedCompositingActive, 4);
+ WebKit::Platform::current()->histogramEnumeration("GPU.setIsAcceleratedCompositingActive", active * 2 + m_isAcceleratedCompositingActive, 4);
if (m_isAcceleratedCompositingActive == active)
return;
@@ -3161,7 +3274,6 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
WebLayerTreeView::Settings layerTreeViewSettings;
layerTreeViewSettings.acceleratePainting = page()->settings()->acceleratedDrawingEnabled();
- layerTreeViewSettings.compositeOffscreen = settings()->compositeToTextureEnabled();
layerTreeViewSettings.showFPSCounter = settings()->showFPSCounter();
layerTreeViewSettings.showPlatformLayerTree = settings()->showPlatformLayerTree();
@@ -3172,12 +3284,11 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
m_nonCompositedContentHost = NonCompositedContentHost::create(WebViewImplContentPainter::create(this));
m_nonCompositedContentHost->setShowDebugBorders(page()->settings()->showDebugBorders());
- if (page() && page()->mainFrame()->view())
- m_nonCompositedContentHost->setBackgroundColor(page()->mainFrame()->view()->documentBackgroundColor());
-
m_layerTreeView.initialize(this, m_rootLayer, layerTreeViewSettings);
if (!m_layerTreeView.isNull()) {
m_layerTreeView.setPageScaleFactorAndLimits(pageScaleFactor(), m_minimumPageScaleFactor, m_maximumPageScaleFactor);
+ if (m_compositorSurfaceReady)
+ m_layerTreeView.setSurfaceReady();
updateLayerTreeViewport();
m_client->didActivateCompositor(m_layerTreeView.compositorIdentifier());
m_isAcceleratedCompositingActive = true;
@@ -3239,9 +3350,10 @@ void WebViewImpl::applyScrollAndScale(const WebSize& scrollDelta, float pageScal
if (!mainFrameImpl() || !mainFrameImpl()->frameView())
return;
- if (pageScaleDelta == 1)
+ if (pageScaleDelta == 1) {
+ TRACE_EVENT_INSTANT2("webkit", "WebViewImpl::applyScrollAndScale::scrollBy", "x", scrollDelta.width, "y", scrollDelta.height);
mainFrameImpl()->frameView()->scrollBy(scrollDelta);
- else {
+ } else {
// The page scale changed, so apply a scale and scroll in a single
// operation. The old scroll offset (and passed-in delta) are
// in the old coordinate space, so we first need to multiply them
@@ -3255,6 +3367,12 @@ void WebViewImpl::applyScrollAndScale(const WebSize& scrollDelta, float pageScal
}
}
+void WebViewImpl::didCommit()
+{
+ if (m_client)
+ m_client->didBecomeReadyForAdditionalInput();
+}
+
void WebViewImpl::didCommitAndDrawFrame()
{
if (m_client)
@@ -3310,7 +3428,7 @@ void WebViewImpl::updateLayerTreeViewport()
layerAdjustX = -view->contentsSize().width() + view->visibleContentRect(false).width();
}
m_nonCompositedContentHost->setViewport(visibleRect.size(), view->contentsSize(), scroll, pageScaleFactor(), layerAdjustX);
- m_layerTreeView.setViewportSize(visibleRect.size());
+ m_layerTreeView.setViewportSize(size());
m_layerTreeView.setPageScaleFactorAndLimits(pageScaleFactor(), m_minimumPageScaleFactor, m_maximumPageScaleFactor);
}
@@ -3343,7 +3461,7 @@ WebGraphicsContext3D* WebViewImpl::sharedGraphicsContext3D()
if (!m_page->settings()->acceleratedCompositingEnabled() || !allowsAcceleratedCompositing())
return 0;
- return GraphicsContext3DPrivate::extractWebGraphicsContext3D(SharedGraphicsContext3D::get());
+ return GraphicsContext3DPrivate::extractWebGraphicsContext3D(SharedGraphicsContext3D::get().get());
}
void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState,
@@ -3354,14 +3472,15 @@ void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState,
#if ENABLE(PAGE_VISIBILITY_API)
ASSERT(visibilityState == WebPageVisibilityStateVisible
|| visibilityState == WebPageVisibilityStateHidden
- || visibilityState == WebPageVisibilityStatePrerender);
+ || visibilityState == WebPageVisibilityStatePrerender
+ || visibilityState == WebPageVisibilityStatePreview);
m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int>(visibilityState)), isInitialState);
#endif
#if USE(ACCELERATED_COMPOSITING)
- if (isAcceleratedCompositingActive()) {
+ if (!m_layerTreeView.isNull()) {
bool visible = visibilityState == WebPageVisibilityStateVisible;
- if (!visible)
+ if (!visible && isAcceleratedCompositingActive())
m_nonCompositedContentHost->protectVisibleTileTextures();
m_layerTreeView.setVisible(visible);
}
diff --git a/Source/WebKit/chromium/src/WebViewImpl.h b/Source/WebKit/chromium/src/WebViewImpl.h
index 3819ecb65..9383ba28d 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.h
+++ b/Source/WebKit/chromium/src/WebViewImpl.h
@@ -52,12 +52,16 @@
#include "IntRect.h"
#include "NotificationPresenterImpl.h"
#include "PageOverlayList.h"
+#include "PageWidgetDelegate.h"
+#include "PlatformGestureCurveTarget.h"
#include "UserMediaClientImpl.h"
#include <wtf/OwnPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
+class ActivePlatformGestureAnimation;
class ChromiumDataObject;
+class Color;
class DocumentLoader;
class Frame;
class GraphicsContext3D;
@@ -65,23 +69,29 @@ class HistoryItem;
class HitTestResult;
class KeyboardEvent;
class Page;
+class PagePopup;
+class PagePopupClient;
+class PlatformGestureCurveTarget;
class PlatformKeyboardEvent;
class PopupContainer;
class PopupMenuClient;
class Range;
class RenderTheme;
+class TextFieldDecorator;
class Widget;
}
namespace WebKit {
class AutocompletePopupMenuClient;
class AutofillPopupMenuClient;
+class BatteryClientImpl;
class ContextMenuClientImpl;
class DeviceOrientationClientProxy;
class DragScrollTimer;
class GeolocationClientProxy;
class NonCompositedContentHost;
class SpeechInputClientImpl;
+class SpeechRecognitionClientProxy;
class UserMediaClientImpl;
class WebAccessibilityObject;
class WebCompositorImpl;
@@ -89,6 +99,7 @@ class WebDevToolsAgentClient;
class WebDevToolsAgentPrivate;
class WebFrameImpl;
class WebGestureEvent;
+class WebPagePopupImpl;
class WebImage;
class WebKeyboardEvent;
class WebMouseEvent;
@@ -96,7 +107,7 @@ class WebMouseWheelEvent;
class WebSettingsImpl;
class WebTouchEvent;
-class WebViewImpl : public WebView, public WebLayerTreeViewClient, public RefCounted<WebViewImpl> {
+class WebViewImpl : public WebView, public WebLayerTreeViewClient, public RefCounted<WebViewImpl>, public WebCore::PlatformGestureCurveTarget, public PageWidgetEventHandler {
public:
enum AutoZoomType {
DoubleTap,
@@ -113,12 +124,14 @@ public:
virtual void didEnterFullScreen();
virtual void willExitFullScreen();
virtual void didExitFullScreen();
- virtual void animate(double frameBeginTime);
- virtual void layout(); // Also implements CCLayerTreeHostClient::layout()
+ virtual void setCompositorSurfaceReady();
+ virtual void animate(double);
+ virtual void layout(); // Also implements WebLayerTreeViewClient::layout()
virtual void paint(WebCanvas*, const WebRect&);
virtual void themeChanged();
virtual void composite(bool finish);
virtual void setNeedsRedraw();
+ virtual bool isInputThrottled() const;
virtual bool handleInputEvent(const WebInputEvent&);
virtual void mouseCaptureLost();
virtual void setFocus(bool enable);
@@ -140,6 +153,7 @@ public:
virtual void didLosePointerLock();
virtual void didChangeWindowResizerRect();
virtual void instrumentBeginFrame();
+ virtual void instrumentCancelFrame();
// WebView methods:
virtual void initializeMainFrame(WebFrameClient*);
@@ -147,6 +161,7 @@ public:
virtual void setDevToolsAgentClient(WebDevToolsAgentClient*);
virtual void setPermissionClient(WebPermissionClient*);
virtual void setSpellCheckClient(WebSpellCheckClient*);
+ virtual void addTextFieldDecoratorClient(WebTextFieldDecoratorClient*) OVERRIDE;
virtual WebSettings* settings();
virtual WebString pageEncoding() const;
virtual void setPageEncoding(const WebString& encoding);
@@ -192,10 +207,6 @@ public:
const WebSize& minSize,
const WebSize& maxSize);
virtual void disableAutoResizeMode();
- virtual void enableAutoResizeMode(
- bool enable,
- const WebSize& minSize,
- const WebSize& maxSize);
virtual void performMediaPlayerAction(
const WebMediaPlayerAction& action,
const WebPoint& location);
@@ -239,7 +250,7 @@ public:
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
const WebVector<WebString>& icons,
- const WebVector<int>& uniqueIDs,
+ const WebVector<int>& itemIDs,
int separatorIndex);
virtual void hidePopups();
virtual void setScrollbarColors(unsigned inactiveColor,
@@ -252,12 +263,18 @@ public:
virtual void performCustomContextMenuAction(unsigned action);
virtual void addPageOverlay(WebPageOverlay*, int /* zOrder */);
virtual void removePageOverlay(WebPageOverlay*);
+#if ENABLE(BATTERY_STATUS)
+ virtual void updateBatteryStatus(const WebBatteryStatus&);
+#endif
+ virtual void transferActiveWheelFlingAnimation(const WebActiveWheelFlingParameters&);
// WebLayerTreeViewClient
- virtual void updateAnimations(double frameBeginTime);
+ virtual void willBeginFrame();
+ virtual void updateAnimations(double monotonicFrameBeginTime);
virtual void applyScrollAndScale(const WebSize&, float);
virtual WebGraphicsContext3D* createContext3D();
virtual void didRebindGraphicsContext(bool);
+ virtual void didCommit();
virtual void didCommitAndDrawFrame();
virtual void didCompleteSwapBuffers();
virtual void scheduleComposite();
@@ -303,6 +320,8 @@ public:
return m_spellCheckClient;
}
+ const Vector<OwnPtr<WebCore::TextFieldDecorator> >& textFieldDecorators() const { return m_textFieldDecorators; }
+
// Returns the page object associated with this view. This may be null when
// the page is shutting down, but will be valid at all other times.
WebCore::Page* page() const
@@ -320,22 +339,16 @@ public:
void observeNewNavigation();
// Event related methods:
- void mouseMove(const WebMouseEvent&);
- void mouseLeave(const WebMouseEvent&);
- void mouseDown(const WebMouseEvent&);
- void mouseUp(const WebMouseEvent&);
void mouseContextMenu(const WebMouseEvent&);
void mouseDoubleClick(const WebMouseEvent&);
- bool mouseWheel(const WebMouseWheelEvent&);
- bool gestureEvent(const WebGestureEvent&);
void startPageScaleAnimation(const WebCore::IntPoint& targetPosition, bool useAnchor, float newScale, double durationSec);
- bool keyEvent(const WebKeyboardEvent&);
- bool charEvent(const WebKeyboardEvent&);
- bool touchEvent(const WebTouchEvent&);
void numberOfWheelEventHandlersChanged(unsigned);
void numberOfTouchEventHandlersChanged(unsigned);
+ // PlatformGestureCurveTarget implementation for wheel fling.
+ virtual void scrollBy(const WebCore::IntPoint&);
+
// Handles context menu events orignated via the the keyboard. These
// include the VK_APPS virtual key and the Shift+F10 combine. Code is
// based on the Webkit function bool WebView::handleContextMenuEvent(WPARAM
@@ -393,6 +406,17 @@ public:
return m_initialNavigationPolicy;
}
+ // Sets the emulated text zoom factor
+ // (may not be 1 in the device metrics emulation mode).
+ void setEmulatedTextZoomFactor(float);
+
+ // Returns the emulated text zoom factor
+ // (which may not be 1 in the device metrics emulation mode).
+ float emulatedTextZoomFactor() const
+ {
+ return m_emulatedTextZoomFactor;
+ }
+
// Determines whether a page should e.g. be opened in a background tab.
// Returns false if it has no opinion, in which case it doesn't set *policy.
static bool navigationPolicyFromMouseEvent(
@@ -415,7 +439,7 @@ public:
m_autofillPopupShowing = false;
}
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
// Returns the provider of desktop notifications.
NotificationPresenterImpl* notificationPresenterImpl();
#endif
@@ -427,6 +451,10 @@ public:
// Notification that a popup was opened/closed.
void popupOpened(WebCore::PopupContainer* popupContainer);
void popupClosed(WebCore::PopupContainer* popupContainer);
+#if ENABLE(PAGE_POPUP)
+ WebCore::PagePopup* openPagePopup(WebCore::PagePopupClient*, const WebCore::IntRect& originBoundsInRootView);
+ void closePagePopup(WebCore::PagePopup*);
+#endif
void hideAutofillPopup();
@@ -445,6 +473,7 @@ public:
void scrollRootLayerRect(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& clipRect);
void invalidateRootLayerRect(const WebCore::IntRect&);
NonCompositedContentHost* nonCompositedContentHost();
+ void setBackgroundColor(const WebCore::Color&);
#endif
#if ENABLE(REQUEST_ANIMATION_FRAME)
void scheduleAnimation();
@@ -464,6 +493,11 @@ public:
virtual void setVisibilityState(WebPageVisibilityState, bool);
WebCore::PopupContainer* selectPopup() const { return m_selectPopup.get(); }
+#if ENABLE(PAGE_POPUP)
+ bool hasOpenedPopup() const { return m_selectPopup || m_pagePopup; }
+#else
+ bool hasOpenedPopup() const { return m_selectPopup; }
+#endif
// Returns true if the event leads to scrolling.
static bool mapKeyCodeForScroll(int keyCode,
@@ -485,6 +519,9 @@ public:
void enterFullScreenForElement(WebCore::Element*);
void exitFullScreenForElement(WebCore::Element*);
+ // Exposed for the purpose of overriding device metrics.
+ void sendResizeEventAndRepaint();
+
// Exposed for testing purposes.
bool hasHorizontalScrollbar();
bool hasVerticalScrollbar();
@@ -540,7 +577,6 @@ private:
const WebPoint& screenPoint,
DragAction);
- void sendResizeEventAndRepaint();
void configureAutoResizeMode();
#if USE(ACCELERATED_COMPOSITING)
@@ -564,10 +600,19 @@ private:
void pointerLockMouseEvent(const WebInputEvent&);
#endif
+ // PageWidgetEventHandler functions
+ virtual void handleMouseLeave(WebCore::Frame&, const WebMouseEvent&) OVERRIDE;
+ virtual void handleMouseDown(WebCore::Frame&, const WebMouseEvent&) OVERRIDE;
+ virtual void handleMouseUp(WebCore::Frame&, const WebMouseEvent&) OVERRIDE;
+ virtual bool handleGestureEvent(const WebGestureEvent&) OVERRIDE;
+ virtual bool handleKeyEvent(const WebKeyboardEvent&) OVERRIDE;
+ virtual bool handleCharEvent(const WebKeyboardEvent&) OVERRIDE;
+
WebViewClient* m_client;
WebAutofillClient* m_autofillClient;
WebPermissionClient* m_permissionClient;
WebSpellCheckClient* m_spellCheckClient;
+ Vector<OwnPtr<WebCore::TextFieldDecorator> > m_textFieldDecorators;
ChromeClientImpl m_chromeClientImpl;
ContextMenuClientImpl m_contextMenuClientImpl;
@@ -583,7 +628,6 @@ private:
// The upper bound on the size when auto-resizing.
WebCore::IntSize m_maxAutoSize;
- WebPoint m_lastMousePosition;
OwnPtr<WebCore::Page> m_page;
// This flag is set when a new navigation is detected. It is used to satisfy
@@ -665,6 +709,11 @@ private:
// The popup associated with a select element.
RefPtr<WebCore::PopupContainer> m_selectPopup;
+#if ENABLE(PAGE_POPUP)
+ // The popup associated with an input element.
+ RefPtr<WebPagePopupImpl> m_pagePopup;
+#endif
+
OwnPtr<WebDevToolsAgentPrivate> m_devToolsAgent;
OwnPtr<PageOverlayList> m_pageOverlays;
@@ -681,7 +730,7 @@ private:
OwnPtr<SettingsMap> m_inspectorSettingsMap;
OwnPtr<DragScrollTimer> m_dragScrollTimer;
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
// The provider of desktop notifications;
NotificationPresenterImpl m_notificationPresenter;
#endif
@@ -694,6 +743,7 @@ private:
// If set, the WebView is in fullscreen mode for an element in this frame.
RefPtr<WebCore::Frame> m_fullScreenFrame;
+ bool m_isCancelingFullScreen;
#if USE(ACCELERATED_COMPOSITING)
WebCore::IntRect m_rootLayerScrollDamage;
@@ -705,22 +755,36 @@ private:
bool m_compositorCreationFailed;
// If true, the graphics context is being restored.
bool m_recreatingGraphicsContext;
+ bool m_compositorSurfaceReady;
#endif
static const WebInputEvent* m_currentInputEvent;
#if ENABLE(INPUT_SPEECH)
OwnPtr<SpeechInputClientImpl> m_speechInputClient;
#endif
+#if ENABLE(SCRIPTED_SPEECH)
+ OwnPtr<SpeechRecognitionClientProxy> m_speechRecognitionClient;
+#endif
+
// If we attempt to fetch the on-screen GraphicsContext3D before
// the compositor has been turned on, we need to instantiate it
// early. This member holds on to the GC3D in this case.
OwnPtr<WebGraphicsContext3D> m_temporaryOnscreenGraphicsContext3D;
OwnPtr<DeviceOrientationClientProxy> m_deviceOrientationClientProxy;
OwnPtr<GeolocationClientProxy> m_geolocationClientProxy;
+#if ENABLE(BATTERY_STATUS)
+ OwnPtr<BatteryClientImpl> m_batteryClient;
+#endif
+
+ float m_emulatedTextZoomFactor;
#if ENABLE(MEDIA_STREAM)
UserMediaClientImpl m_userMediaClientImpl;
#endif
+ OwnPtr<WebCore::ActivePlatformGestureAnimation> m_gestureAnimation;
+ WebPoint m_lastWheelPosition;
+ WebPoint m_lastWheelGlobalPosition;
+ int m_flingModifier;
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp b/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp
index a69f01a5f..aee7b1df4 100644
--- a/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp
+++ b/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp
@@ -87,8 +87,8 @@ WorkerContextProxy* WebWorkerClientImpl::createWorkerContextProxy(Worker* worker
void WebWorkerClientImpl::startWorkerContext(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode)
{
RefPtr<DedicatedWorkerThread> thread = DedicatedWorkerThread::create(scriptURL, userAgent, sourceCode, *this, *this, startMode,
- m_scriptExecutionContext->contentSecurityPolicy()->policy(),
- m_scriptExecutionContext->contentSecurityPolicy()->headerType());
+ m_scriptExecutionContext->contentSecurityPolicy()->deprecatedHeader(),
+ m_scriptExecutionContext->contentSecurityPolicy()->deprecatedHeaderType());
m_proxy->workerThreadCreated(thread);
thread->start();
InspectorInstrumentation::didStartWorkerContext(m_scriptExecutionContext.get(), m_proxy, scriptURL);
@@ -149,9 +149,9 @@ void WebWorkerClientImpl::postTaskToLoader(PassOwnPtr<ScriptExecutionContext::Ta
m_proxy->postTaskToLoader(task);
}
-void WebWorkerClientImpl::postTaskForModeToWorkerContext(PassOwnPtr<ScriptExecutionContext::Task> task, const String& mode)
+bool WebWorkerClientImpl::postTaskForModeToWorkerContext(PassOwnPtr<ScriptExecutionContext::Task> task, const String& mode)
{
- m_proxy->postTaskForModeToWorkerContext(task, mode);
+ return m_proxy->postTaskForModeToWorkerContext(task, mode);
}
void WebWorkerClientImpl::postMessageToWorkerObject(PassRefPtr<SerializedScriptValue> value, PassOwnPtr<MessagePortChannelArray> ports)
diff --git a/Source/WebKit/chromium/src/WebWorkerClientImpl.h b/Source/WebKit/chromium/src/WebWorkerClientImpl.h
index d47744c9c..2a865488d 100644
--- a/Source/WebKit/chromium/src/WebWorkerClientImpl.h
+++ b/Source/WebKit/chromium/src/WebWorkerClientImpl.h
@@ -86,7 +86,7 @@ public:
#endif
// WebCore::WorkerLoaderProxy methods:
virtual void postTaskToLoader(PassOwnPtr<WebCore::ScriptExecutionContext::Task>) OVERRIDE;
- virtual void postTaskForModeToWorkerContext(PassOwnPtr<WebCore::ScriptExecutionContext::Task>, const String& mode) OVERRIDE;
+ virtual bool postTaskForModeToWorkerContext(PassOwnPtr<WebCore::ScriptExecutionContext::Task>, const String& mode) OVERRIDE;
// WebCore::WorkerObjectProxy methods:
virtual void postMessageToWorkerObject(PassRefPtr<WebCore::SerializedScriptValue>, PassOwnPtr<WebCore::MessagePortChannelArray>) OVERRIDE;
diff --git a/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp b/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp
index 80a26ff03..bcbca5651 100644
--- a/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp
+++ b/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp
@@ -57,11 +57,11 @@ namespace WebCore {
static const char fileSystemOperationsMode[] = "fileSystemOperationsMode";
-WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium(ScriptExecutionContext* context, AsyncFileSystem::Type type, const WebKit::WebURL& rootURL, bool synchronous)
+WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium(ScriptExecutionContext* context, FileSystemType type, const WebKit::WebURL& rootURL, FileSystemSynchronousType synchronousType)
: AsyncFileSystemChromium(type, rootURL)
, m_scriptExecutionContext(context)
, m_workerContext(static_cast<WorkerContext*>(context))
- , m_synchronous(synchronous)
+ , m_synchronousType(synchronousType)
{
ASSERT(m_scriptExecutionContext->isWorkerContext());
@@ -219,7 +219,7 @@ void WorkerAsyncFileSystemChromium::createSnapshotFileAndReadMetadata(const Stri
PassRefPtr<WorkerFileSystemCallbacksBridge> WorkerAsyncFileSystemChromium::createWorkerFileSystemCallbacksBridge(PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
- ASSERT(!m_synchronous || !m_bridgeForCurrentOperation);
+ ASSERT(m_synchronousType == AsynchronousFileSystem || !m_bridgeForCurrentOperation);
m_modeForCurrentOperation = fileSystemOperationsMode;
m_modeForCurrentOperation.append(String::number(m_workerContext->thread()->runLoop().createUniqueId()));
diff --git a/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h b/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h
index 08918518a..2618c48b9 100644
--- a/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h
+++ b/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h
@@ -34,7 +34,7 @@
#if ENABLE(FILE_SYSTEM) && ENABLE(WORKERS)
#include "AsyncFileSystemChromium.h"
-#include "PlatformString.h"
+#include "FileSystemType.h"
#include <wtf/PassOwnPtr.h>
#include <wtf/RefPtr.h>
@@ -53,9 +53,9 @@ class WorkerContext;
class WorkerAsyncFileSystemChromium : public AsyncFileSystemChromium {
public:
- static PassOwnPtr<AsyncFileSystem> create(ScriptExecutionContext* context, AsyncFileSystem::Type type, const WebKit::WebURL& rootURL, bool synchronous)
+ static PassOwnPtr<AsyncFileSystem> create(ScriptExecutionContext* context, FileSystemType type, const WebKit::WebURL& rootURL, FileSystemSynchronousType synchronousType)
{
- return adoptPtr(new WorkerAsyncFileSystemChromium(context, type, rootURL, synchronous));
+ return adoptPtr(new WorkerAsyncFileSystemChromium(context, type, rootURL, synchronousType));
}
virtual ~WorkerAsyncFileSystemChromium();
@@ -77,7 +77,7 @@ public:
virtual void createSnapshotFileAndReadMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
private:
- WorkerAsyncFileSystemChromium(ScriptExecutionContext*, AsyncFileSystem::Type, const WebKit::WebURL& rootURL, bool synchronous);
+ WorkerAsyncFileSystemChromium(ScriptExecutionContext*, FileSystemType, const WebKit::WebURL& rootURL, FileSystemSynchronousType);
PassRefPtr<WebKit::WorkerFileSystemCallbacksBridge> createWorkerFileSystemCallbacksBridge(PassOwnPtr<AsyncFileSystemCallbacks>);
@@ -86,7 +86,7 @@ private:
WorkerContext* m_workerContext;
RefPtr<WebKit::WorkerFileSystemCallbacksBridge> m_bridgeForCurrentOperation;
String m_modeForCurrentOperation;
- bool m_synchronous;
+ FileSystemSynchronousType m_synchronousType;
};
} // namespace WebCore
diff --git a/Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp b/Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp
index 8fd5cfa6d..e87b5aa29 100644
--- a/Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp
+++ b/Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp
@@ -146,7 +146,7 @@ private:
// that it only gets deleted on the worker context thread which is verified by ~Observer.
class WorkerFileSystemContextObserver : public WebCore::WorkerContext::Observer {
public:
- static PassOwnPtr<WorkerFileSystemContextObserver> create(WorkerContext* context, WorkerFileSystemCallbacksBridge* bridge)
+ static PassOwnPtr<WorkerFileSystemContextObserver> create(WorkerContext* context, PassRefPtr<WorkerFileSystemCallbacksBridge> bridge)
{
return adoptPtr(new WorkerFileSystemContextObserver(context, bridge));
}
@@ -158,15 +158,13 @@ public:
}
private:
- WorkerFileSystemContextObserver(WorkerContext* context, WorkerFileSystemCallbacksBridge* bridge)
+ WorkerFileSystemContextObserver(WorkerContext* context, PassRefPtr<WorkerFileSystemCallbacksBridge> bridge)
: WebCore::WorkerContext::Observer(context)
, m_bridge(bridge)
{
}
- // Since WorkerFileSystemCallbacksBridge manages the lifetime of this class,
- // m_bridge will be valid throughout its lifetime.
- WorkerFileSystemCallbacksBridge* m_bridge;
+ RefPtr<WorkerFileSystemCallbacksBridge> m_bridge;
};
void WorkerFileSystemCallbacksBridge::stop()
diff --git a/Source/WebKit/chromium/src/WrappedResourceRequest.h b/Source/WebKit/chromium/src/WrappedResourceRequest.h
deleted file mode 100644
index 3de31a21c..000000000
--- a/Source/WebKit/chromium/src/WrappedResourceRequest.h
+++ /dev/null
@@ -1,80 +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 WrappedResourceRequest_h
-#define WrappedResourceRequest_h
-
-#include "platform/WebURLRequest.h"
-#include "WebURLRequestPrivate.h"
-
-namespace WebKit {
-
-class WrappedResourceRequest : public WebURLRequest {
-public:
- ~WrappedResourceRequest()
- {
- reset(); // Need to drop reference to m_handle
- }
-
- WrappedResourceRequest() { }
-
- WrappedResourceRequest(WebCore::ResourceRequest& resourceRequest)
- {
- bind(resourceRequest);
- }
-
- WrappedResourceRequest(const WebCore::ResourceRequest& resourceRequest)
- {
- bind(resourceRequest);
- }
-
- void bind(WebCore::ResourceRequest& resourceRequest)
- {
- m_handle.m_resourceRequest = &resourceRequest;
- assign(&m_handle);
- }
-
- void bind(const WebCore::ResourceRequest& resourceRequest)
- {
- bind(*const_cast<WebCore::ResourceRequest*>(&resourceRequest));
- }
-
-private:
- class Handle : public WebURLRequestPrivate {
- public:
- virtual void dispose() { m_resourceRequest = 0; }
- };
-
- Handle m_handle;
-};
-
-} // namespace WebKit
-
-#endif
diff --git a/Source/WebKit/chromium/src/WrappedResourceResponse.h b/Source/WebKit/chromium/src/WrappedResourceResponse.h
deleted file mode 100644
index 088f87c4b..000000000
--- a/Source/WebKit/chromium/src/WrappedResourceResponse.h
+++ /dev/null
@@ -1,80 +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 WrappedResourceResponse_h
-#define WrappedResourceResponse_h
-
-#include "platform/WebURLResponse.h"
-#include "WebURLResponsePrivate.h"
-
-namespace WebKit {
-
-class WrappedResourceResponse : public WebURLResponse {
-public:
- ~WrappedResourceResponse()
- {
- reset(); // Need to drop reference to m_handle
- }
-
- WrappedResourceResponse() { }
-
- WrappedResourceResponse(WebCore::ResourceResponse& resourceResponse)
- {
- bind(resourceResponse);
- }
-
- WrappedResourceResponse(const WebCore::ResourceResponse& resourceResponse)
- {
- bind(resourceResponse);
- }
-
- void bind(WebCore::ResourceResponse& resourceResponse)
- {
- m_handle.m_resourceResponse = &resourceResponse;
- assign(&m_handle);
- }
-
- void bind(const WebCore::ResourceResponse& resourceResponse)
- {
- bind(*const_cast<WebCore::ResourceResponse*>(&resourceResponse));
- }
-
-private:
- class Handle : public WebURLResponsePrivate {
- public:
- virtual void dispose() { m_resourceResponse = 0; }
- };
-
- Handle m_handle;
-};
-
-} // namespace WebKit
-
-#endif
diff --git a/Source/WebKit/chromium/src/android/WebInputEventFactory.cpp b/Source/WebKit/chromium/src/android/WebInputEventFactory.cpp
index 18e14bfb4..13166f344 100644
--- a/Source/WebKit/chromium/src/android/WebInputEventFactory.cpp
+++ b/Source/WebKit/chromium/src/android/WebInputEventFactory.cpp
@@ -70,6 +70,8 @@ WebMouseEvent WebInputEventFactory::mouseEvent(int x, int y,
int windowX, int windowY,
MouseEventType type,
double timeStampSeconds,
+ int modifiers,
+ int clickCount,
WebMouseEvent::Button button)
{
WebMouseEvent result;
@@ -82,7 +84,8 @@ WebMouseEvent WebInputEventFactory::mouseEvent(int x, int y,
result.globalX = windowX;
result.globalY = windowY;
result.timeStampSeconds = timeStampSeconds;
- result.clickCount = 1;
+ result.clickCount = clickCount;
+ result.modifiers = modifiers;
switch (type) {
case MouseEventTypeDown:
diff --git a/Source/WebKit/chromium/src/js/Tests.js b/Source/WebKit/chromium/src/js/Tests.js
index b8dc8de50..8c7e26ab4 100644
--- a/Source/WebKit/chromium/src/js/Tests.js
+++ b/Source/WebKit/chromium/src/js/Tests.js
@@ -404,7 +404,7 @@ TestSuite.prototype.testNetworkSize = function()
test.releaseControl();
}
- this.addSniffer(WebInspector.NetworkDispatcher.prototype, "_finishResource", finishResource);
+ this.addSniffer(WebInspector.NetworkDispatcher.prototype, "_finishNetworkRequest", finishResource);
// Reload inspected page to sniff network events
test.evaluateInConsole_("window.location.reload(true);", function(resultText) {});
@@ -427,7 +427,7 @@ TestSuite.prototype.testNetworkSyncSize = function()
test.releaseControl();
}
- this.addSniffer(WebInspector.NetworkDispatcher.prototype, "_finishResource", finishResource);
+ this.addSniffer(WebInspector.NetworkDispatcher.prototype, "_finishNetworkRequest", finishResource);
// Send synchronous XHR to sniff network events
test.evaluateInConsole_("var xhr = new XMLHttpRequest(); xhr.open(\"GET\", \"chunked\", false); xhr.send(null);", function() {});
@@ -451,7 +451,7 @@ TestSuite.prototype.testNetworkRawHeadersText = function()
test.releaseControl();
}
- this.addSniffer(WebInspector.NetworkDispatcher.prototype, "_finishResource", finishResource);
+ this.addSniffer(WebInspector.NetworkDispatcher.prototype, "_finishNetworkRequest", finishResource);
// Reload inspected page to sniff network events
test.evaluateInConsole_("window.location.reload(true);", function(resultText) {});
@@ -485,7 +485,7 @@ TestSuite.prototype.testNetworkTiming = function()
test.releaseControl();
}
- this.addSniffer(WebInspector.NetworkDispatcher.prototype, "_finishResource", finishResource);
+ this.addSniffer(WebInspector.NetworkDispatcher.prototype, "_finishNetworkRequest", finishResource);
// Reload inspected page to sniff network events
test.evaluateInConsole_("window.location.reload(true);", function(resultText) {});
@@ -688,7 +688,7 @@ TestSuite.prototype._scriptsAreParsed = function(expected)
var missing = expected.slice(0);
for (var i = 0; i < uiSourceCodes.length; ++i) {
for (var j = 0; j < missing.length; ++j) {
- if (uiSourceCodes[i].fileName.search(missing[j]) !== -1) {
+ if (uiSourceCodes[i].parsedURL.lastPathComponent.search(missing[j]) !== -1) {
missing.splice(j, 1);
break;
}
diff --git a/Source/WebKit/chromium/src/painting/PaintAggregator.cpp b/Source/WebKit/chromium/src/painting/PaintAggregator.cpp
index 2f7e4c73c..a373342ca 100644
--- a/Source/WebKit/chromium/src/painting/PaintAggregator.cpp
+++ b/Source/WebKit/chromium/src/painting/PaintAggregator.cpp
@@ -238,7 +238,7 @@ void PaintAggregator::invalidateRect(const IntRect& rect)
// with all existing paints, which means that tracking the size of
// paintRects at the time when popPendingUpdate() is called may mask
// certain performance problems.
- webKitPlatformSupport()->histogramCustomCounts("MPArch.RW_IntermediatePaintRectCount",
+ WebKit::Platform::current()->histogramCustomCounts("MPArch.RW_IntermediatePaintRectCount",
m_update.paintRects.size(), 1, 100, 50);
}
diff --git a/Source/WebKit/chromium/tests/AssociatedURLLoaderTest.cpp b/Source/WebKit/chromium/tests/AssociatedURLLoaderTest.cpp
index a168ebca9..bdf3a3ab4 100644
--- a/Source/WebKit/chromium/tests/AssociatedURLLoaderTest.cpp
+++ b/Source/WebKit/chromium/tests/AssociatedURLLoaderTest.cpp
@@ -432,9 +432,40 @@ TEST_F(AssociatedURLLoaderTest, RedirectSuccess)
EXPECT_TRUE(m_didFinishLoading);
}
-// Test a successful redirect and cross-origin load using CORS.
-// FIXME: Enable this when DocumentThreadableLoader supports cross-origin redirects.
-TEST_F(AssociatedURLLoaderTest, DISABLED_RedirectCrossOriginWithAccessControlSuccess)
+// Test that a cross origin redirect response without CORS headers fails.
+TEST_F(AssociatedURLLoaderTest, RedirectCrossOriginWithAccessControlFailure)
+{
+ GURL url = GURL("http://www.test.com/RedirectCrossOriginWithAccessControlFailure.html");
+ char redirect[] = "http://www.other.com/RedirectCrossOriginWithAccessControlFailure.html"; // Cross-origin
+ GURL redirectURL = GURL(redirect);
+
+ WebURLRequest request;
+ request.initialize();
+ request.setURL(url);
+
+ // Create a redirect response without CORS headers.
+ m_expectedRedirectResponse = WebURLResponse();
+ m_expectedRedirectResponse.initialize();
+ m_expectedRedirectResponse.setMIMEType("text/html");
+ m_expectedRedirectResponse.setHTTPStatusCode(301);
+ m_expectedRedirectResponse.setHTTPHeaderField("Location", redirect);
+ webkit_support::RegisterMockedURL(url, m_expectedRedirectResponse, m_frameFilePath);
+
+ WebURLLoaderOptions options;
+ options.crossOriginRequestPolicy = WebURLLoaderOptions::CrossOriginRequestPolicyUseAccessControl;
+ m_expectedLoader = createAssociatedURLLoader(options);
+ EXPECT_TRUE(m_expectedLoader);
+ m_expectedLoader->loadAsynchronously(request, this);
+ serveRequests();
+ // We should not receive a notification for the redirect or any response.
+ EXPECT_FALSE(m_willSendRequest);
+ EXPECT_FALSE(m_didReceiveResponse);
+ EXPECT_FALSE(m_didReceiveData);
+ EXPECT_FALSE(m_didFail);
+}
+
+// Test that a cross origin redirect response with CORS headers that allow the requesting origin succeeds.
+TEST_F(AssociatedURLLoaderTest, RedirectCrossOriginWithAccessControlSuccess)
{
GURL url = GURL("http://www.test.com/RedirectCrossOriginWithAccessControlSuccess.html");
char redirect[] = "http://www.other.com/RedirectCrossOriginWithAccessControlSuccess.html"; // Cross-origin
@@ -444,11 +475,13 @@ TEST_F(AssociatedURLLoaderTest, DISABLED_RedirectCrossOriginWithAccessControlSuc
request.initialize();
request.setURL(url);
+ // Create a redirect response that allows the redirect to pass the access control checks.
m_expectedRedirectResponse = WebURLResponse();
m_expectedRedirectResponse.initialize();
m_expectedRedirectResponse.setMIMEType("text/html");
m_expectedRedirectResponse.setHTTPStatusCode(301);
m_expectedRedirectResponse.setHTTPHeaderField("Location", redirect);
+ m_expectedRedirectResponse.addHTTPHeaderField("access-control-allow-origin", "*");
webkit_support::RegisterMockedURL(url, m_expectedRedirectResponse, m_frameFilePath);
m_expectedNewRequest = WebURLRequest();
@@ -467,7 +500,8 @@ TEST_F(AssociatedURLLoaderTest, DISABLED_RedirectCrossOriginWithAccessControlSuc
EXPECT_TRUE(m_expectedLoader);
m_expectedLoader->loadAsynchronously(request, this);
serveRequests();
- EXPECT_TRUE(m_willSendRequest);
+ // We should not receive a notification for the redirect.
+ EXPECT_FALSE(m_willSendRequest);
EXPECT_TRUE(m_didReceiveResponse);
EXPECT_TRUE(m_didReceiveData);
EXPECT_TRUE(m_didFinishLoading);
diff --git a/Source/WebKit/chromium/tests/CCActiveAnimationTest.cpp b/Source/WebKit/chromium/tests/CCActiveAnimationTest.cpp
index e14ef9bc0..a1ab770b7 100644
--- a/Source/WebKit/chromium/tests/CCActiveAnimationTest.cpp
+++ b/Source/WebKit/chromium/tests/CCActiveAnimationTest.cpp
@@ -80,6 +80,17 @@ TEST(CCActiveAnimationTest, TrimTimeStartTime)
EXPECT_EQ(1, anim->trimTimeToCurrentIteration(6));
}
+TEST(CCActiveAnimationTest, TrimTimeTimeOffset)
+{
+ OwnPtr<CCActiveAnimation> anim(createActiveAnimation(1));
+ anim->setTimeOffset(4);
+ anim->setStartTime(4);
+ EXPECT_EQ(0, anim->trimTimeToCurrentIteration(0));
+ EXPECT_EQ(0.5, anim->trimTimeToCurrentIteration(0.5));
+ EXPECT_EQ(1, anim->trimTimeToCurrentIteration(1));
+ EXPECT_EQ(1, anim->trimTimeToCurrentIteration(1));
+}
+
TEST(CCActiveAnimationTest, TrimTimePauseResume)
{
OwnPtr<CCActiveAnimation> anim(createActiveAnimation(1));
@@ -93,6 +104,19 @@ TEST(CCActiveAnimationTest, TrimTimePauseResume)
EXPECT_EQ(1, anim->trimTimeToCurrentIteration(1024.5));
}
+TEST(CCActiveAnimationTest, TrimTimeSuspendResume)
+{
+ OwnPtr<CCActiveAnimation> anim(createActiveAnimation(1));
+ anim->setRunState(CCActiveAnimation::Running, 0);
+ EXPECT_EQ(0, anim->trimTimeToCurrentIteration(0));
+ EXPECT_EQ(0.5, anim->trimTimeToCurrentIteration(0.5));
+ anim->suspend(0.5);
+ EXPECT_EQ(0.5, anim->trimTimeToCurrentIteration(1024));
+ anim->resume(1024);
+ EXPECT_EQ(0.5, anim->trimTimeToCurrentIteration(1024));
+ EXPECT_EQ(1, anim->trimTimeToCurrentIteration(1024.5));
+}
+
TEST(CCActiveAnimationTest, IsFinishedAtZeroIterations)
{
OwnPtr<CCActiveAnimation> anim(createActiveAnimation(0));
@@ -160,4 +184,35 @@ TEST(CCActiveAnimationTest, IsFinished)
EXPECT_TRUE(anim->isFinished());
}
+TEST(CCActiveAnimationTest, IsFinishedNeedsSynchronizedStartTime)
+{
+ OwnPtr<CCActiveAnimation> anim(createActiveAnimation(1));
+ anim->setRunState(CCActiveAnimation::Running, 2);
+ EXPECT_FALSE(anim->isFinished());
+ anim->setRunState(CCActiveAnimation::Paused, 2);
+ EXPECT_FALSE(anim->isFinished());
+ anim->setRunState(CCActiveAnimation::WaitingForNextTick, 2);
+ EXPECT_FALSE(anim->isFinished());
+ anim->setRunState(CCActiveAnimation::WaitingForTargetAvailability, 2);
+ EXPECT_FALSE(anim->isFinished());
+ anim->setRunState(CCActiveAnimation::WaitingForStartTime, 2);
+ EXPECT_FALSE(anim->isFinished());
+ anim->setRunState(CCActiveAnimation::Finished, 0);
+ EXPECT_TRUE(anim->isFinished());
+ anim->setRunState(CCActiveAnimation::Aborted, 0);
+ EXPECT_TRUE(anim->isFinished());
+}
+
+TEST(CCActiveAnimationTest, RunStateChangesIgnoredWhileSuspended)
+{
+ OwnPtr<CCActiveAnimation> anim(createActiveAnimation(1));
+ anim->suspend(0);
+ EXPECT_EQ(CCActiveAnimation::Paused, anim->runState());
+ anim->setRunState(CCActiveAnimation::Running, 0);
+ EXPECT_EQ(CCActiveAnimation::Paused, anim->runState());
+ anim->resume(0);
+ anim->setRunState(CCActiveAnimation::Running, 0);
+ EXPECT_EQ(CCActiveAnimation::Running, anim->runState());
+}
+
} // namespace
diff --git a/Source/WebKit/chromium/tests/CCAnimationTestCommon.cpp b/Source/WebKit/chromium/tests/CCAnimationTestCommon.cpp
index c9240e31f..36f79818e 100644
--- a/Source/WebKit/chromium/tests/CCAnimationTestCommon.cpp
+++ b/Source/WebKit/chromium/tests/CCAnimationTestCommon.cpp
@@ -28,14 +28,16 @@
#include "GraphicsLayer.h"
#include "LayerChromium.h"
+#include "TranslateTransformOperation.h"
#include "cc/CCLayerAnimationController.h"
+#include "cc/CCLayerImpl.h"
using namespace WebCore;
namespace {
template <class Target>
-void addOpacityTransition(Target& target, double duration, float startOpacity, float endOpacity)
+void addOpacityTransition(Target& target, double duration, float startOpacity, float endOpacity, bool useTimingFunction)
{
WebCore::KeyframeValueList values(AnimatedPropertyOpacity);
if (duration > 0)
@@ -45,11 +47,32 @@ void addOpacityTransition(Target& target, double duration, float startOpacity, f
RefPtr<Animation> animation = Animation::create();
animation->setDuration(duration);
+ if (useTimingFunction)
+ animation->setTimingFunction(LinearTimingFunction::create());
+
IntSize boxSize;
target.addAnimation(values, boxSize, animation.get(), 0, 0, 0);
}
+template <class Target>
+void addAnimatedTransform(Target& target, double duration, int deltaX, int deltaY)
+{
+ static int id = 0;
+ WebCore::KeyframeValueList values(AnimatedPropertyWebkitTransform);
+
+ TransformOperations operations;
+ operations.operations().append(TranslateTransformOperation::create(Length(deltaX, WebCore::Fixed), Length(deltaY, WebCore::Fixed), TransformOperation::TRANSLATE_X));
+ values.insert(new TransformAnimationValue(0, &operations));
+
+ RefPtr<Animation> animation = Animation::create();
+ animation->setDuration(duration);
+
+ IntSize boxSize;
+
+ target.addAnimation(values, boxSize, animation.get(), ++id, 0, 0);
+}
+
} // namespace
namespace WebKitTests {
@@ -106,12 +129,12 @@ float FakeFloatTransition::getValue(double time) const
return (1 - time) * m_from + time * m_to;
}
-FakeLayerAnimationControllerImplClient::FakeLayerAnimationControllerImplClient()
+FakeLayerAnimationControllerClient::FakeLayerAnimationControllerClient()
: m_opacity(0)
{
}
-FakeLayerAnimationControllerImplClient::~FakeLayerAnimationControllerImplClient()
+FakeLayerAnimationControllerClient::~FakeLayerAnimationControllerClient()
{
}
@@ -120,14 +143,34 @@ PassOwnPtr<WebCore::CCAnimationCurve> FakeFloatTransition::clone() const
return adoptPtr(new FakeFloatTransition(*this));
}
-void addOpacityTransitionToController(WebCore::CCLayerAnimationController& controller, double duration, float startOpacity, float endOpacity)
+void addOpacityTransitionToController(WebCore::CCLayerAnimationController& controller, double duration, float startOpacity, float endOpacity, bool useTimingFunction)
+{
+ addOpacityTransition(controller, duration, startOpacity, endOpacity, useTimingFunction);
+}
+
+void addAnimatedTransformToController(WebCore::CCLayerAnimationController& controller, double duration, int deltaX, int deltaY)
+{
+ addAnimatedTransform(controller, duration, deltaX, deltaY);
+}
+
+void addOpacityTransitionToLayer(WebCore::LayerChromium& layer, double duration, float startOpacity, float endOpacity, bool useTimingFunction)
+{
+ addOpacityTransition(layer, duration, startOpacity, endOpacity, useTimingFunction);
+}
+
+void addOpacityTransitionToLayer(WebCore::CCLayerImpl& layer, double duration, float startOpacity, float endOpacity, bool useTimingFunction)
+{
+ addOpacityTransition(*layer.layerAnimationController(), duration, startOpacity, endOpacity, useTimingFunction);
+}
+
+void addAnimatedTransformToLayer(WebCore::LayerChromium& layer, double duration, int deltaX, int deltaY)
{
- addOpacityTransition(controller, duration, startOpacity, endOpacity);
+ addAnimatedTransform(layer, duration, deltaX, deltaY);
}
-void addOpacityTransitionToLayer(WebCore::LayerChromium& layer, double duration, float startOpacity, float endOpacity)
+void addAnimatedTransformToLayer(WebCore::CCLayerImpl& layer, double duration, int deltaX, int deltaY)
{
- addOpacityTransition(layer, duration, startOpacity, endOpacity);
+ addAnimatedTransform(*layer.layerAnimationController(), duration, deltaX, deltaY);
}
} // namespace WebKitTests
diff --git a/Source/WebKit/chromium/tests/CCAnimationTestCommon.h b/Source/WebKit/chromium/tests/CCAnimationTestCommon.h
index d13e74ca1..776b75c8d 100644
--- a/Source/WebKit/chromium/tests/CCAnimationTestCommon.h
+++ b/Source/WebKit/chromium/tests/CCAnimationTestCommon.h
@@ -26,12 +26,12 @@
#define CCAnimationTestCommon_h
#include "cc/CCAnimationCurve.h"
-#include "cc/CCLayerAnimationControllerImpl.h"
+#include "cc/CCLayerAnimationController.h"
#include <wtf/OwnPtr.h>
namespace WebCore {
-class CCLayerAnimationController;
+class CCLayerImpl;
class LayerChromium;
}
@@ -42,9 +42,9 @@ public:
FakeFloatAnimationCurve();
virtual ~FakeFloatAnimationCurve();
- virtual double duration() const { return 1; }
- virtual float getValue(double now) const { return 0; }
- virtual PassOwnPtr<WebCore::CCAnimationCurve> clone() const;
+ virtual double duration() const OVERRIDE { return 1; }
+ virtual float getValue(double now) const OVERRIDE { return 0; }
+ virtual PassOwnPtr<WebCore::CCAnimationCurve> clone() const OVERRIDE;
};
class FakeTransformTransition : public WebCore::CCTransformAnimationCurve {
@@ -52,10 +52,10 @@ public:
FakeTransformTransition(double duration);
virtual ~FakeTransformTransition();
- virtual double duration() const { return m_duration; }
- virtual WebCore::TransformationMatrix getValue(double time, const WebCore::IntSize&) const;
+ virtual double duration() const OVERRIDE { return m_duration; }
+ virtual WebCore::TransformationMatrix getValue(double time, const WebCore::IntSize&) const OVERRIDE;
- virtual PassOwnPtr<WebCore::CCAnimationCurve> clone() const;
+ virtual PassOwnPtr<WebCore::CCAnimationCurve> clone() const OVERRIDE;
private:
double m_duration;
@@ -66,10 +66,10 @@ public:
FakeFloatTransition(double duration, float from, float to);
virtual ~FakeFloatTransition();
- virtual double duration() const { return m_duration; }
- virtual float getValue(double time) const;
+ virtual double duration() const OVERRIDE { return m_duration; }
+ virtual float getValue(double time) const OVERRIDE;
- virtual PassOwnPtr<WebCore::CCAnimationCurve> clone() const;
+ virtual PassOwnPtr<WebCore::CCAnimationCurve> clone() const OVERRIDE;
private:
double m_duration;
@@ -77,17 +77,18 @@ private:
float m_to;
};
-class FakeLayerAnimationControllerImplClient : public WebCore::CCLayerAnimationControllerImplClient {
+class FakeLayerAnimationControllerClient : public WebCore::CCLayerAnimationControllerClient {
public:
- FakeLayerAnimationControllerImplClient();
- virtual ~FakeLayerAnimationControllerImplClient();
+ FakeLayerAnimationControllerClient();
+ virtual ~FakeLayerAnimationControllerClient();
- virtual int id() const { return 0; }
- virtual float opacity() const { return m_opacity; }
- virtual void setOpacity(float opacity) { m_opacity = opacity; }
- virtual const WebCore::TransformationMatrix& transform() const { return m_transform; }
- virtual void setTransform(const WebCore::TransformationMatrix& transform) { m_transform = transform; }
- virtual const WebCore::IntSize& bounds() const { return m_bounds; }
+ // CCLayerAnimationControllerClient implementation
+ virtual int id() const OVERRIDE { return 0; }
+ virtual void setOpacityFromAnimation(float opacity) OVERRIDE { m_opacity = opacity; }
+ virtual float opacity() const OVERRIDE { return m_opacity; }
+ virtual void setTransformFromAnimation(const WebCore::TransformationMatrix& transform) OVERRIDE { m_transform = transform; }
+ virtual const WebCore::TransformationMatrix& transform() const OVERRIDE { return m_transform; }
+ virtual const WebCore::IntSize& bounds() const OVERRIDE { return m_bounds; }
private:
float m_opacity;
@@ -95,9 +96,14 @@ private:
WebCore::IntSize m_bounds;
};
-void addOpacityTransitionToController(WebCore::CCLayerAnimationController&, double duration, float startOpacity, float endOpacity);
+void addOpacityTransitionToController(WebCore::CCLayerAnimationController&, double duration, float startOpacity, float endOpacity, bool useTimingFunction);
+void addAnimatedTransformToController(WebCore::CCLayerAnimationController&, double duration, int deltaX, int deltaY);
-void addOpacityTransitionToLayer(WebCore::LayerChromium&, double duration, float startOpacity, float endOpacity);
+void addOpacityTransitionToLayer(WebCore::LayerChromium&, double duration, float startOpacity, float endOpacity, bool useTimingFunction);
+void addOpacityTransitionToLayer(WebCore::CCLayerImpl&, double duration, float startOpacity, float endOpacity, bool useTimingFunction);
+
+void addAnimatedTransformToLayer(WebCore::LayerChromium&, double duration, int deltaX, int deltaY);
+void addAnimatedTransformToLayer(WebCore::CCLayerImpl&, double duration, int deltaX, int deltaY);
} // namespace WebKitTests
diff --git a/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp b/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp
index 74d635b40..11a88784b 100644
--- a/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp
+++ b/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp
@@ -30,6 +30,7 @@
#include "cc/CCLayerImpl.h"
#include "cc/CCLayerSorter.h"
#include "cc/CCLayerTreeHostCommon.h"
+#include "cc/CCMathUtil.h"
#include "cc/CCSingleThreadProxy.h"
#include <gtest/gtest.h>
@@ -70,7 +71,7 @@ void emulateDrawingOneFrame(CCLayerImpl* root)
// Iterate back-to-front, so that damage correctly propagates from descendant surfaces to ancestors.
for (int i = renderSurfaceLayerList.size() - 1; i >= 0; --i) {
CCRenderSurface* targetSurface = renderSurfaceLayerList[i]->renderSurface();
- targetSurface->damageTracker()->updateDamageTrackingState(targetSurface->layerList(), targetSurface->owningLayerId(), renderSurfaceLayerList[i]->maskLayer());
+ targetSurface->damageTracker()->updateDamageTrackingState(targetSurface->layerList(), targetSurface->owningLayerId(), targetSurface->surfacePropertyChangedOnlyFromDescendant(), targetSurface->contentRect(), renderSurfaceLayerList[i]->maskLayer(), renderSurfaceLayerList[i]->filters());
}
root->resetAllChangeTrackingForSubtree();
@@ -180,7 +181,7 @@ TEST_F(CCDamageTrackerTest, sanityCheckTestTreeWithOneSurface)
OwnPtr<CCLayerImpl> root = createAndSetUpTestTreeWithOneSurface();
- EXPECT_EQ(static_cast<size_t>(2), root->renderSurface()->layerList().size());
+ EXPECT_EQ(2u, root->renderSurface()->layerList().size());
EXPECT_EQ(1, root->renderSurface()->layerList()[0]->id());
EXPECT_EQ(2, root->renderSurface()->layerList()[1]->id());
@@ -202,8 +203,8 @@ TEST_F(CCDamageTrackerTest, sanityCheckTestTreeWithTwoSurfaces)
ASSERT_TRUE(child1->renderSurface());
EXPECT_FALSE(child2->renderSurface());
- EXPECT_EQ(static_cast<size_t>(3), root->renderSurface()->layerList().size());
- EXPECT_EQ(static_cast<size_t>(2), child1->renderSurface()->layerList().size());
+ EXPECT_EQ(3u, root->renderSurface()->layerList().size());
+ EXPECT_EQ(2u, child1->renderSurface()->layerList().size());
// The render surface for child1 only has a contentRect that encloses grandChild1 and grandChild2, because child1 does not draw content.
EXPECT_FLOAT_RECT_EQ(FloatRect(190, 190, 16, 18), childDamageRect);
@@ -254,7 +255,7 @@ TEST_F(CCDamageTrackerTest, verifyDamageForPropertyChanges)
// Sanity check - we should not have accidentally created a separate render surface for the translucent layer.
ASSERT_FALSE(child->renderSurface());
- ASSERT_EQ(static_cast<size_t>(2), root->renderSurface()->layerList().size());
+ ASSERT_EQ(2u, root->renderSurface()->layerList().size());
// Damage should be the entire child layer in targetSurface space.
FloatRect expectedRect = FloatRect(100, 100, 30, 30);
@@ -315,6 +316,146 @@ TEST_F(CCDamageTrackerTest, verifyDamageForTransformedLayer)
EXPECT_FLOAT_RECT_EQ(expectedRect, rootDamageRect);
}
+TEST_F(CCDamageTrackerTest, verifyDamageForPerspectiveClippedLayer)
+{
+ // If a layer has a perspective transform that causes w < 0, then not clipping the
+ // layer can cause an invalid damage rect. This test checks that the w < 0 case is
+ // tracked properly.
+ //
+ // The transform is constructed so that if w < 0 clipping is not performed, the
+ // incorrect rect will be very small, specifically: position (-3.153448, -2.750628) and size 8.548689 x 5.661383.
+ // Instead, the correctly transformed rect should actually be very huge (i.e. in theory, infinite)
+
+ OwnPtr<CCLayerImpl> root = createAndSetUpTestTreeWithOneSurface();
+ CCLayerImpl* child = root->children()[0].get();
+
+ TransformationMatrix transform;
+ transform.applyPerspective(1);
+ transform.translate3d(-150, -50, 0);
+ transform.rotate3d(0, 45, 0);
+ transform.translate3d(-50, -50, 0);
+
+ // Set up the child
+ child->setPosition(FloatPoint(0, 0));
+ child->setBounds(IntSize(100, 100));
+ child->setTransform(transform);
+ emulateDrawingOneFrame(root.get());
+
+ // Sanity check that the child layer's bounds would actually get clipped by w < 0,
+ // otherwise this test is not actually testing the intended scenario.
+ FloatQuad testQuad(FloatRect(FloatPoint::zero(), FloatSize(100, 100)));
+ bool clipped = false;
+ CCMathUtil::mapQuad(transform, testQuad, clipped);
+ EXPECT_TRUE(clipped);
+
+ // Damage the child without moving it.
+ child->setOpacity(0.5);
+ emulateDrawingOneFrame(root.get());
+
+ // The expected damage should cover the entire root surface (500x500), but we don't
+ // care whether the damage rect was clamped or is larger than the surface for this test.
+ FloatRect rootDamageRect = root->renderSurface()->damageTracker()->currentDamageRect();
+ EXPECT_GE(rootDamageRect.width(), 500);
+ EXPECT_GE(rootDamageRect.height(), 500);
+}
+
+TEST_F(CCDamageTrackerTest, verifyDamageForBlurredSurface)
+{
+ OwnPtr<CCLayerImpl> root = createAndSetUpTestTreeWithOneSurface();
+ CCLayerImpl* child = root->children()[0].get();
+
+ FilterOperations filters;
+ filters.operations().append(BlurFilterOperation::create(Length(5, WebCore::Fixed), FilterOperation::BLUR));
+ int outsetTop, outsetRight, outsetBottom, outsetLeft;
+ filters.getOutsets(outsetTop, outsetRight, outsetBottom, outsetLeft);
+ root->setFilters(filters);
+
+ // Setting the filter will damage the whole surface.
+ emulateDrawingOneFrame(root.get());
+
+ // Setting the update rect should cause the corresponding damage to the surface, blurred based on the size of the blur filter.
+ child->setUpdateRect(FloatRect(10, 11, 12, 13));
+ emulateDrawingOneFrame(root.get());
+
+ // Damage position on the surface should be: position of updateRect (10, 11) relative to the child (100, 100), but expanded by the blur outsets.
+ FloatRect rootDamageRect = root->renderSurface()->damageTracker()->currentDamageRect();
+ FloatRect expectedDamageRect = FloatRect(110, 111, 12, 13);
+ expectedDamageRect.move(-outsetLeft, -outsetTop);
+ expectedDamageRect.expand(outsetLeft + outsetRight, outsetTop + outsetBottom);
+ EXPECT_FLOAT_RECT_EQ(expectedDamageRect, rootDamageRect);
+}
+
+TEST_F(CCDamageTrackerTest, verifyDamageForBackgroundBlurredChild)
+{
+ OwnPtr<CCLayerImpl> root = createAndSetUpTestTreeWithTwoSurfaces();
+ CCLayerImpl* child1 = root->children()[0].get();
+ CCLayerImpl* child2 = root->children()[1].get();
+
+ FilterOperations filters;
+ filters.operations().append(BlurFilterOperation::create(Length(2, WebCore::Fixed), FilterOperation::BLUR));
+ int outsetTop, outsetRight, outsetBottom, outsetLeft;
+ filters.getOutsets(outsetTop, outsetRight, outsetBottom, outsetLeft);
+ child1->setBackgroundFilters(filters);
+
+ // Setting the filter will damage the whole surface.
+ emulateDrawingOneFrame(root.get());
+
+ // CASE 1: Setting the update rect should cause the corresponding damage to
+ // the surface, blurred based on the size of the child's background blur
+ // filter.
+ root->setUpdateRect(FloatRect(297, 297, 2, 2));
+
+ emulateDrawingOneFrame(root.get());
+
+ FloatRect rootDamageRect = root->renderSurface()->damageTracker()->currentDamageRect();
+ // Damage position on the surface should be a composition of the damage on the root and on child2.
+ // Damage on the root should be: position of updateRect (297, 297), but expanded by the blur outsets.
+ FloatRect expectedDamageRect = FloatRect(297, 297, 2, 2);
+ expectedDamageRect.move(-outsetLeft, -outsetTop);
+ expectedDamageRect.expand(outsetLeft + outsetRight, outsetTop + outsetBottom);
+ EXPECT_FLOAT_RECT_EQ(expectedDamageRect, rootDamageRect);
+
+ // CASE 2: Setting the update rect should cause the corresponding damage to
+ // the surface, blurred based on the size of the child's background blur
+ // filter. Since the damage extends to the right/bottom outside of the
+ // blurred layer, only the left/top should end up expanded.
+ root->setUpdateRect(FloatRect(297, 297, 30, 30));
+
+ emulateDrawingOneFrame(root.get());
+
+ rootDamageRect = root->renderSurface()->damageTracker()->currentDamageRect();
+ // Damage position on the surface should be a composition of the damage on the root and on child2.
+ // Damage on the root should be: position of updateRect (297, 297), but expanded on the left/top
+ // by the blur outsets.
+ expectedDamageRect = FloatRect(297, 297, 30, 30);
+ expectedDamageRect.move(-outsetLeft, -outsetTop);
+ expectedDamageRect.expand(outsetLeft, outsetTop);
+ EXPECT_FLOAT_RECT_EQ(expectedDamageRect, rootDamageRect);
+
+ // CASE 3: Setting this update rect outside the contentBounds of the blurred
+ // child1 will not cause it to be expanded.
+ root->setUpdateRect(FloatRect(30, 30, 2, 2));
+
+ emulateDrawingOneFrame(root.get());
+
+ rootDamageRect = root->renderSurface()->damageTracker()->currentDamageRect();
+ // Damage on the root should be: position of updateRect (30, 30), not
+ // expanded.
+ expectedDamageRect = FloatRect(30, 30, 2, 2);
+ EXPECT_FLOAT_RECT_EQ(expectedDamageRect, rootDamageRect);
+
+ // CASE 4: Setting the update rect on child2, which is above child1, will
+ // not get blurred by child1, so it does not need to get expanded.
+ child2->setUpdateRect(FloatRect(0, 0, 1, 1));
+
+ emulateDrawingOneFrame(root.get());
+
+ rootDamageRect = root->renderSurface()->damageTracker()->currentDamageRect();
+ // Damage on child2 should be: position of updateRect offset by the child's position (11, 11), and not expanded by anything.
+ expectedDamageRect = FloatRect(11, 11, 1, 1);
+ EXPECT_FLOAT_RECT_EQ(expectedDamageRect, rootDamageRect);
+}
+
TEST_F(CCDamageTrackerTest, verifyDamageForAddingAndRemovingLayer)
{
OwnPtr<CCLayerImpl> root = createAndSetUpTestTreeWithOneSurface();
@@ -334,7 +475,7 @@ TEST_F(CCDamageTrackerTest, verifyDamageForAddingAndRemovingLayer)
emulateDrawingOneFrame(root.get());
// Sanity check - all 3 layers should be on the same render surface; render surfaces are tested elsewhere.
- ASSERT_EQ(static_cast<size_t>(3), root->renderSurface()->layerList().size());
+ ASSERT_EQ(3u, root->renderSurface()->layerList().size());
FloatRect rootDamageRect = root->renderSurface()->damageTracker()->currentDamageRect();
EXPECT_FLOAT_RECT_EQ(FloatRect(400, 380, 6, 8), rootDamageRect);
@@ -353,6 +494,36 @@ TEST_F(CCDamageTrackerTest, verifyDamageForAddingAndRemovingLayer)
EXPECT_FLOAT_RECT_EQ(FloatRect(100, 100, 30, 30), rootDamageRect);
}
+TEST_F(CCDamageTrackerTest, verifyDamageForNewUnchangedLayer)
+{
+ // If child2 is added to the layer tree, but it doesn't have any explicit damage of
+ // its own, it should still indeed damage the target surface.
+
+ OwnPtr<CCLayerImpl> root = createAndSetUpTestTreeWithOneSurface();
+
+ {
+ OwnPtr<CCLayerImpl> child2 = CCLayerImpl::create(3);
+ child2->setPosition(FloatPoint(400, 380));
+ child2->setAnchorPoint(FloatPoint::zero());
+ child2->setBounds(IntSize(6, 8));
+ child2->setDrawsContent(true);
+ child2->resetAllChangeTrackingForSubtree();
+ // Sanity check the initial conditions of the test, if these asserts trigger, it
+ // means the test no longer actually covers the intended scenario.
+ ASSERT_FALSE(child2->layerPropertyChanged());
+ ASSERT_TRUE(child2->updateRect().isEmpty());
+ root->addChild(child2.release());
+ }
+
+ emulateDrawingOneFrame(root.get());
+
+ // Sanity check - all 3 layers should be on the same render surface; render surfaces are tested elsewhere.
+ ASSERT_EQ(3u, root->renderSurface()->layerList().size());
+
+ FloatRect rootDamageRect = root->renderSurface()->damageTracker()->currentDamageRect();
+ EXPECT_FLOAT_RECT_EQ(FloatRect(400, 380, 6, 8), rootDamageRect);
+}
+
TEST_F(CCDamageTrackerTest, verifyDamageForMultipleLayers)
{
OwnPtr<CCLayerImpl> root = createAndSetUpTestTreeWithOneSurface();
@@ -402,8 +573,8 @@ TEST_F(CCDamageTrackerTest, verifyDamageForNestedSurfaces)
// CASE 2: Same as previous case, but with additional damage elsewhere that should be properly unioned.
// - child1 surface damage in root surface space: FloatRect(300, 300, 6, 8);
// - child2 damage in root surface space: FloatRect(11, 11, 18, 18);
- grandChild1->setOpacity(0.7);
- child2->setOpacity(0.7);
+ grandChild1->setOpacity(0.7f);
+ child2->setOpacity(0.7f);
emulateDrawingOneFrame(root.get());
childDamageRect = child1->renderSurface()->damageTracker()->currentDamageRect();
rootDamageRect = root->renderSurface()->damageTracker()->currentDamageRect();
@@ -485,7 +656,7 @@ TEST_F(CCDamageTrackerTest, verifyDamageForAddingAndRemovingRenderSurfaces)
// Sanity check that there is only one surface now.
ASSERT_FALSE(child1->renderSurface());
- ASSERT_EQ(static_cast<size_t>(4), root->renderSurface()->layerList().size());
+ ASSERT_EQ(4u, root->renderSurface()->layerList().size());
rootDamageRect = root->renderSurface()->damageTracker()->currentDamageRect();
EXPECT_FLOAT_RECT_EQ(FloatRect(290, 290, 16, 18), rootDamageRect);
@@ -503,8 +674,8 @@ TEST_F(CCDamageTrackerTest, verifyDamageForAddingAndRemovingRenderSurfaces)
// Sanity check that there is a new surface now.
ASSERT_TRUE(child1->renderSurface());
- EXPECT_EQ(static_cast<size_t>(3), root->renderSurface()->layerList().size());
- EXPECT_EQ(static_cast<size_t>(2), child1->renderSurface()->layerList().size());
+ EXPECT_EQ(3u, root->renderSurface()->layerList().size());
+ EXPECT_EQ(2u, child1->renderSurface()->layerList().size());
childDamageRect = child1->renderSurface()->damageTracker()->currentDamageRect();
rootDamageRect = root->renderSurface()->damageTracker()->currentDamageRect();
@@ -746,7 +917,7 @@ TEST_F(CCDamageTrackerTest, verifyDamageForReplicaMask)
ASSERT_TRUE(grandChild1->renderSurface());
// CASE 1: a property change on the mask should damage only the reflected region on the target surface.
- replicaMaskLayer->setOpacity(0.6);
+ replicaMaskLayer->setOpacity(0.6f);
emulateDrawingOneFrame(root.get());
FloatRect grandChildDamageRect = grandChild1->renderSurface()->damageTracker()->currentDamageRect();
@@ -767,7 +938,53 @@ TEST_F(CCDamageTrackerTest, verifyDamageForReplicaMask)
EXPECT_FLOAT_RECT_EQ(FloatRect(194, 200, 6, 8), childDamageRect);
}
-TEST_F(CCDamageTrackerTest, verifyDamageWhenReset)
+TEST_F(CCDamageTrackerTest, verifyDamageForReplicaMaskWithAnchor)
+{
+ OwnPtr<CCLayerImpl> root = createAndSetUpTestTreeWithTwoSurfaces();
+ CCLayerImpl* child1 = root->children()[0].get();
+ CCLayerImpl* grandChild1 = child1->children()[0].get();
+
+ // Verify that the correct replicaOriginTransform is used for the replicaMask; the
+ // incorrect old code incorrectly accounted for the anchor for the replica. A
+ // non-zero anchor point should not affect the replica reflection.
+
+ grandChild1->setAnchorPoint(FloatPoint(1.0, 0.0)); // This is the anchor being tested.
+
+ {
+ OwnPtr<CCLayerImpl> grandChild1Replica = CCLayerImpl::create(6);
+ grandChild1Replica->setPosition(FloatPoint::zero());
+ grandChild1Replica->setAnchorPoint(FloatPoint::zero()); // note, this is not the anchor being tested.
+ TransformationMatrix reflection;
+ reflection.scale3d(-1.0, 1.0, 1.0);
+ grandChild1Replica->setTransform(reflection);
+ grandChild1->setReplicaLayer(grandChild1Replica.release());
+ }
+ CCLayerImpl* grandChild1Replica = grandChild1->replicaLayer();
+
+ // Set up the mask layer on the replica layer
+ {
+ OwnPtr<CCLayerImpl> replicaMaskLayer = CCLayerImpl::create(7);
+ replicaMaskLayer->setPosition(FloatPoint::zero());
+ replicaMaskLayer->setAnchorPoint(FloatPoint::zero()); // note, this is not the anchor being tested.
+ replicaMaskLayer->setBounds(grandChild1->bounds());
+ grandChild1Replica->setMaskLayer(replicaMaskLayer.release());
+ }
+ CCLayerImpl* replicaMaskLayer = grandChild1Replica->maskLayer();
+
+ emulateDrawingOneFrame(root.get());
+
+ // Sanity check that the appropriate render surfaces were created
+ ASSERT_TRUE(grandChild1->renderSurface());
+
+ // A property change on the replicaMask should damage the reflected region on the target surface.
+ replicaMaskLayer->setOpacity(0.6f);
+ emulateDrawingOneFrame(root.get());
+
+ FloatRect childDamageRect = child1->renderSurface()->damageTracker()->currentDamageRect();
+ EXPECT_FLOAT_RECT_EQ(FloatRect(194, 200, 6, 8), childDamageRect);
+}
+
+TEST_F(CCDamageTrackerTest, verifyDamageWhenForcedFullDamage)
{
OwnPtr<CCLayerImpl> root = createAndSetUpTestTreeWithOneSurface();
CCLayerImpl* child = root->children()[0].get();
@@ -790,4 +1007,21 @@ TEST_F(CCDamageTrackerTest, verifyDamageWhenReset)
EXPECT_FLOAT_RECT_EQ(FloatRect(0, 0, 500, 500), rootDamageRect);
}
+TEST_F(CCDamageTrackerTest, verifyDamageForEmptyLayerList)
+{
+ // Though it should never happen, its a good idea to verify that the damage tracker
+ // does not crash when it receives an empty layerList.
+
+ OwnPtr<CCLayerImpl> root = CCLayerImpl::create(1);
+ root->createRenderSurface();
+
+ ASSERT_TRUE(root->renderSurface() == root->targetRenderSurface());
+ CCRenderSurface* targetSurface = root->renderSurface();
+ targetSurface->clearLayerList();
+ targetSurface->damageTracker()->updateDamageTrackingState(targetSurface->layerList(), targetSurface->owningLayerId(), false, IntRect(), 0, FilterOperations());
+
+ FloatRect damageRect = targetSurface->damageTracker()->currentDamageRect();
+ EXPECT_TRUE(damageRect.isEmpty());
+}
+
} // namespace
diff --git a/Source/WebKit/chromium/tests/CCDelayBasedTimeSourceTest.cpp b/Source/WebKit/chromium/tests/CCDelayBasedTimeSourceTest.cpp
index 867d56ea8..93e84a4af 100644
--- a/Source/WebKit/chromium/tests/CCDelayBasedTimeSourceTest.cpp
+++ b/Source/WebKit/chromium/tests/CCDelayBasedTimeSourceTest.cpp
@@ -41,15 +41,15 @@ TEST(CCDelayBasedTimeSourceTest, TaskPostedAndTickCalled)
{
FakeCCThread thread;
FakeCCTimeSourceClient client;
- RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1000.0 / 60.0, &thread);
+ RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1.0 / 60.0, &thread);
timer->setClient(&client);
- timer->setMonotonicallyIncreasingTimeMs(0);
+ timer->setMonotonicallyIncreasingTime(0);
timer->setActive(true);
EXPECT_TRUE(timer->active());
EXPECT_TRUE(thread.hasPendingTask());
- timer->setMonotonicallyIncreasingTimeMs(16);
+ timer->setMonotonicallyIncreasingTime(0.016);
thread.runPendingTask();
EXPECT_TRUE(timer->active());
EXPECT_TRUE(client.tickCalled());
@@ -59,7 +59,7 @@ TEST(CCDelayBasedTimeSource, TickNotCalledWithTaskPosted)
{
FakeCCThread thread;
FakeCCTimeSourceClient client;
- RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1000.0 / 60.0, &thread);
+ RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1.0 / 60.0, &thread);
timer->setClient(&client);
timer->setActive(true);
EXPECT_TRUE(thread.hasPendingTask());
@@ -72,7 +72,7 @@ TEST(CCDelayBasedTimeSource, StartTwiceEnqueuesOneTask)
{
FakeCCThread thread;
FakeCCTimeSourceClient client;
- RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1000.0 / 60.0, &thread);
+ RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1.0 / 60.0, &thread);
timer->setClient(&client);
timer->setActive(true);
EXPECT_TRUE(thread.hasPendingTask());
@@ -85,7 +85,7 @@ TEST(CCDelayBasedTimeSource, StartWhenRunningDoesntTick)
{
FakeCCThread thread;
FakeCCTimeSourceClient client;
- RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1000.0 / 60.0, &thread);
+ RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1.0 / 60.0, &thread);
timer->setClient(&client);
timer->setActive(true);
thread.runPendingTask();
@@ -100,19 +100,19 @@ TEST(CCDelayBasedTimeSource, NextDelaySaneWhenExactlyOnRequestedTime)
{
FakeCCThread thread;
FakeCCTimeSourceClient client;
- double interval = 1000.0 / 60.0;
+ double interval = 1.0 / 60.0;
RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(interval, &thread);
timer->setClient(&client);
timer->setActive(true);
// Run the first task, as that activates the timer and picks up a timebase.
thread.runPendingTask();
- EXPECT_EQ(16, thread.pendingDelay());
+ EXPECT_EQ(16, thread.pendingDelayMs());
- timer->setMonotonicallyIncreasingTimeMs(interval);
+ timer->setMonotonicallyIncreasingTime(interval);
thread.runPendingTask();
- EXPECT_EQ(16, thread.pendingDelay());
+ EXPECT_EQ(16, thread.pendingDelayMs());
}
// At 60Hz, when the tick returns at slightly after the requested next time, make sure
@@ -121,19 +121,19 @@ TEST(CCDelayBasedTimeSource, NextDelaySaneWhenSlightlyAfterRequestedTime)
{
FakeCCThread thread;
FakeCCTimeSourceClient client;
- double interval = 1000.0 / 60.0;
+ double interval = 1.0 / 60.0;
RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(interval, &thread);
timer->setClient(&client);
timer->setActive(true);
// Run the first task, as that activates the timer and picks up a timebase.
thread.runPendingTask();
- EXPECT_EQ(16, thread.pendingDelay());
+ EXPECT_EQ(16, thread.pendingDelayMs());
- timer->setMonotonicallyIncreasingTimeMs(interval + 0.0001);
+ timer->setMonotonicallyIncreasingTime(interval + 0.0000001);
thread.runPendingTask();
- EXPECT_EQ(16, thread.pendingDelay());
+ EXPECT_EQ(16, thread.pendingDelayMs());
}
// At 60Hz, when the tick returns at exactly 2*interval after the requested next time, make sure
@@ -142,19 +142,19 @@ TEST(CCDelayBasedTimeSource, NextDelaySaneWhenExactlyTwiceAfterRequestedTime)
{
FakeCCThread thread;
FakeCCTimeSourceClient client;
- double interval = 1000.0 / 60.0;
+ double interval = 1.0 / 60.0;
RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(interval, &thread);
timer->setClient(&client);
timer->setActive(true);
// Run the first task, as that activates the timer and picks up a timebase.
thread.runPendingTask();
- EXPECT_EQ(16, thread.pendingDelay());
+ EXPECT_EQ(16, thread.pendingDelayMs());
- timer->setMonotonicallyIncreasingTimeMs(2*interval);
+ timer->setMonotonicallyIncreasingTime(2*interval);
thread.runPendingTask();
- EXPECT_EQ(16, thread.pendingDelay());
+ EXPECT_EQ(16, thread.pendingDelayMs());
}
// At 60Hz, when the tick returns at 2*interval and a bit after the requested next time, make sure
@@ -163,19 +163,19 @@ TEST(CCDelayBasedTimeSource, NextDelaySaneWhenSlightlyAfterTwiceRequestedTime)
{
FakeCCThread thread;
FakeCCTimeSourceClient client;
- double interval = 1000.0 / 60.0;
+ double interval = 1.0 / 60.0;
RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(interval, &thread);
timer->setClient(&client);
timer->setActive(true);
// Run the first task, as that activates the timer and picks up a timebase.
thread.runPendingTask();
- EXPECT_EQ(16, thread.pendingDelay());
+ EXPECT_EQ(16, thread.pendingDelayMs());
- timer->setMonotonicallyIncreasingTimeMs(2*interval + 0.0001);
+ timer->setMonotonicallyIncreasingTime(2*interval + 0.0000001);
thread.runPendingTask();
- EXPECT_EQ(16, thread.pendingDelay());
+ EXPECT_EQ(16, thread.pendingDelayMs());
}
// At 60Hz, when the tick returns halfway to the next frame time, make sure
@@ -184,19 +184,19 @@ TEST(CCDelayBasedTimeSource, NextDelaySaneWhenHalfAfterRequestedTime)
{
FakeCCThread thread;
FakeCCTimeSourceClient client;
- double interval = 1000.0 / 60.0;
+ double interval = 1.0 / 60.0;
RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(interval, &thread);
timer->setClient(&client);
timer->setActive(true);
// Run the first task, as that activates the timer and picks up a timebase.
thread.runPendingTask();
- EXPECT_EQ(16, thread.pendingDelay());
+ EXPECT_EQ(16, thread.pendingDelayMs());
- timer->setMonotonicallyIncreasingTimeMs(interval + interval * 0.5);
+ timer->setMonotonicallyIncreasingTime(interval + interval * 0.5);
thread.runPendingTask();
- EXPECT_EQ(8, thread.pendingDelay());
+ EXPECT_EQ(8, thread.pendingDelayMs());
}
@@ -206,31 +206,31 @@ TEST(CCDelayBasedTimeSourceTest, AchievesTargetRateWithNoNoise)
FakeCCThread thread;
FakeCCTimeSourceClient client;
- RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1000.0 / 60.0, &thread);
+ RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1.0 / 60.0, &thread);
timer->setClient(&client);
timer->setActive(true);
double totalFrameTime = 0;
for (int i = 0; i < numIterations; ++i) {
- long long delay = thread.pendingDelay();
+ long long delayMs = thread.pendingDelayMs();
// accumulate the "delay"
- totalFrameTime += delay;
+ totalFrameTime += delayMs / 1000.0;
// Run the callback exactly when asked
- double now = timer->monotonicallyIncreasingTimeMs() + delay;
- timer->setMonotonicallyIncreasingTimeMs(now);
+ double now = timer->monotonicallyIncreasingTime() + delayMs / 1000.0;
+ timer->setMonotonicallyIncreasingTime(now);
thread.runPendingTask();
}
double averageInterval = totalFrameTime / static_cast<double>(numIterations);
- EXPECT_NEAR(1000.0 / 60.0, averageInterval, 0.1);
+ EXPECT_NEAR(1.0 / 60.0, averageInterval, 0.1);
}
TEST(CCDelayBasedTimeSource, TestDeactivateWhilePending)
{
FakeCCThread thread;
FakeCCTimeSourceClient client;
- RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1000.0 / 60.0, &thread);
+ RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1.0 / 60.0, &thread);
timer->setClient(&client);
timer->setActive(true); // Should post a task.
timer->setActive(false);
@@ -242,12 +242,12 @@ TEST(CCDelayBasedTimeSource, TestDeactivateAndReactivateBeforeNextTickTime)
{
FakeCCThread thread;
FakeCCTimeSourceClient client;
- RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1000.0 / 60.0, &thread);
+ RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1.0 / 60.0, &thread);
timer->setClient(&client);
// Should run the activate task, and pick up a new timebase.
timer->setActive(true);
- timer->setMonotonicallyIncreasingTimeMs(0);
+ timer->setMonotonicallyIncreasingTime(0);
thread.runPendingTask();
// Stop the timer
@@ -258,21 +258,21 @@ TEST(CCDelayBasedTimeSource, TestDeactivateAndReactivateBeforeNextTickTime)
// Start the timer again, but before the next tick time the timer previously
// planned on using. That same tick time should still be targeted.
- timer->setMonotonicallyIncreasingTimeMs(4);
+ timer->setMonotonicallyIncreasingTime(0.004);
timer->setActive(true);
- EXPECT_EQ(12, thread.pendingDelay());
+ EXPECT_EQ(12, thread.pendingDelayMs());
}
TEST(CCDelayBasedTimeSource, TestDeactivateAndReactivateAfterNextTickTime)
{
FakeCCThread thread;
FakeCCTimeSourceClient client;
- RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1000.0 / 60.0, &thread);
+ RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1.0 / 60.0, &thread);
timer->setClient(&client);
// Should run the activate task, and pick up a new timebase.
timer->setActive(true);
- timer->setMonotonicallyIncreasingTimeMs(0);
+ timer->setMonotonicallyIncreasingTime(0);
thread.runPendingTask();
// Stop the timer
@@ -283,9 +283,9 @@ TEST(CCDelayBasedTimeSource, TestDeactivateAndReactivateAfterNextTickTime)
// Start the timer again, but before the next tick time the timer previously
// planned on using. That same tick time should still be targeted.
- timer->setMonotonicallyIncreasingTimeMs(20);
+ timer->setMonotonicallyIncreasingTime(0.02);
timer->setActive(true);
- EXPECT_EQ(13, thread.pendingDelay());
+ EXPECT_EQ(13, thread.pendingDelayMs());
}
}
diff --git a/Source/WebKit/chromium/tests/CCFrameRateControllerTest.cpp b/Source/WebKit/chromium/tests/CCFrameRateControllerTest.cpp
index ae43d41c1..c9a60cfaa 100644
--- a/Source/WebKit/chromium/tests/CCFrameRateControllerTest.cpp
+++ b/Source/WebKit/chromium/tests/CCFrameRateControllerTest.cpp
@@ -39,13 +39,13 @@ class FakeCCFrameRateControllerClient : public WebCore::CCFrameRateControllerCli
public:
FakeCCFrameRateControllerClient() { reset(); }
- void reset() { m_frameBegun = false; }
- bool frameBegun() const { return m_frameBegun; }
+ void reset() { m_vsyncTicked = false; }
+ bool vsyncTicked() const { return m_vsyncTicked; }
- virtual void beginFrame() { m_frameBegun = true; }
+ virtual void vsyncTick() { m_vsyncTicked = true; }
protected:
- bool m_frameBegun;
+ bool m_vsyncTicked;
};
@@ -53,7 +53,7 @@ TEST(CCFrameRateControllerTest, TestFrameThrottling_ImmediateAck)
{
FakeCCThread thread;
FakeCCFrameRateControllerClient client;
- RefPtr<FakeCCDelayBasedTimeSource> timeSource = FakeCCDelayBasedTimeSource::create(1000.0 / 60.0, &thread);
+ RefPtr<FakeCCDelayBasedTimeSource> timeSource = FakeCCDelayBasedTimeSource::create(1.0 / 60.0, &thread);
CCFrameRateController controller(timeSource);
controller.setClient(&client);
@@ -62,32 +62,32 @@ TEST(CCFrameRateControllerTest, TestFrameThrottling_ImmediateAck)
double elapsed = 0; // Muck around with time a bit
// Trigger one frame, make sure the vsync callback is called
- elapsed += thread.pendingDelay();
- timeSource->setMonotonicallyIncreasingTimeMs(elapsed);
+ elapsed += thread.pendingDelayMs() / 1000.0;
+ timeSource->setMonotonicallyIncreasingTime(elapsed);
thread.runPendingTask();
- EXPECT_TRUE(client.frameBegun());
+ EXPECT_TRUE(client.vsyncTicked());
client.reset();
// Tell the controller we drew
controller.didBeginFrame();
// Tell the controller the frame ended 5ms later
- timeSource->setMonotonicallyIncreasingTimeMs(timeSource->monotonicallyIncreasingTimeMs() + 5);
+ timeSource->setMonotonicallyIncreasingTime(timeSource->monotonicallyIncreasingTime() + 0.005);
controller.didFinishFrame();
// Trigger another frame, make sure vsync runs again
- elapsed += thread.pendingDelay();
- EXPECT_TRUE(elapsed >= timeSource->monotonicallyIncreasingTimeMs()); // Sanity check that previous code didn't move time backward.
- timeSource->setMonotonicallyIncreasingTimeMs(elapsed);
+ elapsed += thread.pendingDelayMs() / 1000.0;
+ EXPECT_TRUE(elapsed >= timeSource->monotonicallyIncreasingTime()); // Sanity check that previous code didn't move time backward.
+ timeSource->setMonotonicallyIncreasingTime(elapsed);
thread.runPendingTask();
- EXPECT_TRUE(client.frameBegun());
+ EXPECT_TRUE(client.vsyncTicked());
}
TEST(CCFrameRateControllerTest, TestFrameThrottling_TwoFramesInFlight)
{
FakeCCThread thread;
FakeCCFrameRateControllerClient client;
- RefPtr<FakeCCDelayBasedTimeSource> timeSource = FakeCCDelayBasedTimeSource::create(1000.0 / 60.0, &thread);
+ RefPtr<FakeCCDelayBasedTimeSource> timeSource = FakeCCDelayBasedTimeSource::create(1.0 / 60.0, &thread);
CCFrameRateController controller(timeSource);
controller.setClient(&client);
@@ -97,46 +97,46 @@ TEST(CCFrameRateControllerTest, TestFrameThrottling_TwoFramesInFlight)
double elapsed = 0; // Muck around with time a bit
// Trigger one frame, make sure the vsync callback is called
- elapsed += thread.pendingDelay();
- timeSource->setMonotonicallyIncreasingTimeMs(elapsed);
+ elapsed += thread.pendingDelayMs() / 1000.0;
+ timeSource->setMonotonicallyIncreasingTime(elapsed);
thread.runPendingTask();
- EXPECT_TRUE(client.frameBegun());
+ EXPECT_TRUE(client.vsyncTicked());
client.reset();
// Tell the controller we drew
controller.didBeginFrame();
// Trigger another frame, make sure vsync callback runs again
- elapsed += thread.pendingDelay();
- EXPECT_TRUE(elapsed >= timeSource->monotonicallyIncreasingTimeMs()); // Sanity check that previous code didn't move time backward.
- timeSource->setMonotonicallyIncreasingTimeMs(elapsed);
+ elapsed += thread.pendingDelayMs() / 1000.0;
+ EXPECT_TRUE(elapsed >= timeSource->monotonicallyIncreasingTime()); // Sanity check that previous code didn't move time backward.
+ timeSource->setMonotonicallyIncreasingTime(elapsed);
thread.runPendingTask();
- EXPECT_TRUE(client.frameBegun());
+ EXPECT_TRUE(client.vsyncTicked());
client.reset();
// Tell the controller we drew, again.
controller.didBeginFrame();
// Trigger another frame. Since two frames are pending, we should not draw.
- elapsed += thread.pendingDelay();
- EXPECT_TRUE(elapsed >= timeSource->monotonicallyIncreasingTimeMs()); // Sanity check that previous code didn't move time backward.
- timeSource->setMonotonicallyIncreasingTimeMs(elapsed);
+ elapsed += thread.pendingDelayMs() / 1000.0;
+ EXPECT_TRUE(elapsed >= timeSource->monotonicallyIncreasingTime()); // Sanity check that previous code didn't move time backward.
+ timeSource->setMonotonicallyIncreasingTime(elapsed);
thread.runPendingTask();
- EXPECT_FALSE(client.frameBegun());
+ EXPECT_FALSE(client.vsyncTicked());
// Tell the controller the first frame ended 5ms later
- timeSource->setMonotonicallyIncreasingTimeMs(timeSource->monotonicallyIncreasingTimeMs() + 5);
+ timeSource->setMonotonicallyIncreasingTime(timeSource->monotonicallyIncreasingTime() + 0.005);
controller.didFinishFrame();
// Tick should not have been called
- EXPECT_FALSE(client.frameBegun());
+ EXPECT_FALSE(client.vsyncTicked());
// Trigger yet another frame. Since one frames is pending, another vsync callback should run.
- elapsed += thread.pendingDelay();
- EXPECT_TRUE(elapsed >= timeSource->monotonicallyIncreasingTimeMs()); // Sanity check that previous code didn't move time backward.
- timeSource->setMonotonicallyIncreasingTimeMs(elapsed);
+ elapsed += thread.pendingDelayMs() / 1000.0;
+ EXPECT_TRUE(elapsed >= timeSource->monotonicallyIncreasingTime()); // Sanity check that previous code didn't move time backward.
+ timeSource->setMonotonicallyIncreasingTime(elapsed);
thread.runPendingTask();
- EXPECT_TRUE(client.frameBegun());
+ EXPECT_TRUE(client.vsyncTicked());
}
}
diff --git a/Source/WebKit/chromium/tests/CCLayerAnimationControllerImplTest.cpp b/Source/WebKit/chromium/tests/CCLayerAnimationControllerImplTest.cpp
deleted file mode 100644
index e1aeccc53..000000000
--- a/Source/WebKit/chromium/tests/CCLayerAnimationControllerImplTest.cpp
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
- * Copyright (C) 2012 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:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "CCAnimationTestCommon.h"
-#include "cc/CCLayerAnimationControllerImpl.h"
-#include "cc/CCAnimationCurve.h"
-#include "cc/CCAnimationEvents.h"
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <wtf/Vector.h>
-
-using namespace WebCore;
-using namespace WebKitTests;
-
-namespace {
-
-PassOwnPtr<CCActiveAnimation> createActiveAnimation(PassOwnPtr<CCAnimationCurve> curve, int id, CCActiveAnimation::TargetProperty property)
-{
- return CCActiveAnimation::create(curve, 0, id, property);
-}
-
-// Tests that transitioning opacity from 0 to 1 works as expected.
-TEST(CCLayerAnimationControllerImplTest, TrivialTransition)
-{
- OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
- FakeLayerAnimationControllerImplClient dummy;
- OwnPtr<CCLayerAnimationControllerImpl> controller(
- CCLayerAnimationControllerImpl::create(&dummy));
-
- OwnPtr<CCActiveAnimation> toAdd(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), 1, CCActiveAnimation::Opacity));
-
- controller->add(toAdd.release());
- controller->animate(0, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0, dummy.opacity());
- controller->animate(1, *events);
- EXPECT_EQ(1, dummy.opacity());
- EXPECT_FALSE(controller->hasActiveAnimation());
-}
-
-// Tests that two queued animations affecting the same property run in sequence.
-TEST(CCLayerAnimationControllerImplTest, TrivialQueuing)
-{
- OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
- FakeLayerAnimationControllerImplClient dummy;
- OwnPtr<CCLayerAnimationControllerImpl> controller(
- CCLayerAnimationControllerImpl::create(&dummy));
-
- controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), 1, CCActiveAnimation::Opacity));
- controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 1, 0.5f)), 2, CCActiveAnimation::Opacity));
-
- controller->animate(0, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0, dummy.opacity());
- controller->animate(1, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(1, dummy.opacity());
- controller->animate(2, *events);
- EXPECT_EQ(0.5f, dummy.opacity());
- EXPECT_FALSE(controller->hasActiveAnimation());
-}
-
-// Tests interrupting a transition with another transition.
-TEST(CCLayerAnimationControllerImplTest, Interrupt)
-{
- OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
- FakeLayerAnimationControllerImplClient dummy;
- OwnPtr<CCLayerAnimationControllerImpl> controller(
- CCLayerAnimationControllerImpl::create(&dummy));
- controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), 1, CCActiveAnimation::Opacity));
- controller->animate(0, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0, dummy.opacity());
-
- OwnPtr<CCActiveAnimation> toAdd(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 1, 0.5f)), 2, CCActiveAnimation::Opacity));
- toAdd->setRunState(CCActiveAnimation::WaitingForNextTick, 0);
- controller->add(toAdd.release());
-
- controller->animate(0.5, *events); // second anim starts NOW.
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(1, dummy.opacity());
- controller->animate(1.5, *events);
- EXPECT_EQ(0.5f, dummy.opacity());
- EXPECT_FALSE(controller->hasActiveAnimation());
-}
-
-// Tests scheduling two animations to run together when only one property is free.
-TEST(CCLayerAnimationControllerImplTest, ScheduleTogetherWhenAPropertyIsBlocked)
-{
- OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
- FakeLayerAnimationControllerImplClient dummy;
- OwnPtr<CCLayerAnimationControllerImpl> controller(
- CCLayerAnimationControllerImpl::create(&dummy));
-
- controller->add(createActiveAnimation(adoptPtr(new FakeTransformTransition(1)), 1, CCActiveAnimation::Transform));
- controller->add(createActiveAnimation(adoptPtr(new FakeTransformTransition(1)), 2, CCActiveAnimation::Transform));
- controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), 2, CCActiveAnimation::Opacity));
-
- controller->animate(0, *events);
- EXPECT_EQ(0, dummy.opacity());
- EXPECT_TRUE(controller->hasActiveAnimation());
- controller->animate(1, *events);
- // Should not have started the float transition yet.
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0, dummy.opacity());
- // The the float animation should have started at time 1 and should be done.
- controller->animate(2, *events);
- EXPECT_EQ(1, dummy.opacity());
- EXPECT_FALSE(controller->hasActiveAnimation());
-}
-
-// Tests scheduling two animations to run together with different lengths and another
-// animation queued to start when the shorter animation finishes (should wait
-// for both to finish).
-TEST(CCLayerAnimationControllerImplTest, ScheduleTogetherWithAnAnimWaiting)
-{
- OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
- FakeLayerAnimationControllerImplClient dummy;
- OwnPtr<CCLayerAnimationControllerImpl> controller(
- CCLayerAnimationControllerImpl::create(&dummy));
-
- controller->add(createActiveAnimation(adoptPtr(new FakeTransformTransition(2)), 1, CCActiveAnimation::Transform));
- controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), 1, CCActiveAnimation::Opacity));
- controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 1, 0.5f)), 2, CCActiveAnimation::Opacity));
-
- // Anims with id 1 should both start now.
- controller->animate(0, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0, dummy.opacity());
- // The opacity animation should have finished at time 1, but the group
- // of animations with id 1 don't finish until time 2 because of the length
- // of the transform animation.
- controller->animate(2, *events);
- // Should not have started the float transition yet.
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(1, dummy.opacity());
-
- // The the second opacity animation should start at time 2 and should be
- // done by time 3
- controller->animate(3, *events);
- EXPECT_EQ(0.5f, dummy.opacity());
- EXPECT_FALSE(controller->hasActiveAnimation());
-}
-
-// Tests scheduling an animation to start in the future.
-TEST(CCLayerAnimationControllerImplTest, ScheduleAnimation)
-{
- OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
- FakeLayerAnimationControllerImplClient dummy;
- OwnPtr<CCLayerAnimationControllerImpl> controller(
- CCLayerAnimationControllerImpl::create(&dummy));
-
- OwnPtr<CCActiveAnimation> toAdd(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), 1, CCActiveAnimation::Opacity));
- toAdd->setRunState(CCActiveAnimation::WaitingForStartTime, 0);
- toAdd->setStartTime(1);
- controller->add(toAdd.release());
-
- controller->animate(0, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0, dummy.opacity());
- controller->animate(1, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0, dummy.opacity());
- controller->animate(2, *events);
- EXPECT_EQ(1, dummy.opacity());
- EXPECT_FALSE(controller->hasActiveAnimation());
-}
-
-// Tests scheduling an animation to start in the future that's interrupting a running animation.
-TEST(CCLayerAnimationControllerImplTest, ScheduledAnimationInterruptsRunningAnimation)
-{
- OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
- FakeLayerAnimationControllerImplClient dummy;
- OwnPtr<CCLayerAnimationControllerImpl> controller(
- CCLayerAnimationControllerImpl::create(&dummy));
-
- controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(2, 0, 1)), 1, CCActiveAnimation::Opacity));
-
- OwnPtr<CCActiveAnimation> toAdd(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0.5f, 0)), 2, CCActiveAnimation::Opacity));
- toAdd->setRunState(CCActiveAnimation::WaitingForStartTime, 0);
- toAdd->setStartTime(1);
- controller->add(toAdd.release());
-
- // First 2s opacity transition should start immediately.
- controller->animate(0, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0, dummy.opacity());
- controller->animate(0.5, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0.25f, dummy.opacity());
- controller->animate(1, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0.5f, dummy.opacity());
- controller->animate(2, *events);
- EXPECT_EQ(0, dummy.opacity());
- EXPECT_FALSE(controller->hasActiveAnimation());
-}
-
-// Tests scheduling an animation to start in the future that interrupts a running animation
-// and there is yet another animation queued to start later.
-TEST(CCLayerAnimationControllerImplTest, ScheduledAnimationInterruptsRunningAnimationWithAnimInQueue)
-{
- OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
- FakeLayerAnimationControllerImplClient dummy;
- OwnPtr<CCLayerAnimationControllerImpl> controller(
- CCLayerAnimationControllerImpl::create(&dummy));
-
- controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(2, 0, 1)), 1, CCActiveAnimation::Opacity));
-
- OwnPtr<CCActiveAnimation> toAdd(createActiveAnimation(adoptPtr(new FakeFloatTransition(2, 0.5f, 0)), 2, CCActiveAnimation::Opacity));
- toAdd->setRunState(CCActiveAnimation::WaitingForStartTime, 0);
- toAdd->setStartTime(1);
- controller->add(toAdd.release());
-
- controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 0.75f)), 3, CCActiveAnimation::Opacity));
-
- // First 2s opacity transition should start immediately.
- controller->animate(0, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0, dummy.opacity());
- controller->animate(0.5, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0.25f, dummy.opacity());
- EXPECT_TRUE(controller->hasActiveAnimation());
- controller->animate(1, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0.5f, dummy.opacity());
- controller->animate(3, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0, dummy.opacity());
- controller->animate(4, *events);
- EXPECT_EQ(0.75f, dummy.opacity());
- EXPECT_FALSE(controller->hasActiveAnimation());
-}
-
-// Test that a looping animation loops and for the correct number of iterations.
-TEST(CCLayerAnimationControllerImplTest, TrivialLooping)
-{
- OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
- FakeLayerAnimationControllerImplClient dummy;
- OwnPtr<CCLayerAnimationControllerImpl> controller(
- CCLayerAnimationControllerImpl::create(&dummy));
-
- OwnPtr<CCActiveAnimation> toAdd(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), 1, CCActiveAnimation::Opacity));
- toAdd->setIterations(3);
- controller->add(toAdd.release());
-
- controller->animate(0, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0, dummy.opacity());
- controller->animate(1.25, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0.25f, dummy.opacity());
- controller->animate(1.75, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0.75f, dummy.opacity());
- controller->animate(2.25, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0.25f, dummy.opacity());
- controller->animate(2.75, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0.75f, dummy.opacity());
- controller->animate(3, *events);
- EXPECT_FALSE(controller->hasActiveAnimation());
- EXPECT_EQ(1, dummy.opacity());
-
- // Just be extra sure.
- controller->animate(4, *events);
- EXPECT_EQ(1, dummy.opacity());
-}
-
-// Test that an infinitely looping animation does indeed go until aborted.
-TEST(CCLayerAnimationControllerImplTest, InfiniteLooping)
-{
- OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
- FakeLayerAnimationControllerImplClient dummy;
- OwnPtr<CCLayerAnimationControllerImpl> controller(
- CCLayerAnimationControllerImpl::create(&dummy));
-
- const int id = 1;
- OwnPtr<CCActiveAnimation> toAdd(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), id, CCActiveAnimation::Opacity));
- toAdd->setIterations(-1);
- controller->add(toAdd.release());
-
- controller->animate(0, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0, dummy.opacity());
- controller->animate(1.25, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0.25f, dummy.opacity());
- controller->animate(1.75, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0.75f, dummy.opacity());
-
- controller->animate(1073741824.25, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0.25f, dummy.opacity());
- controller->animate(1073741824.75, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0.75f, dummy.opacity());
-
- EXPECT_TRUE(controller->getActiveAnimation(id, CCActiveAnimation::Opacity));
- controller->getActiveAnimation(id, CCActiveAnimation::Opacity)->setRunState(CCActiveAnimation::Aborted, 0.75f);
- EXPECT_FALSE(controller->hasActiveAnimation());
- EXPECT_EQ(0.75f, dummy.opacity());
-}
-
-// Test that pausing and resuming work as expected.
-TEST(CCLayerAnimationControllerImplTest, PauseResume)
-{
- OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
- FakeLayerAnimationControllerImplClient dummy;
- OwnPtr<CCLayerAnimationControllerImpl> controller(
- CCLayerAnimationControllerImpl::create(&dummy));
-
- const int id = 1;
- controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), id, CCActiveAnimation::Opacity));
-
- controller->animate(0, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0, dummy.opacity());
- controller->animate(0.5, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0.5f, dummy.opacity());
-
- EXPECT_TRUE(controller->getActiveAnimation(id, CCActiveAnimation::Opacity));
- controller->getActiveAnimation(id, CCActiveAnimation::Opacity)->setRunState(CCActiveAnimation::Paused, 0.5f);
-
- controller->animate(1024, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0.5f, dummy.opacity());
-
- EXPECT_TRUE(controller->getActiveAnimation(id, CCActiveAnimation::Opacity));
- controller->getActiveAnimation(id, CCActiveAnimation::Opacity)->setRunState(CCActiveAnimation::Running, 1024);
-
- controller->animate(1024.25, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0.75f, dummy.opacity());
- controller->animate(1024.5, *events);
- EXPECT_FALSE(controller->hasActiveAnimation());
- EXPECT_EQ(1, dummy.opacity());
-}
-
-TEST(CCLayerAnimationControllerImplTest, AbortAGroupedAnimation)
-{
- OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
- FakeLayerAnimationControllerImplClient dummy;
- OwnPtr<CCLayerAnimationControllerImpl> controller(
- CCLayerAnimationControllerImpl::create(&dummy));
-
- const int id = 1;
- controller->add(createActiveAnimation(adoptPtr(new FakeTransformTransition(1)), id, CCActiveAnimation::Transform));
- controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(2, 0, 1)), id, CCActiveAnimation::Opacity));
- controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 1, 0.75f)), 2, CCActiveAnimation::Opacity));
-
- controller->animate(0, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0, dummy.opacity());
- controller->animate(1, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(0.5f, dummy.opacity());
-
- EXPECT_TRUE(controller->getActiveAnimation(id, CCActiveAnimation::Opacity));
- controller->getActiveAnimation(id, CCActiveAnimation::Opacity)->setRunState(CCActiveAnimation::Aborted, 1);
- controller->animate(1, *events);
- EXPECT_TRUE(controller->hasActiveAnimation());
- EXPECT_EQ(1, dummy.opacity());
- controller->animate(2, *events);
- EXPECT_TRUE(!controller->hasActiveAnimation());
- EXPECT_EQ(0.75f, dummy.opacity());
-}
-
-} // namespace
diff --git a/Source/WebKit/chromium/tests/CCLayerAnimationControllerTest.cpp b/Source/WebKit/chromium/tests/CCLayerAnimationControllerTest.cpp
index c4f103a3c..fa95a2ac5 100644
--- a/Source/WebKit/chromium/tests/CCLayerAnimationControllerTest.cpp
+++ b/Source/WebKit/chromium/tests/CCLayerAnimationControllerTest.cpp
@@ -56,7 +56,8 @@ PassOwnPtr<CCActiveAnimation> createActiveAnimation(PassOwnPtr<CCAnimationCurve>
TEST(CCLayerAnimationControllerTest, createOpacityAnimation)
{
- OwnPtr<CCLayerAnimationController> controller(CCLayerAnimationController::create());
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(CCLayerAnimationController::create(&dummy));
const double duration = 1;
WebCore::KeyframeValueList values(AnimatedPropertyOpacity);
values.insert(new FloatAnimationValue(0, 0));
@@ -85,9 +86,37 @@ TEST(CCLayerAnimationControllerTest, createOpacityAnimation)
EXPECT_EQ(1, curve->getValue(duration));
}
+TEST(CCLayerAnimationControllerTest, ignoreUnsupportedAnimationDirections)
+{
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(CCLayerAnimationController::create(&dummy));
+ const double duration = 1;
+ WebCore::KeyframeValueList values(AnimatedPropertyOpacity);
+ values.insert(new FloatAnimationValue(0, 0));
+ values.insert(new FloatAnimationValue(duration, 1));
+
+ RefPtr<Animation> animation = Animation::create();
+ animation->setDuration(duration);
+
+ IntSize boxSize;
+
+ animation->setDirection(Animation::AnimationDirectionAlternate);
+ EXPECT_FALSE(controller->addAnimation(values, boxSize, animation.get(), 0, 0, 0));
+
+ animation->setDirection(Animation::AnimationDirectionAlternateReverse);
+ EXPECT_FALSE(controller->addAnimation(values, boxSize, animation.get(), 0, 0, 0));
+
+ animation->setDirection(Animation::AnimationDirectionReverse);
+ EXPECT_FALSE(controller->addAnimation(values, boxSize, animation.get(), 0, 0, 0));
+
+ animation->setDirection(Animation::AnimationDirectionNormal);
+ EXPECT_TRUE(controller->addAnimation(values, boxSize, animation.get(), 0, 0, 0));
+}
+
TEST(CCLayerAnimationControllerTest, createTransformAnimation)
{
- OwnPtr<CCLayerAnimationController> controller(CCLayerAnimationController::create());
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(CCLayerAnimationController::create(&dummy));
const double duration = 1;
WebCore::KeyframeValueList values(AnimatedPropertyWebkitTransform);
@@ -124,92 +153,504 @@ TEST(CCLayerAnimationControllerTest, createTransformAnimation)
TEST(CCLayerAnimationControllerTest, syncNewAnimation)
{
- FakeLayerAnimationControllerImplClient dummy;
- OwnPtr<CCLayerAnimationControllerImpl> controllerImpl(CCLayerAnimationControllerImpl::create(&dummy));
- OwnPtr<CCLayerAnimationController> controller(CCLayerAnimationController::create());
+ FakeLayerAnimationControllerClient dummyImpl;
+ OwnPtr<CCLayerAnimationController> controllerImpl(CCLayerAnimationController::create(&dummyImpl));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(CCLayerAnimationController::create(&dummy));
EXPECT_FALSE(controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity));
- addOpacityTransitionToController(*controller, 1, 0, 1);
+ addOpacityTransitionToController(*controller, 1, 0, 1, false);
- controller->synchronizeAnimations(controllerImpl.get());
+ controller->pushAnimationUpdatesTo(controllerImpl.get());
EXPECT_TRUE(controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity));
EXPECT_EQ(CCActiveAnimation::WaitingForTargetAvailability, controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity)->runState());
}
-TEST(CCLayerAnimationControllerTest, syncAnimationProperties)
+// If an animation is started on the impl thread before it is ticked on the main
+// thread, we must be sure to respect the synchronized start time.
+TEST(CCLayerAnimationControllerTest, doNotClobberStartTimes)
{
- FakeLayerAnimationControllerImplClient dummy;
- OwnPtr<CCLayerAnimationControllerImpl> controllerImpl(CCLayerAnimationControllerImpl::create(&dummy));
- OwnPtr<CCLayerAnimationController> controller(CCLayerAnimationController::create());
+ FakeLayerAnimationControllerClient dummyImpl;
+ OwnPtr<CCLayerAnimationController> controllerImpl(CCLayerAnimationController::create(&dummyImpl));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(CCLayerAnimationController::create(&dummy));
EXPECT_FALSE(controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity));
- addOpacityTransitionToController(*controller, 1, 0, 1);
+ addOpacityTransitionToController(*controller, 1, 0, 1, false);
- controller->synchronizeAnimations(controllerImpl.get());
+ controller->pushAnimationUpdatesTo(controllerImpl.get());
EXPECT_TRUE(controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity));
EXPECT_EQ(CCActiveAnimation::WaitingForTargetAvailability, controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity)->runState());
- // Push an animation property change to the impl thread (should not cause an animation to be added).
- controller->pauseAnimation(0, 0);
- controller->synchronizeAnimations(controllerImpl.get());
+ CCAnimationEventsVector events;
+ controllerImpl->animate(1, &events);
- EXPECT_TRUE(controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity));
- EXPECT_EQ(CCActiveAnimation::Paused, controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity)->runState());
+ // Synchronize the start times.
+ EXPECT_EQ(1u, events.size());
+ controller->notifyAnimationStarted(events[0]);
+ EXPECT_EQ(controller->getActiveAnimation(0, CCActiveAnimation::Opacity)->startTime(), controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity)->startTime());
+
+ // Start the animation on the main thread. Should not affect the start time.
+ controller->animate(1.5, 0);
+ EXPECT_EQ(controller->getActiveAnimation(0, CCActiveAnimation::Opacity)->startTime(), controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity)->startTime());
}
-TEST(CCLayerAnimationControllerTest, syncAbortedAnimation)
+TEST(CCLayerAnimationControllerTest, syncPauseAndResume)
{
- FakeLayerAnimationControllerImplClient dummy;
- OwnPtr<CCLayerAnimationControllerImpl> controllerImpl(CCLayerAnimationControllerImpl::create(&dummy));
- OwnPtr<CCLayerAnimationController> controller(CCLayerAnimationController::create());
+ FakeLayerAnimationControllerClient dummyImpl;
+ OwnPtr<CCLayerAnimationController> controllerImpl(CCLayerAnimationController::create(&dummyImpl));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(CCLayerAnimationController::create(&dummy));
EXPECT_FALSE(controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity));
- addOpacityTransitionToController(*controller, 1, 0, 1);
+ addOpacityTransitionToController(*controller, 1, 0, 1, false);
- controller->synchronizeAnimations(controllerImpl.get());
+ controller->pushAnimationUpdatesTo(controllerImpl.get());
EXPECT_TRUE(controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity));
EXPECT_EQ(CCActiveAnimation::WaitingForTargetAvailability, controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity)->runState());
- controller->removeAnimation(0);
+ // Start the animations on each controller.
+ CCAnimationEventsVector events;
+ controllerImpl->animate(0, &events);
+ controller->animate(0, 0);
+ EXPECT_EQ(CCActiveAnimation::Running, controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity)->runState());
+ EXPECT_EQ(CCActiveAnimation::Running, controller->getActiveAnimation(0, CCActiveAnimation::Opacity)->runState());
- // Abort an animation from the main thread.
- controller->synchronizeAnimations(controllerImpl.get());
+ // Pause the main-thread animation.
+ controller->suspendAnimations(1);
+ EXPECT_EQ(CCActiveAnimation::Paused, controller->getActiveAnimation(0, CCActiveAnimation::Opacity)->runState());
- EXPECT_FALSE(controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity));
+ // The pause run state change should make it to the impl thread controller.
+ controller->pushAnimationUpdatesTo(controllerImpl.get());
+ EXPECT_EQ(CCActiveAnimation::Paused, controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity)->runState());
+
+ // Resume the main-thread animation.
+ controller->resumeAnimations(2);
+ EXPECT_EQ(CCActiveAnimation::Running, controller->getActiveAnimation(0, CCActiveAnimation::Opacity)->runState());
+
+ // The pause run state change should make it to the impl thread controller.
+ controller->pushAnimationUpdatesTo(controllerImpl.get());
+ EXPECT_EQ(CCActiveAnimation::Running, controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity)->runState());
}
-TEST(CCLayerAnimationControllerTest, syncCompletedAnimation)
+
+TEST(CCLayerAnimationControllerTest, doNotSyncFinishedAnimation)
{
- FakeLayerAnimationControllerImplClient dummy;
- OwnPtr<CCLayerAnimationControllerImpl> controllerImpl(CCLayerAnimationControllerImpl::create(&dummy));
- OwnPtr<CCLayerAnimationController> controller(CCLayerAnimationController::create());
+ FakeLayerAnimationControllerClient dummyImpl;
+ OwnPtr<CCLayerAnimationController> controllerImpl(CCLayerAnimationController::create(&dummyImpl));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(CCLayerAnimationController::create(&dummy));
EXPECT_FALSE(controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity));
- addOpacityTransitionToController(*controller, 1, 0, 1);
+ addOpacityTransitionToController(*controller, 1, 0, 1, false);
- controller->synchronizeAnimations(controllerImpl.get());
+ controller->pushAnimationUpdatesTo(controllerImpl.get());
EXPECT_TRUE(controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity));
EXPECT_EQ(CCActiveAnimation::WaitingForTargetAvailability, controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity)->runState());
- // Step through the animation until it is finished. At the next sync, the main thread's animation should be cleared.
- OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
- controllerImpl->animate(0, *events);
- controllerImpl->animate(2, *events);
+ // Notify main thread controller that the animation has started.
+ CCAnimationEvent animationStartedEvent(CCAnimationEvent::Started, 0, 0, CCActiveAnimation::Opacity, 0);
+ controller->notifyAnimationStarted(animationStartedEvent);
+
+ // Force animation to complete on impl thread.
+ controllerImpl->removeAnimation(0);
EXPECT_FALSE(controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity));
+
+ controller->pushAnimationUpdatesTo(controllerImpl.get());
+
+ // Even though the main thread has a 'new' animation, it should not be pushed because the animation has already completed on the impl thread.
+ EXPECT_FALSE(controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity));
+}
+
+// Tests that transitioning opacity from 0 to 1 works as expected.
+TEST(CCLayerAnimationControllerTest, TrivialTransition)
+{
+ OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(
+ CCLayerAnimationController::create(&dummy));
+
+ OwnPtr<CCActiveAnimation> toAdd(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), 1, CCActiveAnimation::Opacity));
+
+ controller->add(toAdd.release());
+ controller->animate(0, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+ controller->animate(1, events.get());
+ EXPECT_EQ(1, dummy.opacity());
+ EXPECT_FALSE(controller->hasActiveAnimation());
+}
+
+// Tests animations that are waiting for a synchronized start time do not finish.
+TEST(CCLayerAnimationControllerTest, AnimationsWaitingForStartTimeDoNotFinishIfTheyWaitLongerToStartThanTheirDuration)
+{
+ OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(
+ CCLayerAnimationController::create(&dummy));
+
+ OwnPtr<CCActiveAnimation> toAdd(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), 1, CCActiveAnimation::Opacity));
+ toAdd->setNeedsSynchronizedStartTime(true);
+
+ // We should pause at the first keyframe indefinitely waiting for that animation to start.
+ controller->add(toAdd.release());
+ controller->animate(0, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+ controller->animate(1, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+ controller->animate(2, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+
+ // Send the synchronized start time.
+ controller->notifyAnimationStarted(CCAnimationEvent(CCAnimationEvent::Started, 0, 1, CCActiveAnimation::Opacity, 2));
+ controller->animate(5, events.get());
+ EXPECT_EQ(1, dummy.opacity());
+ EXPECT_FALSE(controller->hasActiveAnimation());
+}
+
+// Tests that two queued animations affecting the same property run in sequence.
+TEST(CCLayerAnimationControllerTest, TrivialQueuing)
+{
+ OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(
+ CCLayerAnimationController::create(&dummy));
+
+ controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), 1, CCActiveAnimation::Opacity));
+ controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 1, 0.5)), 2, CCActiveAnimation::Opacity));
+
+ controller->animate(0, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+ controller->animate(1, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(1, dummy.opacity());
+ controller->animate(2, events.get());
+ EXPECT_EQ(0.5, dummy.opacity());
+ EXPECT_FALSE(controller->hasActiveAnimation());
+}
+
+// Tests interrupting a transition with another transition.
+TEST(CCLayerAnimationControllerTest, Interrupt)
+{
+ OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(
+ CCLayerAnimationController::create(&dummy));
+ controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), 1, CCActiveAnimation::Opacity));
+ controller->animate(0, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+
+ OwnPtr<CCActiveAnimation> toAdd(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 1, 0.5)), 2, CCActiveAnimation::Opacity));
+ toAdd->setRunState(CCActiveAnimation::WaitingForNextTick, 0);
+ controller->add(toAdd.release());
+
+ // Since the animation was in the WaitingForNextTick state, it should start right in
+ // this call to animate.
+ controller->animate(0.5, events.get());
EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(1, dummy.opacity());
+ controller->animate(1.5, events.get());
+ EXPECT_EQ(0.5, dummy.opacity());
+ EXPECT_FALSE(controller->hasActiveAnimation());
+}
+
+// Tests scheduling two animations to run together when only one property is free.
+TEST(CCLayerAnimationControllerTest, ScheduleTogetherWhenAPropertyIsBlocked)
+{
+ OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(
+ CCLayerAnimationController::create(&dummy));
- controller->synchronizeAnimations(controllerImpl.get());
+ controller->add(createActiveAnimation(adoptPtr(new FakeTransformTransition(1)), 1, CCActiveAnimation::Transform));
+ controller->add(createActiveAnimation(adoptPtr(new FakeTransformTransition(1)), 2, CCActiveAnimation::Transform));
+ controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), 2, CCActiveAnimation::Opacity));
+ controller->animate(0, events.get());
+ EXPECT_EQ(0, dummy.opacity());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ controller->animate(1, events.get());
+ // Should not have started the float transition yet.
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+ // The float animation should have started at time 1 and should be done.
+ controller->animate(2, events.get());
+ EXPECT_EQ(1, dummy.opacity());
EXPECT_FALSE(controller->hasActiveAnimation());
}
+// Tests scheduling two animations to run together with different lengths and another
+// animation queued to start when the shorter animation finishes (should wait
+// for both to finish).
+TEST(CCLayerAnimationControllerTest, ScheduleTogetherWithAnAnimWaiting)
+{
+ OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(
+ CCLayerAnimationController::create(&dummy));
+
+ controller->add(createActiveAnimation(adoptPtr(new FakeTransformTransition(2)), 1, CCActiveAnimation::Transform));
+ controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), 1, CCActiveAnimation::Opacity));
+ controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 1, 0.5)), 2, CCActiveAnimation::Opacity));
+
+ // Animations with id 1 should both start now.
+ controller->animate(0, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+ // The opacity animation should have finished at time 1, but the group
+ // of animations with id 1 don't finish until time 2 because of the length
+ // of the transform animation.
+ controller->animate(2, events.get());
+ // Should not have started the float transition yet.
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(1, dummy.opacity());
+
+ // The second opacity animation should start at time 2 and should be done by time 3
+ controller->animate(3, events.get());
+ EXPECT_EQ(0.5, dummy.opacity());
+ EXPECT_FALSE(controller->hasActiveAnimation());
+}
+
+// Tests scheduling an animation to start in the future.
+TEST(CCLayerAnimationControllerTest, ScheduleAnimation)
+{
+ OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(
+ CCLayerAnimationController::create(&dummy));
+
+ OwnPtr<CCActiveAnimation> toAdd(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), 1, CCActiveAnimation::Opacity));
+ toAdd->setRunState(CCActiveAnimation::WaitingForStartTime, 0);
+ toAdd->setStartTime(1);
+ controller->add(toAdd.release());
+
+ controller->animate(0, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+ controller->animate(1, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+ controller->animate(2, events.get());
+ EXPECT_EQ(1, dummy.opacity());
+ EXPECT_FALSE(controller->hasActiveAnimation());
+}
+
+// Tests scheduling an animation to start in the future that's interrupting a running animation.
+TEST(CCLayerAnimationControllerTest, ScheduledAnimationInterruptsRunningAnimation)
+{
+ OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(
+ CCLayerAnimationController::create(&dummy));
+
+ controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(2, 0, 1)), 1, CCActiveAnimation::Opacity));
+
+ OwnPtr<CCActiveAnimation> toAdd(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0.5, 0)), 2, CCActiveAnimation::Opacity));
+ toAdd->setRunState(CCActiveAnimation::WaitingForStartTime, 0);
+ toAdd->setStartTime(1);
+ controller->add(toAdd.release());
+
+ // First 2s opacity transition should start immediately.
+ controller->animate(0, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+ controller->animate(0.5, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.25, dummy.opacity());
+ controller->animate(1, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.5, dummy.opacity());
+ controller->animate(2, events.get());
+ EXPECT_EQ(0, dummy.opacity());
+ EXPECT_FALSE(controller->hasActiveAnimation());
+}
+
+// Tests scheduling an animation to start in the future that interrupts a running animation
+// and there is yet another animation queued to start later.
+TEST(CCLayerAnimationControllerTest, ScheduledAnimationInterruptsRunningAnimationWithAnimInQueue)
+{
+ OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(
+ CCLayerAnimationController::create(&dummy));
+
+ controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(2, 0, 1)), 1, CCActiveAnimation::Opacity));
+
+ OwnPtr<CCActiveAnimation> toAdd(createActiveAnimation(adoptPtr(new FakeFloatTransition(2, 0.5, 0)), 2, CCActiveAnimation::Opacity));
+ toAdd->setRunState(CCActiveAnimation::WaitingForStartTime, 0);
+ toAdd->setStartTime(1);
+ controller->add(toAdd.release());
+
+ controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 0.75)), 3, CCActiveAnimation::Opacity));
+
+ // First 2s opacity transition should start immediately.
+ controller->animate(0, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+ controller->animate(0.5, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.25, dummy.opacity());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ controller->animate(1, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.5, dummy.opacity());
+ controller->animate(3, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+ controller->animate(4, events.get());
+ EXPECT_EQ(0.75, dummy.opacity());
+ EXPECT_FALSE(controller->hasActiveAnimation());
+}
+
+// Test that a looping animation loops and for the correct number of iterations.
+TEST(CCLayerAnimationControllerTest, TrivialLooping)
+{
+ OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(
+ CCLayerAnimationController::create(&dummy));
+
+ OwnPtr<CCActiveAnimation> toAdd(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), 1, CCActiveAnimation::Opacity));
+ toAdd->setIterations(3);
+ controller->add(toAdd.release());
+
+ controller->animate(0, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+ controller->animate(1.25, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.25, dummy.opacity());
+ controller->animate(1.75, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.75, dummy.opacity());
+ controller->animate(2.25, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.25, dummy.opacity());
+ controller->animate(2.75, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.75, dummy.opacity());
+ controller->animate(3, events.get());
+ EXPECT_FALSE(controller->hasActiveAnimation());
+ EXPECT_EQ(1, dummy.opacity());
+
+ // Just be extra sure.
+ controller->animate(4, events.get());
+ EXPECT_EQ(1, dummy.opacity());
+}
+
+// Test that an infinitely looping animation does indeed go until aborted.
+TEST(CCLayerAnimationControllerTest, InfiniteLooping)
+{
+ OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(
+ CCLayerAnimationController::create(&dummy));
+
+ const int id = 1;
+ OwnPtr<CCActiveAnimation> toAdd(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), id, CCActiveAnimation::Opacity));
+ toAdd->setIterations(-1);
+ controller->add(toAdd.release());
+
+ controller->animate(0, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+ controller->animate(1.25, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.25, dummy.opacity());
+ controller->animate(1.75, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.75, dummy.opacity());
+
+ controller->animate(1073741824.25, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.25, dummy.opacity());
+ controller->animate(1073741824.75, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.75, dummy.opacity());
+
+ EXPECT_TRUE(controller->getActiveAnimation(id, CCActiveAnimation::Opacity));
+ controller->getActiveAnimation(id, CCActiveAnimation::Opacity)->setRunState(CCActiveAnimation::Aborted, 0.75);
+ EXPECT_FALSE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.75, dummy.opacity());
+}
+
+// Test that pausing and resuming work as expected.
+TEST(CCLayerAnimationControllerTest, PauseResume)
+{
+ OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(
+ CCLayerAnimationController::create(&dummy));
+
+ const int id = 1;
+ controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 0, 1)), id, CCActiveAnimation::Opacity));
+
+ controller->animate(0, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+ controller->animate(0.5, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.5, dummy.opacity());
+
+ EXPECT_TRUE(controller->getActiveAnimation(id, CCActiveAnimation::Opacity));
+ controller->getActiveAnimation(id, CCActiveAnimation::Opacity)->setRunState(CCActiveAnimation::Paused, 0.5);
+
+ controller->animate(1024, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.5, dummy.opacity());
+
+ EXPECT_TRUE(controller->getActiveAnimation(id, CCActiveAnimation::Opacity));
+ controller->getActiveAnimation(id, CCActiveAnimation::Opacity)->setRunState(CCActiveAnimation::Running, 1024);
+
+ controller->animate(1024.25, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.75, dummy.opacity());
+ controller->animate(1024.5, events.get());
+ EXPECT_FALSE(controller->hasActiveAnimation());
+ EXPECT_EQ(1, dummy.opacity());
+}
+
+TEST(CCLayerAnimationControllerTest, AbortAGroupedAnimation)
+{
+ OwnPtr<CCAnimationEventsVector> events(adoptPtr(new CCAnimationEventsVector));
+ FakeLayerAnimationControllerClient dummy;
+ OwnPtr<CCLayerAnimationController> controller(
+ CCLayerAnimationController::create(&dummy));
+
+ const int id = 1;
+ controller->add(createActiveAnimation(adoptPtr(new FakeTransformTransition(1)), id, CCActiveAnimation::Transform));
+ controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(2, 0, 1)), id, CCActiveAnimation::Opacity));
+ controller->add(createActiveAnimation(adoptPtr(new FakeFloatTransition(1, 1, 0.75)), 2, CCActiveAnimation::Opacity));
+
+ controller->animate(0, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0, dummy.opacity());
+ controller->animate(1, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(0.5, dummy.opacity());
+
+ EXPECT_TRUE(controller->getActiveAnimation(id, CCActiveAnimation::Opacity));
+ controller->getActiveAnimation(id, CCActiveAnimation::Opacity)->setRunState(CCActiveAnimation::Aborted, 1);
+ controller->animate(1, events.get());
+ EXPECT_TRUE(controller->hasActiveAnimation());
+ EXPECT_EQ(1, dummy.opacity());
+ controller->animate(2, events.get());
+ EXPECT_TRUE(!controller->hasActiveAnimation());
+ EXPECT_EQ(0.75, dummy.opacity());
+}
+
} // namespace
diff --git a/Source/WebKit/chromium/tests/CCLayerImplTest.cpp b/Source/WebKit/chromium/tests/CCLayerImplTest.cpp
index 8a9f35dc8..36c1082b7 100644
--- a/Source/WebKit/chromium/tests/CCLayerImplTest.cpp
+++ b/Source/WebKit/chromium/tests/CCLayerImplTest.cpp
@@ -81,7 +81,7 @@ TEST(CCLayerImplTest, verifyLayerChangesAreTrackedProperly)
IntSize arbitraryIntSize = IntSize(111, 222);
IntPoint arbitraryIntPoint = IntPoint(333, 444);
IntRect arbitraryIntRect = IntRect(arbitraryIntPoint, arbitraryIntSize);
- FloatRect arbitraryFloatRect = FloatRect(arbitraryFloatPoint, FloatSize(1.234, 5.678));
+ FloatRect arbitraryFloatRect = FloatRect(arbitraryFloatPoint, FloatSize(1.234f, 5.678f));
Color arbitraryColor = Color(10, 20, 30);
TransformationMatrix arbitraryTransform;
arbitraryTransform.scale3d(0.1, 0.2, 0.3);
@@ -112,7 +112,7 @@ TEST(CCLayerImplTest, verifyLayerChangesAreTrackedProperly)
EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED(root->setDebugBorderWidth(arbitraryNumber));
EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED(root->setDrawsContent(true));
EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED(root->setBackgroundColor(Color::gray));
- EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED(root->setBackgroundCoversViewport(true));
+ EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED(root->setBackgroundFilters(arbitraryFilters));
// Special case: check that sublayer transform changes all layer's descendants, but not the layer itself.
root->resetAllChangeTrackingForSubtree();
diff --git a/Source/WebKit/chromium/tests/CCLayerIteratorTest.cpp b/Source/WebKit/chromium/tests/CCLayerIteratorTest.cpp
index 2f5a7a25d..f5eae7f84 100644
--- a/Source/WebKit/chromium/tests/CCLayerIteratorTest.cpp
+++ b/Source/WebKit/chromium/tests/CCLayerIteratorTest.cpp
@@ -47,7 +47,7 @@ public:
int m_countRepresentingContributingSurface;
int m_countRepresentingItself;
- virtual bool drawsContent() const { return m_drawsContent; }
+ virtual bool drawsContent() const OVERRIDE { return m_drawsContent; }
void setDrawsContent(bool drawsContent) { m_drawsContent = drawsContent; }
private:
diff --git a/Source/WebKit/chromium/tests/CCLayerSorterTest.cpp b/Source/WebKit/chromium/tests/CCLayerSorterTest.cpp
index a533c9373..65db549ba 100644
--- a/Source/WebKit/chromium/tests/CCLayerSorterTest.cpp
+++ b/Source/WebKit/chromium/tests/CCLayerSorterTest.cpp
@@ -27,6 +27,7 @@
#include "cc/CCLayerSorter.h"
#include "cc/CCLayerImpl.h"
+#include "cc/CCMathUtil.h"
#include "cc/CCSingleThreadProxy.h"
#include <gtest/gtest.h>
@@ -34,81 +35,94 @@ using namespace WebCore;
namespace {
-TEST(CCLayerSorterTest, PointInTriangle)
+// Note: In the following overlap tests, the "camera" is looking down the negative Z axis,
+// meaning that layers with smaller z values (more negative) are further from the camera
+// and therefore must be drawn before layers with higher z values.
+
+TEST(CCLayerSorterTest, BasicOverlap)
{
- FloatPoint a(10.0, 10.0);
- FloatPoint b(30.0, 10.0);
- FloatPoint c(20.0, 20.0);
-
- // Point in the center is in the triangle.
- EXPECT_TRUE(CCLayerSorter::pointInTriangle(FloatPoint(20.0, 15.0), a, b, c));
-
- // Permuting the corners doesn't change the result.
- EXPECT_TRUE(CCLayerSorter::pointInTriangle(FloatPoint(20.0, 15.0), a, c, b));
- EXPECT_TRUE(CCLayerSorter::pointInTriangle(FloatPoint(20.0, 15.0), b, a, c));
- EXPECT_TRUE(CCLayerSorter::pointInTriangle(FloatPoint(20.0, 15.0), b, c, a));
- EXPECT_TRUE(CCLayerSorter::pointInTriangle(FloatPoint(20.0, 15.0), c, a, b));
- EXPECT_TRUE(CCLayerSorter::pointInTriangle(FloatPoint(20.0, 15.0), c, b, a));
-
- // Points on the edges are not in the triangle.
- EXPECT_FALSE(CCLayerSorter::pointInTriangle(FloatPoint(20.0, 10.0), a, b, c));
- EXPECT_FALSE(CCLayerSorter::pointInTriangle(FloatPoint(15.0, 15.0), a, b, c));
- EXPECT_FALSE(CCLayerSorter::pointInTriangle(FloatPoint(25.0, 15.0), a, b, c));
-
- // Points just inside the edges are in the triangle.
- EXPECT_TRUE(CCLayerSorter::pointInTriangle(FloatPoint(20.0, 10.01), a, b, c));
- EXPECT_TRUE(CCLayerSorter::pointInTriangle(FloatPoint(15.01, 15.0), a, b, c));
- EXPECT_TRUE(CCLayerSorter::pointInTriangle(FloatPoint(24.99, 15.0), a, b, c));
-
- // Zero-area triangle doesn't intersect any point.
- EXPECT_FALSE(CCLayerSorter::pointInTriangle(FloatPoint(15.0, 10.0), a, b, FloatPoint(20.0, 10.0)));
+ CCLayerSorter::ABCompareResult overlapResult;
+ const float zThreshold = 0.1f;
+ float weight = 0;
+
+ // Trivial test, with one layer directly obscuring the other.
+ TransformationMatrix neg4Translate;
+ neg4Translate.translate3d(0, 0, -4);
+ CCLayerSorter::LayerShape front(2, 2, neg4Translate);
+
+ TransformationMatrix neg5Translate;
+ neg5Translate.translate3d(0, 0, -5);
+ CCLayerSorter::LayerShape back(2, 2, neg5Translate);
+
+ overlapResult = CCLayerSorter::checkOverlap(&front, &back, zThreshold, weight);
+ EXPECT_EQ(CCLayerSorter::BBeforeA, overlapResult);
+ EXPECT_EQ(1, weight);
+
+ overlapResult = CCLayerSorter::checkOverlap(&back, &front, zThreshold, weight);
+ EXPECT_EQ(CCLayerSorter::ABeforeB, overlapResult);
+ EXPECT_EQ(1, weight);
+
+ // One layer translated off to the right. No overlap should be detected.
+ TransformationMatrix rightTranslate;
+ rightTranslate.translate3d(10, 0, -5);
+ CCLayerSorter::LayerShape backRight(2, 2, rightTranslate);
+ overlapResult = CCLayerSorter::checkOverlap(&front, &backRight, zThreshold, weight);
+ EXPECT_EQ(CCLayerSorter::None, overlapResult);
+
+ // When comparing a layer with itself, z difference is always 0.
+ overlapResult = CCLayerSorter::checkOverlap(&front, &front, zThreshold, weight);
+ EXPECT_EQ(0, weight);
}
-TEST(CCLayerSorterTest, CalculateZDiff)
+TEST(CCLayerSorterTest, RightAngleOverlap)
{
- // This should be bigger than the range of z values used.
- const float threshold = 10.0;
+ CCLayerSorter::ABCompareResult overlapResult;
+ const float zThreshold = 0.1f;
+ float weight = 0;
+
+ TransformationMatrix perspectiveMatrix;
+ perspectiveMatrix.applyPerspective(1000);
+
+ // Two layers forming a right angle with a perspective viewing transform.
+ TransformationMatrix leftFaceMatrix;
+ leftFaceMatrix.rotate3d(0, 1, 0, -90).translateRight3d(-1, 0, -5);
+ CCLayerSorter::LayerShape leftFace(2, 2, perspectiveMatrix * leftFaceMatrix);
+ TransformationMatrix frontFaceMatrix;
+ frontFaceMatrix.translate3d(0, 0, -4);
+ CCLayerSorter::LayerShape frontFace(2, 2, perspectiveMatrix * frontFaceMatrix);
+
+ overlapResult = CCLayerSorter::checkOverlap(&frontFace, &leftFace, zThreshold, weight);
+ EXPECT_EQ(CCLayerSorter::BBeforeA, overlapResult);
+}
- // Trivial test, with one layer directly obscuring the other.
+TEST(CCLayerSorterTest, IntersectingLayerOverlap)
+{
+ CCLayerSorter::ABCompareResult overlapResult;
+ const float zThreshold = 0.1f;
+ float weight = 0;
+
+ TransformationMatrix perspectiveMatrix;
+ perspectiveMatrix.applyPerspective(1000);
+
+ // Intersecting layers. An explicit order will be returned based on relative z
+ // values at the overlapping features but the weight returned should be zero.
+ TransformationMatrix frontFaceMatrix;
+ frontFaceMatrix.translate3d(0, 0, -4);
+ CCLayerSorter::LayerShape frontFace(2, 2, perspectiveMatrix * frontFaceMatrix);
+
+ TransformationMatrix throughMatrix;
+ throughMatrix.rotate3d(0, 1, 0, 45).translateRight3d(0, 0, -4);
+ CCLayerSorter::LayerShape rotatedFace(2, 2, perspectiveMatrix * throughMatrix);
+ overlapResult = CCLayerSorter::checkOverlap(&frontFace, &rotatedFace, zThreshold, weight);
+ EXPECT_NE(CCLayerSorter::None, overlapResult);
+ EXPECT_EQ(0, weight);
+}
- CCLayerSorter::LayerShape front(
- FloatPoint3D(-1.0, 1.0, 5.0),
- FloatPoint3D(1.0, 1.0, 5.0),
- FloatPoint3D(1.0, -1.0, 5.0),
- FloatPoint3D(-1.0, -1.0, 5.0));
-
- CCLayerSorter::LayerShape back(
- FloatPoint3D(-1.0, 1.0, 4.0),
- FloatPoint3D(1.0, 1.0, 4.0),
- FloatPoint3D(1.0, -1.0, 4.0),
- FloatPoint3D(-1.0, -1.0, 4.0));
-
- EXPECT_GT(CCLayerSorter::calculateZDiff(front, back, threshold), 0.0);
- EXPECT_LT(CCLayerSorter::calculateZDiff(back, front, threshold), 0.0);
-
- // When comparing a layer with itself, zDiff is always 0.
- EXPECT_EQ(CCLayerSorter::calculateZDiff(front, front, threshold), 0.0);
- EXPECT_EQ(CCLayerSorter::calculateZDiff(back, back, threshold), 0.0);
-
- // Same again but with two layers that intersect only at one point (0,0).
- // This *does* count as obscuring, so we should get the same results.
-
- front = CCLayerSorter::LayerShape(
- FloatPoint3D(-1.0, 0.0, 5.0),
- FloatPoint3D(0.0, 0.0, 5.0),
- FloatPoint3D(0.0, -1.0, 5.0),
- FloatPoint3D(-1.0, -1.0, 5.0));
-
- back = CCLayerSorter::LayerShape(
- FloatPoint3D(0.0, 1.0, 4.0),
- FloatPoint3D(1.0, 1.0, 4.0),
- FloatPoint3D(1.0, 0.0, 4.0),
- FloatPoint3D(0.0, 0.0, 4.0));
-
- EXPECT_GT(CCLayerSorter::calculateZDiff(front, back, threshold), 0.0);
- EXPECT_LT(CCLayerSorter::calculateZDiff(back, front, threshold), 0.0);
- EXPECT_EQ(CCLayerSorter::calculateZDiff(front, front, threshold), 0.0);
- EXPECT_EQ(CCLayerSorter::calculateZDiff(back, back, threshold), 0.0);
+TEST(CCLayerSorterTest, LayersAtAngleOverlap)
+{
+ CCLayerSorter::ABCompareResult overlapResult;
+ const float zThreshold = 0.1f;
+ float weight = 0;
// Trickier test with layers at an angle.
//
@@ -120,42 +134,64 @@ TEST(CCLayerSorterTest, CalculateZDiff)
// +z /
//
// C is in front of A and behind B (not what you'd expect by comparing centers).
- // A and B don't overlap, so they're incomparable (zDiff = 0).
-
- const float yHi = 10.0;
- const float yLo = -10.0;
- const float zA = 1.0;
- const float zB = -1.0;
-
- CCLayerSorter::LayerShape layerA(
- FloatPoint3D(-10.0, yHi, zA),
- FloatPoint3D(-2.0, yHi, zA),
- FloatPoint3D(-2.0, yLo, zA),
- FloatPoint3D(-10.0, yLo, zA));
-
- CCLayerSorter::LayerShape layerB(
- FloatPoint3D(2.0, yHi, zB),
- FloatPoint3D(10.0, yHi, zB),
- FloatPoint3D(10.0, yLo, zB),
- FloatPoint3D(2.0, yLo, zB));
-
- CCLayerSorter::LayerShape layerC(
- FloatPoint3D(-5.0, yHi, 5.0),
- FloatPoint3D(5.0, yHi, -5.0),
- FloatPoint3D(5.0, yLo, -5.0),
- FloatPoint3D(-5.0, yLo, 5.0));
-
- EXPECT_EQ(CCLayerSorter::calculateZDiff(layerA, layerA, threshold), 0.0);
- EXPECT_EQ(CCLayerSorter::calculateZDiff(layerA, layerB, threshold), 0.0);
- EXPECT_LT(CCLayerSorter::calculateZDiff(layerA, layerC, threshold), 0.0);
-
- EXPECT_EQ(CCLayerSorter::calculateZDiff(layerB, layerA, threshold), 0.0);
- EXPECT_EQ(CCLayerSorter::calculateZDiff(layerB, layerB, threshold), 0.0);
- EXPECT_GT(CCLayerSorter::calculateZDiff(layerB, layerC, threshold), 0.0);
-
- EXPECT_GT(CCLayerSorter::calculateZDiff(layerC, layerA, threshold), 0.0);
- EXPECT_LT(CCLayerSorter::calculateZDiff(layerC, layerB, threshold), 0.0);
- EXPECT_EQ(CCLayerSorter::calculateZDiff(layerC, layerC, threshold), 0.0);
+ // A and B don't overlap, so they're incomparable.
+
+ TransformationMatrix transformA;
+ transformA.translate3d(-6, 0, 1);
+ CCLayerSorter::LayerShape layerA(8, 20, transformA);
+
+ TransformationMatrix transformB;
+ transformB.translate3d(6, 0, -1);
+ CCLayerSorter::LayerShape layerB(8, 20, transformB);
+
+ TransformationMatrix transformC;
+ transformC.rotate3d(0, 1, 0, 40);
+ CCLayerSorter::LayerShape layerC(8, 20, transformC);
+
+ overlapResult = CCLayerSorter::checkOverlap(&layerA, &layerC, zThreshold, weight);
+ EXPECT_EQ(CCLayerSorter::ABeforeB, overlapResult);
+ overlapResult = CCLayerSorter::checkOverlap(&layerC, &layerB, zThreshold, weight);
+ EXPECT_EQ(CCLayerSorter::ABeforeB, overlapResult);
+ overlapResult = CCLayerSorter::checkOverlap(&layerA, &layerB, zThreshold, weight);
+ EXPECT_EQ(CCLayerSorter::None, overlapResult);
+}
+
+TEST(CCLayerSorterTest, LayersUnderPathologicalPerspectiveTransform)
+{
+ CCLayerSorter::ABCompareResult overlapResult;
+ const float zThreshold = 0.1f;
+ float weight = 0;
+
+ // On perspective projection, if w becomes negative, the re-projected point will be
+ // invalid and un-usable. Correct code needs to clip away portions of the geometry
+ // where w < 0. If the code uses the invalid value, it will think that a layer has
+ // different bounds than it really does, which can cause things to sort incorrectly.
+
+ TransformationMatrix perspectiveMatrix;
+ perspectiveMatrix.applyPerspective(1);
+
+ TransformationMatrix transformA;
+ transformA.translate3d(-15, 0, -2);
+ CCLayerSorter::LayerShape layerA(10, 10, perspectiveMatrix * transformA);
+
+ // With this sequence of transforms, when layer B is correctly clipped, it will be
+ // visible on the left half of the projection plane, in front of layerA. When it is
+ // not clipped, its bounds will actually incorrectly appear much smaller and the
+ // correct sorting dependency will not be found.
+ TransformationMatrix transformB;
+ transformB.translate3d(0, 0, 0.7);
+ transformB.rotate3d(0, 45, 0);
+ CCLayerSorter::LayerShape layerB(10, 10, perspectiveMatrix * transformB);
+
+ // Sanity check that the test case actually covers the intended scenario, where part
+ // of layer B go behind the w = 0 plane.
+ FloatQuad testQuad = FloatQuad(FloatRect(FloatPoint(-0.5, -0.5), FloatSize(1, 1)));
+ bool clipped = false;
+ CCMathUtil::mapQuad(perspectiveMatrix * transformB, testQuad, clipped);
+ ASSERT_TRUE(clipped);
+
+ overlapResult = CCLayerSorter::checkOverlap(&layerA, &layerB, zThreshold, weight);
+ EXPECT_EQ(CCLayerSorter::ABeforeB, overlapResult);
}
TEST(CCLayerSorterTest, verifyExistingOrderingPreservedWhenNoZDiff)
diff --git a/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp b/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp
index e6206cc58..51a032618 100644
--- a/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp
+++ b/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp
@@ -26,14 +26,19 @@
#include "cc/CCLayerTreeHostCommon.h"
+#include "CCAnimationTestCommon.h"
#include "CCLayerTreeTestCommon.h"
#include "LayerChromium.h"
#include "TransformationMatrix.h"
+#include "TranslateTransformOperation.h"
+#include "cc/CCLayerAnimationController.h"
+#include "cc/CCMathUtil.h"
#include <gmock/gmock.h>
#include <gtest/gtest.h>
using namespace WebCore;
+using namespace WebKitTests;
namespace {
@@ -76,7 +81,7 @@ public:
{
}
- virtual bool drawsContent() const { return true; }
+ virtual bool drawsContent() const OVERRIDE { return true; }
};
TEST(CCLayerTreeHostCommonTest, verifyTransformsForNoOpLayer)
@@ -308,6 +313,56 @@ TEST(CCLayerTreeHostCommonTest, verifyTransformsForSingleRenderSurface)
EXPECT_TRANSFORMATION_MATRIX_EQ(parentCompositeTransform, child->targetRenderSurface()->originTransform());
EXPECT_TRANSFORMATION_MATRIX_EQ(parentCompositeTransform, child->targetRenderSurface()->drawTransform());
+ // The screen space is the same as the target since the child surface draws into the root.
+ EXPECT_TRANSFORMATION_MATRIX_EQ(parentCompositeTransform, child->targetRenderSurface()->screenSpaceTransform());
+}
+
+TEST(CCLayerTreeHostCommonTest, verifyTransformsForReplica)
+{
+ RefPtr<LayerChromium> parent = LayerChromium::create();
+ RefPtr<LayerChromium> child = LayerChromium::create();
+ RefPtr<LayerChromium> childReplica = LayerChromium::create();
+ RefPtr<LayerChromiumWithForcedDrawsContent> grandChild = adoptRef(new LayerChromiumWithForcedDrawsContent());
+ parent->createRenderSurface();
+ parent->addChild(child);
+ child->addChild(grandChild);
+ child->setReplicaLayer(childReplica.get());
+
+ // Child is set up so that a new render surface should be created.
+ child->setOpacity(0.5f);
+
+ TransformationMatrix identityMatrix;
+ TransformationMatrix parentLayerTransform;
+ parentLayerTransform.scale3d(2.0, 2.0, 1.0);
+ TransformationMatrix parentTranslationToAnchor;
+ parentTranslationToAnchor.translate(2.5, 3.0);
+ TransformationMatrix parentSublayerMatrix;
+ parentSublayerMatrix.scale3d(10.0, 10.0, 3.3);
+ TransformationMatrix parentTranslationToCenter;
+ parentTranslationToCenter.translate(5.0, 6.0);
+ TransformationMatrix parentCompositeTransform = parentTranslationToAnchor * parentLayerTransform * parentTranslationToAnchor.inverse()
+ * parentTranslationToCenter * parentSublayerMatrix * parentTranslationToCenter.inverse();
+ TransformationMatrix childTranslationToCenter;
+ childTranslationToCenter.translate(8.0, 9.0);
+ TransformationMatrix replicaLayerTransform;
+ replicaLayerTransform.scale3d(3.0, 3.0, 1.0);
+ TransformationMatrix replicaCompositeTransform = parentCompositeTransform * replicaLayerTransform;
+
+ // Child's render surface should not exist yet.
+ ASSERT_FALSE(child->renderSurface());
+
+ setLayerPropertiesForTesting(parent.get(), parentLayerTransform, parentSublayerMatrix, FloatPoint(0.25f, 0.25f), FloatPoint(2.5f, 3.0f), IntSize(10, 12), false);
+ setLayerPropertiesForTesting(child.get(), identityMatrix, identityMatrix, FloatPoint(0.0f, 0.0f), FloatPoint(0.0f, 0.0f), IntSize(16, 18), false);
+ setLayerPropertiesForTesting(grandChild.get(), identityMatrix, identityMatrix, FloatPoint(0.0f, 0.0f), FloatPoint(-0.5f, -0.5f), IntSize(1, 1), false);
+ setLayerPropertiesForTesting(childReplica.get(), replicaLayerTransform, identityMatrix, FloatPoint(0.0f, 0.0f), FloatPoint(0.0f, 0.0f), IntSize(0, 0), false);
+ executeCalculateDrawTransformsAndVisibility(parent.get());
+
+ // Render surface should have been created now.
+ ASSERT_TRUE(child->renderSurface());
+ ASSERT_EQ(child->renderSurface(), child->targetRenderSurface());
+
+ EXPECT_TRANSFORMATION_MATRIX_EQ(replicaCompositeTransform, child->targetRenderSurface()->replicaOriginTransform());
+ EXPECT_TRANSFORMATION_MATRIX_EQ(replicaCompositeTransform, child->targetRenderSurface()->replicaScreenSpaceTransform());
}
TEST(CCLayerTreeHostCommonTest, verifyTransformsForRenderSurfaceHierarchy)
@@ -315,6 +370,7 @@ TEST(CCLayerTreeHostCommonTest, verifyTransformsForRenderSurfaceHierarchy)
// This test creates a more complex tree and verifies it all at once. This covers the following cases:
// - layers that are described w.r.t. a render surface: should have draw transforms described w.r.t. that surface
// - A render surface described w.r.t. an ancestor render surface: should have a draw transform described w.r.t. that ancestor surface
+ // - Replicas of a render surface are described w.r.t. the replica's transform around its anchor, along with the surface itself.
// - Sanity check on recursion: verify transforms of layers described w.r.t. a render surface that is described w.r.t. an ancestor render surface.
// - verifying that each layer has a reference to the correct renderSurface and targetRenderSurface values.
@@ -324,6 +380,8 @@ TEST(CCLayerTreeHostCommonTest, verifyTransformsForRenderSurfaceHierarchy)
RefPtr<LayerChromium> childOfRoot = LayerChromium::create();
RefPtr<LayerChromium> childOfRS1 = LayerChromium::create();
RefPtr<LayerChromium> childOfRS2 = LayerChromium::create();
+ RefPtr<LayerChromium> replicaOfRS1 = LayerChromium::create();
+ RefPtr<LayerChromium> replicaOfRS2 = LayerChromium::create();
RefPtr<LayerChromium> grandChildOfRoot = LayerChromium::create();
RefPtr<LayerChromiumWithForcedDrawsContent> grandChildOfRS1 = adoptRef(new LayerChromiumWithForcedDrawsContent());
RefPtr<LayerChromiumWithForcedDrawsContent> grandChildOfRS2 = adoptRef(new LayerChromiumWithForcedDrawsContent());
@@ -336,6 +394,8 @@ TEST(CCLayerTreeHostCommonTest, verifyTransformsForRenderSurfaceHierarchy)
childOfRoot->addChild(grandChildOfRoot);
childOfRS1->addChild(grandChildOfRS1);
childOfRS2->addChild(grandChildOfRS2);
+ renderSurface1->setReplicaLayer(replicaOfRS1.get());
+ renderSurface2->setReplicaLayer(replicaOfRS2.get());
// In combination with descendantDrawsContent, opacity != 1 forces the layer to have a new renderSurface.
renderSurface1->setOpacity(0.5f);
@@ -344,6 +404,7 @@ TEST(CCLayerTreeHostCommonTest, verifyTransformsForRenderSurfaceHierarchy)
// All layers in the tree are initialized with an anchor at 2.5 and a size of (10,10).
// matrix "A" is the composite layer transform used in all layers, centered about the anchor point
// matrix "B" is the sublayer transform used in all layers, centered about the center position of the layer.
+ // matrix "R" is the composite replica transform used in all replica layers.
//
// x component tests that layerTransform and sublayerTransform are done in the right order (translation and scale are noncommutative).
// y component has a translation by 1.0 for every ancestor, which indicates the "depth" of the layer in the hierarchy.
@@ -355,9 +416,12 @@ TEST(CCLayerTreeHostCommonTest, verifyTransformsForRenderSurfaceHierarchy)
layerTransform.translate(1.0, 1.0);
TransformationMatrix sublayerTransform;
sublayerTransform.scale3d(10.0, 1.0, 1.0);
+ TransformationMatrix replicaLayerTransform;
+ replicaLayerTransform.scale3d(-2.0, 5.0, 1.0);
TransformationMatrix A = translationToAnchor * layerTransform * translationToAnchor.inverse();
TransformationMatrix B = translationToCenter * sublayerTransform * translationToCenter.inverse();
+ TransformationMatrix R = A * translationToAnchor * replicaLayerTransform * translationToAnchor.inverse();
setLayerPropertiesForTesting(parent.get(), layerTransform, sublayerTransform, FloatPoint(0.25f, 0.0f), FloatPoint(2.5f, 0.0f), IntSize(10, 10), false);
setLayerPropertiesForTesting(renderSurface1.get(), layerTransform, sublayerTransform, FloatPoint(0.25f, 0.0f), FloatPoint(2.5f, 0.0f), IntSize(10, 10), false);
@@ -368,6 +432,8 @@ TEST(CCLayerTreeHostCommonTest, verifyTransformsForRenderSurfaceHierarchy)
setLayerPropertiesForTesting(grandChildOfRoot.get(), layerTransform, sublayerTransform, FloatPoint(0.25f, 0.0f), FloatPoint(2.5f, 0.0f), IntSize(10, 10), false);
setLayerPropertiesForTesting(grandChildOfRS1.get(), layerTransform, sublayerTransform, FloatPoint(0.25f, 0.0f), FloatPoint(2.5f, 0.0f), IntSize(10, 10), false);
setLayerPropertiesForTesting(grandChildOfRS2.get(), layerTransform, sublayerTransform, FloatPoint(0.25f, 0.0f), FloatPoint(2.5f, 0.0f), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(replicaOfRS1.get(), replicaLayerTransform, sublayerTransform, FloatPoint(), FloatPoint(2.5f, 0.0f), IntSize(), false);
+ setLayerPropertiesForTesting(replicaOfRS2.get(), replicaLayerTransform, sublayerTransform, FloatPoint(), FloatPoint(2.5f, 0.0f), IntSize(), false);
executeCalculateDrawTransformsAndVisibility(parent.get());
@@ -433,8 +499,14 @@ TEST(CCLayerTreeHostCommonTest, verifyTransformsForRenderSurfaceHierarchy)
//
// Origin transform of render surface 1 is described with respect to root.
EXPECT_TRANSFORMATION_MATRIX_EQ(A * B * A, renderSurface1->renderSurface()->originTransform());
+ EXPECT_TRANSFORMATION_MATRIX_EQ(A * B * R, renderSurface1->renderSurface()->replicaOriginTransform());
+ EXPECT_TRANSFORMATION_MATRIX_EQ(A * B * A, renderSurface1->renderSurface()->screenSpaceTransform());
+ EXPECT_TRANSFORMATION_MATRIX_EQ(A * B * R, renderSurface1->renderSurface()->replicaScreenSpaceTransform());
// Origin transform of render surface 2 is described with respect to render surface 2.
EXPECT_TRANSFORMATION_MATRIX_EQ(B * A, renderSurface2->renderSurface()->originTransform());
+ EXPECT_TRANSFORMATION_MATRIX_EQ(B * R, renderSurface2->renderSurface()->replicaOriginTransform());
+ EXPECT_TRANSFORMATION_MATRIX_EQ(A * B * A * B * A, renderSurface2->renderSurface()->screenSpaceTransform());
+ EXPECT_TRANSFORMATION_MATRIX_EQ(A * B * A * B * R, renderSurface2->renderSurface()->replicaScreenSpaceTransform());
// Sanity check. If these fail there is probably a bug in the test itself.
// It is expected that we correctly set up transforms so that the y-component of the screen-space transform
@@ -457,7 +529,7 @@ TEST(CCLayerTreeHostCommonTest, verifyRenderSurfaceListForClipLayer)
RefPtr<LayerChromium> parent = LayerChromium::create();
RefPtr<LayerChromium> renderSurface1 = LayerChromium::create();
RefPtr<LayerChromiumWithForcedDrawsContent> child = adoptRef(new LayerChromiumWithForcedDrawsContent());
- renderSurface1->setOpacity(0.9);
+ renderSurface1->setOpacity(0.9f);
const TransformationMatrix identityMatrix;
setLayerPropertiesForTesting(renderSurface1.get(), identityMatrix, identityMatrix, FloatPoint::zero(), FloatPoint::zero(), IntSize(10, 10), false);
@@ -550,9 +622,58 @@ TEST(CCLayerTreeHostCommonTest, verifyClipRectCullsRenderSurfaces)
setLayerPropertiesForTesting(leafNode2.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(20, 20), false);
child->setMasksToBounds(true);
- child->setOpacity(0.4);
- grandChild->setOpacity(0.5);
- greatGrandChild->setOpacity(0.4);
+ child->setOpacity(0.4f);
+ grandChild->setOpacity(0.5f);
+ greatGrandChild->setOpacity(0.4f);
+
+ Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
+ Vector<RefPtr<LayerChromium> > dummyLayerList;
+ int dummyMaxTextureSize = 512;
+
+ // FIXME: when we fix this "root-layer special case" behavior in CCLayerTreeHost, we will have to fix it here, too.
+ parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
+ renderSurfaceLayerList.append(parent.get());
+
+ CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
+
+ ASSERT_EQ(2U, renderSurfaceLayerList.size());
+ EXPECT_EQ(parent->id(), renderSurfaceLayerList[0]->id());
+ EXPECT_EQ(child->id(), renderSurfaceLayerList[1]->id());
+}
+
+TEST(CCLayerTreeHostCommonTest, verifyClipRectCullsRenderSurfacesCrashRepro)
+{
+ // This is a similar situation as verifyClipRectCullsRenderSurfaces, except that
+ // it reproduces a crash bug http://code.google.com/p/chromium/issues/detail?id=106734.
+
+ const TransformationMatrix identityMatrix;
+ RefPtr<LayerChromium> parent = LayerChromium::create();
+ RefPtr<LayerChromium> child = LayerChromium::create();
+ RefPtr<LayerChromium> grandChild = LayerChromium::create();
+ RefPtr<LayerChromium> greatGrandChild = LayerChromium::create();
+ RefPtr<LayerChromiumWithForcedDrawsContent> leafNode1 = adoptRef(new LayerChromiumWithForcedDrawsContent());
+ RefPtr<LayerChromiumWithForcedDrawsContent> leafNode2 = adoptRef(new LayerChromiumWithForcedDrawsContent());
+ parent->createRenderSurface();
+ parent->addChild(child);
+ child->addChild(grandChild);
+ grandChild->addChild(greatGrandChild);
+
+ // leafNode1 ensures that parent and child are kept on the renderSurfaceLayerList,
+ // even though grandChild and greatGrandChild should be clipped.
+ child->addChild(leafNode1);
+ greatGrandChild->addChild(leafNode2);
+
+ setLayerPropertiesForTesting(parent.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(500, 500), false);
+ setLayerPropertiesForTesting(child.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(20, 20), false);
+ setLayerPropertiesForTesting(grandChild.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(45, 45), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(greatGrandChild.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(leafNode1.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(500, 500), false);
+ setLayerPropertiesForTesting(leafNode2.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(20, 20), false);
+
+ child->setMasksToBounds(true);
+ child->setOpacity(0.4f);
+ grandChild->setOpacity(0.5f);
+ greatGrandChild->setOpacity(0.4f);
// Contaminate the grandChild and greatGrandChild's clipRect to reproduce the crash
// bug found in http://code.google.com/p/chromium/issues/detail?id=106734. In this
@@ -561,9 +682,6 @@ TEST(CCLayerTreeHostCommonTest, verifyClipRectCullsRenderSurfaces)
// renderSurface remains on the renderSurfaceLayerList, which violates the assumption
// that an empty renderSurface will always be the last item on the list, which
// ultimately caused the crash.
- //
- // FIXME: it is also useful to test with this commented out. Eventually we should
- // create several test cases that test clipRect/drawableContentRect computation.
child->setClipRect(IntRect(IntPoint::zero(), IntSize(20, 20)));
greatGrandChild->setClipRect(IntRect(IntPoint::zero(), IntSize(1234, 1234)));
@@ -582,6 +700,631 @@ TEST(CCLayerTreeHostCommonTest, verifyClipRectCullsRenderSurfaces)
EXPECT_EQ(child->id(), renderSurfaceLayerList[1]->id());
}
+TEST(CCLayerTreeHostCommonTest, verifyClipRectIsPropagatedCorrectlyToLayers)
+{
+ // Verify that layers get the appropriate clipRects when their parent masksToBounds is true.
+ //
+ // grandChild1 - completely inside the region; clipRect should be the mask region (larger than this layer's bounds).
+ // grandChild2 - partially clipped but NOT masksToBounds; the clipRect should be the parent's clipRect regardless of the layer's bounds.
+ // grandChild3 - partially clipped and masksToBounds; the clipRect will be the intersection of layerBounds and the mask region.
+ // grandChild4 - outside parent's clipRect, and masksToBounds; the clipRect should be empty.
+ //
+
+ const TransformationMatrix identityMatrix;
+ RefPtr<LayerChromium> parent = LayerChromium::create();
+ RefPtr<LayerChromium> child = LayerChromium::create();
+ RefPtr<LayerChromium> grandChild1 = LayerChromium::create();
+ RefPtr<LayerChromium> grandChild2 = LayerChromium::create();
+ RefPtr<LayerChromium> grandChild3 = LayerChromium::create();
+ RefPtr<LayerChromium> grandChild4 = LayerChromium::create();
+
+ parent->createRenderSurface();
+ parent->addChild(child);
+ child->addChild(grandChild1);
+ child->addChild(grandChild2);
+ child->addChild(grandChild3);
+ child->addChild(grandChild4);
+
+ setLayerPropertiesForTesting(parent.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(500, 500), false);
+ setLayerPropertiesForTesting(child.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(20, 20), false);
+ setLayerPropertiesForTesting(grandChild1.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(5, 5), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(grandChild2.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(15, 15), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(grandChild3.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(15, 15), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(grandChild4.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(45, 45), IntSize(10, 10), false);
+
+ child->setMasksToBounds(true);
+ grandChild3->setMasksToBounds(true);
+ grandChild4->setMasksToBounds(true);
+
+ // Force everyone to be a render surface.
+ child->setOpacity(0.4f);
+ grandChild1->setOpacity(0.5f);
+ grandChild2->setOpacity(0.5f);
+ grandChild3->setOpacity(0.5f);
+ grandChild4->setOpacity(0.5f);
+
+ Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
+ Vector<RefPtr<LayerChromium> > dummyLayerList;
+ int dummyMaxTextureSize = 512;
+
+ // FIXME: when we fix this "root-layer special case" behavior in CCLayerTreeHost, we will have to fix it here, too.
+ parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
+ renderSurfaceLayerList.append(parent.get());
+
+ CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
+
+ EXPECT_INT_RECT_EQ(IntRect(IntPoint::zero(), IntSize(20, 20)), grandChild1->clipRect());
+ EXPECT_INT_RECT_EQ(IntRect(IntPoint::zero(), IntSize(20, 20)), grandChild2->clipRect());
+ EXPECT_INT_RECT_EQ(IntRect(IntPoint(15, 15), IntSize(5, 5)), grandChild3->clipRect());
+ EXPECT_TRUE(grandChild4->clipRect().isEmpty());
+}
+
+TEST(CCLayerTreeHostCommonTest, verifyClipRectIsPropagatedCorrectlyToSurfaces)
+{
+ // Verify that renderSurfaces (and their layers) get the appropriate clipRects when their parent masksToBounds is true.
+ //
+ // Layers that own renderSurfaces (at least for now) do not inherit any clipRect;
+ // instead the surface will enforce the clip for the entire subtree. They may still
+ // have a clipRect of their own layer bounds, however, if masksToBounds was true.
+ //
+
+ const TransformationMatrix identityMatrix;
+ RefPtr<LayerChromium> parent = LayerChromium::create();
+ RefPtr<LayerChromium> child = LayerChromium::create();
+ RefPtr<LayerChromium> grandChild1 = LayerChromium::create();
+ RefPtr<LayerChromium> grandChild2 = LayerChromium::create();
+ RefPtr<LayerChromium> grandChild3 = LayerChromium::create();
+ RefPtr<LayerChromium> grandChild4 = LayerChromium::create();
+ RefPtr<LayerChromiumWithForcedDrawsContent> leafNode1 = adoptRef(new LayerChromiumWithForcedDrawsContent());
+ RefPtr<LayerChromiumWithForcedDrawsContent> leafNode2 = adoptRef(new LayerChromiumWithForcedDrawsContent());
+ RefPtr<LayerChromiumWithForcedDrawsContent> leafNode3 = adoptRef(new LayerChromiumWithForcedDrawsContent());
+ RefPtr<LayerChromiumWithForcedDrawsContent> leafNode4 = adoptRef(new LayerChromiumWithForcedDrawsContent());
+
+ parent->createRenderSurface();
+ parent->addChild(child);
+ child->addChild(grandChild1);
+ child->addChild(grandChild2);
+ child->addChild(grandChild3);
+ child->addChild(grandChild4);
+
+ // the leaf nodes ensure that these grandChildren become renderSurfaces for this test.
+ grandChild1->addChild(leafNode1);
+ grandChild2->addChild(leafNode2);
+ grandChild3->addChild(leafNode3);
+ grandChild4->addChild(leafNode4);
+
+ setLayerPropertiesForTesting(parent.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(500, 500), false);
+ setLayerPropertiesForTesting(child.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(20, 20), false);
+ setLayerPropertiesForTesting(grandChild1.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(5, 5), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(grandChild2.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(15, 15), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(grandChild3.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(15, 15), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(grandChild4.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(45, 45), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(leafNode1.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(leafNode2.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(leafNode3.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(leafNode4.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(10, 10), false);
+
+ child->setMasksToBounds(true);
+ grandChild3->setMasksToBounds(true);
+ grandChild4->setMasksToBounds(true);
+
+ // Force everyone to be a render surface.
+ child->setOpacity(0.4f);
+ grandChild1->setOpacity(0.5f);
+ grandChild2->setOpacity(0.5f);
+ grandChild3->setOpacity(0.5f);
+ grandChild4->setOpacity(0.5f);
+
+ Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
+ Vector<RefPtr<LayerChromium> > dummyLayerList;
+ int dummyMaxTextureSize = 512;
+
+ // FIXME: when we fix this "root-layer special case" behavior in CCLayerTreeHost, we will have to fix it here, too.
+ parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
+ renderSurfaceLayerList.append(parent.get());
+
+ CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
+
+ ASSERT_TRUE(grandChild1->renderSurface());
+ ASSERT_TRUE(grandChild2->renderSurface());
+ ASSERT_TRUE(grandChild3->renderSurface());
+ EXPECT_FALSE(grandChild4->renderSurface()); // Because grandChild4 is entirely clipped, it is expected to not have a renderSurface.
+
+ // Surfaces are clipped by their parent, but un-affected by the owning layer's masksToBounds.
+ EXPECT_INT_RECT_EQ(IntRect(IntPoint(0, 0), IntSize(20, 20)), grandChild1->renderSurface()->clipRect());
+ EXPECT_INT_RECT_EQ(IntRect(IntPoint(0, 0), IntSize(20, 20)), grandChild2->renderSurface()->clipRect());
+ EXPECT_INT_RECT_EQ(IntRect(IntPoint(0, 0), IntSize(20, 20)), grandChild3->renderSurface()->clipRect());
+
+ // Layers do not inherit the clipRect from their owned surfaces, but if masksToBounds is true, they do create their own clipRect.
+ EXPECT_FALSE(grandChild1->usesLayerClipping());
+ EXPECT_FALSE(grandChild2->usesLayerClipping());
+ EXPECT_TRUE(grandChild3->usesLayerClipping());
+ EXPECT_TRUE(grandChild4->usesLayerClipping());
+}
+
+TEST(CCLayerTreeHostCommonTest, verifyAnimationsForRenderSurfaceHierarchy)
+{
+ RefPtr<LayerChromium> parent = LayerChromium::create();
+ RefPtr<LayerChromium> renderSurface1 = LayerChromium::create();
+ RefPtr<LayerChromium> renderSurface2 = LayerChromium::create();
+ RefPtr<LayerChromium> childOfRoot = LayerChromium::create();
+ RefPtr<LayerChromium> childOfRS1 = LayerChromium::create();
+ RefPtr<LayerChromium> childOfRS2 = LayerChromium::create();
+ RefPtr<LayerChromium> grandChildOfRoot = LayerChromium::create();
+ RefPtr<LayerChromiumWithForcedDrawsContent> grandChildOfRS1 = adoptRef(new LayerChromiumWithForcedDrawsContent());
+ RefPtr<LayerChromiumWithForcedDrawsContent> grandChildOfRS2 = adoptRef(new LayerChromiumWithForcedDrawsContent());
+ parent->createRenderSurface();
+ parent->addChild(renderSurface1);
+ parent->addChild(childOfRoot);
+ renderSurface1->addChild(childOfRS1);
+ renderSurface1->addChild(renderSurface2);
+ renderSurface2->addChild(childOfRS2);
+ childOfRoot->addChild(grandChildOfRoot);
+ childOfRS1->addChild(grandChildOfRS1);
+ childOfRS2->addChild(grandChildOfRS2);
+
+ // In combination with descendantDrawsContent, opacity != 1 forces the layer to have a new renderSurface.
+ addOpacityTransitionToController(*renderSurface1->layerAnimationController(), 10, 1, 0, false);
+
+ // Also put an animated opacity on a layer without descendants.
+ addOpacityTransitionToController(*grandChildOfRoot->layerAnimationController(), 10, 1, 0, false);
+
+ TransformationMatrix layerTransform;
+ layerTransform.translate(1.0, 1.0);
+ TransformationMatrix sublayerTransform;
+ sublayerTransform.scale3d(10.0, 1.0, 1.0);
+
+ // In combination with descendantDrawsContent, an animated transform forces the layer to have a new renderSurface.
+ addAnimatedTransformToController(*renderSurface2->layerAnimationController(), 10, 30, 0);
+
+ // Also put transform animations on grandChildOfRoot, and grandChildOfRS2
+ addAnimatedTransformToController(*grandChildOfRoot->layerAnimationController(), 10, 30, 0);
+ addAnimatedTransformToController(*grandChildOfRS2->layerAnimationController(), 10, 30, 0);
+
+ setLayerPropertiesForTesting(parent.get(), layerTransform, sublayerTransform, FloatPoint(0.25f, 0.0f), FloatPoint(2.5f, 0.0f), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(renderSurface1.get(), layerTransform, sublayerTransform, FloatPoint(0.25f, 0.0f), FloatPoint(2.5f, 0.0f), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(renderSurface2.get(), layerTransform, sublayerTransform, FloatPoint(0.25f, 0.0f), FloatPoint(2.5f, 0.0f), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(childOfRoot.get(), layerTransform, sublayerTransform, FloatPoint(0.25f, 0.0f), FloatPoint(2.5f, 0.0f), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(childOfRS1.get(), layerTransform, sublayerTransform, FloatPoint(0.25f, 0.0f), FloatPoint(2.5f, 0.0f), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(childOfRS2.get(), layerTransform, sublayerTransform, FloatPoint(0.25f, 0.0f), FloatPoint(2.5f, 0.0f), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(grandChildOfRoot.get(), layerTransform, sublayerTransform, FloatPoint(0.25f, 0.0f), FloatPoint(2.5f, 0.0f), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(grandChildOfRS1.get(), layerTransform, sublayerTransform, FloatPoint(0.25f, 0.0f), FloatPoint(2.5f, 0.0f), IntSize(10, 10), false);
+ setLayerPropertiesForTesting(grandChildOfRS2.get(), layerTransform, sublayerTransform, FloatPoint(0.25f, 0.0f), FloatPoint(2.5f, 0.0f), IntSize(10, 10), false);
+
+ executeCalculateDrawTransformsAndVisibility(parent.get());
+
+ // Only layers that are associated with render surfaces should have an actual renderSurface() value.
+ //
+ ASSERT_TRUE(parent->renderSurface());
+ ASSERT_FALSE(childOfRoot->renderSurface());
+ ASSERT_FALSE(grandChildOfRoot->renderSurface());
+
+ ASSERT_TRUE(renderSurface1->renderSurface());
+ ASSERT_FALSE(childOfRS1->renderSurface());
+ ASSERT_FALSE(grandChildOfRS1->renderSurface());
+
+ ASSERT_TRUE(renderSurface2->renderSurface());
+ ASSERT_FALSE(childOfRS2->renderSurface());
+ ASSERT_FALSE(grandChildOfRS2->renderSurface());
+
+ // Verify all targetRenderSurface accessors
+ //
+ EXPECT_EQ(parent->renderSurface(), parent->targetRenderSurface());
+ EXPECT_EQ(parent->renderSurface(), childOfRoot->targetRenderSurface());
+ EXPECT_EQ(parent->renderSurface(), grandChildOfRoot->targetRenderSurface());
+
+ EXPECT_EQ(renderSurface1->renderSurface(), renderSurface1->targetRenderSurface());
+ EXPECT_EQ(renderSurface1->renderSurface(), childOfRS1->targetRenderSurface());
+ EXPECT_EQ(renderSurface1->renderSurface(), grandChildOfRS1->targetRenderSurface());
+
+ EXPECT_EQ(renderSurface2->renderSurface(), renderSurface2->targetRenderSurface());
+ EXPECT_EQ(renderSurface2->renderSurface(), childOfRS2->targetRenderSurface());
+ EXPECT_EQ(renderSurface2->renderSurface(), grandChildOfRS2->targetRenderSurface());
+
+ // Verify drawOpacityIsAnimating values
+ //
+ EXPECT_FALSE(parent->drawOpacityIsAnimating());
+ EXPECT_FALSE(childOfRoot->drawOpacityIsAnimating());
+ EXPECT_TRUE(grandChildOfRoot->drawOpacityIsAnimating());
+ EXPECT_FALSE(renderSurface1->drawOpacityIsAnimating());
+ EXPECT_TRUE(renderSurface1->renderSurface()->drawOpacityIsAnimating());
+ EXPECT_FALSE(childOfRS1->drawOpacityIsAnimating());
+ EXPECT_FALSE(grandChildOfRS1->drawOpacityIsAnimating());
+ EXPECT_FALSE(renderSurface2->drawOpacityIsAnimating());
+ EXPECT_FALSE(renderSurface2->renderSurface()->drawOpacityIsAnimating());
+ EXPECT_FALSE(childOfRS2->drawOpacityIsAnimating());
+ EXPECT_FALSE(grandChildOfRS2->drawOpacityIsAnimating());
+
+ // Verify drawTransformsAnimatingInTarget values
+ //
+ EXPECT_FALSE(parent->drawTransformIsAnimating());
+ EXPECT_FALSE(childOfRoot->drawTransformIsAnimating());
+ EXPECT_TRUE(grandChildOfRoot->drawTransformIsAnimating());
+ EXPECT_FALSE(renderSurface1->drawTransformIsAnimating());
+ EXPECT_FALSE(renderSurface1->renderSurface()->targetSurfaceTransformsAreAnimating());
+ EXPECT_FALSE(childOfRS1->drawTransformIsAnimating());
+ EXPECT_FALSE(grandChildOfRS1->drawTransformIsAnimating());
+ EXPECT_FALSE(renderSurface2->drawTransformIsAnimating());
+ EXPECT_TRUE(renderSurface2->renderSurface()->targetSurfaceTransformsAreAnimating());
+ EXPECT_FALSE(childOfRS2->drawTransformIsAnimating());
+ EXPECT_TRUE(grandChildOfRS2->drawTransformIsAnimating());
+
+ // Verify drawTransformsAnimatingInScreen values
+ //
+ EXPECT_FALSE(parent->screenSpaceTransformIsAnimating());
+ EXPECT_FALSE(childOfRoot->screenSpaceTransformIsAnimating());
+ EXPECT_TRUE(grandChildOfRoot->screenSpaceTransformIsAnimating());
+ EXPECT_FALSE(renderSurface1->screenSpaceTransformIsAnimating());
+ EXPECT_FALSE(renderSurface1->renderSurface()->screenSpaceTransformsAreAnimating());
+ EXPECT_FALSE(childOfRS1->screenSpaceTransformIsAnimating());
+ EXPECT_FALSE(grandChildOfRS1->screenSpaceTransformIsAnimating());
+ EXPECT_TRUE(renderSurface2->screenSpaceTransformIsAnimating());
+ EXPECT_TRUE(renderSurface2->renderSurface()->screenSpaceTransformsAreAnimating());
+ EXPECT_TRUE(childOfRS2->screenSpaceTransformIsAnimating());
+ EXPECT_TRUE(grandChildOfRS2->screenSpaceTransformIsAnimating());
+
+
+ // Sanity check. If these fail there is probably a bug in the test itself.
+ // It is expected that we correctly set up transforms so that the y-component of the screen-space transform
+ // encodes the "depth" of the layer in the tree.
+ EXPECT_FLOAT_EQ(1.0, parent->screenSpaceTransform().m42());
+ EXPECT_FLOAT_EQ(2.0, childOfRoot->screenSpaceTransform().m42());
+ EXPECT_FLOAT_EQ(3.0, grandChildOfRoot->screenSpaceTransform().m42());
+
+ EXPECT_FLOAT_EQ(2.0, renderSurface1->screenSpaceTransform().m42());
+ EXPECT_FLOAT_EQ(3.0, childOfRS1->screenSpaceTransform().m42());
+ EXPECT_FLOAT_EQ(4.0, grandChildOfRS1->screenSpaceTransform().m42());
+
+ EXPECT_FLOAT_EQ(3.0, renderSurface2->screenSpaceTransform().m42());
+ EXPECT_FLOAT_EQ(4.0, childOfRS2->screenSpaceTransform().m42());
+ EXPECT_FLOAT_EQ(5.0, grandChildOfRS2->screenSpaceTransform().m42());
+}
+
+TEST(CCLayerTreeHostCommonTest, verifyVisibleRectForIdentityTransform)
+{
+ // Test the calculateVisibleRect() function works correctly for identity transforms.
+
+ IntRect targetSurfaceRect = IntRect(IntPoint(0, 0), IntSize(100, 100));
+ TransformationMatrix layerToSurfaceTransform;
+
+ // Case 1: Layer is contained within the surface.
+ IntRect layerContentRect = IntRect(IntPoint(10, 10), IntSize(30, 30));
+ IntRect expected = IntRect(IntPoint(10, 10), IntSize(30, 30));
+ IntRect actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_INT_RECT_EQ(expected, actual);
+
+ // Case 2: Layer is outside the surface rect.
+ layerContentRect = IntRect(IntPoint(120, 120), IntSize(30, 30));
+ actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_TRUE(actual.isEmpty());
+
+ // Case 3: Layer is partially overlapping the surface rect.
+ layerContentRect = IntRect(IntPoint(80, 80), IntSize(30, 30));
+ expected = IntRect(IntPoint(80, 80), IntSize(20, 20));
+ actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_INT_RECT_EQ(expected, actual);
+}
+
+TEST(CCLayerTreeHostCommonTest, verifyVisibleRectForTranslations)
+{
+ // Test the calculateVisibleRect() function works correctly for scaling transforms.
+
+ IntRect targetSurfaceRect = IntRect(IntPoint(0, 0), IntSize(100, 100));
+ IntRect layerContentRect = IntRect(IntPoint(0, 0), IntSize(30, 30));
+ TransformationMatrix layerToSurfaceTransform;
+
+ // Case 1: Layer is contained within the surface.
+ layerToSurfaceTransform.makeIdentity();
+ layerToSurfaceTransform.translate(10, 10);
+ IntRect expected = IntRect(IntPoint(0, 0), IntSize(30, 30));
+ IntRect actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_INT_RECT_EQ(expected, actual);
+
+ // Case 2: Layer is outside the surface rect.
+ layerToSurfaceTransform.makeIdentity();
+ layerToSurfaceTransform.translate(120, 120);
+ actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_TRUE(actual.isEmpty());
+
+ // Case 3: Layer is partially overlapping the surface rect.
+ layerToSurfaceTransform.makeIdentity();
+ layerToSurfaceTransform.translate(80, 80);
+ expected = IntRect(IntPoint(0, 0), IntSize(20, 20));
+ actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_INT_RECT_EQ(expected, actual);
+}
+
+TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor2DRotations)
+{
+ // Test the calculateVisibleRect() function works correctly for rotations about z-axis (i.e. 2D rotations).
+ // Remember that calculateVisibleRect() should return the visible rect in the layer's space.
+
+ IntRect targetSurfaceRect = IntRect(IntPoint(0, 0), IntSize(100, 100));
+ IntRect layerContentRect = IntRect(IntPoint(0, 0), IntSize(30, 30));
+ TransformationMatrix layerToSurfaceTransform;
+
+ // Case 1: Layer is contained within the surface.
+ layerToSurfaceTransform.makeIdentity();
+ layerToSurfaceTransform.translate(50, 50);
+ layerToSurfaceTransform.rotate(45);
+ IntRect expected = IntRect(IntPoint(0, 0), IntSize(30, 30));
+ IntRect actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_INT_RECT_EQ(expected, actual);
+
+ // Case 2: Layer is outside the surface rect.
+ layerToSurfaceTransform.makeIdentity();
+ layerToSurfaceTransform.translate(-50, 0);
+ layerToSurfaceTransform.rotate(45);
+ actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_TRUE(actual.isEmpty());
+
+ // Case 3: The layer is rotated about its top-left corner. In surface space, the layer
+ // is oriented diagonally, with the left half outside of the renderSurface. In
+ // this case, the visible rect should still be the entire layer (remember the
+ // visible rect is computed in layer space); both the top-left and
+ // bottom-right corners of the layer are still visible.
+ layerToSurfaceTransform.makeIdentity();
+ layerToSurfaceTransform.rotate(45);
+ expected = IntRect(IntPoint(0, 0), IntSize(30, 30));
+ actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_INT_RECT_EQ(expected, actual);
+
+ // Case 4: The layer is rotated about its top-left corner, and translated upwards. In
+ // surface space, the layer is oriented diagonally, with only the top corner
+ // of the surface overlapping the layer. In layer space, the render surface
+ // overlaps the right side of the layer. The visible rect should be the
+ // layer's right half.
+ layerToSurfaceTransform.makeIdentity();
+ layerToSurfaceTransform.translate(0, -sqrt(2.0) * 15);
+ layerToSurfaceTransform.rotate(45);
+ expected = IntRect(IntPoint(15, 0), IntSize(15, 30)); // right half of layer bounds.
+ actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_INT_RECT_EQ(expected, actual);
+}
+
+TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor3dOrthographicTransform)
+{
+ // Test that the calculateVisibleRect() function works correctly for 3d transforms.
+
+ IntRect targetSurfaceRect = IntRect(IntPoint(0, 0), IntSize(100, 100));
+ IntRect layerContentRect = IntRect(IntPoint(0, 0), IntSize(100, 100));
+ TransformationMatrix layerToSurfaceTransform;
+
+ // Case 1: Orthographic projection of a layer rotated about y-axis by 45 degrees, should be fully contained in the renderSurface.
+ layerToSurfaceTransform.makeIdentity();
+ layerToSurfaceTransform.rotate3d(0, 45, 0);
+ IntRect expected = IntRect(IntPoint(0, 0), IntSize(100, 100));
+ IntRect actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_INT_RECT_EQ(expected, actual);
+
+ // Case 2: Orthographic projection of a layer rotated about y-axis by 45 degrees, but
+ // shifted to the side so only the right-half the layer would be visible on
+ // the surface.
+ double halfWidthOfRotatedLayer = (100.0 / sqrt(2.0)) * 0.5; // 100.0 is the un-rotated layer width; divided by sqrt(2.0) is the rotated width.
+ layerToSurfaceTransform.makeIdentity();
+ layerToSurfaceTransform.translate(-halfWidthOfRotatedLayer, 0);
+ layerToSurfaceTransform.rotate3d(0, 45, 0); // rotates about the left edge of the layer
+ expected = IntRect(IntPoint(50, 0), IntSize(50, 100)); // right half of the layer.
+ actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_INT_RECT_EQ(expected, actual);
+}
+
+TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor3dPerspectiveTransform)
+{
+ // Test the calculateVisibleRect() function works correctly when the layer has a
+ // perspective projection onto the target surface.
+
+ IntRect targetSurfaceRect = IntRect(IntPoint(0, 0), IntSize(100, 100));
+ IntRect layerContentRect = IntRect(IntPoint(-50, -50), IntSize(200, 200));
+ TransformationMatrix layerToSurfaceTransform;
+
+ // Case 1: Even though the layer is twice as large as the surface, due to perspective
+ // foreshortening, the layer will fit fully in the surface when its translated
+ // more than the perspective amount.
+ layerToSurfaceTransform.makeIdentity();
+
+ // The following sequence of transforms applies the perspective about the center of the surface.
+ layerToSurfaceTransform.translate(50, 50);
+ layerToSurfaceTransform.applyPerspective(9);
+ layerToSurfaceTransform.translate(-50, -50);
+
+ // This translate places the layer in front of the surface's projection plane.
+ layerToSurfaceTransform.translate3d(0, 0, -27);
+
+ IntRect expected = IntRect(IntPoint(-50, -50), IntSize(200, 200));
+ IntRect actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_INT_RECT_EQ(expected, actual);
+
+ // Case 2: same projection as before, except that the layer is also translated to the
+ // side, so that only the right half of the layer should be visible.
+ //
+ // Explanation of expected result:
+ // The perspective ratio is (z distance between layer and camera origin) / (z distance between projection plane and camera origin) == ((-27 - 9) / 9)
+ // Then, by similar triangles, if we want to move a layer by translating -50 units in projected surface units (so that only half of it is
+ // visible), then we would need to translate by (-36 / 9) * -50 == -200 in the layer's units.
+ //
+ layerToSurfaceTransform.translate3d(-200, 0, 0);
+ expected = IntRect(IntPoint(50, -50), IntSize(100, 200)); // The right half of the layer's bounding rect.
+ actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_INT_RECT_EQ(expected, actual);
+}
+
+TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor3dOrthographicIsNotClippedBehindSurface)
+{
+ // There is currently no explicit concept of an orthographic projection plane in our
+ // code (nor in the CSS spec to my knowledge). Therefore, layers that are technically
+ // behind the surface in an orthographic world should not be clipped when they are
+ // flattened to the surface.
+
+ IntRect targetSurfaceRect = IntRect(IntPoint(0, 0), IntSize(100, 100));
+ IntRect layerContentRect = IntRect(IntPoint(0, 0), IntSize(100, 100));
+ TransformationMatrix layerToSurfaceTransform;
+
+ // This sequence of transforms effectively rotates the layer about the y-axis at the
+ // center of the layer.
+ layerToSurfaceTransform.makeIdentity();
+ layerToSurfaceTransform.translate(50, 0);
+ layerToSurfaceTransform.rotate3d(0, 45, 0);
+ layerToSurfaceTransform.translate(-50, 0);
+
+ IntRect expected = IntRect(IntPoint(0, 0), IntSize(100, 100));
+ IntRect actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_INT_RECT_EQ(expected, actual);
+}
+
+TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor3dPerspectiveIsClipped)
+{
+ // Test the calculateVisibleRect() function works correctly when projecting a surface
+ // onto a layer, but the layer is partially behind the camera (not just behind the
+ // projection plane). In this case, the cartesian coordinates may seem to be valid,
+ // but actually they are not. The visibleRect needs to be properly clipped by the
+ // w = 0 plane in homogeneous coordinates before converting to cartesian coordinates.
+
+ IntRect targetSurfaceRect = IntRect(IntPoint(-50, -50), IntSize(100, 100));
+ IntRect layerContentRect = IntRect(IntPoint(-10, -1), IntSize(20, 2));
+ TransformationMatrix layerToSurfaceTransform;
+
+ // The layer is positioned so that the right half of the layer should be in front of
+ // the camera, while the other half is behind the surface's projection plane. The
+ // following sequence of transforms applies the perspective and rotation about the
+ // center of the layer.
+ layerToSurfaceTransform.makeIdentity();
+ layerToSurfaceTransform.applyPerspective(1);
+ layerToSurfaceTransform.translate3d(0, 0, 1);
+ layerToSurfaceTransform.rotate3d(0, 45, 0);
+
+ // Sanity check that this transform does indeed cause w < 0 when applying the
+ // transform, otherwise this code is not testing the intended scenario.
+ bool clipped = false;
+ CCMathUtil::mapQuad(layerToSurfaceTransform, FloatQuad(FloatRect(layerContentRect)), clipped);
+ ASSERT_TRUE(clipped);
+
+ int expectedXPosition = -10;
+ int expectedWidth = 10;
+ IntRect actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_EQ(expectedXPosition, actual.x());
+ EXPECT_EQ(expectedWidth, actual.width());
+}
+
+TEST(CCLayerTreeHostCommonTest, verifyVisibleRectForPerspectiveUnprojection)
+{
+ // To determine visibleRect in layer space, there needs to be an un-projection from
+ // surface space to layer space. When the original transform was a perspective
+ // projection that was clipped, it returns a rect that encloses the clipped bounds.
+ // Un-projecting this new rect may require clipping again.
+
+ // This sequence of transforms causes one corner of the layer to protrude across the w = 0 plane, and should be clipped.
+ IntRect targetSurfaceRect = IntRect(IntPoint(-50, -50), IntSize(100, 100));
+ IntRect layerContentRect = IntRect(IntPoint(-10, -10), IntSize(20, 20));
+ TransformationMatrix layerToSurfaceTransform;
+ layerToSurfaceTransform.makeIdentity();
+ layerToSurfaceTransform.applyPerspective(1);
+ layerToSurfaceTransform.translate3d(0, 0, -5);
+ layerToSurfaceTransform.rotate3d(0, 45, 0);
+ layerToSurfaceTransform.rotate3d(80, 0, 0);
+
+ // Sanity check that un-projection does indeed cause w < 0, otherwise this code is not
+ // testing the intended scenario.
+ bool clipped = false;
+ FloatRect clippedRect = CCMathUtil::mapClippedRect(layerToSurfaceTransform, layerContentRect);
+ CCMathUtil::projectQuad(layerToSurfaceTransform.inverse(), FloatQuad(clippedRect), clipped);
+ ASSERT_TRUE(clipped);
+
+ // Only the corner of the layer is not visible on the surface because of being
+ // clipped. But, the net result of rounding visible region to an axis-aligned rect is
+ // that the entire layer should still be considered visible.
+ IntRect expected = IntRect(IntPoint(-10, -10), IntSize(20, 20));
+ IntRect actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
+ EXPECT_INT_RECT_EQ(expected, actual);
+}
+
+TEST(CCLayerTreeHostCommonTest, verifyBackFaceCulling)
+{
+ // Verify that layers are appropriately culled when their back face is showing and they are not double sided.
+ //
+ // Layers that are animating do not get culled on the main thread, as their transforms should be
+ // treated as "unknown" so we can not be sure that their back face is really showing.
+ //
+
+ const TransformationMatrix identityMatrix;
+ RefPtr<LayerChromium> parent = LayerChromium::create();
+ RefPtr<LayerChromiumWithForcedDrawsContent> child = adoptRef(new LayerChromiumWithForcedDrawsContent());
+ RefPtr<LayerChromiumWithForcedDrawsContent> animatingSurface = adoptRef(new LayerChromiumWithForcedDrawsContent());
+ RefPtr<LayerChromiumWithForcedDrawsContent> childOfAnimatingSurface = adoptRef(new LayerChromiumWithForcedDrawsContent());
+ RefPtr<LayerChromiumWithForcedDrawsContent> animatingChild = adoptRef(new LayerChromiumWithForcedDrawsContent());
+ RefPtr<LayerChromiumWithForcedDrawsContent> child2 = adoptRef(new LayerChromiumWithForcedDrawsContent());
+
+ parent->createRenderSurface();
+ parent->addChild(child);
+ parent->addChild(animatingSurface);
+ animatingSurface->addChild(childOfAnimatingSurface);
+ parent->addChild(animatingChild);
+ parent->addChild(child2);
+
+ // Nothing is double-sided
+ child->setDoubleSided(false);
+ child2->setDoubleSided(false);
+ animatingSurface->setDoubleSided(false);
+ childOfAnimatingSurface->setDoubleSided(false);
+ animatingChild->setDoubleSided(false);
+
+ TransformationMatrix backfaceMatrix;
+ backfaceMatrix.translate(50, 50);
+ backfaceMatrix.rotate3d(0, 1, 0, 180);
+ backfaceMatrix.translate(-50, -50);
+
+ // Having a descendent, and animating transforms, will make the animatingSurface own a render surface.
+ addAnimatedTransformToController(*animatingSurface->layerAnimationController(), 10, 30, 0);
+ // This is just an animating layer, not a surface.
+ addAnimatedTransformToController(*animatingChild->layerAnimationController(), 10, 30, 0);
+
+ setLayerPropertiesForTesting(parent.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), true);
+ setLayerPropertiesForTesting(child.get(), backfaceMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), false);
+ setLayerPropertiesForTesting(animatingSurface.get(), backfaceMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), false);
+ setLayerPropertiesForTesting(childOfAnimatingSurface.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), false);
+ setLayerPropertiesForTesting(animatingChild.get(), backfaceMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), false);
+ setLayerPropertiesForTesting(child2.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), false);
+
+ Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
+ Vector<RefPtr<LayerChromium> > dummyLayerList;
+ int dummyMaxTextureSize = 512;
+
+ parent->renderSurface()->setContentRect(IntRect(IntPoint(), parent->bounds()));
+ parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
+ renderSurfaceLayerList.append(parent.get());
+
+ CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
+
+ EXPECT_FALSE(child->renderSurface());
+ EXPECT_TRUE(animatingSurface->renderSurface());
+ EXPECT_FALSE(childOfAnimatingSurface->renderSurface());
+ EXPECT_FALSE(animatingChild->renderSurface());
+ EXPECT_FALSE(child2->renderSurface());
+
+ // Verify that the animatingChild and childOfAnimatingSurface were not culled, but that child was.
+ ASSERT_EQ(2u, renderSurfaceLayerList.size());
+ EXPECT_EQ(parent->id(), renderSurfaceLayerList[0]->id());
+ EXPECT_EQ(animatingSurface->id(), renderSurfaceLayerList[1]->id());
+
+ // The non-animating child be culled from the layer list for the parent render surface.
+ ASSERT_EQ(3u, renderSurfaceLayerList[0]->renderSurface()->layerList().size());
+ EXPECT_EQ(animatingSurface->id(), renderSurfaceLayerList[0]->renderSurface()->layerList()[0]->id());
+ EXPECT_EQ(animatingChild->id(), renderSurfaceLayerList[0]->renderSurface()->layerList()[1]->id());
+ EXPECT_EQ(child2->id(), renderSurfaceLayerList[0]->renderSurface()->layerList()[2]->id());
+
+ ASSERT_EQ(2u, renderSurfaceLayerList[1]->renderSurface()->layerList().size());
+ EXPECT_EQ(animatingSurface->id(), renderSurfaceLayerList[1]->renderSurface()->layerList()[0]->id());
+ EXPECT_EQ(childOfAnimatingSurface->id(), renderSurfaceLayerList[1]->renderSurface()->layerList()[1]->id());
+
+ EXPECT_FALSE(child2->visibleLayerRect().isEmpty());
+
+ // But if the back face is visible, then the visibleLayerRect should be empty.
+ EXPECT_TRUE(animatingChild->visibleLayerRect().isEmpty());
+ EXPECT_TRUE(animatingSurface->visibleLayerRect().isEmpty());
+ // And any layers in the subtree should not be considered visible either.
+ EXPECT_TRUE(childOfAnimatingSurface->visibleLayerRect().isEmpty());
+}
+
// FIXME:
// continue working on https://bugs.webkit.org/show_bug.cgi?id=68942
// - add a test to verify clipping that changes the "center point"
diff --git a/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp b/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp
index d75c12890..ff2497085 100644
--- a/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp
+++ b/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp
@@ -26,16 +26,28 @@
#include "cc/CCLayerTreeHostImpl.h"
+#include "CCAnimationTestCommon.h"
+#include "CCLayerTestCommon.h"
#include "FakeWebGraphicsContext3D.h"
#include "GraphicsContext3DPrivate.h"
#include "LayerRendererChromium.h"
#include "cc/CCLayerImpl.h"
+#include "cc/CCLayerTilingData.h"
+#include "cc/CCQuadCuller.h"
+#include "cc/CCScrollbarLayerImpl.h"
#include "cc/CCSingleThreadProxy.h"
-#include "cc/CCSolidColorDrawQuad.h"
+#include "cc/CCTextureLayerImpl.h"
+#include "cc/CCTileDrawQuad.h"
+#include "cc/CCTiledLayerImpl.h"
+#include "cc/CCVideoLayerImpl.h"
#include <gtest/gtest.h>
+#include <public/WebVideoFrame.h>
+#include <public/WebVideoFrameProvider.h>
+using namespace CCLayerTestCommon;
using namespace WebCore;
using namespace WebKit;
+using namespace WebKitTests;
namespace {
@@ -49,11 +61,12 @@ public:
m_hostImpl = CCLayerTreeHostImpl::create(settings, this);
}
- virtual void didLoseContextOnImplThread() { }
- virtual void onSwapBuffersCompleteOnImplThread() { }
- virtual void setNeedsRedrawOnImplThread() { m_didRequestRedraw = true; }
- virtual void setNeedsCommitOnImplThread() { m_didRequestCommit = true; }
- virtual void postAnimationEventsToMainThreadOnImplThread(PassOwnPtr<CCAnimationEventsVector>, double wallClockTime) { }
+ virtual void didLoseContextOnImplThread() OVERRIDE { }
+ virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE { }
+ virtual void setNeedsRedrawOnImplThread() OVERRIDE { m_didRequestRedraw = true; }
+ virtual void setNeedsCommitOnImplThread() OVERRIDE { m_didRequestCommit = true; }
+ virtual void postAnimationEventsToMainThreadOnImplThread(PassOwnPtr<CCAnimationEventsVector>, double wallClockTime) OVERRIDE { }
+ virtual void postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread(size_t) OVERRIDE { }
static void expectClearedScrollDeltasRecursive(CCLayerImpl* layer)
{
@@ -250,7 +263,9 @@ TEST_F(CCLayerTreeHostImplTest, nonFastScrollableRegionWithOffset)
root->setNonFastScrollableRegion(IntRect(0, 0, 50, 50));
root->setPosition(FloatPoint(-25, 0));
m_hostImpl->setRootLayer(root.release());
- m_hostImpl->drawLayers(); // Update draw transforms so we can correctly map points into layer space.
+ CCLayerTreeHostImpl::FrameData frame;
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame); // Update draw transforms so we can correctly map points into layer space.
// This point would fall into the non-fast scrollable region except that we've moved the layer down by 25 pixels.
EXPECT_EQ(m_hostImpl->scrollBegin(IntPoint(40, 10), CCInputHandlerClient::Wheel), CCInputHandlerClient::ScrollStarted);
@@ -310,7 +325,7 @@ TEST_F(CCLayerTreeHostImplTest, pinchGesture)
scrollLayer->setScrollDelta(IntSize());
scrollLayer->setScrollPosition(IntPoint(50, 50));
- float pageScaleDelta = 0.1;
+ float pageScaleDelta = 0.1f;
m_hostImpl->pinchGestureBegin();
m_hostImpl->pinchGestureUpdate(pageScaleDelta, IntPoint(0, 0));
m_hostImpl->pinchGestureEnd();
@@ -390,7 +405,7 @@ TEST_F(CCLayerTreeHostImplTest, pageScaleAnimation)
}
}
-class DidDrawCheckLayer : public CCLayerImpl {
+class DidDrawCheckLayer : public CCTiledLayerImpl {
public:
static PassOwnPtr<DidDrawCheckLayer> create(int id) { return adoptPtr(new DidDrawCheckLayer(id)); }
@@ -407,9 +422,9 @@ public:
bool didDrawCalled() const { return m_didDrawCalled; }
bool willDrawCalled() const { return m_willDrawCalled; }
-private:
+protected:
explicit DidDrawCheckLayer(int id)
- : CCLayerImpl(id)
+ : CCTiledLayerImpl(id)
, m_didDrawCalled(false)
, m_willDrawCalled(false)
{
@@ -418,6 +433,7 @@ private:
setDrawsContent(true);
}
+private:
bool m_didDrawCalled;
bool m_willDrawCalled;
};
@@ -432,10 +448,14 @@ TEST_F(CCLayerTreeHostImplTest, didDrawNotCalledOnHiddenLayer)
m_hostImpl->setRootLayer(DidDrawCheckLayer::create(0));
DidDrawCheckLayer* root = static_cast<DidDrawCheckLayer*>(m_hostImpl->rootLayer());
+ CCLayerTreeHostImpl::FrameData frame;
+
EXPECT_FALSE(root->willDrawCalled());
EXPECT_FALSE(root->didDrawCalled());
- m_hostImpl->drawLayers();
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
+ m_hostImpl->didDrawAllLayers(frame);
EXPECT_FALSE(root->willDrawCalled());
EXPECT_FALSE(root->didDrawCalled());
@@ -448,7 +468,9 @@ TEST_F(CCLayerTreeHostImplTest, didDrawNotCalledOnHiddenLayer)
EXPECT_FALSE(root->willDrawCalled());
EXPECT_FALSE(root->didDrawCalled());
- m_hostImpl->drawLayers();
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
+ m_hostImpl->didDrawAllLayers(frame);
EXPECT_TRUE(root->willDrawCalled());
EXPECT_TRUE(root->didDrawCalled());
@@ -470,14 +492,17 @@ TEST_F(CCLayerTreeHostImplTest, didDrawCalledOnAllLayers)
layer1->addChild(DidDrawCheckLayer::create(2));
DidDrawCheckLayer* layer2 = static_cast<DidDrawCheckLayer*>(layer1->children()[0].get());
- layer1->setOpacity(0.3);
+ layer1->setOpacity(0.3f);
layer1->setPreserves3D(false);
EXPECT_FALSE(root->didDrawCalled());
EXPECT_FALSE(layer1->didDrawCalled());
EXPECT_FALSE(layer2->didDrawCalled());
- m_hostImpl->drawLayers();
+ CCLayerTreeHostImpl::FrameData frame;
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
+ m_hostImpl->didDrawAllLayers(frame);
EXPECT_TRUE(root->didDrawCalled());
EXPECT_TRUE(layer1->didDrawCalled());
@@ -487,6 +512,71 @@ TEST_F(CCLayerTreeHostImplTest, didDrawCalledOnAllLayers)
EXPECT_TRUE(!!layer1->renderSurface());
}
+class MissingTextureAnimatingLayer : public DidDrawCheckLayer {
+public:
+ static PassOwnPtr<MissingTextureAnimatingLayer> create(int id, bool tileMissing, bool skipsDraw, bool animating) { return adoptPtr(new MissingTextureAnimatingLayer(id, tileMissing, skipsDraw, animating)); }
+
+private:
+ explicit MissingTextureAnimatingLayer(int id, bool tileMissing, bool skipsDraw, bool animating)
+ : DidDrawCheckLayer(id)
+ {
+ OwnPtr<CCLayerTilingData> tilingData = CCLayerTilingData::create(IntSize(10, 10), CCLayerTilingData::NoBorderTexels);
+ tilingData->setBounds(bounds());
+ setTilingData(*tilingData.get());
+ setSkipsDraw(skipsDraw);
+ if (!tileMissing)
+ pushTileProperties(0, 0, 1, IntRect());
+ if (animating)
+ addAnimatedTransformToLayer(*this, 10, 3, 0);
+ }
+};
+
+TEST_F(CCLayerTreeHostImplTest, prepareToDrawFailsWhenAnimationUsesCheckerboard)
+{
+ m_hostImpl->initializeLayerRenderer(createContext());
+ m_hostImpl->setViewportSize(IntSize(10, 10));
+
+ // When the texture is not missing, we draw as usual.
+ m_hostImpl->setRootLayer(DidDrawCheckLayer::create(0));
+ DidDrawCheckLayer* root = static_cast<DidDrawCheckLayer*>(m_hostImpl->rootLayer());
+ root->addChild(MissingTextureAnimatingLayer::create(1, false, false, true));
+
+ CCLayerTreeHostImpl::FrameData frame;
+
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
+ m_hostImpl->didDrawAllLayers(frame);
+
+ // When a texture is missing and we're not animating, we draw as usual with checkerboarding.
+ m_hostImpl->setRootLayer(DidDrawCheckLayer::create(0));
+ root = static_cast<DidDrawCheckLayer*>(m_hostImpl->rootLayer());
+ root->addChild(MissingTextureAnimatingLayer::create(1, true, false, false));
+
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
+ m_hostImpl->didDrawAllLayers(frame);
+
+ // When a texture is missing and we're animating, we don't want to draw anything.
+ m_hostImpl->setRootLayer(DidDrawCheckLayer::create(0));
+ root = static_cast<DidDrawCheckLayer*>(m_hostImpl->rootLayer());
+ root->addChild(MissingTextureAnimatingLayer::create(1, true, false, true));
+
+ m_didRequestCommit = false;
+ EXPECT_FALSE(m_hostImpl->prepareToDraw(frame));
+ EXPECT_TRUE(m_didRequestCommit);
+ m_hostImpl->drawLayers(frame);
+ m_hostImpl->didDrawAllLayers(frame);
+
+ // When the layer skips draw and we're animating, we still draw the frame.
+ m_hostImpl->setRootLayer(DidDrawCheckLayer::create(0));
+ root = static_cast<DidDrawCheckLayer*>(m_hostImpl->rootLayer());
+ root->addChild(MissingTextureAnimatingLayer::create(1, false, true, true));
+
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
+ m_hostImpl->didDrawAllLayers(frame);
+}
+
class BlendStateTrackerContext: public FakeWebGraphicsContext3D {
public:
BlendStateTrackerContext() : m_blend(false) { }
@@ -513,14 +603,20 @@ class BlendStateCheckLayer : public CCLayerImpl {
public:
static PassOwnPtr<BlendStateCheckLayer> create(int id) { return adoptPtr(new BlendStateCheckLayer(id)); }
- virtual void appendQuads(CCQuadList& quadList, const CCSharedQuadState* sharedQuadState)
+ virtual void appendQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState, bool&) OVERRIDE
{
m_quadsAppended = true;
- Color color = m_opaqueColor ? Color::white : Color(0, 0, 0, 0);
- OwnPtr<CCDrawQuad> testBlendingDrawQuad = CCSolidColorDrawQuad::create(sharedQuadState, IntRect(5, 5, 5, 5), color);
+ IntRect opaqueRect;
+ if (opaque() || m_opaqueContents)
+ opaqueRect = m_quadRect;
+ else
+ opaqueRect = m_opaqueContentRect;
+ OwnPtr<CCDrawQuad> testBlendingDrawQuad = CCTileDrawQuad::create(sharedQuadState, m_quadRect, opaqueRect, 0, IntPoint(), IntSize(1, 1), 0, false, false, false, false, false);
+ testBlendingDrawQuad->setQuadVisibleRect(m_quadVisibleRect);
EXPECT_EQ(m_blend, testBlendingDrawQuad->needsBlending());
EXPECT_EQ(m_hasRenderSurface, !!renderSurface());
+ quadList.append(testBlendingDrawQuad.release());
}
void setExpectation(bool blend, bool hasRenderSurface)
@@ -532,7 +628,10 @@ public:
bool quadsAppended() const { return m_quadsAppended; }
- void setOpaqueColor(bool opaqueColor) { m_opaqueColor = opaqueColor; }
+ void setQuadRect(const IntRect& rect) { m_quadRect = rect; }
+ void setQuadVisibleRect(const IntRect& rect) { m_quadVisibleRect = rect; }
+ void setOpaqueContents(bool opaque) { m_opaqueContents = opaque; }
+ void setOpaqueContentRect(const IntRect& rect) { m_opaqueContentRect = rect; }
private:
explicit BlendStateCheckLayer(int id)
@@ -540,7 +639,9 @@ private:
, m_blend(false)
, m_hasRenderSurface(false)
, m_quadsAppended(false)
- , m_opaqueColor(true)
+ , m_opaqueContents(false)
+ , m_quadRect(5, 5, 5, 5)
+ , m_quadVisibleRect(5, 5, 5, 5)
{
setAnchorPoint(FloatPoint(0, 0));
setBounds(IntSize(10, 10));
@@ -550,7 +651,10 @@ private:
bool m_blend;
bool m_hasRenderSurface;
bool m_quadsAppended;
- bool m_opaqueColor;
+ bool m_opaqueContents;
+ IntRect m_quadRect;
+ IntRect m_opaqueContentRect;
+ IntRect m_quadVisibleRect;
};
// https://bugs.webkit.org/show_bug.cgi?id=75783
@@ -571,78 +675,96 @@ TEST_F(CCLayerTreeHostImplTest, blendingOffWhenDrawingOpaqueLayers)
root->addChild(BlendStateCheckLayer::create(1));
BlendStateCheckLayer* layer1 = static_cast<BlendStateCheckLayer*>(root->children()[0].get());
+ CCLayerTreeHostImpl::FrameData frame;
+
// Opaque layer, drawn without blending.
layer1->setOpaque(true);
- layer1->setOpaqueColor(true);
+ layer1->setOpaqueContents(true);
layer1->setExpectation(false, false);
- m_hostImpl->drawLayers();
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
EXPECT_TRUE(layer1->quadsAppended());
+ m_hostImpl->didDrawAllLayers(frame);
- // Layer with translucent content, but solid color is opaque, so drawn without blending.
+ // Layer with translucent content, but opaque content, so drawn without blending.
layer1->setOpaque(false);
- layer1->setOpaqueColor(true);
+ layer1->setOpaqueContents(true);
layer1->setExpectation(false, false);
- m_hostImpl->drawLayers();
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
EXPECT_TRUE(layer1->quadsAppended());
+ m_hostImpl->didDrawAllLayers(frame);
// Layer with translucent content and painting, so drawn with blending.
layer1->setOpaque(false);
- layer1->setOpaqueColor(false);
+ layer1->setOpaqueContents(false);
layer1->setExpectation(true, false);
- m_hostImpl->drawLayers();
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
EXPECT_TRUE(layer1->quadsAppended());
+ m_hostImpl->didDrawAllLayers(frame);
// Layer with translucent opacity, drawn with blending.
layer1->setOpaque(true);
- layer1->setOpaqueColor(true);
+ layer1->setOpaqueContents(true);
layer1->setOpacity(0.5);
layer1->setExpectation(true, false);
- m_hostImpl->drawLayers();
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
EXPECT_TRUE(layer1->quadsAppended());
+ m_hostImpl->didDrawAllLayers(frame);
// Layer with translucent opacity and painting, drawn with blending.
layer1->setOpaque(true);
- layer1->setOpaqueColor(false);
+ layer1->setOpaqueContents(false);
layer1->setOpacity(0.5);
layer1->setExpectation(true, false);
- m_hostImpl->drawLayers();
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
EXPECT_TRUE(layer1->quadsAppended());
+ m_hostImpl->didDrawAllLayers(frame);
layer1->addChild(BlendStateCheckLayer::create(2));
BlendStateCheckLayer* layer2 = static_cast<BlendStateCheckLayer*>(layer1->children()[0].get());
// 2 opaque layers, drawn without blending.
layer1->setOpaque(true);
- layer1->setOpaqueColor(true);
+ layer1->setOpaqueContents(true);
layer1->setOpacity(1);
layer1->setExpectation(false, false);
layer2->setOpaque(true);
- layer2->setOpaqueColor(true);
+ layer2->setOpaqueContents(true);
layer2->setOpacity(1);
layer2->setExpectation(false, false);
- m_hostImpl->drawLayers();
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
EXPECT_TRUE(layer1->quadsAppended());
EXPECT_TRUE(layer2->quadsAppended());
+ m_hostImpl->didDrawAllLayers(frame);
// Parent layer with translucent content, drawn with blending.
// Child layer with opaque content, drawn without blending.
layer1->setOpaque(false);
- layer1->setOpaqueColor(false);
+ layer1->setOpaqueContents(false);
layer1->setExpectation(true, false);
layer2->setExpectation(false, false);
- m_hostImpl->drawLayers();
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
EXPECT_TRUE(layer1->quadsAppended());
EXPECT_TRUE(layer2->quadsAppended());
+ m_hostImpl->didDrawAllLayers(frame);
// Parent layer with translucent content but opaque painting, drawn without blending.
// Child layer with opaque content, drawn without blending.
layer1->setOpaque(false);
- layer1->setOpaqueColor(true);
+ layer1->setOpaqueContents(true);
layer1->setExpectation(false, false);
layer2->setExpectation(false, false);
- m_hostImpl->drawLayers();
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
EXPECT_TRUE(layer1->quadsAppended());
EXPECT_TRUE(layer2->quadsAppended());
+ m_hostImpl->didDrawAllLayers(frame);
// Parent layer with translucent opacity and opaque content. Since it has a
// drawing child, it's drawn to a render surface which carries the opacity,
@@ -650,53 +772,196 @@ TEST_F(CCLayerTreeHostImplTest, blendingOffWhenDrawingOpaqueLayers)
// Child layer with opaque content, drawn without blending (parent surface
// carries the inherited opacity).
layer1->setOpaque(true);
- layer1->setOpaqueColor(true);
+ layer1->setOpaqueContents(true);
layer1->setOpacity(0.5);
layer1->setExpectation(false, true);
layer2->setExpectation(false, false);
- m_hostImpl->drawLayers();
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
EXPECT_TRUE(layer1->quadsAppended());
EXPECT_TRUE(layer2->quadsAppended());
+ m_hostImpl->didDrawAllLayers(frame);
// Draw again, but with child non-opaque, to make sure
// layer1 not culled.
layer1->setOpaque(true);
- layer1->setOpaqueColor(true);
+ layer1->setOpaqueContents(true);
layer1->setOpacity(1);
layer1->setExpectation(false, false);
layer2->setOpaque(true);
- layer2->setOpaqueColor(true);
+ layer2->setOpaqueContents(true);
layer2->setOpacity(0.5);
layer2->setExpectation(true, false);
- m_hostImpl->drawLayers();
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
EXPECT_TRUE(layer1->quadsAppended());
EXPECT_TRUE(layer2->quadsAppended());
+ m_hostImpl->didDrawAllLayers(frame);
// A second way of making the child non-opaque.
layer1->setOpaque(true);
layer1->setOpacity(1);
layer1->setExpectation(false, false);
layer2->setOpaque(false);
- layer2->setOpaqueColor(false);
+ layer2->setOpaqueContents(false);
layer2->setOpacity(1);
layer2->setExpectation(true, false);
- m_hostImpl->drawLayers();
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
EXPECT_TRUE(layer1->quadsAppended());
EXPECT_TRUE(layer2->quadsAppended());
+ m_hostImpl->didDrawAllLayers(frame);
// And when the layer says its not opaque but is painted opaque, it is not blended.
layer1->setOpaque(true);
layer1->setOpacity(1);
layer1->setExpectation(false, false);
layer2->setOpaque(false);
- layer2->setOpaqueColor(true);
+ layer2->setOpaqueContents(true);
layer2->setOpacity(1);
layer2->setExpectation(false, false);
- m_hostImpl->drawLayers();
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
EXPECT_TRUE(layer1->quadsAppended());
EXPECT_TRUE(layer2->quadsAppended());
+ m_hostImpl->didDrawAllLayers(frame);
+
+ // Layer with partially opaque contents, drawn with blending.
+ layer1->setOpaque(false);
+ layer1->setQuadRect(IntRect(5, 5, 5, 5));
+ layer1->setQuadVisibleRect(IntRect(5, 5, 5, 5));
+ layer1->setOpaqueContents(false);
+ layer1->setOpaqueContentRect(IntRect(5, 5, 2, 5));
+ layer1->setExpectation(true, false);
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
+ EXPECT_TRUE(layer1->quadsAppended());
+ m_hostImpl->didDrawAllLayers(frame);
+
+ // Layer with partially opaque contents partially culled, drawn with blending.
+ layer1->setOpaque(false);
+ layer1->setQuadRect(IntRect(5, 5, 5, 5));
+ layer1->setQuadVisibleRect(IntRect(5, 5, 5, 2));
+ layer1->setOpaqueContents(false);
+ layer1->setOpaqueContentRect(IntRect(5, 5, 2, 5));
+ layer1->setExpectation(true, false);
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
+ EXPECT_TRUE(layer1->quadsAppended());
+ m_hostImpl->didDrawAllLayers(frame);
+
+ // Layer with partially opaque contents culled, drawn with blending.
+ layer1->setOpaque(false);
+ layer1->setQuadRect(IntRect(5, 5, 5, 5));
+ layer1->setQuadVisibleRect(IntRect(7, 5, 3, 5));
+ layer1->setOpaqueContents(false);
+ layer1->setOpaqueContentRect(IntRect(5, 5, 2, 5));
+ layer1->setExpectation(true, false);
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
+ EXPECT_TRUE(layer1->quadsAppended());
+ m_hostImpl->didDrawAllLayers(frame);
+
+ // Layer with partially opaque contents and translucent contents culled, drawn without blending.
+ layer1->setOpaque(false);
+ layer1->setQuadRect(IntRect(5, 5, 5, 5));
+ layer1->setQuadVisibleRect(IntRect(5, 5, 2, 5));
+ layer1->setOpaqueContents(false);
+ layer1->setOpaqueContentRect(IntRect(5, 5, 2, 5));
+ layer1->setExpectation(false, false);
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
+ EXPECT_TRUE(layer1->quadsAppended());
+ m_hostImpl->didDrawAllLayers(frame);
+
}
+TEST_F(CCLayerTreeHostImplTest, viewportCovered)
+{
+ m_hostImpl->initializeLayerRenderer(createContext());
+ m_hostImpl->setBackgroundColor(Color::gray);
+
+ IntSize viewportSize(1000, 1000);
+ m_hostImpl->setViewportSize(viewportSize);
+
+ m_hostImpl->setRootLayer(BlendStateCheckLayer::create(0));
+ BlendStateCheckLayer* root = static_cast<BlendStateCheckLayer*>(m_hostImpl->rootLayer());
+ root->setExpectation(false, true);
+ root->setOpaque(true);
+
+ // No gutter rects
+ {
+ IntRect layerRect(0, 0, 1000, 1000);
+ root->setPosition(layerRect.location());
+ root->setBounds(layerRect.size());
+ root->setContentBounds(layerRect.size());
+ root->setQuadRect(IntRect(IntPoint(), layerRect.size()));
+ root->setQuadVisibleRect(IntRect(IntPoint(), layerRect.size()));
+
+ CCLayerTreeHostImpl::FrameData frame;
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ ASSERT_EQ(1u, frame.renderPasses.size());
+
+ size_t numGutterQuads = 0;
+ for (size_t i = 0; i < frame.renderPasses[0]->quadList().size(); ++i)
+ numGutterQuads += (frame.renderPasses[0]->quadList()[i]->material() == CCDrawQuad::SolidColor) ? 1 : 0;
+ EXPECT_EQ(0u, numGutterQuads);
+ EXPECT_EQ(1u, frame.renderPasses[0]->quadList().size());
+
+ verifyQuadsExactlyCoverRect(frame.renderPasses[0]->quadList(), IntRect(-layerRect.location(), viewportSize));
+ m_hostImpl->didDrawAllLayers(frame);
+ }
+
+ // Empty visible content area (fullscreen gutter rect)
+ {
+ IntRect layerRect(0, 0, 0, 0);
+ root->setPosition(layerRect.location());
+ root->setBounds(layerRect.size());
+ root->setContentBounds(layerRect.size());
+ root->setQuadRect(IntRect(IntPoint(), layerRect.size()));
+ root->setQuadVisibleRect(IntRect(IntPoint(), layerRect.size()));
+
+ CCLayerTreeHostImpl::FrameData frame;
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ ASSERT_EQ(1u, frame.renderPasses.size());
+ m_hostImpl->didDrawAllLayers(frame);
+
+ size_t numGutterQuads = 0;
+ for (size_t i = 0; i < frame.renderPasses[0]->quadList().size(); ++i)
+ numGutterQuads += (frame.renderPasses[0]->quadList()[i]->material() == CCDrawQuad::SolidColor) ? 1 : 0;
+ EXPECT_EQ(1u, numGutterQuads);
+ EXPECT_EQ(1u, frame.renderPasses[0]->quadList().size());
+
+ verifyQuadsExactlyCoverRect(frame.renderPasses[0]->quadList(), IntRect(-layerRect.location(), viewportSize));
+ m_hostImpl->didDrawAllLayers(frame);
+ }
+
+ // Content area in middle of clip rect (four surrounding gutter rects)
+ {
+ IntRect layerRect(500, 500, 200, 200);
+ root->setPosition(layerRect.location());
+ root->setBounds(layerRect.size());
+ root->setContentBounds(layerRect.size());
+ root->setQuadRect(IntRect(IntPoint(), layerRect.size()));
+ root->setQuadVisibleRect(IntRect(IntPoint(), layerRect.size()));
+
+ CCLayerTreeHostImpl::FrameData frame;
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ ASSERT_EQ(1u, frame.renderPasses.size());
+
+ size_t numGutterQuads = 0;
+ for (size_t i = 0; i < frame.renderPasses[0]->quadList().size(); ++i)
+ numGutterQuads += (frame.renderPasses[0]->quadList()[i]->material() == CCDrawQuad::SolidColor) ? 1 : 0;
+ EXPECT_EQ(4u, numGutterQuads);
+ EXPECT_EQ(5u, frame.renderPasses[0]->quadList().size());
+
+ verifyQuadsExactlyCoverRect(frame.renderPasses[0]->quadList(), IntRect(-layerRect.location(), viewportSize));
+ m_hostImpl->didDrawAllLayers(frame);
+ }
+
+}
+
+
class ReshapeTrackerContext: public FakeWebGraphicsContext3D {
public:
ReshapeTrackerContext() : m_reshapeCalled(false) { }
@@ -734,8 +999,11 @@ TEST_F(CCLayerTreeHostImplTest, reshapeNotCalledUntilDraw)
m_hostImpl->setRootLayer(adoptPtr(root));
EXPECT_FALSE(reshapeTracker->reshapeCalled());
- m_hostImpl->drawLayers();
+ CCLayerTreeHostImpl::FrameData frame;
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
EXPECT_TRUE(reshapeTracker->reshapeCalled());
+ m_hostImpl->didDrawAllLayers(frame);
}
class PartialSwapTrackerContext : public FakeWebGraphicsContext3D {
@@ -786,8 +1054,12 @@ TEST_F(CCLayerTreeHostImplTest, partialSwapReceivesDamageRect)
root->addChild(adoptPtr(child));
layerTreeHostImpl->setRootLayer(adoptPtr(root));
+ CCLayerTreeHostImpl::FrameData frame;
+
// First frame, the entire screen should get swapped.
- layerTreeHostImpl->drawLayers();
+ EXPECT_TRUE(layerTreeHostImpl->prepareToDraw(frame));
+ layerTreeHostImpl->drawLayers(frame);
+ layerTreeHostImpl->didDrawAllLayers(frame);
layerTreeHostImpl->swapBuffers();
IntRect actualSwapRect = partialSwapTracker->partialSwapRect();
IntRect expectedSwapRect = IntRect(IntPoint::zero(), IntSize(500, 500));
@@ -801,7 +1073,9 @@ TEST_F(CCLayerTreeHostImplTest, partialSwapReceivesDamageRect)
// expected damage rect: IntRect(IntPoint::zero(), IntSize(26, 28));
// expected swap rect: vertically flipped, with origin at bottom left corner.
child->setPosition(FloatPoint(0, 0));
- layerTreeHostImpl->drawLayers();
+ EXPECT_TRUE(layerTreeHostImpl->prepareToDraw(frame));
+ layerTreeHostImpl->drawLayers(frame);
+ m_hostImpl->didDrawAllLayers(frame);
layerTreeHostImpl->swapBuffers();
actualSwapRect = partialSwapTracker->partialSwapRect();
expectedSwapRect = IntRect(IntPoint(0, 500-28), IntSize(26, 28));
@@ -814,8 +1088,10 @@ TEST_F(CCLayerTreeHostImplTest, partialSwapReceivesDamageRect)
// expected damage rect: IntRect(IntPoint::zero(), IntSize(500, 500));
// expected swap rect: flipped damage rect, but also clamped to viewport
layerTreeHostImpl->setViewportSize(IntSize(10, 10));
- root->setOpacity(0.7); // this will damage everything
- layerTreeHostImpl->drawLayers();
+ root->setOpacity(0.7f); // this will damage everything
+ EXPECT_TRUE(layerTreeHostImpl->prepareToDraw(frame));
+ layerTreeHostImpl->drawLayers(frame);
+ m_hostImpl->didDrawAllLayers(frame);
layerTreeHostImpl->swapBuffers();
actualSwapRect = partialSwapTracker->partialSwapRect();
expectedSwapRect = IntRect(IntPoint::zero(), IntSize(10, 10));
@@ -825,55 +1101,12 @@ TEST_F(CCLayerTreeHostImplTest, partialSwapReceivesDamageRect)
EXPECT_EQ(expectedSwapRect.height(), actualSwapRect.height());
}
-// Make sure that we reset damage tracking on visibility change because the
-// state of the front buffer that we push to with PostSubBuffer is undefined.
-TEST_F(CCLayerTreeHostImplTest, visibilityChangeResetsDamage)
-{
- PartialSwapTrackerContext* partialSwapTracker = new PartialSwapTrackerContext();
- RefPtr<GraphicsContext3D> context = GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(partialSwapTracker), GraphicsContext3D::RenderDirectlyToHostWindow);
-
- // This test creates its own CCLayerTreeHostImpl, so
- // that we can force partial swap enabled.
- CCSettings settings;
- settings.partialSwapEnabled = true;
- OwnPtr<CCLayerTreeHostImpl> layerTreeHostImpl = CCLayerTreeHostImpl::create(settings, this);
- layerTreeHostImpl->initializeLayerRenderer(context);
- layerTreeHostImpl->setViewportSize(IntSize(500, 500));
-
- CCLayerImpl* root = new FakeDrawableCCLayerImpl(1);
- root->setAnchorPoint(FloatPoint(0, 0));
- root->setBounds(IntSize(500, 500));
- root->setDrawsContent(true);
- layerTreeHostImpl->setRootLayer(adoptPtr(root));
-
- // First frame: ignore.
- layerTreeHostImpl->drawLayers();
- layerTreeHostImpl->swapBuffers();
-
- // Second frame: nothing has changed --- so we souldn't push anything with partial swap.
- layerTreeHostImpl->drawLayers();
- layerTreeHostImpl->swapBuffers();
- EXPECT_TRUE(partialSwapTracker->partialSwapRect().isEmpty());
-
- // Third frame: visibility change --- so we should push a full frame with partial swap.
- layerTreeHostImpl->setVisible(false);
- layerTreeHostImpl->setVisible(true);
- layerTreeHostImpl->drawLayers();
- layerTreeHostImpl->swapBuffers();
- IntRect actualSwapRect = partialSwapTracker->partialSwapRect();
- IntRect expectedSwapRect = IntRect(IntPoint::zero(), IntSize(500, 500));
- EXPECT_EQ(expectedSwapRect.x(), actualSwapRect.x());
- EXPECT_EQ(expectedSwapRect.y(), actualSwapRect.y());
- EXPECT_EQ(expectedSwapRect.width(), actualSwapRect.width());
- EXPECT_EQ(expectedSwapRect.height(), actualSwapRect.height());
-}
-
// Make sure that context lost notifications are propagated through the tree.
class ContextLostNotificationCheckLayer : public CCLayerImpl {
public:
static PassOwnPtr<ContextLostNotificationCheckLayer> create(int id) { return adoptPtr(new ContextLostNotificationCheckLayer(id)); }
- virtual void didLoseContext()
+ virtual void didLoseContext() OVERRIDE
{
m_didLoseContextCalled = true;
}
@@ -927,4 +1160,218 @@ TEST_F(CCLayerTreeHostImplTest, finishAllRenderingAfterContextLost)
m_hostImpl->finishAllRendering();
}
+class ScrollbarLayerFakePaint : public CCScrollbarLayerImpl {
+public:
+ static PassOwnPtr<ScrollbarLayerFakePaint> create(int id) { return adoptPtr(new ScrollbarLayerFakePaint(id)); }
+
+ virtual void paint(GraphicsContext*) { }
+
+private:
+ ScrollbarLayerFakePaint(int id) : CCScrollbarLayerImpl(id) { }
+};
+
+TEST_F(CCLayerTreeHostImplTest, scrollbarLayerLostContext)
+{
+ m_hostImpl->initializeLayerRenderer(createContext());
+ m_hostImpl->setViewportSize(IntSize(10, 10));
+
+ m_hostImpl->setRootLayer(ScrollbarLayerFakePaint::create(0));
+ ScrollbarLayerFakePaint* scrollbar = static_cast<ScrollbarLayerFakePaint*>(m_hostImpl->rootLayer());
+ scrollbar->setBounds(IntSize(1, 1));
+ scrollbar->setContentBounds(IntSize(1, 1));
+ scrollbar->setDrawsContent(true);
+
+ for (int i = 0; i < 2; ++i) {
+ CCLayerTreeHostImpl::FrameData frame;
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ ASSERT(frame.renderPasses.size() == 1);
+ CCRenderPass* renderPass = frame.renderPasses[0].get();
+ // Scrollbar layer should always generate quads, even after lost context
+ EXPECT_GT(renderPass->quadList().size(), 0u);
+ m_hostImpl->didDrawAllLayers(frame);
+ m_hostImpl->initializeLayerRenderer(createContext());
+ }
+}
+
+// Fake WebGraphicsContext3D that will cause a failure if trying to use a
+// resource that wasn't created by it (resources created by
+// FakeWebGraphicsContext3D have an id of 1).
+class StrictWebGraphicsContext3D : public FakeWebGraphicsContext3D {
+public:
+ virtual WebGLId createBuffer() { return 2; }
+ virtual WebGLId createFramebuffer() { return 3; }
+ virtual WebGLId createProgram() { return 4; }
+ virtual WebGLId createRenderbuffer() { return 5; }
+ virtual WebGLId createShader(WGC3Denum) { return 6; }
+ virtual WebGLId createTexture() { return 7; }
+
+ virtual void deleteBuffer(WebGLId id)
+ {
+ if (id != 2)
+ ADD_FAILURE() << "Trying to delete buffer id " << id;
+ }
+
+ virtual void deleteFramebuffer(WebGLId id)
+ {
+ if (id != 3)
+ ADD_FAILURE() << "Trying to delete framebuffer id " << id;
+ }
+
+ virtual void deleteProgram(WebGLId id)
+ {
+ if (id != 4)
+ ADD_FAILURE() << "Trying to delete program id " << id;
+ }
+
+ virtual void deleteRenderbuffer(WebGLId id)
+ {
+ if (id != 5)
+ ADD_FAILURE() << "Trying to delete renderbuffer id " << id;
+ }
+
+ virtual void deleteShader(WebGLId id)
+ {
+ if (id != 6)
+ ADD_FAILURE() << "Trying to delete shader id " << id;
+ }
+
+ virtual void deleteTexture(WebGLId id)
+ {
+ if (id != 7)
+ ADD_FAILURE() << "Trying to delete texture id " << id;
+ }
+
+ virtual void bindBuffer(WGC3Denum, WebGLId id)
+ {
+ if (id != 2 && id)
+ ADD_FAILURE() << "Trying to bind buffer id " << id;
+ }
+
+ virtual void bindFramebuffer(WGC3Denum, WebGLId id)
+ {
+ if (id != 3 && id)
+ ADD_FAILURE() << "Trying to bind framebuffer id " << id;
+ }
+
+ virtual void useProgram(WebGLId id)
+ {
+ if (id != 4)
+ ADD_FAILURE() << "Trying to use program id " << id;
+ }
+
+ virtual void bindRenderbuffer(WGC3Denum, WebGLId id)
+ {
+ if (id != 5 && id)
+ ADD_FAILURE() << "Trying to bind renderbuffer id " << id;
+ }
+
+ virtual void attachShader(WebGLId program, WebGLId shader)
+ {
+ if ((program != 4) || (shader != 6))
+ ADD_FAILURE() << "Trying to attach shader id " << shader << " to program id " << program;
+ }
+
+ virtual void bindTexture(WGC3Denum, WebGLId id)
+ {
+ if (id != 7 && id)
+ ADD_FAILURE() << "Trying to bind texture id " << id;
+ }
+
+ static PassRefPtr<GraphicsContext3D> createGraphicsContext()
+ {
+ return GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(new StrictWebGraphicsContext3D()), GraphicsContext3D::RenderDirectlyToHostWindow);
+ }
+};
+
+// Fake video frame that represents a 4x4 YUV video frame.
+class FakeVideoFrame: public WebVideoFrame {
+public:
+ FakeVideoFrame() { memset(m_data, 0x80, sizeof(m_data)); }
+ virtual ~FakeVideoFrame() { }
+ virtual Format format() const { return FormatYV12; }
+ virtual unsigned width() const { return 4; }
+ virtual unsigned height() const { return 4; }
+ virtual unsigned planes() const { return 3; }
+ virtual int stride(unsigned plane) const { return 4; }
+ virtual const void* data(unsigned plane) const { return m_data; }
+ virtual unsigned textureId() const { return 0; }
+ virtual unsigned textureTarget() const { return 0; }
+
+private:
+ char m_data[16];
+};
+
+// Fake video frame provider that always provides the same FakeVideoFrame.
+class FakeVideoFrameProvider: public WebVideoFrameProvider {
+public:
+ FakeVideoFrameProvider() : m_client(0) { }
+ virtual ~FakeVideoFrameProvider()
+ {
+ if (m_client)
+ m_client->stopUsingProvider();
+ }
+
+ virtual void setVideoFrameProviderClient(Client* client) { m_client = client; }
+ virtual WebVideoFrame* getCurrentFrame() { return &m_frame; }
+ virtual void putCurrentFrame(WebVideoFrame*) { }
+
+private:
+ FakeVideoFrame m_frame;
+ Client* m_client;
+};
+
+TEST_F(CCLayerTreeHostImplTest, dontUseOldResourcesAfterLostContext)
+{
+ m_hostImpl->initializeLayerRenderer(createContext());
+ m_hostImpl->setViewportSize(IntSize(10, 10));
+
+ OwnPtr<CCLayerImpl> rootLayer(CCLayerImpl::create(0));
+ rootLayer->setBounds(IntSize(10, 10));
+ rootLayer->setAnchorPoint(FloatPoint(0, 0));
+
+ OwnPtr<CCTiledLayerImpl> tileLayer = CCTiledLayerImpl::create(1);
+ tileLayer->setBounds(IntSize(10, 10));
+ tileLayer->setAnchorPoint(FloatPoint(0, 0));
+ tileLayer->setContentBounds(IntSize(10, 10));
+ tileLayer->setDrawsContent(true);
+ tileLayer->setSkipsDraw(false);
+ OwnPtr<CCLayerTilingData> tilingData(CCLayerTilingData::create(IntSize(10, 10), CCLayerTilingData::NoBorderTexels));
+ tilingData->setBounds(IntSize(10, 10));
+ tileLayer->setTilingData(*tilingData);
+ tileLayer->pushTileProperties(0, 0, 1, IntRect(0, 0, 10, 10));
+ rootLayer->addChild(tileLayer.release());
+
+ OwnPtr<CCTextureLayerImpl> textureLayer = CCTextureLayerImpl::create(2);
+ textureLayer->setBounds(IntSize(10, 10));
+ textureLayer->setAnchorPoint(FloatPoint(0, 0));
+ textureLayer->setContentBounds(IntSize(10, 10));
+ textureLayer->setDrawsContent(true);
+ textureLayer->setTextureId(1);
+ rootLayer->addChild(textureLayer.release());
+
+ FakeVideoFrameProvider provider;
+ OwnPtr<CCVideoLayerImpl> videoLayer = CCVideoLayerImpl::create(3, &provider);
+ videoLayer->setBounds(IntSize(10, 10));
+ videoLayer->setAnchorPoint(FloatPoint(0, 0));
+ videoLayer->setContentBounds(IntSize(10, 10));
+ videoLayer->setDrawsContent(true);
+ rootLayer->addChild(videoLayer.release());
+
+ m_hostImpl->setRootLayer(rootLayer.release());
+
+ CCLayerTreeHostImpl::FrameData frame;
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
+ m_hostImpl->didDrawAllLayers(frame);
+ m_hostImpl->swapBuffers();
+
+ // Lose the context, replacing it with a StrictWebGraphicsContext3D, that
+ // will warn if any resource from the previous context gets used.
+ m_hostImpl->initializeLayerRenderer(StrictWebGraphicsContext3D::createGraphicsContext());
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ m_hostImpl->drawLayers(frame);
+ m_hostImpl->didDrawAllLayers(frame);
+ m_hostImpl->swapBuffers();
+}
+
} // namespace
diff --git a/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp b/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
index 2c4e7ce59..f2382b359 100644
--- a/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
+++ b/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
@@ -27,12 +27,13 @@
#include "cc/CCLayerTreeHost.h"
#include "CCAnimationTestCommon.h"
+#include "CCOcclusionTrackerTestCommon.h"
+#include "CCTiledLayerTestCommon.h"
#include "CompositorFakeWebGraphicsContext3D.h"
#include "ContentLayerChromium.h"
#include "FilterOperations.h"
#include "GraphicsContext3DPrivate.h"
#include "LayerChromium.h"
-#include "Region.h"
#include "TextureManager.h"
#include "WebCompositor.h"
#include "WebKit.h"
@@ -44,10 +45,10 @@
#include "cc/CCScopedThreadProxy.h"
#include "cc/CCTextureUpdater.h"
#include "cc/CCThreadTask.h"
-#include "platform/WebKitPlatformSupport.h"
#include "platform/WebThread.h"
#include <gmock/gmock.h>
#include <gtest/gtest.h>
+#include <public/Platform.h>
#include <wtf/MainThread.h>
#include <wtf/PassRefPtr.h>
#include <wtf/Vector.h>
@@ -64,8 +65,10 @@ class TestHooks : public CCLayerAnimationDelegate {
public:
virtual void beginCommitOnCCThread(CCLayerTreeHostImpl*) { }
virtual void commitCompleteOnCCThread(CCLayerTreeHostImpl*) { }
+ virtual void prepareToDrawOnCCThread(CCLayerTreeHostImpl*) { }
virtual void drawLayersOnCCThread(CCLayerTreeHostImpl*) { }
virtual void animateLayers(CCLayerTreeHostImpl*, double monotonicTime) { }
+ virtual void willAnimateLayers(CCLayerTreeHostImpl*, double monotonicTime) { }
virtual void applyScrollAndScale(const IntSize&, float) { }
virtual void updateAnimations(double monotonicTime) { }
virtual void layout() { }
@@ -74,7 +77,7 @@ public:
// Implementation of CCLayerAnimationDelegate
virtual void notifyAnimationStarted(double time) { }
- virtual void notifyAnimationFinished(int animationId) { }
+ virtual void notifyAnimationFinished(double time) { }
};
// Adapts CCLayerTreeHostImpl for test. Runs real code, then invokes test hooks.
@@ -97,15 +100,23 @@ public:
m_testHooks->commitCompleteOnCCThread(this);
}
- virtual void drawLayers()
+ virtual bool prepareToDraw(FrameData& frame)
{
- CCLayerTreeHostImpl::drawLayers();
+ bool result = CCLayerTreeHostImpl::prepareToDraw(frame);
+ m_testHooks->prepareToDrawOnCCThread(this);
+ return result;
+ }
+
+ virtual void drawLayers(const FrameData& frame)
+ {
+ CCLayerTreeHostImpl::drawLayers(frame);
m_testHooks->drawLayersOnCCThread(this);
}
protected:
virtual void animateLayers(double monotonicTime, double wallClockTime)
{
+ m_testHooks->willAnimateLayers(this, monotonicTime);
CCLayerTreeHostImpl::animateLayers(monotonicTime, wallClockTime);
m_testHooks->animateLayers(this, monotonicTime);
}
@@ -123,13 +134,13 @@ private:
// Adapts CCLayerTreeHost for test. Injects MockLayerTreeHostImpl.
class MockLayerTreeHost : public CCLayerTreeHost {
public:
- static PassRefPtr<MockLayerTreeHost> create(TestHooks* testHooks, CCLayerTreeHostClient* client, PassRefPtr<LayerChromium> rootLayer, const CCSettings& settings)
+ static PassOwnPtr<MockLayerTreeHost> create(TestHooks* testHooks, CCLayerTreeHostClient* client, PassRefPtr<LayerChromium> rootLayer, const CCSettings& settings)
{
// For these tests, we will enable threaded animations.
CCSettings settingsCopy = settings;
settingsCopy.threadedAnimationEnabled = true;
- RefPtr<MockLayerTreeHost> layerTreeHost = adoptRef(new MockLayerTreeHost(testHooks, client, settingsCopy));
+ OwnPtr<MockLayerTreeHost> layerTreeHost(adoptPtr(new MockLayerTreeHost(testHooks, client, settingsCopy)));
bool success = layerTreeHost->initialize();
EXPECT_TRUE(success);
layerTreeHost->setRootLayer(rootLayer);
@@ -203,7 +214,7 @@ private:
}
Vector<WebGLId> m_textures;
- HashSet<WebGLId> m_usedTextures;
+ HashSet<WebGLId, DefaultHash<WebGLId>::Hash, UnsignedWithZeroKeyHashTraits<WebGLId> > m_usedTextures;
};
// Implementation of CCLayerTreeHost callback interface.
@@ -214,22 +225,26 @@ public:
return adoptPtr(new MockLayerTreeHostClient(testHooks));
}
- virtual void updateAnimations(double monotonicTime)
+ virtual void willBeginFrame() OVERRIDE
+ {
+ }
+
+ virtual void updateAnimations(double monotonicTime) OVERRIDE
{
m_testHooks->updateAnimations(monotonicTime);
}
- virtual void layout()
+ virtual void layout() OVERRIDE
{
m_testHooks->layout();
}
- virtual void applyScrollAndScale(const IntSize& scrollDelta, float scale)
+ virtual void applyScrollAndScale(const IntSize& scrollDelta, float scale) OVERRIDE
{
m_testHooks->applyScrollAndScale(scrollDelta, scale);
}
- virtual PassRefPtr<GraphicsContext3D> createContext()
+ virtual PassRefPtr<GraphicsContext3D> createContext() OVERRIDE
{
GraphicsContext3D::Attributes attrs;
WebGraphicsContext3D::Attributes webAttrs;
@@ -239,21 +254,25 @@ public:
return GraphicsContext3DPrivate::createGraphicsContextFromWebContext(webContext.release(), GraphicsContext3D::RenderDirectlyToHostWindow);
}
- virtual void didCommitAndDrawFrame()
+ virtual void didCommit() OVERRIDE
+ {
+ }
+
+ virtual void didCommitAndDrawFrame() OVERRIDE
{
m_testHooks->didCommitAndDrawFrame();
}
- virtual void didCompleteSwapBuffers()
+ virtual void didCompleteSwapBuffers() OVERRIDE
{
}
- virtual void didRecreateContext(bool succeeded)
+ virtual void didRecreateContext(bool succeeded) OVERRIDE
{
m_testHooks->didRecreateContext(succeeded);
}
- virtual void scheduleComposite()
+ virtual void scheduleComposite() OVERRIDE
{
}
@@ -300,6 +319,11 @@ public:
callOnMainThread(CCLayerTreeHostTest::dispatchSetNeedsCommit, this);
}
+ void AcquireLayerTextures()
+ {
+ callOnMainThread(CCLayerTreeHostTest::dispatchAcquireLayerTextures, this);
+ }
+
void postSetNeedsRedrawToMainThread()
{
callOnMainThread(CCLayerTreeHostTest::dispatchSetNeedsRedraw, this);
@@ -340,7 +364,7 @@ protected:
static void onEndTest(void* self)
{
ASSERT(isMainThread());
- webKitPlatformSupport()->currentThread()->exitRunLoop();
+ WebKit::Platform::current()->currentThread()->exitRunLoop();
}
static void dispatchSetNeedsAnimate(void* self)
@@ -358,7 +382,7 @@ protected:
CCLayerTreeHostTest* test = static_cast<CCLayerTreeHostTest*>(self);
ASSERT(test);
if (test->m_layerTreeHost && test->m_layerTreeHost->rootLayer())
- addOpacityTransitionToLayer(*test->m_layerTreeHost->rootLayer(), 0, 0, 1);
+ addOpacityTransitionToLayer(*test->m_layerTreeHost->rootLayer(), 0, 0, 0.5, false);
}
static void dispatchAddAnimation(void* self)
@@ -367,7 +391,7 @@ protected:
CCLayerTreeHostTest* test = static_cast<CCLayerTreeHostTest*>(self);
ASSERT(test);
if (test->m_layerTreeHost && test->m_layerTreeHost->rootLayer())
- addOpacityTransitionToLayer(*test->m_layerTreeHost->rootLayer(), 10, 0, 1);
+ addOpacityTransitionToLayer(*test->m_layerTreeHost->rootLayer(), 10, 0, 0.5, true);
}
static void dispatchSetNeedsAnimateAndCommit(void* self)
@@ -390,6 +414,15 @@ protected:
test->m_layerTreeHost->setNeedsCommit();
}
+ static void dispatchAcquireLayerTextures(void* self)
+ {
+ ASSERT(isMainThread());
+ CCLayerTreeHostTest* test = static_cast<CCLayerTreeHostTest*>(self);
+ ASSERT_TRUE(test);
+ if (test->m_layerTreeHost)
+ test->m_layerTreeHost->acquireLayerTextures();
+ }
+
static void dispatchSetNeedsRedraw(void* self)
{
ASSERT(isMainThread());
@@ -464,7 +497,7 @@ protected:
virtual void runTest(bool threaded)
{
if (threaded) {
- m_webThread = adoptPtr(webKitPlatformSupport()->createThread("CCLayerTreeHostTest"));
+ m_webThread = adoptPtr(WebKit::Platform::current()->createThread("CCLayerTreeHostTest"));
WebCompositor::initialize(m_webThread.get());
} else
WebCompositor::initialize(0);
@@ -473,10 +506,10 @@ protected:
m_mainThreadProxy = CCScopedThreadProxy::create(CCProxy::mainThread());
m_beginTask = new BeginTask(this);
- webKitPlatformSupport()->currentThread()->postDelayedTask(m_beginTask, 0); // postDelayedTask takes ownership of the task
+ WebKit::Platform::current()->currentThread()->postDelayedTask(m_beginTask, 0); // postDelayedTask takes ownership of the task
m_timeoutTask = new TimeoutTask(this);
- webKitPlatformSupport()->currentThread()->postDelayedTask(m_timeoutTask, 5000);
- webKitPlatformSupport()->currentThread()->enterRunLoop();
+ WebKit::Platform::current()->currentThread()->postDelayedTask(m_timeoutTask, 5000);
+ WebKit::Platform::current()->currentThread()->enterRunLoop();
if (m_layerTreeHost && m_layerTreeHost->rootLayer())
m_layerTreeHost->rootLayer()->setLayerTreeHost(0);
@@ -498,7 +531,7 @@ protected:
CCSettings m_settings;
OwnPtr<MockLayerTreeHostClient> m_client;
- RefPtr<CCLayerTreeHost> m_layerTreeHost;
+ OwnPtr<CCLayerTreeHost> m_layerTreeHost;
private:
bool m_beginning;
@@ -520,6 +553,7 @@ void CCLayerTreeHostTest::doBeginTest()
m_layerTreeHost = MockLayerTreeHost::create(this, m_client.get(), rootLayer, m_settings);
ASSERT_TRUE(m_layerTreeHost);
rootLayer->setLayerTreeHost(m_layerTreeHost.get());
+ m_layerTreeHost->setSurfaceReady();
m_beginning = true;
beginTest();
@@ -806,6 +840,134 @@ TEST_F(CCLayerTreeHostTestSetNeedsRedraw, runMultiThread)
runTestThreaded();
}
+
+// beginLayerWrite should prevent draws from executing until a commit occurs
+class CCLayerTreeHostTestWriteLayersRedraw : public CCLayerTreeHostTestThreadOnly {
+public:
+ CCLayerTreeHostTestWriteLayersRedraw()
+ : m_numCommits(0)
+ , m_numDraws(0)
+ {
+ }
+
+ virtual void beginTest()
+ {
+ AcquireLayerTextures();
+ postSetNeedsRedrawToMainThread(); // should be inhibited without blocking
+ postSetNeedsCommitToMainThread();
+ }
+
+ virtual void drawLayersOnCCThread(CCLayerTreeHostImpl* impl)
+ {
+ EXPECT_EQ(1, impl->sourceFrameNumber());
+ m_numDraws++;
+ }
+
+ virtual void commitCompleteOnCCThread(CCLayerTreeHostImpl*)
+ {
+ m_numCommits++;
+ endTest();
+ }
+
+ virtual void afterTest()
+ {
+ EXPECT_EQ(0, m_numDraws);
+ EXPECT_EQ(1, m_numCommits);
+ }
+
+private:
+ int m_numCommits;
+ int m_numDraws;
+};
+
+TEST_F(CCLayerTreeHostTestWriteLayersRedraw, runMultiThread)
+{
+ runTestThreaded();
+}
+
+// Verify that when resuming visibility, requesting layer write permission
+// will not deadlock the main thread even though there are not yet any
+// scheduled redraws. This behavior is critical for reliably surviving tab
+// switching. There are no failure conditions to this test, it just passes
+// by not timing out.
+class CCLayerTreeHostTestWriteLayersAfterVisible : public CCLayerTreeHostTestThreadOnly {
+public:
+ CCLayerTreeHostTestWriteLayersAfterVisible()
+ : m_numCommits(0)
+ {
+ }
+
+ virtual void beginTest()
+ {
+ postSetNeedsCommitToMainThread();
+ }
+
+ virtual void commitCompleteOnCCThread(CCLayerTreeHostImpl*)
+ {
+ m_numCommits++;
+ if (m_numCommits == 2)
+ endTest();
+ else {
+ postSetVisibleToMainThread(false);
+ postSetVisibleToMainThread(true);
+ AcquireLayerTextures();
+ postSetNeedsCommitToMainThread();
+ }
+ }
+
+ virtual void afterTest()
+ {
+ }
+
+private:
+ int m_numCommits;
+};
+
+TEST_F(CCLayerTreeHostTestWriteLayersAfterVisible, runMultiThread)
+{
+ runTestThreaded();
+}
+
+// A compositeAndReadback while invisible should force a normal commit without assertion.
+class CCLayerTreeHostTestCompositeAndReadbackWhileInvisible : public CCLayerTreeHostTestThreadOnly {
+public:
+ CCLayerTreeHostTestCompositeAndReadbackWhileInvisible()
+ : m_numCommits(0)
+ {
+ }
+
+ virtual void beginTest()
+ {
+ }
+
+ virtual void didCommitAndDrawFrame()
+ {
+ m_numCommits++;
+ if (m_numCommits == 1) {
+ m_layerTreeHost->setVisible(false);
+ m_layerTreeHost->setNeedsCommit();
+ m_layerTreeHost->setNeedsCommit();
+ OwnArrayPtr<char> pixels(adoptArrayPtr(new char[4]));
+ m_layerTreeHost->compositeAndReadback(static_cast<void*>(pixels.get()), IntRect(0, 0, 1, 1));
+ } else
+ endTest();
+
+ }
+
+ virtual void afterTest()
+ {
+ }
+
+private:
+ int m_numCommits;
+};
+
+TEST_F(CCLayerTreeHostTestCompositeAndReadbackWhileInvisible, runMultiThread)
+{
+ runTestThreaded();
+}
+
+
// Trigger a frame with setNeedsCommit. Then, inside the resulting animate
// callback, requet another frame using setNeedsAnimate. End the test when
// animate gets called yet-again, indicating that the proxy is correctly
@@ -853,7 +1015,6 @@ public:
CCLayerTreeHostTestAddAnimation()
: m_numAnimates(0)
, m_receivedAnimationStartedNotification(false)
- , m_receivedAnimationFinishedNotification(false)
, m_startTime(0)
, m_firstMonotonicTime(0)
{
@@ -878,7 +1039,6 @@ public:
EXPECT_LT(0, m_firstMonotonicTime);
EXPECT_NE(m_startTime, m_firstMonotonicTime);
EXPECT_TRUE(m_receivedAnimationStartedNotification);
- EXPECT_TRUE(m_receivedAnimationFinishedNotification);
endTest();
}
@@ -888,11 +1048,6 @@ public:
m_startTime = wallClockTime;
}
- virtual void notifyAnimationFinished(int)
- {
- m_receivedAnimationFinishedNotification = true;
- }
-
virtual void afterTest()
{
}
@@ -900,7 +1055,6 @@ public:
private:
int m_numAnimates;
bool m_receivedAnimationStartedNotification;
- bool m_receivedAnimationFinishedNotification;
double m_startTime;
double m_firstMonotonicTime;
};
@@ -947,6 +1101,153 @@ TEST_F(CCLayerTreeHostTestTickAnimationWhileBackgrounded, runMultiThread)
runTestThreaded();
}
+// Ensures that animations continue to be ticked when we are backgrounded.
+class CCLayerTreeHostTestAddAnimationWithTimingFunction : public CCLayerTreeHostTestThreadOnly {
+public:
+ CCLayerTreeHostTestAddAnimationWithTimingFunction()
+ {
+ }
+
+ virtual void beginTest()
+ {
+ postAddAnimationToMainThread();
+ }
+
+ virtual void animateLayers(CCLayerTreeHostImpl* layerTreeHostImpl, double monotonicTime)
+ {
+ const CCFloatAnimationCurve* curve = m_layerTreeHost->rootLayer()->layerAnimationController()->getActiveAnimation(0, CCActiveAnimation::Opacity)->curve()->toFloatAnimationCurve();
+ float startOpacity = curve->getValue(0);
+ float endOpacity = curve->getValue(curve->duration());
+ float linearlyInterpolatedOpacity = 0.25 * endOpacity + 0.75 * startOpacity;
+ double time = curve->duration() * 0.25;
+ // If the linear timing function associated with this animation was not picked up,
+ // then the linearly interpolated opacity would be different because of the
+ // default ease timing function.
+ EXPECT_FLOAT_EQ(linearlyInterpolatedOpacity, curve->getValue(time));
+ endTest();
+ }
+
+ virtual void afterTest()
+ {
+ }
+
+private:
+};
+
+TEST_F(CCLayerTreeHostTestAddAnimationWithTimingFunction, runMultiThread)
+{
+ runTestThreaded();
+}
+
+// Ensures that when opacity is being animated, this value does not cause the subtree to be skipped.
+class CCLayerTreeHostTestDoNotSkipLayersWithAnimatedOpacity : public CCLayerTreeHostTestThreadOnly {
+public:
+ CCLayerTreeHostTestDoNotSkipLayersWithAnimatedOpacity()
+ {
+ }
+
+ virtual void beginTest()
+ {
+ m_layerTreeHost->rootLayer()->setDrawOpacity(1);
+ m_layerTreeHost->setViewportSize(IntSize(10, 10));
+ m_layerTreeHost->rootLayer()->setOpacity(0);
+ postAddAnimationToMainThread();
+ }
+
+ virtual void commitCompleteOnCCThread(CCLayerTreeHostImpl*)
+ {
+ // If the subtree was skipped when preparing to draw, the layer's draw opacity
+ // will not have been updated. It should be set to 0 due to the animation.
+ // Without the animation, the layer will be skipped since it has zero opacity.
+ EXPECT_EQ(0, m_layerTreeHost->rootLayer()->drawOpacity());
+ endTest();
+ }
+
+ virtual void afterTest()
+ {
+ }
+};
+
+TEST_F(CCLayerTreeHostTestDoNotSkipLayersWithAnimatedOpacity, runMultiThread)
+{
+ runTestThreaded();
+}
+
+// Ensures that main thread animations have their start times synchronized with impl thread animations.
+class CCLayerTreeHostTestSynchronizeAnimationStartTimes : public CCLayerTreeHostTestThreadOnly {
+public:
+ CCLayerTreeHostTestSynchronizeAnimationStartTimes()
+ : m_layerTreeHostImpl(0)
+ {
+ }
+
+ virtual void beginTest()
+ {
+ postAddAnimationToMainThread();
+ }
+
+ // This is guaranteed to be called before CCLayerTreeHostImpl::animateLayers.
+ virtual void willAnimateLayers(CCLayerTreeHostImpl* layerTreeHostImpl, double monotonicTime)
+ {
+ m_layerTreeHostImpl = layerTreeHostImpl;
+ }
+
+ virtual void notifyAnimationStarted(double time)
+ {
+ EXPECT_TRUE(m_layerTreeHostImpl);
+
+ CCLayerAnimationController* controllerImpl = m_layerTreeHostImpl->rootLayer()->layerAnimationController();
+ CCLayerAnimationController* controller = m_layerTreeHost->rootLayer()->layerAnimationController();
+ CCActiveAnimation* animationImpl = controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity);
+ CCActiveAnimation* animation = controller->getActiveAnimation(0, CCActiveAnimation::Opacity);
+
+ EXPECT_EQ(animationImpl->startTime(), animation->startTime());
+
+ endTest();
+ }
+
+ virtual void afterTest()
+ {
+ }
+
+private:
+ CCLayerTreeHostImpl* m_layerTreeHostImpl;
+};
+
+TEST_F(CCLayerTreeHostTestSynchronizeAnimationStartTimes, runMultiThread)
+{
+ runTestThreaded();
+}
+
+// Ensures that main thread animations have their start times synchronized with impl thread animations.
+class CCLayerTreeHostTestAnimationFinishedEvents : public CCLayerTreeHostTestThreadOnly {
+public:
+ CCLayerTreeHostTestAnimationFinishedEvents()
+ {
+ }
+
+ virtual void beginTest()
+ {
+ postAddInstantAnimationToMainThread();
+ }
+
+ virtual void notifyAnimationFinished(double time)
+ {
+ endTest();
+ }
+
+ virtual void afterTest()
+ {
+ }
+
+private:
+};
+
+TEST_F(CCLayerTreeHostTestAnimationFinishedEvents, runMultiThread)
+{
+ runTestThreaded();
+}
+
class CCLayerTreeHostTestScrollSimple : public CCLayerTreeHostTestThreadOnly {
public:
CCLayerTreeHostTestScrollSimple()
@@ -1096,6 +1397,38 @@ TEST_F(CCLayerTreeHostTestScrollMultipleRedraw, DISABLED_runMultiThread)
runTestThreaded();
}
+// This test verifies that properties on the layer tree host are commited to the impl side.
+class CCLayerTreeHostTestCommit : public CCLayerTreeHostTest {
+public:
+
+ CCLayerTreeHostTestCommit() { }
+
+ virtual void beginTest()
+ {
+ m_layerTreeHost->setViewportSize(IntSize(20, 20));
+ m_layerTreeHost->setBackgroundColor(Color::gray);
+ m_layerTreeHost->setPageScaleFactorAndLimits(5, 5, 5);
+
+ postSetNeedsCommitToMainThread();
+ }
+
+ virtual void commitCompleteOnCCThread(CCLayerTreeHostImpl* impl)
+ {
+ EXPECT_EQ(IntSize(20, 20), impl->viewportSize());
+ EXPECT_EQ(Color::gray, impl->backgroundColor());
+ EXPECT_EQ(5, impl->pageScale());
+
+ endTest();
+ }
+
+ virtual void afterTest() { }
+};
+
+TEST_F(CCLayerTreeHostTestCommit, runTest)
+{
+ runTest(true);
+}
+
// Verifies that startPageScaleAnimation events propagate correctly from CCLayerTreeHost to
// CCLayerTreeHostImpl in the MT compositor.
class CCLayerTreeHostTestStartPageScaleAnimation : public CCLayerTreeHostTest {
@@ -1230,33 +1563,23 @@ public:
int idlePaintContentsCount() { return m_idlePaintContentsCount; }
void resetPaintContentsCount() { m_paintContentsCount = 0; m_idlePaintContentsCount = 0;}
- int updateCount() { return m_updateCount; }
- void resetUpdateCount() { m_updateCount = 0; }
-
- virtual void paintContentsIfDirty(const Region& occludedScreenSpace)
+ virtual void update(CCTextureUpdater& updater, const CCOcclusionTracker* occlusion) OVERRIDE
{
- ContentLayerChromium::paintContentsIfDirty(occludedScreenSpace);
+ ContentLayerChromium::update(updater, occlusion);
m_paintContentsCount++;
}
- virtual void idlePaintContentsIfDirty(const Region& occluded)
+ virtual void idleUpdate(CCTextureUpdater& updater, const CCOcclusionTracker* occlusion) OVERRIDE
{
- ContentLayerChromium::idlePaintContentsIfDirty(occluded);
+ ContentLayerChromium::idleUpdate(updater, occlusion);
m_idlePaintContentsCount++;
}
- virtual void updateCompositorResources(GraphicsContext3D* context, CCTextureUpdater& updater)
- {
- ContentLayerChromium::updateCompositorResources(context, updater);
- m_updateCount++;
- }
-
private:
explicit ContentLayerChromiumWithUpdateTracking(ContentLayerDelegate* delegate)
: ContentLayerChromium(delegate)
, m_paintContentsCount(0)
, m_idlePaintContentsCount(0)
- , m_updateCount(0)
{
setBounds(IntSize(10, 10));
setIsDrawable(true);
@@ -1264,7 +1587,6 @@ private:
int m_paintContentsCount;
int m_idlePaintContentsCount;
- int m_updateCount;
};
// Layer opacity change during paint should not prevent compositor resources from being updated during commit.
@@ -1291,17 +1613,12 @@ public:
virtual void afterTest()
{
- // paintContentsIfDirty() should have been called once.
+ // update() should have been called once.
EXPECT_EQ(1, m_updateCheckLayer->paintContentsCount());
- // idlePaintContentsIfDirty() should have been called once
+ // idleUpdate() should have been called once
EXPECT_EQ(1, m_updateCheckLayer->idlePaintContentsCount());
- // updateCompositorResources() should have been called the same
- // amout of times as paintContentsIfDirty().
- EXPECT_EQ(m_updateCheckLayer->paintContentsCount(),
- m_updateCheckLayer->updateCount());
-
// clear m_updateCheckLayer so CCLayerTreeHost dies.
m_updateCheckLayer.clear();
}
@@ -1330,7 +1647,8 @@ public:
IntSize viewportSize(10, 10);
layerTreeHost()->setViewportSize(viewportSize);
- layerTreeHost()->updateLayers();
+ CCTextureUpdater updater;
+ layerTreeHost()->updateLayers(updater);
EXPECT_EQ(viewportSize, layerTreeHost()->viewportSize());
EXPECT_EQ(TextureManager::highLimitBytes(viewportSize), layerTreeHost()->contentsTextureManager()->maxMemoryLimitBytes());
@@ -1457,6 +1775,18 @@ TEST_F(CCLayerTreeHostTestAtomicCommit, runMultiThread)
runTest(true);
}
+static void setLayerPropertiesForTesting(LayerChromium* layer, LayerChromium* parent, const TransformationMatrix& transform, const FloatPoint& anchor, const FloatPoint& position, const IntSize& bounds, bool opaque)
+{
+ layer->removeAllChildren();
+ if (parent)
+ parent->addChild(layer);
+ layer->setTransform(transform);
+ layer->setAnchorPoint(anchor);
+ layer->setPosition(position);
+ layer->setBounds(bounds);
+ layer->setOpaque(opaque);
+}
+
class CCLayerTreeHostTestAtomicCommitWithPartialUpdate : public CCLayerTreeHostTest {
public:
CCLayerTreeHostTestAtomicCommitWithPartialUpdate()
@@ -1471,10 +1801,11 @@ public:
virtual void beginTest()
{
m_layerTreeHost->setRootLayer(m_parent);
- m_layerTreeHost->setViewportSize(IntSize(10, 10));
- m_parent->addChild(m_child);
- m_child->setOpacity(0.5);
- m_child->setBounds(IntSize(20, 20));
+ m_layerTreeHost->setViewportSize(IntSize(10, 20));
+
+ TransformationMatrix identityMatrix;
+ setLayerPropertiesForTesting(m_parent.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(10, 20), true);
+ setLayerPropertiesForTesting(m_child.get(), m_parent.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(0, 10), IntSize(10, 10), false);
postSetNeedsCommitToMainThread();
postSetNeedsRedrawToMainThread();
@@ -1518,15 +1849,31 @@ public:
EXPECT_EQ(3, context->numTextures());
// Number of textures used for commit should still be two.
EXPECT_EQ(2, context->numUsedTextures());
- // First texture should not have been used.
- EXPECT_FALSE(context->usedTexture(context->texture(0)));
- // Second texture should have been used.
- EXPECT_TRUE(context->usedTexture(context->texture(1)));
- // New textures should have been used.
+ // First texture should have been used.
+ EXPECT_TRUE(context->usedTexture(context->texture(0)));
+ // Second texture should not have been used.
+ EXPECT_FALSE(context->usedTexture(context->texture(1)));
+ // Third texture should have been used.
EXPECT_TRUE(context->usedTexture(context->texture(2)));
context->resetUsedTextures();
break;
+ case 3:
+ // Number of textures should be two.
+ EXPECT_EQ(2, context->numTextures());
+ // No textures should be used for commit.
+ EXPECT_EQ(0, context->numUsedTextures());
+
+ context->resetUsedTextures();
+ break;
+ case 4:
+ // Number of textures should be two.
+ EXPECT_EQ(2, context->numTextures());
+ // Number of textures used for commit should be one.
+ EXPECT_EQ(1, context->numUsedTextures());
+
+ context->resetUsedTextures();
+ break;
default:
ASSERT_NOT_REACHED();
break;
@@ -1537,10 +1884,14 @@ public:
{
CompositorFakeWebGraphicsContext3DWithTextureTracking* context = static_cast<CompositorFakeWebGraphicsContext3DWithTextureTracking*>(GraphicsContext3DPrivate::extractWebGraphicsContext3D(impl->context()));
- // Number of textures used for drawing should always be two.
- EXPECT_EQ(2, context->numUsedTextures());
+ // Number of textures used for drawing should two except for frame 4
+ // where the viewport only contains one layer.
+ if (impl->frameNumber() == 4)
+ EXPECT_EQ(1, context->numUsedTextures());
+ else
+ EXPECT_EQ(2, context->numUsedTextures());
- if (impl->frameNumber() < 3) {
+ if (impl->frameNumber() < 5) {
context->resetUsedTextures();
postSetNeedsAnimateAndCommitToMainThread();
postSetNeedsRedrawToMainThread();
@@ -1561,6 +1912,13 @@ public:
m_parent->setNeedsDisplayRect(FloatRect(0, 0, 5, 5));
m_child->setNeedsDisplayRect(FloatRect(0, 0, 5, 5));
break;
+ case 3:
+ m_child->setNeedsDisplay();
+ m_layerTreeHost->setViewportSize(IntSize(10, 10));
+ break;
+ case 4:
+ m_layerTreeHost->setViewportSize(IntSize(10, 20));
+ break;
default:
ASSERT_NOT_REACHED();
break;
@@ -1593,12 +1951,14 @@ class TestLayerChromium : public LayerChromium {
public:
static PassRefPtr<TestLayerChromium> create() { return adoptRef(new TestLayerChromium()); }
- virtual void paintContentsIfDirty(const Region& occludedScreenSpace)
+ virtual void update(CCTextureUpdater&, const CCOcclusionTracker* occlusion) OVERRIDE
{
- m_occludedScreenSpace = occludedScreenSpace;
+ // Gain access to internals of the CCOcclusionTracker.
+ const TestCCOcclusionTracker* testOcclusion = static_cast<const TestCCOcclusionTracker*>(occlusion);
+ m_occludedScreenSpace = testOcclusion ? testOcclusion->occlusionInScreenSpace() : Region();
}
- virtual bool drawsContent() const { return true; }
+ virtual bool drawsContent() const OVERRIDE { return true; }
const Region& occludedScreenSpace() const { return m_occludedScreenSpace; }
void clearOccludedScreenSpace() { m_occludedScreenSpace = Region(); }
@@ -1609,16 +1969,9 @@ private:
Region m_occludedScreenSpace;
};
-static void setLayerPropertiesForTesting(TestLayerChromium* layer, LayerChromium* parent, const TransformationMatrix& transform, const FloatPoint& anchor, const FloatPoint& position, const IntSize& bounds, bool opaque)
+static void setTestLayerPropertiesForTesting(TestLayerChromium* layer, LayerChromium* parent, const TransformationMatrix& transform, const FloatPoint& anchor, const FloatPoint& position, const IntSize& bounds, bool opaque)
{
- layer->removeAllChildren();
- if (parent)
- parent->addChild(layer);
- layer->setTransform(transform);
- layer->setAnchorPoint(anchor);
- layer->setPosition(position);
- layer->setBounds(bounds);
- layer->setOpaque(opaque);
+ setLayerPropertiesForTesting(layer, parent, transform, anchor, position, bounds, opaque);
layer->clearOccludedScreenSpace();
}
@@ -1646,81 +1999,82 @@ public:
// positioned on the screen.
// The child layer is rotated and the grandChild is opaque, but clipped to the child and rootLayer
- setLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), true);
- setLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), false);
- setLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(200, 200), true);
+ setTestLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), false);
+ setTestLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
m_layerTreeHost->setRootLayer(rootLayer);
m_layerTreeHost->setViewportSize(rootLayer->bounds());
- m_layerTreeHost->updateLayers();
+ CCTextureUpdater updater;
+ m_layerTreeHost->updateLayers(updater);
m_layerTreeHost->commitComplete();
EXPECT_EQ_RECT(IntRect(), grandChild->occludedScreenSpace().bounds());
EXPECT_EQ(0u, grandChild->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), child->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
EXPECT_EQ(1u, child->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), rootLayer->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(30, 40, 170, 160), rootLayer->occludedScreenSpace().bounds());
EXPECT_EQ(1u, rootLayer->occludedScreenSpace().rects().size());
// If the child layer is opaque, then it adds to the occlusion seen by the rootLayer.
- setLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), true);
+ setLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(200, 200), true);
setLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), true);
setLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
m_layerTreeHost->setRootLayer(rootLayer);
m_layerTreeHost->setViewportSize(rootLayer->bounds());
- m_layerTreeHost->updateLayers();
+ m_layerTreeHost->updateLayers(updater);
m_layerTreeHost->commitComplete();
EXPECT_EQ_RECT(IntRect(), grandChild->occludedScreenSpace().bounds());
EXPECT_EQ(0u, grandChild->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), child->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
EXPECT_EQ(1u, child->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), rootLayer->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(30, 30, 170, 170), rootLayer->occludedScreenSpace().bounds());
EXPECT_EQ(1u, rootLayer->occludedScreenSpace().rects().size());
// Add a second child to the root layer and the regions should merge
- setLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), true);
- setLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(70, 20), IntSize(500, 500), true);
- setLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), true);
- setLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(200, 200), true);
+ setTestLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(70, 20), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
m_layerTreeHost->setRootLayer(rootLayer);
m_layerTreeHost->setViewportSize(rootLayer->bounds());
- m_layerTreeHost->updateLayers();
+ m_layerTreeHost->updateLayers(updater);
m_layerTreeHost->commitComplete();
EXPECT_EQ_RECT(IntRect(), grandChild->occludedScreenSpace().bounds());
EXPECT_EQ(0u, grandChild->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), child->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
EXPECT_EQ(1u, child->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), child2->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(30, 30, 170, 170), child2->occludedScreenSpace().bounds());
EXPECT_EQ(1u, child2->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 20, 70, 80), rootLayer->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(30, 20, 170, 180), rootLayer->occludedScreenSpace().bounds());
EXPECT_EQ(2u, rootLayer->occludedScreenSpace().rects().size());
// Move the second child to be sure.
- setLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), true);
- setLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 70), IntSize(500, 500), true);
- setLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), true);
- setLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(200, 200), true);
+ setTestLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 70), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
m_layerTreeHost->setRootLayer(rootLayer);
m_layerTreeHost->setViewportSize(rootLayer->bounds());
- m_layerTreeHost->updateLayers();
+ m_layerTreeHost->updateLayers(updater);
m_layerTreeHost->commitComplete();
EXPECT_EQ_RECT(IntRect(), grandChild->occludedScreenSpace().bounds());
EXPECT_EQ(0u, grandChild->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), child->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
EXPECT_EQ(1u, child->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), child2->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(30, 30, 170, 170), child2->occludedScreenSpace().bounds());
EXPECT_EQ(1u, child2->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 30, 90, 70), rootLayer->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(10, 30, 190, 170), rootLayer->occludedScreenSpace().bounds());
EXPECT_EQ(2u, rootLayer->occludedScreenSpace().rects().size());
// If the child layer has a mask on it, then it shouldn't contribute to occlusion on stuff below it
- setLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), true);
+ setLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(200, 200), true);
setLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 70), IntSize(500, 500), true);
setLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), true);
setLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
@@ -1729,20 +2083,20 @@ public:
m_layerTreeHost->setRootLayer(rootLayer);
m_layerTreeHost->setViewportSize(rootLayer->bounds());
- m_layerTreeHost->updateLayers();
+ m_layerTreeHost->updateLayers(updater);
m_layerTreeHost->commitComplete();
EXPECT_EQ_RECT(IntRect(), grandChild->occludedScreenSpace().bounds());
EXPECT_EQ(0u, grandChild->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), child->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
EXPECT_EQ(1u, child->occludedScreenSpace().rects().size());
EXPECT_EQ_RECT(IntRect(), child2->occludedScreenSpace().bounds());
EXPECT_EQ(0u, child2->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 70, 90, 30), rootLayer->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
EXPECT_EQ(1u, rootLayer->occludedScreenSpace().rects().size());
// If the child layer with a mask is below child2, then child2 should contribute to occlusion on everything, and child shouldn't contribute to the rootLayer
- setLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), true);
+ setLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(200, 200), true);
setLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), true);
setLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
setLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 70), IntSize(500, 500), true);
@@ -1751,62 +2105,62 @@ public:
m_layerTreeHost->setRootLayer(rootLayer);
m_layerTreeHost->setViewportSize(rootLayer->bounds());
- m_layerTreeHost->updateLayers();
+ m_layerTreeHost->updateLayers(updater);
m_layerTreeHost->commitComplete();
EXPECT_EQ_RECT(IntRect(), child2->occludedScreenSpace().bounds());
EXPECT_EQ(0u, child2->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 70, 90, 30), grandChild->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), grandChild->occludedScreenSpace().bounds());
EXPECT_EQ(1u, grandChild->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 40, 90, 60), child->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(10, 40, 190, 160), child->occludedScreenSpace().bounds());
EXPECT_EQ(2u, child->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 70, 90, 30), rootLayer->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
EXPECT_EQ(1u, rootLayer->occludedScreenSpace().rects().size());
// If the child layer has a non-opaque drawOpacity, then it shouldn't contribute to occlusion on stuff below it
- setLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), true);
- setLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 70), IntSize(500, 500), true);
- setLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), true);
- setLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(200, 200), true);
+ setTestLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 70), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
child->setMaskLayer(0);
child->setOpacity(0.5);
m_layerTreeHost->setRootLayer(rootLayer);
m_layerTreeHost->setViewportSize(rootLayer->bounds());
- m_layerTreeHost->updateLayers();
+ m_layerTreeHost->updateLayers(updater);
m_layerTreeHost->commitComplete();
EXPECT_EQ_RECT(IntRect(), grandChild->occludedScreenSpace().bounds());
EXPECT_EQ(0u, grandChild->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), child->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
EXPECT_EQ(1u, child->occludedScreenSpace().rects().size());
EXPECT_EQ_RECT(IntRect(), child2->occludedScreenSpace().bounds());
EXPECT_EQ(0u, child2->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 70, 90, 30), rootLayer->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
EXPECT_EQ(1u, rootLayer->occludedScreenSpace().rects().size());
// If the child layer with non-opaque drawOpacity is below child2, then child2 should contribute to occlusion on everything, and child shouldn't contribute to the rootLayer
- setLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), true);
- setLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), true);
- setLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
- setLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 70), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(200, 200), true);
+ setTestLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 70), IntSize(500, 500), true);
child->setMaskLayer(0);
child->setOpacity(0.5);
m_layerTreeHost->setRootLayer(rootLayer);
m_layerTreeHost->setViewportSize(rootLayer->bounds());
- m_layerTreeHost->updateLayers();
+ m_layerTreeHost->updateLayers(updater);
m_layerTreeHost->commitComplete();
EXPECT_EQ_RECT(IntRect(), child2->occludedScreenSpace().bounds());
EXPECT_EQ(0u, child2->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 70, 90, 30), grandChild->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), grandChild->occludedScreenSpace().bounds());
EXPECT_EQ(1u, grandChild->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 40, 90, 60), child->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(10, 40, 190, 160), child->occludedScreenSpace().bounds());
EXPECT_EQ(2u, child->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 70, 90, 30), rootLayer->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
EXPECT_EQ(1u, rootLayer->occludedScreenSpace().rects().size());
// Kill the layerTreeHost immediately.
@@ -1845,10 +2199,10 @@ public:
// If the child layer has a filter that changes alpha values, and is below child2, then child2 should contribute to occlusion on everything,
// and child shouldn't contribute to the rootLayer
- setLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), true);
- setLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), true);
- setLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
- setLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 70), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(200, 200), true);
+ setTestLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 70), IntSize(500, 500), true);
{
FilterOperations filters;
@@ -1858,24 +2212,25 @@ public:
m_layerTreeHost->setRootLayer(rootLayer);
m_layerTreeHost->setViewportSize(rootLayer->bounds());
- m_layerTreeHost->updateLayers();
+ CCTextureUpdater updater;
+ m_layerTreeHost->updateLayers(updater);
m_layerTreeHost->commitComplete();
EXPECT_EQ_RECT(IntRect(), child2->occludedScreenSpace().bounds());
EXPECT_EQ(0u, child2->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 70, 90, 30), grandChild->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), grandChild->occludedScreenSpace().bounds());
EXPECT_EQ(1u, grandChild->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 40, 90, 60), child->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(10, 40, 190, 160), child->occludedScreenSpace().bounds());
EXPECT_EQ(2u, child->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 70, 90, 30), rootLayer->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
EXPECT_EQ(1u, rootLayer->occludedScreenSpace().rects().size());
// If the child layer has a filter that moves pixels/changes alpha, and is below child2, then child should not inherit occlusion from outside its subtree,
// and should not contribute to the rootLayer
- setLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), true);
- setLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), true);
- setLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
- setLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 70), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(rootLayer.get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(200, 200), true);
+ setTestLayerPropertiesForTesting(child.get(), rootLayer.get(), childTransform, FloatPoint(0, 0), FloatPoint(30, 30), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(grandChild.get(), child.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 10), IntSize(500, 500), true);
+ setTestLayerPropertiesForTesting(child2.get(), rootLayer.get(), identityMatrix, FloatPoint(0, 0), FloatPoint(10, 70), IntSize(500, 500), true);
{
FilterOperations filters;
@@ -1885,22 +2240,23 @@ public:
m_layerTreeHost->setRootLayer(rootLayer);
m_layerTreeHost->setViewportSize(rootLayer->bounds());
- m_layerTreeHost->updateLayers();
+ m_layerTreeHost->updateLayers(updater);
m_layerTreeHost->commitComplete();
EXPECT_EQ_RECT(IntRect(), child2->occludedScreenSpace().bounds());
EXPECT_EQ(0u, child2->occludedScreenSpace().rects().size());
EXPECT_EQ_RECT(IntRect(), grandChild->occludedScreenSpace().bounds());
EXPECT_EQ(0u, grandChild->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), child->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
EXPECT_EQ(1u, child->occludedScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 70, 90, 30), rootLayer->occludedScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
EXPECT_EQ(1u, rootLayer->occludedScreenSpace().rects().size());
// Kill the layerTreeHost immediately.
m_layerTreeHost->setRootLayer(0);
m_layerTreeHost.clear();
+ CCLayerTreeHost::setNeedsFilterContext(false);
endTest();
}
@@ -1928,10 +2284,10 @@ public:
for (int i = 0; i < numSurfaces; ++i) {
layers.append(TestLayerChromium::create());
if (!i) {
- setLayerPropertiesForTesting(layers.last().get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), true);
+ setTestLayerPropertiesForTesting(layers.last().get(), 0, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(200, 200), true);
layers.last()->createRenderSurface();
} else {
- setLayerPropertiesForTesting(layers.last().get(), layers[layers.size()-2].get(), identityMatrix, FloatPoint(0, 0), FloatPoint(1, 1), IntSize(100-i, 100-i), true);
+ setTestLayerPropertiesForTesting(layers.last().get(), layers[layers.size()-2].get(), identityMatrix, FloatPoint(0, 0), FloatPoint(1, 1), IntSize(200-i, 200-i), true);
layers.last()->setMasksToBounds(true);
layers.last()->setReplicaLayer(replica.get()); // Make it have a RenderSurface
}
@@ -1939,16 +2295,17 @@ public:
for (int i = 1; i < numSurfaces; ++i) {
children.append(TestLayerChromium::create());
- setLayerPropertiesForTesting(children.last().get(), layers[i].get(), identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(500, 500), false);
+ setTestLayerPropertiesForTesting(children.last().get(), layers[i].get(), identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(500, 500), false);
}
m_layerTreeHost->setRootLayer(layers[0].get());
m_layerTreeHost->setViewportSize(layers[0]->bounds());
- m_layerTreeHost->updateLayers();
+ CCTextureUpdater updater;
+ m_layerTreeHost->updateLayers(updater);
m_layerTreeHost->commitComplete();
for (int i = 0; i < numSurfaces-1; ++i) {
- IntRect expectedOcclusion(i+1, i+1, 100-i-1, 100-i-1);
+ IntRect expectedOcclusion(i+1, i+1, 200-i-1, 200-i-1);
EXPECT_EQ_RECT(expectedOcclusion, layers[i]->occludedScreenSpace().bounds());
EXPECT_EQ(1u, layers[i]->occludedScreenSpace().rects().size());
@@ -2036,4 +2393,57 @@ TEST_F(CCLayerTreeHostTestSetRepeatedLostContext, runMultiThread)
runTestThreaded();
}
+class CCLayerTreeHostTestFractionalScroll : public CCLayerTreeHostTestThreadOnly {
+public:
+ CCLayerTreeHostTestFractionalScroll()
+ : m_scrollAmount(1.75, 0)
+ {
+ }
+
+ virtual void beginTest()
+ {
+ m_layerTreeHost->rootLayer()->setScrollable(true);
+ postSetNeedsCommitToMainThread();
+ }
+
+ virtual void drawLayersOnCCThread(CCLayerTreeHostImpl* impl)
+ {
+ CCLayerImpl* root = impl->rootLayer();
+ root->setMaxScrollPosition(IntSize(100, 100));
+
+ // Check that a fractional scroll delta is correctly accumulated over multiple commits.
+ if (impl->frameNumber() == 1) {
+ EXPECT_EQ(root->scrollPosition(), IntPoint(0, 0));
+ EXPECT_EQ(root->scrollDelta(), FloatSize(0, 0));
+ postSetNeedsCommitToMainThread();
+ } else if (impl->frameNumber() == 2) {
+ EXPECT_EQ(root->scrollPosition(), flooredIntPoint(m_scrollAmount));
+ EXPECT_EQ(root->scrollDelta(), FloatSize(fmod(m_scrollAmount.width(), 1), 0));
+ postSetNeedsCommitToMainThread();
+ } else if (impl->frameNumber() == 3) {
+ EXPECT_EQ(root->scrollPosition(), flooredIntPoint(m_scrollAmount + m_scrollAmount));
+ EXPECT_EQ(root->scrollDelta(), FloatSize(fmod(2 * m_scrollAmount.width(), 1), 0));
+ endTest();
+ }
+ root->scrollBy(m_scrollAmount);
+ }
+
+ virtual void applyScrollAndScale(const IntSize& scrollDelta, float scale)
+ {
+ IntPoint position = m_layerTreeHost->rootLayer()->scrollPosition();
+ m_layerTreeHost->rootLayer()->setScrollPosition(position + scrollDelta);
+ }
+
+ virtual void afterTest()
+ {
+ }
+private:
+ FloatSize m_scrollAmount;
+};
+
+TEST_F(CCLayerTreeHostTestFractionalScroll, runMultiThread)
+{
+ runTestThreaded();
+}
+
} // namespace
diff --git a/Source/WebKit/chromium/tests/CCLayerTreeTestCommon.h b/Source/WebKit/chromium/tests/CCLayerTreeTestCommon.h
index 0b83dacab..75e487a4a 100644
--- a/Source/WebKit/chromium/tests/CCLayerTreeTestCommon.h
+++ b/Source/WebKit/chromium/tests/CCLayerTreeTestCommon.h
@@ -27,13 +27,19 @@
namespace WebKitTests {
-// This is a macro instead of function so that we get useful line numbers where a test failed.
+// These are macros instead of functions so that we get useful line numbers where a test failed.
#define EXPECT_FLOAT_RECT_EQ(expected, actual) \
EXPECT_FLOAT_EQ((expected).location().x(), (actual).location().x()); \
EXPECT_FLOAT_EQ((expected).location().y(), (actual).location().y()); \
EXPECT_FLOAT_EQ((expected).size().width(), (actual).size().width()); \
EXPECT_FLOAT_EQ((expected).size().height(), (actual).size().height())
+#define EXPECT_INT_RECT_EQ(expected, actual) \
+ EXPECT_EQ((expected).location().x(), (actual).location().x()); \
+ EXPECT_EQ((expected).location().y(), (actual).location().y()); \
+ EXPECT_EQ((expected).size().width(), (actual).size().width()); \
+ EXPECT_EQ((expected).size().height(), (actual).size().height())
+
// This is a macro instead of a function so that we get useful line numbers where a test failed.
// Even though TransformationMatrix values are double precision, there are many other floating-point values used that affect
// the transforms, and so we only expect them to be accurate up to floating-point precision.
diff --git a/Source/WebKit/chromium/tests/CCMathUtilTest.cpp b/Source/WebKit/chromium/tests/CCMathUtilTest.cpp
new file mode 100644
index 000000000..db0a4e53f
--- /dev/null
+++ b/Source/WebKit/chromium/tests/CCMathUtilTest.cpp
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2012 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "cc/CCMathUtil.h"
+
+#include "TransformationMatrix.h"
+
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+using namespace WebCore;
+
+namespace {
+
+TEST(CCMathUtilTest, verifyBackfaceVisibilityBasicCases)
+{
+ TransformationMatrix transform;
+
+ transform.makeIdentity();
+ EXPECT_FALSE(transform.isBackFaceVisible());
+
+ transform.makeIdentity();
+ transform.rotate3d(0, 80, 0);
+ EXPECT_FALSE(transform.isBackFaceVisible());
+
+ transform.makeIdentity();
+ transform.rotate3d(0, 100, 0);
+ EXPECT_TRUE(transform.isBackFaceVisible());
+
+ // Edge case, 90 degree rotation should return false.
+ transform.makeIdentity();
+ transform.rotate3d(0, 90, 0);
+ EXPECT_FALSE(transform.isBackFaceVisible());
+}
+
+TEST(CCMathUtilTest, verifyBackfaceVisibilityForPerspective)
+{
+ TransformationMatrix layerSpaceToProjectionPlane;
+
+ // This tests if isBackFaceVisible works properly under perspective transforms.
+ // Specifically, layers that may have their back face visible in orthographic
+ // projection, may not actually have back face visible under perspective projection.
+
+ // Case 1: Layer is rotated by slightly more than 90 degrees, at the center of the
+ // prespective projection. In this case, the layer's back-side is visible to
+ // the camera.
+ layerSpaceToProjectionPlane.makeIdentity();
+ layerSpaceToProjectionPlane.applyPerspective(1);
+ layerSpaceToProjectionPlane.translate3d(0, 0, 0);
+ layerSpaceToProjectionPlane.rotate3d(0, 100, 0);
+ EXPECT_TRUE(layerSpaceToProjectionPlane.isBackFaceVisible());
+
+ // Case 2: Layer is rotated by slightly more than 90 degrees, but shifted off to the
+ // side of the camera. Because of the wide field-of-view, the layer's front
+ // side is still visible.
+ //
+ // |<-- front side of layer is visible to perspective camera
+ // \ | /
+ // \ | /
+ // \| /
+ // | /
+ // |\ /<-- camera field of view
+ // | \ /
+ // back side of layer -->| \ /
+ // \./ <-- camera origin
+ //
+ layerSpaceToProjectionPlane.makeIdentity();
+ layerSpaceToProjectionPlane.applyPerspective(1);
+ layerSpaceToProjectionPlane.translate3d(-10, 0, 0);
+ layerSpaceToProjectionPlane.rotate3d(0, 100, 0);
+ EXPECT_FALSE(layerSpaceToProjectionPlane.isBackFaceVisible());
+
+ // Case 3: Additionally rotating the layer by 180 degrees should of course show the
+ // opposite result of case 2.
+ layerSpaceToProjectionPlane.rotate3d(0, 180, 0);
+ EXPECT_TRUE(layerSpaceToProjectionPlane.isBackFaceVisible());
+}
+
+} // namespace
diff --git a/Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp b/Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp
index 26d52523b..73b4d8273 100644
--- a/Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp
+++ b/Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp
@@ -26,16 +26,23 @@
#include "cc/CCOcclusionTracker.h"
+#include "CCAnimationTestCommon.h"
+#include "CCOcclusionTrackerTestCommon.h"
#include "FilterOperations.h"
#include "LayerChromium.h"
#include "Region.h"
#include "TransformationMatrix.h"
+#include "TranslateTransformOperation.h"
+#include "cc/CCLayerAnimationController.h"
+#include "cc/CCLayerImpl.h"
#include "cc/CCLayerTreeHostCommon.h"
+#include "cc/CCSingleThreadProxy.h"
#include <gmock/gmock.h>
#include <gtest/gtest.h>
using namespace WebCore;
+using namespace WebKitTests;
#define EXPECT_EQ_RECT(a, b) \
EXPECT_EQ(a.x(), b.x()); \
@@ -45,2168 +52,2890 @@ using namespace WebCore;
namespace {
-class LayerChromiumWithForcedDrawsContent : public LayerChromium {
+class TestContentLayerChromium : public LayerChromium {
public:
- LayerChromiumWithForcedDrawsContent()
+ TestContentLayerChromium()
: LayerChromium()
+ , m_overrideOpaqueContentsRect(false)
{
}
- virtual bool drawsContent() const { return true; }
- virtual Region opaqueContentsRegion() const
+ virtual bool drawsContent() const OVERRIDE { return true; }
+ virtual Region visibleContentOpaqueRegion() const OVERRIDE
{
- return intersection(m_opaquePaintRect, visibleLayerRect());
+ if (m_overrideOpaqueContentsRect)
+ return intersection(m_opaqueContentsRect, visibleLayerRect());
+ return LayerChromium::visibleContentOpaqueRegion();
+ }
+ void setOpaqueContentsRect(const IntRect& opaqueContentsRect)
+ {
+ m_overrideOpaqueContentsRect = true;
+ m_opaqueContentsRect = opaqueContentsRect;
}
-
- void setOpaquePaintRect(const IntRect& opaquePaintRect) { m_opaquePaintRect = opaquePaintRect; }
private:
- IntRect m_opaquePaintRect;
+ bool m_overrideOpaqueContentsRect;
+ IntRect m_opaqueContentsRect;
};
-void setLayerPropertiesForTesting(LayerChromium* layer, const TransformationMatrix& transform, const FloatPoint& position, const IntSize& bounds)
-{
- layer->setTransform(transform);
- layer->setSublayerTransform(TransformationMatrix());
- layer->setAnchorPoint(FloatPoint(0, 0));
- layer->setPosition(position);
- layer->setBounds(bounds);
-}
-
-void setLayerPropertiesForTesting(LayerChromiumWithForcedDrawsContent* layer, const TransformationMatrix& transform, const FloatPoint& position, const IntSize& bounds, bool opaque, bool opaqueLayers)
-{
- setLayerPropertiesForTesting(layer, transform, position, bounds);
- if (opaqueLayers)
- layer->setOpaque(opaque);
- else {
- layer->setOpaque(false);
- if (opaque)
- layer->setOpaquePaintRect(IntRect(IntPoint(), bounds));
- else
- layer->setOpaquePaintRect(IntRect());
- }
-}
-
-// A subclass to expose the total current occlusion.
-class TestCCOcclusionTracker : public CCOcclusionTracker {
+class TestContentLayerImpl : public CCLayerImpl {
public:
- TestCCOcclusionTracker(IntRect screenScissorRect)
- : CCOcclusionTracker(screenScissorRect)
- , m_overrideLayerScissorRect(false)
+ TestContentLayerImpl(int id)
+ : CCLayerImpl(id)
+ , m_overrideOpaqueContentsRect(false)
{
+ setDrawsContent(true);
}
- TestCCOcclusionTracker(IntRect screenScissorRect, const CCOcclusionTrackerDamageClient* damageClient)
- : CCOcclusionTracker(screenScissorRect, damageClient)
- , m_overrideLayerScissorRect(false)
+ virtual Region visibleContentOpaqueRegion() const OVERRIDE
+ {
+ if (m_overrideOpaqueContentsRect)
+ return intersection(m_opaqueContentsRect, visibleLayerRect());
+ return CCLayerImpl::visibleContentOpaqueRegion();
+ }
+ void setOpaqueContentsRect(const IntRect& opaqueContentsRect)
{
+ m_overrideOpaqueContentsRect = true;
+ m_opaqueContentsRect = opaqueContentsRect;
}
- Region occlusionInScreenSpace() const { return CCOcclusionTracker::m_stack.last().occlusionInScreen; }
- Region occlusionInTargetSurface() const { return CCOcclusionTracker::m_stack.last().occlusionInTarget; }
+private:
+ bool m_overrideOpaqueContentsRect;
+ IntRect m_opaqueContentsRect;
+};
- void setOcclusionInScreenSpace(const Region& region) { CCOcclusionTracker::m_stack.last().occlusionInScreen = region; }
- void setOcclusionInTargetSurface(const Region& region) { CCOcclusionTracker::m_stack.last().occlusionInTarget = region; }
+template<typename LayerType, typename RenderSurfaceType>
+class TestCCOcclusionTrackerWithScissor : public TestCCOcclusionTrackerBase<LayerType, RenderSurfaceType> {
+public:
+ TestCCOcclusionTrackerWithScissor(IntRect screenScissorRect, bool recordMetricsForFrame = false)
+ : TestCCOcclusionTrackerBase<LayerType, RenderSurfaceType>(screenScissorRect, recordMetricsForFrame)
+ , m_overrideLayerScissorRect(false)
+ {
+ }
void setLayerScissorRect(const IntRect& rect) { m_overrideLayerScissorRect = true; m_layerScissorRect = rect;}
void useDefaultLayerScissorRect() { m_overrideLayerScissorRect = false; }
protected:
- virtual IntRect layerScissorRectInTargetSurface(const LayerChromium* layer) const { return m_overrideLayerScissorRect ? m_layerScissorRect : CCOcclusionTracker::layerScissorRectInTargetSurface(layer); }
+ virtual IntRect layerScissorRectInTargetSurface(const LayerType* layer) const { return m_overrideLayerScissorRect ? m_layerScissorRect : CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::layerScissorRectInTargetSurface(layer); }
private:
bool m_overrideLayerScissorRect;
IntRect m_layerScissorRect;
};
-class TestDamageClient : public CCOcclusionTrackerDamageClient {
-public:
- // The interface
- virtual FloatRect damageRect(const RenderSurfaceChromium*) const { return m_damageRect; }
-
- // Testing stuff
- TestDamageClient(const FloatRect& damageRect) : m_damageRect(damageRect) { }
- void setDamageRect(const FloatRect& damageRect) { m_damageRect = damageRect; }
+struct CCOcclusionTrackerTestMainThreadTypes {
+ typedef LayerChromium LayerType;
+ typedef RenderSurfaceChromium RenderSurfaceType;
+ typedef TestContentLayerChromium ContentLayerType;
+ typedef RefPtr<LayerChromium> LayerPtrType;
+ typedef PassRefPtr<LayerChromium> PassLayerPtrType;
+ typedef RefPtr<ContentLayerType> ContentLayerPtrType;
+ typedef PassRefPtr<ContentLayerType> PassContentLayerPtrType;
+ typedef CCLayerIterator<LayerChromium, Vector<RefPtr<LayerChromium> >, RenderSurfaceChromium, CCLayerIteratorActions::FrontToBack> LayerIterator;
+ typedef CCOcclusionTracker OcclusionTrackerType;
+
+ static PassLayerPtrType createLayer() { return LayerChromium::create(); }
+ static PassContentLayerPtrType createContentLayer() { return adoptRef(new ContentLayerType()); }
+};
-private:
- FloatRect m_damageRect;
+struct CCOcclusionTrackerTestImplThreadTypes {
+ typedef CCLayerImpl LayerType;
+ typedef CCRenderSurface RenderSurfaceType;
+ typedef TestContentLayerImpl ContentLayerType;
+ typedef OwnPtr<CCLayerImpl> LayerPtrType;
+ typedef PassOwnPtr<CCLayerImpl> PassLayerPtrType;
+ typedef OwnPtr<ContentLayerType> ContentLayerPtrType;
+ typedef PassOwnPtr<ContentLayerType> PassContentLayerPtrType;
+ typedef CCLayerIterator<CCLayerImpl, Vector<CCLayerImpl*>, CCRenderSurface, CCLayerIteratorActions::FrontToBack> LayerIterator;
+ typedef CCOcclusionTrackerImpl OcclusionTrackerType;
+
+ static PassLayerPtrType createLayer() { return CCLayerImpl::create(nextCCLayerImplId++); }
+ static PassContentLayerPtrType createContentLayer() { return adoptPtr(new ContentLayerType(nextCCLayerImplId++)); }
+ static int nextCCLayerImplId;
};
-#define TEST_OPAQUE_AND_PAINTED_OPAQUE(FULLTESTNAME, SHORTTESTNAME) \
- TEST(FULLTESTNAME, opaqueLayer) \
- { \
- SHORTTESTNAME(true); \
- } \
- TEST(FULLTESTNAME, opaquePaintRect) \
- { \
- SHORTTESTNAME(false); \
+int CCOcclusionTrackerTestImplThreadTypes::nextCCLayerImplId = 0;
+
+template<typename Types, bool opaqueLayers>
+class CCOcclusionTrackerTest : public testing::Test {
+protected:
+ CCOcclusionTrackerTest()
+ : testing::Test()
+ { }
+
+ virtual void runMyTest() = 0;
+
+ virtual void TearDown()
+ {
+ m_root.clear();
+ m_renderSurfaceLayerListChromium.clear();
+ m_renderSurfaceLayerListImpl.clear();
+ m_replicaLayers.clear();
+ CCLayerTreeHost::setNeedsFilterContext(false);
}
-void layerAddedToOccludedRegion(bool opaqueLayers)
-{
- // This tests that the right transforms are being used.
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(layer);
-
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(30, 30), IntSize(500, 500), true, opaqueLayers);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
-
- occlusion.enterTargetRenderSurface(parent->renderSurface());
- occlusion.markOccludedBehindLayer(layer.get());
- EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(30, 30, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(29, 30, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(30, 29, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(31, 30, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(30, 31, 70, 70)));
-
- occlusion.useDefaultLayerScissorRect();
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(30, 30, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(29, 30, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(30, 29, 70, 70)));
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(31, 30, 70, 70)));
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(30, 31, 70, 70)));
- occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
-
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(30, 30, 70, 70)).isEmpty());
- EXPECT_EQ_RECT(IntRect(29, 30, 1, 70), occlusion.unoccludedContentRect(parent.get(), IntRect(29, 30, 70, 70)));
- EXPECT_EQ_RECT(IntRect(29, 29, 70, 70), occlusion.unoccludedContentRect(parent.get(), IntRect(29, 29, 70, 70)));
- EXPECT_EQ_RECT(IntRect(30, 29, 70, 1), occlusion.unoccludedContentRect(parent.get(), IntRect(30, 29, 70, 70)));
- EXPECT_EQ_RECT(IntRect(31, 29, 70, 70), occlusion.unoccludedContentRect(parent.get(), IntRect(31, 29, 70, 70)));
- EXPECT_EQ_RECT(IntRect(100, 30, 1, 70), occlusion.unoccludedContentRect(parent.get(), IntRect(31, 30, 70, 70)));
- EXPECT_EQ_RECT(IntRect(31, 31, 70, 70), occlusion.unoccludedContentRect(parent.get(), IntRect(31, 31, 70, 70)));
- EXPECT_EQ_RECT(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent.get(), IntRect(30, 31, 70, 70)));
- EXPECT_EQ_RECT(IntRect(29, 31, 70, 70), occlusion.unoccludedContentRect(parent.get(), IntRect(29, 31, 70, 70)));
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_layerAddedToOccludedRegion, layerAddedToOccludedRegion);
-
-void layerAddedToOccludedRegionWithRotation(bool opaqueLayers)
-{
- // This tests that the right transforms are being used.
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(layer);
-
- TransformationMatrix layerTransform;
- layerTransform.translate(250, 250);
- layerTransform.rotate(90);
- layerTransform.translate(-250, -250);
-
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
- setLayerPropertiesForTesting(layer.get(), layerTransform, FloatPoint(30, 30), IntSize(500, 500), true, opaqueLayers);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
-
- occlusion.enterTargetRenderSurface(parent->renderSurface());
- occlusion.markOccludedBehindLayer(layer.get());
- EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(30, 30, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(29, 30, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(30, 29, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(31, 30, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(30, 31, 70, 70)));
-
- occlusion.useDefaultLayerScissorRect();
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(30, 30, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(29, 30, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(30, 29, 70, 70)));
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(31, 30, 70, 70)));
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(30, 31, 70, 70)));
- occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
-
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(30, 30, 70, 70)).isEmpty());
- EXPECT_EQ_RECT(IntRect(29, 30, 1, 70), occlusion.unoccludedContentRect(parent.get(), IntRect(29, 30, 70, 70)));
- EXPECT_EQ_RECT(IntRect(29, 29, 70, 70), occlusion.unoccludedContentRect(parent.get(), IntRect(29, 29, 70, 70)));
- EXPECT_EQ_RECT(IntRect(30, 29, 70, 1), occlusion.unoccludedContentRect(parent.get(), IntRect(30, 29, 70, 70)));
- EXPECT_EQ_RECT(IntRect(31, 29, 70, 70), occlusion.unoccludedContentRect(parent.get(), IntRect(31, 29, 70, 70)));
- EXPECT_EQ_RECT(IntRect(100, 30, 1, 70), occlusion.unoccludedContentRect(parent.get(), IntRect(31, 30, 70, 70)));
- EXPECT_EQ_RECT(IntRect(31, 31, 70, 70), occlusion.unoccludedContentRect(parent.get(), IntRect(31, 31, 70, 70)));
- EXPECT_EQ_RECT(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent.get(), IntRect(30, 31, 70, 70)));
- EXPECT_EQ_RECT(IntRect(29, 31, 70, 70), occlusion.unoccludedContentRect(parent.get(), IntRect(29, 31, 70, 70)));
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_layerAddedToOccludedRegionWithRotation, layerAddedToOccludedRegionWithRotation);
-
-void layerAddedToOccludedRegionWithTranslation(bool opaqueLayers)
-{
- // This tests that the right transforms are being used.
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(layer);
-
- TransformationMatrix layerTransform;
- layerTransform.translate(20, 20);
-
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
- setLayerPropertiesForTesting(layer.get(), layerTransform, FloatPoint(30, 30), IntSize(500, 500), true, opaqueLayers);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
-
- occlusion.enterTargetRenderSurface(parent->renderSurface());
- occlusion.markOccludedBehindLayer(layer.get());
- EXPECT_EQ_RECT(IntRect(50, 50, 50, 50), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(50, 50, 50, 50), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(50, 50, 50, 50)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(49, 50, 50, 50)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(50, 49, 50, 50)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(51, 50, 50, 50)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(50, 51, 50, 50)));
-
- occlusion.useDefaultLayerScissorRect();
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(50, 50, 50, 50)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(49, 50, 50, 50)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(50, 49, 50, 50)));
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(51, 50, 50, 50)));
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(50, 51, 50, 50)));
- occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
-
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(50, 50, 50, 50)).isEmpty());
- EXPECT_EQ_RECT(IntRect(49, 50, 1, 50), occlusion.unoccludedContentRect(parent.get(), IntRect(49, 50, 50, 50)));
- EXPECT_EQ_RECT(IntRect(49, 49, 50, 50), occlusion.unoccludedContentRect(parent.get(), IntRect(49, 49, 50, 50)));
- EXPECT_EQ_RECT(IntRect(50, 49, 50, 1), occlusion.unoccludedContentRect(parent.get(), IntRect(50, 49, 50, 50)));
- EXPECT_EQ_RECT(IntRect(51, 49, 50, 50), occlusion.unoccludedContentRect(parent.get(), IntRect(51, 49, 50, 50)));
- EXPECT_EQ_RECT(IntRect(100, 50, 1, 50), occlusion.unoccludedContentRect(parent.get(), IntRect(51, 50, 50, 50)));
- EXPECT_EQ_RECT(IntRect(51, 51, 50, 50), occlusion.unoccludedContentRect(parent.get(), IntRect(51, 51, 50, 50)));
- EXPECT_EQ_RECT(IntRect(50, 100, 50, 1), occlusion.unoccludedContentRect(parent.get(), IntRect(50, 51, 50, 50)));
- EXPECT_EQ_RECT(IntRect(49, 51, 50, 50), occlusion.unoccludedContentRect(parent.get(), IntRect(49, 51, 50, 50)));
-
- occlusion.useDefaultLayerScissorRect();
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(50, 50, 50, 50)).isEmpty());
- EXPECT_EQ_RECT(IntRect(49, 50, 1, 50), occlusion.unoccludedContentRect(parent.get(), IntRect(49, 50, 50, 50)));
- EXPECT_EQ_RECT(IntRect(49, 49, 50, 50), occlusion.unoccludedContentRect(parent.get(), IntRect(49, 49, 50, 50)));
- EXPECT_EQ_RECT(IntRect(50, 49, 50, 1), occlusion.unoccludedContentRect(parent.get(), IntRect(50, 49, 50, 50)));
- EXPECT_EQ_RECT(IntRect(51, 49, 49, 1), occlusion.unoccludedContentRect(parent.get(), IntRect(51, 49, 50, 50)));
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(51, 50, 50, 50)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(51, 51, 50, 50)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(50, 51, 50, 50)).isEmpty());
- EXPECT_EQ_RECT(IntRect(49, 51, 1, 49), occlusion.unoccludedContentRect(parent.get(), IntRect(49, 51, 50, 50)));
- occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_layerAddedToOccludedRegionWithTranslation, layerAddedToOccludedRegionWithTranslation);
-
-void layerAddedToOccludedRegionWithRotatedSurface(bool opaqueLayers)
-{
- // This tests that the right transforms are being used.
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromium> child = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(child);
- child->addChild(layer);
-
- TransformationMatrix childTransform;
- childTransform.translate(250, 250);
- childTransform.rotate(90);
- childTransform.translate(-250, -250);
-
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
- setLayerPropertiesForTesting(child.get(), childTransform, FloatPoint(30, 30), IntSize(500, 500));
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(10, 10), IntSize(500, 500), true, opaqueLayers);
-
- child->setMasksToBounds(true);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
-
- occlusion.enterTargetRenderSurface(child->renderSurface());
- occlusion.markOccludedBehindLayer(layer.get());
-
- EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_TRUE(occlusion.occluded(child.get(), IntRect(10, 430, 60, 70)));
- EXPECT_FALSE(occlusion.occluded(child.get(), IntRect(9, 430, 60, 70)));
- EXPECT_FALSE(occlusion.occluded(child.get(), IntRect(10, 429, 60, 70)));
- EXPECT_FALSE(occlusion.occluded(child.get(), IntRect(10, 430, 61, 70)));
- EXPECT_FALSE(occlusion.occluded(child.get(), IntRect(10, 430, 60, 71)));
-
- occlusion.useDefaultLayerScissorRect();
- EXPECT_TRUE(occlusion.occluded(child.get(), IntRect(10, 430, 60, 70)));
- EXPECT_TRUE(occlusion.occluded(child.get(), IntRect(9, 430, 60, 70)));
- EXPECT_TRUE(occlusion.occluded(child.get(), IntRect(10, 429, 60, 70)));
- EXPECT_TRUE(occlusion.occluded(child.get(), IntRect(10, 430, 61, 70)));
- EXPECT_TRUE(occlusion.occluded(child.get(), IntRect(10, 430, 60, 71)));
- occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
-
- occlusion.markOccludedBehindLayer(child.get());
- occlusion.finishedTargetRenderSurface(child.get(), child->renderSurface());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
-
- EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(30, 40, 70, 60)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(29, 40, 70, 60)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(30, 39, 70, 60)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(31, 40, 70, 60)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(30, 41, 70, 60)));
-
- occlusion.useDefaultLayerScissorRect();
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(30, 40, 70, 60)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(29, 40, 70, 60)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(30, 39, 70, 60)));
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(31, 40, 70, 60)));
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(30, 41, 70, 60)));
- occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
-
-
- /* Justification for the above occlusion from |layer|:
- 100
- +---------------------+ +---------------------+
- | | | |30 Visible region of |layer|: /////
- | 30 | rotate(90) | |
- | 30 + ---------------------------------+ | +---------------------------------+
- 100 | | 10 | | ==> | | |10 |
- | |10+---------------------------------+ | +---------------------------------+ |
- | | | | | | | | |///////////////| 420 | |
- | | | | | | | | |///////////////|60 | |
- | | | | | | | | |///////////////| | |
- +----|--|-------------+ | | +--|--|---------------+ | |
- | | | | 20|10| 70 | |
- | | | | | | | |
- | | | |500 | | | |
- | | | | | | | |
- | | | | | | | |
- | | | | | | | |
- | | | | | | |10|
- +--|-------------------------------+ | | +------------------------------|--+
- | | | 490 |
- +---------------------------------+ +---------------------------------+
- 500 500
- */
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_layerAddedToOccludedRegionWithRotatedSurface, layerAddedToOccludedRegionWithRotatedSurface);
-
-void layerAddedToOccludedRegionWithSurfaceAlreadyOnStack(bool opaqueLayers)
-{
- // This tests that the right transforms are being used.
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromium> child = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> child2 = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(child);
- child->addChild(layer);
- parent->addChild(child2);
-
- TransformationMatrix childTransform;
- childTransform.translate(250, 250);
- childTransform.rotate(90);
- childTransform.translate(-250, -250);
-
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
- setLayerPropertiesForTesting(child.get(), childTransform, FloatPoint(30, 30), IntSize(500, 500));
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(10, 10), IntSize(500, 500), true, opaqueLayers);
-
- // |child2| makes |parent|'s surface get considered by CCOcclusionTracker first, instead of |child|'s. This exercises different code in
- // leaveToTargetRenderSurface, as the target surface has already been seen.
- setLayerPropertiesForTesting(child2.get(), identityMatrix, FloatPoint(30, 30), IntSize(60, 20), true, opaqueLayers);
-
- child->setMasksToBounds(true);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- occlusion.setLayerScissorRect(IntRect(-10, -10, 1000, 1000));
-
- occlusion.enterTargetRenderSurface(parent->renderSurface());
- occlusion.markOccludedBehindLayer(child2.get());
-
- EXPECT_EQ_RECT(IntRect(30, 30, 60, 20), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 30, 60, 20), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- occlusion.enterTargetRenderSurface(child->renderSurface());
- occlusion.markOccludedBehindLayer(layer.get());
-
- EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_TRUE(occlusion.occluded(child.get(), IntRect(10, 430, 60, 70)));
- EXPECT_FALSE(occlusion.occluded(child.get(), IntRect(9, 430, 60, 70)));
- EXPECT_FALSE(occlusion.occluded(child.get(), IntRect(10, 429, 60, 70)));
- EXPECT_FALSE(occlusion.occluded(child.get(), IntRect(11, 430, 60, 70)));
- EXPECT_FALSE(occlusion.occluded(child.get(), IntRect(10, 431, 60, 70)));
-
- occlusion.useDefaultLayerScissorRect();
- EXPECT_TRUE(occlusion.occluded(child.get(), IntRect(10, 430, 60, 70)));
- EXPECT_TRUE(occlusion.occluded(child.get(), IntRect(9, 430, 60, 70)));
- EXPECT_TRUE(occlusion.occluded(child.get(), IntRect(10, 429, 60, 70)));
- EXPECT_TRUE(occlusion.occluded(child.get(), IntRect(11, 430, 60, 70)));
- EXPECT_TRUE(occlusion.occluded(child.get(), IntRect(10, 431, 60, 70)));
- occlusion.setLayerScissorRect(IntRect(-10, -10, 1000, 1000));
-
- EXPECT_TRUE(occlusion.unoccludedContentRect(child.get(), IntRect(10, 430, 60, 70)).isEmpty());
- // This is the little piece not occluded by child2
- EXPECT_EQ_RECT(IntRect(9, 430, 1, 10), occlusion.unoccludedContentRect(child.get(), IntRect(9, 430, 60, 70)));
- // This extends past both sides of child2, so it will be the original rect.
- EXPECT_EQ_RECT(IntRect(9, 430, 60, 80), occlusion.unoccludedContentRect(child.get(), IntRect(9, 430, 60, 80)));
- // This extends past two adjacent sides of child2, and should included the unoccluded parts of each side.
- // This also demonstrates that the rect can be arbitrary and does not get clipped to the layer's visibleLayerRect().
- EXPECT_EQ_RECT(IntRect(-10, 430, 20, 70), occlusion.unoccludedContentRect(child.get(), IntRect(-10, 430, 60, 70)));
- // This extends past three adjacent sides of child2, so it should contain the unoccluded parts of each side. The left
- // and bottom edges are completely unoccluded for some row/column so we get back the original query rect.
- EXPECT_EQ_RECT(IntRect(-10, 430, 60, 80), occlusion.unoccludedContentRect(child.get(), IntRect(-10, 430, 60, 80)));
- EXPECT_EQ_RECT(IntRect(10, 429, 60, 1), occlusion.unoccludedContentRect(child.get(), IntRect(10, 429, 60, 70)));
- EXPECT_EQ_RECT(IntRect(70, 430, 1, 70), occlusion.unoccludedContentRect(child.get(), IntRect(11, 430, 60, 70)));
- EXPECT_EQ_RECT(IntRect(10, 500, 60, 1), occlusion.unoccludedContentRect(child.get(), IntRect(10, 431, 60, 70)));
-
- occlusion.useDefaultLayerScissorRect();
- EXPECT_TRUE(occlusion.unoccludedContentRect(child.get(), IntRect(10, 430, 60, 70)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(child.get(), IntRect(9, 430, 60, 70)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(child.get(), IntRect(9, 430, 60, 80)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(child.get(), IntRect(-10, 430, 60, 70)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(child.get(), IntRect(-10, 430, 60, 80)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(child.get(), IntRect(10, 429, 60, 70)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(child.get(), IntRect(11, 430, 60, 70)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(child.get(), IntRect(10, 431, 60, 70)).isEmpty());
- occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
-
- occlusion.markOccludedBehindLayer(child.get());
- // |child2| should get merged with the surface we are leaving now
- occlusion.finishedTargetRenderSurface(child.get(), child->renderSurface());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
-
- EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
-
- Vector<IntRect> screen = occlusion.occlusionInScreenSpace().rects();
- Vector<IntRect> target = occlusion.occlusionInTargetSurface().rects();
-
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(30, 30, 70, 70)));
- EXPECT_EQ_RECT(IntRect(90, 30, 10, 10), occlusion.unoccludedContentRect(parent.get(), IntRect(30, 30, 70, 70)));
-
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(30, 30, 60, 10)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(29, 30, 60, 10)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(30, 29, 60, 10)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(31, 30, 60, 10)));
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(30, 31, 60, 10)));
-
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(30, 40, 70, 60)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(29, 40, 70, 60)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(30, 39, 70, 60)));
-
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(30, 30, 60, 10)).isEmpty());
- EXPECT_EQ_RECT(IntRect(29, 30, 1, 10), occlusion.unoccludedContentRect(parent.get(), IntRect(29, 30, 60, 10)));
- EXPECT_EQ_RECT(IntRect(30, 29, 60, 1), occlusion.unoccludedContentRect(parent.get(), IntRect(30, 29, 60, 10)));
- EXPECT_EQ_RECT(IntRect(90, 30, 1, 10), occlusion.unoccludedContentRect(parent.get(), IntRect(31, 30, 60, 10)));
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(30, 31, 60, 10)).isEmpty());
-
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(30, 40, 70, 60)).isEmpty());
- EXPECT_EQ_RECT(IntRect(29, 40, 1, 60), occlusion.unoccludedContentRect(parent.get(), IntRect(29, 40, 70, 60)));
- // This rect is mostly occluded by |child2|.
- EXPECT_EQ_RECT(IntRect(90, 39, 10, 1), occlusion.unoccludedContentRect(parent.get(), IntRect(30, 39, 70, 60)));
- // This rect extends past top/right ends of |child2|.
- EXPECT_EQ_RECT(IntRect(30, 29, 70, 11), occlusion.unoccludedContentRect(parent.get(), IntRect(30, 29, 70, 70)));
- // This rect extends past left/right ends of |child2|.
- EXPECT_EQ_RECT(IntRect(20, 39, 80, 60), occlusion.unoccludedContentRect(parent.get(), IntRect(20, 39, 80, 60)));
- EXPECT_EQ_RECT(IntRect(100, 40, 1, 60), occlusion.unoccludedContentRect(parent.get(), IntRect(31, 40, 70, 60)));
- EXPECT_EQ_RECT(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent.get(), IntRect(30, 41, 70, 60)));
-
- /* Justification for the above occlusion from |layer|:
- 100
- +---------------------+ +---------------------+
- | | | |30 Visible region of |layer|: /////
- | 30 | rotate(90) | 30 60 | |child2|: \\\\\
- | 30 + ------------+--------------------+ | 30 +------------+--------------------+
- 100 | | 10 | | | ==> | |\\\\\\\\\\\\| |10 |
- | |10+----------|----------------------+ | +--|\\\\\\\\\\\\|-----------------+ |
- | + ------------+ | | | | | +------------+//| 420 | |
- | | | | | | | | |///////////////|60 | |
- | | | | | | | | |///////////////| | |
- +----|--|-------------+ | | +--|--|---------------+ | |
- | | | | 20|10| 70 | |
- | | | | | | | |
- | | | |500 | | | |
- | | | | | | | |
- | | | | | | | |
- | | | | | | | |
- | | | | | | |10|
- +--|-------------------------------+ | | +------------------------------|--+
- | | | 490 |
- +---------------------------------+ +---------------------------------+
- 500 500
- */
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_layerAddedToOccludedRegionWithSurfaceAlreadyOnStack, layerAddedToOccludedRegionWithSurfaceAlreadyOnStack);
-
-void layerAddedToOccludedRegionWithRotatedOffAxisSurface(bool opaqueLayers)
-{
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromium> child = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(child);
- child->addChild(layer);
-
- // Now rotate the child a little more so it is not axis-aligned. The parent will no longer be occluded by |layer|, but
- // the child's occlusion should be unchanged.
-
- TransformationMatrix childTransform;
- childTransform.translate(250, 250);
- childTransform.rotate(95);
- childTransform.translate(-250, -250);
-
- TransformationMatrix layerTransform;
- layerTransform.translate(10, 10);
-
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
- setLayerPropertiesForTesting(child.get(), childTransform, FloatPoint(30, 30), IntSize(500, 500));
- setLayerPropertiesForTesting(layer.get(), layerTransform, FloatPoint(0, 0), IntSize(500, 500), true, opaqueLayers);
-
- child->setMasksToBounds(true);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
-
- IntRect clippedLayerInChild = layerTransform.mapRect(layer->visibleLayerRect());
-
- occlusion.enterTargetRenderSurface(child->renderSurface());
- occlusion.markOccludedBehindLayer(layer.get());
-
- EXPECT_EQ_RECT(IntRect(), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(0u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(clippedLayerInChild, occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_TRUE(occlusion.occluded(child.get(), clippedLayerInChild));
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), clippedLayerInChild).isEmpty());
- clippedLayerInChild.move(-1, 0);
- EXPECT_FALSE(occlusion.occluded(child.get(), clippedLayerInChild));
- EXPECT_FALSE(occlusion.unoccludedContentRect(parent.get(), clippedLayerInChild).isEmpty());
- clippedLayerInChild.move(1, 0);
- clippedLayerInChild.move(1, 0);
- EXPECT_FALSE(occlusion.occluded(child.get(), clippedLayerInChild));
- EXPECT_FALSE(occlusion.unoccludedContentRect(parent.get(), clippedLayerInChild).isEmpty());
- clippedLayerInChild.move(-1, 0);
- clippedLayerInChild.move(0, -1);
- EXPECT_FALSE(occlusion.occluded(child.get(), clippedLayerInChild));
- EXPECT_FALSE(occlusion.unoccludedContentRect(parent.get(), clippedLayerInChild).isEmpty());
- clippedLayerInChild.move(0, 1);
- clippedLayerInChild.move(0, 1);
- EXPECT_FALSE(occlusion.occluded(child.get(), clippedLayerInChild));
- EXPECT_FALSE(occlusion.unoccludedContentRect(parent.get(), clippedLayerInChild).isEmpty());
- clippedLayerInChild.move(0, -1);
-
- occlusion.markOccludedBehindLayer(child.get());
- occlusion.finishedTargetRenderSurface(child.get(), child->renderSurface());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
-
- EXPECT_EQ_RECT(IntRect(), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(0u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(75, 55, 1, 1)));
- EXPECT_EQ_RECT(IntRect(75, 55, 1, 1), occlusion.unoccludedContentRect(parent.get(), IntRect(75, 55, 1, 1)));
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_layerAddedToOccludedRegionWithRotatedOffAxisSurface, layerAddedToOccludedRegionWithRotatedOffAxisSurface);
-
-void layerAddedToOccludedRegionWithMultipleOpaqueLayers(bool opaqueLayers)
-{
- // This is similar to the previous test but now we make a few opaque layers inside of |child| so that the occluded parts of child are not a simple rect.
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromium> child = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> layer1 = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer2 = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(child);
- child->addChild(layer1);
- child->addChild(layer2);
-
- TransformationMatrix childTransform;
- childTransform.translate(250, 250);
- childTransform.rotate(90);
- childTransform.translate(-250, -250);
-
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
- setLayerPropertiesForTesting(child.get(), childTransform, FloatPoint(30, 30), IntSize(500, 500));
- setLayerPropertiesForTesting(layer1.get(), identityMatrix, FloatPoint(10, 10), IntSize(500, 440), true, opaqueLayers);
- setLayerPropertiesForTesting(layer2.get(), identityMatrix, FloatPoint(10, 450), IntSize(500, 60), true, opaqueLayers);
-
- child->setMasksToBounds(true);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
-
- occlusion.enterTargetRenderSurface(child->renderSurface());
- occlusion.markOccludedBehindLayer(layer2.get());
- occlusion.markOccludedBehindLayer(layer1.get());
-
- EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_TRUE(occlusion.occluded(child.get(), IntRect(10, 430, 60, 70)));
- EXPECT_FALSE(occlusion.occluded(child.get(), IntRect(9, 430, 60, 70)));
- EXPECT_FALSE(occlusion.occluded(child.get(), IntRect(10, 429, 60, 70)));
- EXPECT_FALSE(occlusion.occluded(child.get(), IntRect(11, 430, 60, 70)));
- EXPECT_FALSE(occlusion.occluded(child.get(), IntRect(10, 431, 60, 70)));
-
- EXPECT_TRUE(occlusion.unoccludedContentRect(child.get(), IntRect(10, 430, 60, 70)).isEmpty());
- EXPECT_EQ_RECT(IntRect(9, 430, 1, 70), occlusion.unoccludedContentRect(child.get(), IntRect(9, 430, 60, 70)));
- EXPECT_EQ_RECT(IntRect(10, 429, 60, 1), occlusion.unoccludedContentRect(child.get(), IntRect(10, 429, 60, 70)));
- EXPECT_EQ_RECT(IntRect(70, 430, 1, 70), occlusion.unoccludedContentRect(child.get(), IntRect(11, 430, 60, 70)));
- EXPECT_EQ_RECT(IntRect(10, 500, 60, 1), occlusion.unoccludedContentRect(child.get(), IntRect(10, 431, 60, 70)));
-
- occlusion.markOccludedBehindLayer(child.get());
- occlusion.finishedTargetRenderSurface(child.get(), child->renderSurface());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
-
- EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(30, 40, 70, 60)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(29, 40, 70, 60)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(30, 39, 70, 60)));
-
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(30, 40, 70, 60)).isEmpty());
- EXPECT_EQ_RECT(IntRect(29, 40, 1, 60), occlusion.unoccludedContentRect(parent.get(), IntRect(29, 40, 70, 60)));
- EXPECT_EQ_RECT(IntRect(30, 39, 70, 1), occlusion.unoccludedContentRect(parent.get(), IntRect(30, 39, 70, 60)));
- EXPECT_EQ_RECT(IntRect(100, 40, 1, 60), occlusion.unoccludedContentRect(parent.get(), IntRect(31, 40, 70, 60)));
- EXPECT_EQ_RECT(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent.get(), IntRect(30, 41, 70, 60)));
-
- /* Justification for the above occlusion from |layer1| and |layer2|:
-
- +---------------------+
- | |30 Visible region of |layer1|: /////
- | | Visible region of |layer2|: \\\\\
- | +---------------------------------+
- | | |10 |
- | +---------------+-----------------+ |
- | | |\\\\\\\\\\\\|//| 420 | |
- | | |\\\\\\\\\\\\|//|60 | |
- | | |\\\\\\\\\\\\|//| | |
- +--|--|------------|--+ | |
- 20|10| 70 | | |
- | | | | |
- | | | | |
- | | | | |
- | | | | |
- | | | | |
- | | | |10|
- | +------------|-----------------|--+
- | | 490 |
- +---------------+-----------------+
- 60 440
- */
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_layerAddedToOccludedRegionWithMultipleOpaqueLayers, layerAddedToOccludedRegionWithMultipleOpaqueLayers);
-
-void surfaceOcclusionWithOverlappingSiblingSurfaces(bool opaqueLayers)
-{
- // This tests that the right transforms are being used.
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromium> child1 = LayerChromium::create();
- RefPtr<LayerChromium> child2 = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> layer1 = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer2 = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(child1);
- parent->addChild(child2);
- child1->addChild(layer1);
- child2->addChild(layer2);
-
- TransformationMatrix childTransform;
- childTransform.translate(250, 250);
- childTransform.rotate(90);
- childTransform.translate(-250, -250);
-
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
- setLayerPropertiesForTesting(child1.get(), childTransform, FloatPoint(30, 30), IntSize(500, 500));
- setLayerPropertiesForTesting(layer1.get(), identityMatrix, FloatPoint(0, 0), IntSize(500, 500), true, opaqueLayers);
- setLayerPropertiesForTesting(child2.get(), childTransform, FloatPoint(20, 40), IntSize(500, 500));
- setLayerPropertiesForTesting(layer2.get(), identityMatrix, FloatPoint(0, 0), IntSize(500, 500), true, opaqueLayers);
-
- child1->setMasksToBounds(true);
- child2->setMasksToBounds(true);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- occlusion.setLayerScissorRect(IntRect(-10, -10, 1000, 1000));
-
- occlusion.enterTargetRenderSurface(child2->renderSurface());
- occlusion.markOccludedBehindLayer(layer2.get());
-
- EXPECT_EQ_RECT(IntRect(20, 40, 80, 60), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(0, 420, 60, 80), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_TRUE(occlusion.occluded(child2.get(), IntRect(0, 420, 60, 80)));
- EXPECT_FALSE(occlusion.occluded(child2.get(), IntRect(-1, 420, 60, 80)));
- EXPECT_FALSE(occlusion.occluded(child2.get(), IntRect(0, 419, 60, 80)));
- EXPECT_FALSE(occlusion.occluded(child2.get(), IntRect(0, 420, 61, 80)));
- EXPECT_FALSE(occlusion.occluded(child2.get(), IntRect(0, 420, 60, 81)));
-
- occlusion.markOccludedBehindLayer(child2.get());
- occlusion.finishedTargetRenderSurface(child2.get(), child2->renderSurface());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- occlusion.enterTargetRenderSurface(child1->renderSurface());
- occlusion.markOccludedBehindLayer(layer1.get());
-
- EXPECT_EQ_RECT(IntRect(20, 30, 80, 70), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(0, 430, 70, 70), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_TRUE(occlusion.occluded(child1.get(), IntRect(0, 430, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(child1.get(), IntRect(-1, 430, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(child1.get(), IntRect(0, 429, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(child1.get(), IntRect(0, 430, 71, 70)));
- EXPECT_FALSE(occlusion.occluded(child1.get(), IntRect(0, 430, 70, 71)));
-
- occlusion.markOccludedBehindLayer(child1.get());
- occlusion.finishedTargetRenderSurface(child1.get(), child1->renderSurface());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
-
- EXPECT_EQ_RECT(IntRect(20, 30, 80, 70), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(20, 30, 80, 70), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(20, 30, 80, 70)));
-
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(30, 30, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(29, 30, 70, 70)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(30, 29, 70, 70)));
-
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(20, 40, 80, 60)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(19, 40, 80, 60)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(20, 39, 80, 60)));
-
- /* Justification for the above occlusion:
- 100
- +---------------------+
- | |
- | 30 | child1
- | 30+ ---------------------------------+
- 100 | 40| | child2 |
- |20+----------------------------------+ |
- | | | | | |
- | | | | | |
- | | | | | |
- +--|-|----------------+ | |
- | | | | 500
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | +--------------------------------|-+
- | |
- +----------------------------------+
- 500
- */
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_surfaceOcclusionWithOverlappingSiblingSurfaces, surfaceOcclusionWithOverlappingSiblingSurfaces);
-
-void surfaceOcclusionInScreenSpace(bool opaqueLayers)
-{
- // This tests that the right transforms are being used.
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromium> child1 = LayerChromium::create();
- RefPtr<LayerChromium> child2 = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> layer1 = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer2 = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(child1);
- parent->addChild(child2);
- child1->addChild(layer1);
- child2->addChild(layer2);
-
- TransformationMatrix childTransform;
- childTransform.translate(250, 250);
- childTransform.rotate(90);
- childTransform.translate(-250, -250);
-
- // The owning layers have very different bounds from the surfaces that they own.
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
- setLayerPropertiesForTesting(child1.get(), childTransform, FloatPoint(30, 30), IntSize(10, 10));
- setLayerPropertiesForTesting(layer1.get(), identityMatrix, FloatPoint(-10, -10), IntSize(510, 510), true, opaqueLayers);
- setLayerPropertiesForTesting(child2.get(), childTransform, FloatPoint(20, 40), IntSize(10, 10));
- setLayerPropertiesForTesting(layer2.get(), identityMatrix, FloatPoint(-10, -10), IntSize(510, 510), true, opaqueLayers);
-
- // Make them both render surfaces
- FilterOperations filters;
- filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- child1->setFilters(filters);
- child2->setFilters(filters);
-
- child1->setMasksToBounds(false);
- child2->setMasksToBounds(false);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- occlusion.setLayerScissorRect(IntRect(-20, -20, 1000, 1000));
-
- occlusion.enterTargetRenderSurface(child2->renderSurface());
- occlusion.markOccludedBehindLayer(layer2.get());
-
- EXPECT_EQ_RECT(IntRect(20, 30, 80, 70), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(-10, 420, 70, 80), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_TRUE(occlusion.occluded(child2.get(), IntRect(-10, 420, 70, 80)));
- EXPECT_FALSE(occlusion.occluded(child2.get(), IntRect(-11, 420, 70, 80)));
- EXPECT_FALSE(occlusion.occluded(child2.get(), IntRect(-10, 419, 70, 80)));
- EXPECT_FALSE(occlusion.occluded(child2.get(), IntRect(-10, 420, 71, 80)));
- EXPECT_FALSE(occlusion.occluded(child2.get(), IntRect(-10, 420, 70, 81)));
-
- occlusion.useDefaultLayerScissorRect();
- EXPECT_TRUE(occlusion.occluded(child2.get(), IntRect(-10, 420, 70, 80)));
- EXPECT_TRUE(occlusion.occluded(child2.get(), IntRect(-11, 420, 70, 80)));
- EXPECT_TRUE(occlusion.occluded(child2.get(), IntRect(-10, 419, 70, 80)));
- EXPECT_TRUE(occlusion.occluded(child2.get(), IntRect(-10, 420, 71, 80)));
- EXPECT_TRUE(occlusion.occluded(child2.get(), IntRect(-10, 420, 70, 81)));
- occlusion.setLayerScissorRect(IntRect(-20, -20, 1000, 1000));
-
- occlusion.markOccludedBehindLayer(child2.get());
- occlusion.finishedTargetRenderSurface(child2.get(), child2->renderSurface());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- occlusion.enterTargetRenderSurface(child1->renderSurface());
- occlusion.markOccludedBehindLayer(layer1.get());
-
- EXPECT_EQ_RECT(IntRect(20, 20, 80, 80), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(-10, 430, 80, 70), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_TRUE(occlusion.occluded(child1.get(), IntRect(-10, 430, 80, 70)));
- EXPECT_FALSE(occlusion.occluded(child1.get(), IntRect(-11, 430, 80, 70)));
- EXPECT_FALSE(occlusion.occluded(child1.get(), IntRect(-10, 429, 80, 70)));
- EXPECT_FALSE(occlusion.occluded(child1.get(), IntRect(-10, 430, 81, 70)));
- EXPECT_FALSE(occlusion.occluded(child1.get(), IntRect(-10, 430, 80, 71)));
-
- occlusion.markOccludedBehindLayer(child1.get());
- occlusion.finishedTargetRenderSurface(child1.get(), child1->renderSurface());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
-
- EXPECT_EQ_RECT(IntRect(20, 20, 80, 80), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(20, 20, 80, 80), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(20, 20, 80, 80)));
-
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(30, 20, 70, 80)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(29, 20, 70, 80)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(30, 19, 70, 80)));
-
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(20, 30, 80, 70)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(19, 30, 80, 70)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(20, 29, 80, 70)));
-
- /* Justification for the above occlusion:
- 100
- +---------------------+
- | 20 | layer1
- | 30+ ---------------------------------+
- 100 | 30| | layer2 |
- |20+----------------------------------+ |
- | | | | | |
- | | | | | |
- | | | | | |
- +--|-|----------------+ | |
- | | | | 510
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | +--------------------------------|-+
- | |
- +----------------------------------+
- 510
- */
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_surfaceOcclusionInScreenSpace, surfaceOcclusionInScreenSpace);
-
-void surfaceOcclusionInScreenSpaceDifferentTransforms(bool opaqueLayers)
-{
- // This tests that the right transforms are being used.
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromium> child1 = LayerChromium::create();
- RefPtr<LayerChromium> child2 = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> layer1 = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer2 = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(child1);
- parent->addChild(child2);
- child1->addChild(layer1);
- child2->addChild(layer2);
-
- TransformationMatrix child1Transform;
- child1Transform.translate(250, 250);
- child1Transform.rotate(-90);
- child1Transform.translate(-250, -250);
-
- TransformationMatrix child2Transform;
- child2Transform.translate(250, 250);
- child2Transform.rotate(90);
- child2Transform.translate(-250, -250);
-
- // The owning layers have very different bounds from the surfaces that they own.
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
- setLayerPropertiesForTesting(child1.get(), child1Transform, FloatPoint(30, 20), IntSize(10, 10));
- setLayerPropertiesForTesting(layer1.get(), identityMatrix, FloatPoint(-10, -20), IntSize(510, 520), true, opaqueLayers);
- setLayerPropertiesForTesting(child2.get(), child2Transform, FloatPoint(20, 40), IntSize(10, 10));
- setLayerPropertiesForTesting(layer2.get(), identityMatrix, FloatPoint(-10, -10), IntSize(510, 510), true, opaqueLayers);
-
- // Make them both render surfaces
- FilterOperations filters;
- filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- child1->setFilters(filters);
- child2->setFilters(filters);
-
- child1->setMasksToBounds(false);
- child2->setMasksToBounds(false);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- occlusion.setLayerScissorRect(IntRect(-30, -30, 1000, 1000));
-
- occlusion.enterTargetRenderSurface(child2->renderSurface());
- occlusion.markOccludedBehindLayer(layer2.get());
-
- EXPECT_EQ_RECT(IntRect(20, 30, 80, 70), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(-10, 420, 70, 80), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_TRUE(occlusion.occluded(child2.get(), IntRect(-10, 420, 70, 80)));
- EXPECT_FALSE(occlusion.occluded(child2.get(), IntRect(-11, 420, 70, 80)));
- EXPECT_FALSE(occlusion.occluded(child2.get(), IntRect(-10, 419, 70, 80)));
- EXPECT_FALSE(occlusion.occluded(child2.get(), IntRect(-10, 420, 71, 80)));
- EXPECT_FALSE(occlusion.occluded(child2.get(), IntRect(-10, 420, 70, 81)));
-
- occlusion.markOccludedBehindLayer(child2.get());
- occlusion.finishedTargetRenderSurface(child2.get(), child2->renderSurface());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- occlusion.enterTargetRenderSurface(child1->renderSurface());
- occlusion.markOccludedBehindLayer(layer1.get());
-
- EXPECT_EQ_RECT(IntRect(10, 20, 90, 80), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(420, -20, 80, 90), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_TRUE(occlusion.occluded(child1.get(), IntRect(420, -20, 80, 90)));
- EXPECT_FALSE(occlusion.occluded(child1.get(), IntRect(419, -20, 80, 90)));
- EXPECT_FALSE(occlusion.occluded(child1.get(), IntRect(420, -21, 80, 90)));
- EXPECT_FALSE(occlusion.occluded(child1.get(), IntRect(420, -19, 80, 90)));
- EXPECT_FALSE(occlusion.occluded(child1.get(), IntRect(421, -20, 80, 90)));
-
- occlusion.markOccludedBehindLayer(child1.get());
- occlusion.finishedTargetRenderSurface(child1.get(), child1->renderSurface());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
-
- EXPECT_EQ_RECT(IntRect(10, 20, 90, 80), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(10, 20, 90, 80), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(10, 20, 90, 80)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(9, 20, 90, 80)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(10, 19, 90, 80)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(11, 20, 90, 80)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(10, 21, 90, 80)));
-
- /* Justification for the above occlusion:
- 100
- +---------------------+
- |20 | layer1
- 10+----------------------------------+
- 100 || 30 | layer2 |
- |20+----------------------------------+
- || | | | |
- || | | | |
- || | | | |
- +|-|------------------+ | |
- | | | | 510
- | | 510 | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | 520 | |
- +----------------------------------+ |
- | |
- +----------------------------------+
- 510
- */
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_surfaceOcclusionInScreenSpaceDifferentTransforms, surfaceOcclusionInScreenSpaceDifferentTransforms);
-
-void occlusionInteractionWithFilters(bool opaqueLayers)
-{
- // This tests that the right transforms are being used.
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> blurLayer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> opacityLayer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> opaqueLayer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(blurLayer);
- parent->addChild(opacityLayer);
- parent->addChild(opaqueLayer);
-
- TransformationMatrix layerTransform;
- layerTransform.translate(250, 250);
- layerTransform.rotate(90);
- layerTransform.translate(-250, -250);
-
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
- setLayerPropertiesForTesting(blurLayer.get(), layerTransform, FloatPoint(30, 30), IntSize(500, 500), true, opaqueLayers);
- setLayerPropertiesForTesting(opaqueLayer.get(), layerTransform, FloatPoint(30, 30), IntSize(500, 500), true, opaqueLayers);
- setLayerPropertiesForTesting(opacityLayer.get(), layerTransform, FloatPoint(30, 30), IntSize(500, 500), true, opaqueLayers);
+ typename Types::ContentLayerType* createRoot(const TransformationMatrix& transform, const FloatPoint& position, const IntSize& bounds)
+ {
+ typename Types::ContentLayerPtrType layer(Types::createContentLayer());
+ typename Types::ContentLayerType* layerPtr = layer.get();
+ setProperties(layerPtr, transform, position, bounds);
+
+ ASSERT(!m_root);
+ m_root = layer.release();
+ return layerPtr;
+ }
+
+ typename Types::LayerType* createLayer(typename Types::LayerType* parent, const TransformationMatrix& transform, const FloatPoint& position, const IntSize& bounds)
+ {
+ typename Types::LayerPtrType layer(Types::createLayer());
+ typename Types::LayerType* layerPtr = layer.get();
+ setProperties(layerPtr, transform, position, bounds);
+ parent->addChild(layer.release());
+ return layerPtr;
+ }
+ typename Types::LayerType* createSurface(typename Types::LayerType* parent, const TransformationMatrix& transform, const FloatPoint& position, const IntSize& bounds)
{
+ typename Types::LayerType* layer = createLayer(parent, transform, position, bounds);
FilterOperations filters;
- filters.operations().append(BlurFilterOperation::create(Length(10, WebCore::Percent), FilterOperation::BLUR));
- blurLayer->setFilters(filters);
+ filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
+ layer->setFilters(filters);
+ return layer;
}
+ typename Types::ContentLayerType* createDrawingLayer(typename Types::LayerType* parent, const TransformationMatrix& transform, const FloatPoint& position, const IntSize& bounds, bool opaque)
{
+ typename Types::ContentLayerPtrType layer(Types::createContentLayer());
+ typename Types::ContentLayerType* layerPtr = layer.get();
+ setProperties(layerPtr, transform, position, bounds);
+
+ if (opaqueLayers)
+ layerPtr->setOpaque(opaque);
+ else {
+ layerPtr->setOpaque(false);
+ if (opaque)
+ layerPtr->setOpaqueContentsRect(IntRect(IntPoint(), bounds));
+ else
+ layerPtr->setOpaqueContentsRect(IntRect());
+ }
+
+ parent->addChild(layer.release());
+ return layerPtr;
+ }
+
+ typename Types::LayerType* createReplicaLayer(typename Types::LayerType* owningLayer, const TransformationMatrix& transform, const FloatPoint& position, const IntSize& bounds)
+ {
+ typename Types::ContentLayerPtrType layer(Types::createContentLayer());
+ typename Types::ContentLayerType* layerPtr = layer.get();
+ setProperties(layerPtr, transform, position, bounds);
+ setReplica(owningLayer, layer.release());
+ return layerPtr;
+ }
+
+ typename Types::ContentLayerType* createDrawingSurface(typename Types::LayerType* parent, const TransformationMatrix& transform, const FloatPoint& position, const IntSize& bounds, bool opaque)
+ {
+ typename Types::ContentLayerType* layer = createDrawingLayer(parent, transform, position, bounds, opaque);
FilterOperations filters;
filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- opaqueLayer->setFilters(filters);
+ layer->setFilters(filters);
+ return layer;
+ }
+
+ void calcDrawEtc(TestContentLayerImpl* root)
+ {
+ ASSERT(root == m_root.get());
+ Vector<CCLayerImpl*> dummyLayerList;
+ int dummyMaxTextureSize = 512;
+
+ ASSERT(!root->renderSurface());
+ root->createRenderSurface();
+ root->renderSurface()->setContentRect(IntRect(IntPoint::zero(), root->bounds()));
+ root->setClipRect(IntRect(IntPoint::zero(), root->bounds()));
+ m_renderSurfaceLayerListImpl.append(m_root.get());
+
+ CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(root, root, identityMatrix, identityMatrix, m_renderSurfaceLayerListImpl, dummyLayerList, 0, dummyMaxTextureSize);
+ m_layerIterator = m_layerIteratorBegin = Types::LayerIterator::begin(&m_renderSurfaceLayerListImpl);
+ }
+
+ void calcDrawEtc(TestContentLayerChromium* root)
+ {
+ ASSERT(root == m_root.get());
+ Vector<RefPtr<LayerChromium> > dummyLayerList;
+ int dummyMaxTextureSize = 512;
+
+ ASSERT(!root->renderSurface());
+ root->createRenderSurface();
+ root->renderSurface()->setContentRect(IntRect(IntPoint::zero(), root->bounds()));
+ root->setClipRect(IntRect(IntPoint::zero(), root->bounds()));
+ m_renderSurfaceLayerListChromium.append(m_root);
+
+ CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(root, root, identityMatrix, identityMatrix, m_renderSurfaceLayerListChromium, dummyLayerList, dummyMaxTextureSize);
+ m_layerIterator = m_layerIteratorBegin = Types::LayerIterator::begin(&m_renderSurfaceLayerListChromium);
}
+ void enterLayer(typename Types::LayerType* layer, typename Types::OcclusionTrackerType& occlusion)
{
+ ASSERT_EQ(layer, *m_layerIterator);
+ ASSERT_TRUE(m_layerIterator.representsItself());
+ occlusion.enterLayer(m_layerIterator);
+ }
+
+ void leaveLayer(typename Types::LayerType* layer, typename Types::OcclusionTrackerType& occlusion)
+ {
+ ASSERT_EQ(layer, *m_layerIterator);
+ ASSERT_TRUE(m_layerIterator.representsItself());
+ occlusion.leaveLayer(m_layerIterator);
+ ++m_layerIterator;
+ }
+
+ void visitLayer(typename Types::LayerType* layer, typename Types::OcclusionTrackerType& occlusion)
+ {
+ enterLayer(layer, occlusion);
+ leaveLayer(layer, occlusion);
+ }
+
+ void enterContributingSurface(typename Types::LayerType* layer, typename Types::OcclusionTrackerType& occlusion)
+ {
+ ASSERT_EQ(layer, *m_layerIterator);
+ ASSERT_TRUE(m_layerIterator.representsTargetRenderSurface());
+ occlusion.enterLayer(m_layerIterator);
+ occlusion.leaveLayer(m_layerIterator);
+ ++m_layerIterator;
+ ASSERT_TRUE(m_layerIterator.representsContributingRenderSurface());
+ occlusion.enterLayer(m_layerIterator);
+ }
+
+ void leaveContributingSurface(typename Types::LayerType* layer, typename Types::OcclusionTrackerType& occlusion)
+ {
+ ASSERT_EQ(layer, *m_layerIterator);
+ ASSERT_TRUE(m_layerIterator.representsContributingRenderSurface());
+ occlusion.leaveLayer(m_layerIterator);
+ ++m_layerIterator;
+ }
+
+ void visitContributingSurface(typename Types::LayerType* layer, typename Types::OcclusionTrackerType& occlusion)
+ {
+ enterContributingSurface(layer, occlusion);
+ leaveContributingSurface(layer, occlusion);
+ }
+
+ void resetLayerIterator()
+ {
+ m_layerIterator = m_layerIteratorBegin;
+ }
+
+ const TransformationMatrix identityMatrix;
+
+private:
+ void setBaseProperties(typename Types::LayerType* layer, const TransformationMatrix& transform, const FloatPoint& position, const IntSize& bounds)
+ {
+ layer->setTransform(transform);
+ layer->setSublayerTransform(TransformationMatrix());
+ layer->setAnchorPoint(FloatPoint(0, 0));
+ layer->setPosition(position);
+ layer->setBounds(bounds);
+ }
+
+ void setProperties(LayerChromium* layer, const TransformationMatrix& transform, const FloatPoint& position, const IntSize& bounds)
+ {
+ setBaseProperties(layer, transform, position, bounds);
+ }
+
+ void setProperties(CCLayerImpl* layer, const TransformationMatrix& transform, const FloatPoint& position, const IntSize& bounds)
+ {
+ setBaseProperties(layer, transform, position, bounds);
+
+ layer->setContentBounds(layer->bounds());
+ }
+
+ void setReplica(LayerChromium* owningLayer, PassRefPtr<LayerChromium> layer)
+ {
+ owningLayer->setReplicaLayer(layer.get());
+ m_replicaLayers.append(layer);
+ }
+
+ void setReplica(CCLayerImpl* owningLayer, PassOwnPtr<CCLayerImpl> layer)
+ {
+ owningLayer->setReplicaLayer(layer);
+ }
+
+ // These hold ownership of the layers for the duration of the test.
+ typename Types::LayerPtrType m_root;
+ Vector<RefPtr<LayerChromium> > m_renderSurfaceLayerListChromium;
+ Vector<CCLayerImpl*> m_renderSurfaceLayerListImpl;
+ typename Types::LayerIterator m_layerIteratorBegin;
+ typename Types::LayerIterator m_layerIterator;
+ typename Types::LayerType* m_lastLayerVisited;
+ Vector<RefPtr<LayerChromium> > m_replicaLayers;
+};
+
+#define RUN_TEST_MAIN_THREAD_OPAQUE_LAYERS(ClassName) \
+ class ClassName##MainThreadOpaqueLayers : public ClassName<CCOcclusionTrackerTestMainThreadTypes, true> { \
+ public: \
+ ClassName##MainThreadOpaqueLayers() : ClassName<CCOcclusionTrackerTestMainThreadTypes, true>() { } \
+ }; \
+ TEST_F(ClassName##MainThreadOpaqueLayers, runTest) { runMyTest(); }
+#define RUN_TEST_MAIN_THREAD_OPAQUE_PAINTS(ClassName) \
+ class ClassName##MainThreadOpaquePaints : public ClassName<CCOcclusionTrackerTestMainThreadTypes, false> { \
+ public: \
+ ClassName##MainThreadOpaquePaints() : ClassName<CCOcclusionTrackerTestMainThreadTypes, false>() { } \
+ }; \
+ TEST_F(ClassName##MainThreadOpaquePaints, runTest) { runMyTest(); }
+
+#define RUN_TEST_IMPL_THREAD_OPAQUE_LAYERS(ClassName) \
+ class ClassName##ImplThreadOpaqueLayers : public ClassName<CCOcclusionTrackerTestImplThreadTypes, true> { \
+ DebugScopedSetImplThread impl; \
+ public: \
+ ClassName##ImplThreadOpaqueLayers() : ClassName<CCOcclusionTrackerTestImplThreadTypes, true>() { } \
+ }; \
+ TEST_F(ClassName##ImplThreadOpaqueLayers, runTest) { runMyTest(); }
+#define RUN_TEST_IMPL_THREAD_OPAQUE_PAINTS(ClassName) \
+ class ClassName##ImplThreadOpaquePaints : public ClassName<CCOcclusionTrackerTestImplThreadTypes, false> { \
+ DebugScopedSetImplThread impl; \
+ public: \
+ ClassName##ImplThreadOpaquePaints() : ClassName<CCOcclusionTrackerTestImplThreadTypes, false>() { } \
+ }; \
+ TEST_F(ClassName##ImplThreadOpaquePaints, runTest) { runMyTest(); }
+
+#define ALL_CCOCCLUSIONTRACKER_TEST(ClassName) \
+ RUN_TEST_MAIN_THREAD_OPAQUE_LAYERS(ClassName) \
+ RUN_TEST_MAIN_THREAD_OPAQUE_PAINTS(ClassName) \
+ RUN_TEST_IMPL_THREAD_OPAQUE_LAYERS(ClassName) \
+ RUN_TEST_IMPL_THREAD_OPAQUE_PAINTS(ClassName)
+
+#define MAIN_THREAD_TEST(ClassName) \
+ RUN_TEST_MAIN_THREAD_OPAQUE_LAYERS(ClassName)
+
+#define MAIN_AND_IMPL_THREAD_TEST(ClassName) \
+ RUN_TEST_MAIN_THREAD_OPAQUE_LAYERS(ClassName) \
+ RUN_TEST_IMPL_THREAD_OPAQUE_LAYERS(ClassName)
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestIdentityTransforms : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(30, 30), IntSize(500, 500), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ this->visitLayer(layer, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 30, 70, 70)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(29, 30, 70, 70)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 29, 70, 70)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(31, 30, 70, 70)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 31, 70, 70)));
+
+ occlusion.useDefaultLayerScissorRect();
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 30, 70, 70)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(29, 30, 70, 70)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 29, 70, 70)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(31, 30, 70, 70)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 31, 70, 70)));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 30, 70, 70)).isEmpty());
+ EXPECT_EQ_RECT(IntRect(29, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 30, 70, 70)));
+ EXPECT_EQ_RECT(IntRect(29, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 29, 70, 70)));
+ EXPECT_EQ_RECT(IntRect(30, 29, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 70, 70)));
+ EXPECT_EQ_RECT(IntRect(31, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 29, 70, 70)));
+ EXPECT_EQ_RECT(IntRect(100, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 30, 70, 70)));
+ EXPECT_EQ_RECT(IntRect(31, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 31, 70, 70)));
+ EXPECT_EQ_RECT(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 31, 70, 70)));
+ EXPECT_EQ_RECT(IntRect(29, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 31, 70, 70)));
+ }
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestIdentityTransforms);
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestRotatedChild : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix layerTransform;
+ layerTransform.translate(250, 250);
+ layerTransform.rotate(90);
+ layerTransform.translate(-250, -250);
+
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, layerTransform, FloatPoint(30, 30), IntSize(500, 500), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ this->visitLayer(layer, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 30, 70, 70)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(29, 30, 70, 70)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 29, 70, 70)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(31, 30, 70, 70)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 31, 70, 70)));
+
+ occlusion.useDefaultLayerScissorRect();
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 30, 70, 70)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(29, 30, 70, 70)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 29, 70, 70)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(31, 30, 70, 70)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 31, 70, 70)));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 30, 70, 70)).isEmpty());
+ EXPECT_EQ_RECT(IntRect(29, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 30, 70, 70)));
+ EXPECT_EQ_RECT(IntRect(29, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 29, 70, 70)));
+ EXPECT_EQ_RECT(IntRect(30, 29, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 70, 70)));
+ EXPECT_EQ_RECT(IntRect(31, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 29, 70, 70)));
+ EXPECT_EQ_RECT(IntRect(100, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 30, 70, 70)));
+ EXPECT_EQ_RECT(IntRect(31, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 31, 70, 70)));
+ EXPECT_EQ_RECT(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 31, 70, 70)));
+ EXPECT_EQ_RECT(IntRect(29, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 31, 70, 70)));
+ }
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestRotatedChild);
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestTranslatedChild : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix layerTransform;
+ layerTransform.translate(20, 20);
+
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, layerTransform, FloatPoint(30, 30), IntSize(500, 500), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ this->visitLayer(layer, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(50, 50, 50, 50), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(50, 50, 50, 50), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(50, 50, 50, 50)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(49, 50, 50, 50)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(50, 49, 50, 50)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(51, 50, 50, 50)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(50, 51, 50, 50)));
+
+ occlusion.useDefaultLayerScissorRect();
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(50, 50, 50, 50)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(49, 50, 50, 50)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(50, 49, 50, 50)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(51, 50, 50, 50)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(50, 51, 50, 50)));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(50, 50, 50, 50)).isEmpty());
+ EXPECT_EQ_RECT(IntRect(49, 50, 1, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 50, 50, 50)));
+ EXPECT_EQ_RECT(IntRect(49, 49, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 49, 50, 50)));
+ EXPECT_EQ_RECT(IntRect(50, 49, 50, 1), occlusion.unoccludedContentRect(parent, IntRect(50, 49, 50, 50)));
+ EXPECT_EQ_RECT(IntRect(51, 49, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(51, 49, 50, 50)));
+ EXPECT_EQ_RECT(IntRect(100, 50, 1, 50), occlusion.unoccludedContentRect(parent, IntRect(51, 50, 50, 50)));
+ EXPECT_EQ_RECT(IntRect(51, 51, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(51, 51, 50, 50)));
+ EXPECT_EQ_RECT(IntRect(50, 100, 50, 1), occlusion.unoccludedContentRect(parent, IntRect(50, 51, 50, 50)));
+ EXPECT_EQ_RECT(IntRect(49, 51, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 51, 50, 50)));
+
+ occlusion.useDefaultLayerScissorRect();
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(50, 50, 50, 50)).isEmpty());
+ EXPECT_EQ_RECT(IntRect(49, 50, 1, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 50, 50, 50)));
+ EXPECT_EQ_RECT(IntRect(49, 49, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 49, 50, 50)));
+ EXPECT_EQ_RECT(IntRect(50, 49, 50, 1), occlusion.unoccludedContentRect(parent, IntRect(50, 49, 50, 50)));
+ EXPECT_EQ_RECT(IntRect(51, 49, 49, 1), occlusion.unoccludedContentRect(parent, IntRect(51, 49, 50, 50)));
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(51, 50, 50, 50)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(51, 51, 50, 50)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(50, 51, 50, 50)).isEmpty());
+ EXPECT_EQ_RECT(IntRect(49, 51, 1, 49), occlusion.unoccludedContentRect(parent, IntRect(49, 51, 50, 50)));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+ }
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestTranslatedChild);
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestChildInRotatedChild : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix childTransform;
+ childTransform.translate(250, 250);
+ childTransform.rotate(90);
+ childTransform.translate(-250, -250);
+
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ typename Types::LayerType* child = this->createLayer(parent, childTransform, FloatPoint(30, 30), IntSize(500, 500));
+ child->setMasksToBounds(true);
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(child, this->identityMatrix, FloatPoint(10, 10), IntSize(500, 500), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ this->visitLayer(layer, occlusion);
+ this->enterContributingSurface(child, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ EXPECT_TRUE(occlusion.occluded(child, IntRect(10, 430, 60, 70)));
+ EXPECT_FALSE(occlusion.occluded(child, IntRect(9, 430, 60, 70)));
+ EXPECT_FALSE(occlusion.occluded(child, IntRect(10, 429, 60, 70)));
+ EXPECT_FALSE(occlusion.occluded(child, IntRect(10, 430, 61, 70)));
+ EXPECT_FALSE(occlusion.occluded(child, IntRect(10, 430, 60, 71)));
+
+ occlusion.useDefaultLayerScissorRect();
+ EXPECT_TRUE(occlusion.occluded(child, IntRect(10, 430, 60, 70)));
+ EXPECT_TRUE(occlusion.occluded(child, IntRect(9, 430, 60, 70)));
+ EXPECT_TRUE(occlusion.occluded(child, IntRect(10, 429, 60, 70)));
+ EXPECT_TRUE(occlusion.occluded(child, IntRect(10, 430, 61, 70)));
+ EXPECT_TRUE(occlusion.occluded(child, IntRect(10, 430, 60, 71)));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ this->leaveContributingSurface(child, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 40, 70, 60)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(29, 40, 70, 60)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 39, 70, 60)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(31, 40, 70, 60)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 41, 70, 60)));
+
+ occlusion.useDefaultLayerScissorRect();
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 40, 70, 60)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(29, 40, 70, 60)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 39, 70, 60)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(31, 40, 70, 60)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 41, 70, 60)));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+
+ /* Justification for the above occlusion from |layer|:
+ 100
+ +---------------------+ +---------------------+
+ | | | |30 Visible region of |layer|: /////
+ | 30 | rotate(90) | |
+ | 30 + ---------------------------------+ | +---------------------------------+
+ 100 | | 10 | | ==> | | |10 |
+ | |10+---------------------------------+ | +---------------------------------+ |
+ | | | | | | | | |///////////////| 420 | |
+ | | | | | | | | |///////////////|60 | |
+ | | | | | | | | |///////////////| | |
+ +----|--|-------------+ | | +--|--|---------------+ | |
+ | | | | 20|10| 70 | |
+ | | | | | | | |
+ | | | |500 | | | |
+ | | | | | | | |
+ | | | | | | | |
+ | | | | | | | |
+ | | | | | | |10|
+ +--|-------------------------------+ | | +------------------------------|--+
+ | | | 490 |
+ +---------------------------------+ +---------------------------------+
+ 500 500
+ */
+ }
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestChildInRotatedChild);
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestVisitTargetTwoTimes : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix childTransform;
+ childTransform.translate(250, 250);
+ childTransform.rotate(90);
+ childTransform.translate(-250, -250);
+
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ typename Types::LayerType* child = this->createLayer(parent, childTransform, FloatPoint(30, 30), IntSize(500, 500));
+ child->setMasksToBounds(true);
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(child, this->identityMatrix, FloatPoint(10, 10), IntSize(500, 500), true);
+ // |child2| makes |parent|'s surface get considered by CCOcclusionTracker first, instead of |child|'s. This exercises different code in
+ // leaveToTargetRenderSurface, as the target surface has already been seen.
+ typename Types::ContentLayerType* child2 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(30, 30), IntSize(60, 20), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(-10, -10, 1000, 1000));
+
+ this->visitLayer(child2, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(30, 30, 60, 20), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(30, 30, 60, 20), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ this->visitLayer(layer, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ this->enterContributingSurface(child, occlusion);
+
+ EXPECT_TRUE(occlusion.occluded(child, IntRect(10, 430, 60, 70)));
+ EXPECT_FALSE(occlusion.occluded(child, IntRect(9, 430, 60, 70)));
+ EXPECT_FALSE(occlusion.occluded(child, IntRect(10, 429, 60, 70)));
+ EXPECT_FALSE(occlusion.occluded(child, IntRect(11, 430, 60, 70)));
+ EXPECT_FALSE(occlusion.occluded(child, IntRect(10, 431, 60, 70)));
+
+ occlusion.useDefaultLayerScissorRect();
+ EXPECT_TRUE(occlusion.occluded(child, IntRect(10, 430, 60, 70)));
+ EXPECT_TRUE(occlusion.occluded(child, IntRect(9, 430, 60, 70)));
+ EXPECT_TRUE(occlusion.occluded(child, IntRect(10, 429, 60, 70)));
+ EXPECT_TRUE(occlusion.occluded(child, IntRect(11, 430, 60, 70)));
+ EXPECT_TRUE(occlusion.occluded(child, IntRect(10, 431, 60, 70)));
+ occlusion.setLayerScissorRect(IntRect(-10, -10, 1000, 1000));
+
+ EXPECT_TRUE(occlusion.unoccludedContentRect(child, IntRect(10, 430, 60, 70)).isEmpty());
+ // This is the little piece not occluded by child2
+ EXPECT_EQ_RECT(IntRect(9, 430, 1, 10), occlusion.unoccludedContentRect(child, IntRect(9, 430, 60, 70)));
+ // This extends past both sides of child2, so it will be the original rect.
+ EXPECT_EQ_RECT(IntRect(9, 430, 60, 80), occlusion.unoccludedContentRect(child, IntRect(9, 430, 60, 80)));
+ // This extends past two adjacent sides of child2, and should included the unoccluded parts of each side.
+ // This also demonstrates that the rect can be arbitrary and does not get clipped to the layer's visibleLayerRect().
+ EXPECT_EQ_RECT(IntRect(-10, 430, 20, 70), occlusion.unoccludedContentRect(child, IntRect(-10, 430, 60, 70)));
+ // This extends past three adjacent sides of child2, so it should contain the unoccluded parts of each side. The left
+ // and bottom edges are completely unoccluded for some row/column so we get back the original query rect.
+ EXPECT_EQ_RECT(IntRect(-10, 430, 60, 80), occlusion.unoccludedContentRect(child, IntRect(-10, 430, 60, 80)));
+ EXPECT_EQ_RECT(IntRect(10, 429, 60, 1), occlusion.unoccludedContentRect(child, IntRect(10, 429, 60, 70)));
+ EXPECT_EQ_RECT(IntRect(70, 430, 1, 70), occlusion.unoccludedContentRect(child, IntRect(11, 430, 60, 70)));
+ EXPECT_EQ_RECT(IntRect(10, 500, 60, 1), occlusion.unoccludedContentRect(child, IntRect(10, 431, 60, 70)));
+
+ occlusion.useDefaultLayerScissorRect();
+ EXPECT_TRUE(occlusion.unoccludedContentRect(child, IntRect(10, 430, 60, 70)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(child, IntRect(9, 430, 60, 70)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(child, IntRect(9, 430, 60, 80)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(child, IntRect(-10, 430, 60, 70)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(child, IntRect(-10, 430, 60, 80)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(child, IntRect(10, 429, 60, 70)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(child, IntRect(11, 430, 60, 70)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(child, IntRect(10, 431, 60, 70)).isEmpty());
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ // Occlusion in |child2| should get merged with the |child| surface we are leaving now.
+ this->leaveContributingSurface(child, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
+
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 30, 70, 70)));
+ EXPECT_EQ_RECT(IntRect(90, 30, 10, 10), occlusion.unoccludedContentRect(parent, IntRect(30, 30, 70, 70)));
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 30, 60, 10)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(29, 30, 60, 10)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 29, 60, 10)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(31, 30, 60, 10)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 31, 60, 10)));
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 40, 70, 60)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(29, 40, 70, 60)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 39, 70, 60)));
+
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 30, 60, 10)).isEmpty());
+ EXPECT_EQ_RECT(IntRect(29, 30, 1, 10), occlusion.unoccludedContentRect(parent, IntRect(29, 30, 60, 10)));
+ EXPECT_EQ_RECT(IntRect(30, 29, 60, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 60, 10)));
+ EXPECT_EQ_RECT(IntRect(90, 30, 1, 10), occlusion.unoccludedContentRect(parent, IntRect(31, 30, 60, 10)));
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 31, 60, 10)).isEmpty());
+
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 40, 70, 60)).isEmpty());
+ EXPECT_EQ_RECT(IntRect(29, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(29, 40, 70, 60)));
+ // This rect is mostly occluded by |child2|.
+ EXPECT_EQ_RECT(IntRect(90, 39, 10, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 39, 70, 60)));
+ // This rect extends past top/right ends of |child2|.
+ EXPECT_EQ_RECT(IntRect(30, 29, 70, 11), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 70, 70)));
+ // This rect extends past left/right ends of |child2|.
+ EXPECT_EQ_RECT(IntRect(20, 39, 80, 60), occlusion.unoccludedContentRect(parent, IntRect(20, 39, 80, 60)));
+ EXPECT_EQ_RECT(IntRect(100, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(31, 40, 70, 60)));
+ EXPECT_EQ_RECT(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 41, 70, 60)));
+
+ /* Justification for the above occlusion from |layer|:
+ 100
+ +---------------------+ +---------------------+
+ | | | |30 Visible region of |layer|: /////
+ | 30 | rotate(90) | 30 60 | |child2|: \\\\\
+ | 30 + ------------+--------------------+ | 30 +------------+--------------------+
+ 100 | | 10 | | | ==> | |\\\\\\\\\\\\| |10 |
+ | |10+----------|----------------------+ | +--|\\\\\\\\\\\\|-----------------+ |
+ | + ------------+ | | | | | +------------+//| 420 | |
+ | | | | | | | | |///////////////|60 | |
+ | | | | | | | | |///////////////| | |
+ +----|--|-------------+ | | +--|--|---------------+ | |
+ | | | | 20|10| 70 | |
+ | | | | | | | |
+ | | | |500 | | | |
+ | | | | | | | |
+ | | | | | | | |
+ | | | | | | | |
+ | | | | | | |10|
+ +--|-------------------------------+ | | +------------------------------|--+
+ | | | 490 |
+ +---------------------------------+ +---------------------------------+
+ 500 500
+ */
+ }
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestVisitTargetTwoTimes);
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestSurfaceRotatedOffAxis : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix childTransform;
+ childTransform.translate(250, 250);
+ childTransform.rotate(95);
+ childTransform.translate(-250, -250);
+
+ TransformationMatrix layerTransform;
+ layerTransform.translate(10, 10);
+
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ typename Types::LayerType* child = this->createLayer(parent, childTransform, FloatPoint(30, 30), IntSize(500, 500));
+ child->setMasksToBounds(true);
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(child, layerTransform, FloatPoint(0, 0), IntSize(500, 500), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ IntRect clippedLayerInChild = layerTransform.mapRect(layer->visibleLayerRect());
+
+ this->visitLayer(layer, occlusion);
+ this->enterContributingSurface(child, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(0u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(clippedLayerInChild, occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ EXPECT_TRUE(occlusion.occluded(child, clippedLayerInChild));
+ EXPECT_TRUE(occlusion.unoccludedContentRect(child, clippedLayerInChild).isEmpty());
+ clippedLayerInChild.move(-1, 0);
+ EXPECT_FALSE(occlusion.occluded(child, clippedLayerInChild));
+ EXPECT_FALSE(occlusion.unoccludedContentRect(child, clippedLayerInChild).isEmpty());
+ clippedLayerInChild.move(1, 0);
+ clippedLayerInChild.move(1, 0);
+ EXPECT_FALSE(occlusion.occluded(child, clippedLayerInChild));
+ EXPECT_FALSE(occlusion.unoccludedContentRect(child, clippedLayerInChild).isEmpty());
+ clippedLayerInChild.move(-1, 0);
+ clippedLayerInChild.move(0, -1);
+ EXPECT_FALSE(occlusion.occluded(child, clippedLayerInChild));
+ EXPECT_FALSE(occlusion.unoccludedContentRect(child, clippedLayerInChild).isEmpty());
+ clippedLayerInChild.move(0, 1);
+ clippedLayerInChild.move(0, 1);
+ EXPECT_FALSE(occlusion.occluded(child, clippedLayerInChild));
+ EXPECT_FALSE(occlusion.unoccludedContentRect(child, clippedLayerInChild).isEmpty());
+ clippedLayerInChild.move(0, -1);
+
+ this->leaveContributingSurface(child, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(0u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
+
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(75, 55, 1, 1)));
+ EXPECT_EQ_RECT(IntRect(75, 55, 1, 1), occlusion.unoccludedContentRect(parent, IntRect(75, 55, 1, 1)));
+ }
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestSurfaceRotatedOffAxis);
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestSurfaceWithTwoOpaqueChildren : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix childTransform;
+ childTransform.translate(250, 250);
+ childTransform.rotate(90);
+ childTransform.translate(-250, -250);
+
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ typename Types::LayerType* child = this->createLayer(parent, childTransform, FloatPoint(30, 30), IntSize(500, 500));
+ child->setMasksToBounds(true);
+ typename Types::ContentLayerType* layer1 = this->createDrawingLayer(child, this->identityMatrix, FloatPoint(10, 10), IntSize(500, 500), true);
+ typename Types::ContentLayerType* layer2 = this->createDrawingLayer(child, this->identityMatrix, FloatPoint(10, 450), IntSize(500, 60), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ this->visitLayer(layer2, occlusion);
+ this->visitLayer(layer1, occlusion);
+ this->enterContributingSurface(child, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ EXPECT_TRUE(occlusion.occluded(child, IntRect(10, 430, 60, 70)));
+ EXPECT_FALSE(occlusion.occluded(child, IntRect(9, 430, 60, 70)));
+ EXPECT_FALSE(occlusion.occluded(child, IntRect(10, 429, 60, 70)));
+ EXPECT_FALSE(occlusion.occluded(child, IntRect(11, 430, 60, 70)));
+ EXPECT_FALSE(occlusion.occluded(child, IntRect(10, 431, 60, 70)));
+
+ EXPECT_TRUE(occlusion.unoccludedContentRect(child, IntRect(10, 430, 60, 70)).isEmpty());
+ EXPECT_EQ_RECT(IntRect(9, 430, 1, 70), occlusion.unoccludedContentRect(child, IntRect(9, 430, 60, 70)));
+ EXPECT_EQ_RECT(IntRect(10, 429, 60, 1), occlusion.unoccludedContentRect(child, IntRect(10, 429, 60, 70)));
+ EXPECT_EQ_RECT(IntRect(70, 430, 1, 70), occlusion.unoccludedContentRect(child, IntRect(11, 430, 60, 70)));
+ EXPECT_EQ_RECT(IntRect(10, 500, 60, 1), occlusion.unoccludedContentRect(child, IntRect(10, 431, 60, 70)));
+
+ this->leaveContributingSurface(child, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(30, 40, 70, 60), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 40, 70, 60)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(29, 40, 70, 60)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 39, 70, 60)));
+
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 40, 70, 60)).isEmpty());
+ EXPECT_EQ_RECT(IntRect(29, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(29, 40, 70, 60)));
+ EXPECT_EQ_RECT(IntRect(30, 39, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 39, 70, 60)));
+ EXPECT_EQ_RECT(IntRect(100, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(31, 40, 70, 60)));
+ EXPECT_EQ_RECT(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 41, 70, 60)));
+
+ /* Justification for the above occlusion from |layer1| and |layer2|:
+
+ +---------------------+
+ | |30 Visible region of |layer1|: /////
+ | | Visible region of |layer2|: \\\\\
+ | +---------------------------------+
+ | | |10 |
+ | +---------------+-----------------+ |
+ | | |\\\\\\\\\\\\|//| 420 | |
+ | | |\\\\\\\\\\\\|//|60 | |
+ | | |\\\\\\\\\\\\|//| | |
+ +--|--|------------|--+ | |
+ 20|10| 70 | | |
+ | | | | |
+ | | | | |
+ | | | | |
+ | | | | |
+ | | | | |
+ | | | |10|
+ | +------------|-----------------|--+
+ | | 490 |
+ +---------------+-----------------+
+ 60 440
+ */
+ }
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestSurfaceWithTwoOpaqueChildren);
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestOverlappingSurfaceSiblings : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix childTransform;
+ childTransform.translate(250, 250);
+ childTransform.rotate(90);
+ childTransform.translate(-250, -250);
+
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ typename Types::LayerType* child1 = this->createSurface(parent, childTransform, FloatPoint(30, 30), IntSize(10, 10));
+ typename Types::LayerType* child2 = this->createSurface(parent, childTransform, FloatPoint(20, 40), IntSize(10, 10));
+ typename Types::ContentLayerType* layer1 = this->createDrawingLayer(child1, this->identityMatrix, FloatPoint(-10, -10), IntSize(510, 510), true);
+ typename Types::ContentLayerType* layer2 = this->createDrawingLayer(child2, this->identityMatrix, FloatPoint(-10, -10), IntSize(510, 510), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(-20, -20, 1000, 1000));
+
+ this->visitLayer(layer2, occlusion);
+ this->enterContributingSurface(child2, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(20, 30, 80, 70), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(-10, 420, 70, 80), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ EXPECT_TRUE(occlusion.occluded(child2, IntRect(-10, 420, 70, 80)));
+ EXPECT_FALSE(occlusion.occluded(child2, IntRect(-11, 420, 70, 80)));
+ EXPECT_FALSE(occlusion.occluded(child2, IntRect(-10, 419, 70, 80)));
+ EXPECT_FALSE(occlusion.occluded(child2, IntRect(-10, 420, 71, 80)));
+ EXPECT_FALSE(occlusion.occluded(child2, IntRect(-10, 420, 70, 81)));
+
+ occlusion.useDefaultLayerScissorRect();
+ EXPECT_TRUE(occlusion.occluded(child2, IntRect(-10, 420, 70, 80)));
+ EXPECT_TRUE(occlusion.occluded(child2, IntRect(-11, 420, 70, 80)));
+ EXPECT_TRUE(occlusion.occluded(child2, IntRect(-10, 419, 70, 80)));
+ EXPECT_TRUE(occlusion.occluded(child2, IntRect(-10, 420, 71, 80)));
+ EXPECT_TRUE(occlusion.occluded(child2, IntRect(-10, 420, 70, 81)));
+ occlusion.setLayerScissorRect(IntRect(-20, -20, 1000, 1000));
+
+ // There is nothing above child2's surface in the z-order.
+ EXPECT_EQ_RECT(IntRect(-10, 420, 70, 80), occlusion.unoccludedContributingSurfaceContentRect(child2->renderSurface(), false, IntRect(-10, 420, 70, 80)));
+
+ this->leaveContributingSurface(child2, occlusion);
+ this->visitLayer(layer1, occlusion);
+ this->enterContributingSurface(child1, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(20, 20, 80, 80), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(-10, 430, 80, 70), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ EXPECT_TRUE(occlusion.occluded(child1, IntRect(-10, 430, 80, 70)));
+ EXPECT_FALSE(occlusion.occluded(child1, IntRect(-11, 430, 80, 70)));
+ EXPECT_FALSE(occlusion.occluded(child1, IntRect(-10, 429, 80, 70)));
+ EXPECT_FALSE(occlusion.occluded(child1, IntRect(-10, 430, 81, 70)));
+ EXPECT_FALSE(occlusion.occluded(child1, IntRect(-10, 430, 80, 71)));
+
+ // child2's contents will occlude child1 below it.
+ EXPECT_EQ_RECT(IntRect(-10, 430, 10, 70), occlusion.unoccludedContributingSurfaceContentRect(child1->renderSurface(), false, IntRect(-10, 430, 80, 70)));
+
+ this->leaveContributingSurface(child1, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(20, 20, 80, 80), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(20, 20, 80, 80), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
+
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(20, 20, 80, 80)));
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 20, 70, 80)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(29, 20, 70, 80)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 19, 70, 80)));
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(20, 30, 80, 70)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(19, 30, 80, 70)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(20, 29, 80, 70)));
+
+ /* Justification for the above occlusion:
+ 100
+ +---------------------+
+ | 20 | layer1
+ | 30+ ---------------------------------+
+ 100 | 30| | layer2 |
+ |20+----------------------------------+ |
+ | | | | | |
+ | | | | | |
+ | | | | | |
+ +--|-|----------------+ | |
+ | | | | 510
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | +--------------------------------|-+
+ | |
+ +----------------------------------+
+ 510
+ */
+ }
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestOverlappingSurfaceSiblings);
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestOverlappingSurfaceSiblingsWithTwoTransforms : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix child1Transform;
+ child1Transform.translate(250, 250);
+ child1Transform.rotate(-90);
+ child1Transform.translate(-250, -250);
+
+ TransformationMatrix child2Transform;
+ child2Transform.translate(250, 250);
+ child2Transform.rotate(90);
+ child2Transform.translate(-250, -250);
+
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ typename Types::LayerType* child1 = this->createSurface(parent, child1Transform, FloatPoint(30, 20), IntSize(10, 10));
+ typename Types::LayerType* child2 = this->createDrawingSurface(parent, child2Transform, FloatPoint(20, 40), IntSize(10, 10), false);
+ typename Types::ContentLayerType* layer1 = this->createDrawingLayer(child1, this->identityMatrix, FloatPoint(-10, -20), IntSize(510, 510), true);
+ typename Types::ContentLayerType* layer2 = this->createDrawingLayer(child2, this->identityMatrix, FloatPoint(-10, -10), IntSize(510, 510), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(-30, -30, 1000, 1000));
+
+ this->visitLayer(layer2, occlusion);
+ this->enterLayer(child2, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(20, 30, 80, 70), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(-10, 420, 70, 80), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ EXPECT_TRUE(occlusion.occluded(child2, IntRect(-10, 420, 70, 80)));
+ EXPECT_FALSE(occlusion.occluded(child2, IntRect(-11, 420, 70, 80)));
+ EXPECT_FALSE(occlusion.occluded(child2, IntRect(-10, 419, 70, 80)));
+ EXPECT_FALSE(occlusion.occluded(child2, IntRect(-10, 420, 71, 80)));
+ EXPECT_FALSE(occlusion.occluded(child2, IntRect(-10, 420, 70, 81)));
+
+ this->leaveLayer(child2, occlusion);
+ this->enterContributingSurface(child2, occlusion);
+
+ // There is nothing above child2's surface in the z-order.
+ EXPECT_EQ_RECT(IntRect(-10, 420, 70, 80), occlusion.unoccludedContributingSurfaceContentRect(child2->renderSurface(), false, IntRect(-10, 420, 70, 80)));
+
+ this->leaveContributingSurface(child2, occlusion);
+ this->visitLayer(layer1, occlusion);
+ this->enterContributingSurface(child1, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(10, 20, 90, 80), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(420, -20, 80, 90), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ EXPECT_TRUE(occlusion.occluded(child1, IntRect(420, -20, 80, 90)));
+ EXPECT_FALSE(occlusion.occluded(child1, IntRect(419, -20, 80, 90)));
+ EXPECT_FALSE(occlusion.occluded(child1, IntRect(420, -21, 80, 90)));
+ EXPECT_FALSE(occlusion.occluded(child1, IntRect(420, -19, 80, 90)));
+ EXPECT_FALSE(occlusion.occluded(child1, IntRect(421, -20, 80, 90)));
+
+ // child2's contents will occlude child1 below it.
+ EXPECT_EQ_RECT(IntRect(420, -20, 80, 90), occlusion.unoccludedContributingSurfaceContentRect(child1->renderSurface(), false, IntRect(420, -20, 80, 90)));
+ EXPECT_EQ_RECT(IntRect(490, -10, 10, 80), occlusion.unoccludedContributingSurfaceContentRect(child1->renderSurface(), false, IntRect(420, -10, 80, 90)));
+ EXPECT_EQ_RECT(IntRect(420, -20, 70, 10), occlusion.unoccludedContributingSurfaceContentRect(child1->renderSurface(), false, IntRect(420, -20, 70, 90)));
+
+ this->leaveContributingSurface(child1, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(10, 20, 90, 80), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(10, 20, 90, 80), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(10, 20, 90, 80)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(9, 20, 90, 80)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(10, 19, 90, 80)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(11, 20, 90, 80)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(10, 21, 90, 80)));
+
+ /* Justification for the above occlusion:
+ 100
+ +---------------------+
+ |20 | layer1
+ 10+----------------------------------+
+ 100 || 30 | layer2 |
+ |20+----------------------------------+
+ || | | | |
+ || | | | |
+ || | | | |
+ +|-|------------------+ | |
+ | | | | 510
+ | | 510 | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | 520 | |
+ +----------------------------------+ |
+ | |
+ +----------------------------------+
+ 510
+ */
+ }
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestOverlappingSurfaceSiblingsWithTwoTransforms);
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestFilters : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix layerTransform;
+ layerTransform.translate(250, 250);
+ layerTransform.rotate(90);
+ layerTransform.translate(-250, -250);
+
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ typename Types::ContentLayerType* blurLayer = this->createDrawingLayer(parent, layerTransform, FloatPoint(30, 30), IntSize(500, 500), true);
+ typename Types::ContentLayerType* opaqueLayer = this->createDrawingLayer(parent, layerTransform, FloatPoint(30, 30), IntSize(500, 500), true);
+ typename Types::ContentLayerType* opacityLayer = this->createDrawingLayer(parent, layerTransform, FloatPoint(30, 30), IntSize(500, 500), true);
+
FilterOperations filters;
+ filters.operations().append(BlurFilterOperation::create(Length(10, WebCore::Percent), FilterOperation::BLUR));
+ blurLayer->setFilters(filters);
+
+ filters.operations().clear();
+ filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
+ opaqueLayer->setFilters(filters);
+
+ filters.operations().clear();
filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::OPACITY));
opacityLayer->setFilters(filters);
+
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ // Opacity layer won't contribute to occlusion.
+ this->visitLayer(opacityLayer, occlusion);
+ this->enterContributingSurface(opacityLayer, occlusion);
+
+ EXPECT_TRUE(occlusion.occlusionInScreenSpace().isEmpty());
+ EXPECT_TRUE(occlusion.occlusionInTargetSurface().isEmpty());
+
+ // And has nothing to contribute to its parent surface.
+ this->leaveContributingSurface(opacityLayer, occlusion);
+ EXPECT_TRUE(occlusion.occlusionInScreenSpace().isEmpty());
+ EXPECT_TRUE(occlusion.occlusionInTargetSurface().isEmpty());
+
+ // Opaque layer will contribute to occlusion.
+ this->visitLayer(opaqueLayer, occlusion);
+ this->enterContributingSurface(opaqueLayer, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 430, 70, 70), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ // And it gets translated to the parent surface.
+ this->leaveContributingSurface(opaqueLayer, occlusion);
+ EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ // The blur layer needs to throw away any occlusion from outside its subtree.
+ this->enterLayer(blurLayer, occlusion);
+ EXPECT_TRUE(occlusion.occlusionInScreenSpace().isEmpty());
+ EXPECT_TRUE(occlusion.occlusionInTargetSurface().isEmpty());
+
+ // And it won't contribute to occlusion.
+ this->leaveLayer(blurLayer, occlusion);
+ this->enterContributingSurface(blurLayer, occlusion);
+ EXPECT_TRUE(occlusion.occlusionInScreenSpace().isEmpty());
+ EXPECT_TRUE(occlusion.occlusionInTargetSurface().isEmpty());
+
+ // But the opaque layer's occlusion is preserved on the parent.
+ this->leaveContributingSurface(blurLayer, occlusion);
+ this->enterLayer(parent, occlusion);
+ EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
}
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestFilters);
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestReplicaDoesOcclude : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 200));
+ typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 100), IntSize(50, 50), true);
+ this->createReplicaLayer(surface, this->identityMatrix, FloatPoint(50, 50), IntSize());
+ this->calcDrawEtc(parent);
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
+ this->visitLayer(surface, occlusion);
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
+ EXPECT_EQ_RECT(IntRect(0, 100, 50, 50), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 50, 50), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
+ this->visitContributingSurface(surface, occlusion);
+ this->enterLayer(parent, occlusion);
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+ // The surface and replica should both be occluding the parent.
+ EXPECT_EQ_RECT(IntRect(0, 100, 100, 100), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
+ }
+};
- // Opacity layer won't contribute to occlusion.
- occlusion.enterTargetRenderSurface(opacityLayer->renderSurface());
- occlusion.markOccludedBehindLayer(opacityLayer.get());
- occlusion.finishedTargetRenderSurface(opacityLayer.get(), opacityLayer->renderSurface());
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestReplicaDoesOcclude);
- EXPECT_TRUE(occlusion.occlusionInScreenSpace().isEmpty());
- EXPECT_TRUE(occlusion.occlusionInTargetSurface().isEmpty());
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestReplicaWithClipping : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 170));
+ typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 100), IntSize(50, 50), true);
+ this->createReplicaLayer(surface, this->identityMatrix, FloatPoint(50, 50), IntSize());
+ this->calcDrawEtc(parent);
- // And has nothing to contribute to its parent surface.
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- EXPECT_TRUE(occlusion.occlusionInScreenSpace().isEmpty());
- EXPECT_TRUE(occlusion.occlusionInTargetSurface().isEmpty());
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
- // Opaque layer will contribute to occlusion.
- occlusion.enterTargetRenderSurface(opaqueLayer->renderSurface());
- occlusion.markOccludedBehindLayer(opaqueLayer.get());
- occlusion.finishedTargetRenderSurface(opaqueLayer.get(), opaqueLayer->renderSurface());
+ this->visitLayer(surface, occlusion);
- EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(0, 430, 70, 70), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 100, 50, 50), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 50, 50), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
- // And it gets translated to the parent surface.
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+ this->visitContributingSurface(surface, occlusion);
+ this->enterLayer(parent, occlusion);
- // The blur layer needs to throw away any occlusion from outside its subtree.
- occlusion.enterTargetRenderSurface(blurLayer->renderSurface());
- EXPECT_TRUE(occlusion.occlusionInScreenSpace().isEmpty());
- EXPECT_TRUE(occlusion.occlusionInTargetSurface().isEmpty());
+ // The surface and replica should both be occluding the parent.
+ EXPECT_EQ_RECT(IntRect(0, 100, 100, 70), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
+ }
+};
- // And it won't contribute to occlusion.
- occlusion.markOccludedBehindLayer(blurLayer.get());
- occlusion.finishedTargetRenderSurface(blurLayer.get(), blurLayer->renderSurface());
- EXPECT_TRUE(occlusion.occlusionInScreenSpace().isEmpty());
- EXPECT_TRUE(occlusion.occlusionInTargetSurface().isEmpty());
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestReplicaWithClipping);
- // But the opaque layer's occlusion is preserved on the parent.
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_EQ_RECT(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
- EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-}
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestLayerScissorRectOutsideChild : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(200, 100, 100, 100));
+
+ this->enterLayer(layer, occlusion);
+
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(0, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(100, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(0, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(100, 100, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(200, 100, 100, 100)));
+
+ occlusion.useDefaultLayerScissorRect();
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(200, 100, 100, 100)));
+ occlusion.setLayerScissorRect(IntRect(200, 100, 100, 100));
+
+ this->leaveLayer(layer, occlusion);
+ this->visitContributingSurface(layer, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(200, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 200, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 200, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
+
+ EXPECT_EQ_RECT(IntRect(200, 100, 100, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+ }
+};
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_occlusionInteractionWithFilters, occlusionInteractionWithFilters);
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestLayerScissorRectOutsideChild);
-void layerScissorRectOverTile(bool opaqueLayers)
-{
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> parentLayer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(parentLayer);
- parent->addChild(layer);
-
- FilterOperations filters;
- filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- parentLayer->setFilters(filters);
- layer->setFilters(filters);
-
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
- setLayerPropertiesForTesting(parentLayer.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300), false, opaqueLayers);
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true, opaqueLayers);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- occlusion.setLayerScissorRect(IntRect(200, 100, 100, 100));
-
- occlusion.enterTargetRenderSurface(layer->renderSurface());
-
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(100, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(200, 100, 100, 100)));
-
- occlusion.useDefaultLayerScissorRect();
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(200, 100, 100, 100)));
- occlusion.setLayerScissorRect(IntRect(200, 100, 100, 100));
-
- occlusion.markOccludedBehindLayer(layer.get());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- occlusion.enterTargetRenderSurface(parentLayer->renderSurface());
-
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(200, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 200, 100, 100)));
-
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
-
- EXPECT_EQ_RECT(IntRect(200, 100, 100, 100), occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 300)));
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_layerScissorRectOverTile, layerScissorRectOverTile);
-
-void screenScissorRectOverTile(bool opaqueLayers)
-{
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> parentLayer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(parentLayer);
- parent->addChild(layer);
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestScreenScissorRectOutsideChild : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(200, 100, 100, 100));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ this->enterLayer(layer, occlusion);
+
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(0, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(100, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(0, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(100, 100, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(200, 100, 100, 100)));
+
+ occlusion.useDefaultLayerScissorRect();
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(200, 100, 100, 100)));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ this->leaveLayer(layer, occlusion);
+ this->visitContributingSurface(layer, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(200, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 200, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 200, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
+
+ EXPECT_EQ_RECT(IntRect(200, 100, 100, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+ }
+};
- FilterOperations filters;
- filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- parentLayer->setFilters(filters);
- layer->setFilters(filters);
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestScreenScissorRectOutsideChild);
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
- setLayerPropertiesForTesting(parentLayer.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300), false, opaqueLayers);
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true, opaqueLayers);
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestLayerScissorRectOverChild : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(100, 100, 100, 100));
+
+ this->enterLayer(layer, occlusion);
+
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(0, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(0, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(100, 0, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(100, 100, 100, 100)));
+
+ this->leaveLayer(layer, occlusion);
+ this->visitContributingSurface(layer, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 200, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 200, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
+
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)).isEmpty());
+ }
+};
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestLayerScissorRectOverChild);
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestScreenScissorRectOverChild : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(100, 100, 100, 100));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ this->enterLayer(layer, occlusion);
+
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(0, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(0, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(100, 0, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(100, 100, 100, 100)));
+
+ this->leaveLayer(layer, occlusion);
+ this->visitContributingSurface(layer, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 200, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 200, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
+
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)).isEmpty());
+ }
+};
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestScreenScissorRectOverChild);
- TestCCOcclusionTracker occlusion(IntRect(200, 100, 100, 100));
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestLayerScissorRectPartlyOverChild : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(50, 50, 200, 200));
+
+ this->enterLayer(layer, occlusion);
+
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(0, 0, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(0, 100, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(100, 0, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(100, 100, 100, 100)));
+
+ this->leaveLayer(layer, occlusion);
+ this->visitContributingSurface(layer, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 100, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(200, 100, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(200, 0, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(0, 200, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(100, 200, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
+
+ EXPECT_EQ_RECT(IntRect(50, 50, 200, 200), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+ EXPECT_EQ_RECT(IntRect(200, 50, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 100)));
+ EXPECT_EQ_RECT(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 100, 300, 100)));
+ EXPECT_EQ_RECT(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(200, 100, 100, 100)));
+ EXPECT_EQ_RECT(IntRect(100, 200, 100, 50), occlusion.unoccludedContentRect(parent, IntRect(100, 200, 100, 100)));
+ }
+};
- occlusion.enterTargetRenderSurface(layer->renderSurface());
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestLayerScissorRectPartlyOverChild);
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(100, 100, 100, 100)));
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestScreenScissorRectPartlyOverChild : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(50, 50, 200, 200));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ this->enterLayer(layer, occlusion);
+
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(0, 0, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(0, 100, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(100, 0, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(100, 100, 100, 100)));
+
+ this->leaveLayer(layer, occlusion);
+ this->visitContributingSurface(layer, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 100, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(200, 100, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(200, 0, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(0, 200, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(100, 200, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
+
+ EXPECT_EQ_RECT(IntRect(50, 50, 200, 200), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+ EXPECT_EQ_RECT(IntRect(200, 50, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 100)));
+ EXPECT_EQ_RECT(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 100, 300, 100)));
+ EXPECT_EQ_RECT(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(200, 100, 100, 100)));
+ EXPECT_EQ_RECT(IntRect(100, 200, 100, 50), occlusion.unoccludedContentRect(parent, IntRect(100, 200, 100, 100)));
+ }
+};
- // Occluded since its outside the surface bounds.
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(200, 100, 100, 100)));
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestScreenScissorRectPartlyOverChild);
- // Test without any scissors.
- occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(200, 100, 100, 100)));
- occlusion.useDefaultLayerScissorRect();
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestLayerScissorRectOverNothing : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(500, 500, 100, 100));
+
+ this->enterLayer(layer, occlusion);
+
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(0, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(0, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(100, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(100, 100, 100, 100)));
+
+ this->leaveLayer(layer, occlusion);
+ this->visitContributingSurface(layer, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 200, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 200, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
+
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 100)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(0, 100, 300, 100)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(200, 100, 100, 100)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(100, 200, 100, 100)).isEmpty());
+ }
+};
- occlusion.markOccludedBehindLayer(layer.get());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- occlusion.enterTargetRenderSurface(parentLayer->renderSurface());
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestLayerScissorRectOverNothing);
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(200, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 200, 100, 100)));
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestScreenScissorRectOverNothing : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(500, 500, 100, 100));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ this->enterLayer(layer, occlusion);
+
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(0, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(0, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(100, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(100, 100, 100, 100)));
+
+ this->leaveLayer(layer, occlusion);
+ this->visitContributingSurface(layer, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 0, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(0, 200, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 200, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
+
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 100)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(0, 100, 300, 100)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(200, 100, 100, 100)).isEmpty());
+ EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(100, 200, 100, 100)).isEmpty());
+ }
+};
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestScreenScissorRectOverNothing);
- EXPECT_EQ_RECT(IntRect(200, 100, 100, 100), occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 300)));
-}
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestLayerScissorRectForLayerOffOrigin : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ this->enterLayer(layer, occlusion);
+
+ // This layer is translated when drawn into its target. So if the scissor rect given from the target surface
+ // is not in that target space, then after translating these query rects into the target, they will fall outside
+ // the scissor and be considered occluded.
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(0, 0, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(0, 100, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(100, 0, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(100, 100, 100, 100)));
+ }
+};
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_screenScissorRectOverTile, screenScissorRectOverTile);
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestLayerScissorRectForLayerOffOrigin);
-void layerScissorRectOverCulledTile(bool opaqueLayers)
-{
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> parentLayer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(parentLayer);
- parent->addChild(layer);
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestOpaqueContentsRegionEmpty : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* layer = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(200, 200), false);
+ this->calcDrawEtc(parent);
- FilterOperations filters;
- filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- parentLayer->setFilters(filters);
- layer->setFilters(filters);
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ this->enterLayer(layer, occlusion);
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
- setLayerPropertiesForTesting(parentLayer.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300), false, opaqueLayers);
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true, opaqueLayers);
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(0, 0, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(100, 0, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(0, 100, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(100, 100, 100, 100)));
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
+ // Occluded since its outside the surface bounds.
+ EXPECT_TRUE(occlusion.occluded(layer, IntRect(200, 100, 100, 100)));
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
+ // Test without any scissors.
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+ EXPECT_FALSE(occlusion.occluded(layer, IntRect(200, 100, 100, 100)));
+ occlusion.useDefaultLayerScissorRect();
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
+ this->leaveLayer(layer, occlusion);
+ this->visitContributingSurface(layer, occlusion);
+ this->enterLayer(parent, occlusion);
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- occlusion.setLayerScissorRect(IntRect(100, 100, 100, 100));
+ EXPECT_TRUE(occlusion.occlusionInScreenSpace().bounds().isEmpty());
+ EXPECT_EQ(0u, occlusion.occlusionInScreenSpace().rects().size());
+ }
+};
- occlusion.enterTargetRenderSurface(layer->renderSurface());
+MAIN_AND_IMPL_THREAD_TEST(CCOcclusionTrackerTestOpaqueContentsRegionEmpty);
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(100, 100, 100, 100)));
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestOpaqueContentsRegionNonEmpty : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(100, 100), IntSize(200, 200), false);
+ this->calcDrawEtc(parent);
- occlusion.markOccludedBehindLayer(layer.get());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- occlusion.enterTargetRenderSurface(parentLayer->renderSurface());
+ {
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ layer->setOpaqueContentsRect(IntRect(0, 0, 100, 100));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 200, 100, 100)));
+ this->resetLayerIterator();
+ this->visitLayer(layer, occlusion);
+ this->enterLayer(parent, occlusion);
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
+ EXPECT_EQ_RECT(IntRect(100, 100, 100, 100), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 300)).isEmpty());
-}
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 100, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
+ }
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_layerScissorRectOverCulledTile, layerScissorRectOverCulledTile);
+ {
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ layer->setOpaqueContentsRect(IntRect(20, 20, 180, 180));
-void screenScissorRectOverCulledTile(bool opaqueLayers)
-{
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> parentLayer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(parentLayer);
- parent->addChild(layer);
+ this->resetLayerIterator();
+ this->visitLayer(layer, occlusion);
+ this->enterLayer(parent, occlusion);
- FilterOperations filters;
- filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- parentLayer->setFilters(filters);
- layer->setFilters(filters);
+ EXPECT_EQ_RECT(IntRect(120, 120, 180, 180), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
- setLayerPropertiesForTesting(parentLayer.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300), false, opaqueLayers);
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true, opaqueLayers);
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(100, 100, 100, 100)));
+ EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
+ }
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
+ {
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ layer->setOpaqueContentsRect(IntRect(150, 150, 100, 100));
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
+ this->resetLayerIterator();
+ this->visitLayer(layer, occlusion);
+ this->enterLayer(parent, occlusion);
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
+ EXPECT_EQ_RECT(IntRect(250, 250, 50, 50), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- TestCCOcclusionTracker occlusion(IntRect(100, 100, 100, 100));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(100, 100, 100, 100)));
+ EXPECT_FALSE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
+ }
+ }
+};
- occlusion.enterTargetRenderSurface(layer->renderSurface());
+MAIN_AND_IMPL_THREAD_TEST(CCOcclusionTrackerTestOpaqueContentsRegionNonEmpty);
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(100, 100, 100, 100)));
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTest3dTransform : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix transform;
+ transform.rotate3d(0, 30, 0);
- occlusion.markOccludedBehindLayer(layer.get());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- occlusion.enterTargetRenderSurface(parentLayer->renderSurface());
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::LayerType* container = this->createLayer(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(container, transform, FloatPoint(100, 100), IntSize(200, 200), true);
+ this->calcDrawEtc(parent);
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 200, 100, 100)));
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ this->enterLayer(layer, occlusion);
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
+ // The layer is rotated in 3d but without preserving 3d, so it only gets resized.
+ EXPECT_EQ_RECT(IntRect(0, 0, 200, 200), occlusion.unoccludedContentRect(layer, IntRect(0, 0, 200, 200)));
+ }
+};
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 300)).isEmpty());
-}
+MAIN_AND_IMPL_THREAD_TEST(CCOcclusionTrackerTest3dTransform);
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_screenScissorRectOverCulledTile, screenScissorRectOverCulledTile);
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestPerspectiveTransform : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix transform;
+ transform.translate(150, 150);
+ transform.applyPerspective(400);
+ transform.rotate3d(1, 0, 0, -30);
+ transform.translate(-150, -150);
+
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::LayerType* container = this->createLayer(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(container, transform, FloatPoint(100, 100), IntSize(200, 200), true);
+ container->setPreserves3D(true);
+ layer->setPreserves3D(true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ this->enterLayer(layer, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(0, 0, 200, 200), occlusion.unoccludedContentRect(layer, IntRect(0, 0, 200, 200)));
+ }
+};
-void layerScissorRectOverPartialTiles(bool opaqueLayers)
-{
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> parentLayer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(parentLayer);
- parent->addChild(layer);
-
- FilterOperations filters;
- filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- parentLayer->setFilters(filters);
- layer->setFilters(filters);
-
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
- setLayerPropertiesForTesting(parentLayer.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300), false, opaqueLayers);
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true, opaqueLayers);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- occlusion.setLayerScissorRect(IntRect(50, 50, 200, 200));
-
- occlusion.enterTargetRenderSurface(layer->renderSurface());
-
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(100, 100, 100, 100)));
-
- occlusion.markOccludedBehindLayer(layer.get());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- occlusion.enterTargetRenderSurface(parentLayer->renderSurface());
-
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(200, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(200, 0, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(0, 200, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(100, 200, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(200, 200, 100, 100)));
-
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
-
- EXPECT_EQ_RECT(IntRect(50, 50, 200, 200), occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 300)));
- EXPECT_EQ_RECT(IntRect(200, 50, 50, 50), occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 100)));
- EXPECT_EQ_RECT(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent.get(), IntRect(0, 100, 300, 100)));
- EXPECT_EQ_RECT(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent.get(), IntRect(200, 100, 100, 100)));
- EXPECT_EQ_RECT(IntRect(100, 200, 100, 50), occlusion.unoccludedContentRect(parent.get(), IntRect(100, 200, 100, 100)));
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_layerScissorRectOverPartialTiles, layerScissorRectOverPartialTiles);
-
-void screenScissorRectOverPartialTiles(bool opaqueLayers)
-{
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> parentLayer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(parentLayer);
- parent->addChild(layer);
-
- FilterOperations filters;
- filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- parentLayer->setFilters(filters);
- layer->setFilters(filters);
-
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
- setLayerPropertiesForTesting(parentLayer.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300), false, opaqueLayers);
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true, opaqueLayers);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestCCOcclusionTracker occlusion(IntRect(50, 50, 200, 200));
-
- occlusion.enterTargetRenderSurface(layer->renderSurface());
-
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(100, 100, 100, 100)));
-
- occlusion.markOccludedBehindLayer(layer.get());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- occlusion.enterTargetRenderSurface(parentLayer->renderSurface());
-
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(200, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(200, 0, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(0, 200, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(100, 200, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(200, 200, 100, 100)));
-
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
-
- EXPECT_EQ_RECT(IntRect(50, 50, 200, 200), occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 300)));
- EXPECT_EQ_RECT(IntRect(200, 50, 50, 50), occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 100)));
- EXPECT_EQ_RECT(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent.get(), IntRect(0, 100, 300, 100)));
- EXPECT_EQ_RECT(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent.get(), IntRect(200, 100, 100, 100)));
- EXPECT_EQ_RECT(IntRect(100, 200, 100, 50), occlusion.unoccludedContentRect(parent.get(), IntRect(100, 200, 100, 100)));
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_screenScissorRectOverPartialTiles, screenScissorRectOverPartialTiles);
-
-void layerScissorRectOverNoTiles(bool opaqueLayers)
-{
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> parentLayer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(parentLayer);
- parent->addChild(layer);
-
- FilterOperations filters;
- filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- parentLayer->setFilters(filters);
- layer->setFilters(filters);
-
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
- setLayerPropertiesForTesting(parentLayer.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300), false, opaqueLayers);
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true, opaqueLayers);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- occlusion.setLayerScissorRect(IntRect(500, 500, 100, 100));
-
- occlusion.enterTargetRenderSurface(layer->renderSurface());
-
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(100, 100, 100, 100)));
-
- occlusion.markOccludedBehindLayer(layer.get());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- occlusion.enterTargetRenderSurface(parentLayer->renderSurface());
-
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 200, 100, 100)));
-
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
-
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 300)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 100)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(0, 100, 300, 100)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(200, 100, 100, 100)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(100, 200, 100, 100)).isEmpty());
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_layerScissorRectOverNoTiles, layerScissorRectOverNoTiles);
-
-void screenScissorRectOverNoTiles(bool opaqueLayers)
-{
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> parentLayer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(parentLayer);
- parent->addChild(layer);
-
- FilterOperations filters;
- filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- parentLayer->setFilters(filters);
- layer->setFilters(filters);
-
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
- setLayerPropertiesForTesting(parentLayer.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300), false, opaqueLayers);
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true, opaqueLayers);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestCCOcclusionTracker occlusion(IntRect(500, 500, 100, 100));
-
- occlusion.enterTargetRenderSurface(layer->renderSurface());
-
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(100, 100, 100, 100)));
-
- occlusion.markOccludedBehindLayer(layer.get());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- occlusion.enterTargetRenderSurface(parentLayer->renderSurface());
-
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 200, 100, 100)));
-
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
-
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 300)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 100)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(0, 100, 300, 100)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(200, 100, 100, 100)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(100, 200, 100, 100)).isEmpty());
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_screenScissorRectOverNoTiles, screenScissorRectOverNoTiles);
-
-void layerScissorRectForLayerOffOrigin(bool opaqueLayers)
-{
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> parentLayer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(parentLayer);
- parent->addChild(layer);
+MAIN_THREAD_TEST(CCOcclusionTrackerTestPerspectiveTransform);
- FilterOperations filters;
- filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- parentLayer->setFilters(filters);
- layer->setFilters(filters);
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestPerspectiveTransformBehindCamera : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ // This test is based on the platform/chromium/compositing/3d-corners.html layout test.
+ TransformationMatrix transform;
+ transform.translate(250, 50);
+ transform.applyPerspective(10);
+ transform.translate(-250, -50);
+ transform.translate(250, 50);
+ transform.rotate3d(1, 0, 0, -167);
+ transform.translate(-250, -50);
+
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(500, 100));
+ typename Types::LayerType* container = this->createLayer(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(500, 500));
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(container, transform, FloatPoint(0, 0), IntSize(500, 500), true);
+ container->setPreserves3D(true);
+ layer->setPreserves3D(true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ this->enterLayer(layer, occlusion);
+
+ // The bottom 11 pixel rows of this layer remain visible inside the container, after translation to the target surface. When translated back,
+ // this will include many more pixels but must include at least the bottom 11 rows.
+ EXPECT_TRUE(occlusion.unoccludedContentRect(layer, IntRect(0, 0, 500, 500)).contains(IntRect(0, 489, 500, 11)));
+ }
+};
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
- setLayerPropertiesForTesting(parentLayer.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300), false, opaqueLayers);
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(100, 100), IntSize(200, 200), true, opaqueLayers);
+MAIN_THREAD_TEST(CCOcclusionTrackerTestPerspectiveTransformBehindCamera);
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestLayerBehindCameraDoesNotOcclude : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix transform;
+ transform.translate(50, 50);
+ transform.applyPerspective(100);
+ transform.translate3d(0, 0, 110);
+ transform.translate(-50, -50);
+
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, transform, FloatPoint(0, 0), IntSize(100, 100), true);
+ parent->setPreserves3D(true);
+ layer->setPreserves3D(true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+
+ // The |layer| is entirely behind the camera and should not occlude.
+ this->visitLayer(layer, occlusion);
+ this->enterLayer(parent, occlusion);
+ EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
+ EXPECT_EQ(0u, occlusion.occlusionInScreenSpace().rects().size());
+ }
+};
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
+MAIN_THREAD_TEST(CCOcclusionTrackerTestLayerBehindCameraDoesNotOcclude);
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestLargePixelsOccludeInsideClipRect : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix transform;
+ transform.translate(50, 50);
+ transform.applyPerspective(100);
+ transform.translate3d(0, 0, 99);
+ transform.translate(-50, -50);
+
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100));
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, transform, FloatPoint(0, 0), IntSize(100, 100), true);
+ parent->setPreserves3D(true);
+ layer->setPreserves3D(true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+
+ // This is very close to the camera, so pixels in its visibleLayerRect will actually go outside of the layer's clipRect.
+ // Ensure that those pixels don't occlude things outside the clipRect.
+ this->visitLayer(layer, occlusion);
+ this->enterLayer(parent, occlusion);
+ EXPECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+ EXPECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ }
+};
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
+MAIN_THREAD_TEST(CCOcclusionTrackerTestLargePixelsOccludeInsideClipRect);
- occlusion.enterTargetRenderSurface(layer->renderSurface());
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestAnimationOpacity1OnMainThread : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300), true);
+ typename Types::ContentLayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300), true);
+ typename Types::ContentLayerType* surfaceChild = this->createDrawingLayer(surface, this->identityMatrix, FloatPoint(0, 0), IntSize(200, 300), true);
+ typename Types::ContentLayerType* surfaceChild2 = this->createDrawingLayer(surface, this->identityMatrix, FloatPoint(0, 0), IntSize(100, 300), true);
+ typename Types::ContentLayerType* parent2 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300), false);
+ typename Types::ContentLayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(250, 0), IntSize(50, 300), true);
+
+ addOpacityTransitionToController(*layer->layerAnimationController(), 10, 0, 1, false);
+ addOpacityTransitionToController(*surface->layerAnimationController(), 10, 0, 1, false);
+ this->calcDrawEtc(parent);
+
+ EXPECT_TRUE(layer->drawOpacityIsAnimating());
+ EXPECT_FALSE(surface->drawOpacityIsAnimating());
+ EXPECT_TRUE(surface->renderSurface()->drawOpacityIsAnimating());
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+
+ this->visitLayer(topmost, occlusion);
+ this->enterLayer(parent2, occlusion);
+ // This occlusion will affect all surfaces.
+ EXPECT_EQ_RECT(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent2, IntRect(0, 0, 300, 300)));
+ this->leaveLayer(parent2, occlusion);
+
+ this->visitLayer(surfaceChild2, occlusion);
+ this->enterLayer(surfaceChild, occlusion);
+ EXPECT_EQ_RECT(IntRect(100, 0, 150, 300), occlusion.unoccludedContentRect(surfaceChild, IntRect(0, 0, 300, 300)));
+ this->leaveLayer(surfaceChild, occlusion);
+ this->enterLayer(surface, occlusion);
+ EXPECT_EQ_RECT(IntRect(200, 0, 50, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
+ this->leaveLayer(surface, occlusion);
+
+ this->enterContributingSurface(surface, occlusion);
+ // Occlusion within the surface is lost when leaving the animating surface.
+ EXPECT_EQ_RECT(IntRect(0, 0, 250, 300), occlusion.unoccludedContributingSurfaceContentRect(surface->renderSurface(), false, IntRect(0, 0, 300, 300)));
+ this->leaveContributingSurface(surface, occlusion);
+
+ this->visitLayer(layer, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ // Occlusion is not added for the animating |layer|.
+ EXPECT_EQ_RECT(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+ }
+};
- // This layer is translated when drawn into its target. So if the scissor rect given from the target surface
- // is not in that target space, then after translating these query rects into the target, they will fall outside
- // the scissor and be considered occluded.
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(100, 100, 100, 100)));
-}
+MAIN_THREAD_TEST(CCOcclusionTrackerTestAnimationOpacity1OnMainThread);
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_layerScissorRectForLayerOffOrigin, layerScissorRectForLayerOffOrigin);
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestAnimationOpacity0OnMainThread : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300), true);
+ typename Types::ContentLayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300), true);
+ typename Types::ContentLayerType* surfaceChild = this->createDrawingLayer(surface, this->identityMatrix, FloatPoint(0, 0), IntSize(200, 300), true);
+ typename Types::ContentLayerType* surfaceChild2 = this->createDrawingLayer(surface, this->identityMatrix, FloatPoint(0, 0), IntSize(100, 300), true);
+ typename Types::ContentLayerType* parent2 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300), false);
+ typename Types::ContentLayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(250, 0), IntSize(50, 300), true);
+
+ addOpacityTransitionToController(*layer->layerAnimationController(), 10, 1, 0, false);
+ addOpacityTransitionToController(*surface->layerAnimationController(), 10, 1, 0, false);
+ this->calcDrawEtc(parent);
+
+ EXPECT_TRUE(layer->drawOpacityIsAnimating());
+ EXPECT_FALSE(surface->drawOpacityIsAnimating());
+ EXPECT_TRUE(surface->renderSurface()->drawOpacityIsAnimating());
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+
+ this->visitLayer(topmost, occlusion);
+ this->enterLayer(parent2, occlusion);
+ // This occlusion will affect all surfaces.
+ EXPECT_EQ_RECT(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+ this->leaveLayer(parent2, occlusion);
+
+ this->visitLayer(surfaceChild2, occlusion);
+ this->enterLayer(surfaceChild, occlusion);
+ EXPECT_EQ_RECT(IntRect(100, 0, 150, 300), occlusion.unoccludedContentRect(surfaceChild, IntRect(0, 0, 300, 300)));
+ this->leaveLayer(surfaceChild, occlusion);
+ this->enterLayer(surface, occlusion);
+ EXPECT_EQ_RECT(IntRect(200, 0, 50, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
+ this->leaveLayer(surface, occlusion);
+
+ this->enterContributingSurface(surface, occlusion);
+ // Occlusion within the surface is lost when leaving the animating surface.
+ EXPECT_EQ_RECT(IntRect(0, 0, 250, 300), occlusion.unoccludedContributingSurfaceContentRect(surface->renderSurface(), false, IntRect(0, 0, 300, 300)));
+ this->leaveContributingSurface(surface, occlusion);
+
+ this->visitLayer(layer, occlusion);
+ this->enterLayer(parent, occlusion);
+
+ // Occlusion is not added for the animating |layer|.
+ EXPECT_EQ_RECT(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+ }
+};
-void damageRectOverTile(bool opaqueLayers)
-{
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> parentLayer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(parentLayer);
- parent->addChild(layer);
+MAIN_THREAD_TEST(CCOcclusionTrackerTestAnimationOpacity0OnMainThread);
- FilterOperations filters;
- filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- parentLayer->setFilters(filters);
- layer->setFilters(filters);
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestAnimationTranslateOnMainThread : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* layer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300), true);
+ typename Types::ContentLayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300), true);
+ typename Types::ContentLayerType* surfaceChild = this->createDrawingLayer(surface, this->identityMatrix, FloatPoint(0, 0), IntSize(200, 300), true);
+ typename Types::ContentLayerType* surfaceChild2 = this->createDrawingLayer(surface, this->identityMatrix, FloatPoint(0, 0), IntSize(100, 300), true);
+ typename Types::ContentLayerType* surface2 = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(50, 300), true);
+
+ addAnimatedTransformToController(*layer->layerAnimationController(), 10, 30, 0);
+ addAnimatedTransformToController(*surface->layerAnimationController(), 10, 30, 0);
+ addAnimatedTransformToController(*surfaceChild->layerAnimationController(), 10, 30, 0);
+ this->calcDrawEtc(parent);
+
+ EXPECT_TRUE(layer->drawTransformIsAnimating());
+ EXPECT_TRUE(layer->screenSpaceTransformIsAnimating());
+ EXPECT_TRUE(surface->renderSurface()->targetSurfaceTransformsAreAnimating());
+ EXPECT_TRUE(surface->renderSurface()->screenSpaceTransformsAreAnimating());
+ // The surface owning layer doesn't animate against its own surface.
+ EXPECT_FALSE(surface->drawTransformIsAnimating());
+ EXPECT_TRUE(surface->screenSpaceTransformIsAnimating());
+ EXPECT_TRUE(surfaceChild->drawTransformIsAnimating());
+ EXPECT_TRUE(surfaceChild->screenSpaceTransformIsAnimating());
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+
+ this->visitLayer(surface2, occlusion);
+ this->enterContributingSurface(surface2, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
- setLayerPropertiesForTesting(parentLayer.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300), false, opaqueLayers);
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true, opaqueLayers);
+ this->leaveContributingSurface(surface2, occlusion);
+ this->enterLayer(surfaceChild2, occlusion);
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
+ // surfaceChild2 is moving in screen space but not relative to its target, so occlusion should happen in its target space only.
+ // It also means that things occluding in screen space (e.g. surface2) cannot occlude this layer.
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 300), occlusion.unoccludedContentRect(surfaceChild2, IntRect(0, 0, 100, 300)));
+ EXPECT_FALSE(occlusion.occluded(surfaceChild, IntRect(0, 0, 50, 300)));
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
+ this->leaveLayer(surfaceChild2, occlusion);
+ this->enterLayer(surfaceChild, occlusion);
+ EXPECT_FALSE(occlusion.occluded(surfaceChild, IntRect(0, 0, 100, 300)));
+ EXPECT_EQ_RECT(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 300), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+ EXPECT_EQ_RECT(IntRect(100, 0, 200, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
+
+ // The surfaceChild is occluded by the surfaceChild2, but is moving relative its target and the screen, so it
+ // can't be occluded.
+ EXPECT_EQ_RECT(IntRect(0, 0, 200, 300), occlusion.unoccludedContentRect(surfaceChild, IntRect(0, 0, 200, 300)));
+ EXPECT_FALSE(occlusion.occluded(surfaceChild, IntRect(0, 0, 50, 300)));
+
+ this->leaveLayer(surfaceChild, occlusion);
+ this->enterLayer(surface, occlusion);
+ // The surfaceChild is moving in screen space but not relative to its target, so occlusion should happen in its target space only.
+ EXPECT_EQ_RECT(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 300), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+ EXPECT_EQ_RECT(IntRect(100, 0, 200, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
+ this->leaveLayer(surface, occlusion);
+ // The surface's owning layer is moving in screen space but not relative to its target, so occlusion should happen in its target space only.
+ EXPECT_EQ_RECT(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 300, 300), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
+
+ this->enterContributingSurface(surface, occlusion);
+ // The contributing |surface| is animating so it can't be occluded.
+ EXPECT_EQ_RECT(IntRect(0, 0, 300, 300), occlusion.unoccludedContributingSurfaceContentRect(surface->renderSurface(), false, IntRect(0, 0, 300, 300)));
+ this->leaveContributingSurface(surface, occlusion);
+
+ this->enterLayer(layer, occlusion);
+ // The |surface| is moving in the screen and in its target, so all occlusion within the surface is lost when leaving it.
+ EXPECT_EQ_RECT(IntRect(50, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+ this->leaveLayer(layer, occlusion);
+
+ this->enterLayer(parent, occlusion);
+ // The |layer| is animating in the screen and in its target, so no occlusion is added.
+ EXPECT_EQ_RECT(IntRect(50, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+ }
+};
- TestDamageClient damage(FloatRect(200, 100, 100, 100));
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000), &damage);
+MAIN_THREAD_TEST(CCOcclusionTrackerTestAnimationTranslateOnMainThread);
- occlusion.enterTargetRenderSurface(layer->renderSurface());
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestSurfaceOcclusionTranslatesToParent : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix surfaceTransform;
+ surfaceTransform.translate(300, 300);
+ surfaceTransform.scale(2);
+ surfaceTransform.translate(-150, -150);
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(100, 100, 100, 100)));
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(500, 500));
+ typename Types::ContentLayerType* surface = this->createDrawingSurface(parent, surfaceTransform, FloatPoint(0, 0), IntSize(300, 300), false);
+ typename Types::ContentLayerType* surface2 = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(50, 50), IntSize(300, 300), false);
+ surface->setOpaqueContentsRect(IntRect(0, 0, 200, 200));
+ surface2->setOpaqueContentsRect(IntRect(0, 0, 200, 200));
+ this->calcDrawEtc(parent);
- // Outside the layer's clip rect.
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(200, 100, 100, 100)));
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
- occlusion.markOccludedBehindLayer(layer.get());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- occlusion.enterTargetRenderSurface(parentLayer->renderSurface());
+ this->visitLayer(surface2, occlusion);
+ this->visitContributingSurface(surface2, occlusion);
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(200, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 200, 100, 100)));
+ EXPECT_EQ_RECT(IntRect(50, 50, 200, 200), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(50, 50, 200, 200), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
+ // Clear any stored occlusion.
+ occlusion.setOcclusionInScreenSpace(Region());
+ occlusion.setOcclusionInTargetSurface(Region());
- EXPECT_EQ_RECT(IntRect(200, 100, 100, 100), occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 300)));
-}
+ this->visitLayer(surface, occlusion);
+ this->visitContributingSurface(surface, occlusion);
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_damageRectOverTile, damageRectOverTile);
+ EXPECT_EQ_RECT(IntRect(0, 0, 400, 400), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 400, 400), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+ }
+};
-void damageRectOverCulledTile(bool opaqueLayers)
-{
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> parentLayer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(parentLayer);
- parent->addChild(layer);
+MAIN_AND_IMPL_THREAD_TEST(CCOcclusionTrackerTestSurfaceOcclusionTranslatesToParent);
- FilterOperations filters;
- filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- parentLayer->setFilters(filters);
- layer->setFilters(filters);
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestSurfaceOcclusionTranslatesWithClipping : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
+ typename Types::ContentLayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(500, 300), false);
+ surface->setOpaqueContentsRect(IntRect(0, 0, 400, 200));
+ this->calcDrawEtc(parent);
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
- setLayerPropertiesForTesting(parentLayer.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300), false, opaqueLayers);
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true, opaqueLayers);
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
+ this->visitLayer(surface, occlusion);
+ this->visitContributingSurface(surface, occlusion);
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
+ EXPECT_EQ_RECT(IntRect(0, 0, 300, 200), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 300, 200), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+ }
+};
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
+MAIN_AND_IMPL_THREAD_TEST(CCOcclusionTrackerTestSurfaceOcclusionTranslatesWithClipping);
- TestDamageClient damage(FloatRect(100, 100, 100, 100));
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000), &damage);
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestReplicaOccluded : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 200));
+ typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100), true);
+ this->createReplicaLayer(surface, this->identityMatrix, FloatPoint(0, 100), IntSize(100, 100));
+ typename Types::LayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 100), IntSize(100, 100), true);
+ this->calcDrawEtc(parent);
- occlusion.enterTargetRenderSurface(layer->renderSurface());
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(100, 100, 100, 100)));
+ // |topmost| occludes the replica, but not the surface itself.
+ this->visitLayer(topmost, occlusion);
- occlusion.markOccludedBehindLayer(layer.get());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- occlusion.enterTargetRenderSurface(parentLayer->renderSurface());
+ EXPECT_EQ_RECT(IntRect(0, 100, 100, 100), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 100, 100, 100), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ this->visitLayer(surface, occlusion);
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 200, 100, 100)));
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 200), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
+ this->enterContributingSurface(surface, occlusion);
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 300)).isEmpty());
-}
+ // Surface is not occluded so it shouldn't think it is.
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 100), occlusion.unoccludedContributingSurfaceContentRect(surface->renderSurface(), false, IntRect(0, 0, 100, 100)));
+ }
+};
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_damageRectOverCulledTile, damageRectOverCulledTile);
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestReplicaOccluded);
-void damageRectOverPartialTiles(bool opaqueLayers)
-{
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> parentLayer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(parentLayer);
- parent->addChild(layer);
-
- FilterOperations filters;
- filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- parentLayer->setFilters(filters);
- layer->setFilters(filters);
-
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
- setLayerPropertiesForTesting(parentLayer.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300), false, opaqueLayers);
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true, opaqueLayers);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestDamageClient damage(FloatRect(50, 50, 200, 200));
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000), &damage);
-
- occlusion.enterTargetRenderSurface(layer->renderSurface());
-
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(100, 100, 100, 100)));
-
- occlusion.markOccludedBehindLayer(layer.get());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- occlusion.enterTargetRenderSurface(parentLayer->renderSurface());
-
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(200, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(200, 0, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(0, 200, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(100, 200, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parentLayer.get(), IntRect(200, 200, 100, 100)));
-
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
-
- EXPECT_EQ_RECT(IntRect(50, 50, 200, 200), occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 300)));
- EXPECT_EQ_RECT(IntRect(200, 50, 50, 50), occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 100)));
- EXPECT_EQ_RECT(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent.get(), IntRect(0, 100, 300, 100)));
- EXPECT_EQ_RECT(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent.get(), IntRect(200, 100, 100, 100)));
- EXPECT_EQ_RECT(IntRect(100, 200, 100, 50), occlusion.unoccludedContentRect(parent.get(), IntRect(100, 200, 100, 100)));
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_damageRectOverPartialTiles, damageRectOverPartialTiles);
-
-void damageRectOverNoTiles(bool opaqueLayers)
-{
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> parentLayer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(parentLayer);
- parent->addChild(layer);
-
- FilterOperations filters;
- filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- parentLayer->setFilters(filters);
- layer->setFilters(filters);
-
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
- setLayerPropertiesForTesting(parentLayer.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300), false, opaqueLayers);
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(0, 0), IntSize(200, 200), true, opaqueLayers);
-
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
-
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
-
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
-
- TestDamageClient damage(FloatRect(500, 500, 100, 100));
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000), &damage);
-
- occlusion.enterTargetRenderSurface(layer->renderSurface());
-
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(100, 100, 100, 100)));
-
- occlusion.markOccludedBehindLayer(layer.get());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
- occlusion.enterTargetRenderSurface(parentLayer->renderSurface());
-
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 0, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(0, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(100, 200, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parentLayer.get(), IntRect(200, 200, 100, 100)));
-
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
-
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 300)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(0, 0, 300, 100)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(0, 100, 300, 100)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(200, 100, 100, 100)).isEmpty());
- EXPECT_TRUE(occlusion.unoccludedContentRect(parent.get(), IntRect(100, 200, 100, 100)).isEmpty());
-}
-
-TEST_OPAQUE_AND_PAINTED_OPAQUE(CCOcclusionTrackerTest_damageRectOverNoTiles, damageRectOverNoTiles);
-
-TEST(CCOcclusionTrackerTest, opaqueContentsRegionEmpty)
-{
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(layer);
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestSurfaceWithReplicaUnoccluded : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 200));
+ typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100), true);
+ this->createReplicaLayer(surface, this->identityMatrix, FloatPoint(0, 100), IntSize(100, 100));
+ typename Types::LayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(100, 110), true);
+ this->calcDrawEtc(parent);
- FilterOperations filters;
- filters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::GRAYSCALE));
- layer->setFilters(filters);
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(0, 0), IntSize(200, 200), false, false);
+ // |topmost| occludes the surface, but not the entire surface's replica.
+ this->visitLayer(topmost, occlusion);
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 110), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 110), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
+ this->visitLayer(surface, occlusion);
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 110), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
+ this->enterContributingSurface(surface, occlusion);
- occlusion.enterTargetRenderSurface(layer->renderSurface());
+ // Surface is occluded, but only the top 10px of the replica.
+ EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), occlusion.unoccludedContributingSurfaceContentRect(surface->renderSurface(), false, IntRect(0, 0, 100, 100)));
+ EXPECT_EQ_RECT(IntRect(0, 10, 100, 90), occlusion.unoccludedContributingSurfaceContentRect(surface->renderSurface(), true, IntRect(0, 0, 100, 100)));
+ }
+};
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(0, 0, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(100, 0, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(0, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(100, 100, 100, 100)));
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestSurfaceWithReplicaUnoccluded);
- // Occluded since its outside the surface bounds.
- EXPECT_TRUE(occlusion.occluded(layer.get(), IntRect(200, 100, 100, 100)));
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestSurfaceAndReplicaOccludedDifferently : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 200));
+ typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100), true);
+ this->createReplicaLayer(surface, this->identityMatrix, FloatPoint(0, 100), IntSize(100, 100));
+ typename Types::LayerType* overSurface = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(40, 100), true);
+ typename Types::LayerType* overReplica = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 100), IntSize(50, 100), true);
+ this->calcDrawEtc(parent);
- // Test without any scissors.
- occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
- EXPECT_FALSE(occlusion.occluded(layer.get(), IntRect(200, 100, 100, 100)));
- occlusion.useDefaultLayerScissorRect();
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
- occlusion.markOccludedBehindLayer(layer.get());
- occlusion.leaveToTargetRenderSurface(parent->renderSurface());
+ // These occlude the surface and replica differently, so we can test each one.
+ this->visitLayer(overReplica, occlusion);
+ this->visitLayer(overSurface, occlusion);
- EXPECT_TRUE(occlusion.occlusionInScreenSpace().bounds().isEmpty());
- EXPECT_EQ(0u, occlusion.occlusionInScreenSpace().rects().size());
-}
+ EXPECT_EQ_RECT(IntRect(0, 0, 50, 200), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 50, 200), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
-TEST(CCOcclusionTrackerTest, opaqueContentsRegionNonEmpty)
-{
- const TransformationMatrix identityMatrix;
- RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<LayerChromiumWithForcedDrawsContent> layer = adoptRef(new LayerChromiumWithForcedDrawsContent());
- parent->createRenderSurface();
- parent->addChild(layer);
+ this->visitLayer(surface, occlusion);
- setLayerPropertiesForTesting(parent.get(), identityMatrix, FloatPoint(0, 0), IntSize(300, 300));
- setLayerPropertiesForTesting(layer.get(), identityMatrix, FloatPoint(100, 100), IntSize(200, 200), false, false);
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 200), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
- Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
- Vector<RefPtr<LayerChromium> > dummyLayerList;
- int dummyMaxTextureSize = 512;
+ this->enterContributingSurface(surface, occlusion);
- parent->renderSurface()->setContentRect(IntRect(IntPoint::zero(), parent->bounds()));
- parent->setClipRect(IntRect(IntPoint::zero(), parent->bounds()));
- renderSurfaceLayerList.append(parent);
+ // Surface and replica are occluded different amounts.
+ EXPECT_EQ_RECT(IntRect(40, 0, 60, 100), occlusion.unoccludedContributingSurfaceContentRect(surface->renderSurface(), false, IntRect(0, 0, 100, 100)));
+ EXPECT_EQ_RECT(IntRect(50, 0, 50, 100), occlusion.unoccludedContributingSurfaceContentRect(surface->renderSurface(), true, IntRect(0, 0, 100, 100)));
+ }
+};
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(parent.get(), parent.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, dummyMaxTextureSize);
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestSurfaceAndReplicaOccludedDifferently);
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestSurfaceChildOfSurface : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
{
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- layer->setOpaquePaintRect(IntRect(0, 0, 100, 100));
+ // This test verifies that the surface cliprect does not end up empty and clip away the entire unoccluded rect.
+
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(100, 200));
+ typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100), true);
+ typename Types::LayerType* surfaceChild = this->createDrawingSurface(surface, this->identityMatrix, FloatPoint(0, 10), IntSize(100, 50), true);
+ typename Types::LayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(100, 50), true);
+ this->calcDrawEtc(parent);
- occlusion.enterTargetRenderSurface(parent->renderSurface());
- occlusion.markOccludedBehindLayer(layer.get());
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(-100, -100, 1000, 1000));
- EXPECT_EQ_RECT(IntRect(100, 100, 100, 100), occlusion.occlusionInScreenSpace().bounds());
+ // |topmost| occludes everything partially so we know occlusion is happening at all.
+ this->visitLayer(topmost, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 50), occlusion.occlusionInScreenSpace().bounds());
EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 50), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ this->visitLayer(surfaceChild, occlusion);
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(0, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(100, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(200, 200, 100, 100)));
+ // surfaceChild increases the occlusion in the screen by a narrow sliver.
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 60), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ // In its own surface, surfaceChild is at 0,0 as is its occlusion.
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 50), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ // The root layer always has a clipRect. So the parent of |surface| has a clipRect. However, the owning layer for |surface| does not
+ // mask to bounds, so it doesn't have a clipRect of its own. Thus the parent of |surfaceChild| exercises different code paths
+ // as its parent does not have a clipRect.
+
+ this->enterContributingSurface(surfaceChild, occlusion);
+ // The surfaceChild's parent does not have a clipRect as it owns a render surface. Make sure the unoccluded rect
+ // does not get clipped away inappropriately.
+ EXPECT_EQ_RECT(IntRect(0, 40, 100, 10), occlusion.unoccludedContributingSurfaceContentRect(surfaceChild->renderSurface(), false, IntRect(0, 0, 100, 50)));
+ this->leaveContributingSurface(surfaceChild, occlusion);
+
+ // When the surfaceChild's occlusion is transformed up to its parent, make sure it is not clipped away inappropriately also.
+ this->enterLayer(surface, occlusion);
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 60), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 10, 100, 50), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+ this->leaveLayer(surface, occlusion);
+
+ this->enterContributingSurface(surface, occlusion);
+ // The surface's parent does have a clipRect as it is the root layer.
+ EXPECT_EQ_RECT(IntRect(0, 50, 100, 50), occlusion.unoccludedContributingSurfaceContentRect(surface->renderSurface(), false, IntRect(0, 0, 100, 100)));
}
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestSurfaceChildOfSurface);
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestSurfaceChildOfClippingSurface : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
{
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- layer->setOpaquePaintRect(IntRect(20, 20, 180, 180));
+ // This test verifies that the surface cliprect does not end up empty and clip away the entire unoccluded rect.
+
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(80, 200));
+ typename Types::LayerType* surface = this->createDrawingSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100), true);
+ typename Types::LayerType* surfaceChild = this->createDrawingSurface(surface, this->identityMatrix, FloatPoint(0, 0), IntSize(100, 100), false);
+ typename Types::LayerType* topmost = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(100, 50), true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
- occlusion.enterTargetRenderSurface(parent->renderSurface());
- occlusion.markOccludedBehindLayer(layer.get());
+ // |topmost| occludes everything partially so we know occlusion is happening at all.
+ this->visitLayer(topmost, occlusion);
- EXPECT_EQ_RECT(IntRect(120, 120, 180, 180), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ_RECT(IntRect(0, 0, 80, 50), occlusion.occlusionInScreenSpace().bounds());
EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 80, 50), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(0, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(100, 100, 100, 100)));
- EXPECT_TRUE(occlusion.occluded(parent.get(), IntRect(200, 200, 100, 100)));
+ // surfaceChild is not opaque and does not occlude, so we have a non-empty unoccluded area on surface.
+ this->visitLayer(surfaceChild, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(0, 0, 80, 50), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
+
+ // The root layer always has a clipRect. So the parent of |surface| has a clipRect. However, the owning layer for |surface| does not
+ // mask to bounds, so it doesn't have a clipRect of its own. Thus the parent of |surfaceChild| exercises different code paths
+ // as its parent does not have a clipRect.
+
+ this->enterContributingSurface(surfaceChild, occlusion);
+ // The surfaceChild's parent does not have a clipRect as it owns a render surface.
+ EXPECT_EQ_RECT(IntRect(0, 50, 80, 50), occlusion.unoccludedContributingSurfaceContentRect(surfaceChild->renderSurface(), false, IntRect(0, 0, 100, 100)));
+ this->leaveContributingSurface(surfaceChild, occlusion);
+
+ this->visitLayer(surface, occlusion);
+ this->enterContributingSurface(surface, occlusion);
+ // The surface's parent does have a clipRect as it is the root layer.
+ EXPECT_EQ_RECT(IntRect(0, 50, 80, 50), occlusion.unoccludedContributingSurfaceContentRect(surface->renderSurface(), false, IntRect(0, 0, 100, 100)));
}
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestSurfaceChildOfClippingSurface);
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilter : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
{
- TestCCOcclusionTracker occlusion(IntRect(0, 0, 1000, 1000));
- layer->setOpaquePaintRect(IntRect(150, 150, 100, 100));
+ TransformationMatrix scaleByHalf;
+ scaleByHalf.scale(0.5);
+
+ // Make a surface and its replica, each 50x50, that are completely surrounded by opaque layers which are above them in the z-order.
+ // The surface is scaled to test that the pixel moving is done in the target space, where the background filter is applied, but the surface
+ // appears at 50, 50 and the replica at 200, 50.
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 150));
+ typename Types::LayerType* filteredSurface = this->createDrawingLayer(parent, scaleByHalf, FloatPoint(50, 50), IntSize(100, 100), false);
+ this->createReplicaLayer(filteredSurface, this->identityMatrix, FloatPoint(300, 0), IntSize());
+ typename Types::LayerType* occludingLayer1 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(300, 50), true);
+ typename Types::LayerType* occludingLayer2 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 100), IntSize(300, 50), true);
+ typename Types::LayerType* occludingLayer3 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 50), IntSize(50, 50), true);
+ typename Types::LayerType* occludingLayer4 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(100, 50), IntSize(100, 50), true);
+ typename Types::LayerType* occludingLayer5 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(250, 50), IntSize(50, 50), true);
+
+ // Filters make the layer own a surface.
+ FilterOperations filters;
+ filters.operations().append(BlurFilterOperation::create(Length(10, WebCore::Fixed), FilterOperation::BLUR));
+ filteredSurface->setBackgroundFilters(filters);
+
+ // Save the distance of influence for the blur effect.
+ int outsetTop, outsetRight, outsetBottom, outsetLeft;
+ filters.getOutsets(outsetTop, outsetRight, outsetBottom, outsetLeft);
+
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ // These layers occlude pixels directly beside the filteredSurface. Because filtered surface blends pixels in a radius, it will
+ // need to see some of the pixels (up to radius far) underneath the occludingLayers.
+ this->visitLayer(occludingLayer5, occlusion);
+ this->visitLayer(occludingLayer4, occlusion);
+ this->visitLayer(occludingLayer3, occlusion);
+ this->visitLayer(occludingLayer2, occlusion);
+ this->visitLayer(occludingLayer1, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 300, 150), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(5u, occlusion.occlusionInTargetSurface().rects().size());
+
+ // Everything outside the surface/replica is occluded but the surface/replica itself is not.
+ this->enterLayer(filteredSurface, occlusion);
+ EXPECT_EQ_RECT(IntRect(1, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(1, 0, 100, 100)));
+ EXPECT_EQ_RECT(IntRect(0, 1, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, 1, 100, 100)));
+ EXPECT_EQ_RECT(IntRect(0, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(-1, 0, 100, 100)));
+ EXPECT_EQ_RECT(IntRect(0, 0, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, -1, 100, 100)));
+
+ EXPECT_EQ_RECT(IntRect(300 + 1, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 + 1, 0, 100, 100)));
+ EXPECT_EQ_RECT(IntRect(300 + 0, 1, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 + 0, 1, 100, 100)));
+ EXPECT_EQ_RECT(IntRect(300 + 0, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 - 1, 0, 100, 100)));
+ EXPECT_EQ_RECT(IntRect(300 + 0, 0, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 + 0, -1, 100, 100)));
+ this->leaveLayer(filteredSurface, occlusion);
+
+ // The filtered layer/replica does not occlude.
+ EXPECT_EQ_RECT(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
+
+ // The surface has a background blur, so it needs pixels that are currently considered occluded in order to be drawn. So the pixels
+ // it needs should be removed some the occluded area so that when we get to the parent they are drawn.
+ this->visitContributingSurface(filteredSurface, occlusion);
+
+ this->enterLayer(parent, occlusion);
+ EXPECT_EQ_RECT(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 300, 150), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(5u, occlusion.occlusionInTargetSurface().rects().size());
+
+ IntRect outsetRect;
+ IntRect testRect;
+
+ // Nothing in the blur outsets for the filteredSurface is occluded.
+ outsetRect = IntRect(50 - outsetLeft, 50 - outsetTop, 50 + outsetLeft + outsetRight, 50 + outsetTop + outsetBottom);
+ testRect = outsetRect;
+ EXPECT_EQ_RECT(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+
+ // Stuff outside the blur outsets is still occluded though.
+ testRect = outsetRect;
+ testRect.expand(1, 0);
+ EXPECT_EQ_RECT(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+ testRect = outsetRect;
+ testRect.expand(0, 1);
+ EXPECT_EQ_RECT(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+ testRect = outsetRect;
+ testRect.move(-1, 0);
+ testRect.expand(1, 0);
+ EXPECT_EQ_RECT(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+ testRect = outsetRect;
+ testRect.move(0, -1);
+ testRect.expand(0, 1);
+ EXPECT_EQ_RECT(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+
+ // Nothing in the blur outsets for the filteredSurface's replica is occluded.
+ outsetRect = IntRect(200 - outsetLeft, 50 - outsetTop, 50 + outsetLeft + outsetRight, 50 + outsetTop + outsetBottom);
+ testRect = outsetRect;
+ EXPECT_EQ_RECT(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+
+ // Stuff outside the blur outsets is still occluded though.
+ testRect = outsetRect;
+ testRect.expand(1, 0);
+ EXPECT_EQ_RECT(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+ testRect = outsetRect;
+ testRect.expand(0, 1);
+ EXPECT_EQ_RECT(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+ testRect = outsetRect;
+ testRect.move(-1, 0);
+ testRect.expand(1, 0);
+ EXPECT_EQ_RECT(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+ testRect = outsetRect;
+ testRect.move(0, -1);
+ testRect.expand(0, 1);
+ EXPECT_EQ_RECT(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+ }
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilter);
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestTwoBackgroundFiltersReduceOcclusionTwice : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix scaleByHalf;
+ scaleByHalf.scale(0.5);
+
+ // Makes two surfaces that completely cover |parent|. The occlusion both above and below the filters will be reduced by each of them.
+ typename Types::ContentLayerType* root = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(75, 75));
+ typename Types::LayerType* parent = this->createSurface(root, scaleByHalf, FloatPoint(0, 0), IntSize(150, 150));
+ parent->setMasksToBounds(true);
+ typename Types::LayerType* filteredSurface1 = this->createDrawingLayer(parent, scaleByHalf, FloatPoint(0, 0), IntSize(300, 300), false);
+ typename Types::LayerType* filteredSurface2 = this->createDrawingLayer(parent, scaleByHalf, FloatPoint(0, 0), IntSize(300, 300), false);
+ typename Types::LayerType* occludingLayerAbove = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(100, 100), IntSize(50, 50), true);
+
+ // Filters make the layers own surfaces.
+ FilterOperations filters;
+ filters.operations().append(BlurFilterOperation::create(Length(3, WebCore::Fixed), FilterOperation::BLUR));
+ filteredSurface1->setBackgroundFilters(filters);
+ filteredSurface2->setBackgroundFilters(filters);
+
+ // Save the distance of influence for the blur effect.
+ int outsetTop, outsetRight, outsetBottom, outsetLeft;
+ filters.getOutsets(outsetTop, outsetRight, outsetBottom, outsetLeft);
- occlusion.enterTargetRenderSurface(parent->renderSurface());
- occlusion.markOccludedBehindLayer(layer.get());
+ this->calcDrawEtc(root);
- EXPECT_EQ_RECT(IntRect(250, 250, 50, 50), occlusion.occlusionInScreenSpace().bounds());
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ this->visitLayer(occludingLayerAbove, occlusion);
+ EXPECT_EQ_RECT(IntRect(100 / 2, 100 / 2, 50 / 2, 50 / 2), occlusion.occlusionInScreenSpace().bounds());
EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(100, 100, 50, 50), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+
+ this->visitLayer(filteredSurface2, occlusion);
+ this->visitContributingSurface(filteredSurface2, occlusion);
+ this->visitLayer(filteredSurface1, occlusion);
+ this->visitContributingSurface(filteredSurface1, occlusion);
+
+ ASSERT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ ASSERT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(0, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(100, 100, 100, 100)));
- EXPECT_FALSE(occlusion.occluded(parent.get(), IntRect(200, 200, 100, 100)));
+ // Test expectations in the target.
+ IntRect expectedOcclusion = IntRect(100 + outsetRight * 2, 100 + outsetBottom * 2, 50 - (outsetLeft + outsetRight) * 2, 50 - (outsetTop + outsetBottom) * 2);
+ EXPECT_EQ_RECT(expectedOcclusion, occlusion.occlusionInTargetSurface().rects()[0]);
+
+ // Test expectations in the screen. Take the ceiling of half of the outsets.
+ outsetTop = (outsetTop + 1) / 2;
+ outsetRight = (outsetRight + 1) / 2;
+ outsetBottom = (outsetBottom + 1) / 2;
+ outsetLeft = (outsetLeft + 1) / 2;
+ expectedOcclusion = IntRect(100 / 2 + outsetRight * 2, 100 / 2 + outsetBottom * 2, 50 / 2 - (outsetLeft + outsetRight) * 2, 50 /2 - (outsetTop + outsetBottom) * 2);
+
+ EXPECT_EQ_RECT(expectedOcclusion, occlusion.occlusionInScreenSpace().rects()[0]);
}
-}
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestTwoBackgroundFiltersReduceOcclusionTwice);
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilterWithClip : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ // Make a surface and its replica, each 50x50, that are completely surrounded by opaque layers which are above them in the z-order.
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 150));
+ // We stick the filtered surface inside a clipping surface so that we can make sure the clip is honored when exposing pixels for
+ // the background filter.
+ typename Types::LayerType* clippingSurface = this->createSurface(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(300, 70));
+ clippingSurface->setMasksToBounds(true);
+ typename Types::LayerType* filteredSurface = this->createDrawingLayer(clippingSurface, this->identityMatrix, FloatPoint(50, 50), IntSize(50, 50), false);
+ this->createReplicaLayer(filteredSurface, this->identityMatrix, FloatPoint(150, 0), IntSize());
+ typename Types::LayerType* occludingLayer1 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), IntSize(300, 50), true);
+ typename Types::LayerType* occludingLayer2 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 100), IntSize(300, 50), true);
+ typename Types::LayerType* occludingLayer3 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 50), IntSize(50, 50), true);
+ typename Types::LayerType* occludingLayer4 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(100, 50), IntSize(100, 50), true);
+ typename Types::LayerType* occludingLayer5 = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(250, 50), IntSize(50, 50), true);
+
+ // Filters make the layer own a surface. This filter is large enough that it goes outside the bottom of the clippingSurface.
+ FilterOperations filters;
+ filters.operations().append(BlurFilterOperation::create(Length(12, WebCore::Fixed), FilterOperation::BLUR));
+ filteredSurface->setBackgroundFilters(filters);
+
+ // Save the distance of influence for the blur effect.
+ int outsetTop, outsetRight, outsetBottom, outsetLeft;
+ filters.getOutsets(outsetTop, outsetRight, outsetBottom, outsetLeft);
+
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ // These layers occlude pixels directly beside the filteredSurface. Because filtered surface blends pixels in a radius, it will
+ // need to see some of the pixels (up to radius far) underneath the occludingLayers.
+ this->visitLayer(occludingLayer5, occlusion);
+ this->visitLayer(occludingLayer4, occlusion);
+ this->visitLayer(occludingLayer3, occlusion);
+ this->visitLayer(occludingLayer2, occlusion);
+ this->visitLayer(occludingLayer1, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 300, 150), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(5u, occlusion.occlusionInTargetSurface().rects().size());
+
+ // Everything outside the surface/replica is occluded but the surface/replica itself is not.
+ this->enterLayer(filteredSurface, occlusion);
+ EXPECT_EQ_RECT(IntRect(1, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(1, 0, 50, 50)));
+ EXPECT_EQ_RECT(IntRect(0, 1, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, 1, 50, 50)));
+ EXPECT_EQ_RECT(IntRect(0, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(-1, 0, 50, 50)));
+ EXPECT_EQ_RECT(IntRect(0, 0, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, -1, 50, 50)));
+
+ EXPECT_EQ_RECT(IntRect(150 + 1, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 + 1, 0, 50, 50)));
+ EXPECT_EQ_RECT(IntRect(150 + 0, 1, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 + 0, 1, 50, 50)));
+ EXPECT_EQ_RECT(IntRect(150 + 0, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 - 1, 0, 50, 50)));
+ EXPECT_EQ_RECT(IntRect(150 + 0, 0, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 + 0, -1, 50, 50)));
+ this->leaveLayer(filteredSurface, occlusion);
+
+ // The filtered layer/replica does not occlude.
+ EXPECT_EQ_RECT(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
+
+ // The surface has a background blur, so it needs pixels that are currently considered occluded in order to be drawn. So the pixels
+ // it needs should be removed some the occluded area so that when we get to the parent they are drawn.
+ this->visitContributingSurface(filteredSurface, occlusion);
+
+ this->enterContributingSurface(clippingSurface, occlusion);
+ EXPECT_EQ_RECT(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
+
+ IntRect outsetRect;
+ IntRect clippedOutsetRect;
+ IntRect testRect;
+
+ // Nothing in the (clipped) blur outsets for the filteredSurface is occluded.
+ outsetRect = IntRect(50 - outsetLeft, 50 - outsetTop, 50 + outsetLeft + outsetRight, 50 + outsetTop + outsetBottom);
+ clippedOutsetRect = intersection(outsetRect, IntRect(0 - outsetLeft, 0 - outsetTop, 300 + outsetLeft + outsetRight, 70 + outsetTop + outsetBottom));
+ testRect = outsetRect;
+ EXPECT_EQ_RECT(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+
+ // Stuff outside the (clipped) blur outsets is still occluded though.
+ testRect = outsetRect;
+ testRect.expand(1, 0);
+ EXPECT_EQ_RECT(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+ testRect = outsetRect;
+ testRect.expand(0, 1);
+ EXPECT_EQ_RECT(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+ testRect = outsetRect;
+ testRect.move(-1, 0);
+ testRect.expand(1, 0);
+ EXPECT_EQ_RECT(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+ testRect = outsetRect;
+ testRect.move(0, -1);
+ testRect.expand(0, 1);
+ EXPECT_EQ_RECT(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+
+ // Nothing in the (clipped) blur outsets for the filteredSurface's replica is occluded.
+ outsetRect = IntRect(200 - outsetLeft, 50 - outsetTop, 50 + outsetLeft + outsetRight, 50 + outsetTop + outsetBottom);
+ clippedOutsetRect = intersection(outsetRect, IntRect(0 - outsetLeft, 0 - outsetTop, 300 + outsetLeft + outsetRight, 70 + outsetTop + outsetBottom));
+ testRect = outsetRect;
+ EXPECT_EQ_RECT(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+
+ // Stuff outside the (clipped) blur outsets is still occluded though.
+ testRect = outsetRect;
+ testRect.expand(1, 0);
+ EXPECT_EQ_RECT(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+ testRect = outsetRect;
+ testRect.expand(0, 1);
+ EXPECT_EQ_RECT(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+ testRect = outsetRect;
+ testRect.move(-1, 0);
+ testRect.expand(1, 0);
+ EXPECT_EQ_RECT(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+ testRect = outsetRect;
+ testRect.move(0, -1);
+ testRect.expand(0, 1);
+ EXPECT_EQ_RECT(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+ }
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilterWithClip);
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestDontReduceOcclusionBelowBackgroundFilter : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix scaleByHalf;
+ scaleByHalf.scale(0.5);
+
+ // Make a surface and its replica, each 50x50, with a smaller 30x30 layer centered below each.
+ // The surface is scaled to test that the pixel moving is done in the target space, where the background filter is applied, but the surface
+ // appears at 50, 50 and the replica at 200, 50.
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 150));
+ typename Types::LayerType* behindSurfaceLayer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(60, 60), IntSize(30, 30), true);
+ typename Types::LayerType* behindReplicaLayer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(210, 60), IntSize(30, 30), true);
+ typename Types::LayerType* filteredSurface = this->createDrawingLayer(parent, scaleByHalf, FloatPoint(50, 50), IntSize(100, 100), false);
+ this->createReplicaLayer(filteredSurface, this->identityMatrix, FloatPoint(300, 0), IntSize());
+
+ // Filters make the layer own a surface.
+ FilterOperations filters;
+ filters.operations().append(BlurFilterOperation::create(Length(3, WebCore::Fixed), FilterOperation::BLUR));
+ filteredSurface->setBackgroundFilters(filters);
+
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ // The surface has a background blur, so it blurs non-opaque pixels below it.
+ this->visitLayer(filteredSurface, occlusion);
+ this->visitContributingSurface(filteredSurface, occlusion);
+
+ this->visitLayer(behindReplicaLayer, occlusion);
+ this->visitLayer(behindSurfaceLayer, occlusion);
+
+ // The layers behind the surface are not blurred, and their occlusion does not change, until we leave the surface.
+ // So it should not be modified by the filter here.
+ IntRect occlusionBehindSurface = IntRect(60, 60, 30, 30);
+ IntRect occlusionBehindReplica = IntRect(210, 60, 30, 30);
+
+ IntRect expectedOpaqueBounds = unionRect(occlusionBehindSurface, occlusionBehindReplica);
+ EXPECT_EQ_RECT(expectedOpaqueBounds, occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(expectedOpaqueBounds, occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
+ }
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestDontReduceOcclusionBelowBackgroundFilter);
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestDontReduceOcclusionIfBackgroundFilterIsOccluded : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix scaleByHalf;
+ scaleByHalf.scale(0.5);
+
+ // Make a surface and its replica, each 50x50, that are completely occluded by opaque layers which are above them in the z-order.
+ // The surface is scaled to test that the pixel moving is done in the target space, where the background filter is applied, but the surface
+ // appears at 50, 50 and the replica at 200, 50.
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 150));
+ typename Types::LayerType* filteredSurface = this->createDrawingLayer(parent, scaleByHalf, FloatPoint(50, 50), IntSize(100, 100), false);
+ this->createReplicaLayer(filteredSurface, this->identityMatrix, FloatPoint(300, 0), IntSize());
+ typename Types::LayerType* aboveSurfaceLayer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(50, 50), IntSize(50, 50), true);
+ typename Types::LayerType* aboveReplicaLayer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(200, 50), IntSize(50, 50), true);
+
+ // Filters make the layer own a surface.
+ FilterOperations filters;
+ filters.operations().append(BlurFilterOperation::create(Length(3, WebCore::Fixed), FilterOperation::BLUR));
+ filteredSurface->setBackgroundFilters(filters);
+
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ this->visitLayer(aboveReplicaLayer, occlusion);
+ this->visitLayer(aboveSurfaceLayer, occlusion);
+
+ // The surface has a background blur, so it blurs non-opaque pixels below it.
+ this->visitLayer(filteredSurface, occlusion);
+ this->visitContributingSurface(filteredSurface, occlusion);
+
+ // The filter is completely occluded, so it should not blur anything and reduce any occlusion.
+ IntRect occlusionAboveSurface = IntRect(50, 50, 50, 50);
+ IntRect occlusionAboveReplica = IntRect(200, 50, 50, 50);
+
+ IntRect expectedOpaqueBounds = unionRect(occlusionAboveSurface, occlusionAboveReplica);
+ EXPECT_EQ_RECT(expectedOpaqueBounds, occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(expectedOpaqueBounds, occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
+ }
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestDontReduceOcclusionIfBackgroundFilterIsOccluded);
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestReduceOcclusionWhenBackgroundFilterIsPartiallyOccluded : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ TransformationMatrix scaleByHalf;
+ scaleByHalf.scale(0.5);
+
+ // Make a surface and its replica, each 50x50, that are partially occluded by opaque layers which are above them in the z-order.
+ // The surface is scaled to test that the pixel moving is done in the target space, where the background filter is applied, but the surface
+ // appears at 50, 50 and the replica at 200, 50.
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(300, 150));
+ typename Types::LayerType* filteredSurface = this->createDrawingLayer(parent, scaleByHalf, FloatPoint(50, 50), IntSize(100, 100), false);
+ this->createReplicaLayer(filteredSurface, this->identityMatrix, FloatPoint(300, 0), IntSize());
+ typename Types::LayerType* aboveSurfaceLayer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(70, 50), IntSize(30, 50), true);
+ typename Types::LayerType* aboveReplicaLayer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(200, 50), IntSize(30, 50), true);
+ typename Types::LayerType* besideSurfaceLayer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(90, 40), IntSize(10, 10), true);
+ typename Types::LayerType* besideReplicaLayer = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(200, 40), IntSize(10, 10), true);
+
+ // Filters make the layer own a surface.
+ FilterOperations filters;
+ filters.operations().append(BlurFilterOperation::create(Length(3, WebCore::Fixed), FilterOperation::BLUR));
+ filteredSurface->setBackgroundFilters(filters);
+
+ // Save the distance of influence for the blur effect.
+ int outsetTop, outsetRight, outsetBottom, outsetLeft;
+ filters.getOutsets(outsetTop, outsetRight, outsetBottom, outsetLeft);
+
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+
+ this->visitLayer(besideReplicaLayer, occlusion);
+ this->visitLayer(besideSurfaceLayer, occlusion);
+ this->visitLayer(aboveReplicaLayer, occlusion);
+ this->visitLayer(aboveSurfaceLayer, occlusion);
+
+ // The surface has a background blur, so it blurs non-opaque pixels below it.
+ this->visitLayer(filteredSurface, occlusion);
+ this->visitContributingSurface(filteredSurface, occlusion);
+
+ // The filter in the surface and replica are partially unoccluded. Only the unoccluded parts should reduce occlusion.
+ // This means it will push back the occlusion that touches the unoccluded part (occlusionAbove___), but it will not
+ // touch occlusionBeside____ since that is not beside the unoccluded part of the surface, even though it is beside
+ // the occluded part of the surface.
+ IntRect occlusionAboveSurface = IntRect(70 + outsetRight, 50, 30 - outsetRight, 50);
+ IntRect occlusionAboveReplica = IntRect(200, 50, 30 - outsetLeft, 50);
+ IntRect occlusionBesideSurface = IntRect(90, 40, 10, 10);
+ IntRect occlusionBesideReplica = IntRect(200, 40, 10, 10);
+
+ Region expectedOcclusion;
+ expectedOcclusion.unite(occlusionAboveSurface);
+ expectedOcclusion.unite(occlusionAboveReplica);
+ expectedOcclusion.unite(occlusionBesideSurface);
+ expectedOcclusion.unite(occlusionBesideReplica);
+
+ ASSERT_EQ(expectedOcclusion.rects().size(), occlusion.occlusionInTargetSurface().rects().size());
+ ASSERT_EQ(expectedOcclusion.rects().size(), occlusion.occlusionInScreenSpace().rects().size());
+
+ for (size_t i = 0; i < expectedOcclusion.rects().size(); ++i) {
+ IntRect expectedRect = expectedOcclusion.rects()[i];
+ IntRect screenRect = occlusion.occlusionInScreenSpace().rects()[i];
+ IntRect targetRect = occlusion.occlusionInTargetSurface().rects()[i];
+ EXPECT_EQ(expectedRect, screenRect);
+ EXPECT_EQ(expectedRect, targetRect);
+ }
+ }
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestReduceOcclusionWhenBackgroundFilterIsPartiallyOccluded);
+
+template<class Types, bool opaqueLayers>
+class CCOcclusionTrackerTestMinimumTrackingSize : public CCOcclusionTrackerTest<Types, opaqueLayers> {
+protected:
+ void runMyTest()
+ {
+ IntSize trackingSize(100, 100);
+ IntSize belowTrackingSize(99, 99);
+
+ typename Types::ContentLayerType* parent = this->createRoot(this->identityMatrix, FloatPoint(0, 0), IntSize(400, 400));
+ typename Types::LayerType* large = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), trackingSize, true);
+ typename Types::LayerType* small = this->createDrawingLayer(parent, this->identityMatrix, FloatPoint(0, 0), belowTrackingSize, true);
+ this->calcDrawEtc(parent);
+
+ TestCCOcclusionTrackerWithScissor<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
+ occlusion.setLayerScissorRect(IntRect(0, 0, 1000, 1000));
+ occlusion.setMinimumTrackingSize(trackingSize);
+
+ // The small layer is not tracked because it is too small.
+ this->visitLayer(small, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(0u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
+
+ // The large layer is tracked as it is large enough.
+ this->visitLayer(large, occlusion);
+
+ EXPECT_EQ_RECT(IntRect(IntPoint(), trackingSize), occlusion.occlusionInScreenSpace().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
+ EXPECT_EQ_RECT(IntRect(IntPoint(), trackingSize), occlusion.occlusionInTargetSurface().bounds());
+ EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
+ }
+};
+
+ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestMinimumTrackingSize);
} // namespace
diff --git a/Source/WebKit/chromium/tests/CCOcclusionTrackerTestCommon.h b/Source/WebKit/chromium/tests/CCOcclusionTrackerTestCommon.h
new file mode 100644
index 000000000..fcdc3ed6c
--- /dev/null
+++ b/Source/WebKit/chromium/tests/CCOcclusionTrackerTestCommon.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2012 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef CCOcclusionTrackerTestCommon_h
+#define CCOcclusionTrackerTestCommon_h
+
+#include "IntRect.h"
+#include "Region.h"
+#include "RenderSurfaceChromium.h"
+#include "cc/CCOcclusionTracker.h"
+#include "cc/CCRenderSurface.h"
+
+namespace WebKitTests {
+
+// A subclass to expose the total current occlusion.
+template<typename LayerType, typename RenderSurfaceType>
+class TestCCOcclusionTrackerBase : public WebCore::CCOcclusionTrackerBase<LayerType, RenderSurfaceType> {
+public:
+ TestCCOcclusionTrackerBase(WebCore::IntRect screenScissorRect, bool recordMetricsForFrame = false)
+ : WebCore::CCOcclusionTrackerBase<LayerType, RenderSurfaceType>(screenScissorRect, recordMetricsForFrame)
+ {
+ }
+
+ WebCore::Region occlusionInScreenSpace() const { return WebCore::CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::m_stack.last().occlusionInScreen; }
+ WebCore::Region occlusionInTargetSurface() const { return WebCore::CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::m_stack.last().occlusionInTarget; }
+
+ void setOcclusionInScreenSpace(const WebCore::Region& region) { WebCore::CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::m_stack.last().occlusionInScreen = region; }
+ void setOcclusionInTargetSurface(const WebCore::Region& region) { WebCore::CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::m_stack.last().occlusionInTarget = region; }
+};
+
+typedef TestCCOcclusionTrackerBase<WebCore::LayerChromium, WebCore::RenderSurfaceChromium> TestCCOcclusionTracker;
+typedef TestCCOcclusionTrackerBase<WebCore::CCLayerImpl, WebCore::CCRenderSurface> TestCCOcclusionTrackerImpl;
+
+}
+
+#endif // CCOcclusionTrackerTestCommon_h
diff --git a/Source/WebKit/chromium/tests/CCQuadCullerTest.cpp b/Source/WebKit/chromium/tests/CCQuadCullerTest.cpp
index 42776bc94..991cddc46 100644
--- a/Source/WebKit/chromium/tests/CCQuadCullerTest.cpp
+++ b/Source/WebKit/chromium/tests/CCQuadCullerTest.cpp
@@ -26,6 +26,10 @@
#include "cc/CCQuadCuller.h"
+#include "cc/CCOcclusionTracker.h"
+#include "cc/CCOverdrawMetrics.h"
+#include "cc/CCSingleThreadProxy.h"
+#include "cc/CCTiledLayerImpl.h"
#include "cc/CCTileDrawQuad.h"
#include <gmock/gmock.h>
#include <gtest/gtest.h>
@@ -34,89 +38,145 @@ using namespace WebCore;
namespace {
-class CCQuadCullerTest : public testing::Test {
+class TestCCOcclusionTrackerImpl : public CCOcclusionTrackerImpl {
+public:
+ TestCCOcclusionTrackerImpl(const IntRect& scissorRectInScreen, bool recordMetricsForFrame = true)
+ : CCOcclusionTrackerImpl(scissorRectInScreen, recordMetricsForFrame)
+ , m_scissorRectInScreen(scissorRectInScreen)
+ {
+ }
+
+protected:
+ virtual IntRect layerScissorRectInTargetSurface(const CCLayerImpl* layer) const { return m_scissorRectInScreen; }
+
+private:
+ IntRect m_scissorRectInScreen;
};
-static PassOwnPtr<CCDrawQuad> MakeTileQuad(CCSharedQuadState* state, const IntRect& rect, const IntRect& opaqueRect = IntRect())
+typedef CCLayerIterator<CCLayerImpl, Vector<CCLayerImpl*>, CCRenderSurface, CCLayerIteratorActions::FrontToBack> CCLayerIteratorType;
+
+static PassOwnPtr<CCTiledLayerImpl> makeLayer(CCTiledLayerImpl* parent, const TransformationMatrix& drawTransform, const IntRect& layerRect, float opacity, bool opaque, const IntRect& layerOpaqueRect, Vector<CCLayerImpl*>& surfaceLayerList)
{
- return CCTileDrawQuad::create(state, rect, intersection(rect, opaqueRect), 1, IntPoint(1, 1), IntSize(100, 100), 0, false, false, false, false, false);
+ OwnPtr<CCTiledLayerImpl> layer = CCTiledLayerImpl::create(0);
+ OwnPtr<CCLayerTilingData> tiler = CCLayerTilingData::create(IntSize(100, 100), CCLayerTilingData::NoBorderTexels);
+ tiler->setBounds(layerRect.size());
+ layer->setTilingData(*tiler);
+ layer->setSkipsDraw(false);
+ layer->setDrawTransform(drawTransform);
+ layer->setScreenSpaceTransform(drawTransform);
+ layer->setVisibleLayerRect(layerRect);
+ layer->setDrawOpacity(opacity);
+ layer->setOpaque(opaque);
+
+ int textureId = 1;
+ for (int i = 0; i < tiler->numTilesX(); ++i)
+ for (int j = 0; j < tiler->numTilesY(); ++j) {
+ IntRect tileOpaqueRect = opaque ? tiler->tileBounds(i, j) : intersection(tiler->tileBounds(i, j), layerOpaqueRect);
+ layer->pushTileProperties(i, j, static_cast<Platform3DObject>(textureId++), tileOpaqueRect);
+ }
+
+ if (!parent) {
+ layer->createRenderSurface();
+ layer->setTargetRenderSurface(layer->renderSurface());
+ surfaceLayerList.append(layer.get());
+ layer->renderSurface()->layerList().append(layer.get());
+ } else {
+ layer->setTargetRenderSurface(parent->targetRenderSurface());
+ parent->renderSurface()->layerList().append(layer.get());
+ }
+
+ return layer.release();
}
-void setQuads(CCSharedQuadState* rootState, CCSharedQuadState* childState, CCQuadList& quadList, const IntRect& opaqueRect = IntRect())
+static void appendQuads(CCQuadList& quadList, Vector<OwnPtr<CCSharedQuadState> >& sharedStateList, CCTiledLayerImpl* layer, CCLayerIteratorType& it, CCOcclusionTrackerImpl& occlusionTracker)
{
- quadList.clear();
-
- quadList.append(MakeTileQuad(rootState, IntRect(IntPoint(), IntSize(100, 100)), opaqueRect));
- quadList.append(MakeTileQuad(rootState, IntRect(IntPoint(100, 0), IntSize(100, 100)), opaqueRect));
- quadList.append(MakeTileQuad(rootState, IntRect(IntPoint(200, 0), IntSize(100, 100)), opaqueRect));
- quadList.append(MakeTileQuad(rootState, IntRect(IntPoint(0, 100), IntSize(100, 100)), opaqueRect));
- quadList.append(MakeTileQuad(rootState, IntRect(IntPoint(100, 100), IntSize(100, 100)), opaqueRect));
- quadList.append(MakeTileQuad(rootState, IntRect(IntPoint(200, 100), IntSize(100, 100)), opaqueRect));
- quadList.append(MakeTileQuad(rootState, IntRect(IntPoint(0, 200), IntSize(100, 100)), opaqueRect));
- quadList.append(MakeTileQuad(rootState, IntRect(IntPoint(100, 200), IntSize(100, 100)), opaqueRect));
- quadList.append(MakeTileQuad(rootState, IntRect(IntPoint(200, 200), IntSize(100, 100)), opaqueRect));
-
- quadList.append(MakeTileQuad(childState, IntRect(IntPoint(), IntSize(100, 100)), opaqueRect));
- quadList.append(MakeTileQuad(childState, IntRect(IntPoint(100, 0), IntSize(100, 100)), opaqueRect));
- quadList.append(MakeTileQuad(childState, IntRect(IntPoint(0, 100), IntSize(100, 100)), opaqueRect));
- quadList.append(MakeTileQuad(childState, IntRect(IntPoint(100, 100), IntSize(100, 100)), opaqueRect));
+ occlusionTracker.enterLayer(it);
+ CCQuadCuller quadCuller(quadList, layer, &occlusionTracker);
+ OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
+ bool hadMissingTiles = false;
+ layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
+ sharedStateList.append(sharedQuadState.release());
+ occlusionTracker.leaveLayer(it);
+ ++it;
}
#define DECLARE_AND_INITIALIZE_TEST_QUADS \
+ DebugScopedSetImplThread impl; \
CCQuadList quadList; \
- CCOverdrawCounts overdraw; \
+ Vector<OwnPtr<CCSharedQuadState> > sharedStateList; \
+ Vector<CCLayerImpl*> renderSurfaceLayerList; \
TransformationMatrix childTransform; \
IntSize rootSize = IntSize(300, 300); \
IntRect rootRect = IntRect(IntPoint(), rootSize); \
IntSize childSize = IntSize(200, 200); \
IntRect childRect = IntRect(IntPoint(), childSize);
-TEST(CCQuadCullerTest, verifyCullChildLinesUpTopLeft)
+TEST(CCQuadCullerTest, verifyNoCulling)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
- OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, true);
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, TransformationMatrix(), rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), TransformationMatrix(), childRect, 1.0, false, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
- setQuads(rootState.get(), childState.get(), quadList);
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 13u);
- CCQuadCuller::cullOccludedQuads(quadList, false, IntRect(), &overdraw);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 90000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 40000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 0, 1);
+}
+
+TEST(CCQuadCullerTest, verifyCullChildLinesUpTopLeft)
+{
+ DECLARE_AND_INITIALIZE_TEST_QUADS
+
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, TransformationMatrix(), rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), TransformationMatrix(), childRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
+
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 9u);
- EXPECT_NEAR(overdraw.m_pixelsDrawnOpaque, 90000, 1);
- EXPECT_NEAR(overdraw.m_pixelsDrawnTransparent, 0, 1);
- EXPECT_NEAR(overdraw.m_pixelsCulled, 40000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 90000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 40000, 1);
}
TEST(CCQuadCullerTest, verifyCullWhenChildOpacityNotOne)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
- OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 0.9, true);
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, TransformationMatrix(), rootRect, 1, true, IntRect(), renderSurfaceLayerList);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 0.9f, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
- setQuads(rootState.get(), childState.get(), quadList);
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 13u);
- CCQuadCuller::cullOccludedQuads(quadList, false, IntRect(), &overdraw);
- EXPECT_EQ(quadList.size(), 13u);
- EXPECT_NEAR(overdraw.m_pixelsDrawnOpaque, 90000, 1);
- EXPECT_NEAR(overdraw.m_pixelsDrawnTransparent, 40000, 1);
- EXPECT_NEAR(overdraw.m_pixelsCulled, 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 90000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 40000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 0, 1);
}
TEST(CCQuadCullerTest, verifyCullWhenChildOpaqueFlagFalse)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
- OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, false);
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, TransformationMatrix(), rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1.0, false, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
- setQuads(rootState.get(), childState.get(), quadList);
- EXPECT_EQ(quadList.size(), 13u);
- CCQuadCuller::cullOccludedQuads(quadList, false, IntRect(), &overdraw);
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 13u);
- EXPECT_NEAR(overdraw.m_pixelsDrawnOpaque, 90000, 1);
- EXPECT_NEAR(overdraw.m_pixelsDrawnTransparent, 40000, 1);
- EXPECT_NEAR(overdraw.m_pixelsCulled, 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 90000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 40000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 0, 1);
}
TEST(CCQuadCullerTest, verifyCullCenterTileOnly)
@@ -125,32 +185,33 @@ TEST(CCQuadCullerTest, verifyCullCenterTileOnly)
childTransform.translate(50, 50);
- OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
- OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, true);
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, TransformationMatrix(), rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
- setQuads(rootState.get(), childState.get(), quadList);
- EXPECT_EQ(quadList.size(), 13u);
- CCQuadCuller::cullOccludedQuads(quadList, false, IntRect(), &overdraw);
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 12u);
- IntRect quadVisibleRect1 = quadList[1].get()->quadVisibleRect();
+ IntRect quadVisibleRect1 = quadList[5].get()->quadVisibleRect();
EXPECT_EQ(quadVisibleRect1.height(), 50);
- IntRect quadVisibleRect3 = quadList[3].get()->quadVisibleRect();
+ IntRect quadVisibleRect3 = quadList[7].get()->quadVisibleRect();
EXPECT_EQ(quadVisibleRect3.width(), 50);
- // Next index is 4, not 5, since centre quad culled.
- IntRect quadVisibleRect4 = quadList[4].get()->quadVisibleRect();
+ // Next index is 8, not 9, since centre quad culled.
+ IntRect quadVisibleRect4 = quadList[8].get()->quadVisibleRect();
EXPECT_EQ(quadVisibleRect4.width(), 50);
EXPECT_EQ(quadVisibleRect4.x(), 250);
- IntRect quadVisibleRect6 = quadList[6].get()->quadVisibleRect();
+ IntRect quadVisibleRect6 = quadList[10].get()->quadVisibleRect();
EXPECT_EQ(quadVisibleRect6.height(), 50);
EXPECT_EQ(quadVisibleRect6.y(), 250);
- EXPECT_NEAR(overdraw.m_pixelsDrawnOpaque, 100000, 1);
- EXPECT_NEAR(overdraw.m_pixelsDrawnTransparent, 0, 1);
- EXPECT_NEAR(overdraw.m_pixelsCulled, 30000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 100000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 30000, 1);
}
TEST(CCQuadCullerTest, verifyCullCenterTileNonIntegralSize1)
@@ -159,32 +220,33 @@ TEST(CCQuadCullerTest, verifyCullCenterTileNonIntegralSize1)
childTransform.translate(100, 100);
- // Create root layer tile with extent (99.1, 99.1) -> (200.9, 200.9) to make
+ // Make the root layer's quad have extent (99.1, 99.1) -> (200.9, 200.9) to make
// sure it doesn't get culled due to transform rounding.
TransformationMatrix rootTransform;
rootTransform.translate(99.1, 99.1);
rootTransform.scale(1.018);
- OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(rootTransform, TransformationMatrix(), rootRect, IntRect(), 1.0, true);
- OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, true);
+ rootRect = childRect = IntRect(0, 0, 100, 100);
- quadList.append(MakeTileQuad(rootState.get(), IntRect(IntPoint(), IntSize(100, 100))));
- quadList.append(MakeTileQuad(childState.get(), IntRect(IntPoint(), IntSize(100, 100))));
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, rootTransform, rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
- EXPECT_EQ(quadList.size(), 2u);
- CCQuadCuller::cullOccludedQuads(quadList, false, IntRect(), &overdraw);
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 2u);
- EXPECT_NEAR(overdraw.m_pixelsDrawnOpaque, 20363, 1);
- EXPECT_NEAR(overdraw.m_pixelsDrawnTransparent, 0, 1);
- EXPECT_NEAR(overdraw.m_pixelsCulled, 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 20363, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 0, 1);
}
TEST(CCQuadCullerTest, verifyCullCenterTileNonIntegralSize2)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- // Make the child quad slightly smaller than, and centred over, the root layer tile.
+ // Make the child's quad slightly smaller than, and centred over, the root layer tile.
// Verify the child does not cause the quad below to be culled due to rounding.
childTransform.translate(100.1, 100.1);
childTransform.scale(0.982);
@@ -192,19 +254,20 @@ TEST(CCQuadCullerTest, verifyCullCenterTileNonIntegralSize2)
TransformationMatrix rootTransform;
rootTransform.translate(100, 100);
- OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(rootTransform, TransformationMatrix(), rootRect, IntRect(), 1.0, true);
- OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, true);
+ rootRect = childRect = IntRect(0, 0, 100, 100);
- quadList.append(MakeTileQuad(rootState.get(), IntRect(IntPoint(), IntSize(100, 100))));
- quadList.append(MakeTileQuad(childState.get(), IntRect(IntPoint(), IntSize(100, 100))));
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, rootTransform, rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
- EXPECT_EQ(quadList.size(), 2u);
- CCQuadCuller::cullOccludedQuads(quadList, false, IntRect(), &overdraw);
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 2u);
- EXPECT_NEAR(overdraw.m_pixelsDrawnOpaque, 19643, 1);
- EXPECT_NEAR(overdraw.m_pixelsDrawnTransparent, 0, 1);
- EXPECT_NEAR(overdraw.m_pixelsCulled, 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 19643, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 0, 1);
}
TEST(CCQuadCullerTest, verifyCullChildLinesUpBottomRight)
@@ -213,16 +276,17 @@ TEST(CCQuadCullerTest, verifyCullChildLinesUpBottomRight)
childTransform.translate(100, 100);
- OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
- OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, true);
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, TransformationMatrix(), rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
- setQuads(rootState.get(), childState.get(), quadList);
- EXPECT_EQ(quadList.size(), 13u);
- CCQuadCuller::cullOccludedQuads(quadList, false, IntRect(), &overdraw);
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 9u);
- EXPECT_NEAR(overdraw.m_pixelsDrawnOpaque, 90000, 1);
- EXPECT_NEAR(overdraw.m_pixelsDrawnTransparent, 0, 1);
- EXPECT_NEAR(overdraw.m_pixelsCulled, 40000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 90000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 40000, 1);
}
TEST(CCQuadCullerTest, verifyCullSubRegion)
@@ -231,17 +295,18 @@ TEST(CCQuadCullerTest, verifyCullSubRegion)
childTransform.translate(50, 50);
- OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
- OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, false);
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, TransformationMatrix(), rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
IntRect childOpaqueRect(childRect.x() + childRect.width() / 4, childRect.y() + childRect.height() / 4, childRect.width() / 2, childRect.height() / 2);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1.0, false, childOpaqueRect, renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
- setQuads(rootState.get(), childState.get(), quadList, childOpaqueRect);
- EXPECT_EQ(quadList.size(), 13u);
- CCQuadCuller::cullOccludedQuads(quadList, false, IntRect(), &overdraw);
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 12u);
- EXPECT_NEAR(overdraw.m_pixelsDrawnOpaque, 90000, 1);
- EXPECT_NEAR(overdraw.m_pixelsDrawnTransparent, 30000, 1);
- EXPECT_NEAR(overdraw.m_pixelsCulled, 10000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 90000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 30000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 10000, 1);
}
TEST(CCQuadCullerTest, verifyCullSubRegion2)
@@ -250,17 +315,18 @@ TEST(CCQuadCullerTest, verifyCullSubRegion2)
childTransform.translate(50, 10);
- OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
- OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, false);
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, TransformationMatrix(), rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
IntRect childOpaqueRect(childRect.x() + childRect.width() / 4, childRect.y() + childRect.height() / 4, childRect.width() / 2, childRect.height() * 3 / 4);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1.0, false, childOpaqueRect, renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
- setQuads(rootState.get(), childState.get(), quadList, childOpaqueRect);
- EXPECT_EQ(quadList.size(), 13u);
- CCQuadCuller::cullOccludedQuads(quadList, false, IntRect(), &overdraw);
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 12u);
- EXPECT_NEAR(overdraw.m_pixelsDrawnOpaque, 90000, 1);
- EXPECT_NEAR(overdraw.m_pixelsDrawnTransparent, 25000, 1);
- EXPECT_NEAR(overdraw.m_pixelsCulled, 15000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 90000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 25000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 15000, 1);
}
TEST(CCQuadCullerTest, verifyCullSubRegionCheckOvercull)
@@ -269,14 +335,18 @@ TEST(CCQuadCullerTest, verifyCullSubRegionCheckOvercull)
childTransform.translate(50, 49);
- OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
- OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, false);
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, TransformationMatrix(), rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
IntRect childOpaqueRect(childRect.x() + childRect.width() / 4, childRect.y() + childRect.height() / 4, childRect.width() / 2, childRect.height() / 2);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1.0, false, childOpaqueRect, renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
- setQuads(rootState.get(), childState.get(), quadList, childOpaqueRect);
- EXPECT_EQ(quadList.size(), 13u);
- CCQuadCuller::cullOccludedQuads(quadList, false, IntRect(), &overdraw);
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 13u);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 90000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 30000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 10000, 1);
}
TEST(CCQuadCullerTest, verifyNonAxisAlignedQuadsDontOcclude)
@@ -286,16 +356,17 @@ TEST(CCQuadCullerTest, verifyNonAxisAlignedQuadsDontOcclude)
// Use a small rotation so as to not disturb the geometry significantly.
childTransform.rotate(1);
- OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
- OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, true);
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, TransformationMatrix(), rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), childTransform, childRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
- setQuads(rootState.get(), childState.get(), quadList);
- EXPECT_EQ(quadList.size(), 13u);
- CCQuadCuller::cullOccludedQuads(quadList, false, IntRect(), &overdraw);
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 13u);
- EXPECT_NEAR(overdraw.m_pixelsDrawnOpaque, 130000, 1);
- EXPECT_NEAR(overdraw.m_pixelsDrawnTransparent, 0, 1);
- EXPECT_NEAR(overdraw.m_pixelsCulled, 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 130000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 0, 1);
}
// This test requires some explanation: here we are rotating the quads to be culled.
@@ -311,74 +382,102 @@ TEST(CCQuadCullerTest, verifyNonAxisAlignedQuadsSafelyCulled)
TransformationMatrix parentTransform;
parentTransform.rotate(1);
- OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(parentTransform, TransformationMatrix(), rootRect, IntRect(), 1.0, true);
- OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), childRect, IntRect(), 1.0, true);
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, parentTransform, rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), TransformationMatrix(), childRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(-100, -100, 1000, 1000));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
- setQuads(rootState.get(), childState.get(), quadList);
- EXPECT_EQ(quadList.size(), 13u);
- CCQuadCuller::cullOccludedQuads(quadList, false, IntRect(), &overdraw);
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 12u);
- EXPECT_NEAR(overdraw.m_pixelsDrawnOpaque, 120000, 1);
- EXPECT_NEAR(overdraw.m_pixelsDrawnTransparent, 0, 1);
- EXPECT_NEAR(overdraw.m_pixelsCulled, 10000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 100600, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 29400, 1);
}
TEST(CCQuadCullerTest, verifyCullOutsideScissorOverTile)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
- OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, true);
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, TransformationMatrix(), rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), TransformationMatrix(), childRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(200, 100, 100, 100));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
- setQuads(rootState.get(), childState.get(), quadList);
- EXPECT_EQ(quadList.size(), 13u);
- CCQuadCuller::cullOccludedQuads(quadList, true, IntRect(200, 100, 100, 100), &overdraw);
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 1u);
- EXPECT_NEAR(overdraw.m_pixelsDrawnOpaque, 10000, 1);
- EXPECT_NEAR(overdraw.m_pixelsDrawnTransparent, 0, 1);
- EXPECT_NEAR(overdraw.m_pixelsCulled, 120000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 10000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 120000, 1);
}
TEST(CCQuadCullerTest, verifyCullOutsideScissorOverCulledTile)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
- OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, true);
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, TransformationMatrix(), rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), TransformationMatrix(), childRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(100, 100, 100, 100));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
- setQuads(rootState.get(), childState.get(), quadList);
- EXPECT_EQ(quadList.size(), 13u);
- CCQuadCuller::cullOccludedQuads(quadList, true, IntRect(100, 100, 100, 100), &overdraw);
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 1u);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 10000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 120000, 1);
}
TEST(CCQuadCullerTest, verifyCullOutsideScissorOverPartialTiles)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
- OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, true);
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, TransformationMatrix(), rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), TransformationMatrix(), childRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(50, 50, 200, 200));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
- setQuads(rootState.get(), childState.get(), quadList);
- EXPECT_EQ(quadList.size(), 13u);
- CCQuadCuller::cullOccludedQuads(quadList, true, IntRect(50, 50, 200, 200), &overdraw);
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 9u);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 40000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 90000, 1);
}
TEST(CCQuadCullerTest, verifyCullOutsideScissorOverNoTiles)
{
DECLARE_AND_INITIALIZE_TEST_QUADS
- OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
- OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, true);
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, TransformationMatrix(), rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), TransformationMatrix(), childRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(500, 500, 100, 100));
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
- setQuads(rootState.get(), childState.get(), quadList);
- EXPECT_EQ(quadList.size(), 13u);
- CCQuadCuller::cullOccludedQuads(quadList, true, IntRect(500, 500, 100, 100), &overdraw);
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 0u);
- EXPECT_NEAR(overdraw.m_pixelsDrawnOpaque, 0, 1);
- EXPECT_NEAR(overdraw.m_pixelsDrawnTransparent, 0, 1);
- EXPECT_NEAR(overdraw.m_pixelsCulled, 130000, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 130000, 1);
+}
+
+TEST(CCQuadCullerTest, verifyWithoutMetrics)
+{
+ DECLARE_AND_INITIALIZE_TEST_QUADS
+
+ OwnPtr<CCTiledLayerImpl> rootLayer = makeLayer(0, TransformationMatrix(), rootRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ OwnPtr<CCTiledLayerImpl> childLayer = makeLayer(rootLayer.get(), TransformationMatrix(), childRect, 1.0, true, IntRect(), renderSurfaceLayerList);
+ TestCCOcclusionTrackerImpl occlusionTracker(IntRect(50, 50, 200, 200), false);
+ CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList);
+
+ appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracker);
+ appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
+ EXPECT_EQ(quadList.size(), 9u);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 0, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 0, 1);
}
diff --git a/Source/WebKit/chromium/tests/CCRenderSurfaceTest.cpp b/Source/WebKit/chromium/tests/CCRenderSurfaceTest.cpp
index 1201587c7..7dac005d2 100644
--- a/Source/WebKit/chromium/tests/CCRenderSurfaceTest.cpp
+++ b/Source/WebKit/chromium/tests/CCRenderSurfaceTest.cpp
@@ -26,7 +26,9 @@
#include "cc/CCRenderSurface.h"
+#include "TransformationMatrix.h"
#include "cc/CCLayerImpl.h"
+#include "cc/CCSharedQuadState.h"
#include "cc/CCSingleThreadProxy.h"
#include <gmock/gmock.h>
#include <gtest/gtest.h>
@@ -89,4 +91,38 @@ TEST(CCRenderSurfaceTest, verifySurfaceChangesAreTrackedProperly)
EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(renderSurface->setMaskLayer(dummyMask.get()));
}
+TEST(CCRenderSurfaceTest, sanityCheckSurfaceCreatesCorrectSharedQuadState)
+{
+ // This will fake that we are on the correct thread for testing purposes.
+ DebugScopedSetImplThread setImplThread;
+
+ OwnPtr<CCLayerImpl> owningLayer = CCLayerImpl::create(0);
+ owningLayer->createRenderSurface();
+ ASSERT_TRUE(owningLayer->renderSurface());
+ CCRenderSurface* renderSurface = owningLayer->renderSurface();
+
+ IntRect contentRect = IntRect(IntPoint::zero(), IntSize(50, 50));
+ IntRect clipRect = IntRect(IntPoint(5, 5), IntSize(40, 40));
+ TransformationMatrix draw;
+ TransformationMatrix origin;
+
+ draw.translate(30, 40);
+
+ renderSurface->setDrawTransform(draw);
+ renderSurface->setOriginTransform(origin);
+ renderSurface->setContentRect(contentRect);
+ renderSurface->setClipRect(clipRect);
+ renderSurface->setDrawOpacity(1);
+
+ OwnPtr<CCSharedQuadState> sharedQuadState = renderSurface->createSharedQuadState();
+
+ EXPECT_TRUE(sharedQuadState->quadTransform().isIdentity());
+ EXPECT_EQ(30, sharedQuadState->layerTransform().m41());
+ EXPECT_EQ(40, sharedQuadState->layerTransform().m42());
+ EXPECT_EQ(contentRect, sharedQuadState->layerRect());
+ EXPECT_EQ(clipRect, sharedQuadState->clipRect());
+ EXPECT_EQ(1, sharedQuadState->opacity());
+ EXPECT_FALSE(sharedQuadState->isOpaque());
+}
+
} // namespace
diff --git a/Source/WebKit/chromium/tests/CCSchedulerStateMachineTest.cpp b/Source/WebKit/chromium/tests/CCSchedulerStateMachineTest.cpp
index 0853e5a36..2731c76fd 100644
--- a/Source/WebKit/chromium/tests/CCSchedulerStateMachineTest.cpp
+++ b/Source/WebKit/chromium/tests/CCSchedulerStateMachineTest.cpp
@@ -52,6 +52,9 @@ public:
void setNeedsCommit(bool b) { m_needsCommit = b; }
bool needsCommit() const { return m_needsCommit; }
+ void setNeedsForcedCommit(bool b) { m_needsForcedCommit = b; }
+ bool needsForcedCommit() const { return m_needsForcedCommit; }
+
void setNeedsRedraw(bool b) { m_needsRedraw = b; }
bool needsRedraw() const { return m_needsRedraw; }
@@ -72,6 +75,7 @@ TEST(CCSchedulerStateMachineTest, TestNextActionBeginsFrameIfNeeded)
{
StateMachine state;
state.setCommitState(CCSchedulerStateMachine::COMMIT_STATE_IDLE);
+ state.setCanBeginFrame(true);
state.setNeedsRedraw(false);
state.setNeedsCommit(false);
state.setUpdateMoreResourcesPending(false);
@@ -86,10 +90,30 @@ TEST(CCSchedulerStateMachineTest, TestNextActionBeginsFrameIfNeeded)
EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
}
+ // If commit requested but canBeginFrame is still false, do nothing.
+ {
+ StateMachine state;
+ state.setCommitState(CCSchedulerStateMachine::COMMIT_STATE_IDLE);
+ state.setNeedsRedraw(false);
+ state.setNeedsCommit(false);
+ state.setUpdateMoreResourcesPending(false);
+ state.setVisible(true);
+
+ EXPECT_FALSE(state.vsyncCallbackNeeded());
+
+ state.didLeaveVSync();
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
+ EXPECT_FALSE(state.vsyncCallbackNeeded());
+ state.didEnterVSync();
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
+ }
+
+
// If commit requested, begin a frame
{
StateMachine state;
state.setCommitState(CCSchedulerStateMachine::COMMIT_STATE_IDLE);
+ state.setCanBeginFrame(true);
state.setNeedsRedraw(false);
state.setNeedsCommit(true);
state.setUpdateMoreResourcesPending(false);
@@ -100,6 +124,7 @@ TEST(CCSchedulerStateMachineTest, TestNextActionBeginsFrameIfNeeded)
// Begin the frame, make sure needsCommit and commitState update correctly.
{
StateMachine state;
+ state.setCanBeginFrame(true);
state.setVisible(true);
state.updateState(CCSchedulerStateMachine::ACTION_BEGIN_FRAME);
EXPECT_EQ(CCSchedulerStateMachine::COMMIT_STATE_FRAME_IN_PROGRESS, state.commitState());
@@ -116,6 +141,180 @@ TEST(CCSchedulerStateMachineTest, TestSetForcedRedrawDoesNotSetsNormalRedraw)
EXPECT_TRUE(state.vsyncCallbackNeeded());
}
+TEST(CCSchedulerStateMachineTest, TestFailedDrawSetsNeedsCommitAndDoesNotDrawAgain)
+{
+ CCSchedulerStateMachine state;
+ state.setCanBeginFrame(true);
+ state.setVisible(true);
+ state.setNeedsRedraw();
+ EXPECT_TRUE(state.redrawPending());
+ EXPECT_TRUE(state.vsyncCallbackNeeded());
+ state.didEnterVSync();
+
+ // We're drawing now.
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
+ state.updateState(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
+ EXPECT_FALSE(state.redrawPending());
+ EXPECT_FALSE(state.commitPending());
+
+ // Failing the draw makes us require a commit.
+ state.didDrawIfPossibleCompleted(false);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction());
+ state.updateState(CCSchedulerStateMachine::ACTION_BEGIN_FRAME);
+ EXPECT_TRUE(state.redrawPending());
+ EXPECT_TRUE(state.commitPending());
+}
+
+TEST(CCSchedulerStateMachineTest, TestSetNeedsRedrawDuringFailedDrawDoesNotRemoveNeedsRedraw)
+{
+ CCSchedulerStateMachine state;
+ state.setCanBeginFrame(true);
+ state.setVisible(true);
+ state.setNeedsRedraw();
+ EXPECT_TRUE(state.redrawPending());
+ EXPECT_TRUE(state.vsyncCallbackNeeded());
+ state.didEnterVSync();
+
+ // We're drawing now.
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
+ state.updateState(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
+ EXPECT_FALSE(state.redrawPending());
+ EXPECT_FALSE(state.commitPending());
+
+ // While still in the same vsync callback, set needs redraw again.
+ // This should not redraw.
+ state.setNeedsRedraw();
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
+
+ // Failing the draw makes us require a commit.
+ state.didDrawIfPossibleCompleted(false);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction());
+ EXPECT_TRUE(state.redrawPending());
+}
+
+TEST(CCSchedulerStateMachineTest, TestCommitAfterFailedDrawAllowsDrawInSameFrame)
+{
+ CCSchedulerStateMachine state;
+ state.setCanBeginFrame(true);
+ state.setVisible(true);
+
+ // Start a commit.
+ state.setNeedsCommit();
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction());
+ state.updateState(CCSchedulerStateMachine::ACTION_BEGIN_FRAME);
+ EXPECT_TRUE(state.commitPending());
+
+ // Then initiate a draw.
+ state.setNeedsRedraw();
+ EXPECT_TRUE(state.vsyncCallbackNeeded());
+ state.didEnterVSync();
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
+ EXPECT_TRUE(state.redrawPending());
+
+ // Fail the draw.
+ state.updateState(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
+ state.didDrawIfPossibleCompleted(false);
+ EXPECT_TRUE(state.redrawPending());
+ // But the commit is ongoing.
+ EXPECT_TRUE(state.commitPending());
+
+ // Finish the commit.
+ state.beginFrameComplete();
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_UPDATE_MORE_RESOURCES, state.nextAction());
+ state.updateState(CCSchedulerStateMachine::ACTION_BEGIN_UPDATE_MORE_RESOURCES);
+ state.beginUpdateMoreResourcesComplete(false);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_COMMIT, state.nextAction());
+ state.updateState(CCSchedulerStateMachine::ACTION_COMMIT);
+ EXPECT_TRUE(state.redrawPending());
+
+ // And we should be allowed to draw again.
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
+}
+
+TEST(CCSchedulerStateMachineTest, TestCommitAfterFailedAndSuccessfulDrawDoesNotAllowDrawInSameFrame)
+{
+ CCSchedulerStateMachine state;
+ state.setCanBeginFrame(true);
+ state.setVisible(true);
+
+ // Start a commit.
+ state.setNeedsCommit();
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction());
+ state.updateState(CCSchedulerStateMachine::ACTION_BEGIN_FRAME);
+ EXPECT_TRUE(state.commitPending());
+
+ // Then initiate a draw.
+ state.setNeedsRedraw();
+ EXPECT_TRUE(state.vsyncCallbackNeeded());
+ state.didEnterVSync();
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
+ EXPECT_TRUE(state.redrawPending());
+
+ // Fail the draw.
+ state.updateState(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
+ state.didDrawIfPossibleCompleted(false);
+ EXPECT_TRUE(state.redrawPending());
+ // But the commit is ongoing.
+ EXPECT_TRUE(state.commitPending());
+
+ // Force a draw.
+ state.setNeedsForcedRedraw();
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_FORCED, state.nextAction());
+
+ // Do the forced draw.
+ state.updateState(CCSchedulerStateMachine::ACTION_DRAW_FORCED);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
+ EXPECT_FALSE(state.redrawPending());
+ // And the commit is still ongoing.
+ EXPECT_TRUE(state.commitPending());
+
+ // Finish the commit.
+ state.beginFrameComplete();
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_UPDATE_MORE_RESOURCES, state.nextAction());
+ state.updateState(CCSchedulerStateMachine::ACTION_BEGIN_UPDATE_MORE_RESOURCES);
+ state.beginUpdateMoreResourcesComplete(false);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_COMMIT, state.nextAction());
+ state.updateState(CCSchedulerStateMachine::ACTION_COMMIT);
+ EXPECT_TRUE(state.redrawPending());
+
+ // And we should not be allowed to draw again in the same frame..
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
+}
+
+TEST(CCSchedulerStateMachineTest, TestFailedDrawIsRetriedNextVSync)
+{
+ CCSchedulerStateMachine state;
+ state.setCanBeginFrame(true);
+ state.setVisible(true);
+
+ // Start a draw.
+ state.setNeedsRedraw();
+ EXPECT_TRUE(state.vsyncCallbackNeeded());
+ state.didEnterVSync();
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
+ EXPECT_TRUE(state.redrawPending());
+
+ // Fail the draw.
+ state.updateState(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
+ state.didDrawIfPossibleCompleted(false);
+ EXPECT_TRUE(state.redrawPending());
+
+ // We should not be trying to draw again now, but we have a commit pending.
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction());
+
+ state.didLeaveVSync();
+ EXPECT_TRUE(state.vsyncCallbackNeeded());
+ state.didEnterVSync();
+
+ // We should try draw again in the next vsync.
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
+}
+
TEST(CCSchedulerStateMachineTest, TestDoestDrawTwiceInSameFrame)
{
CCSchedulerStateMachine state;
@@ -123,8 +322,8 @@ TEST(CCSchedulerStateMachineTest, TestDoestDrawTwiceInSameFrame)
state.setNeedsRedraw();
EXPECT_TRUE(state.vsyncCallbackNeeded());
state.didEnterVSync();
- EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
- state.updateState(CCSchedulerStateMachine::ACTION_DRAW);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
+ state.updateState(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE);
// While still in the same vsync callback, set needs redraw again.
// This should not redraw.
@@ -132,12 +331,14 @@ TEST(CCSchedulerStateMachineTest, TestDoestDrawTwiceInSameFrame)
EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
// Move to another frame. This should now draw.
+ state.didDrawIfPossibleCompleted(true);
state.didLeaveVSync();
EXPECT_TRUE(state.vsyncCallbackNeeded());
state.didEnterVSync();
- EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
- state.updateState(CCSchedulerStateMachine::ACTION_DRAW);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
+ state.updateState(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE);
+ state.didDrawIfPossibleCompleted(true);
EXPECT_FALSE(state.vsyncCallbackNeeded());
}
@@ -156,31 +357,13 @@ TEST(CCSchedulerStateMachineTest, TestNextActionDrawsOnVSync)
} else
state.setVisible(true);
- // Case 1: needsCommit=false updateMoreResourcesPending=false.
- state.setNeedsCommit(false);
- state.setUpdateMoreResourcesPending(false);
- EXPECT_FALSE(state.vsyncCallbackNeeded());
- EXPECT_NE(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
-
- // Case 2: needsCommit=false updateMoreResourcesPending=true.
+ // Case 1: needsCommit=false
state.setNeedsCommit(false);
- state.setUpdateMoreResourcesPending(true);
- if (visible)
- EXPECT_TRUE(state.vsyncCallbackNeeded());
- EXPECT_NE(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
+ EXPECT_NE(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
- // Case 3: needsCommit=true updateMoreResourcesPending=false.
+ // Case 2: needsCommit=true
state.setNeedsCommit(true);
- state.setUpdateMoreResourcesPending(false);
- EXPECT_FALSE(state.vsyncCallbackNeeded());
- EXPECT_NE(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
-
- // Case 4: needsCommit=true updateMoreResourcesPending=true.
- state.setNeedsCommit(true);
- state.setUpdateMoreResourcesPending(true);
- if (visible)
- EXPECT_TRUE(state.vsyncCallbackNeeded());
- EXPECT_NE(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
+ EXPECT_NE(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
}
}
@@ -189,7 +372,8 @@ TEST(CCSchedulerStateMachineTest, TestNextActionDrawsOnVSync)
for (unsigned j = 0; j < 2; ++j) {
StateMachine state;
state.setCommitState(allCommitStates[i]);
- if (!j) {
+ bool forcedDraw = j;
+ if (!forcedDraw) {
state.didEnterVSync();
state.setNeedsRedraw(true);
state.setVisible(true);
@@ -198,7 +382,7 @@ TEST(CCSchedulerStateMachineTest, TestNextActionDrawsOnVSync)
CCSchedulerStateMachine::Action expectedAction;
if (allCommitStates[i] != CCSchedulerStateMachine::COMMIT_STATE_READY_TO_COMMIT)
- expectedAction = CCSchedulerStateMachine::ACTION_DRAW;
+ expectedAction = forcedDraw ? CCSchedulerStateMachine::ACTION_DRAW_FORCED : CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE;
else
expectedAction = CCSchedulerStateMachine::ACTION_COMMIT;
@@ -246,22 +430,22 @@ TEST(CCSchedulerStateMachineTest, TestNoCommitStatesRedrawWhenInvisible)
// Case 1: needsCommit=false updateMoreResourcesPending=false.
state.setNeedsCommit(false);
state.setUpdateMoreResourcesPending(false);
- EXPECT_NE(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
+ EXPECT_NE(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
// Case 2: needsCommit=false updateMoreResourcesPending=true.
state.setNeedsCommit(false);
state.setUpdateMoreResourcesPending(true);
- EXPECT_NE(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
+ EXPECT_NE(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
// Case 3: needsCommit=true updateMoreResourcesPending=false.
state.setNeedsCommit(true);
state.setUpdateMoreResourcesPending(false);
- EXPECT_NE(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
+ EXPECT_NE(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
// Case 4: needsCommit=true updateMoreResourcesPending=true.
state.setNeedsCommit(true);
state.setUpdateMoreResourcesPending(true);
- EXPECT_NE(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
+ EXPECT_NE(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
}
}
}
@@ -281,7 +465,7 @@ TEST(CCSchedulerStateMachineTest, TestCanRedraw_StopsDraw)
state.didEnterVSync();
state.setCanDraw(false);
- EXPECT_NE(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
+ EXPECT_NE(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
}
}
}
@@ -290,6 +474,7 @@ TEST(CCSchedulerStateMachineTest, TestCanRedrawWithWaitingForFirstDrawMakesProgr
{
StateMachine state;
state.setCommitState(CCSchedulerStateMachine::COMMIT_STATE_WAITING_FOR_FIRST_DRAW);
+ state.setCanBeginFrame(true);
state.setNeedsCommit(true);
state.setNeedsRedraw(true);
state.setUpdateMoreResourcesPending(false);
@@ -368,6 +553,20 @@ TEST(CCSchedulerStateMachineTest, TestUpdates_NoRedraw_TwoRoundsOfUpdates)
EXPECT_EQ(CCSchedulerStateMachine::ACTION_COMMIT, state.nextAction());
}
+
+TEST(CCSchedulerStateMachineTest, TestVSyncNeededWhenUpdatesPendingButInvisible)
+{
+ StateMachine state;
+ state.setCommitState(CCSchedulerStateMachine::COMMIT_STATE_UPDATING_RESOURCES);
+ state.setNeedsRedraw(false);
+ state.setVisible(false);
+ state.setUpdateMoreResourcesPending(true);
+ EXPECT_TRUE(state.vsyncCallbackNeeded());
+
+ state.setUpdateMoreResourcesPending(false);
+ EXPECT_TRUE(state.vsyncCallbackNeeded());
+}
+
TEST(CCSchedulerStateMachineTest, TestUpdates_WithRedraw_OneRoundOfUpdates)
{
StateMachine state;
@@ -382,8 +581,9 @@ TEST(CCSchedulerStateMachineTest, TestUpdates_WithRedraw_OneRoundOfUpdates)
// Ensure we draw on the next vsync even though an update is in-progress.
state.didEnterVSync();
- EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
- state.updateState(CCSchedulerStateMachine::ACTION_DRAW);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
+ state.updateState(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE);
+ state.didDrawIfPossibleCompleted(true);
// Ensure that we once we have drawn, we dont do anything else.
EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
@@ -418,6 +618,7 @@ TEST(CCSchedulerStateMachineTest, TestUpdates_WithRedraw_OneRoundOfUpdates)
TEST(CCSchedulerStateMachineTest, TestSetNeedsCommitIsNotLost)
{
StateMachine state;
+ state.setCanBeginFrame(true);
state.setNeedsCommit(true);
state.setVisible(true);
@@ -447,9 +648,10 @@ TEST(CCSchedulerStateMachineTest, TestSetNeedsCommitIsNotLost)
// Commit and make sure we draw on next vsync
state.updateState(CCSchedulerStateMachine::ACTION_COMMIT);
- EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
EXPECT_EQ(CCSchedulerStateMachine::COMMIT_STATE_WAITING_FOR_FIRST_DRAW, state.commitState());
- state.updateState(CCSchedulerStateMachine::ACTION_DRAW);
+ state.updateState(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE);
+ state.didDrawIfPossibleCompleted(true);
// Verify that another commit will begin.
state.didLeaveVSync();
@@ -459,6 +661,7 @@ TEST(CCSchedulerStateMachineTest, TestSetNeedsCommitIsNotLost)
TEST(CCSchedulerStateMachineTest, TestFullCycle)
{
StateMachine state;
+ state.setCanBeginFrame(true);
state.setVisible(true);
// Start clean and set commit.
@@ -492,8 +695,9 @@ TEST(CCSchedulerStateMachineTest, TestFullCycle)
// At vsync, draw.
state.didEnterVSync();
- EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
- state.updateState(CCSchedulerStateMachine::ACTION_DRAW);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
+ state.updateState(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE);
+ state.didDrawIfPossibleCompleted(true);
state.didLeaveVSync();
// Should be synchronized, no draw needed, no action needed.
@@ -505,6 +709,7 @@ TEST(CCSchedulerStateMachineTest, TestFullCycle)
TEST(CCSchedulerStateMachineTest, TestFullCycleWithCommitRequestInbetween)
{
StateMachine state;
+ state.setCanBeginFrame(true);
state.setVisible(true);
// Start clean and set commit.
@@ -542,8 +747,9 @@ TEST(CCSchedulerStateMachineTest, TestFullCycleWithCommitRequestInbetween)
// At vsync, draw.
state.didEnterVSync();
- EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
- state.updateState(CCSchedulerStateMachine::ACTION_DRAW);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
+ state.updateState(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE);
+ state.didDrawIfPossibleCompleted(true);
state.didLeaveVSync();
// Should be synchronized, no draw needed, no action needed.
@@ -562,6 +768,7 @@ TEST(CCSchedulerStateMachineTest, TestRequestCommitInvisible)
TEST(CCSchedulerStateMachineTest, TestGoesInvisibleMidCommit)
{
StateMachine state;
+ state.setCanBeginFrame(true);
state.setVisible(true);
// Start clean and set commit.
@@ -607,6 +814,7 @@ TEST(CCSchedulerStateMachineTest, TestGoesInvisibleMidCommit)
TEST(CCSchedulerStateMachineTest, TestContextLostWhenCompletelyIdle)
{
StateMachine state;
+ state.setCanBeginFrame(true);
state.setVisible(true);
state.didLoseContext();
@@ -628,6 +836,7 @@ TEST(CCSchedulerStateMachineTest, TestContextLostWhenCompletelyIdle)
TEST(CCSchedulerStateMachineTest, TestContextLostWhenIdleAndCommitRequestedWhileRecreating)
{
StateMachine state;
+ state.setCanBeginFrame(true);
state.setVisible(true);
state.didLoseContext();
@@ -653,7 +862,7 @@ TEST(CCSchedulerStateMachineTest, TestContextLostWhenIdleAndCommitRequestedWhile
// setCanDraw.
state.setNeedsRedraw(true);
state.didEnterVSync();
- EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
state.setCanDraw(false);
EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
state.setCanDraw(true);
@@ -663,6 +872,7 @@ TEST(CCSchedulerStateMachineTest, TestContextLostWhenIdleAndCommitRequestedWhile
TEST(CCSchedulerStateMachineTest, TestContextLostWhileCommitInProgress)
{
StateMachine state;
+ state.setCanBeginFrame(true);
state.setVisible(true);
// Get a commit in flight.
@@ -673,7 +883,7 @@ TEST(CCSchedulerStateMachineTest, TestContextLostWhileCommitInProgress)
// Set damage and expect a draw.
state.setNeedsRedraw(true);
state.didEnterVSync();
- EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
state.updateState(state.nextAction());
state.didLeaveVSync();
@@ -703,6 +913,7 @@ TEST(CCSchedulerStateMachineTest, TestContextLostWhileCommitInProgress)
TEST(CCSchedulerStateMachineTest, TestContextLostWhileCommitInProgressAndAnotherCommitRequested)
{
StateMachine state;
+ state.setCanBeginFrame(true);
state.setVisible(true);
// Get a commit in flight.
@@ -713,7 +924,7 @@ TEST(CCSchedulerStateMachineTest, TestContextLostWhileCommitInProgressAndAnother
// Set damage and expect a draw.
state.setNeedsRedraw(true);
state.didEnterVSync();
- EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
state.updateState(state.nextAction());
state.didLeaveVSync();
@@ -739,7 +950,7 @@ TEST(CCSchedulerStateMachineTest, TestContextLostWhileCommitInProgressAndAnother
EXPECT_EQ(CCSchedulerStateMachine::COMMIT_STATE_WAITING_FOR_FIRST_DRAW, state.commitState());
- EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.nextAction());
state.updateState(state.nextAction());
// Expect to be told to begin context recreation, independent of vsync state
@@ -761,7 +972,7 @@ TEST(CCSchedulerStateMachineTest, TestFinishAllRenderingWhileContextLost)
// Ask a forced redraw and verify it ocurrs.
state.setNeedsForcedRedraw(true);
state.didEnterVSync();
- EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_FORCED, state.nextAction());
state.didLeaveVSync();
// Clear the forced redraw bit.
@@ -774,8 +985,60 @@ TEST(CCSchedulerStateMachineTest, TestFinishAllRenderingWhileContextLost)
// Ask a forced redraw and verify it ocurrs.
state.setNeedsForcedRedraw(true);
state.didEnterVSync();
- EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW, state.nextAction());
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_DRAW_FORCED, state.nextAction());
state.didLeaveVSync();
}
+TEST(CCSchedulerStateMachineTest, TestBeginFrameWhenInvisibleAndForceCommit)
+{
+ StateMachine state;
+ state.setCanBeginFrame(true);
+ state.setVisible(false);
+ state.setNeedsCommit(true);
+ state.setNeedsForcedCommit(true);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction());
+}
+
+TEST(CCSchedulerStateMachineTest, TestBeginFrameWhenCanBeginFrameFalseAndForceCommit)
+{
+ StateMachine state;
+ state.setVisible(true);
+ state.setNeedsCommit(true);
+ state.setNeedsForcedCommit(true);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction());
+}
+
+TEST(CCSchedulerStateMachineTest, TestBeginFrameWhenCommitInProgress)
+{
+ StateMachine state;
+ state.setCanBeginFrame(true);
+ state.setVisible(false);
+ state.setCommitState(CCSchedulerStateMachine::COMMIT_STATE_FRAME_IN_PROGRESS);
+ state.setNeedsCommit(true);
+ state.setNeedsForcedCommit(true);
+
+ state.beginFrameComplete();
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_UPDATE_MORE_RESOURCES, state.nextAction());
+ state.updateState(state.nextAction());
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
+ state.beginUpdateMoreResourcesComplete(false);
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_COMMIT, state.nextAction());
+ state.updateState(state.nextAction());
+
+ EXPECT_EQ(CCSchedulerStateMachine::COMMIT_STATE_IDLE, state.commitState());
+
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction());
+}
+
+TEST(CCSchedulerStateMachineTest, TestBeginFrameWhenContextLost)
+{
+ StateMachine state;
+ state.setCanBeginFrame(true);
+ state.setVisible(true);
+ state.setNeedsCommit(true);
+ state.setNeedsForcedCommit(true);
+ state.didLoseContext();
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction());
+}
+
}
diff --git a/Source/WebKit/chromium/tests/CCSchedulerTest.cpp b/Source/WebKit/chromium/tests/CCSchedulerTest.cpp
index 45f61b90b..41250884b 100644
--- a/Source/WebKit/chromium/tests/CCSchedulerTest.cpp
+++ b/Source/WebKit/chromium/tests/CCSchedulerTest.cpp
@@ -45,25 +45,56 @@ public:
m_actions.clear();
m_hasMoreResourceUpdates = false;
m_canDraw = true;
+ m_drawWillHappen = true;
+ m_swapWillHappenIfDrawHappens = true;
+ m_numDraws = 0;
}
void setHasMoreResourceUpdates(bool b) { m_hasMoreResourceUpdates = b; }
void setCanDraw(bool b) { m_canDraw = b; }
+ int numDraws() const { return m_numDraws; }
int numActions() const { return static_cast<int>(m_actions.size()); }
const char* action(int i) const { return m_actions[i]; }
- virtual bool canDraw() { return m_canDraw; }
- virtual bool hasMoreResourceUpdates() const { return m_hasMoreResourceUpdates; }
- virtual void scheduledActionBeginFrame() { m_actions.push_back("scheduledActionBeginFrame"); }
- virtual void scheduledActionDrawAndSwap() { m_actions.push_back("scheduledActionDrawAndSwap"); }
- virtual void scheduledActionUpdateMoreResources() { m_actions.push_back("scheduledActionUpdateMoreResources"); }
- virtual void scheduledActionCommit() { m_actions.push_back("scheduledActionCommit"); }
- virtual void scheduledActionBeginContextRecreation() { m_actions.push_back("scheduledActionBeginContextRecreation"); }
+ bool hasAction(const char* action) const
+ {
+ for (size_t i = 0; i < m_actions.size(); i++)
+ if (!strcmp(m_actions[i], action))
+ return true;
+ return false;
+ }
+
+ virtual bool canDraw() OVERRIDE { return m_canDraw; }
+ virtual bool hasMoreResourceUpdates() const OVERRIDE { return m_hasMoreResourceUpdates; }
+ virtual void scheduledActionBeginFrame() OVERRIDE { m_actions.push_back("scheduledActionBeginFrame"); }
+ virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossible() OVERRIDE
+ {
+ m_actions.push_back("scheduledActionDrawAndSwapIfPossible");
+ m_numDraws++;
+ return CCScheduledActionDrawAndSwapResult(m_drawWillHappen, m_drawWillHappen && m_swapWillHappenIfDrawHappens);
+ }
+
+ virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced() OVERRIDE
+ {
+ m_actions.push_back("scheduledActionDrawAndSwapForced");
+ return CCScheduledActionDrawAndSwapResult(true, m_swapWillHappenIfDrawHappens);
+ }
+
+ virtual void scheduledActionUpdateMoreResources() OVERRIDE { m_actions.push_back("scheduledActionUpdateMoreResources"); }
+ virtual void scheduledActionCommit() OVERRIDE { m_actions.push_back("scheduledActionCommit"); }
+ virtual void scheduledActionBeginContextRecreation() OVERRIDE { m_actions.push_back("scheduledActionBeginContextRecreation"); }
+ virtual void scheduledActionAcquireLayerTexturesForMainThread() OVERRIDE { m_actions.push_back("scheduledActionAcquireLayerTexturesForMainThread"); }
+
+ void setDrawWillHappen(bool drawWillHappen) { m_drawWillHappen = drawWillHappen; }
+ void setSwapWillHappenIfDrawHappens(bool swapWillHappenIfDrawHappens) { m_swapWillHappenIfDrawHappens = swapWillHappenIfDrawHappens; }
protected:
bool m_hasMoreResourceUpdates;
bool m_canDraw;
+ bool m_drawWillHappen;
+ bool m_swapWillHappenIfDrawHappens;
+ int m_numDraws;
std::vector<const char*> m_actions;
};
@@ -72,6 +103,7 @@ TEST(CCSchedulerTest, RequestCommit)
FakeCCSchedulerClient client;
RefPtr<FakeCCTimeSource> timeSource = adoptRef(new FakeCCTimeSource());
OwnPtr<CCScheduler> scheduler = CCScheduler::create(&client, adoptPtr(new CCFrameRateController(timeSource)));
+ scheduler->setCanBeginFrame(true);
scheduler->setVisible(true);
// SetNeedsCommit should begin the frame.
@@ -94,7 +126,7 @@ TEST(CCSchedulerTest, RequestCommit)
// Tick should draw.
timeSource->tick();
EXPECT_EQ(1, client.numActions());
- EXPECT_STREQ("scheduledActionDrawAndSwap", client.action(0));
+ EXPECT_STREQ("scheduledActionDrawAndSwapIfPossible", client.action(0));
EXPECT_FALSE(timeSource->active());
client.reset();
@@ -107,6 +139,7 @@ TEST(CCSchedulerTest, RequestCommitAfterBeginFrame)
FakeCCSchedulerClient client;
RefPtr<FakeCCTimeSource> timeSource = adoptRef(new FakeCCTimeSource());
OwnPtr<CCScheduler> scheduler = CCScheduler::create(&client, adoptPtr(new CCFrameRateController(timeSource)));
+ scheduler->setCanBeginFrame(true);
scheduler->setVisible(true);
// SetNedsCommit should begin the frame.
@@ -131,38 +164,104 @@ TEST(CCSchedulerTest, RequestCommitAfterBeginFrame)
timeSource->tick();
EXPECT_FALSE(timeSource->active());
EXPECT_EQ(2, client.numActions());
- EXPECT_STREQ("scheduledActionDrawAndSwap", client.action(0));
+ EXPECT_STREQ("scheduledActionDrawAndSwapIfPossible", client.action(0));
EXPECT_STREQ("scheduledActionBeginFrame", client.action(1));
client.reset();
}
-class SchedulerClientThatSetNeedsDrawInsideDraw : public CCSchedulerClient {
+TEST(CCSchedulerTest, TextureAcquisitionCollision)
+{
+ FakeCCSchedulerClient client;
+ RefPtr<FakeCCTimeSource> timeSource = adoptRef(new FakeCCTimeSource());
+ OwnPtr<CCScheduler> scheduler = CCScheduler::create(&client, adoptPtr(new CCFrameRateController(timeSource)));
+ scheduler->setCanBeginFrame(true);
+ scheduler->setVisible(true);
+
+ scheduler->setNeedsCommit();
+ scheduler->setMainThreadNeedsLayerTextures();
+ EXPECT_EQ(2, client.numActions());
+ EXPECT_STREQ("scheduledActionBeginFrame", client.action(0));
+ EXPECT_STREQ("scheduledActionAcquireLayerTexturesForMainThread", client.action(1));
+ client.reset();
+
+ // Compositor not scheduled to draw because textures are locked by main thread
+ EXPECT_FALSE(timeSource->active());
+
+ // Trigger the commit
+ scheduler->beginFrameComplete();
+ EXPECT_TRUE(timeSource->active());
+ client.reset();
+
+ // Between commit and draw, texture acquisition for main thread delayed,
+ // and main thread blocks.
+ scheduler->setMainThreadNeedsLayerTextures();
+ EXPECT_EQ(0, client.numActions());
+ client.reset();
+
+ // Once compositor draw complete, the delayed texture acquisition fires.
+ timeSource->tick();
+ EXPECT_EQ(3, client.numActions());
+ EXPECT_STREQ("scheduledActionDrawAndSwapIfPossible", client.action(0));
+ EXPECT_STREQ("scheduledActionAcquireLayerTexturesForMainThread", client.action(1));
+ EXPECT_STREQ("scheduledActionBeginFrame", client.action(2));
+ client.reset();
+}
+
+TEST(CCSchedulerTest, VisibilitySwitchWithTextureAcquisition)
+{
+ FakeCCSchedulerClient client;
+ RefPtr<FakeCCTimeSource> timeSource = adoptRef(new FakeCCTimeSource());
+ OwnPtr<CCScheduler> scheduler = CCScheduler::create(&client, adoptPtr(new CCFrameRateController(timeSource)));
+ scheduler->setCanBeginFrame(true);
+ scheduler->setVisible(true);
+
+ scheduler->setNeedsCommit();
+ scheduler->beginFrameComplete();
+ scheduler->setMainThreadNeedsLayerTextures();
+ client.reset();
+ // Verify that pending texture acquisition fires when visibility
+ // is lost in order to avoid a deadlock.
+ scheduler->setVisible(false);
+ EXPECT_EQ(1, client.numActions());
+ EXPECT_STREQ("scheduledActionAcquireLayerTexturesForMainThread", client.action(0));
+ client.reset();
+
+ // Regaining visibility with textures acquired by main thread while
+ // compositor is waiting for first draw should result in a request
+ // for a new frame in order to escape a deadlock.
+ scheduler->setVisible(true);
+ EXPECT_EQ(1, client.numActions());
+ EXPECT_STREQ("scheduledActionBeginFrame", client.action(0));
+ client.reset();
+}
+
+class SchedulerClientThatSetNeedsDrawInsideDraw : public FakeCCSchedulerClient {
public:
SchedulerClientThatSetNeedsDrawInsideDraw()
- : m_numDraws(0)
- , m_scheduler(0) { }
+ : m_scheduler(0) { }
void setScheduler(CCScheduler* scheduler) { m_scheduler = scheduler; }
- int numDraws() const { return m_numDraws; }
-
- virtual bool hasMoreResourceUpdates() const { return false; }
- virtual bool canDraw() { return true; }
- virtual void scheduledActionBeginFrame() { }
- virtual void scheduledActionDrawAndSwap()
+ virtual void scheduledActionBeginFrame() OVERRIDE { }
+ virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossible() OVERRIDE
{
// Only setNeedsRedraw the first time this is called
if (!m_numDraws)
m_scheduler->setNeedsRedraw();
- m_numDraws++;
+ return FakeCCSchedulerClient::scheduledActionDrawAndSwapIfPossible();
}
- virtual void scheduledActionUpdateMoreResources() { }
- virtual void scheduledActionCommit() { }
- virtual void scheduledActionBeginContextRecreation() { }
+ virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced() OVERRIDE
+ {
+ ASSERT_NOT_REACHED();
+ return CCScheduledActionDrawAndSwapResult(true, true);
+ }
+
+ virtual void scheduledActionUpdateMoreResources() OVERRIDE { }
+ virtual void scheduledActionCommit() OVERRIDE { }
+ virtual void scheduledActionBeginContextRecreation() OVERRIDE { }
protected:
- int m_numDraws;
CCScheduler* m_scheduler;
};
@@ -176,6 +275,7 @@ TEST(CCSchedulerTest, RequestRedrawInsideDraw)
RefPtr<FakeCCTimeSource> timeSource = adoptRef(new FakeCCTimeSource());
OwnPtr<CCScheduler> scheduler = CCScheduler::create(&client, adoptPtr(new CCFrameRateController(timeSource)));
client.setScheduler(scheduler.get());
+ scheduler->setCanBeginFrame(true);
scheduler->setVisible(true);
scheduler->setNeedsRedraw();
@@ -194,33 +294,74 @@ TEST(CCSchedulerTest, RequestRedrawInsideDraw)
EXPECT_FALSE(timeSource->active());
}
-class SchedulerClientThatSetNeedsCommitInsideDraw : public CCSchedulerClient {
+// Test that requesting redraw inside a failed draw doesn't lose the request.
+TEST(CCSchedulerTest, RequestRedrawInsideFailedDraw)
+{
+ SchedulerClientThatSetNeedsDrawInsideDraw client;
+ RefPtr<FakeCCTimeSource> timeSource = adoptRef(new FakeCCTimeSource());
+ OwnPtr<CCScheduler> scheduler = CCScheduler::create(&client, adoptPtr(new CCFrameRateController(timeSource)));
+ client.setScheduler(scheduler.get());
+ scheduler->setCanBeginFrame(true);
+ scheduler->setVisible(true);
+ client.setDrawWillHappen(false);
+
+ scheduler->setNeedsRedraw();
+ EXPECT_TRUE(scheduler->redrawPending());
+ EXPECT_TRUE(timeSource->active());
+ EXPECT_EQ(0, client.numDraws());
+
+ // Fail the draw.
+ timeSource->tick();
+ EXPECT_EQ(1, client.numDraws());
+
+ // We have a commit pending and the draw failed, and we didn't lose the redraw request.
+ EXPECT_TRUE(scheduler->commitPending());
+ EXPECT_TRUE(scheduler->redrawPending());
+ EXPECT_TRUE(timeSource->active());
+
+ // Fail the draw again.
+ timeSource->tick();
+ EXPECT_EQ(2, client.numDraws());
+ EXPECT_TRUE(scheduler->commitPending());
+ EXPECT_TRUE(scheduler->redrawPending());
+ EXPECT_TRUE(timeSource->active());
+
+ // Draw successfully.
+ client.setDrawWillHappen(true);
+ timeSource->tick();
+ EXPECT_EQ(3, client.numDraws());
+ EXPECT_TRUE(scheduler->commitPending());
+ EXPECT_FALSE(scheduler->redrawPending());
+ EXPECT_FALSE(timeSource->active());
+}
+
+class SchedulerClientThatSetNeedsCommitInsideDraw : public FakeCCSchedulerClient {
public:
SchedulerClientThatSetNeedsCommitInsideDraw()
- : m_numDraws(0)
- , m_scheduler(0) { }
+ : m_scheduler(0) { }
void setScheduler(CCScheduler* scheduler) { m_scheduler = scheduler; }
- int numDraws() const { return m_numDraws; }
-
- virtual bool hasMoreResourceUpdates() const { return false; }
- virtual bool canDraw() { return true; }
- virtual void scheduledActionBeginFrame() { }
- virtual void scheduledActionDrawAndSwap()
+ virtual void scheduledActionBeginFrame() OVERRIDE { }
+ virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossible() OVERRIDE
{
// Only setNeedsCommit the first time this is called
if (!m_numDraws)
m_scheduler->setNeedsCommit();
- m_numDraws++;
+ return FakeCCSchedulerClient::scheduledActionDrawAndSwapIfPossible();
+ }
+
+ virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced() OVERRIDE
+ {
+ ASSERT_NOT_REACHED();
+ return CCScheduledActionDrawAndSwapResult(true, true);
}
- virtual void scheduledActionUpdateMoreResources() { }
- virtual void scheduledActionCommit() { }
- virtual void scheduledActionBeginContextRecreation() { }
+ virtual void scheduledActionUpdateMoreResources() OVERRIDE { }
+ virtual void scheduledActionCommit() OVERRIDE { }
+ virtual void scheduledActionBeginContextRecreation() OVERRIDE { }
protected:
- int m_numDraws;
CCScheduler* m_scheduler;
};
@@ -232,6 +373,7 @@ TEST(CCSchedulerTest, RequestCommitInsideDraw)
RefPtr<FakeCCTimeSource> timeSource = adoptRef(new FakeCCTimeSource());
OwnPtr<CCScheduler> scheduler = CCScheduler::create(&client, adoptPtr(new CCFrameRateController(timeSource)));
client.setScheduler(scheduler.get());
+ scheduler->setCanBeginFrame(true);
scheduler->setVisible(true);
scheduler->setNeedsRedraw();
@@ -251,4 +393,104 @@ TEST(CCSchedulerTest, RequestCommitInsideDraw)
EXPECT_FALSE(scheduler->redrawPending());
}
+// Tests that when a draw fails then the pending commit should not be dropped.
+TEST(CCSchedulerTest, RequestCommitInsideFailedDraw)
+{
+ SchedulerClientThatSetNeedsDrawInsideDraw client;
+ RefPtr<FakeCCTimeSource> timeSource = adoptRef(new FakeCCTimeSource());
+ OwnPtr<CCScheduler> scheduler = CCScheduler::create(&client, adoptPtr(new CCFrameRateController(timeSource)));
+ client.setScheduler(scheduler.get());
+ scheduler->setCanBeginFrame(true);
+ scheduler->setVisible(true);
+ client.setDrawWillHappen(false);
+
+ scheduler->setNeedsRedraw();
+ EXPECT_TRUE(scheduler->redrawPending());
+ EXPECT_TRUE(timeSource->active());
+ EXPECT_EQ(0, client.numDraws());
+
+ // Fail the draw.
+ timeSource->tick();
+ EXPECT_EQ(1, client.numDraws());
+
+ // We have a commit pending and the draw failed, and we didn't lose the commit request.
+ EXPECT_TRUE(scheduler->commitPending());
+ EXPECT_TRUE(scheduler->redrawPending());
+ EXPECT_TRUE(timeSource->active());
+
+ // Fail the draw again.
+ timeSource->tick();
+ EXPECT_EQ(2, client.numDraws());
+ EXPECT_TRUE(scheduler->commitPending());
+ EXPECT_TRUE(scheduler->redrawPending());
+ EXPECT_TRUE(timeSource->active());
+
+ // Draw successfully.
+ client.setDrawWillHappen(true);
+ timeSource->tick();
+ EXPECT_EQ(3, client.numDraws());
+ EXPECT_TRUE(scheduler->commitPending());
+ EXPECT_FALSE(scheduler->redrawPending());
+ EXPECT_FALSE(timeSource->active());
+}
+
+TEST(CCSchedulerTest, NoBeginFrameWhenDrawFails)
+{
+ RefPtr<FakeCCTimeSource> timeSource = adoptRef(new FakeCCTimeSource());
+ SchedulerClientThatSetNeedsCommitInsideDraw client;
+ OwnPtr<FakeCCFrameRateController> controller = adoptPtr(new FakeCCFrameRateController(timeSource));
+ FakeCCFrameRateController* controllerPtr = controller.get();
+ OwnPtr<CCScheduler> scheduler = CCScheduler::create(&client, controller.release());
+ client.setScheduler(scheduler.get());
+ scheduler->setCanBeginFrame(true);
+ scheduler->setVisible(true);
+
+ EXPECT_EQ(0, controllerPtr->numFramesPending());
+
+ scheduler->setNeedsRedraw();
+ EXPECT_TRUE(scheduler->redrawPending());
+ EXPECT_TRUE(timeSource->active());
+ EXPECT_EQ(0, client.numDraws());
+
+ // Draw successfully, this starts a new frame.
+ timeSource->tick();
+ EXPECT_EQ(1, client.numDraws());
+ EXPECT_EQ(1, controllerPtr->numFramesPending());
+ scheduler->didSwapBuffersComplete();
+ EXPECT_EQ(0, controllerPtr->numFramesPending());
+
+ scheduler->setNeedsRedraw();
+ EXPECT_TRUE(scheduler->redrawPending());
+ EXPECT_TRUE(timeSource->active());
+
+ // Fail to draw, this should not start a frame.
+ client.setDrawWillHappen(false);
+ timeSource->tick();
+ EXPECT_EQ(2, client.numDraws());
+ EXPECT_EQ(0, controllerPtr->numFramesPending());
+}
+
+TEST(CCSchedulerTest, NoBeginFrameWhenSwapFailsDuringForcedCommit)
+{
+ RefPtr<FakeCCTimeSource> timeSource = adoptRef(new FakeCCTimeSource());
+ FakeCCSchedulerClient client;
+ OwnPtr<FakeCCFrameRateController> controller = adoptPtr(new FakeCCFrameRateController(timeSource));
+ FakeCCFrameRateController* controllerPtr = controller.get();
+ OwnPtr<CCScheduler> scheduler = CCScheduler::create(&client, controller.release());
+
+ EXPECT_EQ(0, controllerPtr->numFramesPending());
+
+ // Tell the client that it will fail to swap.
+ client.setDrawWillHappen(true);
+ client.setSwapWillHappenIfDrawHappens(false);
+
+ // Get the compositor to do a scheduledActionDrawAndSwapForced.
+ scheduler->setNeedsRedraw();
+ scheduler->setNeedsForcedRedraw();
+ EXPECT_TRUE(client.hasAction("scheduledActionDrawAndSwapForced"));
+
+ // We should not have told the frame rate controller that we began a frame.
+ EXPECT_EQ(0, controllerPtr->numFramesPending());
+}
+
}
diff --git a/Source/WebKit/chromium/tests/CCSchedulerTestCommon.h b/Source/WebKit/chromium/tests/CCSchedulerTestCommon.h
index 9b5e0383e..6257ec888 100644
--- a/Source/WebKit/chromium/tests/CCSchedulerTestCommon.h
+++ b/Source/WebKit/chromium/tests/CCSchedulerTestCommon.h
@@ -26,6 +26,7 @@
#define CCSchedulerTestCommon_h
#include "cc/CCDelayBasedTimeSource.h"
+#include "cc/CCFrameRateController.h"
#include "cc/CCThread.h"
#include <gtest/gtest.h>
#include <wtf/OwnPtr.h>
@@ -38,7 +39,7 @@ public:
void reset() { m_tickCalled = false; }
bool tickCalled() const { return m_tickCalled; }
- virtual void onTimerTick() { m_tickCalled = true; }
+ virtual void onTimerTick() OVERRIDE { m_tickCalled = true; }
protected:
bool m_tickCalled;
@@ -61,7 +62,7 @@ public:
task->performTask();
}
- long long pendingDelay() const
+ long long pendingDelayMs() const
{
EXPECT_TRUE(hasPendingTask());
return m_pendingTaskDelay;
@@ -89,9 +90,9 @@ public:
virtual ~FakeCCTimeSource() { }
- virtual void setClient(WebCore::CCTimeSourceClient* client) { m_client = client; }
- virtual void setActive(bool b) { m_active = b; }
- virtual bool active() const { return m_active; }
+ virtual void setClient(WebCore::CCTimeSourceClient* client) OVERRIDE { m_client = client; }
+ virtual void setActive(bool b) OVERRIDE { m_active = b; }
+ virtual bool active() const OVERRIDE { return m_active; }
void tick()
{
@@ -107,20 +108,27 @@ protected:
class FakeCCDelayBasedTimeSource : public WebCore::CCDelayBasedTimeSource {
public:
- static PassRefPtr<FakeCCDelayBasedTimeSource> create(double intervalMs, WebCore::CCThread* thread)
+ static PassRefPtr<FakeCCDelayBasedTimeSource> create(double interval, WebCore::CCThread* thread)
{
- return adoptRef(new FakeCCDelayBasedTimeSource(intervalMs, thread));
+ return adoptRef(new FakeCCDelayBasedTimeSource(interval, thread));
}
- void setMonotonicallyIncreasingTimeMs(double time) { m_monotonicallyIncreasingTimeMs = time; }
- virtual double monotonicallyIncreasingTimeMs() const { return m_monotonicallyIncreasingTimeMs; }
+ void setMonotonicallyIncreasingTime(double time) { m_monotonicallyIncreasingTime = time; }
+ virtual double monotonicallyIncreasingTime() const { return m_monotonicallyIncreasingTime; }
protected:
- FakeCCDelayBasedTimeSource(double intervalMs, WebCore::CCThread* thread)
- : CCDelayBasedTimeSource(intervalMs, thread)
- , m_monotonicallyIncreasingTimeMs(0) { }
+ FakeCCDelayBasedTimeSource(double interval, WebCore::CCThread* thread)
+ : CCDelayBasedTimeSource(interval, thread)
+ , m_monotonicallyIncreasingTime(0) { }
- double m_monotonicallyIncreasingTimeMs;
+ double m_monotonicallyIncreasingTime;
+};
+
+class FakeCCFrameRateController : public WebCore::CCFrameRateController {
+public:
+ FakeCCFrameRateController(PassRefPtr<WebCore::CCTimeSource> timer) : WebCore::CCFrameRateController(timer) { }
+
+ int numFramesPending() const { return m_numFramesPending; }
};
}
diff --git a/Source/WebKit/chromium/tests/CCSolidColorLayerImplTest.cpp b/Source/WebKit/chromium/tests/CCSolidColorLayerImplTest.cpp
index 02dc908ab..6b7124975 100644
--- a/Source/WebKit/chromium/tests/CCSolidColorLayerImplTest.cpp
+++ b/Source/WebKit/chromium/tests/CCSolidColorLayerImplTest.cpp
@@ -27,6 +27,7 @@
#include "cc/CCSolidColorLayerImpl.h"
#include "CCLayerTestCommon.h"
+#include "MockCCQuadCuller.h"
#include "cc/CCSingleThreadProxy.h"
#include "cc/CCSolidColorDrawQuad.h"
@@ -42,7 +43,7 @@ TEST(CCSolidColorLayerImplTest, verifyTilingCompleteAndNoOverlap)
{
DebugScopedSetImplThread scopedImplThread;
- CCQuadList quadList;
+ MockCCQuadCuller quadCuller;
IntSize layerSize = IntSize(800, 600);
IntRect visibleLayerRect = IntRect(IntPoint(), layerSize);
@@ -51,9 +52,10 @@ TEST(CCSolidColorLayerImplTest, verifyTilingCompleteAndNoOverlap)
layer->setBounds(layerSize);
OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
- layer->appendQuads(quadList, sharedQuadState.get());
+ bool hadMissingTiles = false;
+ layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
- verifyQuadsExactlyCoverRect(quadList, visibleLayerRect);
+ verifyQuadsExactlyCoverRect(quadCuller.quadList(), visibleLayerRect);
}
TEST(CCSolidColorLayerImplTest, verifyCorrectBackgroundColorInQuad)
@@ -62,7 +64,7 @@ TEST(CCSolidColorLayerImplTest, verifyCorrectBackgroundColorInQuad)
const Color testColor = 0xFFA55AFF;
- CCQuadList quadList;
+ MockCCQuadCuller quadCuller;
IntSize layerSize = IntSize(100, 100);
IntRect visibleLayerRect = IntRect(IntPoint(), layerSize);
@@ -72,10 +74,34 @@ TEST(CCSolidColorLayerImplTest, verifyCorrectBackgroundColorInQuad)
layer->setBackgroundColor(testColor);
OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
- layer->appendQuads(quadList, sharedQuadState.get());
+ bool hadMissingTiles = false;
+ layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
- ASSERT_EQ(quadList.size(), 1U);
- EXPECT_EQ(quadList[0]->toSolidColorDrawQuad()->color(), testColor);
+ ASSERT_EQ(quadCuller.quadList().size(), 1U);
+ EXPECT_EQ(quadCuller.quadList()[0]->toSolidColorDrawQuad()->color(), testColor);
+}
+
+TEST(CCSolidColorLayerImplTest, verifyCorrectOpacityInQuad)
+{
+ DebugScopedSetImplThread scopedImplThread;
+
+ const float opacity = 0.5f;
+
+ MockCCQuadCuller quadCuller;
+ IntSize layerSize = IntSize(100, 100);
+ IntRect visibleLayerRect = IntRect(IntPoint(), layerSize);
+
+ OwnPtr<CCSolidColorLayerImpl> layer = CCSolidColorLayerImpl::create(0);
+ layer->setVisibleLayerRect(visibleLayerRect);
+ layer->setBounds(layerSize);
+ layer->setDrawOpacity(opacity);
+
+ OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
+ bool hadMissingTiles = false;
+ layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
+
+ ASSERT_EQ(quadCuller.quadList().size(), 1U);
+ EXPECT_EQ(opacity, quadCuller.quadList()[0]->toSolidColorDrawQuad()->opacity());
}
} // namespace
diff --git a/Source/WebKit/chromium/tests/CCTiledLayerImplTest.cpp b/Source/WebKit/chromium/tests/CCTiledLayerImplTest.cpp
index ff7daa3c9..48a46dae1 100644
--- a/Source/WebKit/chromium/tests/CCTiledLayerImplTest.cpp
+++ b/Source/WebKit/chromium/tests/CCTiledLayerImplTest.cpp
@@ -27,6 +27,7 @@
#include "cc/CCTiledLayerImpl.h"
#include "CCLayerTestCommon.h"
+#include "MockCCQuadCuller.h"
#include "cc/CCSingleThreadProxy.h"
#include "cc/CCTileDrawQuad.h"
#include <gmock/gmock.h>
@@ -69,11 +70,12 @@ TEST(CCTiledLayerImplTest, emptyQuadList)
// Verify default layer does creates quads
{
OwnPtr<CCTiledLayerImpl> layer = createLayer(tileSize, layerSize, CCLayerTilingData::NoBorderTexels);
- CCQuadList quads;
+ MockCCQuadCuller quadCuller;
OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
- layer->appendQuads(quads, sharedQuadState.get());
+ bool hadMissingTiles = false;
+ layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
const unsigned numTiles = numTilesX * numTilesY;
- EXPECT_EQ(quads.size(), numTiles);
+ EXPECT_EQ(quadCuller.quadList().size(), numTiles);
}
// Layer with empty visible layer rect produces no quads
@@ -81,10 +83,11 @@ TEST(CCTiledLayerImplTest, emptyQuadList)
OwnPtr<CCTiledLayerImpl> layer = createLayer(tileSize, layerSize, CCLayerTilingData::NoBorderTexels);
layer->setVisibleLayerRect(IntRect());
- CCQuadList quads;
+ MockCCQuadCuller quadCuller;
OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
- layer->appendQuads(quads, sharedQuadState.get());
- EXPECT_EQ(quads.size(), 0u);
+ bool hadMissingTiles = false;
+ layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
+ EXPECT_EQ(quadCuller.quadList().size(), 0u);
}
// Layer with non-intersecting visible layer rect produces no quads
@@ -94,10 +97,11 @@ TEST(CCTiledLayerImplTest, emptyQuadList)
IntRect outsideBounds(IntPoint(-100, -100), IntSize(50, 50));
layer->setVisibleLayerRect(outsideBounds);
- CCQuadList quads;
+ MockCCQuadCuller quadCuller;
OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
- layer->appendQuads(quads, sharedQuadState.get());
- EXPECT_EQ(quads.size(), 0u);
+ bool hadMissingTiles = false;
+ layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
+ EXPECT_EQ(quadCuller.quadList().size(), 0u);
}
// Layer with skips draw produces no quads
@@ -105,10 +109,11 @@ TEST(CCTiledLayerImplTest, emptyQuadList)
OwnPtr<CCTiledLayerImpl> layer = createLayer(tileSize, layerSize, CCLayerTilingData::NoBorderTexels);
layer->setSkipsDraw(true);
- CCQuadList quads;
+ MockCCQuadCuller quadCuller;
OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
- layer->appendQuads(quads, sharedQuadState.get());
- EXPECT_EQ(quads.size(), 0u);
+ bool hadMissingTiles = false;
+ layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
+ EXPECT_EQ(quadCuller.quadList().size(), 0u);
}
}
@@ -126,12 +131,14 @@ TEST(CCTiledLayerImplTest, checkerboarding)
// No checkerboarding
{
- CCQuadList quads;
- layer->appendQuads(quads, sharedQuadState.get());
- EXPECT_EQ(quads.size(), 4u);
-
- for (size_t i = 0; i < quads.size(); ++i)
- EXPECT_EQ(quads[i]->material(), CCDrawQuad::TiledContent);
+ MockCCQuadCuller quadCuller;
+ bool hadMissingTiles = false;
+ layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
+ EXPECT_EQ(quadCuller.quadList().size(), 4u);
+ EXPECT_FALSE(hadMissingTiles);
+
+ for (size_t i = 0; i < quadCuller.quadList().size(); ++i)
+ EXPECT_EQ(quadCuller.quadList()[i]->material(), CCDrawQuad::TiledContent);
}
for (int i = 0; i < numTilesX; ++i)
@@ -140,11 +147,13 @@ TEST(CCTiledLayerImplTest, checkerboarding)
// All checkerboarding
{
- CCQuadList quads;
- layer->appendQuads(quads, sharedQuadState.get());
- EXPECT_EQ(quads.size(), 4u);
- for (size_t i = 0; i < quads.size(); ++i)
- EXPECT_EQ(quads[i]->material(), CCDrawQuad::SolidColor);
+ MockCCQuadCuller quadCuller;
+ bool hadMissingTiles = false;
+ layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
+ EXPECT_TRUE(hadMissingTiles);
+ EXPECT_EQ(quadCuller.quadList().size(), 4u);
+ for (size_t i = 0; i < quadCuller.quadList().size(); ++i)
+ EXPECT_NE(quadCuller.quadList()[i]->material(), CCDrawQuad::TiledContent);
}
}
@@ -154,8 +163,10 @@ static PassOwnPtr<CCSharedQuadState> getQuads(CCQuadList& quads, IntSize tileSiz
layer->setVisibleLayerRect(visibleLayerRect);
layer->setBounds(layerSize);
+ MockCCQuadCuller quadCuller(quads);
OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
- layer->appendQuads(quads, sharedQuadState.get());
+ bool hadMissingTiles = false;
+ layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
return sharedQuadState.release(); // The shared data must be owned as long as the quad list exists.
}
@@ -251,73 +262,4 @@ TEST(CCTiledLayerImplTest, tileOpaqueRectForLayerNoBorders)
}
}
-TEST(CCTiledLayerImplTest, backgroundCoversViewport)
-{
- DebugScopedSetImplThread scopedImplThread;
-
- const IntSize tileSize(10, 10);
- const int numTilesX = 2;
- const int numTilesY = 2;
- const unsigned numTiles = numTilesX * numTilesY;
- const IntSize layerSize(tileSize.width() * numTilesX, tileSize.height() * numTilesY);
- OwnPtr<CCTiledLayerImpl> layer = createLayer(tileSize, layerSize, CCLayerTilingData::NoBorderTexels);
- layer->setBackgroundColor(Color::gray);
- layer->setBackgroundCoversViewport(true);
-
- // No gutter rects
- {
- IntRect clipRect = IntRect(IntPoint(), layerSize);
- layer->setClipRect(clipRect);
- layer->setVisibleLayerRect(IntRect(IntPoint(), layerSize));
-
- OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
-
- CCQuadList quads;
- layer->appendQuads(quads, sharedQuadState.get());
- EXPECT_EQ(quads.size(), numTiles);
-
- for (size_t i = 0; i < quads.size(); ++i)
- EXPECT_EQ(quads[i]->material(), CCDrawQuad::TiledContent);
- }
-
- // Empty visible content area (fullscreen gutter rect)
- {
- IntRect clipRect = IntRect(100, 100, 100, 100);
- layer->setClipRect(clipRect);
- layer->setVisibleLayerRect(IntRect());
-
- OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
- CCQuadList quads;
- layer->appendQuads(quads, sharedQuadState.get());
-
- for (size_t i = 0; i < quads.size(); ++i)
- EXPECT_EQ(quads[i]->material(), CCDrawQuad::SolidColor);
-
- verifyQuadsExactlyCoverRect(quads, clipRect);
- }
-
- // Content area in middle of clip rect (four surrounding gutter rects)
- {
- IntRect clipRect = IntRect(-50, -50, 100, 100);
- layer->setClipRect(clipRect);
- layer->setVisibleLayerRect(IntRect(IntPoint(), layerSize));
-
- OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
- CCQuadList quads;
- layer->appendQuads(quads, sharedQuadState.get());
-
- unsigned numContentTiles = 0, numGutterTiles = 0;
- for (size_t i = 0; i < quads.size(); ++i) {
- if (quads[i]->material() == CCDrawQuad::TiledContent)
- numContentTiles++;
- else if (quads[i]->material() == CCDrawQuad::SolidColor)
- numGutterTiles++;
- }
- EXPECT_EQ(numContentTiles, numTiles);
- EXPECT_GE(numGutterTiles, 4u);
-
- verifyQuadsExactlyCoverRect(quads, clipRect);
- }
-}
-
} // namespace
diff --git a/Source/WebKit/chromium/tests/CCTiledLayerTestCommon.cpp b/Source/WebKit/chromium/tests/CCTiledLayerTestCommon.cpp
new file mode 100644
index 000000000..46d11a96e
--- /dev/null
+++ b/Source/WebKit/chromium/tests/CCTiledLayerTestCommon.cpp
@@ -0,0 +1,129 @@
+/*
+ * Copyright (C) 2012 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "CCTiledLayerTestCommon.h"
+
+using namespace WebCore;
+
+namespace WebKitTests {
+
+FakeLayerTextureUpdater::Texture::Texture(FakeLayerTextureUpdater* layer, PassOwnPtr<ManagedTexture> texture)
+ : LayerTextureUpdater::Texture(texture)
+ , m_layer(layer)
+{
+}
+
+FakeLayerTextureUpdater::Texture::~Texture()
+{
+}
+
+void FakeLayerTextureUpdater::Texture::updateRect(GraphicsContext3D*, TextureAllocator* allocator, const IntRect&, const IntRect&)
+{
+ if (allocator)
+ texture()->allocate(allocator);
+ m_layer->updateRect();
+}
+
+void FakeLayerTextureUpdater::Texture::prepareRect(const IntRect&)
+{
+ m_layer->prepareRect();
+}
+
+FakeLayerTextureUpdater::FakeLayerTextureUpdater()
+ : m_prepareCount(0)
+ , m_updateCount(0)
+ , m_prepareRectCount(0)
+{
+}
+
+FakeLayerTextureUpdater::~FakeLayerTextureUpdater()
+{
+}
+
+void FakeLayerTextureUpdater::prepareToUpdate(const IntRect& contentRect, const IntSize&, int, float, IntRect& resultingOpaqueRect)
+{
+ m_prepareCount++;
+ m_lastUpdateRect = contentRect;
+ if (!m_rectToInvalidate.isEmpty()) {
+ m_layer->invalidateRect(m_rectToInvalidate);
+ m_rectToInvalidate = IntRect();
+ m_layer = 0;
+ }
+ resultingOpaqueRect = m_opaquePaintRect;
+}
+
+void FakeLayerTextureUpdater::setRectToInvalidate(const IntRect& rect, FakeTiledLayerChromium* layer)
+{
+ m_rectToInvalidate = rect;
+ m_layer = layer;
+}
+
+PassOwnPtr<LayerTextureUpdater::Texture> FakeLayerTextureUpdater::createTexture(TextureManager* manager)
+{
+ return adoptPtr(new Texture(this, ManagedTexture::create(manager)));
+}
+
+FakeCCTiledLayerImpl::FakeCCTiledLayerImpl(int id)
+ : CCTiledLayerImpl(id)
+{
+}
+
+FakeCCTiledLayerImpl::~FakeCCTiledLayerImpl()
+{
+}
+
+FakeTiledLayerChromium::FakeTiledLayerChromium(TextureManager* textureManager)
+ : TiledLayerChromium()
+ , m_fakeTextureUpdater(adoptRef(new FakeLayerTextureUpdater))
+ , m_textureManager(textureManager)
+{
+ setTileSize(tileSize());
+ setTextureFormat(GraphicsContext3D::RGBA);
+ setBorderTexelOption(CCLayerTilingData::NoBorderTexels);
+ setIsDrawable(true); // So that we don't get false positives if any of these tests expect to return false from drawsContent() for other reasons.
+}
+
+FakeTiledLayerChromium::~FakeTiledLayerChromium()
+{
+}
+
+void FakeTiledLayerChromium::setNeedsDisplayRect(const FloatRect& rect)
+{
+ m_lastNeedsDisplayRect = rect;
+ TiledLayerChromium::setNeedsDisplayRect(rect);
+}
+
+void FakeTiledLayerChromium::update(CCTextureUpdater& updater, const CCOcclusionTracker* occlusion)
+{
+ updateLayerRect(updater, visibleLayerRect(), occlusion);
+}
+
+FakeTiledLayerWithScaledBounds::FakeTiledLayerWithScaledBounds(TextureManager* textureManager)
+ : FakeTiledLayerChromium(textureManager)
+{
+}
+
+} // namespace
diff --git a/Source/WebKit/chromium/tests/CCTiledLayerTestCommon.h b/Source/WebKit/chromium/tests/CCTiledLayerTestCommon.h
new file mode 100644
index 000000000..c028ea725
--- /dev/null
+++ b/Source/WebKit/chromium/tests/CCTiledLayerTestCommon.h
@@ -0,0 +1,168 @@
+/*
+ * Copyright (C) 2012 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef CCTiledLayerTestCommon_h
+#define CCTiledLayerTestCommon_h
+
+#include "GraphicsContext3D.h"
+#include "IntRect.h"
+#include "IntSize.h"
+#include "LayerTextureUpdater.h"
+#include "Region.h"
+#include "TextureCopier.h"
+#include "TextureManager.h"
+#include "TextureUploader.h"
+#include "TiledLayerChromium.h"
+#include "cc/CCTextureUpdater.h"
+#include "cc/CCTiledLayerImpl.h"
+
+namespace WebKitTests {
+
+class FakeTiledLayerChromium;
+
+class FakeLayerTextureUpdater : public WebCore::LayerTextureUpdater {
+public:
+ class Texture : public WebCore::LayerTextureUpdater::Texture {
+ public:
+ Texture(FakeLayerTextureUpdater*, PassOwnPtr<WebCore::ManagedTexture>);
+ virtual ~Texture();
+
+ virtual void updateRect(WebCore::GraphicsContext3D*, WebCore::TextureAllocator* , const WebCore::IntRect&, const WebCore::IntRect&);
+ virtual void prepareRect(const WebCore::IntRect&);
+
+ private:
+ FakeLayerTextureUpdater* m_layer;
+ };
+
+ FakeLayerTextureUpdater();
+ virtual ~FakeLayerTextureUpdater();
+
+ virtual PassOwnPtr<WebCore::LayerTextureUpdater::Texture> createTexture(WebCore::TextureManager*);
+ virtual SampledTexelFormat sampledTexelFormat(GC3Denum) { return SampledTexelFormatRGBA; }
+
+ virtual void prepareToUpdate(const WebCore::IntRect& contentRect, const WebCore::IntSize&, int, float, WebCore::IntRect& resultingOpaqueRect);
+ // Sets the rect to invalidate during the next call to prepareToUpdate(). After the next
+ // call to prepareToUpdate() the rect is reset.
+ void setRectToInvalidate(const WebCore::IntRect&, FakeTiledLayerChromium*);
+ // Last rect passed to prepareToUpdate().
+ const WebCore::IntRect& lastUpdateRect() const { return m_lastUpdateRect; }
+
+ // Number of times prepareToUpdate has been invoked.
+ int prepareCount() const { return m_prepareCount; }
+ void clearPrepareCount() { m_prepareCount = 0; }
+
+ // Number of times updateRect has been invoked.
+ int updateCount() const { return m_updateCount; }
+ void clearUpdateCount() { m_updateCount = 0; }
+ void updateRect() { m_updateCount++; }
+
+ // Number of times prepareRect() has been invoked on a texture.
+ int prepareRectCount() const { return m_prepareRectCount; }
+ void clearPrepareRectCount() { m_prepareRectCount = 0; }
+ void prepareRect() { m_prepareRectCount++; }
+
+ void setOpaquePaintRect(const WebCore::IntRect& opaquePaintRect) { m_opaquePaintRect = opaquePaintRect; }
+
+private:
+ int m_prepareCount;
+ int m_updateCount;
+ int m_prepareRectCount;
+ WebCore::IntRect m_rectToInvalidate;
+ WebCore::IntRect m_lastUpdateRect;
+ WebCore::IntRect m_opaquePaintRect;
+ RefPtr<FakeTiledLayerChromium> m_layer;
+};
+
+class FakeCCTiledLayerImpl : public WebCore::CCTiledLayerImpl {
+public:
+ explicit FakeCCTiledLayerImpl(int id);
+ virtual ~FakeCCTiledLayerImpl();
+
+ using WebCore::CCTiledLayerImpl::hasTileAt;
+ using WebCore::CCTiledLayerImpl::hasTextureIdForTileAt;
+};
+
+class FakeTiledLayerChromium : public WebCore::TiledLayerChromium {
+public:
+ explicit FakeTiledLayerChromium(WebCore::TextureManager*);
+ virtual ~FakeTiledLayerChromium();
+
+ static WebCore::IntSize tileSize() { return WebCore::IntSize(100, 100); }
+
+ using WebCore::TiledLayerChromium::invalidateRect;
+ using WebCore::TiledLayerChromium::updateLayerRect;
+ using WebCore::TiledLayerChromium::idleUpdateLayerRect;
+ using WebCore::TiledLayerChromium::needsIdlePaint;
+ using WebCore::TiledLayerChromium::skipsDraw;
+ using WebCore::TiledLayerChromium::numPaintedTiles;
+ using WebCore::TiledLayerChromium::idlePaintRect;
+
+ virtual void setNeedsDisplayRect(const WebCore::FloatRect&) OVERRIDE;
+ const WebCore::FloatRect& lastNeedsDisplayRect() const { return m_lastNeedsDisplayRect; }
+
+ // Updates the visibleLayerRect().
+ virtual void update(WebCore::CCTextureUpdater&, const WebCore::CCOcclusionTracker*) OVERRIDE;
+
+ virtual WebCore::TextureManager* textureManager() const OVERRIDE { return m_textureManager; }
+ FakeLayerTextureUpdater* fakeLayerTextureUpdater() { return m_fakeTextureUpdater.get(); }
+ WebCore::FloatRect updateRect() { return m_updateRect; }
+
+private:
+ virtual WebCore::LayerTextureUpdater* textureUpdater() const OVERRIDE { return m_fakeTextureUpdater.get(); }
+ virtual void createTextureUpdaterIfNeeded() OVERRIDE { }
+
+ RefPtr<FakeLayerTextureUpdater> m_fakeTextureUpdater;
+ WebCore::TextureManager* m_textureManager;
+ WebCore::FloatRect m_lastNeedsDisplayRect;
+};
+
+class FakeTiledLayerWithScaledBounds : public FakeTiledLayerChromium {
+public:
+ explicit FakeTiledLayerWithScaledBounds(WebCore::TextureManager*);
+
+ void setContentBounds(const WebCore::IntSize& contentBounds) { m_forcedContentBounds = contentBounds; }
+ virtual WebCore::IntSize contentBounds() const OVERRIDE { return m_forcedContentBounds; }
+
+protected:
+ WebCore::IntSize m_forcedContentBounds;
+};
+
+class FakeTextureAllocator : public WebCore::TextureAllocator {
+public:
+ virtual unsigned createTexture(const WebCore::IntSize&, GC3Denum) { return 1; }
+ virtual void deleteTexture(unsigned, const WebCore::IntSize&, GC3Denum) { }
+};
+
+class FakeTextureCopier : public WebCore::TextureCopier {
+public:
+ virtual void copyTexture(WebCore::GraphicsContext3D*, unsigned, unsigned, const WebCore::IntSize&) { }
+};
+
+class FakeTextureUploader : public WebCore::TextureUploader {
+public:
+ virtual void uploadTexture(WebCore::GraphicsContext3D* context, WebCore::LayerTextureUpdater::Texture* texture, WebCore::TextureAllocator* allocator, const WebCore::IntRect sourceRect, const WebCore::IntRect destRect) { texture->updateRect(context, allocator, sourceRect, destRect); }
+};
+
+}
+#endif // CCTiledLayerTestCommon_h
diff --git a/Source/WebKit/chromium/tests/CCTimerTest.cpp b/Source/WebKit/chromium/tests/CCTimerTest.cpp
index 298b69562..398fca56e 100644
--- a/Source/WebKit/chromium/tests/CCTimerTest.cpp
+++ b/Source/WebKit/chromium/tests/CCTimerTest.cpp
@@ -54,7 +54,7 @@ protected:
TEST_F(CCTimerTest, OneShot)
{
CCTimer timer(&m_thread, this);
- timer.startOneShot(1);
+ timer.startOneShot(0.001);
m_thread.runPendingTask();
EXPECT_TRUE(m_flag);
@@ -64,7 +64,7 @@ TEST_F(CCTimerTest, OneShot)
TEST_F(CCTimerTest, StopManually)
{
CCTimer timer(&m_thread, this);
- timer.startOneShot(1);
+ timer.startOneShot(0.001);
timer.stop();
m_thread.runPendingTask();
@@ -76,7 +76,7 @@ TEST_F(CCTimerTest, StopByScope)
{
{
CCTimer timer(&m_thread, this);
- timer.startOneShot(1);
+ timer.startOneShot(0.001);
}
m_thread.runPendingTask();
diff --git a/Source/WebKit/chromium/tests/Canvas2DLayerChromiumTest.cpp b/Source/WebKit/chromium/tests/Canvas2DLayerChromiumTest.cpp
index 580f15791..f464dcbbc 100644
--- a/Source/WebKit/chromium/tests/Canvas2DLayerChromiumTest.cpp
+++ b/Source/WebKit/chromium/tests/Canvas2DLayerChromiumTest.cpp
@@ -27,13 +27,19 @@
#include "Canvas2DLayerChromium.h"
#include "CCSchedulerTestCommon.h"
+#include "FakeCCLayerTreeHostClient.h"
#include "FakeWebGraphicsContext3D.h"
#include "GraphicsContext3DPrivate.h"
#include "Region.h"
+#include "TextureCopier.h"
#include "TextureManager.h"
-#include "cc/CCCanvasLayerImpl.h"
+#include "WebCompositor.h"
+#include "WebKit.h"
#include "cc/CCSingleThreadProxy.h"
+#include "cc/CCTextureLayerImpl.h"
#include "cc/CCTextureUpdater.h"
+#include "platform/WebKitPlatformSupport.h"
+#include "platform/WebThread.h"
#include <gmock/gmock.h>
#include <gtest/gtest.h>
@@ -48,19 +54,27 @@ using testing::Test;
namespace {
-class MockCanvasContext : public FakeWebGraphicsContext3D {
+class FakeCCLayerTreeHost : public CCLayerTreeHost {
public:
- MOCK_METHOD0(createFramebuffer, WebGLId());
- MOCK_METHOD0(createTexture, WebGLId());
+ static PassOwnPtr<FakeCCLayerTreeHost> create()
+ {
+ OwnPtr<FakeCCLayerTreeHost> host(adoptPtr(new FakeCCLayerTreeHost));
+ host->initialize();
+ return host.release();
+ }
- MOCK_METHOD2(bindFramebuffer, void(WGC3Denum, WebGLId));
- MOCK_METHOD5(framebufferTexture2D, void(WGC3Denum, WGC3Denum, WGC3Denum, WebGLId, WGC3Dint));
+private:
+ FakeCCLayerTreeHost()
+ : CCLayerTreeHost(&m_client, CCSettings())
+ {
+ }
- MOCK_METHOD2(bindTexture, void(WGC3Denum, WebGLId));
- MOCK_METHOD8(copyTexSubImage2D, void(WGC3Denum, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, WGC3Dsizei));
+ FakeCCLayerTreeHostClient m_client;
+};
- MOCK_METHOD1(deleteFramebuffer, void(WebGLId));
- MOCK_METHOD1(deleteTexture, void(WebGLId));
+class MockCanvasContext : public FakeWebGraphicsContext3D {
+public:
+ MOCK_METHOD0(flush, void(void));
};
class MockTextureAllocator : public TextureAllocator {
@@ -69,13 +83,21 @@ public:
MOCK_METHOD3(deleteTexture, void(unsigned, const IntSize&, GC3Denum));
};
-} // namespace
+class MockTextureCopier : public TextureCopier {
+public:
+ MOCK_METHOD4(copyTexture, void(GraphicsContext3D*, unsigned, unsigned, const IntSize&));
+};
+
+class MockTextureUploader : public TextureUploader {
+public:
+ MOCK_METHOD5(uploadTexture, void(GraphicsContext3D*, LayerTextureUpdater::Texture*, TextureAllocator*, const IntRect, const IntRect));
+};
-namespace WebCore {
+} // namespace
class Canvas2DLayerChromiumTest : public Test {
protected:
- void fullLifecycleTest(bool threaded)
+ void fullLifecycleTest(bool threaded, bool deferred)
{
GraphicsContext3D::Attributes attrs;
@@ -86,84 +108,95 @@ protected:
MockCanvasContext& implMock = *static_cast<MockCanvasContext*>(GraphicsContext3DPrivate::extractWebGraphicsContext3D(implContext.get()));
MockTextureAllocator allocatorMock;
- CCTextureUpdater updater(&allocatorMock);
+ MockTextureCopier copierMock;
+ MockTextureUploader uploaderMock;
+ CCTextureUpdater updater;
const IntSize size(300, 150);
- const size_t maxTextureSize = size.width() * size.height() * 4;
- OwnPtr<TextureManager> textureManager = TextureManager::create(maxTextureSize, maxTextureSize, maxTextureSize);
+ OwnPtr<WebThread> thread;
if (threaded)
- CCProxy::setImplThread(new FakeCCThread);
+ thread = adoptPtr(WebKit::Platform::current()->createThread("Canvas2DLayerChromiumTest"));
+ WebCompositor::initialize(thread.get());
+
+ OwnPtr<FakeCCLayerTreeHost> layerTreeHost(FakeCCLayerTreeHost::create());
+ // Force an update, so that we get a valid TextureManager.
+ layerTreeHost->updateLayers(updater);
const WebGLId backTextureId = 1;
const WebGLId frontTextureId = 2;
- const WebGLId fboId = 3;
{
InSequence sequence;
- // Note that the canvas backing texture is doublebuffered only when using the threaded
- // compositor.
- if (threaded) {
- // Setup Canvas2DLayerChromium (on the main thread).
- EXPECT_CALL(mainMock, createFramebuffer())
- .WillOnce(Return(fboId));
+ // Paint canvas contents on the main thread.
+ EXPECT_CALL(mainMock, flush());
+ // Note that the canvas backing texture is doublebuffered only when using the threaded
+ // compositor and not using deferred canvas rendering
+ if (threaded && !deferred) {
// Create texture and do the copy (on the impl thread).
EXPECT_CALL(allocatorMock, createTexture(size, GraphicsContext3D::RGBA))
.WillOnce(Return(frontTextureId));
- EXPECT_CALL(implMock, bindTexture(GraphicsContext3D::TEXTURE_2D, frontTextureId));
- EXPECT_CALL(implMock, bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, fboId));
- EXPECT_CALL(implMock, framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::COLOR_ATTACHMENT0, GraphicsContext3D::TEXTURE_2D, backTextureId, 0));
- EXPECT_CALL(implMock, copyTexSubImage2D(GraphicsContext3D::TEXTURE_2D, 0, 0, 0, 0, 0, 300, 150));
- EXPECT_CALL(implMock, bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, 0));
-
- // Teardown Canvas2DLayerChromium.
- EXPECT_CALL(mainMock, deleteFramebuffer(fboId));
+ EXPECT_CALL(copierMock, copyTexture(implContext.get(), backTextureId, frontTextureId, size));
+ EXPECT_CALL(implMock, flush());
// Teardown TextureManager.
EXPECT_CALL(allocatorMock, deleteTexture(frontTextureId, size, GraphicsContext3D::RGBA));
}
}
- RefPtr<Canvas2DLayerChromium> canvas = Canvas2DLayerChromium::create(mainContext.get(), size);
+ RefPtr<Canvas2DLayerChromium> canvas = Canvas2DLayerChromium::create(mainContext.get(), size, deferred ? Deferred : NonDeferred);
canvas->setIsDrawable(true);
- canvas->setTextureManager(textureManager.get());
+ canvas->setLayerTreeHost(layerTreeHost.get());
canvas->setBounds(IntSize(600, 300));
canvas->setTextureId(backTextureId);
canvas->setNeedsDisplay();
EXPECT_TRUE(canvas->needsDisplay());
- Region occludedScreenSpace;
- canvas->paintContentsIfDirty(occludedScreenSpace);
+ canvas->update(updater, 0);
EXPECT_FALSE(canvas->needsDisplay());
{
DebugScopedSetImplThread scopedImplThread;
OwnPtr<CCLayerImpl> layerImpl = canvas->createCCLayerImpl();
- EXPECT_EQ(0u, static_cast<CCCanvasLayerImpl*>(layerImpl.get())->textureId());
+ EXPECT_EQ(0u, static_cast<CCTextureLayerImpl*>(layerImpl.get())->textureId());
- canvas->updateCompositorResources(implContext.get(), updater);
+ updater.update(implContext.get(), &allocatorMock, &copierMock, &uploaderMock, 1);
canvas->pushPropertiesTo(layerImpl.get());
- if (threaded)
- EXPECT_EQ(frontTextureId, static_cast<CCCanvasLayerImpl*>(layerImpl.get())->textureId());
+ if (threaded && !deferred)
+ EXPECT_EQ(frontTextureId, static_cast<CCTextureLayerImpl*>(layerImpl.get())->textureId());
else
- EXPECT_EQ(backTextureId, static_cast<CCCanvasLayerImpl*>(layerImpl.get())->textureId());
+ EXPECT_EQ(backTextureId, static_cast<CCTextureLayerImpl*>(layerImpl.get())->textureId());
}
canvas.clear();
- textureManager->reduceMemoryToLimit(0);
- textureManager->deleteEvictedTextures(&allocatorMock);
+ layerTreeHost->contentsTextureManager()->reduceMemoryToLimit(0);
+ layerTreeHost->contentsTextureManager()->deleteEvictedTextures(&allocatorMock);
+ layerTreeHost.clear();
+ WebCompositor::shutdown();
}
};
+namespace {
+
TEST_F(Canvas2DLayerChromiumTest, testFullLifecycleSingleThread)
{
- fullLifecycleTest(false);
+ fullLifecycleTest(false, false);
}
TEST_F(Canvas2DLayerChromiumTest, testFullLifecycleThreaded)
{
- fullLifecycleTest(true);
+ fullLifecycleTest(true, false);
}
-} // namespace webcore
+TEST_F(Canvas2DLayerChromiumTest, testFullLifecycleSingleThreadDeferred)
+{
+ fullLifecycleTest(false, true);
+}
+
+TEST_F(Canvas2DLayerChromiumTest, testFullLifecycleThreadedDeferred)
+{
+ fullLifecycleTest(true, true);
+}
+
+} // namespace
diff --git a/Source/WebKit/chromium/tests/WebGLLayerChromiumTest.cpp b/Source/WebKit/chromium/tests/DrawingBufferChromiumTest.cpp
index 66ea690fa..27ef49281 100644
--- a/Source/WebKit/chromium/tests/WebGLLayerChromiumTest.cpp
+++ b/Source/WebKit/chromium/tests/DrawingBufferChromiumTest.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -24,10 +24,10 @@
#include "config.h"
-#include "WebGLLayerChromium.h"
+#include "DrawingBuffer.h"
#include "CompositorFakeGraphicsContext3D.h"
-#include "DrawingBuffer.h"
+#include "LayerChromium.h"
#include <gmock/gmock.h>
#include <gtest/gtest.h>
@@ -36,7 +36,7 @@ using namespace WebKit;
namespace {
-TEST(WebGLLayerChromiumTest, opaqueFormats)
+TEST(DrawingBufferChromiumTest, opaqueFormats)
{
RefPtr<DrawingBuffer> buffer;
@@ -50,14 +50,14 @@ TEST(WebGLLayerChromiumTest, opaqueFormats)
RefPtr<GraphicsContext3D> opaqueContext = createCompositorMockGraphicsContext3D(opaqueAttrs);
EXPECT_TRUE(opaqueContext);
- buffer = DrawingBuffer::create(alphaContext.get(), IntSize(), false);
+ buffer = DrawingBuffer::create(alphaContext.get(), IntSize(), DrawingBuffer::Preserve, DrawingBuffer::Alpha);
EXPECT_FALSE(buffer->platformLayer()->opaque());
- buffer = DrawingBuffer::create(alphaContext.get(), IntSize(), true);
+ buffer = DrawingBuffer::create(alphaContext.get(), IntSize(), DrawingBuffer::Discard, DrawingBuffer::Alpha);
EXPECT_FALSE(buffer->platformLayer()->opaque());
- buffer = DrawingBuffer::create(opaqueContext.get(), IntSize(), false);
+ buffer = DrawingBuffer::create(opaqueContext.get(), IntSize(), DrawingBuffer::Preserve, DrawingBuffer::Opaque);
EXPECT_TRUE(buffer->platformLayer()->opaque());
- buffer = DrawingBuffer::create(opaqueContext.get(), IntSize(), true);
+ buffer = DrawingBuffer::create(opaqueContext.get(), IntSize(), DrawingBuffer::Discard, DrawingBuffer::Opaque);
EXPECT_TRUE(buffer->platformLayer()->opaque());
}
diff --git a/Source/WebKit/chromium/tests/FakeCCLayerTreeHostClient.h b/Source/WebKit/chromium/tests/FakeCCLayerTreeHostClient.h
index 38876d737..513fd0cbc 100755
--- a/Source/WebKit/chromium/tests/FakeCCLayerTreeHostClient.h
+++ b/Source/WebKit/chromium/tests/FakeCCLayerTreeHostClient.h
@@ -34,20 +34,22 @@ namespace WebCore {
class FakeCCLayerTreeHostClient : public CCLayerTreeHostClient {
public:
- virtual void updateAnimations(double frameBeginTime) { }
- virtual void layout() { }
- virtual void applyScrollAndScale(const IntSize& scrollDelta, float pageScale) { }
- virtual PassRefPtr<GraphicsContext3D> createContext()
+ virtual void willBeginFrame() OVERRIDE { }
+ virtual void updateAnimations(double monotonicFrameBeginTime) OVERRIDE { }
+ virtual void layout() OVERRIDE { }
+ virtual void applyScrollAndScale(const IntSize& scrollDelta, float pageScale) OVERRIDE { }
+ virtual PassRefPtr<GraphicsContext3D> createContext() OVERRIDE
{
GraphicsContext3D::Attributes attrs;
return createCompositorMockGraphicsContext3D(attrs);
}
- virtual void didRecreateContext(bool success) { }
- virtual void didCommitAndDrawFrame() { }
- virtual void didCompleteSwapBuffers() { }
+ virtual void didRecreateContext(bool success) OVERRIDE { }
+ virtual void didCommit() OVERRIDE { }
+ virtual void didCommitAndDrawFrame() OVERRIDE { }
+ virtual void didCompleteSwapBuffers() OVERRIDE { }
// Used only in the single-threaded path.
- virtual void scheduleComposite() { }
+ virtual void scheduleComposite() OVERRIDE { }
};
}
diff --git a/Source/WebKit/chromium/tests/FakeWebGraphicsContext3D.h b/Source/WebKit/chromium/tests/FakeWebGraphicsContext3D.h
index 268dc1da3..191d05f5f 100644
--- a/Source/WebKit/chromium/tests/FakeWebGraphicsContext3D.h
+++ b/Source/WebKit/chromium/tests/FakeWebGraphicsContext3D.h
@@ -63,6 +63,9 @@ public:
virtual void setVisibilityCHROMIUM(bool visible) { }
+ virtual void discardFramebufferEXT(WGC3Denum target, WGC3Dsizei numAttachments, const WGC3Denum* attachments) { }
+ virtual void ensureFramebufferCHROMIUM() { }
+
virtual void setMemoryAllocationChangedCallbackCHROMIUM(WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* callback) { }
virtual WebString getRequestableExtensionsCHROMIUM() { return WebString(); }
@@ -155,7 +158,7 @@ public:
}
virtual WebString getShaderInfoLog(WebGLId shader) { return WebString(); }
-
+ virtual void getShaderPrecisionFormat(WGC3Denum shadertype, WGC3Denum precisiontype, WGC3Dint* range, WGC3Dint* precision) { }
virtual WebString getShaderSource(WebGLId shader) { return WebString(); }
virtual WebString getString(WGC3Denum name) { return WebString(); }
virtual void getTexParameterfv(WGC3Denum target, WGC3Denum pname, WGC3Dfloat* value) { }
@@ -255,6 +258,14 @@ public:
virtual void texStorage2DEXT(WGC3Denum target, WGC3Dint levels, WGC3Duint internalformat,
WGC3Dint width, WGC3Dint height) { }
+ virtual WebGLId createQueryEXT() { return 1; }
+ virtual void deleteQueryEXT(WebGLId) { }
+ virtual GC3Dboolean isQueryEXT(WebGLId) { return true; }
+ virtual void beginQueryEXT(GC3Denum, WebGLId) { }
+ virtual void endQueryEXT(GC3Denum) { }
+ virtual void getQueryivEXT(GC3Denum, GC3Denum, GC3Dint*) { }
+ virtual void getQueryObjectuivEXT(WebGLId, GC3Denum, GC3Duint*) { }
+
protected:
Attributes m_attrs;
};
diff --git a/Source/WebKit/chromium/tests/FloatQuadTest.cpp b/Source/WebKit/chromium/tests/FloatQuadTest.cpp
index 7633dcf15..6c7091ca4 100644
--- a/Source/WebKit/chromium/tests/FloatQuadTest.cpp
+++ b/Source/WebKit/chromium/tests/FloatQuadTest.cpp
@@ -50,7 +50,7 @@ TEST(FloatQuadTest, IsRectilinearTest)
rectilinearTrans[7].rotate(180);
for (int i = 0; i < numRectilinear; ++i) {
- FloatQuad quad = rectilinearTrans[i].mapQuad(FloatRect(0.01010101, 0.01010101, 100.01010101, 100.01010101));
+ FloatQuad quad = rectilinearTrans[i].mapQuad(FloatRect(0.01010101f, 0.01010101f, 100.01010101f, 100.01010101f));
EXPECT_TRUE(quad.isRectilinear());
}
@@ -68,7 +68,7 @@ TEST(FloatQuadTest, IsRectilinearTest)
nonRectilinearTrans[9].skewY(0.00001);
for (int i = 0; i < numNonRectilinear; ++i) {
- FloatQuad quad = nonRectilinearTrans[i].mapQuad(FloatRect(0.01010101, 0.01010101, 100.01010101, 100.01010101));
+ FloatQuad quad = nonRectilinearTrans[i].mapQuad(FloatRect(0.01010101f, 0.01010101f, 100.01010101f, 100.01010101f));
EXPECT_FALSE(quad.isRectilinear());
}
}
diff --git a/Source/WebKit/chromium/tests/FrameTestHelpers.cpp b/Source/WebKit/chromium/tests/FrameTestHelpers.cpp
index ba6666699..e406413dd 100644
--- a/Source/WebKit/chromium/tests/FrameTestHelpers.cpp
+++ b/Source/WebKit/chromium/tests/FrameTestHelpers.cpp
@@ -31,7 +31,7 @@
#include "config.h"
#include "FrameTestHelpers.h"
-#include "StdLibExtras.h"
+#include <wtf/StdLibExtras.h>
#include "WebFrame.h"
#include "WebFrameClient.h"
#include "WebSettings.h"
@@ -48,6 +48,11 @@ namespace FrameTestHelpers {
void registerMockedURLLoad(const std::string& base, const std::string& fileName)
{
+ registerMockedURLLoad(GURL(base + fileName), fileName);
+}
+
+void registerMockedURLLoad(GURL url, const std::string& fileName)
+{
WebURLResponse response;
response.initialize();
response.setMIMEType("text/html");
@@ -56,7 +61,7 @@ void registerMockedURLLoad(const std::string& base, const std::string& fileName)
filePath += "/Source/WebKit/chromium/tests/data/";
filePath += fileName;
- webkit_support::RegisterMockedURL(GURL(base + fileName), response, WebString::fromUTF8(filePath));
+ webkit_support::RegisterMockedURL(url, response, WebString::fromUTF8(filePath));
}
void loadFrame(WebFrame* frame, const std::string& url)
diff --git a/Source/WebKit/chromium/tests/FrameTestHelpers.h b/Source/WebKit/chromium/tests/FrameTestHelpers.h
index 290acfe13..fc2fa2d36 100644
--- a/Source/WebKit/chromium/tests/FrameTestHelpers.h
+++ b/Source/WebKit/chromium/tests/FrameTestHelpers.h
@@ -33,6 +33,8 @@
#include <string>
+class GURL;
+
namespace WebKit {
class WebFrame;
@@ -43,6 +45,8 @@ class WebViewClient;
namespace FrameTestHelpers {
void registerMockedURLLoad(const std::string& base, const std::string& fileName);
+// Like the previous overload, but it allows more flexibility in the url since it is given by the caller.
+void registerMockedURLLoad(GURL, const std::string& fileName);
void loadFrame(WebFrame*, const std::string& url);
diff --git a/Source/WebKit/chromium/tests/LayerChromiumTest.cpp b/Source/WebKit/chromium/tests/LayerChromiumTest.cpp
index d8858cc12..a93eac7fa 100644
--- a/Source/WebKit/chromium/tests/LayerChromiumTest.cpp
+++ b/Source/WebKit/chromium/tests/LayerChromiumTest.cpp
@@ -26,13 +26,14 @@
#include "LayerChromium.h"
-#include "cc/CCLayerTreeHost.h"
#include "CCLayerTreeTestCommon.h"
#include "FakeCCLayerTreeHostClient.h"
#include "LayerPainterChromium.h"
#include "NonCompositedContentHost.h"
#include "WebCompositor.h"
+#include "cc/CCLayerImpl.h"
#include "cc/CCLayerTreeHost.h"
+#include "cc/CCSingleThreadProxy.h"
#include <gmock/gmock.h>
#include <gtest/gtest.h>
@@ -77,7 +78,7 @@ protected:
{
// Initialize without threading support.
WebKit::WebCompositor::initialize(0);
- m_layerTreeHost = adoptRef(new MockCCLayerTreeHost);
+ m_layerTreeHost = adoptPtr(new MockCCLayerTreeHost);
}
virtual void TearDown()
@@ -145,7 +146,7 @@ protected:
verifyTestTreeInitialState();
}
- RefPtr<MockCCLayerTreeHost> m_layerTreeHost;
+ OwnPtr<MockCCLayerTreeHost> m_layerTreeHost;
RefPtr<LayerChromium> m_parent, m_child1, m_child2, m_child3, m_grandChild1, m_grandChild2, m_grandChild3;
};
@@ -504,8 +505,7 @@ TEST_F(LayerChromiumTest, checkPropertyChangeCausesCorrectBehavior)
// All properties need to be set to new values in order for setNeedsCommit to be called.
EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setAnchorPoint(FloatPoint(1.23f, 4.56f)));
EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setAnchorPointZ(0.7f));
- EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setBackgroundColor(Color(0.4f, 0.4f, 0.4f)));
- EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setBackgroundCoversViewport(true));
+ EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setBackgroundColor(Color(0.4f, 0.4f, 0.4f, 1.0f)));
EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setMasksToBounds(true));
EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setMaskLayer(dummyLayer.get()));
EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setOpacity(0.5f));
@@ -521,6 +521,7 @@ TEST_F(LayerChromiumTest, checkPropertyChangeCausesCorrectBehavior)
EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setTransform(TransformationMatrix(0, 0, 0, 0, 0, 0)));
EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setDoubleSided(false));
EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setDebugName("Test Layer"));
+ EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setDrawCheckerboardForMissingTiles(!testLayer->drawCheckerboardForMissingTiles()));
// The above tests should not have caused a change to the needsDisplay flag.
EXPECT_FALSE(testLayer->needsDisplay());
@@ -530,6 +531,29 @@ TEST_F(LayerChromiumTest, checkPropertyChangeCausesCorrectBehavior)
EXPECT_TRUE(testLayer->needsDisplay());
}
+TEST_F(LayerChromiumTest, verifyPushPropertiesAccumulatesUpdateRect)
+{
+ DebugScopedSetImplThread setImplThread;
+
+ RefPtr<LayerChromium> testLayer = LayerChromium::create();
+ OwnPtr<CCLayerImpl> implLayer = CCLayerImpl::create(1);
+
+ testLayer->setNeedsDisplayRect(FloatRect(FloatPoint::zero(), FloatSize(5, 5)));
+ testLayer->pushPropertiesTo(implLayer.get());
+ EXPECT_FLOAT_RECT_EQ(FloatRect(FloatPoint::zero(), FloatSize(5, 5)), implLayer->updateRect());
+
+ // The CCLayerImpl's updateRect should be accumulated here, since we did not do anything to clear it.
+ testLayer->setNeedsDisplayRect(FloatRect(FloatPoint(10, 10), FloatSize(5, 5)));
+ testLayer->pushPropertiesTo(implLayer.get());
+ EXPECT_FLOAT_RECT_EQ(FloatRect(FloatPoint::zero(), FloatSize(15, 15)), implLayer->updateRect());
+
+ // If we do clear the CCLayerImpl side, then the next updateRect should be fresh without accumulation.
+ implLayer->resetAllChangeTrackingForSubtree();
+ testLayer->setNeedsDisplayRect(FloatRect(FloatPoint(10, 10), FloatSize(5, 5)));
+ testLayer->pushPropertiesTo(implLayer.get());
+ EXPECT_FLOAT_RECT_EQ(FloatRect(FloatPoint(10, 10), FloatSize(5, 5)), implLayer->updateRect());
+}
+
class LayerChromiumWithContentScaling : public LayerChromium {
public:
explicit LayerChromiumWithContentScaling()
@@ -537,12 +561,12 @@ public:
{
}
- virtual bool needsContentsScale() const
+ virtual bool needsContentsScale() const OVERRIDE
{
return true;
}
- virtual void setNeedsDisplayRect(const FloatRect& dirtyRect)
+ virtual void setNeedsDisplayRect(const FloatRect& dirtyRect) OVERRIDE
{
m_lastNeedsDisplayRect = dirtyRect;
LayerChromium::setNeedsDisplayRect(dirtyRect);
@@ -577,9 +601,9 @@ TEST_F(LayerChromiumTest, checkContentsScaleChangeTriggersNeedsDisplay)
class FakeCCLayerTreeHost : public CCLayerTreeHost {
public:
- static PassRefPtr<FakeCCLayerTreeHost> create()
+ static PassOwnPtr<FakeCCLayerTreeHost> create()
{
- RefPtr<FakeCCLayerTreeHost> host = adoptRef(new FakeCCLayerTreeHost);
+ OwnPtr<FakeCCLayerTreeHost> host(adoptPtr(new FakeCCLayerTreeHost));
// The initialize call will fail, since our client doesn't provide a valid GraphicsContext3D, but it doesn't matter in the tests that use this fake so ignore the return value.
host->initialize();
return host.release();
@@ -626,7 +650,7 @@ TEST(LayerChromiumLayerTreeHostTest, enteringTree)
assertLayerTreeHostMatchesForSubtree(parent.get(), 0);
- RefPtr<FakeCCLayerTreeHost> layerTreeHost = FakeCCLayerTreeHost::create();
+ OwnPtr<FakeCCLayerTreeHost> layerTreeHost(FakeCCLayerTreeHost::create());
// Setting the root layer should set the host pointer for all layers in the tree.
layerTreeHost->setRootLayer(parent.get());
@@ -645,7 +669,7 @@ TEST(LayerChromiumLayerTreeHostTest, addingLayerSubtree)
{
WebKit::WebCompositor::initialize(0);
RefPtr<LayerChromium> parent = LayerChromium::create();
- RefPtr<FakeCCLayerTreeHost> layerTreeHost = FakeCCLayerTreeHost::create();
+ OwnPtr<FakeCCLayerTreeHost> layerTreeHost(FakeCCLayerTreeHost::create());
layerTreeHost->setRootLayer(parent.get());
@@ -687,14 +711,14 @@ TEST(LayerChromiumLayerTreeHostTest, changeHost)
child->setReplicaLayer(replica.get());
replica->setMaskLayer(mask.get());
- RefPtr<FakeCCLayerTreeHost> firstLayerTreeHost = FakeCCLayerTreeHost::create();
+ OwnPtr<FakeCCLayerTreeHost> firstLayerTreeHost(FakeCCLayerTreeHost::create());
firstLayerTreeHost->setRootLayer(parent.get());
assertLayerTreeHostMatchesForSubtree(parent.get(), firstLayerTreeHost.get());
// Now re-root the tree to a new host (simulating what we do on a context lost event).
// This should update the host pointers for all layers in the tree.
- RefPtr<FakeCCLayerTreeHost> secondLayerTreeHost = FakeCCLayerTreeHost::create();
+ OwnPtr<FakeCCLayerTreeHost> secondLayerTreeHost(FakeCCLayerTreeHost::create());
secondLayerTreeHost->setRootLayer(parent.get());
assertLayerTreeHostMatchesForSubtree(parent.get(), secondLayerTreeHost.get());
@@ -719,13 +743,13 @@ TEST(LayerChromiumLayerTreeHostTest, changeHostInSubtree)
secondChild->addChild(secondGrandChild);
firstParent->addChild(secondChild);
- RefPtr<FakeCCLayerTreeHost> firstLayerTreeHost = FakeCCLayerTreeHost::create();
+ OwnPtr<FakeCCLayerTreeHost> firstLayerTreeHost(FakeCCLayerTreeHost::create());
firstLayerTreeHost->setRootLayer(firstParent.get());
assertLayerTreeHostMatchesForSubtree(firstParent.get(), firstLayerTreeHost.get());
// Now reparent the subtree starting at secondChild to a layer in a different tree.
- RefPtr<FakeCCLayerTreeHost> secondLayerTreeHost = FakeCCLayerTreeHost::create();
+ OwnPtr<FakeCCLayerTreeHost> secondLayerTreeHost(FakeCCLayerTreeHost::create());
secondLayerTreeHost->setRootLayer(secondParent.get());
secondParent->addChild(secondChild);
@@ -758,7 +782,7 @@ TEST(LayerChromiumLayerTreeHostTest, replaceMaskAndReplicaLayer)
mask->addChild(maskChild);
replica->addChild(replicaChild);
- RefPtr<FakeCCLayerTreeHost> layerTreeHost = FakeCCLayerTreeHost::create();
+ OwnPtr<FakeCCLayerTreeHost> layerTreeHost(FakeCCLayerTreeHost::create());
layerTreeHost->setRootLayer(parent.get());
assertLayerTreeHostMatchesForSubtree(parent.get(), layerTreeHost.get());
diff --git a/Source/WebKit/chromium/tests/LayerRendererChromiumTest.cpp b/Source/WebKit/chromium/tests/LayerRendererChromiumTest.cpp
new file mode 100644
index 000000000..ddab17564
--- /dev/null
+++ b/Source/WebKit/chromium/tests/LayerRendererChromiumTest.cpp
@@ -0,0 +1,277 @@
+/*
+ * Copyright (C) 2012 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "LayerRendererChromium.h"
+
+#include "FakeWebGraphicsContext3D.h"
+#include "GraphicsContext3D.h"
+#include "GraphicsContext3DPrivate.h"
+#include "cc/CCSingleThreadProxy.h"
+
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+using namespace WebCore;
+using namespace WebKit;
+
+class FrameCountingMemoryAllocationSettingContext : public FakeWebGraphicsContext3D {
+public:
+ FrameCountingMemoryAllocationSettingContext() : m_frame(0) { }
+
+ // WebGraphicsContext3D methods.
+
+ // This method would normally do a glSwapBuffers under the hood.
+ virtual void prepareTexture() { m_frame++; }
+ virtual void setMemoryAllocationChangedCallbackCHROMIUM(WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* callback) { m_memoryAllocationChangedCallback = callback; }
+ virtual WebString getString(WebKit::WGC3Denum name)
+ {
+ if (name == GraphicsContext3D::EXTENSIONS)
+ return WebString("GL_CHROMIUM_set_visibility GL_CHROMIUM_gpu_memory_manager GL_CHROMIUM_discard_framebuffer");
+ return WebString();
+ }
+
+ // Methods added for test.
+ int frameCount() { return m_frame; }
+ void setMemoryAllocation(WebGraphicsMemoryAllocation allocation) { m_memoryAllocationChangedCallback->onMemoryAllocationChanged(allocation); }
+
+private:
+ int m_frame;
+ WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* m_memoryAllocationChangedCallback;
+};
+
+class FakeLayerRendererChromiumClient : public LayerRendererChromiumClient {
+public:
+ FakeLayerRendererChromiumClient()
+ : m_setFullRootLayerDamageCount(0)
+ , m_rootLayer(CCLayerImpl::create(1))
+ {
+ m_rootLayer->createRenderSurface();
+ }
+
+ // LayerRendererChromiumClient methods.
+ virtual const IntSize& viewportSize() const OVERRIDE { static IntSize fakeSize; return fakeSize; }
+ virtual const CCSettings& settings() const OVERRIDE { static CCSettings fakeSettings; return fakeSettings; }
+ virtual void didLoseContext() OVERRIDE { }
+ virtual void onSwapBuffersComplete() OVERRIDE { }
+ virtual void setFullRootLayerDamage() OVERRIDE { m_setFullRootLayerDamageCount++; }
+ virtual void setContentsMemoryAllocationLimitBytes(size_t) OVERRIDE { }
+
+ // Methods added for test.
+ int setFullRootLayerDamageCount() const { return m_setFullRootLayerDamageCount; }
+
+ CCLayerImpl* rootLayer() { return m_rootLayer.get(); }
+
+private:
+ int m_setFullRootLayerDamageCount;
+ DebugScopedSetImplThread m_implThread;
+ OwnPtr<CCLayerImpl> m_rootLayer;
+};
+
+class FakeLayerRendererChromium : public LayerRendererChromium {
+public:
+ FakeLayerRendererChromium(LayerRendererChromiumClient* client, PassRefPtr<GraphicsContext3D> context) : LayerRendererChromium(client, context) { }
+
+ // LayerRendererChromium methods.
+
+ // Changing visibility to public.
+ using LayerRendererChromium::initialize;
+ using LayerRendererChromium::isFramebufferDiscarded;
+};
+
+class LayerRendererChromiumTest : public testing::Test {
+protected:
+ LayerRendererChromiumTest()
+ : m_suggestHaveBackbufferYes(1, true)
+ , m_suggestHaveBackbufferNo(1, false)
+ , m_context(GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(new FrameCountingMemoryAllocationSettingContext()), GraphicsContext3D::RenderDirectlyToHostWindow))
+ , m_mockContext(*static_cast<FrameCountingMemoryAllocationSettingContext*>(GraphicsContext3DPrivate::extractWebGraphicsContext3D(m_context.get())))
+ , m_layerRendererChromium(&m_mockClient, m_context.release())
+ {
+ }
+
+ virtual void SetUp()
+ {
+ m_layerRendererChromium.initialize();
+ }
+
+ void swapBuffers()
+ {
+ m_layerRendererChromium.swapBuffers(IntRect());
+ }
+
+ WebGraphicsMemoryAllocation m_suggestHaveBackbufferYes;
+ WebGraphicsMemoryAllocation m_suggestHaveBackbufferNo;
+
+ RefPtr<GraphicsContext3D> m_context;
+ FrameCountingMemoryAllocationSettingContext& m_mockContext;
+ FakeLayerRendererChromiumClient m_mockClient;
+ FakeLayerRendererChromium m_layerRendererChromium;
+};
+
+// Test LayerRendererChromium discardFramebuffer functionality:
+// Suggest recreating framebuffer when one already exists.
+// Expected: it does nothing.
+TEST_F(LayerRendererChromiumTest, SuggestBackbufferYesWhenItAlreadyExistsShouldDoNothing)
+{
+ m_mockContext.setMemoryAllocation(m_suggestHaveBackbufferYes);
+ EXPECT_EQ(0, m_mockClient.setFullRootLayerDamageCount());
+ EXPECT_FALSE(m_layerRendererChromium.isFramebufferDiscarded());
+
+ swapBuffers();
+ EXPECT_EQ(1, m_mockContext.frameCount());
+}
+
+// Test LayerRendererChromium discardFramebuffer functionality:
+// Suggest discarding framebuffer when one exists.
+// Expected: it is discarded and damage tracker is reset.
+TEST_F(LayerRendererChromiumTest, SuggestBackbufferNoShouldDiscardBackbufferAndDamageRootLayer)
+{
+ m_mockContext.setMemoryAllocation(m_suggestHaveBackbufferNo);
+ EXPECT_EQ(1, m_mockClient.setFullRootLayerDamageCount());
+ EXPECT_TRUE(m_layerRendererChromium.isFramebufferDiscarded());
+}
+
+// Test LayerRendererChromium discardFramebuffer functionality:
+// Suggest discarding framebuffer when one does not exist.
+// Expected: it does nothing.
+TEST_F(LayerRendererChromiumTest, SuggestBackbufferNoWhenItDoesntExistShouldDoNothing)
+{
+ m_mockContext.setMemoryAllocation(m_suggestHaveBackbufferNo);
+ EXPECT_EQ(1, m_mockClient.setFullRootLayerDamageCount());
+ EXPECT_TRUE(m_layerRendererChromium.isFramebufferDiscarded());
+
+ m_mockContext.setMemoryAllocation(m_suggestHaveBackbufferNo);
+ EXPECT_EQ(1, m_mockClient.setFullRootLayerDamageCount());
+ EXPECT_TRUE(m_layerRendererChromium.isFramebufferDiscarded());
+}
+
+// Test LayerRendererChromium discardFramebuffer functionality:
+// Suggest discarding framebuffer, then try to swapBuffers.
+// Expected: framebuffer is discarded, swaps are ignored, and damage is reset after discard and after each swap.
+TEST_F(LayerRendererChromiumTest, SwapBuffersWhileBackbufferDiscardedShouldIgnoreSwapAndDamageRootLayer)
+{
+ m_mockContext.setMemoryAllocation(m_suggestHaveBackbufferNo);
+ EXPECT_TRUE(m_layerRendererChromium.isFramebufferDiscarded());
+ EXPECT_EQ(1, m_mockClient.setFullRootLayerDamageCount());
+
+ swapBuffers();
+ EXPECT_EQ(0, m_mockContext.frameCount());
+ EXPECT_EQ(2, m_mockClient.setFullRootLayerDamageCount());
+
+ swapBuffers();
+ EXPECT_EQ(0, m_mockContext.frameCount());
+ EXPECT_EQ(3, m_mockClient.setFullRootLayerDamageCount());
+}
+
+// Test LayerRendererChromium discardFramebuffer functionality:
+// Begin drawing a frame while a framebuffer is discarded.
+// Expected: will recreate framebuffer.
+TEST_F(LayerRendererChromiumTest, DiscardedBackbufferIsRecreatredForScopeDuration)
+{
+ m_mockContext.setMemoryAllocation(m_suggestHaveBackbufferNo);
+ EXPECT_TRUE(m_layerRendererChromium.isFramebufferDiscarded());
+ EXPECT_EQ(1, m_mockClient.setFullRootLayerDamageCount());
+
+ m_layerRendererChromium.beginDrawingFrame(m_mockClient.rootLayer()->renderSurface());
+ EXPECT_FALSE(m_layerRendererChromium.isFramebufferDiscarded());
+
+ swapBuffers();
+ EXPECT_EQ(1, m_mockContext.frameCount());
+}
+
+class ForbidSynchronousCallContext : public FakeWebGraphicsContext3D {
+public:
+ ForbidSynchronousCallContext() { }
+
+ virtual bool getActiveAttrib(WebGLId program, WGC3Duint index, ActiveInfo&) { ADD_FAILURE(); return false; }
+ virtual bool getActiveUniform(WebGLId program, WGC3Duint index, ActiveInfo&) { ADD_FAILURE(); return false; }
+ virtual void getAttachedShaders(WebGLId program, WGC3Dsizei maxCount, WGC3Dsizei* count, WebGLId* shaders) { ADD_FAILURE(); }
+ virtual WGC3Dint getAttribLocation(WebGLId program, const WGC3Dchar* name) { ADD_FAILURE(); return 0; }
+ virtual void getBooleanv(WGC3Denum pname, WGC3Dboolean* value) { ADD_FAILURE(); }
+ virtual void getBufferParameteriv(WGC3Denum target, WGC3Denum pname, WGC3Dint* value) { ADD_FAILURE(); }
+ virtual Attributes getContextAttributes() { ADD_FAILURE(); return m_attrs; }
+ virtual WGC3Denum getError() { ADD_FAILURE(); return 0; }
+ virtual void getFloatv(WGC3Denum pname, WGC3Dfloat* value) { ADD_FAILURE(); }
+ virtual void getFramebufferAttachmentParameteriv(WGC3Denum target, WGC3Denum attachment, WGC3Denum pname, WGC3Dint* value) { ADD_FAILURE(); }
+ virtual void getIntegerv(WGC3Denum pname, WGC3Dint* value)
+ {
+ if (pname == WebCore::GraphicsContext3D::MAX_TEXTURE_SIZE)
+ *value = 1024; // MAX_TEXTURE_SIZE is cached client side, so it's OK to query.
+ else
+ ADD_FAILURE();
+ }
+
+ // We allow querying the shader compilation and program link status in debug mode, but not release.
+ virtual void getProgramiv(WebGLId program, WGC3Denum pname, WGC3Dint* value)
+ {
+#ifndef NDEBUG
+ *value = 1;
+#else
+ ADD_FAILURE();
+#endif
+ }
+
+ virtual void getShaderiv(WebGLId shader, WGC3Denum pname, WGC3Dint* value)
+ {
+#ifndef NDEBUG
+ *value = 1;
+#else
+ ADD_FAILURE();
+#endif
+ }
+
+ virtual WebString getString(WGC3Denum name)
+ {
+ // We allow querying the extension string.
+ // FIXME: It'd be better to check that we only do this before starting any other expensive work (like starting a compilation)
+ if (name != WebCore::GraphicsContext3D::EXTENSIONS)
+ ADD_FAILURE();
+ return WebString();
+ }
+
+ virtual WebString getProgramInfoLog(WebGLId program) { ADD_FAILURE(); return WebString(); }
+ virtual void getRenderbufferParameteriv(WGC3Denum target, WGC3Denum pname, WGC3Dint* value) { ADD_FAILURE(); }
+
+ virtual WebString getShaderInfoLog(WebGLId shader) { ADD_FAILURE(); return WebString(); }
+ virtual void getShaderPrecisionFormat(WGC3Denum shadertype, WGC3Denum precisiontype, WGC3Dint* range, WGC3Dint* precision) { ADD_FAILURE(); }
+ virtual WebString getShaderSource(WebGLId shader) { ADD_FAILURE(); return WebString(); }
+ virtual void getTexParameterfv(WGC3Denum target, WGC3Denum pname, WGC3Dfloat* value) { ADD_FAILURE(); }
+ virtual void getTexParameteriv(WGC3Denum target, WGC3Denum pname, WGC3Dint* value) { ADD_FAILURE(); }
+ virtual void getUniformfv(WebGLId program, WGC3Dint location, WGC3Dfloat* value) { ADD_FAILURE(); }
+ virtual void getUniformiv(WebGLId program, WGC3Dint location, WGC3Dint* value) { ADD_FAILURE(); }
+ virtual WGC3Dint getUniformLocation(WebGLId program, const WGC3Dchar* name) { ADD_FAILURE(); return 0; }
+ virtual void getVertexAttribfv(WGC3Duint index, WGC3Denum pname, WGC3Dfloat* value) { ADD_FAILURE(); }
+ virtual void getVertexAttribiv(WGC3Duint index, WGC3Denum pname, WGC3Dint* value) { ADD_FAILURE(); }
+ virtual WGC3Dsizeiptr getVertexAttribOffset(WGC3Duint index, WGC3Denum pname) { ADD_FAILURE(); return 0; }
+};
+
+// This test isn't using the same fixture as LayerRendererChromiumTest, and you can't mix TEST() and TEST_F() with the same name, hence LRC2.
+TEST(LayerRendererChromiumTest2, initializationDoesNotMakeSynchronousCalls)
+{
+ FakeLayerRendererChromiumClient mockClient;
+ FakeLayerRendererChromium layerRendererChromium(&mockClient, GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(new ForbidSynchronousCallContext), GraphicsContext3D::RenderDirectlyToHostWindow));
+
+ EXPECT_TRUE(layerRendererChromium.initialize());
+}
diff --git a/Source/WebKit/chromium/tests/LayerTextureUpdaterTest.cpp b/Source/WebKit/chromium/tests/LayerTextureUpdaterTest.cpp
index bdbf7bb09..d1a97bb5b 100644
--- a/Source/WebKit/chromium/tests/LayerTextureUpdaterTest.cpp
+++ b/Source/WebKit/chromium/tests/LayerTextureUpdaterTest.cpp
@@ -79,6 +79,27 @@ struct PaintFillAlpha : public PaintCallback {
}
};
+struct PaintFillPartialOpaque : public PaintCallback {
+ PaintFillPartialOpaque(IntRect opaqueRect)
+ : m_opaqueRect(opaqueRect)
+ {
+ }
+
+ virtual void operator()(GraphicsContext& context, const IntRect& contentRect)
+ {
+ Color alpha(0, 0, 0, 0);
+ context.fillRect(contentRect, alpha, ColorSpaceDeviceRGB);
+
+ IntRect fillOpaque = m_opaqueRect;
+ fillOpaque.intersect(contentRect);
+
+ Color opaque(255, 255, 255, 255);
+ context.fillRect(fillOpaque, opaque, ColorSpaceDeviceRGB);
+ }
+
+ IntRect m_opaqueRect;
+};
+
#define EXPECT_EQ_RECT(a, b) \
EXPECT_EQ(a.x(), b.x()); \
EXPECT_EQ(a.maxX(), b.maxX()); \
@@ -95,19 +116,19 @@ TEST(LayerTextureUpdaterTest, testOpaqueRectPresentAfterOpaquePaint)
opaqueRect = IntRect();
painter = adoptPtr(new TestLayerPainterChromium(fillOpaque));
updater = BitmapCanvasLayerTextureUpdater::create(painter.release(), false);
- updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, &opaqueRect);
+ updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, opaqueRect);
EXPECT_EQ_RECT(IntRect(0, 0, 400, 400), opaqueRect);
opaqueRect = IntRect();
painter = adoptPtr(new TestLayerPainterChromium(fillOpaque));
updater = BitmapSkPictureCanvasLayerTextureUpdater::create(painter.release(), false);
- updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, &opaqueRect);
+ updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, opaqueRect);
EXPECT_EQ_RECT(IntRect(0, 0, 400, 400), opaqueRect);
opaqueRect = IntRect();
painter = adoptPtr(new TestLayerPainterChromium(fillOpaque));
updater = FrameBufferSkPictureCanvasLayerTextureUpdater::create(painter.release());
- updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, &opaqueRect);
+ updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, opaqueRect);
EXPECT_EQ_RECT(IntRect(0, 0, 400, 400), opaqueRect);
}
@@ -121,19 +142,19 @@ TEST(LayerTextureUpdaterTest, testOpaqueRectNotPresentAfterNonOpaquePaint)
opaqueRect = IntRect();
painter = adoptPtr(new TestLayerPainterChromium(fillAlpha));
updater = BitmapCanvasLayerTextureUpdater::create(painter.release(), false);
- updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, &opaqueRect);
+ updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, opaqueRect);
EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), opaqueRect);
opaqueRect = IntRect();
painter = adoptPtr(new TestLayerPainterChromium(fillAlpha));
updater = BitmapSkPictureCanvasLayerTextureUpdater::create(painter.release(), false);
- updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, &opaqueRect);
+ updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, opaqueRect);
EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), opaqueRect);
opaqueRect = IntRect();
painter = adoptPtr(new TestLayerPainterChromium(fillAlpha));
updater = FrameBufferSkPictureCanvasLayerTextureUpdater::create(painter.release());
- updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, &opaqueRect);
+ updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, opaqueRect);
EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), opaqueRect);
}
@@ -148,21 +169,21 @@ TEST(LayerTextureUpdaterTest, testOpaqueRectNotPresentForOpaqueLayerWithOpaquePa
painter = adoptPtr(new TestLayerPainterChromium(fillOpaque));
updater = BitmapCanvasLayerTextureUpdater::create(painter.release(), false);
updater->setOpaque(true);
- updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, &opaqueRect);
+ updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, opaqueRect);
EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), opaqueRect);
opaqueRect = IntRect();
painter = adoptPtr(new TestLayerPainterChromium(fillOpaque));
updater = BitmapSkPictureCanvasLayerTextureUpdater::create(painter.release(), false);
updater->setOpaque(true);
- updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, &opaqueRect);
+ updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, opaqueRect);
EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), opaqueRect);
opaqueRect = IntRect();
painter = adoptPtr(new TestLayerPainterChromium(fillOpaque));
updater = FrameBufferSkPictureCanvasLayerTextureUpdater::create(painter.release());
updater->setOpaque(true);
- updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, &opaqueRect);
+ updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, opaqueRect);
EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), opaqueRect);
}
@@ -177,22 +198,70 @@ TEST(LayerTextureUpdaterTest, testOpaqueRectNotPresentForOpaqueLayerWithNonOpaqu
painter = adoptPtr(new TestLayerPainterChromium(fillAlpha));
updater = BitmapCanvasLayerTextureUpdater::create(painter.release(), false);
updater->setOpaque(true);
- updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, &opaqueRect);
+ updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, opaqueRect);
EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), opaqueRect);
opaqueRect = IntRect();
painter = adoptPtr(new TestLayerPainterChromium(fillAlpha));
updater = BitmapSkPictureCanvasLayerTextureUpdater::create(painter.release(), false);
updater->setOpaque(true);
- updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, &opaqueRect);
+ updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, opaqueRect);
EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), opaqueRect);
opaqueRect = IntRect();
painter = adoptPtr(new TestLayerPainterChromium(fillAlpha));
updater = FrameBufferSkPictureCanvasLayerTextureUpdater::create(painter.release());
updater->setOpaque(true);
- updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, &opaqueRect);
+ updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, opaqueRect);
EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), opaqueRect);
}
+TEST(LayerTextureUpdaterTest, testPartialOpaqueRectNoTransform)
+{
+ IntRect partialRect(100, 200, 50, 75);
+ PaintFillPartialOpaque fillPartial(partialRect);
+ OwnPtr<TestLayerPainterChromium> painter(adoptPtr(new TestLayerPainterChromium(fillPartial)));
+ RefPtr<LayerTextureUpdater> updater = BitmapCanvasLayerTextureUpdater::create(painter.release(), false);
+
+ IntRect opaqueRect;
+ updater->prepareToUpdate(IntRect(0, 0, 400, 400), IntSize(400, 400), 0, 1, opaqueRect);
+ EXPECT_EQ_RECT(partialRect, opaqueRect);
+}
+
+TEST(LayerTextureUpdaterTest, testPartialOpaqueRectTranslation)
+{
+ IntRect partialRect(100, 200, 50, 75);
+ PaintFillPartialOpaque fillPartial(partialRect);
+
+ OwnPtr<TestLayerPainterChromium> painter(adoptPtr(new TestLayerPainterChromium(fillPartial)));
+ RefPtr<LayerTextureUpdater> updater = BitmapCanvasLayerTextureUpdater::create(painter.release(), false);
+
+ IntRect opaqueRect;
+ IntRect contentRect(11, 12, 389, 388);
+ updater->prepareToUpdate(contentRect, IntSize(400, 400), 0, 1, opaqueRect);
+ EXPECT_EQ_RECT(partialRect, opaqueRect);
+}
+
+TEST(LayerTextureUpdaterTest, testPartialOpaqueRectScale)
+{
+ float contentsScale = 0.5;
+
+ IntRect partialRect(9, 20, 50, 75);
+ IntRect partialDeviceRect(partialRect);
+ PaintFillPartialOpaque fillPartial(partialDeviceRect);
+ OwnPtr<TestLayerPainterChromium> painter(adoptPtr(new TestLayerPainterChromium(fillPartial)));
+ RefPtr<LayerTextureUpdater> updater = BitmapCanvasLayerTextureUpdater::create(painter.release(), false);
+
+ IntRect opaqueRect;
+ IntRect contentRect(4, 6, 396, 394);
+ updater->prepareToUpdate(contentRect, IntSize(400, 400), 0, contentsScale, opaqueRect);
+
+ // Original rect: 9, 20, 50, 75
+ // Scaled down to half size: 4.5, 10, 25, 37.5
+ // Enclosed int rect: 5, 10, 24, 37
+ // Scaled back up to content: 10, 20, 48, 74
+ IntRect scaledRect(10, 20, 48, 74);
+ EXPECT_EQ_RECT(scaledRect, opaqueRect);
+}
+
} // namespace
diff --git a/Source/WebKit/chromium/tests/LevelDBTest.cpp b/Source/WebKit/chromium/tests/LevelDBTest.cpp
new file mode 100644
index 000000000..2a00ae686
--- /dev/null
+++ b/Source/WebKit/chromium/tests/LevelDBTest.cpp
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * 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"
+
+#if USE(LEVELDB)
+
+#include "FileSystem.h"
+#include "LevelDBComparator.h"
+#include "LevelDBDatabase.h"
+#include "LevelDBSlice.h"
+#include <gtest/gtest.h>
+#include <webkit/support/webkit_support.h>
+#include <wtf/Vector.h>
+
+using namespace WebCore;
+
+namespace {
+
+class SimpleComparator : public LevelDBComparator {
+public:
+ virtual int compare(const LevelDBSlice& a, const LevelDBSlice& b) const OVERRIDE
+ {
+ size_t len = std::min(a.end() - a.begin(), b.end() - b.begin());
+ return memcmp(a.begin(), b.begin(), len);
+ }
+ virtual const char* name() const OVERRIDE { return "temp_comparator"; }
+};
+
+Vector<char> encodeString(const std::string& s)
+{
+ Vector<char> ret(s.size());
+ for (size_t i = 0; i < s.size(); ++i)
+ ret.append(s[i]);
+ return ret;
+}
+
+TEST(LevelDBDatabaseTest, CorruptionTest)
+{
+ OwnPtr<webkit_support::ScopedTempDirectory> tempDirectory = adoptPtr(webkit_support::CreateScopedTempDirectory());
+ tempDirectory->CreateUniqueTempDir();
+ const String path = String::fromUTF8(tempDirectory->path().c_str());
+
+ const Vector<char> key = encodeString("key");
+ const Vector<char> putValue = encodeString("value");
+ Vector<char> gotValue;
+ SimpleComparator comparator;
+
+ OwnPtr<LevelDBDatabase> leveldb = LevelDBDatabase::open(path, &comparator);
+ EXPECT_TRUE(leveldb);
+ bool success = leveldb->put(key, putValue);
+ EXPECT_TRUE(success);
+ leveldb.release();
+ EXPECT_FALSE(leveldb);
+
+ leveldb = LevelDBDatabase::open(path, &comparator);
+ EXPECT_TRUE(leveldb);
+ success = leveldb->get(key, gotValue);
+ EXPECT_TRUE(success);
+ EXPECT_EQ(putValue, gotValue);
+ leveldb.release();
+ EXPECT_FALSE(leveldb);
+
+ const String filepath = pathByAppendingComponent(path, "CURRENT");
+ PlatformFileHandle handle = openFile(filepath, OpenForWrite);
+ truncateFile(handle, 0);
+ closeFile(handle);
+
+ leveldb = LevelDBDatabase::open(path, &comparator);
+ EXPECT_FALSE(leveldb);
+
+ bool destroyed = LevelDBDatabase::destroy(path);
+ EXPECT_TRUE(destroyed);
+
+ leveldb = LevelDBDatabase::open(path, &comparator);
+ EXPECT_TRUE(leveldb);
+ success = leveldb->get(key, gotValue);
+ EXPECT_FALSE(success);
+}
+
+} // namespace
+
+#endif // USE(LEVELDB)
diff --git a/Source/WebKit/chromium/tests/LocaleWinTest.cpp b/Source/WebKit/chromium/tests/LocaleWinTest.cpp
new file mode 100644
index 000000000..d64e902a5
--- /dev/null
+++ b/Source/WebKit/chromium/tests/LocaleWinTest.cpp
@@ -0,0 +1,163 @@
+/*
+ * Copyright (C) 2012 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 "LocaleWin.h"
+
+#include <gtest/gtest.h>
+#include <wtf/DateMath.h>
+#include <wtf/MathExtras.h>
+#include <wtf/PassOwnPtr.h>
+#include <wtf/text/CString.h>
+
+using namespace WebCore;
+using namespace std;
+
+enum {
+ January = 0, February, March,
+ April, May, June,
+ July, August, September,
+ October, November, December,
+};
+
+static double msForDate(int year, int month, int day)
+{
+ return dateToDaysFrom1970(year, month, day) * msPerDay;
+}
+
+TEST(LocaleWinTest, TestLocalizedDateFormatText)
+{
+ EXPECT_STREQ("year/month/day", LocaleWin::dateFormatText("y/M/d", "year", "month", "day").utf8().data());
+ EXPECT_STREQ("year/month/day", LocaleWin::dateFormatText("yy/MM/dd", "year", "month", "day").utf8().data());
+ EXPECT_STREQ("year/month/day", LocaleWin::dateFormatText("yyy/MMM/ddd", "year", "month", "day").utf8().data());
+ EXPECT_STREQ("year/month/day", LocaleWin::dateFormatText("yyyy/MMMM/dddd", "year", "month", "day").utf8().data());
+ EXPECT_STREQ("/month/day, year", LocaleWin::dateFormatText("/MM/dd, yyyy", "year", "month", "day").utf8().data());
+ EXPECT_STREQ("month/day, year=year.", LocaleWin::dateFormatText("MM/dd, 'year='yyyy.", "year", "month", "day").utf8().data());
+ EXPECT_STREQ("month-day 'year", LocaleWin::dateFormatText("MM-dd ''yyy", "year", "month", "day").utf8().data());
+ EXPECT_STREQ("month-day aaa'bbb year", LocaleWin::dateFormatText("MM-dd 'aaa''bbb' yyy", "year", "month", "day").utf8().data());
+ EXPECT_STREQ("year/month/day/year/month/day", LocaleWin::dateFormatText("yyyy/MMMM/dddd/yyyy/MMMM/dddd", "year", "month", "day").utf8().data());
+ EXPECT_STREQ("YY/mm/DD", LocaleWin::dateFormatText("YY/mm/DD", "year", "month", "day").utf8().data());
+}
+
+TEST(LocaleWinTest, TestFormat)
+{
+ const LCID EnglishUS = 0x0409;
+ OwnPtr<LocaleWin> locale = LocaleWin::create(EnglishUS);
+
+ EXPECT_STREQ("4/7/2", locale->formatDate("M/d/y", 2012, 2012, April, 7).utf8().data());
+ EXPECT_STREQ("4/7/2007", locale->formatDate("M/d/y", 2012, 2007, April, 7).utf8().data());
+ EXPECT_STREQ("4/7/8", locale->formatDate("M/d/y", 2012, 2008, April, 7).utf8().data());
+ EXPECT_STREQ("4/7/7", locale->formatDate("M/d/y", 2012, 2017, April, 7).utf8().data());
+ EXPECT_STREQ("4/7/2018", locale->formatDate("M/d/y", 2012, 2018, April, 7).utf8().data());
+ EXPECT_STREQ("12/31/2062", locale->formatDate("M/d/y", 2012, 2062, December, 31).utf8().data());
+ EXPECT_STREQ("4/7/0002", locale->formatDate("M/d/y", 2012, 2, April, 7).utf8().data());
+
+ EXPECT_STREQ("04/27/12", locale->formatDate("MM/dd/yy", 2012, 2012, April, 27).utf8().data());
+ EXPECT_STREQ("04/07/1962", locale->formatDate("MM/dd/yy", 2012, 1962, April, 7).utf8().data());
+ EXPECT_STREQ("04/07/63", locale->formatDate("MM/dd/yy", 2012, 1963, April, 7).utf8().data());
+ EXPECT_STREQ("01/31/00", locale->formatDate("MM/dd/yy", 2012, 2000, January, 31).utf8().data());
+ EXPECT_STREQ("04/07/62", locale->formatDate("MM/dd/yy", 2012, 2062, April, 7).utf8().data());
+ EXPECT_STREQ("04/07/2063", locale->formatDate("MM/dd/yy", 2012, 2063, April, 7).utf8().data());
+ EXPECT_STREQ("04/07/0001", locale->formatDate("MM/dd/yy", 2012, 1, April, 7).utf8().data());
+
+ EXPECT_STREQ("Jan/7/2012", locale->formatDate("MMM/d/yyyy", 2012, 2012, January, 7).utf8().data());
+ EXPECT_STREQ("Feb/7/2008", locale->formatDate("MMM/d/yyyy", 2012, 2008, February, 7).utf8().data());
+ EXPECT_STREQ("Mar/7/2017", locale->formatDate("MMM/d/yyyy", 2012, 2017, March, 7).utf8().data());
+ EXPECT_STREQ("Apr/7/2012", locale->formatDate("MMM/d/yyyy", 2012, 2012, April, 7).utf8().data());
+ EXPECT_STREQ("May/7/0002", locale->formatDate("MMM/d/yyyy", 2012, 2, May, 7).utf8().data());
+ EXPECT_STREQ("Jun/7/2008", locale->formatDate("MMM/d/yyyy", 2012, 2008, June, 7).utf8().data());
+ EXPECT_STREQ("Jul/7/2017", locale->formatDate("MMM/d/yyyy", 2012, 2017, July, 7).utf8().data());
+ EXPECT_STREQ("Aug/31/2062", locale->formatDate("MMM/d/yyyy", 2012, 2062, August, 31).utf8().data());
+ EXPECT_STREQ("Sep/7/0002", locale->formatDate("MMM/d/yyyy", 2012, 2, September, 7).utf8().data());
+ EXPECT_STREQ("Oct/7/2012", locale->formatDate("MMM/d/yyyy", 2012, 2012, October, 7).utf8().data());
+ EXPECT_STREQ("Nov/7/2008", locale->formatDate("MMM/d/yyyy", 2012, 2008, November, 7).utf8().data());
+ EXPECT_STREQ("Dec/31/2062", locale->formatDate("MMM/d/yyyy", 2012, 2062, December, 31).utf8().data());
+
+ EXPECT_STREQ("January-7-2017", locale->formatDate("MMMM-d-yyyy", 2012, 2017, January, 7).utf8().data());
+ EXPECT_STREQ("February-31-2062", locale->formatDate("MMMM-d-yyyy", 2012, 2062, February, 31).utf8().data());
+ EXPECT_STREQ("March-7-0002", locale->formatDate("MMMM-d-yyyy", 2012, 2, March, 7).utf8().data());
+ EXPECT_STREQ("April-7-22012", locale->formatDate("MMMM-d-yyyy", 2012, 22012, April, 7).utf8().data());
+ EXPECT_STREQ("May-7-12008", locale->formatDate("MMMM-d-yyyy", 2012, 12008, May, 7).utf8().data());
+ EXPECT_STREQ("June-7-22012", locale->formatDate("MMMM-d-yyyy", 2012, 22012, June, 7).utf8().data());
+ EXPECT_STREQ("July-7-12008", locale->formatDate("MMMM-d-yyyy", 2012, 12008, July, 7).utf8().data());
+ EXPECT_STREQ("August-7-2017", locale->formatDate("MMMM-d-yyyy", 2012, 2017, August, 7).utf8().data());
+ EXPECT_STREQ("September-31-2062", locale->formatDate("MMMM-d-yyyy", 2012, 2062, September, 31).utf8().data());
+ EXPECT_STREQ("October-7-0002", locale->formatDate("MMMM-d-yyyy", 2012, 2, October, 7).utf8().data());
+ EXPECT_STREQ("November-7-22012", locale->formatDate("MMMM-d-yyyy", 2012, 22012, November, 7).utf8().data());
+ EXPECT_STREQ("December-7-12008", locale->formatDate("MMMM-d-yyyy", 2012, 12008, December, 7).utf8().data());
+
+ EXPECT_STREQ("Jan-1-0001", locale->formatDate("MMM-d-yyyy", 2012, 1, January, 1).utf8().data());
+ EXPECT_STREQ("Sep-13-275760", locale->formatDate("MMM-d-yyyy", 2012, 275760, September, 13).utf8().data());
+
+
+ // For the following test, we'd like to confirm they don't crash and their
+ // results are not important because we can assume invalid arguments are
+ // never passed.
+ EXPECT_STREQ("2012-13-00", locale->formatDate("yyyy-MM-dd", -1, 2012, December + 1, 0).utf8().data());
+ EXPECT_STREQ("-1-00--1", locale->formatDate("y-MM-dd", -1, -1, -1, -1).utf8().data());
+ EXPECT_STREQ("-1-124-33", locale->formatDate("y-MM-dd", 2012, -1, 123, 33).utf8().data());
+
+}
+
+TEST(LocaleWinTest, TestParse)
+{
+ const LCID EnglishUS = 0x0409;
+ OwnPtr<LocaleWin> locale = LocaleWin::create(EnglishUS);
+
+ EXPECT_EQ(msForDate(2012, April, 27), locale->parseDate("MM/dd/yy", 2012, "04/27/12"));
+ EXPECT_EQ(msForDate(2062, April, 27), locale->parseDate("MM/dd/yy", 2012, "04/27/62"));
+ EXPECT_EQ(msForDate(1963, April, 27), locale->parseDate("MM/dd/yy", 2012, "04/27/63"));
+ EXPECT_EQ(msForDate(2012, April, 27), locale->parseDate("MM/dd/yy", 2012, "4/27/2012"));
+ EXPECT_EQ(msForDate(2012, April, 27), locale->parseDate("MM/dd/yy", 2012, "Apr/27/2012"));
+ EXPECT_EQ(msForDate(2, April, 27), locale->parseDate("MM/d/yy", 2012, "April/27/2"));
+ EXPECT_EQ(msForDate(2, April, 27), locale->parseDate("MM/d/yy", 2012, "april/27/2"));
+ EXPECT_TRUE(isnan(locale->parseDate("MM/d/yy", 2012, "april/27")));
+ EXPECT_TRUE(isnan(locale->parseDate("MM/d/yy", 2012, "april/27/")));
+ EXPECT_TRUE(isnan(locale->parseDate("MM/d/yy", 2012, " april/27/")));
+
+ EXPECT_EQ(msForDate(12, April, 7), locale->parseDate("MMM/d/yyyy", 2012, "04/7/12"));
+ EXPECT_EQ(msForDate(62, April, 7), locale->parseDate("MMM/d/yyyy", 2012, "04/07/62"));
+ EXPECT_EQ(msForDate(63, April, 7), locale->parseDate("MMM/d/yyyy", 2012, "04/07/63"));
+ EXPECT_EQ(msForDate(2012, April, 7), locale->parseDate("MMM/d/yyyy", 2012, "4/7/2012"));
+ EXPECT_EQ(msForDate(2012, May, 7), locale->parseDate("MMM/d/yyyy", 2012, "May/007/2012"));
+ EXPECT_EQ(msForDate(2, May, 27), locale->parseDate("MM/d/yyyy", 2012, "May/0027/2"));
+ EXPECT_TRUE(isnan(locale->parseDate("MM/d/yyyy", 2012, "May///0027///2")));
+ EXPECT_TRUE(isnan(locale->parseDate("MM/d/yyyy", 2012, "Mayyyyyy/0027/2")));
+
+ EXPECT_EQ(msForDate(2012, April, 27), locale->parseDate("MMMM/dd/y", 2012, "04/27/2"));
+ EXPECT_EQ(msForDate(2017, April, 27), locale->parseDate("MMMM/dd/y", 2012, "04/27/7"));
+ EXPECT_EQ(msForDate(2008, April, 27), locale->parseDate("MMMM/dd/y", 2012, "04/27/8"));
+ EXPECT_EQ(msForDate(2012, April, 27), locale->parseDate("MMMM/dd/y", 2012, "4/27/2012"));
+ EXPECT_EQ(msForDate(2012, December, 27), locale->parseDate("MMMM/dd/y", 2012, "December/27/2012"));
+ EXPECT_EQ(msForDate(2012, November, 27), locale->parseDate("MMMM/d/y", 2012, "November/27/2"));
+ EXPECT_TRUE(isnan(locale->parseDate("MMMM/d/y", 2012, "November 27 2")));
+ EXPECT_TRUE(isnan(locale->parseDate("MMMM/d/y", 2012, "November 32 2")));
+ EXPECT_TRUE(isnan(locale->parseDate("MMMM/d/y", 2012, "-1/-1/-1")));
+}
diff --git a/Source/WebKit/chromium/tests/LocalizedNumberICUTest.cpp b/Source/WebKit/chromium/tests/LocalizedNumberICUTest.cpp
index 6203d35d7..92f85c6bb 100644
--- a/Source/WebKit/chromium/tests/LocalizedNumberICUTest.cpp
+++ b/Source/WebKit/chromium/tests/LocalizedNumberICUTest.cpp
@@ -29,8 +29,8 @@
*/
#include "config.h"
-#include "LocalizedNumberICU.h"
+#include "LocaleICU.h"
#include <gtest/gtest.h>
#include <wtf/PassOwnPtr.h>
@@ -38,7 +38,7 @@ using namespace WebCore;
void testNumberIsReversible(const char* localeString, const char* original, const char* shouldHave = 0)
{
- OwnPtr<ICULocale> locale = ICULocale::create(localeString);
+ OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
String localized = locale->convertToLocalizedNumber(original);
if (shouldHave)
EXPECT_TRUE(localized.contains(shouldHave));
diff --git a/Source/WebKit/chromium/tests/MockCCQuadCuller.h b/Source/WebKit/chromium/tests/MockCCQuadCuller.h
new file mode 100644
index 000000000..d9cd31326
--- /dev/null
+++ b/Source/WebKit/chromium/tests/MockCCQuadCuller.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2012 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef MockCCQuadCuller_h
+#define MockCCQuadCuller_h
+
+#include "IntRect.h"
+#include "cc/CCDrawQuad.h"
+#include "cc/CCQuadCuller.h"
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+
+class MockCCQuadCuller : public WebCore::CCQuadCuller {
+public:
+ MockCCQuadCuller()
+ : CCQuadCuller(m_quadListStorage, 0, 0)
+ , m_activeQuadList(m_quadListStorage)
+ { }
+
+ explicit MockCCQuadCuller(CCQuadList& externalQuadList)
+ : CCQuadCuller(externalQuadList, 0, 0)
+ , m_activeQuadList(externalQuadList)
+ { }
+
+ virtual bool append(WTF::PassOwnPtr<WebCore::CCDrawQuad> newQuad)
+ {
+ OwnPtr<WebCore::CCDrawQuad> drawQuad = newQuad;
+ if (!drawQuad->quadRect().isEmpty()) {
+ m_activeQuadList.append(drawQuad.release());
+ return true;
+ }
+ return false;
+ }
+
+ const WebCore::CCQuadList& quadList() const { return m_activeQuadList; };
+
+private:
+ WebCore::CCQuadList& m_activeQuadList;
+ WebCore::CCQuadList m_quadListStorage;
+};
+
+} // namespace WebCore
+#endif // MockCCQuadCuller_h
diff --git a/Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp b/Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp
index b0d86ddf6..721f1fabb 100644
--- a/Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp
+++ b/Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp
@@ -39,9 +39,9 @@ namespace {
#define EXPECT_EQ_RECT(a, b) \
EXPECT_EQ(a.x(), b.x()); \
- EXPECT_EQ(a.maxX(), b.maxX()); \
EXPECT_EQ(a.y(), b.y()); \
- EXPECT_EQ(a.maxY(), b.maxY());
+ EXPECT_EQ(a.width(), b.width()); \
+ EXPECT_EQ(a.height(), b.height());
#define EXPECT_PIXELS_MATCH(bitmap, opaqueRect) \
{ \
@@ -53,6 +53,17 @@ namespace {
} \
}
+#define EXPECT_PIXELS_MATCH_EXACT(bitmap, opaqueRect) \
+{ \
+ SkAutoLockPixels locker(bitmap); \
+ for (int y = 0; y < bitmap.height(); ++y) \
+ for (int x = 0; x < bitmap.width(); ++x) { \
+ int alpha = *bitmap.getAddr32(x, y) >> 24; \
+ bool opaque = opaqueRect.contains(x, y); \
+ EXPECT_EQ(opaque, alpha == 255); \
+ } \
+}
+
TEST(PlatformContextSkiaTest, trackOpaqueTest)
{
SkBitmap bitmap;
@@ -215,9 +226,90 @@ TEST(PlatformContextSkiaTest, trackOpaqueClipTest)
context.save();
context.clipToImageBuffer(alphaImage.get(), FloatRect(30, 30, 10, 10));
context.fillRect(FloatRect(10, 10, 90, 90), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+ context.restore();
EXPECT_EQ_RECT(IntRect(), platformContext.opaqueRegion().asRect());
EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
- context.restore();
+}
+
+TEST(PlatformContextSkiaTest, trackImageMask)
+{
+ SkBitmap bitmap;
+ bitmap.setConfig(SkBitmap::kARGB_8888_Config, 400, 400);
+ bitmap.allocPixels();
+ bitmap.eraseColor(0);
+ SkCanvas canvas(bitmap);
+
+ PlatformContextSkia platformContext(&canvas);
+ platformContext.setTrackOpaqueRegion(true);
+ GraphicsContext context(&platformContext);
+
+ Color opaque(1.0f, 0.0f, 0.0f, 1.0f);
+ Color alpha(0.0f, 0.0f, 0.0f, 0.0f);
+
+ // Image masks are done by drawing a bitmap into a transparency layer that uses DstIn to mask
+ // out a transparency layer below that is filled with the mask color. In the end this should
+ // not be marked opaque.
+
+ context.setCompositeOperation(CompositeSourceOver);
+ context.beginTransparencyLayer(1);
+ context.fillRect(FloatRect(10, 10, 10, 10), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+
+ context.setCompositeOperation(CompositeDestinationIn);
+ context.beginTransparencyLayer(1);
+
+ OwnPtr<ImageBuffer> alphaImage = ImageBuffer::create(IntSize(100, 100));
+ alphaImage->context()->fillRect(IntRect(0, 0, 100, 100), alpha, ColorSpaceDeviceRGB);
+
+ context.setCompositeOperation(CompositeSourceOver);
+ context.drawImageBuffer(alphaImage.get(), ColorSpaceDeviceRGB, FloatRect(10, 10, 10, 10));
+
+ context.endTransparencyLayer();
+ context.endTransparencyLayer();
+
+ EXPECT_EQ_RECT(IntRect(), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH_EXACT(bitmap, platformContext.opaqueRegion().asRect());
+}
+
+TEST(PlatformContextSkiaTest, trackImageMaskWithOpaqueRect)
+{
+ SkBitmap bitmap;
+ bitmap.setConfig(SkBitmap::kARGB_8888_Config, 400, 400);
+ bitmap.allocPixels();
+ bitmap.eraseColor(0);
+ SkCanvas canvas(bitmap);
+
+ PlatformContextSkia platformContext(&canvas);
+ platformContext.setTrackOpaqueRegion(true);
+ GraphicsContext context(&platformContext);
+
+ Color opaque(1.0f, 0.0f, 0.0f, 1.0f);
+ Color alpha(0.0f, 0.0f, 0.0f, 0.0f);
+
+ // Image masks are done by drawing a bitmap into a transparency layer that uses DstIn to mask
+ // out a transparency layer below that is filled with the mask color. In the end this should
+ // not be marked opaque.
+
+ context.setCompositeOperation(CompositeSourceOver);
+ context.beginTransparencyLayer(1);
+ context.fillRect(FloatRect(10, 10, 10, 10), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+
+ context.setCompositeOperation(CompositeDestinationIn);
+ context.beginTransparencyLayer(1);
+
+ OwnPtr<ImageBuffer> alphaImage = ImageBuffer::create(IntSize(100, 100));
+ alphaImage->context()->fillRect(IntRect(0, 0, 100, 100), alpha, ColorSpaceDeviceRGB);
+
+ context.setCompositeOperation(CompositeSourceOver);
+ context.drawImageBuffer(alphaImage.get(), ColorSpaceDeviceRGB, FloatRect(10, 10, 10, 10));
+
+ // We can't have an opaque mask actually, but we can pretend here like it would look if we did.
+ context.fillRect(FloatRect(12, 12, 3, 3), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+
+ context.endTransparencyLayer();
+ context.endTransparencyLayer();
+
+ EXPECT_EQ_RECT(IntRect(12, 12, 3, 3), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH_EXACT(bitmap, platformContext.opaqueRegion().asRect());
}
TEST(PlatformContextSkiaTest, trackOpaqueJoinTest)
@@ -572,113 +664,170 @@ TEST(PlatformContextSkiaTest, trackOpaqueOvalTest)
EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
}
-TEST(PlatformContextSkiaTest, layerTransformTranslateOpaqueTest)
+TEST(PlatformContextSkiaTest, contextTransparencyLayerTest)
{
SkBitmap bitmap;
bitmap.setConfig(SkBitmap::kARGB_8888_Config, 400, 400);
bitmap.allocPixels();
bitmap.eraseColor(0);
SkCanvas canvas(bitmap);
- AffineTransform transform;
- transform.translate(10, 10);
PlatformContextSkia platformContext(&canvas);
platformContext.setTrackOpaqueRegion(true);
- platformContext.setOpaqueRegionTransform(transform);
GraphicsContext context(&platformContext);
-
+
Color opaque(1.0f, 0.0f, 0.0f, 1.0f);
-
- context.fillRect(FloatRect(10, 10, 90, 90), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
- EXPECT_EQ_RECT(IntRect(20, 20, 90, 90), platformContext.opaqueRegion().asRect());
- EXPECT_PIXELS_MATCH(bitmap, transform.inverse().mapRect(platformContext.opaqueRegion().asRect()));
-
- context.clearRect(FloatRect(10, 10, 90, 90));
+
+ context.fillRect(FloatRect(20, 20, 10, 10), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+ EXPECT_EQ_RECT(IntRect(20, 20, 10, 10), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ context.clearRect(FloatRect(20, 20, 10, 10));
EXPECT_EQ_RECT(IntRect(), platformContext.opaqueRegion().asRect());
- context.translate(30, 30);
+ context.beginTransparencyLayer(0.5);
+ context.save();
+ context.fillRect(FloatRect(20, 20, 10, 10), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+ context.restore();
+ context.endTransparencyLayer();
+ EXPECT_EQ_RECT(IntRect(), platformContext.opaqueRegion().asRect());
- context.fillRect(FloatRect(10, 10, 90, 90), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
- EXPECT_EQ_RECT(IntRect(50, 50, 90, 90), platformContext.opaqueRegion().asRect());
- EXPECT_PIXELS_MATCH(bitmap, transform.inverse().mapRect(platformContext.opaqueRegion().asRect()));
+ context.clearRect(FloatRect(20, 20, 10, 10));
+ EXPECT_EQ_RECT(IntRect(), platformContext.opaqueRegion().asRect());
- context.clearRect(FloatRect(10, 10, 90, 90));
+ context.beginTransparencyLayer(0.5);
+ context.fillRect(FloatRect(20, 20, 10, 10), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+ context.endTransparencyLayer();
EXPECT_EQ_RECT(IntRect(), platformContext.opaqueRegion().asRect());
}
-TEST(PlatformContextSkiaTest, layerTransformScaleOpaqueTest)
+TEST(PlatformContextSkiaTest, UnboundedDrawsAreClipped)
{
SkBitmap bitmap;
bitmap.setConfig(SkBitmap::kARGB_8888_Config, 400, 400);
bitmap.allocPixels();
bitmap.eraseColor(0);
SkCanvas canvas(bitmap);
- AffineTransform transform;
- transform.scale(2);
PlatformContextSkia platformContext(&canvas);
platformContext.setTrackOpaqueRegion(true);
- platformContext.setOpaqueRegionTransform(transform);
GraphicsContext context(&platformContext);
Color opaque(1.0f, 0.0f, 0.0f, 1.0f);
+ Color alpha(0.0f, 0.0f, 0.0f, 0.0f);
- context.fillRect(FloatRect(20, 20, 10, 10), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
- EXPECT_EQ_RECT(IntRect(40, 40, 20, 20), platformContext.opaqueRegion().asRect());
- EXPECT_PIXELS_MATCH(bitmap, transform.inverse().mapRect(platformContext.opaqueRegion().asRect()));
+ Path path;
+ context.setShouldAntialias(false);
+ context.setMiterLimit(1);
+ context.setStrokeThickness(5);
+ context.setLineCap(SquareCap);
+ context.setStrokeStyle(SolidStroke);
- context.clearRect(FloatRect(20, 20, 10, 10));
- EXPECT_EQ_RECT(IntRect(), platformContext.opaqueRegion().asRect());
+ // Make skia unable to compute fast bounds for our paths.
+ Vector<float> dashArray;
+ dashArray.append(1);
+ dashArray.append(0);
+ context.setLineDash(dashArray, 0);
- context.scale(FloatSize(2, 1));
- context.translate(0, 10);
+ // Make the device opaque in 10,10 40x40.
+ context.fillRect(FloatRect(10, 10, 40, 40), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+ EXPECT_EQ_RECT(IntRect(10, 10, 40, 40), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH_EXACT(bitmap, platformContext.opaqueRegion().asRect());
- context.fillRect(FloatRect(20, 20, 10, 10), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
- EXPECT_EQ_RECT(IntRect(80, 60, 40, 20), platformContext.opaqueRegion().asRect());
- EXPECT_PIXELS_MATCH(bitmap, transform.inverse().mapRect(platformContext.opaqueRegion().asRect()));
+ // Clip to the left edge of the opaque area.
+ context.clip(IntRect(10, 10, 10, 40));
- context.clearRect(FloatRect(20, 20, 10, 10));
- EXPECT_EQ_RECT(IntRect(), platformContext.opaqueRegion().asRect());
+ // Draw a path that gets clipped. This should destroy the opaque area but only inside the clip.
+ context.setCompositeOperation(CompositeSourceOut);
+ context.setFillColor(alpha, ColorSpaceDeviceRGB);
+ path.moveTo(FloatPoint(10, 10));
+ path.addLineTo(FloatPoint(40, 40));
+ context.strokePath(path);
+
+ EXPECT_EQ_RECT(IntRect(20, 10, 30, 40), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
}
-TEST(PlatformContextSkiaTest, contextTransparencyLayerTest)
+TEST(PlatformContextSkiaTest, PreserveOpaqueOnlyMattersForFirstLayer)
{
SkBitmap bitmap;
bitmap.setConfig(SkBitmap::kARGB_8888_Config, 400, 400);
bitmap.allocPixels();
bitmap.eraseColor(0);
SkCanvas canvas(bitmap);
- AffineTransform transform;
- transform.scale(2);
PlatformContextSkia platformContext(&canvas);
platformContext.setTrackOpaqueRegion(true);
- platformContext.setOpaqueRegionTransform(transform);
GraphicsContext context(&platformContext);
-
+
Color opaque(1.0f, 0.0f, 0.0f, 1.0f);
-
- context.fillRect(FloatRect(20, 20, 10, 10), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
- EXPECT_EQ_RECT(IntRect(40, 40, 20, 20), platformContext.opaqueRegion().asRect());
- EXPECT_PIXELS_MATCH(bitmap, transform.inverse().mapRect(platformContext.opaqueRegion().asRect()));
-
- context.clearRect(FloatRect(20, 20, 10, 10));
- EXPECT_EQ_RECT(IntRect(), platformContext.opaqueRegion().asRect());
+ Color alpha(0.0f, 0.0f, 0.0f, 0.0f);
+ Path path;
+ context.setShouldAntialias(false);
+ context.setMiterLimit(1);
+ context.setStrokeThickness(5);
+ context.setLineCap(SquareCap);
+ context.setStrokeStyle(SolidStroke);
+
+ // Make skia unable to compute fast bounds for our paths.
+ Vector<float> dashArray;
+ dashArray.append(1);
+ dashArray.append(0);
+ context.setLineDash(dashArray, 0);
+
+ // Make the device opaque in 10,10 40x40.
+ context.fillRect(FloatRect(10, 10, 40, 40), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+ EXPECT_EQ_RECT(IntRect(10, 10, 40, 40), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH_EXACT(bitmap, platformContext.opaqueRegion().asRect());
+
+ // Begin a layer that preserves opaque.
+ context.setCompositeOperation(CompositeSourceOver);
context.beginTransparencyLayer(0.5);
- context.save();
- context.fillRect(FloatRect(20, 20, 10, 10), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
- context.restore();
+
+ // Begin a layer that does not preserve opaque.
+ context.setCompositeOperation(CompositeSourceOut);
+ context.beginTransparencyLayer(0.5);
+
+ // This should not destroy the device opaqueness.
+ context.fillRect(FloatRect(10, 10, 40, 40), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+
+ // This should not destroy the device opaqueness either.
+ context.setFillColor(opaque, ColorSpaceDeviceRGB);
+ path.moveTo(FloatPoint(10, 10));
+ path.addLineTo(FloatPoint(40, 40));
+ context.strokePath(path);
+
context.endTransparencyLayer();
- EXPECT_EQ_RECT(IntRect(), platformContext.opaqueRegion().asRect());
+ context.endTransparencyLayer();
+ EXPECT_EQ_RECT(IntRect(10, 10, 40, 40), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH_EXACT(bitmap, platformContext.opaqueRegion().asRect());
- context.clearRect(FloatRect(20, 20, 10, 10));
+ // Now begin a layer that does not preserve opaque and draw through it to the device.
+ context.setCompositeOperation(CompositeSourceOut);
+ context.beginTransparencyLayer(0.5);
+
+ // This should destroy the device opaqueness.
+ context.fillRect(FloatRect(10, 10, 40, 40), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+
+ context.endTransparencyLayer();
EXPECT_EQ_RECT(IntRect(), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH_EXACT(bitmap, platformContext.opaqueRegion().asRect());
+
+ // Now we draw with a path for which it cannot compute fast bounds. This should destroy the entire opaque region.
+ context.setCompositeOperation(CompositeSourceOut);
context.beginTransparencyLayer(0.5);
- context.fillRect(FloatRect(20, 20, 10, 10), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+
+ // This should nuke the device opaqueness.
+ context.setFillColor(opaque, ColorSpaceDeviceRGB);
+ path.moveTo(FloatPoint(10, 10));
+ path.addLineTo(FloatPoint(40, 40));
+ context.strokePath(path);
+
context.endTransparencyLayer();
EXPECT_EQ_RECT(IntRect(), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH_EXACT(bitmap, platformContext.opaqueRegion().asRect());
}
} // namespace
diff --git a/Source/WebKit/chromium/tests/PlatformGestureCurveTest.cpp b/Source/WebKit/chromium/tests/PlatformGestureCurveTest.cpp
index 74ca57667..362727c04 100644
--- a/Source/WebKit/chromium/tests/PlatformGestureCurveTest.cpp
+++ b/Source/WebKit/chromium/tests/PlatformGestureCurveTest.cpp
@@ -29,7 +29,7 @@
#include "ActivePlatformGestureAnimation.h"
#include "PlatformGestureCurveTarget.h"
-#include "TouchFlingPlatformGestureCurve.h"
+#include "TouchpadFlingPlatformGestureCurve.h"
#include "WheelFlingPlatformGestureCurve.h"
#include "cc/CCActiveGestureAnimation.h"
#include "cc/CCGestureCurve.h"
@@ -42,7 +42,7 @@ using namespace WebCore;
class MockPlatformGestureCurveTarget : public PlatformGestureCurveTarget {
public:
- virtual void setScrollIncrement(const IntPoint& delta)
+ virtual void scrollBy(const IntPoint& delta)
{
m_cumulativeDelta = m_cumulativeDelta + delta;
}
@@ -57,7 +57,7 @@ private:
TEST(PlatformGestureCurve, flingCurve)
{
MockPlatformGestureCurveTarget target;
- OwnPtr<ActivePlatformGestureAnimation> animation = ActivePlatformGestureAnimation::create(0, WheelFlingPlatformGestureCurve::create(FloatPoint(100, 0)), &target);
+ OwnPtr<ActivePlatformGestureAnimation> animation = ActivePlatformGestureAnimation::create(WheelFlingPlatformGestureCurve::create(FloatPoint(100, 0)), &target);
// Note: the expectations below are dependent on the value of sigma hard-coded in the Rayleigh
// curve. If sigma changes, these test expectations will also change.
@@ -69,23 +69,24 @@ TEST(PlatformGestureCurve, flingCurve)
EXPECT_FALSE(animation->animate(1001));
// Since the Rayleigh CDF maxes out at 1, we expect the cumulative scroll increments to
// match the input velocity parameter.
- // Since we can be off by +/-0.5 on each conversion to int for setScrollIncrement,
- // pick the 'nearness' to be within the number of times animate returns true.
EXPECT_NEAR(target.cumulativeDelta().x(), 100, 1);
EXPECT_EQ(target.cumulativeDelta().y(), 0);
+ // Test animation when not starting at t = 0.
double baseTime = 42.42;
- animation = ActivePlatformGestureAnimation::create(baseTime, WheelFlingPlatformGestureCurve::create(FloatPoint(100, 0)), &target);
+ animation = ActivePlatformGestureAnimation::create(WheelFlingPlatformGestureCurve::create(FloatPoint(100, 0)), &target);
target.resetCumulativeDelta();
EXPECT_TRUE(animation->animate(baseTime + 0.35));
EXPECT_TRUE(animation->animate(baseTime + 1.35));
- EXPECT_FALSE(animation->animate(baseTime + 1000));
+ EXPECT_TRUE(animation->animate(baseTime + 1000));
+ EXPECT_FALSE(animation->animate(baseTime + 1001));
EXPECT_NEAR(target.cumulativeDelta().x(), 100, 1);
- animation = ActivePlatformGestureAnimation::create(0, WheelFlingPlatformGestureCurve::create(FloatPoint(50, 150)), &target);
+ animation = ActivePlatformGestureAnimation::create(WheelFlingPlatformGestureCurve::create(FloatPoint(50, 150)), &target);
target.resetCumulativeDelta();
+ // Test animation with both horizontal and vertical scroll velocities.
EXPECT_TRUE(animation->animate(0));
EXPECT_TRUE(animation->animate(0.25));
EXPECT_TRUE(animation->animate(0.45));
@@ -98,21 +99,18 @@ TEST(PlatformGestureCurve, flingCurve)
TEST(PlatformGestureCurve, flingCurveTouch)
{
+ double initialVelocity = 5000;
MockPlatformGestureCurveTarget target;
- OwnPtr<ActivePlatformGestureAnimation> animation = ActivePlatformGestureAnimation::create(0, TouchFlingPlatformGestureCurve::create(FloatPoint(1000, 0)), &target);
+ OwnPtr<ActivePlatformGestureAnimation> animation = ActivePlatformGestureAnimation::create(TouchpadFlingPlatformGestureCurve::create(FloatPoint(initialVelocity, 0)), &target);
- // Note: the expectations below are dependent on the value of sigma hard-coded in the Rayleigh
- // curve. If sigma changes, these test expectations will also change.
+ // Note: the expectations below are dependent on the value of sigma hard-coded in the curve parameters.
+ // If the parameters change, then the tests values/expectations will need to be updated.
EXPECT_TRUE(animation->animate(0));
EXPECT_TRUE(animation->animate(0.25));
EXPECT_TRUE(animation->animate(0.45)); // Use non-uniform tick spacing.
- EXPECT_TRUE(animation->animate(0.75));
- EXPECT_TRUE(animation->animate(0.9));
- EXPECT_TRUE(animation->animate(1000));
- EXPECT_FALSE(animation->animate(1001));
- // Since we can be off by +/-0.5 on each conversion to int for setScrollIncrement,
- // pick the 'nearness' to be within the 5 * number of times animate returns true.
- EXPECT_NEAR(target.cumulativeDelta().x(), 1000, 1);
+ EXPECT_TRUE(animation->animate(1));
+ EXPECT_FALSE(animation->animate(1.5));
+ EXPECT_NEAR(target.cumulativeDelta().x(), 1193, 1);
EXPECT_EQ(target.cumulativeDelta().y(), 0);
}
diff --git a/Source/WebKit/chromium/tests/PopupMenuTest.cpp b/Source/WebKit/chromium/tests/PopupMenuTest.cpp
index f053ca410..1db65ec6e 100644
--- a/Source/WebKit/chromium/tests/PopupMenuTest.cpp
+++ b/Source/WebKit/chromium/tests/PopupMenuTest.cpp
@@ -42,6 +42,7 @@
#include "PopupMenu.h"
#include "PopupMenuClient.h"
#include "PopupMenuChromium.h"
+#include "RuntimeEnabledFeatures.h"
#include "WebDocument.h"
#include "WebElement.h"
#include "WebFrame.h"
@@ -154,7 +155,7 @@ public:
// We need to override this so that the popup menu size is not 0
// (the layout code checks to see if the popup fits on the screen).
virtual WebScreenInfo screenInfo()
- {
+ {
WebScreenInfo screenInfo;
screenInfo.availableRect.height = 2000;
screenInfo.availableRect.width = 2000;
@@ -181,6 +182,10 @@ public:
protected:
virtual void SetUp()
{
+ // When touch is enabled, padding is added to option elements
+ // In these tests, we'll assume touch is disabled.
+ m_touchWasEnabled = RuntimeEnabledFeatures::touchEnabled();
+ RuntimeEnabledFeatures::setTouchEnabled(false);
m_webView = static_cast<WebViewImpl*>(WebView::create(&m_webviewClient));
m_webView->initializeMainFrame(&m_webFrameClient);
m_popupMenu = adoptRef(new PopupMenuChromium(&m_popupMenuClient));
@@ -191,6 +196,7 @@ protected:
m_popupMenu = 0;
m_webView->close();
webkit_support::UnregisterAllMockedURLs();
+ RuntimeEnabledFeatures::setTouchEnabled(m_touchWasEnabled);
}
// Returns true if there currently is a select popup in the WebView.
@@ -278,6 +284,7 @@ protected:
TestWebFrameClient m_webFrameClient;
TestPopupMenuClient m_popupMenuClient;
RefPtr<PopupMenu> m_popupMenu;
+ bool m_touchWasEnabled;
std::string baseURL;
};
diff --git a/Source/WebKit/chromium/tests/RegionTest.cpp b/Source/WebKit/chromium/tests/RegionTest.cpp
new file mode 100644
index 000000000..d202ab40c
--- /dev/null
+++ b/Source/WebKit/chromium/tests/RegionTest.cpp
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2012 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "Region.h"
+
+#include <gtest/gtest.h>
+
+using namespace WebCore;
+
+namespace {
+
+#define TEST_INSIDE_RECT(r, x, y, w, h) \
+ EXPECT_TRUE(r.contains(IntPoint(x, y))); \
+ EXPECT_TRUE(r.contains(IntPoint(x + w - 1, y))); \
+ EXPECT_TRUE(r.contains(IntPoint(x, y + h - 1))); \
+ EXPECT_TRUE(r.contains(IntPoint(x + w - 1, y + h - 1))); \
+ EXPECT_TRUE(r.contains(IntPoint(x, y + h / 2))); \
+ EXPECT_TRUE(r.contains(IntPoint(x + w - 1, y + h / 2))); \
+ EXPECT_TRUE(r.contains(IntPoint(x + w / 2, y))); \
+ EXPECT_TRUE(r.contains(IntPoint(x + w / 2, y + h - 1))); \
+ EXPECT_TRUE(r.contains(IntPoint(x + w / 2, y + h / 2))); \
+
+#define TEST_LEFT_OF_RECT(r, x, y, w, h) \
+ EXPECT_FALSE(r.contains(IntPoint(x - 1, y))); \
+ EXPECT_FALSE(r.contains(IntPoint(x - 1, y + h - 1))); \
+
+#define TEST_RIGHT_OF_RECT(r, x, y, w, h) \
+ EXPECT_FALSE(r.contains(IntPoint(x + w, y))); \
+ EXPECT_FALSE(r.contains(IntPoint(x + w, y + h - 1))); \
+
+#define TEST_TOP_OF_RECT(r, x, y, w, h) \
+ EXPECT_FALSE(r.contains(IntPoint(x, y - 1))); \
+ EXPECT_FALSE(r.contains(IntPoint(x + w - 1, y - 1))); \
+
+#define TEST_BOTTOM_OF_RECT(r, x, y, w, h) \
+ EXPECT_FALSE(r.contains(IntPoint(x, y + h))); \
+ EXPECT_FALSE(r.contains(IntPoint(x + w - 1, y + h))); \
+
+TEST(RegionTest, containsPoint)
+{
+ Region r;
+
+ EXPECT_FALSE(r.contains(IntPoint(0, 0)));
+
+ r.unite(IntRect(35, 35, 1, 1));
+ TEST_INSIDE_RECT(r, 35, 35, 1, 1);
+ TEST_LEFT_OF_RECT(r, 35, 35, 1, 1);
+ TEST_RIGHT_OF_RECT(r, 35, 35, 1, 1);
+ TEST_TOP_OF_RECT(r, 35, 35, 1, 1);
+ TEST_BOTTOM_OF_RECT(r, 35, 35, 1, 1);
+
+ r.unite(IntRect(30, 30, 10, 10));
+ TEST_INSIDE_RECT(r, 30, 30, 10, 10);
+ TEST_LEFT_OF_RECT(r, 30, 30, 10, 10);
+ TEST_RIGHT_OF_RECT(r, 30, 30, 10, 10);
+ TEST_TOP_OF_RECT(r, 30, 30, 10, 10);
+ TEST_BOTTOM_OF_RECT(r, 30, 30, 10, 10);
+
+ r.unite(IntRect(31, 40, 10, 10));
+ EXPECT_FALSE(r.contains(IntPoint(30, 40)));
+ EXPECT_TRUE(r.contains(IntPoint(31, 40)));
+ EXPECT_FALSE(r.contains(IntPoint(40, 39)));
+ EXPECT_TRUE(r.contains(IntPoint(40, 40)));
+
+ TEST_INSIDE_RECT(r, 30, 30, 10, 10);
+ TEST_LEFT_OF_RECT(r, 30, 30, 10, 10);
+ TEST_RIGHT_OF_RECT(r, 30, 30, 10, 10);
+ TEST_TOP_OF_RECT(r, 30, 30, 10, 10);
+ TEST_INSIDE_RECT(r, 31, 40, 10, 10);
+ TEST_LEFT_OF_RECT(r, 31, 40, 10, 10);
+ TEST_RIGHT_OF_RECT(r, 31, 40, 10, 10);
+ TEST_BOTTOM_OF_RECT(r, 31, 40, 10, 10);
+
+ r.unite(IntRect(42, 40, 10, 10));
+
+ TEST_INSIDE_RECT(r, 42, 40, 10, 10);
+ TEST_LEFT_OF_RECT(r, 42, 40, 10, 10);
+ TEST_RIGHT_OF_RECT(r, 42, 40, 10, 10);
+ TEST_TOP_OF_RECT(r, 42, 40, 10, 10);
+ TEST_BOTTOM_OF_RECT(r, 42, 40, 10, 10);
+
+ TEST_INSIDE_RECT(r, 30, 30, 10, 10);
+ TEST_LEFT_OF_RECT(r, 30, 30, 10, 10);
+ TEST_RIGHT_OF_RECT(r, 30, 30, 10, 10);
+ TEST_TOP_OF_RECT(r, 30, 30, 10, 10);
+ TEST_INSIDE_RECT(r, 31, 40, 10, 10);
+ TEST_LEFT_OF_RECT(r, 31, 40, 10, 10);
+ TEST_RIGHT_OF_RECT(r, 31, 40, 10, 10);
+ TEST_BOTTOM_OF_RECT(r, 31, 40, 10, 10);
+}
+
+TEST(RegionTest, emptySpan)
+{
+ Region r;
+ r.unite(IntRect(5, 0, 10, 10));
+ r.unite(IntRect(0, 5, 10, 10));
+ r.subtract(IntRect(7, 7, 10, 0));
+
+ Vector<IntRect> rects = r.rects();
+ for (size_t i = 0; i < rects.size(); ++i)
+ EXPECT_FALSE(rects[i].isEmpty());
+}
+
+} // namespace
diff --git a/Source/WebKit/chromium/tests/RenderTableCellTest.cpp b/Source/WebKit/chromium/tests/RenderTableCellTest.cpp
index 049b53534..b4c554a76 100644
--- a/Source/WebKit/chromium/tests/RenderTableCellTest.cpp
+++ b/Source/WebKit/chromium/tests/RenderTableCellTest.cpp
@@ -91,25 +91,12 @@ TEST_F(RenderTableCellDeathTest, CanSetColumn)
EXPECT_EQ(columnIndex, m_cell->col());
}
-TEST_F(RenderTableCellDeathTest, CanSetRow)
-{
- static const unsigned rowIndex = 10;
- m_cell->setRow(rowIndex);
- EXPECT_EQ(rowIndex, m_cell->row());
-}
-
TEST_F(RenderTableCellDeathTest, CanSetColumnToMaxColumnIndex)
{
m_cell->setCol(maxColumnIndex);
EXPECT_EQ(maxColumnIndex, m_cell->col());
}
-TEST_F(RenderTableCellDeathTest, CanSetRowToMaxRowIndex)
-{
- m_cell->setRow(maxRowIndex);
- EXPECT_EQ(maxRowIndex, m_cell->row());
-}
-
// FIXME: Re-enable these tests once ASSERT_DEATH is supported for Android.
// See: https://bugs.webkit.org/show_bug.cgi?id=74089
#if !OS(ANDROID)
@@ -119,21 +106,11 @@ TEST_F(RenderTableCellDeathTest, CrashIfColumnOverflowOnSetting)
ASSERT_DEATH(m_cell->setCol(maxColumnIndex + 1), "");
}
-TEST_F(RenderTableCellDeathTest, CrashIfRowOverflowOnSetting)
-{
- ASSERT_DEATH(m_cell->setRow(maxRowIndex + 1), "");
-}
-
TEST_F(RenderTableCellDeathTest, CrashIfSettingUnsetColumnIndex)
{
ASSERT_DEATH(m_cell->setCol(unsetColumnIndex), "");
}
-TEST_F(RenderTableCellDeathTest, CrashIfSettingUnsetRowIndex)
-{
- ASSERT_DEATH(m_cell->setRow(unsetRowIndex), "");
-}
-
#endif
}
diff --git a/Source/WebKit/chromium/tests/RenderTableRowTest.cpp b/Source/WebKit/chromium/tests/RenderTableRowTest.cpp
new file mode 100644
index 000000000..a5ee2a347
--- /dev/null
+++ b/Source/WebKit/chromium/tests/RenderTableRowTest.cpp
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * 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.
+ */
+// FIXME: If we get the TestWebKitAPI framework to bring a full Frame + DOM stack
+// in a portable way, this test should be shared with all ports!
+
+#include "config.h"
+
+#include "RenderTableRow.h"
+
+#include "Document.h"
+#include "Frame.h"
+#include "FrameTestHelpers.h"
+#include "RenderArena.h"
+#include "WebFrame.h"
+#include "WebFrameImpl.h"
+#include "WebView.h"
+
+#include <gtest/gtest.h>
+
+using namespace WebKit;
+
+namespace WebCore {
+
+namespace {
+
+class RenderTableRowDeathTest : public testing::Test {
+ // It's unfortunate that we have to get the whole browser stack to test one RenderObject
+ // but the code needs it.
+ static Frame* frame()
+ {
+ static WebView* webView;
+
+ if (webView)
+ return static_cast<WebFrameImpl*>(webView->mainFrame())->frame();
+
+ webView = FrameTestHelpers::createWebViewAndLoad("about:blank");
+ webView->setFocus(true);
+ return static_cast<WebFrameImpl*>(webView->mainFrame())->frame();
+ }
+
+ static Document* document()
+ {
+ return frame()->document();
+ }
+
+ static RenderArena* arena()
+ {
+ return document()->renderArena();
+ }
+
+ virtual void SetUp()
+ {
+ m_row = new (arena()) RenderTableRow(document());
+ }
+
+ virtual void TearDown()
+ {
+ m_row->destroy();
+ }
+
+protected:
+ RenderTableRow* m_row;
+};
+
+TEST_F(RenderTableRowDeathTest, CanSetRow)
+{
+ static const unsigned rowIndex = 10;
+ m_row->setRowIndex(rowIndex);
+ EXPECT_EQ(rowIndex, m_row->rowIndex());
+}
+
+TEST_F(RenderTableRowDeathTest, CanSetRowToMaxRowIndex)
+{
+ m_row->setRowIndex(maxRowIndex);
+ EXPECT_EQ(maxRowIndex, m_row->rowIndex());
+}
+
+// FIXME: Re-enable these tests once ASSERT_DEATH is supported for Android.
+// See: https://bugs.webkit.org/show_bug.cgi?id=74089
+#if !OS(ANDROID)
+
+TEST_F(RenderTableRowDeathTest, CrashIfRowOverflowOnSetting)
+{
+ ASSERT_DEATH(m_row->setRowIndex(maxRowIndex + 1), "");
+}
+
+TEST_F(RenderTableRowDeathTest, CrashIfSettingUnsetRowIndex)
+{
+ ASSERT_DEATH(m_row->setRowIndex(unsetRowIndex), "");
+}
+
+#endif
+
+}
+
+} // namespace WebCore
diff --git a/Source/WebKit/chromium/tests/ScrollAnimatorNoneTest.cpp b/Source/WebKit/chromium/tests/ScrollAnimatorNoneTest.cpp
index 9d21b8a9e..0827267ed 100644
--- a/Source/WebKit/chromium/tests/ScrollAnimatorNoneTest.cpp
+++ b/Source/WebKit/chromium/tests/ScrollAnimatorNoneTest.cpp
@@ -125,7 +125,7 @@ TEST(ScrollAnimatorEnabled, Enabled)
scrollAnimatorNone.reset();
scrollAnimatorNone.scroll(HorizontalScrollbar, ScrollByPixel, 4, 25);
- EXPECT_NE(100, scrollAnimatorNone.currentX());
+ EXPECT_EQ(100, scrollAnimatorNone.currentX());
EXPECT_NE(0, scrollAnimatorNone.currentX());
EXPECT_EQ(0, scrollAnimatorNone.currentY());
scrollAnimatorNone.reset();
@@ -692,21 +692,21 @@ TEST_F(ScrollAnimatorNoneTest, ScrollWheelTrace)
ScrollAnimatorNone::Parameters parameters(true, 11 * kTickTime, 0, ScrollAnimatorNone::Cubic, 3 * kTickTime, ScrollAnimatorNone::Cubic, 3 * kTickTime, ScrollAnimatorNone::Linear, 0);
// Constructed from an actual scroll wheel trace that exhibited a glitch.
- bool result = updateDataFromParameters(1, 53.33, 1000, 100.5781, &parameters);
+ bool result = updateDataFromParameters(1, 53.33f, 1000, 100.5781f, &parameters);
result = animateScroll(100.5933);
result = result && animateScroll(100.6085);
- result = result && updateDataFromParameters(1, 53.33, 1000, 100.6485, &parameters);
+ result = result && updateDataFromParameters(1, 53.33f, 1000, 100.6485f, &parameters);
result = result && animateScroll(100.6515);
result = result && animateScroll(100.6853);
- result = result && updateDataFromParameters(1, 53.33, 1000, 100.6863, &parameters);
+ result = result && updateDataFromParameters(1, 53.33f, 1000, 100.6863f, &parameters);
result = result && animateScroll(100.7005);
result = result && animateScroll(100.7157);
result = result && animateScroll(100.7312);
- result = result && updateDataFromParameters(1, 53.33, 1000, 100.7379, &parameters);
+ result = result && updateDataFromParameters(1, 53.33f, 1000, 100.7379f, &parameters);
result = result && animateScroll(100.7464);
result = result && animateScroll(100.7617);
result = result && animateScroll(100.7775);
- result = result && updateDataFromParameters(1, 53.33, 1000, 100.7779, &parameters);
+ result = result && updateDataFromParameters(1, 53.33f, 1000, 100.7779f, &parameters);
for (double t = 100.7928; result && t < 200; t += 0.015)
result = result && animateScroll(t);
}
@@ -716,21 +716,21 @@ TEST_F(ScrollAnimatorNoneTest, ScrollWheelTraceSmoothed)
ScrollAnimatorNone::Parameters parameters(true, 11 * kTickTime, 7 * kTickTime, ScrollAnimatorNone::Cubic, 3 * kTickTime, ScrollAnimatorNone::Cubic, 3 * kTickTime, ScrollAnimatorNone::Linear, 0);
// Constructed from an actual scroll wheel trace that exhibited a glitch.
- bool result = updateDataFromParameters(1, 53.33, 1000, 100.5781, &parameters);
+ bool result = updateDataFromParameters(1, 53.33f, 1000, 100.5781f, &parameters);
result = animateScroll(100.5933);
result = result && animateScroll(100.6085);
- result = result && updateDataFromParameters(1, 53.33, 1000, 100.6485, &parameters);
+ result = result && updateDataFromParameters(1, 53.33f, 1000, 100.6485f, &parameters);
result = result && animateScroll(100.6515);
result = result && animateScroll(100.6853);
- result = result && updateDataFromParameters(1, 53.33, 1000, 100.6863, &parameters);
+ result = result && updateDataFromParameters(1, 53.33f, 1000, 100.6863f, &parameters);
result = result && animateScroll(100.7005);
result = result && animateScroll(100.7157);
result = result && animateScroll(100.7312);
- result = result && updateDataFromParameters(1, 53.33, 1000, 100.7379, &parameters);
+ result = result && updateDataFromParameters(1, 53.33f, 1000, 100.7379f, &parameters);
result = result && animateScroll(100.7464);
result = result && animateScroll(100.7617);
result = result && animateScroll(100.7775);
- result = result && updateDataFromParameters(1, 53.33, 1000, 100.7779, &parameters);
+ result = result && updateDataFromParameters(1, 53.33f, 1000, 100.7779f, &parameters);
for (double t = 100.7928; result && t < 200; t += 0.015)
result = result && animateScroll(t);
}
diff --git a/Source/WebKit/chromium/tests/ScrollbarLayerChromiumTest.cpp b/Source/WebKit/chromium/tests/ScrollbarLayerChromiumTest.cpp
index 78b96b495..5bf990cde 100644
--- a/Source/WebKit/chromium/tests/ScrollbarLayerChromiumTest.cpp
+++ b/Source/WebKit/chromium/tests/ScrollbarLayerChromiumTest.cpp
@@ -27,6 +27,7 @@
#include "ScrollbarLayerChromium.h"
#include "Scrollbar.h"
+#include "Settings.h"
#include "TreeSynchronizer.h"
#include "cc/CCScrollbarLayerImpl.h"
#include "cc/CCSingleThreadProxy.h"
@@ -90,6 +91,7 @@ TEST(ScrollbarLayerChromiumTest, resolveScrollLayerPointer)
{
DebugScopedSetImplThread impl;
+ Settings::setMockScrollbarsEnabled(true);
{
RefPtr<MockScrollbar> scrollbar = adoptRef(new MockScrollbar);
RefPtr<LayerChromium> layerTreeRoot = LayerChromium::create();
diff --git a/Source/WebKit/chromium/tests/TextureCopierTest.cpp b/Source/WebKit/chromium/tests/TextureCopierTest.cpp
new file mode 100644
index 000000000..17173c0a5
--- /dev/null
+++ b/Source/WebKit/chromium/tests/TextureCopierTest.cpp
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2011 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "TextureCopier.h"
+
+#include "FakeWebGraphicsContext3D.h"
+#include "GraphicsContext3DPrivate.h"
+
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+#include <wtf/RefPtr.h>
+
+using namespace WebCore;
+using namespace WebKit;
+using testing::InSequence;
+using testing::Test;
+using testing::_;
+
+namespace {
+
+class MockContext : public FakeWebGraphicsContext3D {
+public:
+ MOCK_METHOD2(bindFramebuffer, void(WGC3Denum, WebGLId));
+ MOCK_METHOD3(texParameteri, void(GC3Denum target, GC3Denum pname, GC3Dint param));
+
+ MOCK_METHOD3(drawArrays, void(GC3Denum mode, GC3Dint first, GC3Dsizei count));
+};
+
+TEST(TextureCopierTest, testDrawArraysCopy)
+{
+ GraphicsContext3D::Attributes attrs;
+ RefPtr<GraphicsContext3D> context = GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(new MockContext()), GraphicsContext3D::RenderDirectlyToHostWindow);
+ MockContext& mockContext = *static_cast<MockContext*>(GraphicsContext3DPrivate::extractWebGraphicsContext3D(context.get()));
+
+ {
+ InSequence sequence;
+
+ // Here we check just some essential properties of copyTexture() to avoid mirroring the full implementation.
+ EXPECT_CALL(mockContext, bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, _));
+
+ // Make sure linear filtering is disabled during the copy.
+ EXPECT_CALL(mockContext, texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MIN_FILTER, GraphicsContext3D::NEAREST));
+ EXPECT_CALL(mockContext, texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MAG_FILTER, GraphicsContext3D::NEAREST));
+
+ EXPECT_CALL(mockContext, drawArrays(_, _, _));
+
+ // Linear filtering should be restored.
+ EXPECT_CALL(mockContext, texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MIN_FILTER, GraphicsContext3D::LINEAR));
+ EXPECT_CALL(mockContext, texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MAG_FILTER, GraphicsContext3D::LINEAR));
+
+ // Default framebuffer should be restored
+ EXPECT_CALL(mockContext, bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, 0));
+ }
+
+ int sourceTextureId = 1;
+ int destTextureId = 2;
+ IntSize size(256, 128);
+ OwnPtr<AcceleratedTextureCopier> copier(AcceleratedTextureCopier::create(context));
+ copier->copyTexture(context.get(), sourceTextureId, destTextureId, size);
+}
+
+} // namespace
diff --git a/Source/WebKit/chromium/tests/TextureManagerTest.cpp b/Source/WebKit/chromium/tests/TextureManagerTest.cpp
index 3b576af99..d5313f5dc 100644
--- a/Source/WebKit/chromium/tests/TextureManagerTest.cpp
+++ b/Source/WebKit/chromium/tests/TextureManagerTest.cpp
@@ -24,23 +24,18 @@
#include "config.h"
+#include "CCTiledLayerTestCommon.h"
#include "ManagedTexture.h"
#include "TextureManager.h"
#include <gtest/gtest.h>
using namespace WebCore;
+using namespace WebKitTests;
using namespace WTF;
namespace {
-class FakeTextureAllocator : public TextureAllocator {
-public:
- virtual ~FakeTextureAllocator() { }
- virtual unsigned createTexture(const IntSize&, GC3Denum) { return 1; }
- virtual void deleteTexture(unsigned, const IntSize&, GC3Denum) { }
-};
-
class TextureManagerTest : public testing::Test {
public:
TextureManagerTest()
diff --git a/Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp b/Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp
index 2523230e0..5b7cb0df7 100644
--- a/Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp
+++ b/Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp
@@ -26,18 +26,16 @@
#include "TiledLayerChromium.h"
+#include "CCAnimationTestCommon.h"
#include "CCLayerTreeTestCommon.h"
+#include "CCTiledLayerTestCommon.h"
#include "FakeCCLayerTreeHostClient.h"
-#include "LayerTextureUpdater.h"
-#include "Region.h"
-#include "TextureManager.h"
#include "WebCompositor.h"
#include "cc/CCSingleThreadProxy.h" // For DebugScopedSetImplThread
-#include "cc/CCTextureUpdater.h"
-#include "cc/CCTiledLayerImpl.h"
#include <gtest/gtest.h>
using namespace WebCore;
+using namespace WebKitTests;
using namespace WTF;
#define EXPECT_EQ_RECT(a, b) \
@@ -48,208 +46,38 @@ using namespace WTF;
namespace {
-class FakeTextureAllocator : public TextureAllocator {
+class TestCCOcclusionTracker : public CCOcclusionTracker {
public:
- virtual unsigned createTexture(const IntSize&, GC3Denum) { return 0; }
- virtual void deleteTexture(unsigned, const IntSize&, GC3Denum) { }
-};
-
-class FakeTiledLayerChromium;
-
-class FakeLayerTextureUpdater : public LayerTextureUpdater {
-public:
- class Texture : public LayerTextureUpdater::Texture {
- public:
- Texture(FakeLayerTextureUpdater* layer, PassOwnPtr<ManagedTexture> texture)
- : LayerTextureUpdater::Texture(texture)
- , m_layer(layer)
- {
- }
- virtual ~Texture() { }
-
- virtual void updateRect(GraphicsContext3D*, TextureAllocator*, const IntRect&, const IntRect&) { m_layer->updateRect(); }
- virtual void prepareRect(const IntRect&) { m_layer->prepareRect(); }
-
- private:
- FakeLayerTextureUpdater* m_layer;
- };
-
- FakeLayerTextureUpdater()
- : m_prepareCount(0)
- , m_updateCount(0)
- , m_prepareRectCount(0)
- {
- }
- virtual ~FakeLayerTextureUpdater() { }
-
- // Sets the rect to invalidate during the next call to prepareToUpdate(). After the next
- // call to prepareToUpdate() the rect is reset.
- void setRectToInvalidate(const IntRect&, FakeTiledLayerChromium*);
-
- // Number of times prepareToUpdate has been invoked.
- int prepareCount() const { return m_prepareCount; }
- void clearPrepareCount() { m_prepareCount = 0; }
-
- // Number of times updateRect has been invoked.
- int updateCount() const { return m_updateCount; }
- void clearUpdateCount() { m_updateCount = 0; }
- void updateRect() { m_updateCount++; }
-
- // Number of times prepareRect() has been invoked on a texture.
- int prepareRectCount() const { return m_prepareRectCount; }
- void clearPrepareRectCount() { m_prepareRectCount = 0; }
- void prepareRect() { m_prepareRectCount++; }
-
- void setOpaquePaintRect(const IntRect& opaquePaintRect) { m_opaquePaintRect = opaquePaintRect; }
-
- // Last rect passed to prepareToUpdate().
- const IntRect& lastUpdateRect() const { return m_lastUpdateRect; }
-
- virtual PassOwnPtr<LayerTextureUpdater::Texture> createTexture(TextureManager* manager) { return adoptPtr(new Texture(this, ManagedTexture::create(manager))); }
- virtual SampledTexelFormat sampledTexelFormat(GC3Denum) { return SampledTexelFormatRGBA; }
- virtual void prepareToUpdate(const IntRect& contentRect, const IntSize&, int, float, IntRect* resultingOpaqueRect);
-
-private:
- int m_prepareCount;
- int m_updateCount;
- int m_prepareRectCount;
- IntRect m_rectToInvalidate;
- IntRect m_lastUpdateRect;
- IntRect m_opaquePaintRect;
- RefPtr<FakeTiledLayerChromium> m_layer;
-};
-
-class FakeCCTiledLayerImpl : public CCTiledLayerImpl {
-public:
- explicit FakeCCTiledLayerImpl(int id)
- : CCTiledLayerImpl(id) { }
- virtual ~FakeCCTiledLayerImpl() { }
-
- bool hasTileAt(int i, int j)
+ TestCCOcclusionTracker()
+ : CCOcclusionTracker(IntRect(0, 0, 1000, 1000), true)
+ , m_scissorRectInScreen(IntRect(0, 0, 1000, 1000))
{
- return CCTiledLayerImpl::hasTileAt(i, j);
+ // Pretend we have visited a render surface.
+ m_stack.append(StackObject());
}
-};
-class FakeTiledLayerChromium : public TiledLayerChromium {
-public:
- explicit FakeTiledLayerChromium(TextureManager* textureManager)
- : TiledLayerChromium()
- , m_fakeTextureUpdater(adoptRef(new FakeLayerTextureUpdater))
- , m_textureManager(textureManager)
- {
- setTileSize(IntSize(100, 100));
- setTextureFormat(GraphicsContext3D::RGBA);
- setBorderTexelOption(CCLayerTilingData::NoBorderTexels);
- setIsDrawable(true); // So that we don't get false positives if any of these tests expect to return false from drawsContent() for other reasons.
- }
- virtual ~FakeTiledLayerChromium() { }
+ void setOcclusion(const Region& occlusion) { m_stack.last().occlusionInScreen = occlusion; }
- void invalidateRect(const IntRect& rect)
- {
- TiledLayerChromium::invalidateRect(rect);
- }
-
- void prepareToUpdate(const IntRect& rect, const Region& occluded)
- {
- TiledLayerChromium::prepareToUpdate(rect, occluded);
- }
-
- void prepareToUpdateIdle(const IntRect& rect, const Region& occluded)
- {
- TiledLayerChromium::prepareToUpdateIdle(rect, occluded);
- }
-
- bool needsIdlePaint(const IntRect& rect)
- {
- return TiledLayerChromium::needsIdlePaint(rect);
- }
-
- bool skipsDraw() const
- {
- return TiledLayerChromium::skipsDraw();
- }
-
- virtual void setNeedsDisplayRect(const FloatRect& rect)
- {
- m_lastNeedsDisplayRect = rect;
- TiledLayerChromium::setNeedsDisplayRect(rect);
- }
-
- const FloatRect& lastNeedsDisplayRect() const { return m_lastNeedsDisplayRect; }
-
- FakeLayerTextureUpdater* fakeLayerTextureUpdater() { return m_fakeTextureUpdater.get(); }
-
- virtual TextureManager* textureManager() const { return m_textureManager; }
-
- virtual void paintContentsIfDirty(const Region& occludedScreenSpace)
- {
- prepareToUpdate(visibleLayerRect(), occludedScreenSpace);
- }
+protected:
+ virtual IntRect layerScissorRectInTargetSurface(const LayerChromium* layer) const { return m_scissorRectInScreen; }
private:
- virtual LayerTextureUpdater* textureUpdater() const
- {
- return m_fakeTextureUpdater.get();
- }
-
- virtual void createTextureUpdaterIfNeeded() { }
-
- RefPtr<FakeLayerTextureUpdater> m_fakeTextureUpdater;
- TextureManager* m_textureManager;
- FloatRect m_lastNeedsDisplayRect;
+ IntRect m_scissorRectInScreen;
};
-class FakeTiledLayerWithScaledBounds : public FakeTiledLayerChromium {
-public:
- explicit FakeTiledLayerWithScaledBounds(TextureManager* textureManager)
- : FakeTiledLayerChromium(textureManager)
- {
- }
-
- void setContentBounds(const IntSize& contentBounds) { m_forcedContentBounds = contentBounds; }
- virtual IntSize contentBounds() const { return m_forcedContentBounds; }
-
- FloatRect updateRect() { return m_updateRect; }
-
-protected:
- IntSize m_forcedContentBounds;
-};
-
-void FakeLayerTextureUpdater::setRectToInvalidate(const IntRect& rect, FakeTiledLayerChromium* layer)
-{
- m_rectToInvalidate = rect;
- m_layer = layer;
-}
-
-void FakeLayerTextureUpdater::prepareToUpdate(const IntRect& contentRect, const IntSize&, int, float, IntRect* resultingOpaqueRect)
-{
- m_prepareCount++;
- m_lastUpdateRect = contentRect;
- if (!m_rectToInvalidate.isEmpty()) {
- m_layer->invalidateRect(m_rectToInvalidate);
- m_rectToInvalidate = IntRect();
- m_layer = 0;
- }
- *resultingOpaqueRect = m_opaquePaintRect;
-}
-
TEST(TiledLayerChromiumTest, pushDirtyTiles)
{
OwnPtr<TextureManager> textureManager = TextureManager::create(4*1024*1024, 2*1024*1024, 1024);
RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
DebugScopedSetImplThread implThread;
OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
- Region noOcclusion;
- FakeTextureAllocator textureAllocator;
- CCTextureUpdater updater(&textureAllocator);
+ CCTextureUpdater updater;
// The tile size is 100x100, so this invalidates and then paints two tiles.
layer->setBounds(IntSize(100, 200));
layer->invalidateRect(IntRect(0, 0, 100, 200));
- layer->prepareToUpdate(IntRect(0, 0, 100, 200), noOcclusion);
- layer->updateCompositorResources(0, updater);
+ layer->updateLayerRect(updater, IntRect(0, 0, 100, 200), 0);
layer->pushPropertiesTo(layerImpl.get());
// We should have both tiles on the impl side.
@@ -261,8 +89,7 @@ TEST(TiledLayerChromiumTest, pushDirtyTiles)
// Invalidates both tiles...
layer->invalidateRect(IntRect(0, 0, 100, 200));
// ....but then only update one of them.
- layer->prepareToUpdate(IntRect(0, 0, 100, 100), noOcclusion);
- layer->updateCompositorResources(0, updater);
+ layer->updateLayerRect(updater, IntRect(0, 0, 100, 100), 0);
layer->pushPropertiesTo(layerImpl.get());
// We should only have the first tile since the other tile was invalidated but not painted.
@@ -276,18 +103,22 @@ TEST(TiledLayerChromiumTest, pushOccludedDirtyTiles)
RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
DebugScopedSetImplThread implThread;
OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
- Region noOcclusion;
+ TestCCOcclusionTracker occluded;
- FakeTextureAllocator textureAllocator;
- CCTextureUpdater updater(&textureAllocator);
+ CCTextureUpdater updater;
// The tile size is 100x100, so this invalidates and then paints two tiles.
layer->setBounds(IntSize(100, 200));
+ layer->setDrawTransform(TransformationMatrix(1, 0, 0, 1, layer->bounds().width() / 2.0, layer->bounds().height() / 2.0));
+ layer->setVisibleLayerRect(IntRect(0, 0, 100, 200));
layer->invalidateRect(IntRect(0, 0, 100, 200));
- layer->prepareToUpdate(IntRect(0, 0, 100, 200), noOcclusion);
- layer->updateCompositorResources(0, updater);
+ layer->updateLayerRect(updater, IntRect(0, 0, 100, 200), &occluded);
layer->pushPropertiesTo(layerImpl.get());
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 20000, 1);
+ EXPECT_EQ(0, occluded.overdrawMetrics().tilesCulledForUpload());
+
// We should have both tiles on the impl side.
EXPECT_TRUE(layerImpl->hasTileAt(0, 0));
EXPECT_TRUE(layerImpl->hasTileAt(0, 1));
@@ -297,16 +128,59 @@ TEST(TiledLayerChromiumTest, pushOccludedDirtyTiles)
// Invalidates part of the top tile...
layer->invalidateRect(IntRect(0, 0, 50, 50));
// ....but the area is occluded.
- Region occlusion(IntRect(0, 0, 50, 50));
- layer->prepareToUpdate(IntRect(0, 0, 100, 100), occlusion);
- layer->updateCompositorResources(0, updater);
+ occluded.setOcclusion(IntRect(0, 0, 50, 50));
+ layer->updateLayerRect(updater, IntRect(0, 0, 100, 100), &occluded);
layer->pushPropertiesTo(layerImpl.get());
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 20000 + 2500, 1);
+ EXPECT_EQ(0, occluded.overdrawMetrics().tilesCulledForUpload());
+
// We should still have both tiles, as part of the top tile is still unoccluded.
EXPECT_TRUE(layerImpl->hasTileAt(0, 0));
EXPECT_TRUE(layerImpl->hasTileAt(0, 1));
}
+TEST(TiledLayerChromiumTest, pushDeletedTiles)
+{
+ OwnPtr<TextureManager> textureManager = TextureManager::create(4*1024*1024, 2*1024*1024, 1024);
+ RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
+ DebugScopedSetImplThread implThread;
+ OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
+
+ CCTextureUpdater updater;
+ FakeTextureAllocator allocator;
+
+ // The tile size is 100x100, so this invalidates and then paints two tiles.
+ layer->setBounds(IntSize(100, 200));
+ layer->invalidateRect(IntRect(0, 0, 100, 200));
+ layer->updateLayerRect(updater, IntRect(0, 0, 100, 200), 0);
+ layer->pushPropertiesTo(layerImpl.get());
+
+ // We should have both tiles on the impl side.
+ EXPECT_TRUE(layerImpl->hasTileAt(0, 0));
+ EXPECT_TRUE(layerImpl->hasTileAt(0, 1));
+
+ textureManager->evictAndDeleteAllTextures(&allocator);
+ textureManager->setMaxMemoryLimitBytes(4*1024*1024);
+ textureManager->setPreferredMemoryLimitBytes(4*1024*1024);
+
+ // This should drop the tiles on the impl thread.
+ layer->pushPropertiesTo(layerImpl.get());
+
+ // We should now have no textures on the impl thread.
+ EXPECT_FALSE(layerImpl->hasTileAt(0, 0));
+ EXPECT_FALSE(layerImpl->hasTileAt(0, 1));
+
+ // This should recreate and update the deleted textures.
+ layer->updateLayerRect(updater, IntRect(0, 0, 100, 100), 0);
+ layer->pushPropertiesTo(layerImpl.get());
+
+ // We should only have the first tile since the other tile was invalidated but not painted.
+ EXPECT_TRUE(layerImpl->hasTileAt(0, 0));
+ EXPECT_FALSE(layerImpl->hasTileAt(0, 1));
+}
+
TEST(TiledLayerChromiumTest, pushIdlePaintTiles)
{
OwnPtr<TextureManager> textureManager = TextureManager::create(4*1024*1024, 2*1024*1024, 1024);
@@ -314,25 +188,22 @@ TEST(TiledLayerChromiumTest, pushIdlePaintTiles)
DebugScopedSetImplThread implThread;
OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
- FakeTextureAllocator textureAllocator;
- CCTextureUpdater updater(&textureAllocator);
+ CCTextureUpdater updater;
// The tile size is 100x100. Setup 5x5 tiles with one visible tile in the center.
IntSize contentBounds(500, 500);
IntRect contentRect(IntPoint::zero(), contentBounds);
IntRect visibleRect(200, 200, 100, 100);
- Region noOcclusion;
// This invalidates 25 tiles and then paints one visible tile.
layer->setBounds(contentBounds);
layer->setVisibleLayerRect(visibleRect);
layer->invalidateRect(contentRect);
- layer->prepareToUpdate(visibleRect, noOcclusion);
+ layer->updateLayerRect(updater, visibleRect, 0);
// We should need idle-painting for 3x3 tiles in the center.
EXPECT_TRUE(layer->needsIdlePaint(visibleRect));
- layer->updateCompositorResources(0, updater);
layer->pushPropertiesTo(layerImpl.get());
// We should have one tile on the impl side.
@@ -342,10 +213,9 @@ TEST(TiledLayerChromiumTest, pushIdlePaintTiles)
// For the next four updates, we should detect we still need idle painting.
for (int i = 0; i < 4; i++) {
- layer->prepareToUpdate(visibleRect, noOcclusion);
+ layer->updateLayerRect(updater, visibleRect, 0);
EXPECT_TRUE(layer->needsIdlePaint(visibleRect));
- layer->prepareToUpdateIdle(visibleRect, noOcclusion);
- layer->updateCompositorResources(0, updater);
+ layer->idleUpdateLayerRect(updater, visibleRect, 0);
layer->pushPropertiesTo(layerImpl.get());
textureManager->unprotectAllTextures();
}
@@ -365,6 +235,109 @@ TEST(TiledLayerChromiumTest, pushIdlePaintTiles)
}
}
+TEST(TiledLayerChromiumTest, pushTilesAfterIdlePaintFailed)
+{
+ OwnPtr<TextureManager> textureManager = TextureManager::create(1024*1024, 1024*1024, 1024);
+ DebugScopedSetImplThread implThread;
+ RefPtr<FakeTiledLayerChromium> layer1 = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
+ OwnPtr<FakeCCTiledLayerImpl> layerImpl1(adoptPtr(new FakeCCTiledLayerImpl(0)));
+ RefPtr<FakeTiledLayerChromium> layer2 = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
+ OwnPtr<FakeCCTiledLayerImpl> layerImpl2(adoptPtr(new FakeCCTiledLayerImpl(0)));
+
+ CCTextureUpdater updater;
+ FakeTextureAllocator allocator;
+ FakeTextureCopier copier;
+ FakeTextureUploader uploader;
+
+ // For this test we have two layers. layer1 exhausts most texture memory, leaving room for 2 more tiles from
+ // layer2, but not all three tiles. First we paint layer1, and one tile from layer2. Then when we idle paint
+ // layer2, we will fail on the third tile of layer2, and this should not leave the second tile in a bad state.
+
+ // This requires 4*30000 bytes of memory.
+ IntRect layer2Rect(0, 0, 100, 300);
+ layer2->setBounds(layer2Rect.size());
+ layer2->setVisibleLayerRect(layer2Rect);
+ layer2->invalidateRect(layer2Rect);
+
+ // This uses 960000 bytes, leaving 88576 bytes of memory left, which is enough for 2 tiles only in the other layer.
+ IntRect layerRect(IntPoint::zero(), IntSize(100, 2400));
+ layer1->setBounds(layerRect.size());
+ layer1->setVisibleLayerRect(layerRect);
+ layer1->invalidateRect(layerRect);
+ layer1->updateLayerRect(updater, layerRect, 0);
+
+ // Paint a single tile in layer2 so that it will idle paint.
+ layer2->updateLayerRect(updater, IntRect(0, 0, 100, 100), 0);
+
+ // We should need idle-painting for both remaining tiles in layer2.
+ EXPECT_TRUE(layer2->needsIdlePaint(layer2Rect));
+
+ // Commit the frame over to impl.
+ updater.update(0, &allocator, &copier, &uploader, 5000);
+ layer1->pushPropertiesTo(layerImpl1.get());
+ layer2->pushPropertiesTo(layerImpl2.get());
+
+ // Now idle paint layer2. We are going to run out of memory though!
+ layer2->updateLayerRect(updater, IntRect(0, 0, 100, 100), 0);
+ layer2->idleUpdateLayerRect(updater, layer2Rect, 0);
+
+ // Oh well, commit the frame and push.
+ updater.update(0, &allocator, &copier, &uploader, 5000);
+ layer1->pushPropertiesTo(layerImpl1.get());
+ layer2->pushPropertiesTo(layerImpl2.get());
+
+ // Sanity check, we should have textures for the big layer.
+ EXPECT_TRUE(layerImpl1->hasTextureIdForTileAt(0, 0));
+
+ // We should only have the first tile from layer2 since it failed to idle update.
+ EXPECT_TRUE(layerImpl2->hasTileAt(0, 0));
+ EXPECT_TRUE(layerImpl2->hasTextureIdForTileAt(0, 0));
+ EXPECT_FALSE(layerImpl2->hasTileAt(0, 1));
+ EXPECT_FALSE(layerImpl2->hasTileAt(0, 2));
+
+ // Now if layer2 becomes fully visible, we should be able to paint it and push valid textures.
+ textureManager->unprotectAllTextures();
+
+ layer2->updateLayerRect(updater, layer2Rect, 0);
+ layer1->updateLayerRect(updater, IntRect(), 0);
+
+ updater.update(0, &allocator, &copier, &uploader, 5000);
+ layer1->pushPropertiesTo(layerImpl1.get());
+ layer2->pushPropertiesTo(layerImpl2.get());
+
+ EXPECT_TRUE(layerImpl2->hasTileAt(0, 0));
+ EXPECT_TRUE(layerImpl2->hasTileAt(0, 1));
+ EXPECT_TRUE(layerImpl2->hasTileAt(0, 2));
+ EXPECT_TRUE(layerImpl2->hasTextureIdForTileAt(0, 0));
+ EXPECT_TRUE(layerImpl2->hasTextureIdForTileAt(0, 1));
+ EXPECT_TRUE(layerImpl2->hasTextureIdForTileAt(0, 2));
+}
+
+TEST(TiledLayerChromiumTest, pushIdlePaintedOccludedTiles)
+{
+ OwnPtr<TextureManager> textureManager = TextureManager::create(4*1024*1024, 2*1024*1024, 1024);
+ RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
+ DebugScopedSetImplThread implThread;
+ OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
+ TestCCOcclusionTracker occluded;
+
+ CCTextureUpdater updater;
+
+ // The tile size is 100x100, so this invalidates one occluded tile, culls it during paint, but prepaints it.
+ occluded.setOcclusion(IntRect(0, 0, 100, 100));
+
+ layer->setBounds(IntSize(100, 100));
+ layer->setDrawTransform(TransformationMatrix(1, 0, 0, 1, layer->bounds().width() / 2.0, layer->bounds().height() / 2.0));
+ layer->setVisibleLayerRect(IntRect(0, 0, 100, 100));
+ layer->invalidateRect(IntRect(0, 0, 100, 100));
+ layer->updateLayerRect(updater, IntRect(0, 0, 100, 100), &occluded);
+ layer->idleUpdateLayerRect(updater, IntRect(0, 0, 100, 100), &occluded);
+ layer->pushPropertiesTo(layerImpl.get());
+
+ // We should have the prepainted tile on the impl side.
+ EXPECT_TRUE(layerImpl->hasTileAt(0, 0));
+}
+
TEST(TiledLayerChromiumTest, pushTilesMarkedDirtyDuringPaint)
{
OwnPtr<TextureManager> textureManager = TextureManager::create(4*1024*1024, 2*1024*1024, 1024);
@@ -372,9 +345,7 @@ TEST(TiledLayerChromiumTest, pushTilesMarkedDirtyDuringPaint)
DebugScopedSetImplThread implThread;
OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
- FakeTextureAllocator textureAllocator;
- CCTextureUpdater updater(&textureAllocator);
- Region noOcclusion;
+ CCTextureUpdater updater;
// The tile size is 100x100, so this invalidates and then paints two tiles.
// However, during the paint, we invalidate one of the tiles. This should
@@ -382,8 +353,7 @@ TEST(TiledLayerChromiumTest, pushTilesMarkedDirtyDuringPaint)
layer->setBounds(IntSize(100, 200));
layer->invalidateRect(IntRect(0, 0, 100, 200));
layer->fakeLayerTextureUpdater()->setRectToInvalidate(IntRect(0, 50, 100, 50), layer.get());
- layer->prepareToUpdate(IntRect(0, 0, 100, 200), noOcclusion);
- layer->updateCompositorResources(0, updater);
+ layer->updateLayerRect(updater, IntRect(0, 0, 100, 200), 0);
layer->pushPropertiesTo(layerImpl.get());
// We should have both tiles on the impl side.
@@ -400,23 +370,18 @@ TEST(TiledLayerChromiumTest, pushTilesLayerMarkedDirtyDuringPaintOnNextLayer)
OwnPtr<FakeCCTiledLayerImpl> layer1Impl(adoptPtr(new FakeCCTiledLayerImpl(0)));
OwnPtr<FakeCCTiledLayerImpl> layer2Impl(adoptPtr(new FakeCCTiledLayerImpl(0)));
- FakeTextureAllocator textureAllocator;
- CCTextureUpdater updater(&textureAllocator);
- Region noOcclusion;
+ CCTextureUpdater updater;
layer1->setBounds(IntSize(100, 200));
layer1->invalidateRect(IntRect(0, 0, 100, 200));
layer2->setBounds(IntSize(100, 200));
layer2->invalidateRect(IntRect(0, 0, 100, 200));
- layer1->prepareToUpdate(IntRect(0, 0, 100, 200), noOcclusion);
+ layer1->updateLayerRect(updater, IntRect(0, 0, 100, 200), 0);
// Invalidate a tile on layer1
layer2->fakeLayerTextureUpdater()->setRectToInvalidate(IntRect(0, 50, 100, 50), layer1.get());
- layer2->prepareToUpdate(IntRect(0, 0, 100, 200), noOcclusion);
-
- layer1->updateCompositorResources(0, updater);
- layer2->updateCompositorResources(0, updater);
+ layer2->updateLayerRect(updater, IntRect(0, 0, 100, 200), 0);
layer1->pushPropertiesTo(layer1Impl.get());
layer2->pushPropertiesTo(layer2Impl.get());
@@ -437,9 +402,7 @@ TEST(TiledLayerChromiumTest, pushTilesLayerMarkedDirtyDuringPaintOnPreviousLayer
OwnPtr<FakeCCTiledLayerImpl> layer1Impl(adoptPtr(new FakeCCTiledLayerImpl(0)));
OwnPtr<FakeCCTiledLayerImpl> layer2Impl(adoptPtr(new FakeCCTiledLayerImpl(0)));
- FakeTextureAllocator textureAllocator;
- CCTextureUpdater updater(&textureAllocator);
- Region noOcclusion;
+ CCTextureUpdater updater;
layer1->setBounds(IntSize(100, 200));
layer1->invalidateRect(IntRect(0, 0, 100, 200));
@@ -448,12 +411,9 @@ TEST(TiledLayerChromiumTest, pushTilesLayerMarkedDirtyDuringPaintOnPreviousLayer
// Invalidate a tile on layer2
layer1->fakeLayerTextureUpdater()->setRectToInvalidate(IntRect(0, 50, 100, 50), layer2.get());
- layer1->prepareToUpdate(IntRect(0, 0, 100, 200), noOcclusion);
+ layer1->updateLayerRect(updater, IntRect(0, 0, 100, 200), 0);
- layer2->prepareToUpdate(IntRect(0, 0, 100, 200), noOcclusion);
-
- layer1->updateCompositorResources(0, updater);
- layer2->updateCompositorResources(0, updater);
+ layer2->updateLayerRect(updater, IntRect(0, 0, 100, 200), 0);
layer1->pushPropertiesTo(layer1Impl.get());
layer2->pushPropertiesTo(layer2Impl.get());
@@ -471,7 +431,6 @@ TEST(TiledLayerChromiumTest, idlePaintOutOfMemory)
IntSize contentBounds(300, 300);
IntRect contentRect(IntPoint::zero(), contentBounds);
IntRect visibleRect(100, 100, 100, 100);
- Region noOcclusion;
// We have enough memory for only the visible rect, so we will run out of memory in first idle paint.
int memoryLimit = 4 * 100 * 100; // 2 tiles, 4 bytes per pixel.
@@ -481,51 +440,243 @@ TEST(TiledLayerChromiumTest, idlePaintOutOfMemory)
DebugScopedSetImplThread implThread;
OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
- FakeTextureAllocator textureAllocator;
- CCTextureUpdater updater(&textureAllocator);
+ CCTextureUpdater updater;
// This invalidates 9 tiles and then paints one visible tile.
layer->setBounds(contentBounds);
layer->setVisibleLayerRect(visibleRect);
layer->invalidateRect(contentRect);
- layer->prepareToUpdate(visibleRect, noOcclusion);
+ layer->updateLayerRect(updater, visibleRect, 0);
// We should need idle-painting for 3x3 tiles surounding visible tile.
EXPECT_TRUE(layer->needsIdlePaint(visibleRect));
- layer->updateCompositorResources(0, updater);
layer->pushPropertiesTo(layerImpl.get());
// We should have one tile on the impl side.
EXPECT_TRUE(layerImpl->hasTileAt(1, 1));
textureManager->unprotectAllTextures();
- layer->prepareToUpdate(visibleRect, noOcclusion);
- layer->prepareToUpdateIdle(visibleRect, noOcclusion);
+ layer->updateLayerRect(updater, visibleRect, 0);
+ layer->idleUpdateLayerRect(updater, visibleRect, 0);
// We shouldn't signal we need another idle paint after we run out of memory.
EXPECT_FALSE(layer->needsIdlePaint(visibleRect));
- layer->updateCompositorResources(0, updater);
layer->pushPropertiesTo(layerImpl.get());
}
+TEST(TiledLayerChromiumTest, idlePaintZeroSizedLayer)
+{
+ OwnPtr<TextureManager> textureManager = TextureManager::create(20000, 10000, 1024);
+ RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
+ DebugScopedSetImplThread implThread;
+ OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
+
+ CCTextureUpdater updater;
+
+ // The layer's bounds are empty.
+ IntRect contentRect;
+
+ layer->setBounds(contentRect.size());
+ layer->setVisibleLayerRect(contentRect);
+ layer->invalidateRect(contentRect);
+ layer->updateLayerRect(updater, contentRect, 0);
+
+ // Empty layers don't have tiles.
+ EXPECT_EQ(0u, layer->numPaintedTiles());
+
+ // Empty layers don't need prepaint.
+ EXPECT_FALSE(layer->needsIdlePaint(contentRect));
+
+ layer->pushPropertiesTo(layerImpl.get());
+
+ // Empty layers don't have tiles.
+ EXPECT_FALSE(layerImpl->hasTileAt(0, 0));
+
+ // Non-visible layers don't idle paint.
+ layer->idleUpdateLayerRect(updater, contentRect, 0);
+
+ // Empty layers don't have tiles.
+ EXPECT_EQ(0u, layer->numPaintedTiles());
+
+ layer->pushPropertiesTo(layerImpl.get());
+
+ // Empty layers don't have tiles.
+ EXPECT_FALSE(layerImpl->hasTileAt(0, 0));
+}
+
+TEST(TiledLayerChromiumTest, idlePaintZeroSizedAnimatingLayer)
+{
+ OwnPtr<TextureManager> textureManager = TextureManager::create(20000, 10000, 1024);
+ RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
+ DebugScopedSetImplThread implThread;
+ OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
+
+ CCTextureUpdater updater;
+
+ // Pretend the layer is animating.
+ layer->setDrawTransformIsAnimating(true);
+
+ // The layer's bounds are empty.
+ IntRect contentRect;
+
+ layer->setBounds(contentRect.size());
+ layer->setVisibleLayerRect(contentRect);
+ layer->invalidateRect(contentRect);
+ layer->updateLayerRect(updater, contentRect, 0);
+
+ // Empty layers don't have tiles.
+ EXPECT_EQ(0u, layer->numPaintedTiles());
+
+ // Empty layers don't need prepaint.
+ EXPECT_FALSE(layer->needsIdlePaint(contentRect));
+
+ layer->pushPropertiesTo(layerImpl.get());
+
+ // Empty layers don't have tiles.
+ EXPECT_FALSE(layerImpl->hasTileAt(0, 0));
+
+ // Non-visible layers don't idle paint.
+ layer->idleUpdateLayerRect(updater, contentRect, 0);
+
+ // Empty layers don't have tiles.
+ EXPECT_EQ(0u, layer->numPaintedTiles());
+
+ layer->pushPropertiesTo(layerImpl.get());
+
+ // Empty layers don't have tiles.
+ EXPECT_FALSE(layerImpl->hasTileAt(0, 0));
+}
+
+TEST(TiledLayerChromiumTest, idlePaintNonVisibleLayers)
+{
+ IntSize contentBounds(100, 100);
+ IntRect contentRect(IntPoint::zero(), contentBounds);
+
+ OwnPtr<TextureManager> textureManager = TextureManager::create(20000, 10000, 1024);
+ RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
+ DebugScopedSetImplThread implThread;
+ OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
+
+ CCTextureUpdater updater;
+
+ // Invalidate the layer but make none of it visible, so nothing paints.
+ IntRect visibleRect;
+
+ layer->setBounds(contentBounds);
+ layer->setVisibleLayerRect(visibleRect);
+ layer->invalidateRect(contentRect);
+ layer->updateLayerRect(updater, visibleRect, 0);
+
+ // Non-visible layers don't need idle paint.
+ EXPECT_FALSE(layer->needsIdlePaint(visibleRect));
+
+ layer->pushPropertiesTo(layerImpl.get());
+
+ // We should not have any tiles pushed since the layer is not visible.
+ EXPECT_FALSE(layerImpl->hasTileAt(0, 0));
+
+ // Non-visible layers don't idle paint.
+ layer->idleUpdateLayerRect(updater, visibleRect, 0);
+
+ layer->pushPropertiesTo(layerImpl.get());
+
+ // We should not have any tiles pushed since the layer is not visible.
+ EXPECT_FALSE(layerImpl->hasTileAt(0, 0));
+}
+
+static void idlePaintRepeat(int repeatTimes, FakeTiledLayerChromium* layer, FakeCCTiledLayerImpl* layerImpl, CCTextureUpdater& updater, const IntRect& visibleRect)
+{
+ for (int i = 0; i < repeatTimes; ++i) {
+ layer->updateLayerRect(updater, visibleRect, 0);
+ layer->idleUpdateLayerRect(updater, visibleRect, 0);
+ layer->pushPropertiesTo(layerImpl);
+ }
+}
+
+static void testHaveOuterTiles(FakeCCTiledLayerImpl* layerImpl, int width, int height, int have)
+{
+ for (int i = 0; i < width; ++i) {
+ for (int j = 0; j < height; ++j) {
+ bool hasTile = i < have || j < have || i >= width - have || j >= height - have;
+ EXPECT_EQ(hasTile, layerImpl->hasTileAt(i, j));
+ }
+ }
+}
+
+TEST(TiledLayerChromiumTest, idlePaintNonVisibleAnimatingLayers)
+{
+ OwnPtr<TextureManager> textureManager = TextureManager::create(8000*8000*8, 8000*8000*4, 1024);
+ DebugScopedSetImplThread implThread;
+
+ CCTextureUpdater updater;
+
+ int tileWidth = FakeTiledLayerChromium::tileSize().width();
+ int tileHeight = FakeTiledLayerChromium::tileSize().height();
+ int width[] = { 1, 2, 3, 4, 9, 10, 0 };
+ int height[] = { 1, 2, 3, 4, 9, 10, 0 };
+
+ for (int j = 0; height[j]; ++j) {
+ for (int i = 0; width[i]; ++i) {
+ RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
+ OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
+
+ // Pretend the layer is animating.
+ layer->setDrawTransformIsAnimating(true);
+
+ IntSize contentBounds(width[i] * tileWidth, height[j] * tileHeight);
+ IntRect contentRect(IntPoint::zero(), contentBounds);
+ IntRect visibleRect;
+
+ layer->setBounds(contentBounds);
+ layer->setVisibleLayerRect(visibleRect);
+ layer->invalidateRect(contentRect);
+
+ // If idlePaintRect gives back a non-empty result then we should paint it. Otherwise,
+ // we shoud paint nothing.
+ bool shouldPrepaint = !layer->idlePaintRect(visibleRect).isEmpty();
+
+ // This paints the layer but there's nothing visible so it's a no-op.
+ layer->updateLayerRect(updater, visibleRect, 0);
+ layer->pushPropertiesTo(layerImpl.get());
+
+ // We should not have any tiles pushed yet since the layer is not visible and we've not prepainted.
+ testHaveOuterTiles(layerImpl.get(), width[i], height[j], 0);
+
+ // Normally we don't allow non-visible layers to pre-paint, but if they are animating then we should.
+ EXPECT_EQ(shouldPrepaint, layer->needsIdlePaint(visibleRect));
+
+ // If the layer is to be prepainted at all, then after four updates we should have the outer row/columns painted.
+ idlePaintRepeat(4, layer.get(), layerImpl.get(), updater, visibleRect);
+ testHaveOuterTiles(layerImpl.get(), width[i], height[j], shouldPrepaint ? 1 : 0);
+
+ // We don't currently idle paint past the outermost tiles.
+ EXPECT_FALSE(layer->needsIdlePaint(visibleRect));
+ idlePaintRepeat(4, layer.get(), layerImpl.get(), updater, visibleRect);
+ testHaveOuterTiles(layerImpl.get(), width[i], height[j], shouldPrepaint ? 1 : 0);
+ }
+ }
+}
+
TEST(TiledLayerChromiumTest, invalidateFromPrepare)
{
OwnPtr<TextureManager> textureManager = TextureManager::create(4*1024*1024, 2*1024*1024, 1024);
RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
DebugScopedSetImplThread implThread;
OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
- Region noOcclusion;
- FakeTextureAllocator textureAllocator;
- CCTextureUpdater updater(&textureAllocator);
+ CCTextureUpdater updater;
+ FakeTextureAllocator fakeAllocator;
+ FakeTextureCopier fakeCopier;
+ FakeTextureUploader fakeUploader;
+ RefPtr<GraphicsContext3D> context = createCompositorMockGraphicsContext3D(GraphicsContext3D::Attributes());
// The tile size is 100x100, so this invalidates and then paints two tiles.
layer->setBounds(IntSize(100, 200));
layer->invalidateRect(IntRect(0, 0, 100, 200));
- layer->prepareToUpdate(IntRect(0, 0, 100, 200), noOcclusion);
- layer->updateCompositorResources(0, updater);
+ layer->updateLayerRect(updater, IntRect(0, 0, 100, 200), 0);
+ updater.update(context.get(), &fakeAllocator, &fakeCopier, &fakeUploader, 1000);
layer->pushPropertiesTo(layerImpl.get());
// We should have both tiles on the impl side.
@@ -535,20 +686,23 @@ TEST(TiledLayerChromiumTest, invalidateFromPrepare)
textureManager->unprotectAllTextures();
layer->fakeLayerTextureUpdater()->clearPrepareCount();
- // Invoke prepareToUpdate again. As the layer is valid prepareToUpdate shouldn't be invoked on
+ // Invoke updateLayerRect again. As the layer is valid updateLayerRect shouldn't be invoked on
// the LayerTextureUpdater.
- layer->prepareToUpdate(IntRect(0, 0, 100, 200), noOcclusion);
+ layer->updateLayerRect(updater, IntRect(0, 0, 100, 200), 0);
+ updater.update(context.get(), &fakeAllocator, &fakeCopier, &fakeUploader, 1000);
EXPECT_EQ(0, layer->fakeLayerTextureUpdater()->prepareCount());
layer->invalidateRect(IntRect(0, 0, 50, 50));
- // setRectToInvalidate triggers invalidateRect() being invoked from prepareToUpdate.
+ // setRectToInvalidate triggers invalidateRect() being invoked from updateLayerRect.
layer->fakeLayerTextureUpdater()->setRectToInvalidate(IntRect(25, 25, 50, 50), layer.get());
layer->fakeLayerTextureUpdater()->clearPrepareCount();
- layer->prepareToUpdate(IntRect(0, 0, 100, 200), noOcclusion);
+ layer->updateLayerRect(updater, IntRect(0, 0, 100, 200), 0);
+ updater.update(context.get(), &fakeAllocator, &fakeCopier, &fakeUploader, 1000);
EXPECT_EQ(1, layer->fakeLayerTextureUpdater()->prepareCount());
layer->fakeLayerTextureUpdater()->clearPrepareCount();
- // The layer should still be invalid as prepareToUpdate invoked invalidate.
- layer->prepareToUpdate(IntRect(0, 0, 100, 200), noOcclusion);
+ // The layer should still be invalid as updateLayerRect invoked invalidate.
+ layer->updateLayerRect(updater, IntRect(0, 0, 100, 200), 0);
+ updater.update(context.get(), &fakeAllocator, &fakeCopier, &fakeUploader, 1000);
EXPECT_EQ(1, layer->fakeLayerTextureUpdater()->prepareCount());
}
@@ -559,10 +713,8 @@ TEST(TiledLayerChromiumTest, verifyUpdateRectWhenContentBoundsAreScaled)
OwnPtr<TextureManager> textureManager = TextureManager::create(4*1024*1024, 2*1024*1024, 1024);
RefPtr<FakeTiledLayerWithScaledBounds> layer = adoptRef(new FakeTiledLayerWithScaledBounds(textureManager.get()));
- Region noOcclusion;
- FakeTextureAllocator textureAllocator;
- CCTextureUpdater updater(&textureAllocator);
+ CCTextureUpdater updater;
IntRect layerBounds(0, 0, 300, 200);
IntRect contentBounds(0, 0, 200, 250);
@@ -574,21 +726,18 @@ TEST(TiledLayerChromiumTest, verifyUpdateRectWhenContentBoundsAreScaled)
// On first update, the updateRect includes all tiles, even beyond the boundaries of the layer.
// However, it should still be in layer space, not content space.
layer->invalidateRect(contentBounds);
- layer->prepareToUpdate(contentBounds, noOcclusion);
- layer->updateCompositorResources(0, updater);
+ layer->updateLayerRect(updater, contentBounds, 0);
EXPECT_FLOAT_RECT_EQ(FloatRect(0, 0, 300, 300 * 0.8), layer->updateRect());
// After the tiles are updated once, another invalidate only needs to update the bounds of the layer.
layer->invalidateRect(contentBounds);
- layer->prepareToUpdate(contentBounds, noOcclusion);
- layer->updateCompositorResources(0, updater);
+ layer->updateLayerRect(updater, contentBounds, 0);
EXPECT_FLOAT_RECT_EQ(FloatRect(layerBounds), layer->updateRect());
// Partial re-paint should also be represented by the updateRect in layer space, not content space.
IntRect partialDamage(30, 100, 10, 10);
layer->invalidateRect(partialDamage);
- layer->prepareToUpdate(contentBounds, noOcclusion);
- layer->updateCompositorResources(0, updater);
+ layer->updateLayerRect(updater, contentBounds, 0);
EXPECT_FLOAT_RECT_EQ(FloatRect(45, 80, 15, 8), layer->updateRect());
}
@@ -599,9 +748,7 @@ TEST(TiledLayerChromiumTest, verifyInvalidationWhenContentsScaleChanges)
DebugScopedSetImplThread implThread;
OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
- FakeTextureAllocator textureAllocator;
- CCTextureUpdater updater(&textureAllocator);
- Region noOcclusion;
+ CCTextureUpdater updater;
// Create a layer with one tile.
layer->setBounds(IntSize(100, 100));
@@ -611,8 +758,7 @@ TEST(TiledLayerChromiumTest, verifyInvalidationWhenContentsScaleChanges)
EXPECT_FLOAT_RECT_EQ(FloatRect(0, 0, 100, 100), layer->lastNeedsDisplayRect());
// Push the tiles to the impl side and check that there is exactly one.
- layer->prepareToUpdate(IntRect(0, 0, 100, 100), noOcclusion);
- layer->updateCompositorResources(0, updater);
+ layer->updateLayerRect(updater, IntRect(0, 0, 100, 100), 0);
layer->pushPropertiesTo(layerImpl.get());
EXPECT_TRUE(layerImpl->hasTileAt(0, 0));
EXPECT_FALSE(layerImpl->hasTileAt(0, 1));
@@ -625,8 +771,7 @@ TEST(TiledLayerChromiumTest, verifyInvalidationWhenContentsScaleChanges)
EXPECT_FLOAT_RECT_EQ(FloatRect(0, 0, 100, 100), layer->lastNeedsDisplayRect());
// The impl side should get 2x2 tiles now.
- layer->prepareToUpdate(IntRect(0, 0, 200, 200), noOcclusion);
- layer->updateCompositorResources(0, updater);
+ layer->updateLayerRect(updater, IntRect(0, 0, 200, 200), 0);
layer->pushPropertiesTo(layerImpl.get());
EXPECT_TRUE(layerImpl->hasTileAt(0, 0));
EXPECT_TRUE(layerImpl->hasTileAt(0, 1));
@@ -636,8 +781,7 @@ TEST(TiledLayerChromiumTest, verifyInvalidationWhenContentsScaleChanges)
// Invalidate the entire layer again, but do not paint. All tiles should be gone now from the
// impl side.
layer->setNeedsDisplay();
- layer->prepareToUpdate(IntRect(0, 0, 0, 0), noOcclusion);
- layer->updateCompositorResources(0, updater);
+ layer->updateLayerRect(updater, IntRect(1, 0, 0, 1), 0);
layer->pushPropertiesTo(layerImpl.get());
EXPECT_FALSE(layerImpl->hasTileAt(0, 0));
EXPECT_FALSE(layerImpl->hasTileAt(0, 1));
@@ -650,7 +794,7 @@ TEST(TiledLayerChromiumTest, skipsDrawGetsReset)
// Initialize without threading support.
WebKit::WebCompositor::initialize(0);
FakeCCLayerTreeHostClient fakeCCLayerTreeHostClient;
- RefPtr<CCLayerTreeHost> ccLayerTreeHost = CCLayerTreeHost::create(&fakeCCLayerTreeHostClient, CCSettings());
+ OwnPtr<CCLayerTreeHost> ccLayerTreeHost = CCLayerTreeHost::create(&fakeCCLayerTreeHostClient, CCSettings());
// Create two 300 x 300 tiled layers.
IntSize contentBounds(300, 300);
@@ -671,14 +815,12 @@ TEST(TiledLayerChromiumTest, skipsDrawGetsReset)
rootLayer->invalidateRect(contentRect);
childLayer->invalidateRect(contentRect);
- FakeTextureAllocator textureAllocator;
- CCTextureUpdater updater(&textureAllocator);
+ CCTextureUpdater updater;
ccLayerTreeHost->setRootLayer(rootLayer);
ccLayerTreeHost->setViewportSize(IntSize(300, 300));
textureManager->setMaxMemoryLimitBytes(memoryLimit);
- ccLayerTreeHost->updateLayers();
- ccLayerTreeHost->updateCompositorResources(ccLayerTreeHost->context(), updater);
+ ccLayerTreeHost->updateLayers(updater);
// We'll skip the root layer.
EXPECT_TRUE(rootLayer->skipsDraw());
@@ -690,7 +832,7 @@ TEST(TiledLayerChromiumTest, skipsDrawGetsReset)
// Remove the child layer.
rootLayer->removeAllChildren();
- ccLayerTreeHost->updateLayers();
+ ccLayerTreeHost->updateLayers(updater);
EXPECT_FALSE(rootLayer->skipsDraw());
ccLayerTreeHost->setRootLayer(0);
@@ -702,16 +844,30 @@ TEST(TiledLayerChromiumTest, resizeToSmaller)
{
OwnPtr<TextureManager> textureManager = TextureManager::create(60*1024*1024, 60*1024*1024, 1024);
RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
- Region noOcclusion;
+ CCTextureUpdater updater;
layer->setBounds(IntSize(700, 700));
layer->invalidateRect(IntRect(0, 0, 700, 700));
- layer->prepareToUpdate(IntRect(0, 0, 700, 700), noOcclusion);
+ layer->updateLayerRect(updater, IntRect(0, 0, 700, 700), 0);
layer->setBounds(IntSize(200, 200));
layer->invalidateRect(IntRect(0, 0, 200, 200));
}
+TEST(TiledLayerChromiumTest, hugeLayerUpdateCrash)
+{
+ OwnPtr<TextureManager> textureManager = TextureManager::create(60*1024*1024, 60*1024*1024, 1024);
+ RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
+ CCTextureUpdater updater;
+
+ int size = 1 << 30;
+ layer->setBounds(IntSize(size, size));
+ layer->invalidateRect(IntRect(0, 0, size, size));
+
+ // Ensure no crash for bounds where size * size would overflow an int.
+ layer->updateLayerRect(updater, IntRect(0, 0, 700, 700), 0);
+}
+
TEST(TiledLayerChromiumTest, partialUpdates)
{
CCSettings settings;
@@ -719,7 +875,7 @@ TEST(TiledLayerChromiumTest, partialUpdates)
// Initialize without threading support.
WebKit::WebCompositor::initialize(0);
FakeCCLayerTreeHostClient fakeCCLayerTreeHostClient;
- RefPtr<CCLayerTreeHost> ccLayerTreeHost = CCLayerTreeHost::create(&fakeCCLayerTreeHostClient, settings);
+ OwnPtr<CCLayerTreeHost> ccLayerTreeHost = CCLayerTreeHost::create(&fakeCCLayerTreeHostClient, settings);
// Create one 500 x 300 tiled layer.
IntSize contentBounds(300, 200);
@@ -731,51 +887,92 @@ TEST(TiledLayerChromiumTest, partialUpdates)
layer->setPosition(FloatPoint(150, 150));
layer->invalidateRect(contentRect);
- FakeTextureAllocator textureAllocator;
- CCTextureUpdater updater(&textureAllocator);
+ CCTextureUpdater updater;
+ FakeTextureAllocator allocator;
+ FakeTextureCopier copier;
+ FakeTextureUploader uploader;
ccLayerTreeHost->setRootLayer(layer);
ccLayerTreeHost->setViewportSize(IntSize(300, 200));
// Full update of all 6 tiles.
- ccLayerTreeHost->updateLayers();
- ccLayerTreeHost->updateCompositorResources(ccLayerTreeHost->context(), updater);
- updater.update(0, 4);
- EXPECT_EQ(4, layer->fakeLayerTextureUpdater()->updateCount());
- EXPECT_TRUE(updater.hasMoreUpdates());
- layer->fakeLayerTextureUpdater()->clearUpdateCount();
- updater.update(0, 4);
- EXPECT_EQ(2, layer->fakeLayerTextureUpdater()->updateCount());
- EXPECT_FALSE(updater.hasMoreUpdates());
- layer->fakeLayerTextureUpdater()->clearUpdateCount();
+ ccLayerTreeHost->updateLayers(updater);
+ {
+ DebugScopedSetImplThread implThread;
+ OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
+ updater.update(0, &allocator, &copier, &uploader, 4);
+ EXPECT_EQ(4, layer->fakeLayerTextureUpdater()->updateCount());
+ EXPECT_TRUE(updater.hasMoreUpdates());
+ layer->fakeLayerTextureUpdater()->clearUpdateCount();
+ updater.update(0, &allocator, &copier, &uploader, 4);
+ EXPECT_EQ(2, layer->fakeLayerTextureUpdater()->updateCount());
+ EXPECT_FALSE(updater.hasMoreUpdates());
+ layer->fakeLayerTextureUpdater()->clearUpdateCount();
+ layer->pushPropertiesTo(layerImpl.get());
+ }
ccLayerTreeHost->commitComplete();
// Full update of 3 tiles and partial update of 3 tiles.
layer->invalidateRect(IntRect(0, 0, 300, 150));
- ccLayerTreeHost->updateLayers();
- ccLayerTreeHost->updateCompositorResources(ccLayerTreeHost->context(), updater);
- updater.update(0, 4);
- EXPECT_EQ(3, layer->fakeLayerTextureUpdater()->updateCount());
- EXPECT_TRUE(updater.hasMoreUpdates());
- layer->fakeLayerTextureUpdater()->clearUpdateCount();
- updater.update(0, 4);
- EXPECT_EQ(3, layer->fakeLayerTextureUpdater()->updateCount());
- EXPECT_FALSE(updater.hasMoreUpdates());
- layer->fakeLayerTextureUpdater()->clearUpdateCount();
+ ccLayerTreeHost->updateLayers(updater);
+ {
+ DebugScopedSetImplThread implThread;
+ OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
+ updater.update(0, &allocator, &copier, &uploader, 4);
+ EXPECT_EQ(3, layer->fakeLayerTextureUpdater()->updateCount());
+ EXPECT_TRUE(updater.hasMoreUpdates());
+ layer->fakeLayerTextureUpdater()->clearUpdateCount();
+ updater.update(0, &allocator, &copier, &uploader, 4);
+ EXPECT_EQ(3, layer->fakeLayerTextureUpdater()->updateCount());
+ EXPECT_FALSE(updater.hasMoreUpdates());
+ layer->fakeLayerTextureUpdater()->clearUpdateCount();
+ layer->pushPropertiesTo(layerImpl.get());
+ }
ccLayerTreeHost->commitComplete();
// Partial update of 6 tiles.
layer->invalidateRect(IntRect(50, 50, 200, 100));
- ccLayerTreeHost->updateLayers();
- ccLayerTreeHost->updateCompositorResources(ccLayerTreeHost->context(), updater);
- updater.update(0, 4);
- EXPECT_EQ(2, layer->fakeLayerTextureUpdater()->updateCount());
- EXPECT_TRUE(updater.hasMoreUpdates());
- layer->fakeLayerTextureUpdater()->clearUpdateCount();
- updater.update(0, 4);
- EXPECT_EQ(4, layer->fakeLayerTextureUpdater()->updateCount());
- EXPECT_FALSE(updater.hasMoreUpdates());
- layer->fakeLayerTextureUpdater()->clearUpdateCount();
+ {
+ DebugScopedSetImplThread implThread;
+ OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
+ ccLayerTreeHost->updateLayers(updater);
+ updater.update(0, &allocator, &copier, &uploader, 4);
+ EXPECT_EQ(2, layer->fakeLayerTextureUpdater()->updateCount());
+ EXPECT_TRUE(updater.hasMoreUpdates());
+ layer->fakeLayerTextureUpdater()->clearUpdateCount();
+ updater.update(0, &allocator, &copier, &uploader, 4);
+ EXPECT_EQ(4, layer->fakeLayerTextureUpdater()->updateCount());
+ EXPECT_FALSE(updater.hasMoreUpdates());
+ layer->fakeLayerTextureUpdater()->clearUpdateCount();
+ layer->pushPropertiesTo(layerImpl.get());
+ }
+ ccLayerTreeHost->commitComplete();
+
+ // Checkerboard all tiles.
+ layer->invalidateRect(IntRect(0, 0, 300, 200));
+ {
+ DebugScopedSetImplThread implThread;
+ OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
+ layer->pushPropertiesTo(layerImpl.get());
+ }
+ ccLayerTreeHost->commitComplete();
+
+ // Partail update of 6 checkerboard tiles.
+ layer->invalidateRect(IntRect(50, 50, 200, 100));
+ {
+ DebugScopedSetImplThread implThread;
+ OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0)));
+ ccLayerTreeHost->updateLayers(updater);
+ updater.update(0, &allocator, &copier, &uploader, 4);
+ EXPECT_EQ(4, layer->fakeLayerTextureUpdater()->updateCount());
+ EXPECT_TRUE(updater.hasMoreUpdates());
+ layer->fakeLayerTextureUpdater()->clearUpdateCount();
+ updater.update(0, &allocator, &copier, &uploader, 4);
+ EXPECT_EQ(2, layer->fakeLayerTextureUpdater()->updateCount());
+ EXPECT_FALSE(updater.hasMoreUpdates());
+ layer->fakeLayerTextureUpdater()->clearUpdateCount();
+ layer->pushPropertiesTo(layerImpl.get());
+ }
ccLayerTreeHost->commitComplete();
ccLayerTreeHost->setRootLayer(0);
@@ -787,13 +984,13 @@ TEST(TiledLayerChromiumTest, tilesPaintedWithoutOcclusion)
{
OwnPtr<TextureManager> textureManager = TextureManager::create(4*1024*1024, 2*1024*1024, 1024);
RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
- Region occluded;
+ CCTextureUpdater updater;
// The tile size is 100x100, so this invalidates and then paints two tiles.
layer->setBounds(IntSize(100, 200));
layer->invalidateRect(IntRect(0, 0, 100, 200));
- layer->prepareToUpdate(IntRect(0, 0, 100, 200), occluded);
+ layer->updateLayerRect(updater, IntRect(0, 0, 100, 200), 0);
EXPECT_EQ(2, layer->fakeLayerTextureUpdater()->prepareRectCount());
}
@@ -801,97 +998,137 @@ TEST(TiledLayerChromiumTest, tilesPaintedWithOcclusion)
{
OwnPtr<TextureManager> textureManager = TextureManager::create(4*1024*1024, 2*1024*1024, 1024);
RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
- Region occluded;
+ TestCCOcclusionTracker occluded;
+ CCTextureUpdater updater;
// The tile size is 100x100.
layer->setBounds(IntSize(600, 600));
+ layer->setDrawTransform(TransformationMatrix(1, 0, 0, 1, layer->bounds().width() / 2.0, layer->bounds().height() / 2.0));
- occluded = IntRect(200, 200, 300, 100);
+ occluded.setOcclusion(IntRect(200, 200, 300, 100));
layer->setVisibleLayerRect(IntRect(IntPoint(), layer->bounds()));
layer->invalidateRect(IntRect(0, 0, 600, 600));
- layer->prepareToUpdate(IntRect(0, 0, 600, 600), occluded);
+ layer->updateLayerRect(updater, IntRect(0, 0, 600, 600), &occluded);
EXPECT_EQ(36-3, layer->fakeLayerTextureUpdater()->prepareRectCount());
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 330000, 1);
+ EXPECT_EQ(3, occluded.overdrawMetrics().tilesCulledForUpload());
+
layer->fakeLayerTextureUpdater()->clearPrepareRectCount();
- occluded = IntRect(250, 200, 300, 100);
+ occluded.setOcclusion(IntRect(250, 200, 300, 100));
layer->invalidateRect(IntRect(0, 0, 600, 600));
- layer->prepareToUpdate(IntRect(0, 0, 600, 600), occluded);
+ layer->updateLayerRect(updater, IntRect(0, 0, 600, 600), &occluded);
EXPECT_EQ(36-2, layer->fakeLayerTextureUpdater()->prepareRectCount());
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 330000 + 340000, 1);
+ EXPECT_EQ(3 + 2, occluded.overdrawMetrics().tilesCulledForUpload());
+
layer->fakeLayerTextureUpdater()->clearPrepareRectCount();
- occluded = IntRect(250, 250, 300, 100);
+ occluded.setOcclusion(IntRect(250, 250, 300, 100));
layer->invalidateRect(IntRect(0, 0, 600, 600));
- layer->prepareToUpdate(IntRect(0, 0, 600, 600), occluded);
+ layer->updateLayerRect(updater, IntRect(0, 0, 600, 600), &occluded);
EXPECT_EQ(36, layer->fakeLayerTextureUpdater()->prepareRectCount());
+
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 330000 + 340000 + 360000, 1);
+ EXPECT_EQ(3 + 2, occluded.overdrawMetrics().tilesCulledForUpload());
}
TEST(TiledLayerChromiumTest, tilesPaintedWithOcclusionAndVisiblityConstraints)
{
OwnPtr<TextureManager> textureManager = TextureManager::create(4*1024*1024, 2*1024*1024, 1024);
RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
- Region occluded;
+ TestCCOcclusionTracker occluded;
+ CCTextureUpdater updater;
// The tile size is 100x100.
layer->setBounds(IntSize(600, 600));
+ layer->setDrawTransform(TransformationMatrix(1, 0, 0, 1, layer->bounds().width() / 2.0, layer->bounds().height() / 2.0));
// The partially occluded tiles (by the 150 occlusion height) are visible beyond the occlusion, so not culled.
- occluded = IntRect(200, 200, 300, 150);
+ occluded.setOcclusion(IntRect(200, 200, 300, 150));
layer->setVisibleLayerRect(IntRect(0, 0, 600, 360));
layer->invalidateRect(IntRect(0, 0, 600, 600));
- layer->prepareToUpdate(IntRect(0, 0, 600, 600), occluded);
- EXPECT_EQ(36-3, layer->fakeLayerTextureUpdater()->prepareRectCount());
+ layer->updateLayerRect(updater, IntRect(0, 0, 600, 360), &occluded);
+ EXPECT_EQ(24-3, layer->fakeLayerTextureUpdater()->prepareRectCount());
+
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 210000, 1);
+ EXPECT_EQ(3, occluded.overdrawMetrics().tilesCulledForUpload());
layer->fakeLayerTextureUpdater()->clearPrepareRectCount();
// Now the visible region stops at the edge of the occlusion so the partly visible tiles become fully occluded.
- occluded = IntRect(200, 200, 300, 150);
+ occluded.setOcclusion(IntRect(200, 200, 300, 150));
layer->setVisibleLayerRect(IntRect(0, 0, 600, 350));
layer->invalidateRect(IntRect(0, 0, 600, 600));
- layer->prepareToUpdate(IntRect(0, 0, 600, 600), occluded);
- EXPECT_EQ(36-6, layer->fakeLayerTextureUpdater()->prepareRectCount());
+ layer->updateLayerRect(updater, IntRect(0, 0, 600, 350), &occluded);
+ EXPECT_EQ(24-6, layer->fakeLayerTextureUpdater()->prepareRectCount());
+
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 210000 + 180000, 1);
+ EXPECT_EQ(3 + 6, occluded.overdrawMetrics().tilesCulledForUpload());
layer->fakeLayerTextureUpdater()->clearPrepareRectCount();
// Now the visible region is even smaller than the occlusion, it should have the same result.
- occluded = IntRect(200, 200, 300, 150);
+ occluded.setOcclusion(IntRect(200, 200, 300, 150));
layer->setVisibleLayerRect(IntRect(0, 0, 600, 340));
layer->invalidateRect(IntRect(0, 0, 600, 600));
- layer->prepareToUpdate(IntRect(0, 0, 600, 600), occluded);
- EXPECT_EQ(36-6, layer->fakeLayerTextureUpdater()->prepareRectCount());
+ layer->updateLayerRect(updater, IntRect(0, 0, 600, 340), &occluded);
+ EXPECT_EQ(24-6, layer->fakeLayerTextureUpdater()->prepareRectCount());
+
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 210000 + 180000 + 180000, 1);
+ EXPECT_EQ(3 + 6 + 6, occluded.overdrawMetrics().tilesCulledForUpload());
+
}
TEST(TiledLayerChromiumTest, tilesNotPaintedWithoutInvalidation)
{
OwnPtr<TextureManager> textureManager = TextureManager::create(4*1024*1024, 2*1024*1024, 1024);
RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
- Region occluded;
+ TestCCOcclusionTracker occluded;
+ CCTextureUpdater updater;
// The tile size is 100x100.
layer->setBounds(IntSize(600, 600));
+ layer->setDrawTransform(TransformationMatrix(1, 0, 0, 1, layer->bounds().width() / 2.0, layer->bounds().height() / 2.0));
- occluded = IntRect(200, 200, 300, 100);
+ occluded.setOcclusion(IntRect(200, 200, 300, 100));
layer->setVisibleLayerRect(IntRect(0, 0, 600, 600));
layer->invalidateRect(IntRect(0, 0, 600, 600));
- layer->prepareToUpdate(IntRect(0, 0, 600, 600), occluded);
+ layer->updateLayerRect(updater, IntRect(0, 0, 600, 600), &occluded);
EXPECT_EQ(36-3, layer->fakeLayerTextureUpdater()->prepareRectCount());
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 330000, 1);
+ EXPECT_EQ(3, occluded.overdrawMetrics().tilesCulledForUpload());
+
layer->fakeLayerTextureUpdater()->clearPrepareRectCount();
- // Repaint without marking it dirty.
- layer->prepareToUpdate(IntRect(0, 0, 600, 600), occluded);
+ // Repaint without marking it dirty. The culled tiles remained dirty.
+ layer->updateLayerRect(updater, IntRect(0, 0, 600, 600), &occluded);
EXPECT_EQ(0, layer->fakeLayerTextureUpdater()->prepareRectCount());
+
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 330000, 1);
+ EXPECT_EQ(6, occluded.overdrawMetrics().tilesCulledForUpload());
}
TEST(TiledLayerChromiumTest, tilesPaintedWithOcclusionAndTransforms)
{
OwnPtr<TextureManager> textureManager = TextureManager::create(4*1024*1024, 2*1024*1024, 1024);
RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
- Region occluded;
+ TestCCOcclusionTracker occluded;
+ CCTextureUpdater updater;
// The tile size is 100x100.
@@ -901,19 +1138,25 @@ TEST(TiledLayerChromiumTest, tilesPaintedWithOcclusionAndTransforms)
TransformationMatrix screenTransform;
screenTransform.scale(0.5);
layer->setScreenSpaceTransform(screenTransform);
+ layer->setDrawTransform(screenTransform * TransformationMatrix(1, 0, 0, 1, layer->bounds().width() / 2.0, layer->bounds().height() / 2.0));
- occluded = IntRect(100, 100, 150, 50);
+ occluded.setOcclusion(IntRect(100, 100, 150, 50));
layer->setVisibleLayerRect(IntRect(IntPoint(), layer->bounds()));
layer->invalidateRect(IntRect(0, 0, 600, 600));
- layer->prepareToUpdate(IntRect(0, 0, 600, 600), occluded);
+ layer->updateLayerRect(updater, IntRect(0, 0, 600, 600), &occluded);
EXPECT_EQ(36-3, layer->fakeLayerTextureUpdater()->prepareRectCount());
+
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 330000, 1);
+ EXPECT_EQ(3, occluded.overdrawMetrics().tilesCulledForUpload());
}
TEST(TiledLayerChromiumTest, tilesPaintedWithOcclusionAndScaling)
{
OwnPtr<TextureManager> textureManager = TextureManager::create(4*1024*1024, 2*1024*1024, 1024);
RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
- Region occluded;
+ TestCCOcclusionTracker occluded;
+ CCTextureUpdater updater;
// The tile size is 100x100.
@@ -922,99 +1165,196 @@ TEST(TiledLayerChromiumTest, tilesPaintedWithOcclusionAndScaling)
// pixels, which means none should be occluded.
layer->setContentsScale(0.5);
layer->setBounds(IntSize(600, 600));
+ layer->setDrawTransform(TransformationMatrix(1, 0, 0, 1, layer->bounds().width() / 2.0, layer->bounds().height() / 2.0));
- occluded = IntRect(200, 200, 300, 100);
+ occluded.setOcclusion(IntRect(200, 200, 300, 100));
layer->setVisibleLayerRect(IntRect(IntPoint(), layer->bounds()));
layer->invalidateRect(IntRect(0, 0, 600, 600));
- layer->prepareToUpdate(IntRect(0, 0, 600, 600), occluded);
+ layer->updateLayerRect(updater, IntRect(0, 0, 600, 600), &occluded);
// The content is half the size of the layer (so the number of tiles is fewer).
// In this case, the content is 300x300, and since the tile size is 100, the
// number of tiles 3x3.
EXPECT_EQ(9, layer->fakeLayerTextureUpdater()->prepareRectCount());
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 90000, 1);
+ EXPECT_EQ(0, occluded.overdrawMetrics().tilesCulledForUpload());
+
layer->fakeLayerTextureUpdater()->clearPrepareRectCount();
// This makes sure the painting works when the content space is scaled to
// a different layer space. In this case the occluded region catches the
// blown up tiles.
- occluded = IntRect(200, 200, 300, 200);
+ occluded.setOcclusion(IntRect(200, 200, 300, 200));
layer->setVisibleLayerRect(IntRect(IntPoint(), layer->bounds()));
layer->invalidateRect(IntRect(0, 0, 600, 600));
- layer->prepareToUpdate(IntRect(0, 0, 600, 600), occluded);
+ layer->updateLayerRect(updater, IntRect(0, 0, 600, 600), &occluded);
EXPECT_EQ(9-1, layer->fakeLayerTextureUpdater()->prepareRectCount());
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 90000 + 80000, 1);
+ EXPECT_EQ(1, occluded.overdrawMetrics().tilesCulledForUpload());
+
layer->fakeLayerTextureUpdater()->clearPrepareRectCount();
// This makes sure content scaling and transforms work together.
TransformationMatrix screenTransform;
screenTransform.scale(0.5);
layer->setScreenSpaceTransform(screenTransform);
+ layer->setDrawTransform(screenTransform * TransformationMatrix(1, 0, 0, 1, layer->bounds().width() / 2.0, layer->bounds().height() / 2.0));
- occluded = IntRect(100, 100, 150, 100);
+ occluded.setOcclusion(IntRect(100, 100, 150, 100));
layer->setVisibleLayerRect(IntRect(IntPoint(), layer->bounds()));
layer->invalidateRect(IntRect(0, 0, 600, 600));
- layer->prepareToUpdate(IntRect(0, 0, 600, 600), occluded);
+ layer->updateLayerRect(updater, IntRect(0, 0, 600, 600), &occluded);
EXPECT_EQ(9-1, layer->fakeLayerTextureUpdater()->prepareRectCount());
+
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 90000 + 80000 + 80000, 1);
+ EXPECT_EQ(1 + 1, occluded.overdrawMetrics().tilesCulledForUpload());
}
-TEST(TiledLayerChromiumTest, opaqueContentsRegion)
+TEST(TiledLayerChromiumTest, visibleContentOpaqueRegion)
{
OwnPtr<TextureManager> textureManager = TextureManager::create(4*1024*1024, 2*1024*1024, 1024);
RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
+ TestCCOcclusionTracker occluded;
+ CCTextureUpdater updater;
// The tile size is 100x100, so this invalidates and then paints two tiles in various ways.
IntRect opaquePaintRect;
Region opaqueContents;
- Region noOcclusion;
IntRect contentBounds = IntRect(0, 0, 100, 200);
IntRect visibleBounds = IntRect(0, 0, 100, 150);
layer->setBounds(contentBounds.size());
+ layer->setDrawTransform(TransformationMatrix(1, 0, 0, 1, layer->bounds().width() / 2.0, layer->bounds().height() / 2.0));
layer->setVisibleLayerRect(visibleBounds);
layer->setDrawOpacity(1);
- // If the layer doesn't paint opaque content, then the opaqueContentsRegion should be empty.
- layer->fakeLayerTextureUpdater()->setOpaquePaintRect(opaquePaintRect);
+ // If the layer doesn't paint opaque content, then the visibleContentOpaqueRegion should be empty.
+ layer->fakeLayerTextureUpdater()->setOpaquePaintRect(IntRect());
layer->invalidateRect(contentBounds);
- layer->prepareToUpdate(contentBounds, noOcclusion);
- opaqueContents = layer->opaqueContentsRegion();
+ layer->updateLayerRect(updater, contentBounds, &occluded);
+ opaqueContents = layer->visibleContentOpaqueRegion();
EXPECT_TRUE(opaqueContents.isEmpty());
- // opaqueContentsRegion should match the visible part of what is painted opaque.
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsPainted(), 20000, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 20000, 1);
+ EXPECT_EQ(0, occluded.overdrawMetrics().tilesCulledForUpload());
+
+ // visibleContentOpaqueRegion should match the visible part of what is painted opaque.
opaquePaintRect = IntRect(10, 10, 90, 190);
layer->fakeLayerTextureUpdater()->setOpaquePaintRect(opaquePaintRect);
layer->invalidateRect(contentBounds);
- layer->prepareToUpdate(contentBounds, noOcclusion);
- opaqueContents = layer->opaqueContentsRegion();
+ layer->updateLayerRect(updater, contentBounds, &occluded);
+ opaqueContents = layer->visibleContentOpaqueRegion();
EXPECT_EQ_RECT(intersection(opaquePaintRect, visibleBounds), opaqueContents.bounds());
EXPECT_EQ(1u, opaqueContents.rects().size());
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsPainted(), 20000 * 2, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 17100, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 20000 + 20000 - 17100, 1);
+ EXPECT_EQ(0, occluded.overdrawMetrics().tilesCulledForUpload());
+
// If we paint again without invalidating, the same stuff should be opaque.
layer->fakeLayerTextureUpdater()->setOpaquePaintRect(IntRect());
- layer->prepareToUpdate(contentBounds, noOcclusion);
- opaqueContents = layer->opaqueContentsRegion();
+ layer->updateLayerRect(updater, contentBounds, &occluded);
+ opaqueContents = layer->visibleContentOpaqueRegion();
EXPECT_EQ_RECT(intersection(opaquePaintRect, visibleBounds), opaqueContents.bounds());
EXPECT_EQ(1u, opaqueContents.rects().size());
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsPainted(), 20000 * 2, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 17100, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 20000 + 20000 - 17100, 1);
+ EXPECT_EQ(0, occluded.overdrawMetrics().tilesCulledForUpload());
+
// If we repaint a non-opaque part of the tile, then it shouldn't lose its opaque-ness. And other tiles should
// not be affected.
layer->fakeLayerTextureUpdater()->setOpaquePaintRect(IntRect());
layer->invalidateRect(IntRect(0, 0, 1, 1));
- layer->prepareToUpdate(contentBounds, noOcclusion);
- opaqueContents = layer->opaqueContentsRegion();
+ layer->updateLayerRect(updater, contentBounds, &occluded);
+ opaqueContents = layer->visibleContentOpaqueRegion();
EXPECT_EQ_RECT(intersection(opaquePaintRect, visibleBounds), opaqueContents.bounds());
EXPECT_EQ(1u, opaqueContents.rects().size());
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsPainted(), 20000 * 2 + 1, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 17100, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 20000 + 20000 - 17100 + 1, 1);
+ EXPECT_EQ(0, occluded.overdrawMetrics().tilesCulledForUpload());
+
// If we repaint an opaque part of the tile, then it should lose its opaque-ness. But other tiles should still
// not be affected.
layer->fakeLayerTextureUpdater()->setOpaquePaintRect(IntRect());
layer->invalidateRect(IntRect(10, 10, 1, 1));
- layer->prepareToUpdate(contentBounds, noOcclusion);
- opaqueContents = layer->opaqueContentsRegion();
+ layer->updateLayerRect(updater, contentBounds, &occluded);
+ opaqueContents = layer->visibleContentOpaqueRegion();
EXPECT_EQ_RECT(intersection(IntRect(10, 100, 90, 100), visibleBounds), opaqueContents.bounds());
EXPECT_EQ(1u, opaqueContents.rects().size());
+
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsPainted(), 20000 * 2 + 1 + 1, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 17100, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 20000 + 20000 - 17100 + 1 + 1, 1);
+ EXPECT_EQ(0, occluded.overdrawMetrics().tilesCulledForUpload());
+
+ // No metrics are recorded in prepaint, so the values should not change from above.
+ layer->idleUpdateLayerRect(updater, contentBounds, &occluded);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsPainted(), 20000 * 2 + 1 + 1, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 17100, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 20000 + 20000 - 17100 + 1 + 1, 1);
+ EXPECT_EQ(0, occluded.overdrawMetrics().tilesCulledForUpload());
+}
+
+TEST(TiledLayerChromiumTest, pixelsPaintedMetrics)
+{
+ OwnPtr<TextureManager> textureManager = TextureManager::create(4*1024*1024, 2*1024*1024, 1024);
+ RefPtr<FakeTiledLayerChromium> layer = adoptRef(new FakeTiledLayerChromium(textureManager.get()));
+ TestCCOcclusionTracker occluded;
+ CCTextureUpdater updater;
+
+ // The tile size is 100x100, so this invalidates and then paints two tiles in various ways.
+
+ IntRect opaquePaintRect;
+ Region opaqueContents;
+
+ IntRect contentBounds = IntRect(0, 0, 100, 300);
+ IntRect visibleBounds = IntRect(0, 0, 100, 300);
+
+ layer->setBounds(contentBounds.size());
+ layer->setDrawTransform(TransformationMatrix(1, 0, 0, 1, layer->bounds().width() / 2.0, layer->bounds().height() / 2.0));
+ layer->setVisibleLayerRect(visibleBounds);
+ layer->setDrawOpacity(1);
+
+ // Invalidates and paints the whole layer.
+ layer->fakeLayerTextureUpdater()->setOpaquePaintRect(IntRect());
+ layer->invalidateRect(contentBounds);
+ layer->updateLayerRect(updater, contentBounds, &occluded);
+ opaqueContents = layer->visibleContentOpaqueRegion();
+ EXPECT_TRUE(opaqueContents.isEmpty());
+
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsPainted(), 30000, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 30000, 1);
+ EXPECT_EQ(0, occluded.overdrawMetrics().tilesCulledForUpload());
+
+ // Invalidates an area on the top and bottom tile, which will cause us to paint the tile in the middle,
+ // even though it is not dirty and will not be uploaded.
+ layer->fakeLayerTextureUpdater()->setOpaquePaintRect(IntRect());
+ layer->invalidateRect(IntRect(0, 0, 1, 1));
+ layer->invalidateRect(IntRect(50, 200, 10, 10));
+ layer->updateLayerRect(updater, contentBounds, &occluded);
+ opaqueContents = layer->visibleContentOpaqueRegion();
+ EXPECT_TRUE(opaqueContents.isEmpty());
+
+ // The middle tile was painted even though not invalidated.
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsPainted(), 30000 + 60 * 210, 1);
+ // The pixels uploaded will not include the non-invalidated tile in the middle.
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedOpaque(), 0, 1);
+ EXPECT_NEAR(occluded.overdrawMetrics().pixelsUploadedTranslucent(), 30000 + 1 + 100, 1);
+ EXPECT_EQ(0, occluded.overdrawMetrics().tilesCulledForUpload());
}
} // namespace
diff --git a/Source/WebKit/chromium/tests/TilingDataTest.cpp b/Source/WebKit/chromium/tests/TilingDataTest.cpp
index c29743f86..47c0361ea 100755
--- a/Source/WebKit/chromium/tests/TilingDataTest.cpp
+++ b/Source/WebKit/chromium/tests/TilingDataTest.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "TilingData.h"
+#include <wtf/Assertions.h>
#include <gtest/gtest.h>
@@ -38,385 +39,406 @@ using namespace WebCore;
namespace {
+class TestTiling : public TilingData {
+public:
+ TestTiling(int maxTextureSize, int totalSizeX, int totalSizeY, bool hasBorderTexels)
+ : TilingData(maxTextureSize, totalSizeX, totalSizeY, hasBorderTexels)
+ {
+ }
+
+ // This function only available for testing because of potential overflow.
+ int numTiles() const
+ {
+ int numTiles = numTilesX() * numTilesY();
+
+ // Assert no overflow.
+ EXPECT_GE(numTiles, 0);
+ if (numTiles > 0)
+ EXPECT_EQ(numTiles / numTilesX(), numTilesY());
+
+ return numTiles;
+ }
+};
+
TEST(TilingDataTest, numTiles_NoTiling)
{
- EXPECT_EQ(1, TilingData(16, 16, 16, false).numTiles());
- EXPECT_EQ(1, TilingData(16, 15, 15, true).numTiles());
- EXPECT_EQ(1, TilingData(16, 16, 16, true).numTiles());
- EXPECT_EQ(1, TilingData(16, 1, 16, false).numTiles());
- EXPECT_EQ(1, TilingData(15, 15, 15, true).numTiles());
+ EXPECT_EQ(1, TestTiling(16, 16, 16, false).numTiles());
+ EXPECT_EQ(1, TestTiling(16, 15, 15, true).numTiles());
+ EXPECT_EQ(1, TestTiling(16, 16, 16, true).numTiles());
+ EXPECT_EQ(1, TestTiling(16, 1, 16, false).numTiles());
+ EXPECT_EQ(1, TestTiling(15, 15, 15, true).numTiles());
}
TEST(TilingDataTest, numTiles_TilingNoBorders)
{
- EXPECT_EQ(0, TilingData(0, 0, 0, false).numTiles());
- EXPECT_EQ(0, TilingData(0, 4, 0, false).numTiles());
- EXPECT_EQ(0, TilingData(0, 0, 4, false).numTiles());
- EXPECT_EQ(0, TilingData(4, 4, 0, false).numTiles());
- EXPECT_EQ(0, TilingData(4, 0, 4, false).numTiles());
- EXPECT_EQ(0, TilingData(-8, 1, 1, false).numTiles());
- EXPECT_EQ(0, TilingData(-1, 1, 1, false).numTiles());
- EXPECT_EQ(0, TilingData(0, 1, 1, false).numTiles());
-
- EXPECT_EQ(1, TilingData(1, 1, 1, false).numTiles());
- EXPECT_EQ(2, TilingData(1, 1, 2, false).numTiles());
- EXPECT_EQ(2, TilingData(1, 2, 1, false).numTiles());
- EXPECT_EQ(1, TilingData(2, 1, 1, false).numTiles());
- EXPECT_EQ(1, TilingData(2, 1, 2, false).numTiles());
- EXPECT_EQ(1, TilingData(2, 2, 1, false).numTiles());
- EXPECT_EQ(1, TilingData(2, 2, 2, false).numTiles());
- EXPECT_EQ(1, TilingData(3, 3, 3, false).numTiles());
-
- EXPECT_EQ(1, TilingData(4, 1, 4, false).numTiles());
- EXPECT_EQ(1, TilingData(4, 2, 4, false).numTiles());
- EXPECT_EQ(1, TilingData(4, 3, 4, false).numTiles());
- EXPECT_EQ(1, TilingData(4, 4, 4, false).numTiles());
- EXPECT_EQ(2, TilingData(4, 5, 4, false).numTiles());
- EXPECT_EQ(2, TilingData(4, 6, 4, false).numTiles());
- EXPECT_EQ(2, TilingData(4, 7, 4, false).numTiles());
- EXPECT_EQ(2, TilingData(4, 8, 4, false).numTiles());
- EXPECT_EQ(3, TilingData(4, 9, 4, false).numTiles());
- EXPECT_EQ(3, TilingData(4, 10, 4, false).numTiles());
- EXPECT_EQ(3, TilingData(4, 11, 4, false).numTiles());
-
- EXPECT_EQ(1, TilingData(5, 1, 5, false).numTiles());
- EXPECT_EQ(1, TilingData(5, 2, 5, false).numTiles());
- EXPECT_EQ(1, TilingData(5, 3, 5, false).numTiles());
- EXPECT_EQ(1, TilingData(5, 4, 5, false).numTiles());
- EXPECT_EQ(1, TilingData(5, 5, 5, false).numTiles());
- EXPECT_EQ(2, TilingData(5, 6, 5, false).numTiles());
- EXPECT_EQ(2, TilingData(5, 7, 5, false).numTiles());
- EXPECT_EQ(2, TilingData(5, 8, 5, false).numTiles());
- EXPECT_EQ(2, TilingData(5, 9, 5, false).numTiles());
- EXPECT_EQ(2, TilingData(5, 10, 5, false).numTiles());
- EXPECT_EQ(3, TilingData(5, 11, 5, false).numTiles());
-
- EXPECT_EQ(1, TilingData(16, 16, 16, false).numTiles());
- EXPECT_EQ(1, TilingData(17, 16, 16, false).numTiles());
- EXPECT_EQ(4, TilingData(15, 16, 16, false).numTiles());
- EXPECT_EQ(4, TilingData(8, 16, 16, false).numTiles());
- EXPECT_EQ(6, TilingData(8, 17, 16, false).numTiles());
+ EXPECT_EQ(0, TestTiling(0, 0, 0, false).numTiles());
+ EXPECT_EQ(0, TestTiling(0, 4, 0, false).numTiles());
+ EXPECT_EQ(0, TestTiling(0, 0, 4, false).numTiles());
+ EXPECT_EQ(0, TestTiling(4, 4, 0, false).numTiles());
+ EXPECT_EQ(0, TestTiling(4, 0, 4, false).numTiles());
+ EXPECT_EQ(0, TestTiling(-8, 1, 1, false).numTiles());
+ EXPECT_EQ(0, TestTiling(-1, 1, 1, false).numTiles());
+ EXPECT_EQ(0, TestTiling(0, 1, 1, false).numTiles());
+
+ EXPECT_EQ(1, TestTiling(1, 1, 1, false).numTiles());
+ EXPECT_EQ(2, TestTiling(1, 1, 2, false).numTiles());
+ EXPECT_EQ(2, TestTiling(1, 2, 1, false).numTiles());
+ EXPECT_EQ(1, TestTiling(2, 1, 1, false).numTiles());
+ EXPECT_EQ(1, TestTiling(2, 1, 2, false).numTiles());
+ EXPECT_EQ(1, TestTiling(2, 2, 1, false).numTiles());
+ EXPECT_EQ(1, TestTiling(2, 2, 2, false).numTiles());
+ EXPECT_EQ(1, TestTiling(3, 3, 3, false).numTiles());
+
+ EXPECT_EQ(1, TestTiling(4, 1, 4, false).numTiles());
+ EXPECT_EQ(1, TestTiling(4, 2, 4, false).numTiles());
+ EXPECT_EQ(1, TestTiling(4, 3, 4, false).numTiles());
+ EXPECT_EQ(1, TestTiling(4, 4, 4, false).numTiles());
+ EXPECT_EQ(2, TestTiling(4, 5, 4, false).numTiles());
+ EXPECT_EQ(2, TestTiling(4, 6, 4, false).numTiles());
+ EXPECT_EQ(2, TestTiling(4, 7, 4, false).numTiles());
+ EXPECT_EQ(2, TestTiling(4, 8, 4, false).numTiles());
+ EXPECT_EQ(3, TestTiling(4, 9, 4, false).numTiles());
+ EXPECT_EQ(3, TestTiling(4, 10, 4, false).numTiles());
+ EXPECT_EQ(3, TestTiling(4, 11, 4, false).numTiles());
+
+ EXPECT_EQ(1, TestTiling(5, 1, 5, false).numTiles());
+ EXPECT_EQ(1, TestTiling(5, 2, 5, false).numTiles());
+ EXPECT_EQ(1, TestTiling(5, 3, 5, false).numTiles());
+ EXPECT_EQ(1, TestTiling(5, 4, 5, false).numTiles());
+ EXPECT_EQ(1, TestTiling(5, 5, 5, false).numTiles());
+ EXPECT_EQ(2, TestTiling(5, 6, 5, false).numTiles());
+ EXPECT_EQ(2, TestTiling(5, 7, 5, false).numTiles());
+ EXPECT_EQ(2, TestTiling(5, 8, 5, false).numTiles());
+ EXPECT_EQ(2, TestTiling(5, 9, 5, false).numTiles());
+ EXPECT_EQ(2, TestTiling(5, 10, 5, false).numTiles());
+ EXPECT_EQ(3, TestTiling(5, 11, 5, false).numTiles());
+
+ EXPECT_EQ(1, TestTiling(16, 16, 16, false).numTiles());
+ EXPECT_EQ(1, TestTiling(17, 16, 16, false).numTiles());
+ EXPECT_EQ(4, TestTiling(15, 16, 16, false).numTiles());
+ EXPECT_EQ(4, TestTiling(8, 16, 16, false).numTiles());
+ EXPECT_EQ(6, TestTiling(8, 17, 16, false).numTiles());
}
TEST(TilingDataTest, numTiles_TilingWithBorders)
{
- EXPECT_EQ(0, TilingData(0, 0, 0, true).numTiles());
- EXPECT_EQ(0, TilingData(0, 4, 0, true).numTiles());
- EXPECT_EQ(0, TilingData(0, 0, 4, true).numTiles());
- EXPECT_EQ(0, TilingData(4, 4, 0, true).numTiles());
- EXPECT_EQ(0, TilingData(4, 0, 4, true).numTiles());
- EXPECT_EQ(0, TilingData(-8, 1, 1, true).numTiles());
- EXPECT_EQ(0, TilingData(-1, 1, 1, true).numTiles());
- EXPECT_EQ(0, TilingData(0, 1, 1, true).numTiles());
-
- EXPECT_EQ(1, TilingData(1, 1, 1, true).numTiles());
- EXPECT_EQ(0, TilingData(1, 1, 2, true).numTiles());
- EXPECT_EQ(0, TilingData(1, 2, 1, true).numTiles());
- EXPECT_EQ(1, TilingData(2, 1, 1, true).numTiles());
- EXPECT_EQ(1, TilingData(2, 1, 2, true).numTiles());
- EXPECT_EQ(1, TilingData(2, 2, 1, true).numTiles());
- EXPECT_EQ(1, TilingData(2, 2, 2, true).numTiles());
-
- EXPECT_EQ(1, TilingData(3, 1, 3, true).numTiles());
- EXPECT_EQ(1, TilingData(3, 2, 3, true).numTiles());
- EXPECT_EQ(1, TilingData(3, 3, 3, true).numTiles());
- EXPECT_EQ(2, TilingData(3, 4, 3, true).numTiles());
- EXPECT_EQ(3, TilingData(3, 5, 3, true).numTiles());
- EXPECT_EQ(4, TilingData(3, 6, 3, true).numTiles());
- EXPECT_EQ(5, TilingData(3, 7, 3, true).numTiles());
-
- EXPECT_EQ(1, TilingData(4, 1, 4, true).numTiles());
- EXPECT_EQ(1, TilingData(4, 2, 4, true).numTiles());
- EXPECT_EQ(1, TilingData(4, 3, 4, true).numTiles());
- EXPECT_EQ(1, TilingData(4, 4, 4, true).numTiles());
- EXPECT_EQ(2, TilingData(4, 5, 4, true).numTiles());
- EXPECT_EQ(2, TilingData(4, 6, 4, true).numTiles());
- EXPECT_EQ(3, TilingData(4, 7, 4, true).numTiles());
- EXPECT_EQ(3, TilingData(4, 8, 4, true).numTiles());
- EXPECT_EQ(4, TilingData(4, 9, 4, true).numTiles());
- EXPECT_EQ(4, TilingData(4, 10, 4, true).numTiles());
- EXPECT_EQ(5, TilingData(4, 11, 4, true).numTiles());
-
- EXPECT_EQ(1, TilingData(5, 1, 5, true).numTiles());
- EXPECT_EQ(1, TilingData(5, 2, 5, true).numTiles());
- EXPECT_EQ(1, TilingData(5, 3, 5, true).numTiles());
- EXPECT_EQ(1, TilingData(5, 4, 5, true).numTiles());
- EXPECT_EQ(1, TilingData(5, 5, 5, true).numTiles());
- EXPECT_EQ(2, TilingData(5, 6, 5, true).numTiles());
- EXPECT_EQ(2, TilingData(5, 7, 5, true).numTiles());
- EXPECT_EQ(2, TilingData(5, 8, 5, true).numTiles());
- EXPECT_EQ(3, TilingData(5, 9, 5, true).numTiles());
- EXPECT_EQ(3, TilingData(5, 10, 5, true).numTiles());
- EXPECT_EQ(3, TilingData(5, 11, 5, true).numTiles());
+ EXPECT_EQ(0, TestTiling(0, 0, 0, true).numTiles());
+ EXPECT_EQ(0, TestTiling(0, 4, 0, true).numTiles());
+ EXPECT_EQ(0, TestTiling(0, 0, 4, true).numTiles());
+ EXPECT_EQ(0, TestTiling(4, 4, 0, true).numTiles());
+ EXPECT_EQ(0, TestTiling(4, 0, 4, true).numTiles());
+ EXPECT_EQ(0, TestTiling(-8, 1, 1, true).numTiles());
+ EXPECT_EQ(0, TestTiling(-1, 1, 1, true).numTiles());
+ EXPECT_EQ(0, TestTiling(0, 1, 1, true).numTiles());
+
+ EXPECT_EQ(1, TestTiling(1, 1, 1, true).numTiles());
+ EXPECT_EQ(0, TestTiling(1, 1, 2, true).numTiles());
+ EXPECT_EQ(0, TestTiling(1, 2, 1, true).numTiles());
+ EXPECT_EQ(1, TestTiling(2, 1, 1, true).numTiles());
+ EXPECT_EQ(1, TestTiling(2, 1, 2, true).numTiles());
+ EXPECT_EQ(1, TestTiling(2, 2, 1, true).numTiles());
+ EXPECT_EQ(1, TestTiling(2, 2, 2, true).numTiles());
+
+ EXPECT_EQ(1, TestTiling(3, 1, 3, true).numTiles());
+ EXPECT_EQ(1, TestTiling(3, 2, 3, true).numTiles());
+ EXPECT_EQ(1, TestTiling(3, 3, 3, true).numTiles());
+ EXPECT_EQ(2, TestTiling(3, 4, 3, true).numTiles());
+ EXPECT_EQ(3, TestTiling(3, 5, 3, true).numTiles());
+ EXPECT_EQ(4, TestTiling(3, 6, 3, true).numTiles());
+ EXPECT_EQ(5, TestTiling(3, 7, 3, true).numTiles());
+
+ EXPECT_EQ(1, TestTiling(4, 1, 4, true).numTiles());
+ EXPECT_EQ(1, TestTiling(4, 2, 4, true).numTiles());
+ EXPECT_EQ(1, TestTiling(4, 3, 4, true).numTiles());
+ EXPECT_EQ(1, TestTiling(4, 4, 4, true).numTiles());
+ EXPECT_EQ(2, TestTiling(4, 5, 4, true).numTiles());
+ EXPECT_EQ(2, TestTiling(4, 6, 4, true).numTiles());
+ EXPECT_EQ(3, TestTiling(4, 7, 4, true).numTiles());
+ EXPECT_EQ(3, TestTiling(4, 8, 4, true).numTiles());
+ EXPECT_EQ(4, TestTiling(4, 9, 4, true).numTiles());
+ EXPECT_EQ(4, TestTiling(4, 10, 4, true).numTiles());
+ EXPECT_EQ(5, TestTiling(4, 11, 4, true).numTiles());
+
+ EXPECT_EQ(1, TestTiling(5, 1, 5, true).numTiles());
+ EXPECT_EQ(1, TestTiling(5, 2, 5, true).numTiles());
+ EXPECT_EQ(1, TestTiling(5, 3, 5, true).numTiles());
+ EXPECT_EQ(1, TestTiling(5, 4, 5, true).numTiles());
+ EXPECT_EQ(1, TestTiling(5, 5, 5, true).numTiles());
+ EXPECT_EQ(2, TestTiling(5, 6, 5, true).numTiles());
+ EXPECT_EQ(2, TestTiling(5, 7, 5, true).numTiles());
+ EXPECT_EQ(2, TestTiling(5, 8, 5, true).numTiles());
+ EXPECT_EQ(3, TestTiling(5, 9, 5, true).numTiles());
+ EXPECT_EQ(3, TestTiling(5, 10, 5, true).numTiles());
+ EXPECT_EQ(3, TestTiling(5, 11, 5, true).numTiles());
}
TEST(TilingDataTest, tileXIndexFromSrcCoord)
{
- EXPECT_EQ(0, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(1));
- EXPECT_EQ(0, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(2));
- EXPECT_EQ(1, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(3));
- EXPECT_EQ(1, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(4));
- EXPECT_EQ(1, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(5));
- EXPECT_EQ(2, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(6));
- EXPECT_EQ(2, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(7));
- EXPECT_EQ(2, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(8));
- EXPECT_EQ(3, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(9));
- EXPECT_EQ(3, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(10));
- EXPECT_EQ(3, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(11));
-
- EXPECT_EQ(0, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(1));
- EXPECT_EQ(1, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(2));
- EXPECT_EQ(2, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(3));
- EXPECT_EQ(3, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(4));
- EXPECT_EQ(4, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(5));
- EXPECT_EQ(5, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(6));
- EXPECT_EQ(6, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(7));
- EXPECT_EQ(7, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(8));
- EXPECT_EQ(7, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(9));
- EXPECT_EQ(7, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(10));
- EXPECT_EQ(7, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(11));
-
- EXPECT_EQ(0, TilingData(1, 1, 1, false).tileXIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(2, 2, 2, false).tileXIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(2, 2, 2, false).tileXIndexFromSrcCoord(1));
- EXPECT_EQ(0, TilingData(3, 3, 3, false).tileXIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(3, 3, 3, false).tileXIndexFromSrcCoord(1));
- EXPECT_EQ(0, TilingData(3, 3, 3, false).tileXIndexFromSrcCoord(2));
-
- EXPECT_EQ(0, TilingData(3, 4, 3, false).tileXIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(3, 4, 3, false).tileXIndexFromSrcCoord(1));
- EXPECT_EQ(0, TilingData(3, 4, 3, false).tileXIndexFromSrcCoord(2));
- EXPECT_EQ(1, TilingData(3, 4, 3, false).tileXIndexFromSrcCoord(3));
-
- EXPECT_EQ(0, TilingData(1, 1, 1, true).tileXIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(2, 2, 2, true).tileXIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(2, 2, 2, true).tileXIndexFromSrcCoord(1));
- EXPECT_EQ(0, TilingData(3, 3, 3, true).tileXIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(3, 3, 3, true).tileXIndexFromSrcCoord(1));
- EXPECT_EQ(0, TilingData(3, 3, 3, true).tileXIndexFromSrcCoord(2));
-
- EXPECT_EQ(0, TilingData(3, 4, 3, true).tileXIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(3, 4, 3, true).tileXIndexFromSrcCoord(1));
- EXPECT_EQ(1, TilingData(3, 4, 3, true).tileXIndexFromSrcCoord(2));
- EXPECT_EQ(1, TilingData(3, 4, 3, true).tileXIndexFromSrcCoord(3));
+ EXPECT_EQ(0, TestTiling(3, 10, 10, false).tileXIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(3, 10, 10, false).tileXIndexFromSrcCoord(1));
+ EXPECT_EQ(0, TestTiling(3, 10, 10, false).tileXIndexFromSrcCoord(2));
+ EXPECT_EQ(1, TestTiling(3, 10, 10, false).tileXIndexFromSrcCoord(3));
+ EXPECT_EQ(1, TestTiling(3, 10, 10, false).tileXIndexFromSrcCoord(4));
+ EXPECT_EQ(1, TestTiling(3, 10, 10, false).tileXIndexFromSrcCoord(5));
+ EXPECT_EQ(2, TestTiling(3, 10, 10, false).tileXIndexFromSrcCoord(6));
+ EXPECT_EQ(2, TestTiling(3, 10, 10, false).tileXIndexFromSrcCoord(7));
+ EXPECT_EQ(2, TestTiling(3, 10, 10, false).tileXIndexFromSrcCoord(8));
+ EXPECT_EQ(3, TestTiling(3, 10, 10, false).tileXIndexFromSrcCoord(9));
+ EXPECT_EQ(3, TestTiling(3, 10, 10, false).tileXIndexFromSrcCoord(10));
+ EXPECT_EQ(3, TestTiling(3, 10, 10, false).tileXIndexFromSrcCoord(11));
+
+ EXPECT_EQ(0, TestTiling(3, 10, 10, true).tileXIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(3, 10, 10, true).tileXIndexFromSrcCoord(1));
+ EXPECT_EQ(1, TestTiling(3, 10, 10, true).tileXIndexFromSrcCoord(2));
+ EXPECT_EQ(2, TestTiling(3, 10, 10, true).tileXIndexFromSrcCoord(3));
+ EXPECT_EQ(3, TestTiling(3, 10, 10, true).tileXIndexFromSrcCoord(4));
+ EXPECT_EQ(4, TestTiling(3, 10, 10, true).tileXIndexFromSrcCoord(5));
+ EXPECT_EQ(5, TestTiling(3, 10, 10, true).tileXIndexFromSrcCoord(6));
+ EXPECT_EQ(6, TestTiling(3, 10, 10, true).tileXIndexFromSrcCoord(7));
+ EXPECT_EQ(7, TestTiling(3, 10, 10, true).tileXIndexFromSrcCoord(8));
+ EXPECT_EQ(7, TestTiling(3, 10, 10, true).tileXIndexFromSrcCoord(9));
+ EXPECT_EQ(7, TestTiling(3, 10, 10, true).tileXIndexFromSrcCoord(10));
+ EXPECT_EQ(7, TestTiling(3, 10, 10, true).tileXIndexFromSrcCoord(11));
+
+ EXPECT_EQ(0, TestTiling(1, 1, 1, false).tileXIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(2, 2, 2, false).tileXIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(2, 2, 2, false).tileXIndexFromSrcCoord(1));
+ EXPECT_EQ(0, TestTiling(3, 3, 3, false).tileXIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(3, 3, 3, false).tileXIndexFromSrcCoord(1));
+ EXPECT_EQ(0, TestTiling(3, 3, 3, false).tileXIndexFromSrcCoord(2));
+
+ EXPECT_EQ(0, TestTiling(3, 4, 3, false).tileXIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(3, 4, 3, false).tileXIndexFromSrcCoord(1));
+ EXPECT_EQ(0, TestTiling(3, 4, 3, false).tileXIndexFromSrcCoord(2));
+ EXPECT_EQ(1, TestTiling(3, 4, 3, false).tileXIndexFromSrcCoord(3));
+
+ EXPECT_EQ(0, TestTiling(1, 1, 1, true).tileXIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(2, 2, 2, true).tileXIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(2, 2, 2, true).tileXIndexFromSrcCoord(1));
+ EXPECT_EQ(0, TestTiling(3, 3, 3, true).tileXIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(3, 3, 3, true).tileXIndexFromSrcCoord(1));
+ EXPECT_EQ(0, TestTiling(3, 3, 3, true).tileXIndexFromSrcCoord(2));
+
+ EXPECT_EQ(0, TestTiling(3, 4, 3, true).tileXIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(3, 4, 3, true).tileXIndexFromSrcCoord(1));
+ EXPECT_EQ(1, TestTiling(3, 4, 3, true).tileXIndexFromSrcCoord(2));
+ EXPECT_EQ(1, TestTiling(3, 4, 3, true).tileXIndexFromSrcCoord(3));
}
TEST(TilingDataTest, tileYIndexFromSrcCoord)
{
- EXPECT_EQ(0, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(1));
- EXPECT_EQ(0, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(2));
- EXPECT_EQ(1, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(3));
- EXPECT_EQ(1, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(4));
- EXPECT_EQ(1, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(5));
- EXPECT_EQ(2, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(6));
- EXPECT_EQ(2, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(7));
- EXPECT_EQ(2, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(8));
- EXPECT_EQ(3, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(9));
- EXPECT_EQ(3, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(10));
- EXPECT_EQ(3, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(11));
-
- EXPECT_EQ(0, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(1));
- EXPECT_EQ(1, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(2));
- EXPECT_EQ(2, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(3));
- EXPECT_EQ(3, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(4));
- EXPECT_EQ(4, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(5));
- EXPECT_EQ(5, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(6));
- EXPECT_EQ(6, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(7));
- EXPECT_EQ(7, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(8));
- EXPECT_EQ(7, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(9));
- EXPECT_EQ(7, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(10));
- EXPECT_EQ(7, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(11));
-
- EXPECT_EQ(0, TilingData(1, 1, 1, false).tileYIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(2, 2, 2, false).tileYIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(2, 2, 2, false).tileYIndexFromSrcCoord(1));
- EXPECT_EQ(0, TilingData(3, 3, 3, false).tileYIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(3, 3, 3, false).tileYIndexFromSrcCoord(1));
- EXPECT_EQ(0, TilingData(3, 3, 3, false).tileYIndexFromSrcCoord(2));
-
- EXPECT_EQ(0, TilingData(3, 3, 4, false).tileYIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(3, 3, 4, false).tileYIndexFromSrcCoord(1));
- EXPECT_EQ(0, TilingData(3, 3, 4, false).tileYIndexFromSrcCoord(2));
- EXPECT_EQ(1, TilingData(3, 3, 4, false).tileYIndexFromSrcCoord(3));
-
- EXPECT_EQ(0, TilingData(1, 1, 1, true).tileYIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(2, 2, 2, true).tileYIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(2, 2, 2, true).tileYIndexFromSrcCoord(1));
- EXPECT_EQ(0, TilingData(3, 3, 3, true).tileYIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(3, 3, 3, true).tileYIndexFromSrcCoord(1));
- EXPECT_EQ(0, TilingData(3, 3, 3, true).tileYIndexFromSrcCoord(2));
-
- EXPECT_EQ(0, TilingData(3, 3, 4, true).tileYIndexFromSrcCoord(0));
- EXPECT_EQ(0, TilingData(3, 3, 4, true).tileYIndexFromSrcCoord(1));
- EXPECT_EQ(1, TilingData(3, 3, 4, true).tileYIndexFromSrcCoord(2));
- EXPECT_EQ(1, TilingData(3, 3, 4, true).tileYIndexFromSrcCoord(3));
+ EXPECT_EQ(0, TestTiling(3, 10, 10, false).tileYIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(3, 10, 10, false).tileYIndexFromSrcCoord(1));
+ EXPECT_EQ(0, TestTiling(3, 10, 10, false).tileYIndexFromSrcCoord(2));
+ EXPECT_EQ(1, TestTiling(3, 10, 10, false).tileYIndexFromSrcCoord(3));
+ EXPECT_EQ(1, TestTiling(3, 10, 10, false).tileYIndexFromSrcCoord(4));
+ EXPECT_EQ(1, TestTiling(3, 10, 10, false).tileYIndexFromSrcCoord(5));
+ EXPECT_EQ(2, TestTiling(3, 10, 10, false).tileYIndexFromSrcCoord(6));
+ EXPECT_EQ(2, TestTiling(3, 10, 10, false).tileYIndexFromSrcCoord(7));
+ EXPECT_EQ(2, TestTiling(3, 10, 10, false).tileYIndexFromSrcCoord(8));
+ EXPECT_EQ(3, TestTiling(3, 10, 10, false).tileYIndexFromSrcCoord(9));
+ EXPECT_EQ(3, TestTiling(3, 10, 10, false).tileYIndexFromSrcCoord(10));
+ EXPECT_EQ(3, TestTiling(3, 10, 10, false).tileYIndexFromSrcCoord(11));
+
+ EXPECT_EQ(0, TestTiling(3, 10, 10, true).tileYIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(3, 10, 10, true).tileYIndexFromSrcCoord(1));
+ EXPECT_EQ(1, TestTiling(3, 10, 10, true).tileYIndexFromSrcCoord(2));
+ EXPECT_EQ(2, TestTiling(3, 10, 10, true).tileYIndexFromSrcCoord(3));
+ EXPECT_EQ(3, TestTiling(3, 10, 10, true).tileYIndexFromSrcCoord(4));
+ EXPECT_EQ(4, TestTiling(3, 10, 10, true).tileYIndexFromSrcCoord(5));
+ EXPECT_EQ(5, TestTiling(3, 10, 10, true).tileYIndexFromSrcCoord(6));
+ EXPECT_EQ(6, TestTiling(3, 10, 10, true).tileYIndexFromSrcCoord(7));
+ EXPECT_EQ(7, TestTiling(3, 10, 10, true).tileYIndexFromSrcCoord(8));
+ EXPECT_EQ(7, TestTiling(3, 10, 10, true).tileYIndexFromSrcCoord(9));
+ EXPECT_EQ(7, TestTiling(3, 10, 10, true).tileYIndexFromSrcCoord(10));
+ EXPECT_EQ(7, TestTiling(3, 10, 10, true).tileYIndexFromSrcCoord(11));
+
+ EXPECT_EQ(0, TestTiling(1, 1, 1, false).tileYIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(2, 2, 2, false).tileYIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(2, 2, 2, false).tileYIndexFromSrcCoord(1));
+ EXPECT_EQ(0, TestTiling(3, 3, 3, false).tileYIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(3, 3, 3, false).tileYIndexFromSrcCoord(1));
+ EXPECT_EQ(0, TestTiling(3, 3, 3, false).tileYIndexFromSrcCoord(2));
+
+ EXPECT_EQ(0, TestTiling(3, 3, 4, false).tileYIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(3, 3, 4, false).tileYIndexFromSrcCoord(1));
+ EXPECT_EQ(0, TestTiling(3, 3, 4, false).tileYIndexFromSrcCoord(2));
+ EXPECT_EQ(1, TestTiling(3, 3, 4, false).tileYIndexFromSrcCoord(3));
+
+ EXPECT_EQ(0, TestTiling(1, 1, 1, true).tileYIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(2, 2, 2, true).tileYIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(2, 2, 2, true).tileYIndexFromSrcCoord(1));
+ EXPECT_EQ(0, TestTiling(3, 3, 3, true).tileYIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(3, 3, 3, true).tileYIndexFromSrcCoord(1));
+ EXPECT_EQ(0, TestTiling(3, 3, 3, true).tileYIndexFromSrcCoord(2));
+
+ EXPECT_EQ(0, TestTiling(3, 3, 4, true).tileYIndexFromSrcCoord(0));
+ EXPECT_EQ(0, TestTiling(3, 3, 4, true).tileYIndexFromSrcCoord(1));
+ EXPECT_EQ(1, TestTiling(3, 3, 4, true).tileYIndexFromSrcCoord(2));
+ EXPECT_EQ(1, TestTiling(3, 3, 4, true).tileYIndexFromSrcCoord(3));
}
TEST(TilingDataTest, tileSizeX)
{
- EXPECT_EQ(5, TilingData(5, 5, 5, false).tileSizeX(0));
- EXPECT_EQ(5, TilingData(5, 5, 5, true).tileSizeX(0));
-
- EXPECT_EQ(5, TilingData(5, 6, 6, false).tileSizeX(0));
- EXPECT_EQ(1, TilingData(5, 6, 6, false).tileSizeX(1));
- EXPECT_EQ(4, TilingData(5, 6, 6, true).tileSizeX(0));
- EXPECT_EQ(2, TilingData(5, 6, 6, true).tileSizeX(1));
-
- EXPECT_EQ(5, TilingData(5, 8, 8, false).tileSizeX(0));
- EXPECT_EQ(3, TilingData(5, 8, 8, false).tileSizeX(1));
- EXPECT_EQ(4, TilingData(5, 8, 8, true).tileSizeX(0));
- EXPECT_EQ(4, TilingData(5, 8, 8, true).tileSizeX(1));
-
- EXPECT_EQ(5, TilingData(5, 10, 10, false).tileSizeX(0));
- EXPECT_EQ(5, TilingData(5, 10, 10, false).tileSizeX(1));
- EXPECT_EQ(4, TilingData(5, 10, 10, true).tileSizeX(0));
- EXPECT_EQ(3, TilingData(5, 10, 10, true).tileSizeX(1));
- EXPECT_EQ(3, TilingData(5, 10, 10, true).tileSizeX(2));
-
- EXPECT_EQ(4, TilingData(5, 11, 11, true).tileSizeX(2));
- EXPECT_EQ(3, TilingData(5, 12, 12, true).tileSizeX(2));
+ EXPECT_EQ(5, TestTiling(5, 5, 5, false).tileSizeX(0));
+ EXPECT_EQ(5, TestTiling(5, 5, 5, true).tileSizeX(0));
+
+ EXPECT_EQ(5, TestTiling(5, 6, 6, false).tileSizeX(0));
+ EXPECT_EQ(1, TestTiling(5, 6, 6, false).tileSizeX(1));
+ EXPECT_EQ(4, TestTiling(5, 6, 6, true).tileSizeX(0));
+ EXPECT_EQ(2, TestTiling(5, 6, 6, true).tileSizeX(1));
+
+ EXPECT_EQ(5, TestTiling(5, 8, 8, false).tileSizeX(0));
+ EXPECT_EQ(3, TestTiling(5, 8, 8, false).tileSizeX(1));
+ EXPECT_EQ(4, TestTiling(5, 8, 8, true).tileSizeX(0));
+ EXPECT_EQ(4, TestTiling(5, 8, 8, true).tileSizeX(1));
+
+ EXPECT_EQ(5, TestTiling(5, 10, 10, false).tileSizeX(0));
+ EXPECT_EQ(5, TestTiling(5, 10, 10, false).tileSizeX(1));
+ EXPECT_EQ(4, TestTiling(5, 10, 10, true).tileSizeX(0));
+ EXPECT_EQ(3, TestTiling(5, 10, 10, true).tileSizeX(1));
+ EXPECT_EQ(3, TestTiling(5, 10, 10, true).tileSizeX(2));
+
+ EXPECT_EQ(4, TestTiling(5, 11, 11, true).tileSizeX(2));
+ EXPECT_EQ(3, TestTiling(5, 12, 12, true).tileSizeX(2));
}
TEST(TilingDataTest, tileSizeY)
{
- EXPECT_EQ(5, TilingData(5, 5, 5, false).tileSizeY(0));
- EXPECT_EQ(5, TilingData(5, 5, 5, true).tileSizeY(0));
-
- EXPECT_EQ(5, TilingData(5, 6, 6, false).tileSizeY(0));
- EXPECT_EQ(1, TilingData(5, 6, 6, false).tileSizeY(1));
- EXPECT_EQ(4, TilingData(5, 6, 6, true).tileSizeY(0));
- EXPECT_EQ(2, TilingData(5, 6, 6, true).tileSizeY(1));
-
- EXPECT_EQ(5, TilingData(5, 8, 8, false).tileSizeY(0));
- EXPECT_EQ(3, TilingData(5, 8, 8, false).tileSizeY(1));
- EXPECT_EQ(4, TilingData(5, 8, 8, true).tileSizeY(0));
- EXPECT_EQ(4, TilingData(5, 8, 8, true).tileSizeY(1));
-
- EXPECT_EQ(5, TilingData(5, 10, 10, false).tileSizeY(0));
- EXPECT_EQ(5, TilingData(5, 10, 10, false).tileSizeY(1));
- EXPECT_EQ(4, TilingData(5, 10, 10, true).tileSizeY(0));
- EXPECT_EQ(3, TilingData(5, 10, 10, true).tileSizeY(1));
- EXPECT_EQ(3, TilingData(5, 10, 10, true).tileSizeY(2));
-
- EXPECT_EQ(4, TilingData(5, 11, 11, true).tileSizeY(2));
- EXPECT_EQ(3, TilingData(5, 12, 12, true).tileSizeY(2));
+ EXPECT_EQ(5, TestTiling(5, 5, 5, false).tileSizeY(0));
+ EXPECT_EQ(5, TestTiling(5, 5, 5, true).tileSizeY(0));
+
+ EXPECT_EQ(5, TestTiling(5, 6, 6, false).tileSizeY(0));
+ EXPECT_EQ(1, TestTiling(5, 6, 6, false).tileSizeY(1));
+ EXPECT_EQ(4, TestTiling(5, 6, 6, true).tileSizeY(0));
+ EXPECT_EQ(2, TestTiling(5, 6, 6, true).tileSizeY(1));
+
+ EXPECT_EQ(5, TestTiling(5, 8, 8, false).tileSizeY(0));
+ EXPECT_EQ(3, TestTiling(5, 8, 8, false).tileSizeY(1));
+ EXPECT_EQ(4, TestTiling(5, 8, 8, true).tileSizeY(0));
+ EXPECT_EQ(4, TestTiling(5, 8, 8, true).tileSizeY(1));
+
+ EXPECT_EQ(5, TestTiling(5, 10, 10, false).tileSizeY(0));
+ EXPECT_EQ(5, TestTiling(5, 10, 10, false).tileSizeY(1));
+ EXPECT_EQ(4, TestTiling(5, 10, 10, true).tileSizeY(0));
+ EXPECT_EQ(3, TestTiling(5, 10, 10, true).tileSizeY(1));
+ EXPECT_EQ(3, TestTiling(5, 10, 10, true).tileSizeY(2));
+
+ EXPECT_EQ(4, TestTiling(5, 11, 11, true).tileSizeY(2));
+ EXPECT_EQ(3, TestTiling(5, 12, 12, true).tileSizeY(2));
}
TEST(TilingDataTest, tileSizeX_and_tilePositionX)
{
// Single tile cases:
- EXPECT_EQ(1, TilingData(3, 1, 1, false).tileSizeX(0));
- EXPECT_EQ(0, TilingData(3, 1, 1, false).tilePositionX(0));
- EXPECT_EQ(1, TilingData(3, 1, 100, false).tileSizeX(0));
- EXPECT_EQ(0, TilingData(3, 1, 100, false).tilePositionX(0));
- EXPECT_EQ(3, TilingData(3, 3, 1, false).tileSizeX(0));
- EXPECT_EQ(0, TilingData(3, 3, 1, false).tilePositionX(0));
- EXPECT_EQ(3, TilingData(3, 3, 100, false).tileSizeX(0));
- EXPECT_EQ(0, TilingData(3, 3, 100, false).tilePositionX(0));
- EXPECT_EQ(1, TilingData(3, 1, 1, true).tileSizeX(0));
- EXPECT_EQ(0, TilingData(3, 1, 1, true).tilePositionX(0));
- EXPECT_EQ(1, TilingData(3, 1, 100, true).tileSizeX(0));
- EXPECT_EQ(0, TilingData(3, 1, 100, true).tilePositionX(0));
- EXPECT_EQ(3, TilingData(3, 3, 1, true).tileSizeX(0));
- EXPECT_EQ(0, TilingData(3, 3, 1, true).tilePositionX(0));
- EXPECT_EQ(3, TilingData(3, 3, 100, true).tileSizeX(0));
- EXPECT_EQ(0, TilingData(3, 3, 100, true).tilePositionX(0));
+ EXPECT_EQ(1, TestTiling(3, 1, 1, false).tileSizeX(0));
+ EXPECT_EQ(0, TestTiling(3, 1, 1, false).tilePositionX(0));
+ EXPECT_EQ(1, TestTiling(3, 1, 100, false).tileSizeX(0));
+ EXPECT_EQ(0, TestTiling(3, 1, 100, false).tilePositionX(0));
+ EXPECT_EQ(3, TestTiling(3, 3, 1, false).tileSizeX(0));
+ EXPECT_EQ(0, TestTiling(3, 3, 1, false).tilePositionX(0));
+ EXPECT_EQ(3, TestTiling(3, 3, 100, false).tileSizeX(0));
+ EXPECT_EQ(0, TestTiling(3, 3, 100, false).tilePositionX(0));
+ EXPECT_EQ(1, TestTiling(3, 1, 1, true).tileSizeX(0));
+ EXPECT_EQ(0, TestTiling(3, 1, 1, true).tilePositionX(0));
+ EXPECT_EQ(1, TestTiling(3, 1, 100, true).tileSizeX(0));
+ EXPECT_EQ(0, TestTiling(3, 1, 100, true).tilePositionX(0));
+ EXPECT_EQ(3, TestTiling(3, 3, 1, true).tileSizeX(0));
+ EXPECT_EQ(0, TestTiling(3, 3, 1, true).tilePositionX(0));
+ EXPECT_EQ(3, TestTiling(3, 3, 100, true).tileSizeX(0));
+ EXPECT_EQ(0, TestTiling(3, 3, 100, true).tilePositionX(0));
// Multiple tiles:
// no border
// positions 0, 3
- EXPECT_EQ(2, TilingData(3, 6, 1, false).numTiles());
- EXPECT_EQ(3, TilingData(3, 6, 1, false).tileSizeX(0));
- EXPECT_EQ(3, TilingData(3, 6, 1, false).tileSizeX(1));
- EXPECT_EQ(0, TilingData(3, 6, 1, false).tilePositionX(0));
- EXPECT_EQ(3, TilingData(3, 6, 1, false).tilePositionX(1));
- EXPECT_EQ(3, TilingData(3, 6, 100, false).tileSizeX(0));
- EXPECT_EQ(3, TilingData(3, 6, 100, false).tileSizeX(1));
- EXPECT_EQ(0, TilingData(3, 6, 100, false).tilePositionX(0));
- EXPECT_EQ(3, TilingData(3, 6, 100, false).tilePositionX(1));
+ EXPECT_EQ(2, TestTiling(3, 6, 1, false).numTiles());
+ EXPECT_EQ(3, TestTiling(3, 6, 1, false).tileSizeX(0));
+ EXPECT_EQ(3, TestTiling(3, 6, 1, false).tileSizeX(1));
+ EXPECT_EQ(0, TestTiling(3, 6, 1, false).tilePositionX(0));
+ EXPECT_EQ(3, TestTiling(3, 6, 1, false).tilePositionX(1));
+ EXPECT_EQ(3, TestTiling(3, 6, 100, false).tileSizeX(0));
+ EXPECT_EQ(3, TestTiling(3, 6, 100, false).tileSizeX(1));
+ EXPECT_EQ(0, TestTiling(3, 6, 100, false).tilePositionX(0));
+ EXPECT_EQ(3, TestTiling(3, 6, 100, false).tilePositionX(1));
// Multiple tiles:
// with border
// positions 0, 2, 3, 4
- EXPECT_EQ(4, TilingData(3, 6, 1, true).numTiles());
- EXPECT_EQ(2, TilingData(3, 6, 1, true).tileSizeX(0));
- EXPECT_EQ(1, TilingData(3, 6, 1, true).tileSizeX(1));
- EXPECT_EQ(1, TilingData(3, 6, 1, true).tileSizeX(2));
- EXPECT_EQ(2, TilingData(3, 6, 1, true).tileSizeX(3));
- EXPECT_EQ(0, TilingData(3, 6, 1, true).tilePositionX(0));
- EXPECT_EQ(2, TilingData(3, 6, 1, true).tilePositionX(1));
- EXPECT_EQ(3, TilingData(3, 6, 1, true).tilePositionX(2));
- EXPECT_EQ(4, TilingData(3, 6, 1, true).tilePositionX(3));
- EXPECT_EQ(2, TilingData(3, 6, 100, true).tileSizeX(0));
- EXPECT_EQ(1, TilingData(3, 6, 100, true).tileSizeX(1));
- EXPECT_EQ(1, TilingData(3, 6, 100, true).tileSizeX(2));
- EXPECT_EQ(2, TilingData(3, 6, 100, true).tileSizeX(3));
- EXPECT_EQ(0, TilingData(3, 6, 100, true).tilePositionX(0));
- EXPECT_EQ(2, TilingData(3, 6, 100, true).tilePositionX(1));
- EXPECT_EQ(3, TilingData(3, 6, 100, true).tilePositionX(2));
- EXPECT_EQ(4, TilingData(3, 6, 100, true).tilePositionX(3));
+ EXPECT_EQ(4, TestTiling(3, 6, 1, true).numTiles());
+ EXPECT_EQ(2, TestTiling(3, 6, 1, true).tileSizeX(0));
+ EXPECT_EQ(1, TestTiling(3, 6, 1, true).tileSizeX(1));
+ EXPECT_EQ(1, TestTiling(3, 6, 1, true).tileSizeX(2));
+ EXPECT_EQ(2, TestTiling(3, 6, 1, true).tileSizeX(3));
+ EXPECT_EQ(0, TestTiling(3, 6, 1, true).tilePositionX(0));
+ EXPECT_EQ(2, TestTiling(3, 6, 1, true).tilePositionX(1));
+ EXPECT_EQ(3, TestTiling(3, 6, 1, true).tilePositionX(2));
+ EXPECT_EQ(4, TestTiling(3, 6, 1, true).tilePositionX(3));
+ EXPECT_EQ(2, TestTiling(3, 6, 100, true).tileSizeX(0));
+ EXPECT_EQ(1, TestTiling(3, 6, 100, true).tileSizeX(1));
+ EXPECT_EQ(1, TestTiling(3, 6, 100, true).tileSizeX(2));
+ EXPECT_EQ(2, TestTiling(3, 6, 100, true).tileSizeX(3));
+ EXPECT_EQ(0, TestTiling(3, 6, 100, true).tilePositionX(0));
+ EXPECT_EQ(2, TestTiling(3, 6, 100, true).tilePositionX(1));
+ EXPECT_EQ(3, TestTiling(3, 6, 100, true).tilePositionX(2));
+ EXPECT_EQ(4, TestTiling(3, 6, 100, true).tilePositionX(3));
}
TEST(TilingDataTest, tileSizeY_and_tilePositionY)
{
// Single tile cases:
- EXPECT_EQ(1, TilingData(3, 1, 1, false).tileSizeY(0));
- EXPECT_EQ(0, TilingData(3, 1, 1, false).tilePositionY(0));
- EXPECT_EQ(1, TilingData(3, 100, 1, false).tileSizeY(0));
- EXPECT_EQ(0, TilingData(3, 100, 1, false).tilePositionY(0));
- EXPECT_EQ(3, TilingData(3, 1, 3, false).tileSizeY(0));
- EXPECT_EQ(0, TilingData(3, 1, 3, false).tilePositionY(0));
- EXPECT_EQ(3, TilingData(3, 100, 3, false).tileSizeY(0));
- EXPECT_EQ(0, TilingData(3, 100, 3, false).tilePositionY(0));
- EXPECT_EQ(1, TilingData(3, 1, 1, true).tileSizeY(0));
- EXPECT_EQ(0, TilingData(3, 1, 1, true).tilePositionY(0));
- EXPECT_EQ(1, TilingData(3, 100, 1, true).tileSizeY(0));
- EXPECT_EQ(0, TilingData(3, 100, 1, true).tilePositionY(0));
- EXPECT_EQ(3, TilingData(3, 1, 3, true).tileSizeY(0));
- EXPECT_EQ(0, TilingData(3, 1, 3, true).tilePositionY(0));
- EXPECT_EQ(3, TilingData(3, 100, 3, true).tileSizeY(0));
- EXPECT_EQ(0, TilingData(3, 100, 3, true).tilePositionY(0));
+ EXPECT_EQ(1, TestTiling(3, 1, 1, false).tileSizeY(0));
+ EXPECT_EQ(0, TestTiling(3, 1, 1, false).tilePositionY(0));
+ EXPECT_EQ(1, TestTiling(3, 100, 1, false).tileSizeY(0));
+ EXPECT_EQ(0, TestTiling(3, 100, 1, false).tilePositionY(0));
+ EXPECT_EQ(3, TestTiling(3, 1, 3, false).tileSizeY(0));
+ EXPECT_EQ(0, TestTiling(3, 1, 3, false).tilePositionY(0));
+ EXPECT_EQ(3, TestTiling(3, 100, 3, false).tileSizeY(0));
+ EXPECT_EQ(0, TestTiling(3, 100, 3, false).tilePositionY(0));
+ EXPECT_EQ(1, TestTiling(3, 1, 1, true).tileSizeY(0));
+ EXPECT_EQ(0, TestTiling(3, 1, 1, true).tilePositionY(0));
+ EXPECT_EQ(1, TestTiling(3, 100, 1, true).tileSizeY(0));
+ EXPECT_EQ(0, TestTiling(3, 100, 1, true).tilePositionY(0));
+ EXPECT_EQ(3, TestTiling(3, 1, 3, true).tileSizeY(0));
+ EXPECT_EQ(0, TestTiling(3, 1, 3, true).tilePositionY(0));
+ EXPECT_EQ(3, TestTiling(3, 100, 3, true).tileSizeY(0));
+ EXPECT_EQ(0, TestTiling(3, 100, 3, true).tilePositionY(0));
// Multiple tiles:
// no border
// positions 0, 3
- EXPECT_EQ(2, TilingData(3, 1, 6, false).numTiles());
- EXPECT_EQ(3, TilingData(3, 1, 6, false).tileSizeY(0));
- EXPECT_EQ(3, TilingData(3, 1, 6, false).tileSizeY(1));
- EXPECT_EQ(0, TilingData(3, 1, 6, false).tilePositionY(0));
- EXPECT_EQ(3, TilingData(3, 1, 6, false).tilePositionY(1));
- EXPECT_EQ(3, TilingData(3, 100, 6, false).tileSizeY(0));
- EXPECT_EQ(3, TilingData(3, 100, 6, false).tileSizeY(1));
- EXPECT_EQ(0, TilingData(3, 100, 6, false).tilePositionY(0));
- EXPECT_EQ(3, TilingData(3, 100, 6, false).tilePositionY(1));
+ EXPECT_EQ(2, TestTiling(3, 1, 6, false).numTiles());
+ EXPECT_EQ(3, TestTiling(3, 1, 6, false).tileSizeY(0));
+ EXPECT_EQ(3, TestTiling(3, 1, 6, false).tileSizeY(1));
+ EXPECT_EQ(0, TestTiling(3, 1, 6, false).tilePositionY(0));
+ EXPECT_EQ(3, TestTiling(3, 1, 6, false).tilePositionY(1));
+ EXPECT_EQ(3, TestTiling(3, 100, 6, false).tileSizeY(0));
+ EXPECT_EQ(3, TestTiling(3, 100, 6, false).tileSizeY(1));
+ EXPECT_EQ(0, TestTiling(3, 100, 6, false).tilePositionY(0));
+ EXPECT_EQ(3, TestTiling(3, 100, 6, false).tilePositionY(1));
// Multiple tiles:
// with border
// positions 0, 2, 3, 4
- EXPECT_EQ(4, TilingData(3, 1, 6, true).numTiles());
- EXPECT_EQ(2, TilingData(3, 1, 6, true).tileSizeY(0));
- EXPECT_EQ(1, TilingData(3, 1, 6, true).tileSizeY(1));
- EXPECT_EQ(1, TilingData(3, 1, 6, true).tileSizeY(2));
- EXPECT_EQ(2, TilingData(3, 1, 6, true).tileSizeY(3));
- EXPECT_EQ(0, TilingData(3, 1, 6, true).tilePositionY(0));
- EXPECT_EQ(2, TilingData(3, 1, 6, true).tilePositionY(1));
- EXPECT_EQ(3, TilingData(3, 1, 6, true).tilePositionY(2));
- EXPECT_EQ(4, TilingData(3, 1, 6, true).tilePositionY(3));
- EXPECT_EQ(2, TilingData(3, 100, 6, true).tileSizeY(0));
- EXPECT_EQ(1, TilingData(3, 100, 6, true).tileSizeY(1));
- EXPECT_EQ(1, TilingData(3, 100, 6, true).tileSizeY(2));
- EXPECT_EQ(2, TilingData(3, 100, 6, true).tileSizeY(3));
- EXPECT_EQ(0, TilingData(3, 100, 6, true).tilePositionY(0));
- EXPECT_EQ(2, TilingData(3, 100, 6, true).tilePositionY(1));
- EXPECT_EQ(3, TilingData(3, 100, 6, true).tilePositionY(2));
- EXPECT_EQ(4, TilingData(3, 100, 6, true).tilePositionY(3));
+ EXPECT_EQ(4, TestTiling(3, 1, 6, true).numTiles());
+ EXPECT_EQ(2, TestTiling(3, 1, 6, true).tileSizeY(0));
+ EXPECT_EQ(1, TestTiling(3, 1, 6, true).tileSizeY(1));
+ EXPECT_EQ(1, TestTiling(3, 1, 6, true).tileSizeY(2));
+ EXPECT_EQ(2, TestTiling(3, 1, 6, true).tileSizeY(3));
+ EXPECT_EQ(0, TestTiling(3, 1, 6, true).tilePositionY(0));
+ EXPECT_EQ(2, TestTiling(3, 1, 6, true).tilePositionY(1));
+ EXPECT_EQ(3, TestTiling(3, 1, 6, true).tilePositionY(2));
+ EXPECT_EQ(4, TestTiling(3, 1, 6, true).tilePositionY(3));
+ EXPECT_EQ(2, TestTiling(3, 100, 6, true).tileSizeY(0));
+ EXPECT_EQ(1, TestTiling(3, 100, 6, true).tileSizeY(1));
+ EXPECT_EQ(1, TestTiling(3, 100, 6, true).tileSizeY(2));
+ EXPECT_EQ(2, TestTiling(3, 100, 6, true).tileSizeY(3));
+ EXPECT_EQ(0, TestTiling(3, 100, 6, true).tilePositionY(0));
+ EXPECT_EQ(2, TestTiling(3, 100, 6, true).tilePositionY(1));
+ EXPECT_EQ(3, TestTiling(3, 100, 6, true).tilePositionY(2));
+ EXPECT_EQ(4, TestTiling(3, 100, 6, true).tilePositionY(3));
}
TEST(TilingDataTest, setTotalSize)
{
- TilingData data(5, 5, 5, false);
+ TestTiling data(5, 5, 5, false);
EXPECT_EQ(5, data.totalSizeX());
EXPECT_EQ(5, data.totalSizeY());
EXPECT_EQ(1, data.numTilesX());
@@ -446,7 +468,7 @@ TEST(TilingDataTest, setTotalSize)
TEST(TilingDataTest, setMaxTextureSizeNoBorders)
{
- TilingData data(8, 16, 32, false);
+ TestTiling data(8, 16, 32, false);
EXPECT_EQ(2, data.numTilesX());
EXPECT_EQ(4, data.numTilesY());
@@ -468,7 +490,7 @@ TEST(TilingDataTest, setMaxTextureSizeNoBorders)
TEST(TilingDataTest, setMaxTextureSizeBorders)
{
- TilingData data(8, 16, 32, true);
+ TestTiling data(8, 16, 32, true);
EXPECT_EQ(3, data.numTilesX());
EXPECT_EQ(5, data.numTilesY());
@@ -491,8 +513,8 @@ TEST(TilingDataTest, setMaxTextureSizeBorders)
TEST(TilingDataTest, assignment)
{
{
- TilingData source(8, 16, 32, true);
- TilingData dest = source;
+ TestTiling source(8, 16, 32, true);
+ TestTiling dest = source;
EXPECT_EQ(source.borderTexels(), dest.borderTexels());
EXPECT_EQ(source.maxTextureSize(), dest.maxTextureSize());
EXPECT_EQ(source.numTilesX(), dest.numTilesX());
@@ -501,8 +523,8 @@ TEST(TilingDataTest, assignment)
EXPECT_EQ(source.totalSizeY(), dest.totalSizeY());
}
{
- TilingData source(3, 6, 100, false);
- TilingData dest(source);
+ TestTiling source(3, 6, 100, false);
+ TestTiling dest(source);
EXPECT_EQ(source.borderTexels(), dest.borderTexels());
EXPECT_EQ(source.maxTextureSize(), dest.maxTextureSize());
EXPECT_EQ(source.numTilesX(), dest.numTilesX());
@@ -514,7 +536,7 @@ TEST(TilingDataTest, assignment)
TEST(TilingDataTest, setBorderTexels)
{
- TilingData data(8, 16, 32, false);
+ TestTiling data(8, 16, 32, false);
EXPECT_EQ(2, data.numTilesX());
EXPECT_EQ(4, data.numTilesY());
diff --git a/Source/WebKit/chromium/tests/TransparencyWinTest.cpp b/Source/WebKit/chromium/tests/TransparencyWinTest.cpp
index 5052bb166..ae3090d8c 100644
--- a/Source/WebKit/chromium/tests/TransparencyWinTest.cpp
+++ b/Source/WebKit/chromium/tests/TransparencyWinTest.cpp
@@ -395,6 +395,66 @@ TEST(TransparencyWin, TranslateOpaqueCompositeLayer)
EXPECT_EQ(green, getPixelAt(src->context(), 15, 7));
}
+static void testClippedLayerKeepTransform(TransparencyWin::LayerMode layerMode)
+{
+ // Fill with white.
+ OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), 1, ColorSpaceDeviceRGB));
+ Color white(0xFFFFFFFF);
+ FloatRect fullRect(0, 0, 16, 16);
+ src->context()->fillRect(fullRect, white, ColorSpaceDeviceRGB);
+
+ IntRect clipRect(IntPoint(11, 5), IntSize(1, 1));
+ src->context()->clip(clipRect);
+
+ // Scroll down by 6 (coordinate system goes up).
+ src->context()->save();
+ src->context()->translate(0, -6);
+
+ Color red(0xFFFF0000);
+ Color green(0xFF00FF00);
+ {
+ // The transparency layer after translation will be @ (0, -6) with
+ // a size that would be too large to handle unclipped.
+ TransparencyWin helper;
+ helper.init(src->context(),
+ layerMode,
+ TransparencyWin::KeepTransform,
+ IntRect(0, 0, INT_MAX, INT_MAX));
+
+ // Draw a green pixel at (11, 11). This should be within the clip rect
+ // and at (11, 5) after the transform.
+ FloatRect greenRect(11, 11, 1, 1);
+ helper.context()->fillRect(greenRect, green, ColorSpaceDeviceRGB);
+
+ // Draw a red pixel at (9, 9). This should be outside the clip rect
+ // and not drawn.
+ FloatRect redRect(9, 9, 1, 1);
+ helper.context()->fillRect(redRect, red, ColorSpaceDeviceRGB);
+ helper.composite();
+ }
+
+ src->context()->restore();
+
+ // Verify green pixel got drawn in clip rect and red pixel got clipped.
+ EXPECT_EQ(green, getPixelAt(src->context(), 11, 5));
+ EXPECT_EQ(white, getPixelAt(src->context(), 9, 3));
+}
+
+TEST(TransparencyWin, ClippedKeepTransformNoLayer)
+{
+ testClippedLayerKeepTransform(TransparencyWin::NoLayer);
+}
+
+TEST(TransparencyWin, ClippedKeepTransformOpaqueCompositeLayer)
+{
+ testClippedLayerKeepTransform(TransparencyWin::OpaqueCompositeLayer);
+}
+
+TEST(TransparencyWin, ClippedKeepTransformWhiteLayer)
+{
+ testClippedLayerKeepTransform(TransparencyWin::WhiteLayer);
+}
+
// Same as OpaqueCompositeLayer, but the canvas has a rotation applied. This
// tests that the propert transform is applied to the copied layer.
TEST(TransparencyWin, RotateOpaqueCompositeLayer)
diff --git a/Source/WebKit/chromium/tests/TreeSynchronizerTest.cpp b/Source/WebKit/chromium/tests/TreeSynchronizerTest.cpp
index eb3850dab..098dd2731 100644
--- a/Source/WebKit/chromium/tests/TreeSynchronizerTest.cpp
+++ b/Source/WebKit/chromium/tests/TreeSynchronizerTest.cpp
@@ -28,6 +28,7 @@
#include "CCAnimationTestCommon.h"
#include "LayerChromium.h"
+#include "Region.h"
#include "cc/CCLayerAnimationController.h"
#include "cc/CCLayerImpl.h"
#include "cc/CCProxy.h"
@@ -72,12 +73,12 @@ public:
virtual ~MockLayerChromium() { }
- virtual PassOwnPtr<CCLayerImpl> createCCLayerImpl()
+ virtual PassOwnPtr<CCLayerImpl> createCCLayerImpl() OVERRIDE
{
return MockCCLayerImpl::create(m_layerId);
}
- virtual void pushPropertiesTo(CCLayerImpl* ccLayer)
+ virtual void pushPropertiesTo(CCLayerImpl* ccLayer) OVERRIDE
{
LayerChromium::pushPropertiesTo(ccLayer);
@@ -96,22 +97,23 @@ private:
class FakeLayerAnimationController : public CCLayerAnimationController {
public:
- static PassOwnPtr<FakeLayerAnimationController> create()
+ static PassOwnPtr<FakeLayerAnimationController> create(CCLayerAnimationControllerClient* client)
{
- return adoptPtr(new FakeLayerAnimationController);
+ return adoptPtr(new FakeLayerAnimationController(client));
}
bool synchronizedAnimations() const { return m_synchronizedAnimations; }
private:
- FakeLayerAnimationController()
- : m_synchronizedAnimations(false)
+ explicit FakeLayerAnimationController(CCLayerAnimationControllerClient* client)
+ : CCLayerAnimationController(client)
+ , m_synchronizedAnimations(false)
{
}
- virtual void synchronizeAnimations(CCLayerAnimationControllerImpl* controllerImpl)
+ virtual void pushAnimationUpdatesTo(CCLayerAnimationController* controllerImpl)
{
- CCLayerAnimationController::synchronizeAnimations(controllerImpl);
+ CCLayerAnimationController::pushAnimationUpdatesTo(controllerImpl);
m_synchronizedAnimations = true;
}
@@ -125,6 +127,8 @@ void expectTreesAreIdentical(LayerChromium* layer, CCLayerImpl* ccLayer)
EXPECT_EQ(layer->id(), ccLayer->id());
+ EXPECT_EQ(layer->nonFastScrollableRegion(), ccLayer->nonFastScrollableRegion());
+
ASSERT_EQ(!!layer->maskLayer(), !!ccLayer->maskLayer());
if (layer->maskLayer())
expectTreesAreIdentical(layer->maskLayer(), ccLayer->maskLayer());
@@ -142,6 +146,17 @@ void expectTreesAreIdentical(LayerChromium* layer, CCLayerImpl* ccLayer)
expectTreesAreIdentical(layerChildren[i].get(), ccLayerChildren[i].get());
}
+// Attempts to synchronizes a null tree. This should not crash, and should
+// return a null tree.
+TEST(TreeSynchronizerTest, syncNullTree)
+{
+ DebugScopedSetImplThread impl;
+
+ OwnPtr<CCLayerImpl> ccLayerTreeRoot = TreeSynchronizer::synchronizeTrees(0, nullptr);
+
+ EXPECT_TRUE(!ccLayerTreeRoot.get());
+}
+
// Constructs a very simple tree and synchronizes it without trying to reuse any preexisting layers.
TEST(TreeSynchronizerTest, syncSimpleTreeFromEmpty)
{
@@ -182,6 +197,34 @@ TEST(TreeSynchronizerTest, syncSimpleTreeReusingLayers)
EXPECT_EQ(secondCCLayerId, ccLayerDestructionList[0]);
}
+// Constructs a very simple tree and checks that a stacking-order change is tracked properly.
+TEST(TreeSynchronizerTest, syncSimpleTreeAndTrackStackingOrderChange)
+{
+ DebugScopedSetImplThread impl;
+ Vector<int> ccLayerDestructionList;
+
+ // Set up the tree and sync once. child2 needs to be synced here, too, even though we
+ // remove it to set up the intended scenario.
+ RefPtr<LayerChromium> layerTreeRoot = MockLayerChromium::create(&ccLayerDestructionList);
+ RefPtr<LayerChromium> child2 = MockLayerChromium::create(&ccLayerDestructionList);
+ layerTreeRoot->addChild(MockLayerChromium::create(&ccLayerDestructionList));
+ layerTreeRoot->addChild(child2);
+ OwnPtr<CCLayerImpl> ccLayerTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), nullptr);
+ expectTreesAreIdentical(layerTreeRoot.get(), ccLayerTreeRoot.get());
+ ccLayerTreeRoot->resetAllChangeTrackingForSubtree();
+
+ // re-insert the layer and sync again.
+ child2->removeFromParent();
+ layerTreeRoot->addChild(child2);
+ ccLayerTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), ccLayerTreeRoot.release());
+ expectTreesAreIdentical(layerTreeRoot.get(), ccLayerTreeRoot.get());
+
+ // Check that the impl thread properly tracked the change.
+ EXPECT_FALSE(ccLayerTreeRoot->layerPropertyChanged());
+ EXPECT_FALSE(ccLayerTreeRoot->children()[0]->layerPropertyChanged());
+ EXPECT_TRUE(ccLayerTreeRoot->children()[1]->layerPropertyChanged());
+}
+
TEST(TreeSynchronizerTest, syncSimpleTreeAndProperties)
{
DebugScopedSetImplThread impl;
@@ -190,10 +233,10 @@ TEST(TreeSynchronizerTest, syncSimpleTreeAndProperties)
layerTreeRoot->addChild(LayerChromium::create());
// Pick some random properties to set. The values are not important, we're just testing that at least some properties are making it through.
- FloatPoint rootPosition = FloatPoint(2.3, 7.4);
+ FloatPoint rootPosition = FloatPoint(2.3f, 7.4f);
layerTreeRoot->setPosition(rootPosition);
- float firstChildOpacity = 0.25;
+ float firstChildOpacity = 0.25f;
layerTreeRoot->children()[0]->setOpacity(firstChildOpacity);
IntSize secondChildBounds = IntSize(25, 53);
@@ -339,7 +382,8 @@ TEST(TreeSynchronizerTest, synchronizeAnimations)
DebugScopedSetImplThread impl;
RefPtr<LayerChromium> layerTreeRoot = LayerChromium::create();
- layerTreeRoot->setLayerAnimationController(FakeLayerAnimationController::create());
+ FakeLayerAnimationControllerClient dummy;
+ layerTreeRoot->setLayerAnimationController(FakeLayerAnimationController::create(&dummy));
EXPECT_FALSE(static_cast<FakeLayerAnimationController*>(layerTreeRoot->layerAnimationController())->synchronizedAnimations());
diff --git a/Source/WebKit/chromium/tests/WebCompositorInputHandlerImplTest.cpp b/Source/WebKit/chromium/tests/WebCompositorInputHandlerImplTest.cpp
index 459255e02..92f006184 100644
--- a/Source/WebKit/chromium/tests/WebCompositorInputHandlerImplTest.cpp
+++ b/Source/WebKit/chromium/tests/WebCompositorInputHandlerImplTest.cpp
@@ -30,115 +30,71 @@
#include "WebCompositor.h"
#include "WebCompositorInputHandlerClient.h"
#include "WebInputEvent.h"
+#include "cc/CCActiveGestureAnimation.h"
#include "cc/CCInputHandler.h"
#include "cc/CCSingleThreadProxy.h"
+#include "platform/WebFloatPoint.h"
+#include "platform/WebPoint.h"
+#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <wtf/OwnPtr.h>
-using WebKit::WebCompositorInputHandler;
-using WebKit::WebCompositorInputHandlerImpl;
+using namespace WebKit;
namespace {
-class MockInputHandlerClient : public WebCore::CCInputHandlerClient {
- WTF_MAKE_NONCOPYABLE(MockInputHandlerClient);
+class MockCCInputHandlerClient : public WebCore::CCInputHandlerClient {
+ WTF_MAKE_NONCOPYABLE(MockCCInputHandlerClient);
public:
- MockInputHandlerClient()
- : m_scrollStatus(ScrollStarted)
- , m_pinchStarted(false)
- , m_pinchEnded(false)
- , m_pinchMagnification(0)
+ MockCCInputHandlerClient()
{
}
- virtual ~MockInputHandlerClient() { }
+ virtual ~MockCCInputHandlerClient() { }
- void setScrollStatus(ScrollStatus status) { m_scrollStatus = status; }
- bool pinchStarted() const { return m_pinchStarted; }
- bool pinchEnded() const { return m_pinchEnded; }
- float pinchMaginifcation() const { return m_pinchMagnification; }
+ MOCK_METHOD0(pinchGestureBegin, void());
+ MOCK_METHOD2(pinchGestureUpdate, void(float magnifyDelta, const WebCore::IntPoint& anchor));
+ MOCK_METHOD0(pinchGestureEnd, void());
- void resetPinch()
- {
- m_pinchStarted = m_pinchEnded = false;
- m_pinchMagnification = 0;
- }
+ MOCK_METHOD0(scheduleAnimation, void());
-private:
- virtual void setNeedsRedraw() OVERRIDE { }
- virtual ScrollStatus scrollBegin(const WebCore::IntPoint&, WebCore::CCInputHandlerClient::ScrollInputType) OVERRIDE
- {
- return m_scrollStatus;
- }
- virtual void scrollBy(const WebCore::IntSize&) OVERRIDE { }
- virtual void scrollEnd() OVERRIDE { }
+ MOCK_METHOD2(scrollBegin, ScrollStatus(const WebCore::IntPoint&, WebCore::CCInputHandlerClient::ScrollInputType));
+ MOCK_METHOD1(scrollBy, void(const WebCore::IntSize&));
+ MOCK_METHOD0(scrollEnd, void());
- virtual void pinchGestureBegin() OVERRIDE
- {
- m_pinchStarted = true;
- }
- virtual void pinchGestureUpdate(float magnifyDelta, const WebCore::IntPoint& anchor) OVERRIDE
- {
- m_pinchMagnification = magnifyDelta;
- }
- virtual void pinchGestureEnd() OVERRIDE
- {
- m_pinchEnded = true;
- }
+private:
virtual void startPageScaleAnimation(const WebCore::IntSize& targetPosition,
bool anchorPoint,
float pageScale,
double startTimeMs,
double durationMs) OVERRIDE { }
- ScrollStatus m_scrollStatus;
- bool m_pinchStarted;
- bool m_pinchEnded;
- float m_pinchMagnification;
+ virtual WebCore::CCActiveGestureAnimation* activeGestureAnimation() OVERRIDE { return 0; }
+ virtual void setActiveGestureAnimation(PassOwnPtr<WebCore::CCActiveGestureAnimation>) OVERRIDE { }
};
-class MockWebCompositorInputHandlerClient : public WebKit::WebCompositorInputHandlerClient {
+class MockWebCompositorInputHandlerClient : public WebCompositorInputHandlerClient {
WTF_MAKE_NONCOPYABLE(MockWebCompositorInputHandlerClient);
public:
MockWebCompositorInputHandlerClient()
- : m_handled(false)
- , m_sendToWidget(false)
+ : WebCompositorInputHandlerClient()
{
}
virtual ~MockWebCompositorInputHandlerClient() { }
- void reset()
- {
- m_handled = false;
- m_sendToWidget = false;
- }
-
- bool handled() const { return m_handled; }
- bool sendToWidget() const { return m_sendToWidget; }
+ MOCK_METHOD0(willShutdown, void());
+ MOCK_METHOD0(didHandleInputEvent, void());
+ MOCK_METHOD1(didNotHandleInputEvent, void(bool sendToWidget));
-private:
- virtual void willShutdown() OVERRIDE { }
- virtual void didHandleInputEvent() OVERRIDE
- {
- m_handled = true;
- }
- virtual void didNotHandleInputEvent(bool sendToWidget) OVERRIDE
- {
- m_sendToWidget = sendToWidget;
- }
+ MOCK_METHOD1(transferActiveWheelFlingAnimation, void(const WebActiveWheelFlingParameters&));
- bool m_handled;
- bool m_sendToWidget;
};
TEST(WebCompositorInputHandlerImpl, fromIdentifier)
{
- WebKit::WebCompositor::initialize(0);
-#ifndef NDEBUG
- // WebCompositorInputHandler APIs can only be called from the compositor thread.
+ WebCompositor::initialize(0);
WebCore::DebugScopedSetImplThread alwaysImplThread;
-#endif
// Before creating any WebCompositorInputHandlers, lookups for any value should fail and not crash.
EXPECT_EQ(0, WebCompositorInputHandler::fromIdentifier(2));
@@ -158,126 +114,452 @@ TEST(WebCompositorInputHandlerImpl, fromIdentifier)
// After the compositor is destroyed, its entry should be removed from the map.
EXPECT_EQ(0, WebCompositorInputHandler::fromIdentifier(compositorIdentifier));
-
- WebKit::WebCompositor::shutdown();
+ WebCompositor::shutdown();
}
-TEST(WebCompositorInputHandlerImpl, gestureScroll)
+class WebCompositorInputHandlerImplTest : public testing::Test {
+public:
+ WebCompositorInputHandlerImplTest()
+ : m_expectedDisposition(DidHandle)
+ {
+ WebCompositor::initialize(0);
+ m_inputHandler = WebCompositorInputHandlerImpl::create(&m_mockCCInputHandlerClient);
+ m_inputHandler->setClient(&m_mockClient);
+ }
+
+ ~WebCompositorInputHandlerImplTest()
+ {
+ m_inputHandler->setClient(0);
+ m_inputHandler.clear();
+ WebCompositor::shutdown();
+ }
+
+ // This is defined as a macro because when an expectation is not satisfied the only output you get
+ // out of gmock is the line number that set the expectation.
+#define VERIFY_AND_RESET_MOCKS() do \
+ { \
+ testing::Mock::VerifyAndClearExpectations(&m_mockCCInputHandlerClient); \
+ testing::Mock::VerifyAndClearExpectations(&m_mockClient); \
+ switch (m_expectedDisposition) { \
+ case DidHandle: \
+ /* If we expect to handle events, we shouldn't get any didNotHandleInputEvent() calls with any parameter. */ \
+ EXPECT_CALL(m_mockClient, didNotHandleInputEvent(::testing::_)).Times(0); \
+ EXPECT_CALL(m_mockClient, didHandleInputEvent()); \
+ break; \
+ case DidNotHandle: \
+ /* If we aren't expecting to handle events, we shouldn't call didHandleInputEvent(). */ \
+ EXPECT_CALL(m_mockClient, didHandleInputEvent()).Times(0); \
+ EXPECT_CALL(m_mockClient, didNotHandleInputEvent(false)).Times(0); \
+ EXPECT_CALL(m_mockClient, didNotHandleInputEvent(true)); \
+ break; \
+ case DropEvent: \
+ /* If we're expecting to drop, we shouldn't get any didHandle..() or didNotHandleInputEvent(true) calls. */ \
+ EXPECT_CALL(m_mockClient, didHandleInputEvent()).Times(0); \
+ EXPECT_CALL(m_mockClient, didNotHandleInputEvent(true)).Times(0); \
+ EXPECT_CALL(m_mockClient, didNotHandleInputEvent(false)); \
+ break; \
+ } \
+ } while (0)
+
+protected:
+ MockCCInputHandlerClient m_mockCCInputHandlerClient;
+ OwnPtr<WebCompositorInputHandlerImpl> m_inputHandler;
+ MockWebCompositorInputHandlerClient m_mockClient;
+ WebGestureEvent gesture;
+
+ enum ExpectedDisposition { DidHandle, DidNotHandle, DropEvent };
+ ExpectedDisposition m_expectedDisposition;
+
+private:
+ WebCore::DebugScopedSetImplThread m_alwaysImplThread;
+};
+
+
+TEST_F(WebCompositorInputHandlerImplTest, gestureScrollStarted)
{
- WebKit::WebCompositor::initialize(0);
-#ifndef NDEBUG
- // WebCompositorInputHandler APIs can only be called from the compositor thread.
- WebCore::DebugScopedSetImplThread alwaysImplThread;
-#endif
+ // We shouldn't send any events to the widget for this gesture.
+ m_expectedDisposition = DidHandle;
+ VERIFY_AND_RESET_MOCKS();
- MockInputHandlerClient mockInputHandler;
- OwnPtr<WebCompositorInputHandlerImpl> inputHandler = WebCompositorInputHandlerImpl::create(&mockInputHandler);
- MockWebCompositorInputHandlerClient mockClient;
- inputHandler->setClient(&mockClient);
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_))
+ .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollStarted));
- WebKit::WebGestureEvent gesture;
+ gesture.type = WebInputEvent::GestureScrollBegin;
+ m_inputHandler->handleInputEvent(gesture);
- gesture.type = WebKit::WebInputEvent::GestureScrollBegin;
- inputHandler->handleInputEvent(gesture);
- EXPECT_TRUE(mockClient.handled());
- EXPECT_FALSE(mockClient.sendToWidget());
- mockClient.reset();
+ VERIFY_AND_RESET_MOCKS();
- gesture.type = WebKit::WebInputEvent::GestureScrollUpdate;
- gesture.deltaY = 40;
- inputHandler->handleInputEvent(gesture);
- EXPECT_TRUE(mockClient.handled());
- EXPECT_FALSE(mockClient.sendToWidget());
- mockClient.reset();
+ gesture.type = WebInputEvent::GestureScrollUpdate;
+ gesture.deltaY = -40; // -Y means scroll down - i.e. in the +Y direction.
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBy(testing::Property(&WebCore::IntSize::height, testing::Gt(0))));
+ m_inputHandler->handleInputEvent(gesture);
- gesture.type = WebKit::WebInputEvent::GestureScrollEnd;
+ VERIFY_AND_RESET_MOCKS();
+
+ gesture.type = WebInputEvent::GestureScrollEnd;
gesture.deltaY = 0;
- inputHandler->handleInputEvent(gesture);
- EXPECT_TRUE(mockClient.handled());
- EXPECT_FALSE(mockClient.sendToWidget());
- mockClient.reset();
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollEnd());
+ m_inputHandler->handleInputEvent(gesture);
+}
- mockInputHandler.setScrollStatus(WebCore::CCInputHandlerClient::ScrollFailed);
+TEST_F(WebCompositorInputHandlerImplTest, gestureScrollFailed)
+{
+ // We should send all events to the widget for this gesture.
+ m_expectedDisposition = DidNotHandle;
+ VERIFY_AND_RESET_MOCKS();
- gesture.type = WebKit::WebInputEvent::GestureScrollBegin;
- inputHandler->handleInputEvent(gesture);
- EXPECT_FALSE(mockClient.handled());
- EXPECT_TRUE(mockClient.sendToWidget());
- mockClient.reset();
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(::testing::_, ::testing::_))
+ .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollFailed));
- gesture.type = WebKit::WebInputEvent::GestureScrollUpdate;
- gesture.deltaY = 40;
- inputHandler->handleInputEvent(gesture);
- EXPECT_FALSE(mockClient.handled());
- EXPECT_TRUE(mockClient.sendToWidget());
- mockClient.reset();
+ gesture.type = WebInputEvent::GestureScrollBegin;
+ m_inputHandler->handleInputEvent(gesture);
- gesture.type = WebKit::WebInputEvent::GestureScrollEnd;
- gesture.deltaY = 0;
- inputHandler->handleInputEvent(gesture);
- EXPECT_FALSE(mockClient.handled());
- EXPECT_TRUE(mockClient.sendToWidget());
- mockClient.reset();
+ VERIFY_AND_RESET_MOCKS();
+
+ gesture.type = WebInputEvent::GestureScrollUpdate;
+ gesture.deltaY = 40;
+ m_inputHandler->handleInputEvent(gesture);
- inputHandler->setClient(0);
+ VERIFY_AND_RESET_MOCKS();
- WebKit::WebCompositor::shutdown();
+ gesture.type = WebInputEvent::GestureScrollEnd;
+ gesture.deltaY = 0;
+ m_inputHandler->handleInputEvent(gesture);
}
-TEST(WebCompositorInputHandlerImpl, gesturePinch)
+TEST_F(WebCompositorInputHandlerImplTest, gestureScrollIgnored)
{
- WebKit::WebCompositor::initialize(0);
-#ifndef NDEBUG
- // WebCompositorInputHandler APIs can only be called from the compositor thread.
- WebCore::DebugScopedSetImplThread alwaysImplThread;
-#endif
+ // We shouldn't handle the GestureScrollBegin.
+ // Instead, we should get one didNotHandleInputEvent(false) call per handleInputEvent(),
+ // indicating that we could determine that there's nothing that could scroll or otherwise
+ // react to this gesture sequence and thus we should drop the whole gesture sequence on the floor.
+ m_expectedDisposition = DropEvent;
+ VERIFY_AND_RESET_MOCKS();
+
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_))
+ .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollIgnored));
+
+ gesture.type = WebInputEvent::GestureScrollBegin;
+ m_inputHandler->handleInputEvent(gesture);
+}
- MockInputHandlerClient mockInputHandler;
- OwnPtr<WebCompositorInputHandlerImpl> inputHandler = WebCompositorInputHandlerImpl::create(&mockInputHandler);
- MockWebCompositorInputHandlerClient mockClient;
- inputHandler->setClient(&mockClient);
+TEST_F(WebCompositorInputHandlerImplTest, gesturePinch)
+{
+ // We shouldn't send any events to the widget for this gesture.
+ m_expectedDisposition = DidHandle;
+ VERIFY_AND_RESET_MOCKS();
- WebKit::WebGestureEvent gesture;
+ gesture.type = WebInputEvent::GesturePinchBegin;
+ EXPECT_CALL(m_mockCCInputHandlerClient, pinchGestureBegin());
+ m_inputHandler->handleInputEvent(gesture);
- gesture.type = WebKit::WebInputEvent::GesturePinchBegin;
- inputHandler->handleInputEvent(gesture);
- EXPECT_TRUE(mockClient.handled());
- EXPECT_FALSE(mockClient.sendToWidget());
- EXPECT_TRUE(mockInputHandler.pinchStarted());
- mockClient.reset();
- mockInputHandler.resetPinch();
+ VERIFY_AND_RESET_MOCKS();
- gesture.type = WebKit::WebInputEvent::GesturePinchUpdate;
+ gesture.type = WebInputEvent::GesturePinchUpdate;
gesture.deltaX = 1.5;
- inputHandler->handleInputEvent(gesture);
- EXPECT_TRUE(mockClient.handled());
- EXPECT_FALSE(mockClient.sendToWidget());
- EXPECT_FALSE(mockInputHandler.pinchEnded());
- EXPECT_EQ(1.5, mockInputHandler.pinchMaginifcation());
- mockClient.reset();
- mockInputHandler.resetPinch();
-
- gesture.type = WebKit::WebInputEvent::GesturePinchUpdate;
+ gesture.x = 7;
+ gesture.y = 13;
+ EXPECT_CALL(m_mockCCInputHandlerClient, pinchGestureUpdate(1.5, WebCore::IntPoint(7, 13)));
+ m_inputHandler->handleInputEvent(gesture);
+
+ VERIFY_AND_RESET_MOCKS();
+
+ gesture.type = WebInputEvent::GesturePinchUpdate;
gesture.deltaX = 0.5;
- inputHandler->handleInputEvent(gesture);
- EXPECT_TRUE(mockClient.handled());
- EXPECT_FALSE(mockClient.sendToWidget());
- EXPECT_FALSE(mockInputHandler.pinchEnded());
- EXPECT_EQ(0.5, mockInputHandler.pinchMaginifcation());
- mockClient.reset();
- mockInputHandler.resetPinch();
-
- gesture.type = WebKit::WebInputEvent::GesturePinchEnd;
- inputHandler->handleInputEvent(gesture);
- EXPECT_TRUE(mockClient.handled());
- EXPECT_FALSE(mockClient.sendToWidget());
- EXPECT_TRUE(mockInputHandler.pinchEnded());
- mockClient.reset();
- mockInputHandler.resetPinch();
-
- inputHandler->setClient(0);
-
- WebKit::WebCompositor::shutdown();
+ gesture.x = 9;
+ gesture.y = 6;
+ EXPECT_CALL(m_mockCCInputHandlerClient, pinchGestureUpdate(.5, WebCore::IntPoint(9, 6)));
+ m_inputHandler->handleInputEvent(gesture);
+
+ VERIFY_AND_RESET_MOCKS();
+
+ gesture.type = WebInputEvent::GesturePinchEnd;
+ EXPECT_CALL(m_mockCCInputHandlerClient, pinchGestureEnd());
+ m_inputHandler->handleInputEvent(gesture);
+}
+
+TEST_F(WebCompositorInputHandlerImplTest, gestureFlingStarted)
+{
+ // We shouldn't send any events to the widget for this gesture.
+ m_expectedDisposition = DidHandle;
+ VERIFY_AND_RESET_MOCKS();
+
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_))
+ .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollStarted));
+
+ gesture.type = WebInputEvent::GestureFlingStart;
+ gesture.deltaX = 10;
+ EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimation());
+ m_inputHandler->handleInputEvent(gesture);
+
+ VERIFY_AND_RESET_MOCKS();
+
+ // Verify that a GestureFlingCancel during an animation cancels it.
+ gesture.type = WebInputEvent::GestureFlingCancel;
+ m_inputHandler->handleInputEvent(gesture);
+}
+
+TEST_F(WebCompositorInputHandlerImplTest, gestureFlingFailed)
+{
+ // We should send all events to the widget for this gesture.
+ m_expectedDisposition = DidNotHandle;
+ VERIFY_AND_RESET_MOCKS();
+
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_))
+ .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollFailed));
+
+ gesture.type = WebInputEvent::GestureFlingStart;
+ m_inputHandler->handleInputEvent(gesture);
+
+ VERIFY_AND_RESET_MOCKS();
+
+ // Even if we didn't start a fling ourselves, we still need to send the cancel event to the widget.
+ gesture.type = WebInputEvent::GestureFlingCancel;
+ m_inputHandler->handleInputEvent(gesture);
+}
+
+TEST_F(WebCompositorInputHandlerImplTest, gestureFlingIgnored)
+{
+ m_expectedDisposition = DidNotHandle;
+ VERIFY_AND_RESET_MOCKS();
+
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_))
+ .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollIgnored));
+
+ gesture.type = WebInputEvent::GestureFlingStart;
+ m_inputHandler->handleInputEvent(gesture);
+
+ VERIFY_AND_RESET_MOCKS();
+
+ // Even if we didn't start a fling ourselves, we still need to send the cancel event to the widget.
+ gesture.type = WebInputEvent::GestureFlingCancel;
+ m_inputHandler->handleInputEvent(gesture);
+}
+
+TEST_F(WebCompositorInputHandlerImplTest, gestureFlingAnimates)
+{
+ // We shouldn't send any events to the widget for this gesture.
+ m_expectedDisposition = DidHandle;
+ VERIFY_AND_RESET_MOCKS();
+
+ // On the fling start, we should schedule an animation but not actually start
+ // scrolling.
+ gesture.type = WebInputEvent::GestureFlingStart;
+ WebFloatPoint flingDelta = WebFloatPoint(1000, 0);
+ WebPoint flingPoint = WebPoint(7, 13);
+ WebPoint flingGlobalPoint = WebPoint(17, 23);
+ int modifiers = 7;
+ gesture.deltaX = flingDelta.x;
+ gesture.deltaY = flingDelta.y;
+ gesture.x = flingPoint.x;
+ gesture.y = flingPoint.y;
+ gesture.globalX = flingGlobalPoint.x;
+ gesture.globalY = flingGlobalPoint.y;
+ gesture.modifiers = modifiers;
+ EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimation());
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_))
+ .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollStarted));
+ m_inputHandler->handleInputEvent(gesture);
+
+ testing::Mock::VerifyAndClearExpectations(&m_mockCCInputHandlerClient);
+ // The first animate call should let us pick up an animation start time, but we
+ // shouldn't actually move anywhere just yet. The first frame after the fling start
+ // will typically include the last scroll from the gesture that lead to the scroll
+ // (either wheel or gesture scroll), so there should be no visible hitch.
+ EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimation());
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_)).Times(0);
+ m_inputHandler->animate(10);
+
+ testing::Mock::VerifyAndClearExpectations(&m_mockCCInputHandlerClient);
+
+ // The second call should start scrolling in the -X direction.
+ EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimation());
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_))
+ .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollStarted));
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBy(testing::Property(&WebCore::IntSize::width, testing::Lt(0))));
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollEnd());
+ m_inputHandler->animate(10.1);
+
+ testing::Mock::VerifyAndClearExpectations(&m_mockCCInputHandlerClient);
+
+ // Let's say on the third call we hit a non-scrollable region. We should abort the fling and not scroll.
+ // We also should pass the current fling parameters out to the client so the rest of the fling can be
+ // transferred to the main thread.
+ EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimation());
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_))
+ .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollFailed));
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBy(testing::_)).Times(0);
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollEnd()).Times(0);
+
+ // Expected wheel fling animation parameters:
+ // *) flingDelta and flingPoint should match the original GestureFlingStart event
+ // *) startTime should be 10 to match the time parameter of the first animate() call after the GestureFlingStart
+ // *) cumulativeScroll depends on the curve, but since we've animated in the -X direction the X value should be < 0
+ EXPECT_CALL(m_mockClient, transferActiveWheelFlingAnimation(testing::AllOf(
+ testing::Field(&WebActiveWheelFlingParameters::delta, testing::Eq(flingDelta)),
+ testing::Field(&WebActiveWheelFlingParameters::point, testing::Eq(flingPoint)),
+ testing::Field(&WebActiveWheelFlingParameters::globalPoint, testing::Eq(flingGlobalPoint)),
+ testing::Field(&WebActiveWheelFlingParameters::modifiers, testing::Eq(modifiers)),
+ testing::Field(&WebActiveWheelFlingParameters::startTime, testing::Eq(10)),
+ testing::Field(&WebActiveWheelFlingParameters::cumulativeScroll,
+ testing::Field(&WebSize::width, testing::Gt(0))))));
+ m_inputHandler->animate(10.2);
+
+ testing::Mock::VerifyAndClearExpectations(&m_mockCCInputHandlerClient);
+ testing::Mock::VerifyAndClearExpectations(&m_mockClient);
+
+ // Since we've aborted the fling, the next animation should be a no-op and should not result in another
+ // frame being requested.
+ EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimation()).Times(0);
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_)).Times(0);
+ m_inputHandler->animate(10.3);
+
+ // Since we've transferred the fling to the main thread, we need to pass the next GestureFlingCancel to the main
+ // thread as well.
+ EXPECT_CALL(m_mockClient, didNotHandleInputEvent(true));
+ gesture.type = WebInputEvent::GestureFlingCancel;
+ m_inputHandler->handleInputEvent(gesture);
+}
+
+TEST_F(WebCompositorInputHandlerImplTest, gestureFlingTransferResets)
+{
+ // We shouldn't send any events to the widget for this gesture.
+ m_expectedDisposition = DidHandle;
+ VERIFY_AND_RESET_MOCKS();
+
+ // Start a gesture fling in the -X direction with zero Y movement.
+ gesture.type = WebInputEvent::GestureFlingStart;
+ WebFloatPoint flingDelta = WebFloatPoint(1000, 0);
+ WebPoint flingPoint = WebPoint(7, 13);
+ WebPoint flingGlobalPoint = WebPoint(17, 23);
+ int modifiers = 1;
+ gesture.deltaX = flingDelta.x;
+ gesture.deltaY = flingDelta.y;
+ gesture.x = flingPoint.x;
+ gesture.y = flingPoint.y;
+ gesture.globalX = flingGlobalPoint.x;
+ gesture.globalY = flingGlobalPoint.y;
+ gesture.modifiers = modifiers;
+ EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimation());
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_))
+ .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollStarted));
+ m_inputHandler->handleInputEvent(gesture);
+
+ testing::Mock::VerifyAndClearExpectations(&m_mockCCInputHandlerClient);
+
+ // Start the fling animation at time 10. This shouldn't actually scroll, just establish a start time.
+ EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimation());
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_)).Times(0);
+ m_inputHandler->animate(10);
+
+ testing::Mock::VerifyAndClearExpectations(&m_mockCCInputHandlerClient);
+
+ // The second call should start scrolling in the -X direction.
+ EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimation());
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_))
+ .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollStarted));
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBy(testing::Property(&WebCore::IntSize::width, testing::Lt(0))));
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollEnd());
+ m_inputHandler->animate(10.1);
+
+ testing::Mock::VerifyAndClearExpectations(&m_mockCCInputHandlerClient);
+
+ // Let's say on the third call we hit a non-scrollable region. We should abort the fling and not scroll.
+ // We also should pass the current fling parameters out to the client so the rest of the fling can be
+ // transferred to the main thread.
+ EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimation());
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_))
+ .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollFailed));
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBy(testing::_)).Times(0);
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollEnd()).Times(0);
+
+ // Expected wheel fling animation parameters:
+ // *) flingDelta and flingPoint should match the original GestureFlingStart event
+ // *) startTime should be 10 to match the time parameter of the first animate() call after the GestureFlingStart
+ // *) cumulativeScroll depends on the curve, but since we've animated in the -X direction the X value should be < 0
+ EXPECT_CALL(m_mockClient, transferActiveWheelFlingAnimation(testing::AllOf(
+ testing::Field(&WebActiveWheelFlingParameters::delta, testing::Eq(flingDelta)),
+ testing::Field(&WebActiveWheelFlingParameters::point, testing::Eq(flingPoint)),
+ testing::Field(&WebActiveWheelFlingParameters::globalPoint, testing::Eq(flingGlobalPoint)),
+ testing::Field(&WebActiveWheelFlingParameters::modifiers, testing::Eq(modifiers)),
+ testing::Field(&WebActiveWheelFlingParameters::startTime, testing::Eq(10)),
+ testing::Field(&WebActiveWheelFlingParameters::cumulativeScroll,
+ testing::Field(&WebSize::width, testing::Gt(0))))));
+ m_inputHandler->animate(10.2);
+
+ testing::Mock::VerifyAndClearExpectations(&m_mockCCInputHandlerClient);
+ testing::Mock::VerifyAndClearExpectations(&m_mockClient);
+
+ // Since we've aborted the fling, the next animation should be a no-op and should not result in another
+ // frame being requested.
+ EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimation()).Times(0);
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_)).Times(0);
+ m_inputHandler->animate(10.3);
+
+ testing::Mock::VerifyAndClearExpectations(&m_mockCCInputHandlerClient);
+
+ // Since we've transferred the fling to the main thread, we need to pass the next GestureFlingCancel to the main
+ // thread as well.
+ EXPECT_CALL(m_mockClient, didNotHandleInputEvent(true));
+ gesture.type = WebInputEvent::GestureFlingCancel;
+ m_inputHandler->handleInputEvent(gesture);
+
+ VERIFY_AND_RESET_MOCKS();
+
+ // Start a second gesture fling, this time in the +Y direction with no X.
+ gesture.type = WebInputEvent::GestureFlingStart;
+ flingDelta = WebFloatPoint(0, -1000);
+ flingPoint = WebPoint(95, 87);
+ flingGlobalPoint = WebPoint(32, 71);
+ modifiers = 2;
+ gesture.deltaX = flingDelta.x;
+ gesture.deltaY = flingDelta.y;
+ gesture.x = flingPoint.x;
+ gesture.y = flingPoint.y;
+ gesture.globalX = flingGlobalPoint.x;
+ gesture.globalY = flingGlobalPoint.y;
+ gesture.modifiers = modifiers;
+ EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimation());
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_))
+ .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollStarted));
+ m_inputHandler->handleInputEvent(gesture);
+
+ testing::Mock::VerifyAndClearExpectations(&m_mockCCInputHandlerClient);
+
+ // Start the second fling animation at time 30.
+ EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimation());
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_)).Times(0);
+ m_inputHandler->animate(30);
+
+ testing::Mock::VerifyAndClearExpectations(&m_mockCCInputHandlerClient);
+
+ // Tick the second fling once normally.
+ EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimation());
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_))
+ .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollStarted));
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBy(testing::Property(&WebCore::IntSize::height, testing::Gt(0))));
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollEnd());
+ m_inputHandler->animate(30.1);
+
+ testing::Mock::VerifyAndClearExpectations(&m_mockCCInputHandlerClient);
+
+ // Then abort the second fling.
+ EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimation());
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, testing::_))
+ .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollFailed));
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollBy(testing::_)).Times(0);
+ EXPECT_CALL(m_mockCCInputHandlerClient, scrollEnd()).Times(0);
+
+ // We should get parameters from the second fling, nothing from the first fling should "leak".
+ EXPECT_CALL(m_mockClient, transferActiveWheelFlingAnimation(testing::AllOf(
+ testing::Field(&WebActiveWheelFlingParameters::delta, testing::Eq(flingDelta)),
+ testing::Field(&WebActiveWheelFlingParameters::point, testing::Eq(flingPoint)),
+ testing::Field(&WebActiveWheelFlingParameters::globalPoint, testing::Eq(flingGlobalPoint)),
+ testing::Field(&WebActiveWheelFlingParameters::modifiers, testing::Eq(modifiers)),
+ testing::Field(&WebActiveWheelFlingParameters::startTime, testing::Eq(30)),
+ testing::Field(&WebActiveWheelFlingParameters::cumulativeScroll,
+ testing::Field(&WebSize::height, testing::Lt(0))))));
+ m_inputHandler->animate(30.2);
}
}
diff --git a/Source/WebKit/chromium/tests/WebFrameTest.cpp b/Source/WebKit/chromium/tests/WebFrameTest.cpp
index 481bd916f..b8bc2e3c4 100644
--- a/Source/WebKit/chromium/tests/WebFrameTest.cpp
+++ b/Source/WebKit/chromium/tests/WebFrameTest.cpp
@@ -42,6 +42,7 @@
#include "WebSearchableFormData.h"
#include "WebSecurityPolicy.h"
#include "WebSettings.h"
+#include "WebViewClient.h"
#include "WebViewImpl.h"
#include "v8.h"
#include <gtest/gtest.h>
@@ -151,8 +152,42 @@ TEST_F(WebFrameTest, ChromePageNoJavascript)
EXPECT_EQ(std::string::npos, content.find("Clobbered"));
}
+#if ENABLE(VIEWPORT)
+
+class FixedLayoutTestWebViewClient : public WebViewClient {
+ public:
+ virtual WebRect windowRect() OVERRIDE { return m_windowRect; }
+ virtual WebScreenInfo screenInfo() OVERRIDE { return m_screenInfo; }
+
+ WebRect m_windowRect;
+ WebScreenInfo m_screenInfo;
+};
+
+TEST_F(WebFrameTest, DeviceScaleFactorUsesDefaultWithoutViewportTag)
+{
+ registerMockedHttpURLLoad("no_viewport_tag.html");
+
+ int viewportWidth = 640;
+ int viewportHeight = 480;
+
+ FixedLayoutTestWebViewClient client;
+ client.m_screenInfo.horizontalDPI = 160;
+ client.m_windowRect = WebRect(0, 0, viewportWidth, viewportHeight);
+
+ WebView* webView = static_cast<WebView*>(FrameTestHelpers::createWebViewAndLoad(m_baseURL + "no_viewport_tag.html", true, 0, &client));
+
+ webView->resize(WebSize(viewportWidth, viewportHeight));
+ webView->settings()->setViewportEnabled(true);
+ webView->settings()->setDefaultDeviceScaleFactor(2);
+ webView->enableFixedLayoutMode(true);
+ webView->layout();
+
+ EXPECT_EQ(2, webView->deviceScaleFactor());
+}
+#endif
+
#if ENABLE(GESTURE_EVENTS)
-TEST_F(WebFrameTest, DivAutoZoomParamsTest)
+TEST_F(WebFrameTest, FAILS_DivAutoZoomParamsTest)
{
registerMockedHttpURLLoad("get_scale_for_auto_zoom_into_div_test.html");
@@ -238,7 +273,12 @@ public:
{
// Return a dummy error so the DocumentLoader doesn't assert when
// the reload cancels it.
- return WebURLError(WebCore::ResourceError("", 1, "", "cancelled"));
+ WebURLError webURLError;
+ webURLError.domain = "";
+ webURLError.reason = 1;
+ webURLError.isCancellation = true;
+ webURLError.unreachableURL = WebURL();
+ return webURLError;
}
};
diff --git a/Source/WebKit/chromium/tests/WebLayerTest.cpp b/Source/WebKit/chromium/tests/WebLayerTest.cpp
index 1eed81aea..7c0831f90 100644
--- a/Source/WebKit/chromium/tests/WebLayerTest.cpp
+++ b/Source/WebKit/chromium/tests/WebLayerTest.cpp
@@ -136,7 +136,7 @@ TEST_F(WebLayerTest, Client)
EXPECT_EQ(otherLayer, layer.maskLayer());
EXPECT_CALL(m_client, scheduleComposite()).Times(AtLeast(1));
- float opacity = 0.123;
+ float opacity = 0.123f;
layer.setOpacity(opacity);
Mock::VerifyAndClearExpectations(&m_client);
EXPECT_EQ(opacity, layer.opacity());
@@ -160,18 +160,15 @@ TEST_F(WebLayerTest, Client)
EXPECT_CALL(m_client, scheduleComposite()).Times(AtLeast(1));
textureLayer.setTextureId(3);
Mock::VerifyAndClearExpectations(&m_client);
- EXPECT_EQ(3u, textureLayer.textureId());
EXPECT_CALL(m_client, scheduleComposite()).Times(AtLeast(1));
textureLayer.setFlipped(true);
Mock::VerifyAndClearExpectations(&m_client);
- EXPECT_TRUE(textureLayer.flipped());
EXPECT_CALL(m_client, scheduleComposite()).Times(AtLeast(1));
- WebFloatRect uvRect(0.1, 0.1, 0.9, 0.9);
+ WebFloatRect uvRect(0.1f, 0.1f, 0.9f, 0.9f);
textureLayer.setUVRect(uvRect);
Mock::VerifyAndClearExpectations(&m_client);
- EXPECT_TRUE(textureLayer.flipped());
// Content layer.
diff --git a/Source/WebKit/chromium/tests/WebMediaPlayerClientImplTest.cpp b/Source/WebKit/chromium/tests/WebMediaPlayerClientImplTest.cpp
new file mode 100644
index 000000000..56a1a6e22
--- /dev/null
+++ b/Source/WebKit/chromium/tests/WebMediaPlayerClientImplTest.cpp
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2012 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "WebMediaPlayerClientImpl.h"
+
+#include <gtest/gtest.h>
+#include <wtf/PassOwnPtr.h>
+
+using namespace WebKit;
+
+namespace {
+
+class FakeWebMediaPlayerClientImpl : public WebMediaPlayerClientImpl {
+public:
+ static PassOwnPtr<FakeWebMediaPlayerClientImpl> create() { return adoptPtr(new FakeWebMediaPlayerClientImpl()); }
+
+private:
+ FakeWebMediaPlayerClientImpl() { }
+};
+
+class FakeVideoFrameProviderClient : public WebVideoFrameProvider::Client {
+public:
+ static PassOwnPtr<FakeVideoFrameProviderClient> create(WebVideoFrameProvider* provider)
+ {
+ return adoptPtr(new FakeVideoFrameProviderClient(provider));
+ }
+
+ virtual ~FakeVideoFrameProviderClient()
+ {
+ if (m_provider)
+ m_provider->setVideoFrameProviderClient(0);
+ }
+
+ // WebKit::WebVideoFrameProvider::Client implementation.
+ virtual void didReceiveFrame() { }
+ virtual void didUpdateMatrix(const float*) { }
+ virtual void stopUsingProvider()
+ {
+ m_provider = 0;
+ }
+
+ WebVideoFrameProvider* provider() const { return m_provider; }
+
+private:
+ FakeVideoFrameProviderClient(WebVideoFrameProvider* provider)
+ : m_provider(provider)
+ {
+ m_provider->setVideoFrameProviderClient(this);
+ }
+
+ WebVideoFrameProvider* m_provider;
+};
+
+TEST(WebMediaPlayerClientImplTest, InitialNullVideoClient)
+{
+ // No explict checks in this test; just make sure it doesn't crash.
+ OwnPtr<WebMediaPlayerClientImpl> provider(FakeWebMediaPlayerClientImpl::create());
+ provider->setVideoFrameProviderClient(0);
+}
+
+TEST(WebMediaPlayerClientImplTest, SetAndUnsetVideoClient)
+{
+ OwnPtr<WebMediaPlayerClientImpl> provider(FakeWebMediaPlayerClientImpl::create());
+ OwnPtr<FakeVideoFrameProviderClient> client(FakeVideoFrameProviderClient::create(provider.get()));
+
+ EXPECT_EQ(client->provider(), provider.get());
+
+ provider->setVideoFrameProviderClient(0);
+ ASSERT_FALSE(client->provider());
+}
+
+TEST(WebMediaPlayerClientImplTest, DestroyProvider)
+{
+ OwnPtr<WebMediaPlayerClientImpl> provider(FakeWebMediaPlayerClientImpl::create());
+ OwnPtr<FakeVideoFrameProviderClient> client(FakeVideoFrameProviderClient::create(provider.get()));
+
+ EXPECT_EQ(client->provider(), provider);
+ provider.clear();
+ ASSERT_FALSE(client->provider());
+}
+
+TEST(WebMediaPlayerClientImplTest, SetMultipleVideoClients)
+{
+ OwnPtr<WebMediaPlayerClientImpl> provider(FakeWebMediaPlayerClientImpl::create());
+ OwnPtr<FakeVideoFrameProviderClient> firstClient(FakeVideoFrameProviderClient::create(provider.get()));
+ EXPECT_EQ(firstClient->provider(), provider);
+
+ OwnPtr<FakeVideoFrameProviderClient> secondClient(FakeVideoFrameProviderClient::create(provider.get()));
+ EXPECT_FALSE(firstClient->provider());
+ EXPECT_EQ(secondClient->provider(), provider);
+
+ provider.clear();
+ ASSERT_FALSE(firstClient->provider());
+ ASSERT_FALSE(secondClient->provider());
+}
+
+}
diff --git a/Source/WebKit/chromium/tests/WebSocketDeflaterTest.cpp b/Source/WebKit/chromium/tests/WebSocketDeflaterTest.cpp
index 423a5969f..1d7826a69 100644
--- a/Source/WebKit/chromium/tests/WebSocketDeflaterTest.cpp
+++ b/Source/WebKit/chromium/tests/WebSocketDeflaterTest.cpp
@@ -46,8 +46,8 @@ TEST(WebSocketDeflaterTest, TestCompressHello)
ASSERT_TRUE(deflater->addBytes(inputData, inputLength));
ASSERT_TRUE(deflater->finish());
- const char expectedFirst[] = {0xf2, 0x48, 0xcd, 0xc9, 0xc9, 0x07, 0x00};
- EXPECT_EQ(sizeof(expectedFirst), deflater->size());
+ const char* expectedFirst = "\xf2\x48\xcd\xc9\xc9\x07\x00";
+ EXPECT_EQ(7U, deflater->size());
EXPECT_EQ(0, memcmp(expectedFirst, deflater->data(), deflater->size()));
ASSERT_TRUE(inflater->addBytes(deflater->data(), deflater->size()));
ASSERT_TRUE(inflater->finish());
@@ -59,8 +59,8 @@ TEST(WebSocketDeflaterTest, TestCompressHello)
ASSERT_TRUE(deflater->addBytes(inputData, inputLength));
ASSERT_TRUE(deflater->finish());
- const char expectedSecond[] = {0xf2, 0x00, 0x11, 0x00, 0x00};
- EXPECT_EQ(sizeof(expectedSecond), deflater->size());
+ const char* expectedSecond = "\xf2\x00\x11\x00\x00";
+ EXPECT_EQ(5U, deflater->size());
EXPECT_EQ(0, memcmp(expectedSecond, deflater->data(), deflater->size()));
ASSERT_TRUE(inflater->addBytes(deflater->data(), deflater->size()));
ASSERT_TRUE(inflater->finish());
@@ -93,7 +93,7 @@ TEST(WebSocketDeflaterTest, TestNoContextTakeOver)
ASSERT_TRUE(deflater->initialize());
OwnPtr<WebSocketInflater> inflater = WebSocketInflater::create();
ASSERT_TRUE(inflater->initialize());
- const char expected[] = {0xf2, 0x48, 0xcd, 0xc9, 0xc9, 0x07, 0x00};
+ const char* expected = "\xf2\x48\xcd\xc9\xc9\x07\x00";
const char* inputData = "Hello";
const size_t inputLength = strlen(inputData);
@@ -102,7 +102,7 @@ TEST(WebSocketDeflaterTest, TestNoContextTakeOver)
for (size_t i = 0; i < 2; ++i) {
ASSERT_TRUE(deflater->addBytes(inputData, inputLength));
ASSERT_TRUE(deflater->finish());
- EXPECT_EQ(sizeof(expected), deflater->size());
+ EXPECT_EQ(7U, deflater->size());
EXPECT_EQ(0, memcmp(expected, deflater->data(), deflater->size()));
ASSERT_TRUE(inflater->addBytes(deflater->data(), deflater->size()));
ASSERT_TRUE(inflater->finish());
diff --git a/Source/WebKit/chromium/tests/WebViewTest.cpp b/Source/WebKit/chromium/tests/WebViewTest.cpp
index 6580d06eb..00d8a832d 100644
--- a/Source/WebKit/chromium/tests/WebViewTest.cpp
+++ b/Source/WebKit/chromium/tests/WebViewTest.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2011, 2012 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
@@ -42,6 +42,7 @@
#include "platform/WebSize.h"
#include "WebViewClient.h"
#include "WebViewImpl.h"
+#include <googleurl/src/gurl.h>
#include <gtest/gtest.h>
#include <webkit/support/webkit_support.h>
@@ -49,12 +50,28 @@ using namespace WebKit;
namespace {
+enum HorizontalScrollbarState {
+ NoHorizontalScrollbar,
+ VisibleHorizontalScrollbar,
+};
+
+enum VerticalScrollbarState {
+ NoVerticalScrollbar,
+ VisibleVerticalScrollbar,
+};
+
class TestData {
public:
void setWebView(WebView* webView) { m_webView = static_cast<WebViewImpl*>(webView); }
void setSize(const WebSize& newSize) { m_size = newSize; }
- bool hasHorizontalScrollbar() const { return m_webView->hasHorizontalScrollbar(); }
- bool hasVerticalScrollbar() const { return m_webView->hasVerticalScrollbar(); }
+ HorizontalScrollbarState horizontalScrollbarState() const
+ {
+ return m_webView->hasHorizontalScrollbar() ? VisibleHorizontalScrollbar: NoHorizontalScrollbar;
+ }
+ VerticalScrollbarState verticalScrollbarState() const
+ {
+ return m_webView->hasVerticalScrollbar() ? VisibleVerticalScrollbar : NoVerticalScrollbar;
+ }
int width() const { return m_size.width; }
int height() const { return m_size.height; }
@@ -88,6 +105,11 @@ public:
}
protected:
+ void testAutoResize(const WebSize& minAutoResize, const WebSize& maxAutoResize,
+ const std::string& pageWidth, const std::string& pageHeight,
+ int expectedWidth, int expectedHeight,
+ HorizontalScrollbarState expectedHorizontalState, VerticalScrollbarState expectedVerticalState);
+
std::string m_baseURL;
};
@@ -119,35 +141,108 @@ TEST_F(WebViewTest, FocusIsInactive)
webView->close();
}
-TEST_F(WebViewTest, AutoResizeMinimumSize)
+void WebViewTest::testAutoResize(const WebSize& minAutoResize, const WebSize& maxAutoResize,
+ const std::string& pageWidth, const std::string& pageHeight,
+ int expectedWidth, int expectedHeight,
+ HorizontalScrollbarState expectedHorizontalState, VerticalScrollbarState expectedVerticalState)
{
AutoResizeWebViewClient client;
- FrameTestHelpers::registerMockedURLLoad(m_baseURL, "specify_size.html");
- WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "specify_size.html", true, 0, &client);
+ std::string url = m_baseURL + "specify_size.html?" + pageWidth + ":" + pageHeight;
+ FrameTestHelpers::registerMockedURLLoad(GURL(url), "specify_size.html");
+ WebView* webView = FrameTestHelpers::createWebViewAndLoad(url, true, 0, &client);
client.testData().setWebView(webView);
- FrameTestHelpers::loadFrame(webView->mainFrame(), "javascript:document.getElementById('sizer').style.height = '56px';");
- FrameTestHelpers::loadFrame(webView->mainFrame(), "javascript:document.getElementById('sizer').style.width = '91px';");
WebFrameImpl* frame = static_cast<WebFrameImpl*>(webView->mainFrame());
WebCore::FrameView* frameView = frame->frame()->view();
+ frameView->layout();
EXPECT_FALSE(frameView->layoutPending());
EXPECT_FALSE(frameView->needsLayout());
- WebSize minSize(91, 56);
- WebSize maxSize(403, 302);
- webView->enableAutoResizeMode(true, minSize, maxSize);
+ webView->enableAutoResizeMode(minAutoResize, maxAutoResize);
EXPECT_TRUE(frameView->layoutPending());
EXPECT_TRUE(frameView->needsLayout());
frameView->layout();
EXPECT_TRUE(frame->frame()->document()->isHTMLDocument());
- EXPECT_EQ(91, client.testData().width());
- EXPECT_EQ(56, client.testData().height());
- EXPECT_FALSE(client.testData().hasHorizontalScrollbar());
- EXPECT_FALSE(client.testData().hasVerticalScrollbar());
+ EXPECT_EQ(expectedWidth, client.testData().width());
+ EXPECT_EQ(expectedHeight, client.testData().height());
+ EXPECT_EQ(expectedHorizontalState, client.testData().horizontalScrollbarState());
+ EXPECT_EQ(expectedVerticalState, client.testData().verticalScrollbarState());
webView->close();
}
+TEST_F(WebViewTest, AutoResizeMinimumSize)
+{
+ WebSize minAutoResize(91, 56);
+ WebSize maxAutoResize(403, 302);
+ std::string pageWidth = "91px";
+ std::string pageHeight = "56px";
+ int expectedWidth = 91;
+ int expectedHeight = 56;
+ testAutoResize(minAutoResize, maxAutoResize, pageWidth, pageHeight,
+ expectedWidth, expectedHeight, NoHorizontalScrollbar, NoVerticalScrollbar);
+}
+
+TEST_F(WebViewTest, AutoResizeHeightOverflowAndFixedWidth)
+{
+ WebSize minAutoResize(90, 95);
+ WebSize maxAutoResize(90, 100);
+ std::string pageWidth = "60px";
+ std::string pageHeight = "200px";
+ int expectedWidth = 90;
+ int expectedHeight = 100;
+ testAutoResize(minAutoResize, maxAutoResize, pageWidth, pageHeight,
+ expectedWidth, expectedHeight, NoHorizontalScrollbar, VisibleVerticalScrollbar);
+}
+
+TEST_F(WebViewTest, AutoResizeFixedHeightAndWidthOverflow)
+{
+ WebSize minAutoResize(90, 100);
+ WebSize maxAutoResize(200, 100);
+ std::string pageWidth = "300px";
+ std::string pageHeight = "80px";
+ int expectedWidth = 200;
+ int expectedHeight = 100;
+ testAutoResize(minAutoResize, maxAutoResize, pageWidth, pageHeight,
+ expectedWidth, expectedHeight, VisibleHorizontalScrollbar, NoVerticalScrollbar);
+}
+
+TEST_F(WebViewTest, AutoResizeInBetweenSizes)
+{
+ WebSize minAutoResize(90, 95);
+ WebSize maxAutoResize(200, 300);
+ std::string pageWidth = "100px";
+ std::string pageHeight = "200px";
+ int expectedWidth = 100;
+ int expectedHeight = 200;
+ testAutoResize(minAutoResize, maxAutoResize, pageWidth, pageHeight,
+ expectedWidth, expectedHeight, NoHorizontalScrollbar, NoVerticalScrollbar);
+}
+
+TEST_F(WebViewTest, AutoResizeOverflowSizes)
+{
+ WebSize minAutoResize(90, 95);
+ WebSize maxAutoResize(200, 300);
+ std::string pageWidth = "300px";
+ std::string pageHeight = "400px";
+ int expectedWidth = 200;
+ int expectedHeight = 300;
+ testAutoResize(minAutoResize, maxAutoResize, pageWidth, pageHeight,
+ expectedWidth, expectedHeight, VisibleHorizontalScrollbar, VisibleVerticalScrollbar);
+}
+
+TEST_F(WebViewTest, AutoResizeMaxSize)
+{
+ WebSize minAutoResize(90, 95);
+ WebSize maxAutoResize(200, 300);
+ std::string pageWidth = "200px";
+ std::string pageHeight = "300px";
+ int expectedWidth = 200;
+ int expectedHeight = 300;
+ testAutoResize(minAutoResize, maxAutoResize, pageWidth, pageHeight,
+ expectedWidth, expectedHeight, NoHorizontalScrollbar, NoVerticalScrollbar);
+}
+
}
diff --git a/Source/WebKit/chromium/tests/data/no_viewport_tag.html b/Source/WebKit/chromium/tests/data/no_viewport_tag.html
new file mode 100644
index 000000000..9ba981574
--- /dev/null
+++ b/Source/WebKit/chromium/tests/data/no_viewport_tag.html
@@ -0,0 +1,5 @@
+<html>
+ <body>
+ <p> Test </p>
+ </body>
+</html>
diff --git a/Source/WebKit/chromium/tests/data/specify_size.html b/Source/WebKit/chromium/tests/data/specify_size.html
index 7b9695fd2..2041e85db 100644
--- a/Source/WebKit/chromium/tests/data/specify_size.html
+++ b/Source/WebKit/chromium/tests/data/specify_size.html
@@ -1,6 +1,20 @@
<!doctype html>
<html>
<body style='margin:0px'>
-<img id='sizer' src='broken.jpg'/>
+<img id='sizer'/>
+<script>
+// The desired size should be specified in the url in the search portion
+// like this ?widthDimension:heightDimension.
+var unitMatch = '([0-9]+[a-zA-Z]+)';
+var searchParser = new RegExp('\\?' + unitMatch + '(?:\\:' + unitMatch + ')');
+var parsedParameters = searchParser.exec(window.location.search);
+
+// Set the sizes.
+var elementToSize = document.getElementById('sizer');
+var width = parsedParameters[1];
+elementToSize.style.width = width;
+var height = parsedParameters[2];
+elementToSize.style.height = height;
+</script>
</body>
</html>
diff --git a/Source/WebKit/efl/ChangeLog b/Source/WebKit/efl/ChangeLog
index 09d0e7796..b251653b7 100644
--- a/Source/WebKit/efl/ChangeLog
+++ b/Source/WebKit/efl/ChangeLog
@@ -1,3 +1,1050 @@
+2012-05-07 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
+
+ [EFL][DRT] Implement LayoutTestController::execCommand
+ https://bugs.webkit.org/show_bug.cgi?id=82286
+
+ Reviewed by Antonio Gomes.
+
+ Add missing implementation execCommand and isCommandEnabled to EFL's
+ DumpRenderTreeSupport to execute an internal command and check if the
+ command is enabled.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::executeCoreCommandByName):
+ (DumpRenderTreeSupportEfl::isCommandEnabled):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-05-06 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [EFL] EFL's LayoutTestController setJavaScriptCanAccessClipboard implementation
+ https://bugs.webkit.org/show_bug.cgi?id=83687
+
+ Reviewed by Antonio Gomes.
+
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (_ewk_view_priv_new):
+ (ewk_view_setting_scripts_can_access_clipboard_get):
+ (ewk_view_setting_scripts_can_access_clipboard_set):
+ * ewk/ewk_view.h:
+
+2012-05-06 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert isPageBoxVisible to use Internals interface.
+ https://bugs.webkit.org/show_bug.cgi?id=85692
+
+ Reviewed by Darin Adler.
+
+ Remove isPageBoxVisible functions, because it is able to work in the
+ cross-port way through the Internals interface.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-05-04 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] Implement layoutTestController.dumpResourceResponseMIMETypes
+ https://bugs.webkit.org/show_bug.cgi?id=84941
+
+ Reviewed by Martin Robinson.
+
+ Extend Ewk_Frame_Resource_Response structure to pass resource MIME type
+ information.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::dispatchWillSendRequest):
+ (WebCore::FrameLoaderClientEfl::dispatchDidReceiveResponse):
+ * ewk/ewk_frame.h:
+
+2012-05-04 Nate Chapin <japhet@chromium.org>
+
+ Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+ https://bugs.webkit.org/show_bug.cgi?id=85533
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::FrameLoaderClientEfl):
+ (WebCore):
+ (WebCore::FrameLoaderClientEfl::finishedLoading):
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+ (WebCore::FrameLoaderClientEfl::makeRepresentation):
+ (WebCore::FrameLoaderClientEfl::revertToProvisionalState):
+ (FrameLoaderClientEfl):
+
+2012-05-04 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] Frame load callbacks output is missing for redirections
+ https://bugs.webkit.org/show_bug.cgi?id=85173
+
+ Reviewed by Antonio Gomes.
+
+ Add a few redirection-related signals on the ewk_frame so that EFL's
+ DumpRenderTree can print the expected output when
+ LayoutTestController's dumpFrameLoadCallbacks() returns true.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::dispatchWillSendRequest):
+ (WebCore::FrameLoaderClientEfl::dispatchDidReceiveResponse):
+ (WebCore::FrameLoaderClientEfl::dispatchDidReceiveServerRedirectForProvisionalLoad):
+ (WebCore::FrameLoaderClientEfl::dispatchWillPerformClientRedirect):
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_redirect_provisional_load):
+ (ewk_frame_redirect_requested):
+ * ewk/ewk_frame.h:
+ * ewk/ewk_private.h:
+
+2012-05-04 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] LayoutTestController does not support overriding WebKitLoadSiteIconsKey
+ https://bugs.webkit.org/show_bug.cgi?id=85171
+
+ Reviewed by Andreas Kling.
+
+ Add a helper function to DumpRenderTreeSupportEfl to override the
+ "WebKitLoadSiteIconsKey" setting on the view page.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::setLoadsSiteIconsIgnoringImageLoadingSetting):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-05-03 Fady Samuel <fsamuel@chromium.org>
+
+ Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
+ https://bugs.webkit.org/show_bug.cgi?id=70609
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::dumpConfigurationForViewport):
+
+2012-04-18 Jon Honeycutt <jhoneycutt@apple.com>
+
+ FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
+ information about the form being submitted
+ https://bugs.webkit.org/show_bug.cgi?id=84297
+
+ Reviewed by Andy Estes.
+
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+ (WebCore::FrameLoaderClientEfl::dispatchWillSendSubmitEvent):
+ Updated method declaration.
+
+2012-05-02 Emil A Eklund <eae@chromium.org>
+
+ Fix usage of layout types in platform code
+ https://bugs.webkit.org/show_bug.cgi?id=85392
+
+ Reviewed by Eric Seidel.
+
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_focused_element_geometry_get):
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (ewk_view_scale_set):
+
+2012-05-02 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [EFL] Hyperlink auditing ewk_view setting
+ https://bugs.webkit.org/show_bug.cgi?id=84451
+
+ Reviewed by Antonio Gomes.
+
+ Exporting new ewk_view setting: hyperlinkAuditingEnabled - enbles/disables hyperlink auditing.
+
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (_ewk_view_priv_new):
+ (ewk_view_setting_enable_hyperlink_auditing_get):
+ (ewk_view_setting_enable_hyperlink_auditing_set):
+ * ewk/ewk_view.h:
+
+2012-05-02 Dongwoo Im <dw.im@samsung.com>
+
+ [EFL] Fix typo introduced in r115800.
+ https://bugs.webkit.org/show_bug.cgi?id=85354
+
+ Reviewed by Nikolas Zimmermann.
+
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data): Assign 1 bit to the boolean attribute, webAudio.
+
+2012-05-02 Dongwoo Im <dw.im@samsung.com>
+
+ [EFL] Implement the Web Audio API feature.
+ https://bugs.webkit.org/show_bug.cgi?id=78688
+
+ Reviewed by Philippe Normand.
+
+ Implement the Web Audio API feature on the EFL port.
+ https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
+
+ * ewk/ewk_view.cpp: Add the setter/getter of the webaudio feature.
+ (_Ewk_View_Private_Data):
+ (_ewk_view_priv_new):
+ (ewk_view_setting_web_audio_get): Enable/disable the Web Audio API feature.
+ (ewk_view_setting_web_audio_set): Query if the Web Audio API feature is enabled.
+ * ewk/ewk_view.h: Add the prototypes.
+
+2012-04-27 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] ResourceError domain needs to be properly set in FrameLoaderClient
+ https://bugs.webkit.org/show_bug.cgi?id=84129
+
+ Reviewed by Nate Chapin.
+
+ Properly set ResourceError objects' domain instead of using a generic
+ one. This allows WebKit and NSURL errors to be distinguished, which is
+ required to properly print out information in EFL's DumpRenderTree
+ when dumpResourceLoadCallbacks() returns true.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::cancelledError):
+ (WebCore::FrameLoaderClientEfl::blockedError):
+ (WebCore::FrameLoaderClientEfl::cannotShowURLError):
+ (WebCore::FrameLoaderClientEfl::interruptedForPolicyChangeError):
+ (WebCore::FrameLoaderClientEfl::cannotShowMIMETypeError):
+ (WebCore::FrameLoaderClientEfl::fileDoesNotExistError):
+ (WebCore::FrameLoaderClientEfl::pluginWillHandleLoadError):
+
+2012-04-27 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [EFL] tabsToLinks ewk_view setting
+ https://bugs.webkit.org/show_bug.cgi?id=84340
+
+ Exporting new ewk_view setting: tabsToLinks - enbles/disables tab key focusing of page elements.
+
+ Reviewed by Antonio Gomes.
+
+ * WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore::ChromeClientEfl::keyboardUIMode):
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (_ewk_view_priv_new):
+ (ewk_view_setting_include_links_in_focus_chain_get):
+ (ewk_view_setting_include_links_in_focus_chain_set):
+ * ewk/ewk_view.h:
+
+2012-04-27 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] DRT should support LayoutTestController's dumpResourceLoadCallbacks()
+ https://bugs.webkit.org/show_bug.cgi?id=81891
+
+ Reviewed by Philippe Normand.
+
+ New "load,resource,finished", "load,resource,failed", and
+ "resource,response,received" signals were added to notify about different
+ resource load events. These additional signals are needed for proper
+ support of LayoutTestController's dumpResourceLoadCallbacks() in EFL's
+ DumpRenderTree.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::assignIdentifierToInitialRequest):
+ (WebCore::FrameLoaderClientEfl::dispatchDidReceiveResponse):
+ (WebCore::FrameLoaderClientEfl::dispatchDidFinishLoading):
+ (WebCore::FrameLoaderClientEfl::dispatchDidFailLoading):
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_response_received):
+ (ewk_frame_load_finished):
+ (ewk_frame_load_resource_finished):
+ (ewk_frame_load_resource_failed):
+ (ewk_frame_load_error):
+ * ewk/ewk_frame.h:
+ * ewk/ewk_private.h:
+ * ewk/ewk_view.h:
+
+2012-04-26 Martin Robinson <mrobinson@igalia.com>
+
+ [Cairo] Wrap cairo surfaces in a class when storing native images
+ https://bugs.webkit.org/show_bug.cgi?id=83611
+
+ Reviewed by Alejandro G. Castro.
+
+ * ewk/ewk_history.cpp: Updated to reflect addition of NativeImageCario.
+ * ewk/ewk_settings.cpp: Ditto.
+
+2012-04-26 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] Enable VIDEO_TRACK feature
+ https://bugs.webkit.org/show_bug.cgi?id=84830
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Add functions on the ewk_view to toggle runtime support for text
+ tracks in HTML5 video.
+
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (_ewk_view_priv_new):
+ (ewk_view_setting_should_display_subtitles_get):
+ (ewk_view_setting_should_display_subtitles_set):
+ (ewk_view_setting_should_display_captions_get):
+ (ewk_view_setting_should_display_captions_set):
+ (ewk_view_setting_should_display_text_descriptions_get):
+ (ewk_view_setting_should_display_text_descriptions_set):
+ * ewk/ewk_view.h:
+
+2012-04-26 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
+
+ [EFL] [DRT] LayoutTestController needs implementation of setJavaScriptProfilingEnabled
+ https://bugs.webkit.org/show_bug.cgi?id=84576
+
+ Reviewed by Martin Robinson.
+
+ Add missing implementation setJavaScriptProfilingEnabled to EFL's
+ DumpRenderTreeSupport. This setting allows layout tests to start
+ JavaScript profiling.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::setJavaScriptProfilingEnabled):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-04-26 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [EFL] WebGL support ewk_view setting
+ https://bugs.webkit.org/show_bug.cgi?id=84534
+
+ Reviewed by Antonio Gomes.
+
+ Exporting new ewk_view setting: webGLEnabled - enbles/disables WebGL support.
+
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (_ewk_view_priv_new):
+ (ewk_view_setting_enable_webgl_get):
+ (ewk_view_setting_enable_webgl_set):
+ * ewk/ewk_view.h:
+
+2012-04-26 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][DRT] "resource,request,willsend" signal needs to provide more information
+ https://bugs.webkit.org/show_bug.cgi?id=84670
+
+ Reviewed by Andreas Kling.
+
+ The "resource,request,willsend" signal now provides more information
+ about the network request as well as information about the possible
+ redirect response. This extra information will be needed to support
+ LayoutTestController's dumpResourceLoadCallbacks() in EFL's
+ DumpRenderTree.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::dispatchWillSendRequest):
+ (WebCore::FrameLoaderClientEfl::assignIdentifierToInitialRequest):
+ (WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForNavigationAction):
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_request_will_send):
+ * ewk/ewk_frame.h:
+ * ewk/ewk_private.h:
+ * ewk/ewk_view.h:
+
+2012-04-23 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] EFL's LayoutTestController does not implement elementDoesAutoCompleteForElementWithId
+ https://bugs.webkit.org/show_bug.cgi?id=84425
+
+ Reviewed by Antonio Gomes.
+
+ Add a helper function to DumpRenderTreeSupportEfl, returning
+ whether or not an element does perform autocompletion.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::elementDoesAutoCompleteForElementWithId):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-04-20 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [EFL] Add Security Origin API
+ https://bugs.webkit.org/show_bug.cgi?id=84023
+
+ Added an API to get a Security Origin handle from a Ewk_Frame. This is
+ needed for fine grained security policy. This new API will also allow
+ to define quota and get usage information of a Web Storage based on its
+ Security Origin.
+
+ Reviewed by Antonio Gomes.
+
+ * ewk/EWebKit.h:
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_security_origin_get):
+ * ewk/ewk_frame.h:
+ * ewk/ewk_security_origin.cpp: Added.
+ (ewk_security_origin_protocol_get):
+ (ewk_security_origin_host_get):
+ (ewk_security_origin_port_get):
+ (ewk_security_origin_web_database_usage_get):
+ (ewk_security_origin_web_database_quota_get):
+ (ewk_security_origin_web_database_quota_set):
+ (ewk_security_origin_free):
+ (ewk_security_origin_new):
+ * ewk/ewk_security_origin.h: Added.
+
+2012-04-20 Kamil Blank <k.blank@samsung.com>
+
+ [EFL] Add setting API for author and user styles.
+ https://bugs.webkit.org/show_bug.cgi?id=82860
+
+ Reviewed by Daniel Bates.
+
+ Add missing implementation setAuthorAndUserStylesEnabled to EFL's
+ DumpRenderTreeSupport.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+
+2012-04-19 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] dispatchDidCancelClientRedirect needs implementation
+ https://bugs.webkit.org/show_bug.cgi?id=83669
+
+ Reviewed by Antonio Gomes.
+
+ Emit a new "redirect,cancelled" signal on the ewk_frame when a
+ redirect is cancelled. This is needed by EFL's DumpRenderTree to dump
+ frame load callbacks information.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::dispatchDidCancelClientRedirect):
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_redirect_cancelled):
+ * ewk/ewk_frame.h:
+ * ewk/ewk_private.h:
+
+2012-04-17 Christophe Dumez <christophe.dumez@intel.com>
+
+ EFL's LayoutTestController does not implement callShouldCloseOnWebView
+ https://bugs.webkit.org/show_bug.cgi?id=82301
+
+ Reviewed by Martin Robinson.
+
+ Implement callShouldCloseOnWebView in EFL's LayoutTestController by
+ calling shouldClose() on the FrameLoader, allowing the related
+ test to be removed from the skip list.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::callShouldCloseOnWebView):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-04-17 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] FrameLoaderClient should send "load,finished" signal for all frame, not just the main one
+ https://bugs.webkit.org/show_bug.cgi?id=84052
+
+ Reviewed by Antonio Gomes.
+
+ Emit the "load,finished" signal from dispatchDidFinishLoad() / instead of
+ postProgressFinishedNotification() in order to send notifications all frames,
+ not just the main one.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::postProgressFinishedNotification):
+ (WebCore::FrameLoaderClientEfl::dispatchDidFinishLoad):
+ (WebCore::FrameLoaderClientEfl::dispatchDidFailLoad):
+
+2012-04-17 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
+
+ [EFL] Add setting API to enable/disable XSSAuditor
+ https://bugs.webkit.org/show_bug.cgi?id=83281
+
+ Add setting API to enable or disable WebKit's XSSAuditor to protect
+ from reflective cross-site scripting attacks. Also, emit the signal
+ 'xss,detected' and provide addition information received from
+ XSSAuditor when reflected XSS is encountered in the page.
+
+ Reviewed by Antonio Gomes.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::didDetectXSS):
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_xss_detected):
+ * ewk/ewk_frame.h:
+ * ewk/ewk_private.h:
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (_ewk_view_priv_new):
+ (ewk_view_setting_enable_xss_auditor_get):
+ (ewk_view_setting_enable_xss_auditor_set):
+ * ewk/ewk_view.h:
+
+2012-04-17 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] DRT should support LayoutTestController's dumpFrameLoadCallbacks()
+ https://bugs.webkit.org/show_bug.cgi?id=83030
+
+ Reviewed by Antonio Gomes.
+
+ Emit "load,started" and "onload,event" signals needed to support
+ LayoutTestController's dumpFrameLoadCallbacks() in EFL's DumpRenderTree.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::dispatchDidHandleOnloadEvents):
+ (WebCore::FrameLoaderClientEfl::dispatchDidCommitLoad):
+ (WebCore::FrameLoaderClientEfl::dispatchDidFailLoad):
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_load_committed):
+ (ewk_frame_load_started):
+ * ewk/ewk_frame.h:
+ * ewk/ewk_private.h:
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (ewk_view_load_started):
+ (ewk_view_onload_event):
+ * ewk/ewk_view.h:
+
+2012-04-17 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r114376.
+ http://trac.webkit.org/changeset/114376
+ https://bugs.webkit.org/show_bug.cgi?id=84155
+
+ Wrong patch version committed, asked by the patch author.
+ (Requested by rakuco on #webkit).
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::postProgressFinishedNotification):
+ (WebCore::FrameLoaderClientEfl::dispatchDidFinishLoad):
+ (WebCore::FrameLoaderClientEfl::dispatchDidHandleOnloadEvents):
+ (WebCore::FrameLoaderClientEfl::dispatchDidCommitLoad):
+ (WebCore::FrameLoaderClientEfl::dispatchDidFailLoad):
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+ (FrameLoaderClientEfl):
+ * ewk/ewk_frame.cpp:
+ * ewk/ewk_frame.h:
+ * ewk/ewk_private.h:
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ * ewk/ewk_view.h:
+
+2012-04-17 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] DRT should support LayoutTestController's dumpFrameLoadCallbacks()
+ https://bugs.webkit.org/show_bug.cgi?id=83030
+
+ Reviewed by Antonio Gomes.
+
+ Implement support for LayoutTestController's dumpFrameLoadCallbacks()
+ in EFL's DumpRenderTree. We no longer emit the "load,finished" signal
+ from postProgressFinishedNotification() since it is already emitted
+ from dispatchDidFinishLoad(). This avoids unwanted extra signals we
+ prevent some tests from passing (e.g.
+ http/tests/security/mixedContent/about-blank-iframe-in-main-frame.html).
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::postProgressFinishedNotification):
+ (WebCore::FrameLoaderClientEfl::dispatchDidFinishLoad):
+ (WebCore::FrameLoaderClientEfl::dispatchDidHandleOnloadEvents):
+ (WebCore::FrameLoaderClientEfl::dispatchDidCommitLoad):
+ (WebCore::FrameLoaderClientEfl::dispatchDidFailLoad):
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+ (FrameLoaderClientEfl):
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_load_committed):
+ * ewk/ewk_frame.h:
+ * ewk/ewk_private.h:
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (ewk_view_onload_event):
+ * ewk/ewk_view.h:
+
+2012-04-17 Mariusz Grzegorczyk <mariusz.g@samsung.com>
+
+ [EFL][WK2] Fix build break when CONTEXT_MENUS is disabled.
+ https://bugs.webkit.org/show_bug.cgi?id=83285
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove WebCore namespace from PageClientEfl.
+
+ * WebCoreSupport/PageClientEfl.cpp:
+ (WebCore):
+ * WebCoreSupport/PageClientEfl.h:
+ * ewk/ewk_private.h:
+ (EWKPrivate):
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (_ewk_view_priv_new):
+ (EWKPrivate::corePageClient):
+
+2012-04-13 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [EFL] Add API for color chooser
+ https://bugs.webkit.org/show_bug.cgi?id=83692
+
+ Added new API to enable browsers to display a custom color picker
+ when an input field of type "color" is activated.
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore):
+ (WebCore::ChromeClientEfl::createColorChooser):
+ (WebCore::ChromeClientEfl::removeColorChooser):
+ (WebCore::ChromeClientEfl::updateColorChooser):
+ * WebCoreSupport/ChromeClientEfl.h:
+ (ChromeClientEfl):
+ * ewk/ewk_private.h:
+ (WebCore):
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (ewk_view_color_chooser_new):
+ (ewk_view_color_chooser_destroy):
+ (ewk_view_color_chooser_color_set):
+ (ewk_view_color_chooser_changed):
+ * ewk/ewk_view.h:
+
+2012-04-11 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
+
+ [EFL] LayoutTestController needs implementation of pageProperty
+ https://bugs.webkit.org/show_bug.cgi?id=82449
+
+ Add missing implementation pageProperty to EFL's
+ DumpRenderTreeSupport.
+
+ Reviewed by Antonio Gomes.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::pageProperty):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-04-10 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
+
+ [EFL] LayoutTestController needs implementation of addUserStyleSheet
+ https://bugs.webkit.org/show_bug.cgi?id=82446
+
+ Add missing implementation addUserStyleSheet to EFL's
+ DumpRenderTreeSupport.
+
+ Reviewed by Antonio Gomes.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::addUserStyleSheet):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-04-04 Raphael Kubo da Costa <rakuco@webkit.org>
+
+ Another unreviewed attempt at getting the EFL build bot to a
+ healthy state by forcing a rebuild.
+
+ * ewk/ewk_cookies.h:
+
+2012-04-04 Raphael Kubo da Costa <rakuco@webkit.org>
+
+ Unreviewed; touch a file to check if the EFL build bot is back to
+ normal.
+
+ * ewk/ewk_cookies.h:
+
+2012-04-04 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][DRT] Catch the "resource,request,willsend" signal
+ https://bugs.webkit.org/show_bug.cgi?id=82192
+
+ Reviewed by Gustavo Noronha Silva.
+
+ EFL's FrameLoaderClient now emits the "resource,request,willsend"
+ signal on the view for all resources about to be loaded, not just the
+ main frame. Also adds a boolean flag to Ewk_Frame_Resource_Request to
+ distinguish the request for the main frame from those for
+ sub-resources.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::dispatchWillSendRequest):
+ (WebCore::FrameLoaderClientEfl::assignIdentifierToInitialRequest):
+ (WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForNavigationAction):
+ * ewk/ewk_frame.h:
+ * ewk/ewk_view.h:
+
+2012-04-04 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
+
+ [EFL] DRT support for computedStyleIncludingVisitedInfo
+ https://bugs.webkit.org/show_bug.cgi?id=82190
+
+ Add missing implementation computedStyleIncludingVisitedInfo to EFL's
+ DumpRenderTreeSupport.
+
+ Reviewed by Antonio Gomes.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::computedStyleIncludingVisitedInfo):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-04-04 Dominik Röttsches <dominik.rottsches@linux.intel.com>
+
+ [EFL][DRT] FrameloaderClientEfl needs to handle media content correctly
+ https://bugs.webkit.org/show_bug.cgi?id=83020
+
+ Reviewed by Hajime Morita.
+
+ Implementing handling of media content type and media documents
+ in the respective FrameLoaderClientEfl callbacks.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::committedLoad): Cancel loading for media documents.
+ (WebCore::FrameLoaderClientEfl::canShowMIMEType): Let media content types through.
+ (WebCore):
+ (WebCore::FrameLoaderClientEfl::pluginWillHandleLoadError): Returning appropriate error type.
+ (WebCore::FrameLoaderClientEfl::shouldFallBack): Falling back as well for media handled by media player.
+
+2012-04-04 Grzegorz Czajkowski <g.czajkowski@samsung.com>
+
+ [EFL] Change ewk_settings_icon_database_icon_object_add to proper API name.
+ https://bugs.webkit.org/show_bug.cgi?id=82438
+
+ Reviewed by Andreas Kling.
+
+ The purpose of ewk_settings_icon_database_icon_object_add is to get icon
+ for the given URL. This function doesn't add anything to database.
+ Documentation and API name are adjusted.
+
+ * ewk/ewk_settings.cpp:
+ (ewk_settings_icon_database_icon_object_get):
+ * ewk/ewk_settings.h:
+
+2012-04-03 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
+
+ [EFL] DRT support for setInteractiveFormValidationEnabled
+ https://bugs.webkit.org/show_bug.cgi?id=82050
+
+ Add a setting setInteractiveFormValidationEnabled to EFL's
+ DumpRenderTreeSupport.
+
+ Reviewed by Antonio Gomes.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::setInteractiveFormValidationEnabled):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-04-03 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] LayoutTestController needs implementation of setDefersLoading
+ https://bugs.webkit.org/show_bug.cgi?id=82890
+
+ Reviewed by Philippe Normand.
+
+ Implement setDefersLoading() in EFL's LayoutTestController so that the
+ corresponding test case can be removed from the skip list.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::setDefersLoading):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-04-03 Alexander Shalamov <alexander.shalamov@intel.com>
+
+ [EFL] LayoutTestController needs implementation of pageSizeAndMarginsInPixels
+ https://bugs.webkit.org/show_bug.cgi?id=82589
+
+ Add missing implementation for pageSizeAndMarginsInPixels to EFL's
+ DumpRenderTreeSupport.
+
+ Reviewed by Philippe Normand.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::pageSizeAndMarginsInPixels):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-04-02 Alexander Shalamov <alexander.shalamov@intel.com>
+
+ [EFL] LayoutTestController needs implementation of isPageBoxVisible
+ https://bugs.webkit.org/show_bug.cgi?id=82591
+
+ Add missing implementation for isPageBoxVisible to EFL's
+ DumpRenderTreeSupport.
+
+ Reviewed by Hajime Morita.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::isPageBoxVisible):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-04-01 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Support the Network Information API
+ https://bugs.webkit.org/show_bug.cgi?id=73528
+
+ Reviewed by Adam Barth.
+
+ Add NetworkInfoClientEfl to support network information API. However,
+ functions are not implemented yet.
+
+ * WebCoreSupport/NetworkInfoClientEfl.cpp: Added.
+ (WebCore::NetworkInfoClientEfl::NetworkInfoClientEfl):
+ (WebCore):
+ (WebCore::NetworkInfoClientEfl::~NetworkInfoClientEfl):
+ (WebCore::NetworkInfoClientEfl::startUpdating):
+ (WebCore::NetworkInfoClientEfl::stopUpdating):
+ (WebCore::NetworkInfoClientEfl::bandwidth):
+ (WebCore::NetworkInfoClientEfl::metered):
+ * WebCoreSupport/NetworkInfoClientEfl.h: Added.
+ (NetworkInfoClientEfl):
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (_ewk_view_priv_new):
+
+2012-03-30 Patrick Gansterer <paroga@webkit.org>
+
+ [EFL] Correct <wtf/*.h> include paths.
+ https://bugs.webkit.org/show_bug.cgi?id=82741
+
+ Reviewed by Andreas Kling.
+
+ Modify the #include declarations for several EFL-related files
+ so that the wtf types are included using the full path.
+
+ * ewk/ewk_frame.cpp:
+ * ewk/ewk_tiled_backing_store.cpp:
+ (_Ewk_Tiled_Backing_Store_Item):
+ * ewk/ewk_tiled_matrix.cpp:
+
+2012-03-30 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
+
+ Add a "preview" state to Page Visibility API implementation
+ https://bugs.webkit.org/show_bug.cgi?id=81355
+
+ Reviewed by Adam Barth.
+
+ Updating the Page Visibility API implementation to the current spec version.
+
+ * WebCoreSupport/AssertMatchingEnums.cpp:
+ * ewk/ewk_view.h:
+
+2012-03-28 Nate Chapin <japhet@chromium.org>
+
+ Remove dispatchDidLoadMainResource callback, since no
+ port implements it.
+ https://bugs.webkit.org/show_bug.cgi?id=82539
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore):
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+ (FrameLoaderClientEfl):
+
+2012-03-27 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [SOUP] Implement missing methods in CookieJarSoup
+ https://bugs.webkit.org/show_bug.cgi?id=82082
+
+ Reviewed by Martin Robinson.
+
+ * ewk/ewk_cookies.cpp:
+ (ewk_cookies_clear): Use soupCookieJar() instead of
+ defaultCookieJar().
+ (ewk_cookies_get_all): Ditto.
+ (ewk_cookies_cookie_del): Ditto.
+ (ewk_cookies_policy_set): Ditto.
+ (ewk_cookies_policy_get): Ditto.
+
+2012-03-23 Grzegorz Czajkowski <g.czajkowski@samsung.com>
+
+ [EFL][DRT] Implement LayoutTestController's methods related with editing.
+ https://bugs.webkit.org/show_bug.cgi?id=80136
+
+ Reviewed by Ryosuke Niwa.
+
+ Implements DumpRenderTreeSupportEfl's and EditorClientEfl's methods related with editing.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::setSmartInsertDeleteEnabled): New function.
+ (DumpRenderTreeSupportEfl::setSelectTrailingWhitespaceEnabled): New function.
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+ * WebCoreSupport/EditorClientEfl.cpp:
+ (WebCore::EditorClientEfl::setSmartInsertDeleteEnabled): New function.
+ (WebCore):
+ (WebCore::EditorClientEfl::smartInsertDeleteEnabled): Add implementation.
+ (WebCore::EditorClientEfl::setSelectTrailingWhitespaceEnabled): New function.
+ (WebCore::EditorClientEfl::isSelectTrailingWhitespaceEnabled): Add implementation.
+ (WebCore::EditorClientEfl::EditorClientEfl):
+ * WebCoreSupport/EditorClientEfl.h:
+ (EditorClientEfl):
+
+2012-03-22 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
+
+ [EFL] [DRT] Implement LayoutTestController::markerTextForListItem()
+ https://bugs.webkit.org/show_bug.cgi?id=81512
+
+ Add missing implementation markerTextForListItem to EFL's
+ DumpRenderTreeSupport.
+
+ Reviewed by Antonio Gomes.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::markerTextForListItem):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-03-22 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
+
+ [EFL] Implement LayoutTestController::setEditingBehavior
+ https://bugs.webkit.org/show_bug.cgi?id=81124
+
+ Add missing implementation setEditingBehavior to EFL's
+ DumpRenderTreeSupport. This setting controls various editing
+ behaviors that differ between platforms.
+
+ Reviewed by Martin Robinson.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::setEditingBehavior):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-03-22 Krzysztof Czech <k.czech@samsung.com>
+
+ [EFL] Change returned view mode in case of NULL of ewkView.
+ https://bugs.webkit.org/show_bug.cgi?id=81636
+
+ Reviewed by Eric Seidel.
+
+ Function ewk_view_mode_get returns wrong view mode in case of NULL of ewkView.
+
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (ewk_view_mode_get):
+
+2012-03-22 Hyowon Kim <hw1008.kim@samsung.com>
+
+ [EFL] Add PageClientEfl to WebCoreSupport.
+ https://bugs.webkit.org/show_bug.cgi?id=80748
+
+ Reviewed by Noam Rosenthal.
+
+ This patch adds PageClientEfl for implementaion of accelerated compositing.
+
+ * WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore::ChromeClientEfl::platformPageClient):
+ * WebCoreSupport/PageClientEfl.cpp: Added.
+ (WebCore):
+ (WebCore::PageClientEfl::PageClientEfl):
+ (WebCore::PageClientEfl::~PageClientEfl):
+ (WebCore::PageClientEfl::createEvasObjectForAcceleratedCompositing):
+ Just call ewk_view_accelerated_compositing_object_create().
+ (WebCore::PageClientEfl::acceleratedCompositingContext):
+ Just call ewk_view_accelerated_compositing_context_get().
+ * WebCoreSupport/PageClientEfl.h: Added.
+ (WebCore):
+ (PageClientEfl):
+ (WebCore::PageClientEfl::view): Return ewkView.
+ * ewk/ewk_private.h:
+ (WebCore):
+ (EWKPrivate):
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data): Add OwnPtr<PageClientEfl>.
+ (_ewk_view_priv_new): Create a new PageClientEfl.
+ (ewk_view_accelerated_compositing_object_create): Not implemented.
+ (ewk_view_accelerated_compositing_context_get): Not implemented.
+ (EWKPrivate::corePageClient): Return the PageClientEfl pointer.
+ (EWKPrivate):
+
+2012-03-19 Adam Barth <abarth@webkit.org>
+
+ Remove support for "magic" iframe
+ https://bugs.webkit.org/show_bug.cgi?id=81590
+
+ Reviewed by Eric Seidel.
+
+ Remove FrameLoaderClient methods that no longer exist.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore):
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+ (FrameLoaderClientEfl):
+
+2012-03-16 Kihong Kwon <kihong.kwon@samsung.com>
+
+ Support for Battery Status API
+ https://bugs.webkit.org/show_bug.cgi?id=62698
+
+ Add BatteryClientEfl class implementation for the layout tests now.
+ BatteryClientEfl class is not fully implemented in this patch.
+ (It will be completed by other patch as necessary in the Efl port.)
+ http://www.w3.org/TR/battery-status/
+
+ Reviewed by Adam Barth.
+
+ * WebCoreSupport/BatteryClientEfl.cpp: Added.
+ (WebCore):
+ (WebCore::BatteryClientEfl::BatteryClientEfl):
+ (WebCore::BatteryClientEfl::setController):
+ (WebCore::BatteryClientEfl::startUpdating):
+ (WebCore::BatteryClientEfl::stopUpdating):
+ (WebCore::BatteryClientEfl::batteryControllerDestroyed):
+ (WebCore::BatteryClientEfl::setBatteryStatus):
+ * WebCoreSupport/BatteryClientEfl.h: Added.
+ (WebCore):
+ (BatteryClientEfl):
+ (WebCore::BatteryClientEfl::~BatteryClientEfl):
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (_ewk_view_priv_new):
+
+2012-03-13 Jon Lee <jonlee@apple.com>
+
+ Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
+ https://bugs.webkit.org/show_bug.cgi?id=80922
+ <rdar://problem/11035082>
+
+ Reviewed by Jian Li.
+
+ You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
+ LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
+ new API. Therefore, APIs that are common between the two will have:
+ #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+
+ This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
+ the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
+
+ Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+ * WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore):
+ * WebCoreSupport/ChromeClientEfl.h:
+ (ChromeClientEfl):
+ * WebCoreSupport/NotificationPresenterClientEfl.cpp:
+ * WebCoreSupport/NotificationPresenterClientEfl.h:
+
+2012-03-13 Adam Barth <abarth@webkit.org> && Benjamin Poulain <bpoulain@apple.com>
+
+ Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
+ https://bugs.webkit.org/show_bug.cgi?id=78853
+
+ Reviewed by Adam Barth.
+
+ * WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore):
+ * WebCoreSupport/ChromeClientEfl.h:
+ (ChromeClientEfl):
+
+2012-03-13 ChangSeok Oh <shivamidow@gmail.com>
+
+ [EFL] [DRT] Implement scheduleAsynchronousKeyDown.
+ https://bugs.webkit.org/show_bug.cgi?id=79601
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Added a new API to deliver all mutations explicitly.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::deliverAllMutationsIfNecessary):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-03-13 JungJik Lee <jungjik.lee@samsung.com>
+
+ [EFL] Remove a duplicate allocation of matrix entry.
+ https://bugs.webkit.org/show_bug.cgi?id=79362
+
+ Reviewed by Zoltan Herczeg.
+
+ A matrix entry is created when calling ewk_matrix_new.
+ Another matrix is created inside ewk_tile_matrix_zoom_level_set.
+ This patch is for getting rid of a duplicated creation of the matrix.
+
+ * ewk/ewk_tiled_backing_store.cpp:
+ (_Ewk_Tiled_Backing_Store_Item):
+ (_ewk_tiled_backing_store_zoom_set_internal):
+ * ewk/ewk_tiled_matrix.cpp:
+ (ewk_tile_matrix_new):
+ (ewk_tile_matrix_zoom_level_set):
+ (ewk_tile_matrix_entry_new):
+ (ewk_tile_matrix_size_get):
+ * ewk/ewk_tiled_matrix.h:
+
2012-03-09 Jon Lee <jonlee@apple.com>
Rename NotificationPresenter to NotificationClient
diff --git a/Source/WebKit/efl/WebCoreSupport/AssertMatchingEnums.cpp b/Source/WebKit/efl/WebCoreSupport/AssertMatchingEnums.cpp
index 158cf0123..4a49f5fe9 100644
--- a/Source/WebKit/efl/WebCoreSupport/AssertMatchingEnums.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/AssertMatchingEnums.cpp
@@ -43,6 +43,7 @@
COMPILE_ASSERT_MATCHING_ENUM(EWK_PAGE_VISIBILITY_STATE_VISIBLE, PageVisibilityStateVisible);
COMPILE_ASSERT_MATCHING_ENUM(EWK_PAGE_VISIBILITY_STATE_HIDDEN, PageVisibilityStateHidden);
COMPILE_ASSERT_MATCHING_ENUM(EWK_PAGE_VISIBILITY_STATE_PRERENDER, PageVisibilityStatePrerender);
+COMPILE_ASSERT_MATCHING_ENUM(EWK_PAGE_VISIBILITY_STATE_PREVIEW, PageVisibilityStatePreview);
#endif
COMPILE_ASSERT_MATCHING_ENUM(EWK_TEXT_SELECTION_NONE, VisibleSelection::NoSelection);
diff --git a/Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.cpp
new file mode 100644
index 000000000..88dbfd98f
--- /dev/null
+++ b/Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.cpp
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * 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 "BatteryClientEfl.h"
+
+#if ENABLE(BATTERY_STATUS)
+
+#include "BatteryController.h"
+
+namespace WebCore {
+
+BatteryClientEfl::BatteryClientEfl()
+ : m_controller(0)
+{
+}
+
+void BatteryClientEfl::setController(BatteryController* controller)
+{
+ m_controller = controller;
+}
+
+void BatteryClientEfl::startUpdating()
+{
+ // FIXME: Need to implement for getting battery status to the efl port.
+}
+
+void BatteryClientEfl::stopUpdating()
+{
+ // FIXME: Need to implement for getting battery status to the efl port
+}
+
+void BatteryClientEfl::batteryControllerDestroyed()
+{
+ delete this;
+}
+
+void BatteryClientEfl::setBatteryStatus(const AtomicString& eventType, PassRefPtr<BatteryStatus> batteryStatus)
+{
+ m_controller->didChangeBatteryStatus(eventType, batteryStatus);
+}
+
+}
+
+#endif // BATTERY_STATUS
+
diff --git a/Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.h b/Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.h
new file mode 100644
index 000000000..a4f71c8d6
--- /dev/null
+++ b/Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * 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 BatteryClientEfl_h
+#define BatteryClientEfl_h
+
+#if ENABLE(BATTERY_STATUS)
+
+#include "BatteryClient.h"
+#include <wtf/text/AtomicString.h>
+
+namespace WebCore {
+
+class BatteryController;
+class BatteryStatus;
+
+class BatteryClientEfl : public BatteryClient {
+public:
+ BatteryClientEfl();
+ ~BatteryClientEfl() { };
+
+ virtual void setController(BatteryController*);
+ virtual void startUpdating();
+ virtual void stopUpdating();
+ virtual void batteryControllerDestroyed();
+
+ void setBatteryStatus(const AtomicString& eventType, PassRefPtr<BatteryStatus>);
+
+private:
+ BatteryController* m_controller;
+};
+
+}
+
+#endif // BATTERY_STATUS
+#endif // BatteryClientEfl_h
+
diff --git a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
index a58a11b33..1e7610ae2 100644
--- a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
@@ -55,7 +55,7 @@
#include <Evas.h>
#include <wtf/text/CString.h>
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#include "NotificationPresenterClientEfl.h"
#endif
@@ -64,6 +64,10 @@
#include "DatabaseTracker.h"
#endif
+#if ENABLE(INPUT_TYPE_COLOR)
+#include "ColorChooserEfl.h"
+#endif
+
using namespace WebCore;
static inline Evas_Object* kit(Frame* frame)
@@ -302,7 +306,7 @@ bool ChromeClientEfl::shouldInterruptJavaScript()
KeyboardUIMode ChromeClientEfl::keyboardUIMode()
{
- return KeyboardAccessTabsToLinks;
+ return ewk_view_setting_include_links_in_focus_chain_get(m_view) ? KeyboardAccessTabsToLinks : KeyboardAccessDefault;
}
IntRect ChromeClientEfl::windowResizerRect() const
@@ -339,7 +343,7 @@ IntPoint ChromeClientEfl::screenToRootView(const IntPoint& point) const
PlatformPageClient ChromeClientEfl::platformPageClient() const
{
- return m_view;
+ return EWKPrivate::corePageClient(m_view);
}
void ChromeClientEfl::scrollbarsModeDidChange() const
@@ -417,7 +421,7 @@ void ChromeClientEfl::exceededDatabaseQuota(Frame* frame, const String& database
}
#endif
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationClient* ChromeClientEfl::notificationPresenter() const
{
notImplemented();
@@ -425,6 +429,25 @@ NotificationClient* ChromeClientEfl::notificationPresenter() const
}
#endif
+#if ENABLE(INPUT_TYPE_COLOR)
+PassOwnPtr<ColorChooser> ChromeClientEfl::createColorChooser(ColorChooserClient* colorChooserClient, const Color& initialColor)
+{
+ ewk_view_color_chooser_new(m_view, colorChooserClient, initialColor);
+
+ return adoptPtr(new ColorChooserEfl(this));
+}
+
+void ChromeClientEfl::removeColorChooser()
+{
+ ewk_view_color_chooser_destroy(m_view);
+}
+
+void ChromeClientEfl::updateColorChooser(const Color& color)
+{
+ ewk_view_color_chooser_changed(m_view, color);
+}
+#endif
+
void ChromeClientEfl::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileChooser)
{
RefPtr<FileChooser> chooser = prpFileChooser;
@@ -464,17 +487,6 @@ void ChromeClientEfl::setCursorHiddenUntilMouseMoves(bool)
notImplemented();
}
-void ChromeClientEfl::requestGeolocationPermissionForFrame(Frame*, Geolocation*)
-{
- // See the comment in WebCore/page/ChromeClient.h
- notImplemented();
-}
-
-void ChromeClientEfl::cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*)
-{
- notImplemented();
-}
-
void ChromeClientEfl::cancelGeolocationPermissionForFrame(Frame*, Geolocation*)
{
notImplemented();
diff --git a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h b/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
index 1526245e4..65eaeb33b 100644
--- a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
+++ b/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
@@ -28,7 +28,11 @@
#include "KURL.h"
#include "PopupMenu.h"
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(INPUT_TYPE_COLOR)
+#include "ColorChooser.h"
+#endif
+
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#include "NotificationClient.h"
#endif
@@ -114,7 +118,7 @@ public:
virtual void exceededDatabaseQuota(Frame*, const String&);
#endif
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
virtual WebCore::NotificationClient* notificationPresenter() const;
#endif
@@ -138,6 +142,12 @@ public:
virtual void exitFullScreenForElement(WebCore::Element*);
#endif
+#if ENABLE(INPUT_TYPE_COLOR)
+ virtual PassOwnPtr<ColorChooser> createColorChooser(ColorChooserClient*, const Color&);
+ virtual void removeColorChooser();
+ virtual void updateColorChooser(const Color&);
+#endif
+
virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
virtual void loadIconForFiles(const Vector<String>&, FileIconLoader*);
virtual void formStateDidChange(const Node*);
@@ -147,8 +157,6 @@ public:
virtual void scrollRectIntoView(const IntRect&) const { }
- virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
- virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*);
virtual void cancelGeolocationPermissionForFrame(Frame*, Geolocation*);
virtual void invalidateContents(const IntRect&, bool);
diff --git a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp b/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
index fd3d6b50b..9b28046f8 100644
--- a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
@@ -25,18 +25,25 @@
#include "ewk_private.h"
#include <AnimationController.h>
+#include <CSSComputedStyleDeclaration.h>
#include <DocumentLoader.h>
+#include <EditorClientEfl.h>
#include <Eina.h>
#include <Evas.h>
#include <FindOptions.h>
#include <FloatSize.h>
+#include <FocusController.h>
#include <FrameView.h>
#include <HTMLInputElement.h>
+#include <InspectorController.h>
#include <IntRect.h>
+#include <JSCSSStyleDeclaration.h>
#include <JSElement.h>
+#include <PageGroup.h>
#include <PrintContext.h>
#include <RenderTreeAsText.h>
#include <Settings.h>
+#include <WebKitMutationObserver.h>
#include <bindings/js/GCController.h>
#include <history/HistoryItem.h>
#include <workers/WorkerThread.h>
@@ -58,6 +65,16 @@ unsigned DumpRenderTreeSupportEfl::activeAnimationsCount(const Evas_Object* ewkF
return animationController->numberOfActiveAnimations(frame->document());
}
+bool DumpRenderTreeSupportEfl::callShouldCloseOnWebView(Evas_Object* ewkFrame)
+{
+ WebCore::Frame* frame = EWKPrivate::coreFrame(ewkFrame);
+
+ if (!frame)
+ return false;
+
+ return frame->loader()->shouldClose();
+}
+
void DumpRenderTreeSupportEfl::clearFrameName(Evas_Object* ewkFrame)
{
if (WebCore::Frame* frame = EWKPrivate::coreFrame(ewkFrame))
@@ -85,6 +102,24 @@ String DumpRenderTreeSupportEfl::counterValueByElementId(const Evas_Object* ewkF
return WebCore::counterValueForElement(element);
}
+bool DumpRenderTreeSupportEfl::elementDoesAutoCompleteForElementWithId(const Evas_Object* ewkFrame, const String& elementId)
+{
+ WebCore::Frame* frame = EWKPrivate::coreFrame(ewkFrame);
+
+ if (!frame)
+ return false;
+
+ WebCore::Document* document = frame->document();
+ ASSERT(document);
+
+ WebCore::HTMLInputElement* inputElement = static_cast<WebCore::HTMLInputElement*>(document->getElementById(elementId));
+
+ if (!inputElement)
+ return false;
+
+ return inputElement->isTextField() && !inputElement->isPasswordField() && inputElement->shouldAutocomplete();
+}
+
Eina_List* DumpRenderTreeSupportEfl::frameChildren(const Evas_Object* ewkFrame)
{
WebCore::Frame* frame = EWKPrivate::coreFrame(ewkFrame);
@@ -157,6 +192,25 @@ int DumpRenderTreeSupportEfl::numberOfPagesForElementId(const Evas_Object* ewkFr
return WebCore::PrintContext::pageNumberForElement(element, WebCore::FloatSize(pageWidth, pageHeight));
}
+String DumpRenderTreeSupportEfl::pageSizeAndMarginsInPixels(const Evas_Object* ewkFrame, int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft)
+{
+ WebCore::Frame* frame = EWKPrivate::coreFrame(ewkFrame);
+
+ if (!frame)
+ return String();
+
+ return WebCore::PrintContext::pageSizeAndMarginsInPixels(frame, pageNumber, width, height, marginTop, marginRight, marginBottom, marginLeft);
+}
+
+String DumpRenderTreeSupportEfl::pageProperty(const Evas_Object* ewkFrame, const char* propertyName, int pageNumber)
+{
+ WebCore::Frame* coreFrame = EWKPrivate::coreFrame(ewkFrame);
+ if (!coreFrame)
+ return String();
+
+ return WebCore::PrintContext::pageProperty(coreFrame, propertyName, pageNumber);
+}
+
bool DumpRenderTreeSupportEfl::pauseAnimation(Evas_Object* ewkFrame, const char* name, const char* elementId, double time)
{
WebCore::Frame* frame = EWKPrivate::coreFrame(ewkFrame);
@@ -311,6 +365,43 @@ void DumpRenderTreeSupportEfl::setAutofilled(JSContextRef context, JSValueRef no
inputElement->setAutofilled(autofilled);
}
+void DumpRenderTreeSupportEfl::setDefersLoading(Evas_Object* ewkView, bool defers)
+{
+ WebCore::Page* page = EWKPrivate::corePage(ewkView);
+
+ if (!page)
+ return;
+
+ page->setDefersLoading(defers);
+}
+
+void DumpRenderTreeSupportEfl::setLoadsSiteIconsIgnoringImageLoadingSetting(Evas_Object* ewkView, bool loadsSiteIconsIgnoringImageLoadingPreferences)
+{
+ WebCore::Page* page = EWKPrivate::corePage(ewkView);
+ if (!page)
+ return;
+
+ page->settings()->setLoadsSiteIconsIgnoringImageLoadingSetting(loadsSiteIconsIgnoringImageLoadingPreferences);
+}
+
+void DumpRenderTreeSupportEfl::addUserStyleSheet(const Evas_Object* ewkView, const char* sourceCode, bool allFrames)
+{
+ WebCore::Page* page = EWKPrivate::corePage(ewkView);
+ if (!page)
+ return;
+
+ page->group().addUserStyleSheetToWorld(WebCore::mainThreadNormalWorld(), sourceCode, WebCore::KURL(), nullptr, nullptr, allFrames ? WebCore::InjectInAllFrames : WebCore::InjectInTopFrameOnly);
+}
+
+void DumpRenderTreeSupportEfl::executeCoreCommandByName(const Evas_Object* ewkView, const char* name, const char* value)
+{
+ WebCore::Page* page = EWKPrivate::corePage(ewkView);
+ if (!page)
+ return;
+
+ page->focusController()->focusedOrMainFrame()->editor()->command(name).execute(value);
+}
+
bool DumpRenderTreeSupportEfl::findString(const Evas_Object* ewkView, const char* text, WebCore::FindOptions options)
{
WebCore::Page* page = EWKPrivate::corePage(ewkView);
@@ -321,6 +412,59 @@ bool DumpRenderTreeSupportEfl::findString(const Evas_Object* ewkView, const char
return page->findString(String::fromUTF8(text), options);
}
+void DumpRenderTreeSupportEfl::setJavaScriptProfilingEnabled(const Evas_Object* ewkView, bool enabled)
+{
+#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR)
+ WebCore::Page* corePage = EWKPrivate::corePage(ewkView);
+ if (!corePage)
+ return;
+
+ WebCore::InspectorController* controller = corePage->inspectorController();
+ if (!controller)
+ return;
+
+ if (enabled)
+ controller->enableProfiler();
+ else
+ controller->disableProfiler();
+#endif
+}
+
+bool DumpRenderTreeSupportEfl::isCommandEnabled(const Evas_Object* ewkView, const char* name)
+{
+ WebCore::Page* page = EWKPrivate::corePage(ewkView);
+ if (!page)
+ return false;
+
+ return page->focusController()->focusedOrMainFrame()->editor()->command(name).isEnabled();
+}
+
+void DumpRenderTreeSupportEfl::setSmartInsertDeleteEnabled(Evas_Object* ewkView, bool enabled)
+{
+ WebCore::Page* page = EWKPrivate::corePage(ewkView);
+ if (!page)
+ return;
+
+ WebCore::EditorClientEfl* editorClient = static_cast<WebCore::EditorClientEfl*>(page->editorClient());
+ if (!editorClient)
+ return;
+
+ editorClient->setSmartInsertDeleteEnabled(enabled);
+}
+
+void DumpRenderTreeSupportEfl::setSelectTrailingWhitespaceEnabled(Evas_Object* ewkView, bool enabled)
+{
+ WebCore::Page* page = EWKPrivate::corePage(ewkView);
+ if (!page)
+ return;
+
+ WebCore::EditorClientEfl* editorClient = static_cast<WebCore::EditorClientEfl*>(page->editorClient());
+ if (!editorClient)
+ return;
+
+ editorClient->setSelectTrailingWhitespaceEnabled(enabled);
+}
+
void DumpRenderTreeSupportEfl::garbageCollectorCollect()
{
WebCore::gcController().garbageCollectNow();
@@ -403,5 +547,76 @@ void DumpRenderTreeSupportEfl::dumpConfigurationForViewport(Evas_Object* ewkView
availableSize);
restrictMinimumScaleFactorToViewportSize(attributes, availableSize);
restrictScaleFactorToInitialScaleIfNotUserScalable(attributes);
- fprintf(stdout, "viewport size %dx%d scale %f with limits [%f, %f] and userScalable %f\n", attributes.layoutSize.width(), attributes.layoutSize.height(), attributes.initialScale, attributes.minimumScale, attributes.maximumScale, attributes.userScalable);
+ fprintf(stdout, "viewport size %dx%d scale %f with limits [%f, %f] and userScalable %f\n", static_cast<int>(attributes.layoutSize.width()), static_cast<int>(attributes.layoutSize.height()), attributes.initialScale, attributes.minimumScale, attributes.maximumScale, attributes.userScalable);
+}
+
+void DumpRenderTreeSupportEfl::deliverAllMutationsIfNecessary()
+{
+#if ENABLE(MUTATION_OBSERVERS)
+ WebCore::WebKitMutationObserver::deliverAllMutations();
+#endif
+}
+
+void DumpRenderTreeSupportEfl::setEditingBehavior(Evas_Object* ewkView, const char* editingBehavior)
+{
+ WebCore::EditingBehaviorType coreEditingBehavior;
+
+ if (!strcmp(editingBehavior, "win"))
+ coreEditingBehavior = WebCore::EditingWindowsBehavior;
+ else if (!strcmp(editingBehavior, "mac"))
+ coreEditingBehavior = WebCore::EditingMacBehavior;
+ else if (!strcmp(editingBehavior, "unix"))
+ coreEditingBehavior = WebCore::EditingUnixBehavior;
+ else {
+ ASSERT_NOT_REACHED();
+ return;
+ }
+
+ WebCore::Page* corePage = EWKPrivate::corePage(ewkView);
+ if (!corePage)
+ return;
+
+ corePage->settings()->setEditingBehaviorType(coreEditingBehavior);
+}
+
+String DumpRenderTreeSupportEfl::markerTextForListItem(JSContextRef context, JSValueRef nodeObject)
+{
+ JSC::ExecState* exec = toJS(context);
+ WebCore::Element* element = WebCore::toElement(toJS(exec, nodeObject));
+ if (!element)
+ return String();
+
+ return WebCore::markerTextForListItem(element);
+}
+
+void DumpRenderTreeSupportEfl::setInteractiveFormValidationEnabled(Evas_Object* ewkView, bool enabled)
+{
+ WebCore::Page* corePage = EWKPrivate::corePage(ewkView);
+ if (corePage)
+ corePage->settings()->setInteractiveFormValidationEnabled(enabled);
+}
+
+JSValueRef DumpRenderTreeSupportEfl::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)
+{
+ if (!value)
+ return JSValueMakeUndefined(context);
+
+ JSC::ExecState* exec = toJS(context);
+ JSC::JSValue jsValue = toJS(exec, value);
+ if (!jsValue.inherits(&WebCore::JSElement::s_info))
+ return JSValueMakeUndefined(context);
+
+ WebCore::JSElement* jsElement = static_cast<WebCore::JSElement*>(asObject(jsValue));
+ WebCore::Element* element = jsElement->impl();
+ RefPtr<WebCore::CSSComputedStyleDeclaration> style = WebCore::CSSComputedStyleDeclaration::create(element, true);
+ return toRef(exec, toJS(exec, jsElement->globalObject(), style.get()));
+}
+
+void DumpRenderTreeSupportEfl::setAuthorAndUserStylesEnabled(Evas_Object* ewkView, bool enabled)
+{
+ WebCore::Page* corePage = EWKPrivate::corePage(ewkView);
+ if (!corePage)
+ return;
+
+ corePage->settings()->setAuthorAndUserStylesEnabled(enabled);
}
diff --git a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h b/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
index 950a78d67..d65fa74c4 100644
--- a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
+++ b/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
@@ -45,14 +45,18 @@ public:
~DumpRenderTreeSupportEfl() { }
static unsigned activeAnimationsCount(const Evas_Object* ewkFrame);
+ static bool callShouldCloseOnWebView(Evas_Object* ewkFrame);
static void clearFrameName(Evas_Object* ewkFrame);
static void clearOpener(Evas_Object* ewkFrame);
static String counterValueByElementId(const Evas_Object* ewkFrame, const char* elementId);
+ static bool elementDoesAutoCompleteForElementWithId(const Evas_Object* ewkFrame, const String& elementId);
static Eina_List* frameChildren(const Evas_Object* ewkFrame);
static WebCore::Frame* frameParent(const Evas_Object* ewkFrame);
static void layoutFrame(Evas_Object* ewkFrame);
static int numberOfPages(const Evas_Object* ewkFrame, float pageWidth, float pageHeight);
static int numberOfPagesForElementId(const Evas_Object* ewkFrame, const char* elementId, float pageWidth, float pageHeight);
+ static String pageProperty(const Evas_Object* ewkFrame, const char* propertyName, int pageNumber);
+ static String pageSizeAndMarginsInPixels(const Evas_Object* ewkFrame, int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft);
static bool pauseAnimation(Evas_Object* ewkFrame, const char* name, const char* elementId, double time);
static bool pauseTransition(Evas_Object* ewkFrame, const char* name, const char* elementId, double time);
static unsigned pendingUnloadEventCount(const Evas_Object* ewkFrame);
@@ -64,8 +68,16 @@ public:
static void suspendAnimations(Evas_Object* ewkFrame);
static void setValueForUser(JSContextRef, JSValueRef nodeObject, JSStringRef value);
static void setAutofilled(JSContextRef, JSValueRef nodeObject, bool autofilled);
+ static void setDefersLoading(Evas_Object* ewkView, bool defers);
+ static void setLoadsSiteIconsIgnoringImageLoadingSetting(Evas_Object* ewkView, bool loadsSiteIconsIgnoringImageLoadingPreferences);
+ static void addUserStyleSheet(const Evas_Object* ewkView, const char* sourceCode, bool allFrames);
+ static void executeCoreCommandByName(const Evas_Object* ewkView, const char* name, const char* value);
static bool findString(const Evas_Object* ewkView, const char* text, WebCore::FindOptions);
+ static bool isCommandEnabled(const Evas_Object* ewkView, const char* name);
+ static void setJavaScriptProfilingEnabled(const Evas_Object* ewkView, bool enabled);
+ static void setSmartInsertDeleteEnabled(Evas_Object* ewkView, bool enabled);
+ static void setSelectTrailingWhitespaceEnabled(Evas_Object* ewkView, bool enabled);
static void garbageCollectorCollect();
static void garbageCollectorCollectOnAlternateThread(bool waitUntilDone);
@@ -79,6 +91,13 @@ public:
static void setMockScrollbarsEnabled(bool);
static void dumpConfigurationForViewport(Evas_Object* ewkView, int deviceDPI, const WebCore::IntSize& deviceSize, const WebCore::IntSize& availableSize);
+
+ static void deliverAllMutationsIfNecessary();
+ static void setEditingBehavior(Evas_Object* ewkView, const char* editingBehavior);
+ static String markerTextForListItem(JSContextRef, JSValueRef nodeObject);
+ static void setInteractiveFormValidationEnabled(Evas_Object* ewkView, bool enabled);
+ static JSValueRef computedStyleIncludingVisitedInfo(JSContextRef, JSValueRef);
+ static void setAuthorAndUserStylesEnabled(Evas_Object* ewkView, bool);
};
#endif // DumpRenderTreeSupportEfl_h
diff --git a/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp
index 8224155a8..8b9bc9fd4 100644
--- a/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp
@@ -23,6 +23,7 @@
#include "config.h"
#include "EditorClientEfl.h"
+#include "DumpRenderTreeSupportEfl.h"
#include "Editor.h"
#include "EventNames.h"
#include "FocusController.h"
@@ -229,16 +230,28 @@ void EditorClientEfl::pageDestroyed()
delete this;
}
+void EditorClientEfl::setSmartInsertDeleteEnabled(bool enabled)
+{
+ m_smartInsertDeleteEnabled = enabled;
+ if (enabled)
+ setSelectTrailingWhitespaceEnabled(false);
+}
+
bool EditorClientEfl::smartInsertDeleteEnabled()
{
- notImplemented();
- return false;
+ return m_smartInsertDeleteEnabled;
+}
+
+void EditorClientEfl::setSelectTrailingWhitespaceEnabled(bool enabled)
+{
+ m_selectTrailingWhitespaceEnabled = enabled;
+ if (enabled)
+ setSmartInsertDeleteEnabled(false);
}
bool EditorClientEfl::isSelectTrailingWhitespaceEnabled()
{
- notImplemented();
- return false;
+ return m_selectTrailingWhitespaceEnabled;
}
void EditorClientEfl::toggleContinuousSpellChecking()
@@ -437,6 +450,8 @@ void EditorClientEfl::handleInputMethodKeydown(KeyboardEvent* event)
EditorClientEfl::EditorClientEfl(Evas_Object* view)
: m_isInRedo(false)
, m_view(view)
+ , m_selectTrailingWhitespaceEnabled(false)
+ , m_smartInsertDeleteEnabled(false)
{
notImplemented();
}
diff --git a/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h b/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h
index 2b52e9dda..407e243d3 100644
--- a/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h
+++ b/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h
@@ -60,7 +60,9 @@ public:
virtual bool shouldDeleteRange(Range*);
virtual bool shouldShowDeleteInterface(HTMLElement*);
virtual bool smartInsertDeleteEnabled();
+ void setSmartInsertDeleteEnabled(bool);
virtual bool isSelectTrailingWhitespaceEnabled();
+ void setSelectTrailingWhitespaceEnabled(bool);
virtual bool isContinuousSpellCheckingEnabled();
virtual void toggleContinuousSpellChecking();
virtual bool isGrammarCheckingEnabled();
@@ -125,6 +127,8 @@ public:
private:
Evas_Object *m_view;
+ bool m_selectTrailingWhitespaceEnabled;
+ bool m_smartInsertDeleteEnabled;
};
}
diff --git a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
index 0096b8874..ea930222d 100644
--- a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
@@ -50,6 +50,7 @@
#include "ProgressTracker.h"
#include "RenderPart.h"
#include "ResourceRequest.h"
+#include "ResourceResponse.h"
#include "Settings.h"
#include "WebKitVersion.h"
#include "ewk_logging.h"
@@ -69,7 +70,6 @@ FrameLoaderClientEfl::FrameLoaderClientEfl(Evas_Object* view)
, m_customUserAgent("")
, m_pluginView(0)
, m_hasSentResponseToPlugin(false)
- , m_hasRepresentation(false)
{
}
@@ -122,9 +122,15 @@ void FrameLoaderClientEfl::dispatchWillSubmitForm(FramePolicyFunction function,
void FrameLoaderClientEfl::committedLoad(DocumentLoader* loader, const char* data, int length)
{
- if (!m_pluginView)
+ if (!m_pluginView) {
loader->commitData(data, length);
+ // Let the media document handle the rest of loading itself, cancel here.
+ Frame* coreFrame = loader->frame();
+ if (coreFrame && coreFrame->document()->isMediaDocument())
+ loader->cancelMainResourceLoad(pluginWillHandleLoadError(loader->response()));
+ }
+
// We re-check here as the plugin can have been created
if (m_pluginView) {
if (!m_hasSentResponseToPlugin) {
@@ -163,24 +169,43 @@ void FrameLoaderClientEfl::dispatchDidCancelAuthenticationChallenge(DocumentLoad
void FrameLoaderClientEfl::dispatchWillSendRequest(DocumentLoader* loader, unsigned long identifier, ResourceRequest& coreRequest, const ResourceResponse& coreResponse)
{
CString url = coreRequest.url().string().utf8();
- DBG("Resource url=%s", url.data());
+ CString firstParty = coreRequest.firstPartyForCookies().string().utf8();
+ CString httpMethod = coreRequest.httpMethod().utf8();
+ DBG("Resource url=%s, first_party=%s, http_method=%s", url.data(), firstParty.data(), httpMethod.data());
+
+ // We want to distinguish between a request for a document to be loaded into
+ // the main frame, a sub-frame, or the sub-objects in that document.
+ bool isMainFrameRequest = false;
+ if (loader) {
+ const FrameLoader* frameLoader = loader->frameLoader();
+ isMainFrameRequest = (loader == frameLoader->provisionalDocumentLoader() && frameLoader->isLoadingMainFrame());
+ }
- Ewk_Frame_Resource_Request request = { 0, identifier };
+ Ewk_Frame_Resource_Request request = { 0, firstParty.data(), httpMethod.data(), identifier, m_frame, isMainFrameRequest };
Ewk_Frame_Resource_Request orig = request; /* Initialize const fields. */
orig.url = request.url = url.data();
- ewk_frame_request_will_send(m_frame, &request);
+ Ewk_Frame_Resource_Response* redirectResponse;
+ Ewk_Frame_Resource_Response responseBuffer;
+ CString redirectUrl, mimeType;
- // We want to distinguish between a request for a document to be loaded into
- // the main frame, a sub-frame, or the sub-objects in that document (via Chromium).
- if (loader) {
- const FrameLoader* frameLoader = loader->frameLoader();
- const bool isMainFrameRequest = (loader == frameLoader->provisionalDocumentLoader() && frameLoader->isLoadingMainFrame());
- if (isMainFrameRequest)
- evas_object_smart_callback_call(m_view, "resource,request,willsend", &request);
+ if (coreResponse.isNull())
+ redirectResponse = 0;
+ else {
+ redirectUrl = coreResponse.url().string().utf8();
+ mimeType = coreResponse.mimeType().utf8();
+ responseBuffer.url = redirectUrl.data();
+ responseBuffer.status_code = coreResponse.httpStatusCode();
+ responseBuffer.identifier = identifier;
+ responseBuffer.mime_type = mimeType.data();
+ redirectResponse = &responseBuffer;
}
+ Ewk_Frame_Resource_Messages messages = { &request, redirectResponse };
+ ewk_frame_request_will_send(m_frame, &messages);
+ evas_object_smart_callback_call(m_view, "resource,request,willsend", &messages);
+
if (request.url != orig.url) {
coreRequest.setURL(KURL(KURL(), request.url));
@@ -196,13 +221,22 @@ bool FrameLoaderClientEfl::shouldUseCredentialStorage(DocumentLoader*, unsigned
return false;
}
-void FrameLoaderClientEfl::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest& coreRequest)
+void FrameLoaderClientEfl::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader* loader, const ResourceRequest& coreRequest)
{
CString url = coreRequest.url().string().utf8();
- DBG("Resource url=%s", url.data());
+ CString firstParty = coreRequest.firstPartyForCookies().string().utf8();
+ CString httpMethod = coreRequest.httpMethod().utf8();
+ DBG("Resource url=%s, First party=%s, HTTP method=%s", url.data(), firstParty.data(), httpMethod.data());
- Ewk_Frame_Resource_Request request = { 0, identifier };
+ bool isMainFrameRequest = false;
+ if (loader) {
+ const FrameLoader* frameLoader = loader->frameLoader();
+ isMainFrameRequest = (loader == frameLoader->provisionalDocumentLoader() && frameLoader->isLoadingMainFrame());
+ }
+
+ Ewk_Frame_Resource_Request request = { url.data(), firstParty.data(), httpMethod.data(), identifier, m_frame, isMainFrameRequest };
ewk_frame_request_assign_identifier(m_frame, &request);
+ evas_object_smart_callback_call(m_view, "resource,request,new", &request);
}
void FrameLoaderClientEfl::postProgressStartedNotification()
@@ -218,16 +252,7 @@ void FrameLoaderClientEfl::postProgressEstimateChangedNotification()
void FrameLoaderClientEfl::postProgressFinishedNotification()
{
- if (m_loadError.isNull())
- ewk_frame_load_finished(m_frame, 0, 0, 0, 0, 0);
- else {
- ewk_frame_load_finished(m_frame,
- m_loadError.domain().utf8().data(),
- m_loadError.errorCode(),
- m_loadError.isCancellation(),
- m_loadError.localizedDescription().utf8().data(),
- m_loadError.failingURL().utf8().data());
- }
+ notImplemented();
}
void FrameLoaderClientEfl::frameLoaderDestroyed()
@@ -239,13 +264,21 @@ void FrameLoaderClientEfl::frameLoaderDestroyed()
delete this;
}
-void FrameLoaderClientEfl::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long, const ResourceResponse& response)
+void FrameLoaderClientEfl::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& coreResponse)
{
// Update our knowledge of request soup flags - some are only set
// after the request is done.
- loader->request().setSoupMessageFlags(response.soupMessageFlags());
+ loader->request().setSoupMessageFlags(coreResponse.soupMessageFlags());
+
+ m_response = coreResponse;
+
+ CString mimeType = coreResponse.mimeType().utf8();
+ Ewk_Frame_Resource_Response response = { 0, coreResponse.httpStatusCode(), identifier, mimeType.data() };
+ CString url = coreResponse.url().string().utf8();
+ response.url = url.data();
- m_response = response;
+ ewk_frame_response_received(m_frame, &response);
+ evas_object_smart_callback_call(m_view, "resource,response,received", &response);
}
void FrameLoaderClientEfl::dispatchDecidePolicyForResponse(FramePolicyFunction function, const ResourceResponse& response, const ResourceRequest& resourceRequest)
@@ -293,10 +326,11 @@ void FrameLoaderClientEfl::dispatchDecidePolicyForNavigationAction(FramePolicyFu
// if not acceptNavigationRequest - look at Qt -> PolicyIgnore;
// FIXME: do proper check and only reset forms when on PolicyIgnore
- char* url = strdup(resourceRequest.url().string().utf8().data());
- Ewk_Frame_Resource_Request request = { url, 0 };
+ CString url = resourceRequest.url().string().utf8();
+ CString firstParty = resourceRequest.firstPartyForCookies().string().utf8();
+ CString httpMethod = resourceRequest.httpMethod().utf8();
+ Ewk_Frame_Resource_Request request = { url.data(), firstParty.data(), httpMethod.data(), 0, m_frame, false };
bool ret = ewk_view_navigation_policy_decision(m_view, &request);
- free(url);
PolicyAction policy;
if (!ret)
@@ -329,30 +363,6 @@ 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(Page*)
-{
- ASSERT(m_frame);
-
- Frame* currentFrame = EWKPrivate::coreFrame(m_frame);
- Evas_Object* currentView = ewk_frame_view_get(m_frame);
- Frame* parentFrame = currentFrame->tree()->parent();
-
- FrameLoaderClientEfl* client = static_cast<FrameLoaderClientEfl*>(parentFrame->loader()->client());
- Evas_Object* clientFrame = client ? client->webFrame() : 0;
- Evas_Object* clientView = ewk_frame_view_get(clientFrame);
-
- if (currentView != clientView) {
- ewk_frame_view_set(m_frame, clientView);
- m_view = clientView;
- }
-
- ASSERT(ewk_view_core_page_get(ewk_frame_view_get(m_frame)) == currentFrame->page());
-}
-
-void FrameLoaderClientEfl::transferLoadingResourceFromPage(ResourceLoader*, const ResourceRequest&, Page*)
-{
-}
-
void FrameLoaderClientEfl::redirectDataToPlugin(Widget* pluginWidget)
{
ASSERT(!m_pluginView);
@@ -467,7 +477,7 @@ bool FrameLoaderClientEfl::hasFrameView() const
void FrameLoaderClientEfl::dispatchDidFinishLoad()
{
- m_loadError = ResourceError(); /* clears previous error */
+ ewk_frame_load_finished(m_frame, 0, 0, 0, 0, 0);
}
void FrameLoaderClientEfl::frameLoadCompleted()
@@ -515,14 +525,12 @@ void FrameLoaderClientEfl::didRunInsecureContent(SecurityOrigin*, const KURL&)
ewk_frame_mixed_content_run_set(m_frame, true);
}
-void FrameLoaderClientEfl::didDetectXSS(const KURL&, bool)
+void FrameLoaderClientEfl::didDetectXSS(const KURL& insecureURL, bool didBlockEntirePage)
{
- notImplemented();
-}
+ CString cs = insecureURL.string().utf8();
+ Ewk_Frame_Xss_Notification xssInfo = { cs.data(), didBlockEntirePage };
-void FrameLoaderClientEfl::makeRepresentation(DocumentLoader*)
-{
- m_hasRepresentation = true;
+ ewk_frame_xss_detected(m_frame, &xssInfo);
}
void FrameLoaderClientEfl::forceLayout()
@@ -554,22 +562,22 @@ void FrameLoaderClientEfl::loadedFromCachedPage()
void FrameLoaderClientEfl::dispatchDidHandleOnloadEvents()
{
- notImplemented();
+ ewk_view_onload_event(m_view, m_frame);
}
void FrameLoaderClientEfl::dispatchDidReceiveServerRedirectForProvisionalLoad()
{
- notImplemented();
+ ewk_frame_redirect_provisional_load(m_frame);
}
void FrameLoaderClientEfl::dispatchDidCancelClientRedirect()
{
- notImplemented();
+ ewk_frame_redirect_cancelled(m_frame);
}
-void FrameLoaderClientEfl::dispatchWillPerformClientRedirect(const KURL&, double, double)
+void FrameLoaderClientEfl::dispatchWillPerformClientRedirect(const KURL& url, double, double)
{
- notImplemented();
+ ewk_frame_redirect_requested(m_frame, url.string().utf8().data());
}
void FrameLoaderClientEfl::dispatchDidChangeLocationWithinPage()
@@ -621,6 +629,7 @@ void FrameLoaderClientEfl::dispatchDidChangeIcons(WebCore::IconType)
void FrameLoaderClientEfl::dispatchDidCommitLoad()
{
ewk_frame_uri_changed(m_frame);
+ ewk_frame_load_committed(m_frame);
if (ewk_view_frame_main_get(m_view) != m_frame)
return;
ewk_view_title_set(m_view, 0);
@@ -652,16 +661,6 @@ void FrameLoaderClientEfl::cancelPolicyCheck()
notImplemented();
}
-void FrameLoaderClientEfl::dispatchDidLoadMainResource(DocumentLoader*)
-{
- notImplemented();
-}
-
-void FrameLoaderClientEfl::revertToProvisionalState(DocumentLoader*)
-{
- m_hasRepresentation = true;
-}
-
void FrameLoaderClientEfl::willChangeTitle(DocumentLoader*)
{
// no need for, dispatchDidReceiveTitle is the right callback
@@ -686,10 +685,9 @@ bool FrameLoaderClientEfl::canShowMIMETypeAsHTML(const String& MIMEType) const
bool FrameLoaderClientEfl::canShowMIMEType(const String& MIMEType) const
{
- if (MIMETypeRegistry::isSupportedImageMIMEType(MIMEType))
- return true;
-
- if (MIMETypeRegistry::isSupportedNonImageMIMEType(MIMEType))
+ if (MIMETypeRegistry::isSupportedImageMIMEType(MIMEType)
+ || MIMETypeRegistry::isSupportedNonImageMIMEType(MIMEType)
+ || MIMETypeRegistry::isSupportedMediaMIMEType(MIMEType))
return true;
#if 0 // PluginDatabase is disabled until we have Plugin system done.
@@ -711,13 +709,10 @@ String FrameLoaderClientEfl::generatedMIMETypeForURLScheme(const String&) const
return String();
}
-void FrameLoaderClientEfl::finishedLoading(DocumentLoader* documentLoader)
+void FrameLoaderClientEfl::finishedLoading(DocumentLoader*)
{
- if (!m_pluginView) {
- if (m_hasRepresentation)
- documentLoader->writer()->setEncoding("", false);
+ if (!m_pluginView)
return;
- }
m_pluginView->didFinishLoading();
m_pluginView = 0;
m_hasSentResponseToPlugin = false;
@@ -751,12 +746,31 @@ void FrameLoaderClientEfl::dispatchDidReceiveContentLength(DocumentLoader*, unsi
void FrameLoaderClientEfl::dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier)
{
- notImplemented();
+ ewk_frame_load_resource_finished(m_frame, identifier);
+ evas_object_smart_callback_call(m_view, "load,resource,finished", &identifier);
}
-void FrameLoaderClientEfl::dispatchDidFailLoading(DocumentLoader* loader, unsigned long identifier, const ResourceError& err)
+void FrameLoaderClientEfl::dispatchDidFailLoading(DocumentLoader*, unsigned long identifier, const ResourceError& err)
{
- notImplemented();
+ Ewk_Frame_Load_Error error;
+ CString errorDomain = err.domain().utf8();
+ CString errorDescription = err.localizedDescription().utf8();
+ CString failingUrl = err.failingURL().utf8();
+
+ DBG("ewkFrame=%p, resource=%ld, error=%s (%d, cancellation=%hhu) \"%s\", url=%s",
+ m_frame, identifier, errorDomain.data(), err.errorCode(), err.isCancellation(),
+ errorDescription.data(), failingUrl.data());
+
+ error.code = err.errorCode();
+ error.is_cancellation = err.isCancellation();
+ error.domain = errorDomain.data();
+ error.description = errorDescription.data();
+ error.failing_url = failingUrl.data();
+ error.resource_identifier = identifier;
+ error.frame = m_frame;
+
+ ewk_frame_load_resource_failed(m_frame, &error);
+ evas_object_smart_callback_call(m_view, "load,resource,failed", &error);
}
bool FrameLoaderClientEfl::dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length)
@@ -777,15 +791,18 @@ void FrameLoaderClientEfl::dispatchDidFailProvisionalLoad(const ResourceError& e
void FrameLoaderClientEfl::dispatchDidFailLoad(const ResourceError& err)
{
- if (!shouldFallBack(err))
- return;
-
- m_loadError = err;
ewk_frame_load_error(m_frame,
- m_loadError.domain().utf8().data(),
- m_loadError.errorCode(), m_loadError.isCancellation(),
- m_loadError.localizedDescription().utf8().data(),
- m_loadError.failingURL().utf8().data());
+ err.domain().utf8().data(),
+ err.errorCode(), err.isCancellation(),
+ err.localizedDescription().utf8().data(),
+ err.failingURL().utf8().data());
+
+ ewk_frame_load_finished(m_frame,
+ err.domain().utf8().data(),
+ err.errorCode(),
+ err.isCancellation(),
+ err.localizedDescription().utf8().data(),
+ err.failingURL().utf8().data());
}
void FrameLoaderClientEfl::download(ResourceHandle*, const ResourceRequest& request, const ResourceResponse&)
@@ -809,11 +826,16 @@ enum {
WebKitErrorCannotFindPlugIn = 200,
WebKitErrorCannotLoadPlugIn = 201,
WebKitErrorJavaUnavailable = 202,
+ WebKitErrorPluginWillHandleLoad = 204
};
+// Domains used for ResourceError
+const char* const NSURLErrorDomain = "NSURLErrorDomain";
+const char* const WebKitErrorDomain = "WebKitErrorDomain";
+
ResourceError FrameLoaderClientEfl::cancelledError(const ResourceRequest& request)
{
- ResourceError error("Error", -999, request.url().string(),
+ ResourceError error(NSURLErrorDomain, -999, request.url().string(),
"Request cancelled");
error.setIsCancellation(true);
return error;
@@ -821,43 +843,43 @@ ResourceError FrameLoaderClientEfl::cancelledError(const ResourceRequest& reques
ResourceError FrameLoaderClientEfl::blockedError(const ResourceRequest& request)
{
- return ResourceError("Error", WebKitErrorCannotUseRestrictedPort, request.url().string(),
+ return ResourceError(WebKitErrorDomain, WebKitErrorCannotUseRestrictedPort, request.url().string(),
"Request blocked");
}
ResourceError FrameLoaderClientEfl::cannotShowURLError(const ResourceRequest& request)
{
- return ResourceError("Error", WebKitErrorCannotShowURL, request.url().string(),
+ return ResourceError(WebKitErrorDomain, WebKitErrorCannotShowURL, request.url().string(),
"Cannot show URL");
}
ResourceError FrameLoaderClientEfl::interruptedForPolicyChangeError(const ResourceRequest& request)
{
- return ResourceError("Error", WebKitErrorFrameLoadInterruptedByPolicyChange,
+ return ResourceError(WebKitErrorDomain, WebKitErrorFrameLoadInterruptedByPolicyChange,
request.url().string(), "Frame load interrupted by policy change");
}
ResourceError FrameLoaderClientEfl::cannotShowMIMETypeError(const ResourceResponse& response)
{
- return ResourceError("Error", WebKitErrorCannotShowMIMEType, response.url().string(),
+ return ResourceError(NSURLErrorDomain, WebKitErrorCannotShowMIMEType, response.url().string(),
"Cannot show mimetype");
}
ResourceError FrameLoaderClientEfl::fileDoesNotExistError(const ResourceResponse& response)
{
- return ResourceError("Error", -998 /* ### */, response.url().string(),
+ return ResourceError(NSURLErrorDomain, -998 /* ### */, response.url().string(),
"File does not exist");
}
-ResourceError FrameLoaderClientEfl::pluginWillHandleLoadError(const ResourceResponse&)
+ResourceError FrameLoaderClientEfl::pluginWillHandleLoadError(const ResourceResponse& response)
{
- notImplemented();
- return ResourceError("Error", 0, "", "");
+ return ResourceError(WebKitErrorDomain, WebKitErrorPluginWillHandleLoad, response.url().string(),
+ "Plugin will handle load");
}
bool FrameLoaderClientEfl::shouldFallBack(const ResourceError& error)
{
- return !(error.isCancellation() || (error.errorCode() == WebKitErrorFrameLoadInterruptedByPolicyChange));
+ return !(error.isCancellation() || error.errorCode() == WebKitErrorFrameLoadInterruptedByPolicyChange || error.errorCode() == WebKitErrorPluginWillHandleLoad);
}
bool FrameLoaderClientEfl::canCachePage() const
diff --git a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
index af90a6f32..67061142f 100644
--- a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
+++ b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
@@ -61,7 +61,7 @@ class FrameLoaderClientEfl : public FrameLoaderClient {
void callPolicyFunction(FramePolicyFunction, PolicyAction);
- virtual void makeRepresentation(DocumentLoader*);
+ virtual void makeRepresentation(DocumentLoader*) { }
virtual void forceLayout();
virtual void forceLayoutForNonHTML();
@@ -119,11 +119,10 @@ class FrameLoaderClientEfl : public FrameLoaderClient {
virtual void dispatchUnableToImplementPolicy(const ResourceError&);
- virtual void dispatchWillSendSubmitEvent(HTMLFormElement*) { }
+ virtual void dispatchWillSendSubmitEvent(WTF::PassRefPtr<FormState>) { }
virtual void dispatchWillSubmitForm(FramePolicyFunction, WTF::PassRefPtr<FormState>);
- virtual void dispatchDidLoadMainResource(DocumentLoader*);
- virtual void revertToProvisionalState(DocumentLoader*);
+ virtual void revertToProvisionalState(DocumentLoader*) { }
virtual void setMainDocumentError(DocumentLoader*, const ResourceError&);
virtual void postProgressStartedNotification();
@@ -132,8 +131,6 @@ class FrameLoaderClientEfl : public FrameLoaderClient {
virtual PassRefPtr<Frame> createFrame(const KURL&, const String& name, HTMLFrameOwnerElement*,
const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
- virtual void didTransferChildFrameToNewDocument(Page*);
- virtual void transferLoadingResourceFromPage(WebCore::ResourceLoader*, const ResourceRequest&, WebCore::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);
@@ -220,7 +217,6 @@ class FrameLoaderClientEfl : public FrameLoaderClient {
// Plugin view to redirect data to
PluginView* m_pluginView;
bool m_hasSentResponseToPlugin;
- bool m_hasRepresentation;
};
}
diff --git a/Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.cpp
new file mode 100644
index 000000000..66d5a0046
--- /dev/null
+++ b/Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.cpp
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "NetworkInfoClientEfl.h"
+
+#if ENABLE(NETWORK_INFO)
+#include "NetworkInfo.h"
+#include "NotImplemented.h"
+#include <wtf/text/CString.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+NetworkInfoClientEfl::NetworkInfoClientEfl()
+ : m_controller(0)
+{
+}
+
+NetworkInfoClientEfl::~NetworkInfoClientEfl()
+{
+}
+
+void NetworkInfoClientEfl::startUpdating()
+{
+ notImplemented();
+}
+
+void NetworkInfoClientEfl::stopUpdating()
+{
+ notImplemented();
+}
+
+unsigned int NetworkInfoClientEfl::bandwidth() const
+{
+ notImplemented();
+ return 10; // MB/s
+}
+
+bool NetworkInfoClientEfl::metered() const
+{
+ notImplemented();
+ return false;
+}
+
+}
+#endif
diff --git a/Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.h b/Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.h
new file mode 100644
index 000000000..979710369
--- /dev/null
+++ b/Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef NetworkInfoClientEfl_h
+#define NetworkInfoClientEfl_h
+
+#include "NetworkInfoClient.h"
+#include "NetworkInfoController.h"
+
+namespace WebCore {
+class NetworkInfoClientEfl : public WebCore::NetworkInfoClient {
+public:
+ NetworkInfoClientEfl();
+ ~NetworkInfoClientEfl();
+
+ virtual void startUpdating();
+ virtual void stopUpdating();
+
+ virtual unsigned int bandwidth() const;
+ virtual bool metered() const;
+
+private:
+
+ NetworkInfoController* m_controller;
+};
+}
+
+#endif // NetworkInfoClientEfl_h
diff --git a/Source/WebKit/efl/WebCoreSupport/NotificationPresenterClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/NotificationPresenterClientEfl.cpp
index ba466f5c4..e33735134 100644
--- a/Source/WebKit/efl/WebCoreSupport/NotificationPresenterClientEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/NotificationPresenterClientEfl.cpp
@@ -20,7 +20,7 @@
#include "config.h"
#include "NotificationPresenterClientEfl.h"
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#include "NotImplemented.h"
namespace WebCore {
diff --git a/Source/WebKit/efl/WebCoreSupport/NotificationPresenterClientEfl.h b/Source/WebKit/efl/WebCoreSupport/NotificationPresenterClientEfl.h
index 260c442ed..55174e707 100644
--- a/Source/WebKit/efl/WebCoreSupport/NotificationPresenterClientEfl.h
+++ b/Source/WebKit/efl/WebCoreSupport/NotificationPresenterClientEfl.h
@@ -20,7 +20,7 @@
#ifndef NotificationPresenterClientEfl_h
#define NotificationPresenterClientEfl_h
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#include "Notification.h"
#include "NotificationPresenter.h"
diff --git a/Source/WebKit/efl/WebCoreSupport/PageClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/PageClientEfl.cpp
new file mode 100644
index 000000000..25fbd750c
--- /dev/null
+++ b/Source/WebKit/efl/WebCoreSupport/PageClientEfl.cpp
@@ -0,0 +1,49 @@
+/*
+ Copyright (C) 2012 Samsung Electronics
+
+ 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.1 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 "PageClientEfl.h"
+
+#include "ewk_private.h"
+
+namespace WebCore {
+class IntRect;
+}
+
+PageClientEfl::PageClientEfl(Evas_Object* view)
+ : m_view(view)
+{
+ ASSERT(m_view);
+}
+
+PageClientEfl::~PageClientEfl()
+{
+}
+
+#if USE(ACCELERATED_COMPOSITING)
+bool PageClientEfl::createEvasObjectForAcceleratedCompositing(Evas_Native_Surface* nativeSurface, const IntRect& rect)
+{
+ return ewk_view_accelerated_compositing_object_create(m_view, nativeSurface, rect);
+}
+
+GraphicsContext3D* PageClientEfl::acceleratedCompositingContext()
+{
+ return ewk_view_accelerated_compositing_context_get(m_view);
+}
+#endif
diff --git a/Source/WebKit/efl/WebCoreSupport/PageClientEfl.h b/Source/WebKit/efl/WebCoreSupport/PageClientEfl.h
new file mode 100644
index 000000000..b95823c7a
--- /dev/null
+++ b/Source/WebKit/efl/WebCoreSupport/PageClientEfl.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * 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.1 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 PageClientEfl_h
+#define PageClientEfl_h
+
+#include "IntRect.h"
+
+typedef struct _Evas_Native_Surface Evas_Native_Surface;
+typedef struct _Evas_Object Evas_Object;
+
+namespace WebCore {
+class GraphicsContext3D;
+} // namespace WebCore
+
+class PageClientEfl {
+public:
+ PageClientEfl(Evas_Object* view);
+ virtual ~PageClientEfl();
+
+#if USE(ACCELERATED_COMPOSITING)
+ bool createEvasObjectForAcceleratedCompositing(Evas_Native_Surface*, const IntRect&);
+ GraphicsContext3D* acceleratedCompositingContext();
+#endif
+
+ Evas_Object* view() { return m_view; }
+
+protected:
+ Evas_Object* m_view;
+};
+
+#endif // PageClientEfl_h
diff --git a/Source/WebKit/efl/ewk/EWebKit.h b/Source/WebKit/efl/ewk/EWebKit.h
index 0ffb51cac..32fe2b4fb 100644
--- a/Source/WebKit/efl/ewk/EWebKit.h
+++ b/Source/WebKit/efl/ewk/EWebKit.h
@@ -37,6 +37,7 @@
#include "ewk_js.h"
#include "ewk_main.h"
#include "ewk_network.h"
+#include "ewk_security_origin.h"
#include "ewk_security_policy.h"
#include "ewk_settings.h"
#include "ewk_view.h"
diff --git a/Source/WebKit/efl/ewk/ewk_cookies.cpp b/Source/WebKit/efl/ewk/ewk_cookies.cpp
index 6ef203478..546651390 100644
--- a/Source/WebKit/efl/ewk/ewk_cookies.cpp
+++ b/Source/WebKit/efl/ewk/ewk_cookies.cpp
@@ -47,7 +47,7 @@ Eina_Bool ewk_cookies_file_set(const char* filename)
if (oldjar)
soup_session_remove_feature(session, oldjar);
- WebCore::setDefaultCookieJar(cookieJar);
+ WebCore::setSoupCookieJar(cookieJar);
soup_session_add_feature(session, SOUP_SESSION_FEATURE(cookieJar));
return true;
@@ -57,7 +57,7 @@ void ewk_cookies_clear(void)
{
GSList* list;
GSList* p;
- SoupCookieJar* cookieJar = WebCore::defaultCookieJar();
+ SoupCookieJar* cookieJar = WebCore::soupCookieJar();
list = soup_cookie_jar_all_cookies(cookieJar);
for (p = list; p; p = p->next)
@@ -71,7 +71,7 @@ Eina_List* ewk_cookies_get_all(void)
Eina_List* result = 0;
GSList* list;
GSList* p;
- SoupCookieJar* cookieJar = WebCore::defaultCookieJar();
+ SoupCookieJar* cookieJar = WebCore::soupCookieJar();
list = soup_cookie_jar_all_cookies(cookieJar);
for (p = list; p; p = p->next) {
@@ -97,7 +97,7 @@ void ewk_cookies_cookie_del(Ewk_Cookie* cookie)
EINA_SAFETY_ON_NULL_RETURN(cookie);
GSList* list;
GSList* p;
- SoupCookieJar* cookieJar = WebCore::defaultCookieJar();
+ SoupCookieJar* cookieJar = WebCore::soupCookieJar();
SoupCookie* cookie1 = soup_cookie_new(
cookie->name, cookie->value, cookie->domain, cookie->path, -1);
@@ -126,7 +126,7 @@ void ewk_cookies_cookie_free(Ewk_Cookie* cookie)
void ewk_cookies_policy_set(Ewk_Cookie_Policy cookiePolicy)
{
- SoupCookieJar* cookieJar = WebCore::defaultCookieJar();
+ SoupCookieJar* cookieJar = WebCore::soupCookieJar();
SoupCookieJarAcceptPolicy policy;
policy = SOUP_COOKIE_JAR_ACCEPT_ALWAYS;
@@ -148,7 +148,7 @@ void ewk_cookies_policy_set(Ewk_Cookie_Policy cookiePolicy)
Ewk_Cookie_Policy ewk_cookies_policy_get(void)
{
Ewk_Cookie_Policy ewkPolicy = EWK_COOKIE_JAR_ACCEPT_ALWAYS;
- SoupCookieJar* cookieJar = WebCore::defaultCookieJar();
+ SoupCookieJar* cookieJar = WebCore::soupCookieJar();
SoupCookieJarAcceptPolicy policy;
policy = soup_cookie_jar_get_accept_policy(cookieJar);
diff --git a/Source/WebKit/efl/ewk/ewk_cookies.h b/Source/WebKit/efl/ewk/ewk_cookies.h
index 29ac12182..2af57a0eb 100644
--- a/Source/WebKit/efl/ewk/ewk_cookies.h
+++ b/Source/WebKit/efl/ewk/ewk_cookies.h
@@ -57,7 +57,7 @@ struct _Ewk_Cookie {
/// @c EINA_TRUE if the cookie should only be tranferred over SSL
Eina_Bool secure;
/// @c EINA_TRUE if the cookie should not be exposed to scripts
- Eina_Bool http_only;
+ Eina_Bool http_only;
};
/// Creates a type name for the _Ewk_Cookie.
typedef struct _Ewk_Cookie Ewk_Cookie;
@@ -79,7 +79,7 @@ enum _Ewk_Cookie_Policy {
typedef enum _Ewk_Cookie_Policy Ewk_Cookie_Policy;
/************************** Exported functions ***********************/
-
+
/**
* Sets the path where the cookies are going to be stored.
*
diff --git a/Source/WebKit/efl/ewk/ewk_frame.cpp b/Source/WebKit/efl/ewk/ewk_frame.cpp
index c229f8090..24a12eac9 100644
--- a/Source/WebKit/efl/ewk/ewk_frame.cpp
+++ b/Source/WebKit/efl/ewk/ewk_frame.cpp
@@ -24,7 +24,6 @@
#include "config.h"
#include "ewk_frame.h"
-#include "Assertions.h"
#include "DocumentLoader.h"
#include "DocumentMarkerController.h"
#include "EventHandler.h"
@@ -46,7 +45,6 @@
#include "PlatformTouchEvent.h"
#include "PlatformWheelEvent.h"
#include "ProgressTracker.h"
-#include "RefPtr.h"
#include "ResourceRequest.h"
#include "ScriptValue.h"
#include "SharedBuffer.h"
@@ -57,6 +55,8 @@
#include <Eina.h>
#include <Evas.h>
#include <eina_safety_checks.h>
+#include <wtf/Assertions.h>
+#include <wtf/RefPtr.h>
#include <wtf/text/CString.h>
static const char EWK_FRAME_TYPE_STR[] = "EWK_Frame";
@@ -285,6 +285,16 @@ Evas_Object* ewk_frame_view_get(const Evas_Object* ewkFrame)
return smartData->view;
}
+Ewk_Security_Origin* ewk_frame_security_origin_get(const Evas_Object *ewkFrame)
+{
+ EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData, 0);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->frame, 0);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->frame->document(), 0);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->frame->document()->securityOrigin(), 0);
+
+ return ewk_security_origin_new(smartData->frame->document()->securityOrigin());
+}
+
Eina_Iterator* ewk_frame_children_iterator_new(Evas_Object* ewkFrame)
{
EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData, 0);
@@ -851,7 +861,7 @@ Eina_Bool ewk_frame_focused_element_geometry_get(const Evas_Object *ewkFrame, in
WebCore::Node* focusedNode = document->focusedNode();
if (!focusedNode)
return false;
- WebCore::IntRect nodeRect = focusedNode->getRect();
+ WebCore::IntRect nodeRect = focusedNode->getPixelSnappedRect();
if (x)
*x = nodeRect.x();
if (y)
@@ -1203,19 +1213,59 @@ void ewk_frame_core_gone(Evas_Object* ewkFrame)
/**
* @internal
+ * Reports cancellation of a client redirect.
+ *
+ * @param ewkFrame Frame.
+ *
+ * Emits signal: "redirect,cancelled"
+ */
+void ewk_frame_redirect_cancelled(Evas_Object* ewkFrame)
+{
+ evas_object_smart_callback_call(ewkFrame, "redirect,cancelled", 0);
+}
+
+/**
+ * @internal
+ * Reports receipt of server redirect for provisional load.
+ *
+ * @param ewkFrame Frame.
+ *
+ * Emits signal: "redirect,load,provisional"
+ */
+void ewk_frame_redirect_provisional_load(Evas_Object* ewkFrame)
+{
+ evas_object_smart_callback_call(ewkFrame, "redirect,load,provisional", 0);
+}
+
+/**
+ * @internal
+ * Reports that a client redirect will be performed.
+ *
+ * @param ewkFrame Frame.
+ * @param url Redirection URL.
+ *
+ * Emits signal: "redirect,requested"
+ */
+void ewk_frame_redirect_requested(Evas_Object* ewkFrame, const char* url)
+{
+ evas_object_smart_callback_call(ewkFrame, "redirect,requested", (void*)url);
+}
+
+/**
+ * @internal
* Reports a resource will be requested. User may override behavior of webkit by
* changing values in @param request.
*
* @param ewkFrame Frame.
- * @param request Request details that user may override. Whenever values on
- * this struct changes, it must be properly malloc'd as it will be freed
- * afterwards.
+ * @param messages Messages containing the request details that user may override and a
+ * possible redirect reponse. Whenever values on this struct changes, it must be properly
+ * malloc'd as it will be freed afterwards.
*
* Emits signal: "resource,request,willsend"
*/
-void ewk_frame_request_will_send(Evas_Object* ewkFrame, Ewk_Frame_Resource_Request* request)
+void ewk_frame_request_will_send(Evas_Object* ewkFrame, Ewk_Frame_Resource_Messages* messages)
{
- evas_object_smart_callback_call(ewkFrame, "resource,request,willsend", request);
+ evas_object_smart_callback_call(ewkFrame, "resource,request,willsend", messages);
}
/**
@@ -1234,6 +1284,20 @@ void ewk_frame_request_assign_identifier(Evas_Object* ewkFrame, const Ewk_Frame_
/**
* @internal
+ * Reports that a response to a resource request was received.
+ *
+ * @param ewkFrame Frame.
+ * @param request Response details. No changes are allowed to fields.
+ *
+ * Emits signal: "resource,response,received"
+ */
+void ewk_frame_response_received(Evas_Object* ewkFrame, Ewk_Frame_Resource_Response* response)
+{
+ evas_object_smart_callback_call(ewkFrame, "resource,response,received", response);
+}
+
+/**
+ * @internal
* Reports that first navigation occurred
*
* @param ewkFrame Frame.
@@ -1261,6 +1325,17 @@ void ewk_frame_view_state_save(Evas_Object* ewkFrame, WebCore::HistoryItem* item
/**
* @internal
+ * Reports the frame committed load.
+ *
+ * Emits signal: "load,committed" with no parameters.
+ */
+void ewk_frame_load_committed(Evas_Object* ewkFrame)
+{
+ evas_object_smart_callback_call(ewkFrame, "load,committed", 0);
+}
+
+/**
+ * @internal
* Reports the frame started loading something.
*
* Emits signal: "load,started" with no parameters.
@@ -1271,7 +1346,7 @@ void ewk_frame_load_started(Evas_Object* ewkFrame)
DBG("ewkFrame=%p", ewkFrame);
evas_object_smart_callback_call(ewkFrame, "load,started", 0);
EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData);
- ewk_view_load_started(smartData->view);
+ ewk_view_load_started(smartData->view, ewkFrame);
mainFrame = ewk_view_frame_main_get(smartData->view);
if (mainFrame == ewkFrame)
@@ -1358,6 +1433,7 @@ void ewk_frame_load_finished(Evas_Object* ewkFrame, const char* errorDomain, int
buffer.is_cancellation = isCancellation;
buffer.description = errorDescription;
buffer.failing_url = failingUrl;
+ buffer.resource_identifier = 0;
buffer.frame = ewkFrame;
error = &buffer;
}
@@ -1368,6 +1444,29 @@ void ewk_frame_load_finished(Evas_Object* ewkFrame, const char* errorDomain, int
/**
* @internal
+ * Reports resource load finished.
+ *
+ * Emits signal: "load,resource,finished" with the resource
+ * request identifier.
+ */
+void ewk_frame_load_resource_finished(Evas_Object* ewkFrame, unsigned long identifier)
+{
+ evas_object_smart_callback_call(ewkFrame, "load,resource,finished", &identifier);
+}
+
+/**
+ * @internal
+ * Reports resource load failure, with error information.
+ *
+ * Emits signal: "load,resource,failed" with the error information.
+ */
+void ewk_frame_load_resource_failed(Evas_Object* ewkFrame, Ewk_Frame_Load_Error* error)
+{
+ evas_object_smart_callback_call(ewkFrame, "load,resource,failed", error);
+}
+
+/**
+ * @internal
* Reports load failed with error information.
*
* Emits signal: "load,error" with pointer to Ewk_Frame_Load_Error.
@@ -1387,6 +1486,7 @@ void ewk_frame_load_error(Evas_Object* ewkFrame, const char* errorDomain, int er
error.domain = errorDomain;
error.description = errorDescription;
error.failing_url = failingUrl;
+ error.resource_identifier = 0;
error.frame = ewkFrame;
evas_object_smart_callback_call(ewkFrame, "load,error", &error);
EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData);
@@ -1764,6 +1864,20 @@ void ewk_frame_mixed_content_run_set(Evas_Object* ewkFrame, bool hasRun)
}
}
+/**
+ * @internal
+ * Reports that reflected XSS is encountered in the page and suppressed.
+ *
+ * @param xssInfo Information received from the XSSAuditor when XSS is
+ * encountered in the page.
+ *
+ * Emits signal: "xss,detected" with pointer to Ewk_Frame_Xss_Notification.
+ */
+void ewk_frame_xss_detected(Evas_Object* ewkFrame, const Ewk_Frame_Xss_Notification* xssInfo)
+{
+ evas_object_smart_callback_call(ewkFrame, "xss,detected", (void*)xssInfo);
+}
+
namespace EWKPrivate {
WebCore::Frame* coreFrame(const Evas_Object* ewkFrame)
diff --git a/Source/WebKit/efl/ewk/ewk_frame.h b/Source/WebKit/efl/ewk/ewk_frame.h
index f74555e5a..08b4bc067 100644
--- a/Source/WebKit/efl/ewk/ewk_frame.h
+++ b/Source/WebKit/efl/ewk/ewk_frame.h
@@ -39,12 +39,17 @@
* were changed due new layout, script actions or any other events.
* - "editorclient,contents,changed", void: reports that editor client's
* contents were changed
+ * - "load,committed", void: reports load committed.
* - "load,document,finished", void: frame finished loading the document.
* - "load,error", const Ewk_Frame_Load_Error*: reports load failed
* and it gives a pointer to structure defining the error as an argument.
* - "load,finished", const Ewk_Frame_Load_Error*: reports load
* finished and it gives @c NULL on success or pointer to
* structure defining the error.
+ * - "load,resource,finished", unsigned long*: reports resource load finished and it gives
+ * a pointer to its identifier.
+ * - "load,resource,failed", Ewk_Frame_Load_Error*: reports resource load failure and it
+ * gives a pointer to structure defining the error as an argument.
* - "load,firstlayout,finished", void: frame finished first layout.
* - "load,nonemptylayout,finished", void: frame finished first
* non-empty layout.
@@ -55,18 +60,26 @@
* - "mixedcontent,displayed", void: frame has loaded and displayed mixed content.
* - "mixedcontent,run", void: frame has loaded and run mixed content.
* - "navigation,first", void: first navigation was occurred.
+ * - "redirect,cancelled", void: client redirect was cancelled.
+ * - "redirect,load,provisional", void: received server redirect for provisional load.
+ * - "redirect,requested", const char*: url of the client redirect that will be performed.
* - "resource,request,new", Ewk_Frame_Resource_Request*: reports that
* there's a new resource request.
- * - "resource,request,willsend", Ewk_Frame_Resource_Request*: a resource will
- * be requested.
+ * - "resource,request,willsend", Ewk_Frame_Resource_Messages*: a resource will be requested.
+ * and the possible redirect response.
+ * - "resource,response,received", Ewk_Frame_Resource_Response*: reports that a response
+ * to a resource request was received.
* - "state,save", void: frame's state will be saved as a history item.
* - "title,changed", const char*: title of the main frame was changed.
* - "uri,changed", const char*: uri of the main frame was changed.
+ * - "xss,detected", Ewk_Frame_Xss_Notification*: reflected XSS is encountered in the page and suppressed.
*/
#ifndef ewk_frame_h
#define ewk_frame_h
+#include "ewk_security_origin.h"
+
#include <Evas.h>
#ifdef __cplusplus
@@ -91,21 +104,64 @@ struct _Ewk_Frame_Load_Error {
const char *domain; /**< error domain name */
const char *description; /**< error description already localized */
const char *failing_url; /**< the url that failed to load */
+ unsigned long resource_identifier; /**< identifier of resource */
Evas_Object *frame; /**< frame where the failure happened */
};
/// Creates a type name for _Ewk_Frame_Resource_Request.
typedef struct _Ewk_Frame_Resource_Request Ewk_Frame_Resource_Request;
/**
- * @brief Structure used to report resource request.
+ * @brief Structure containing details about a resource request.
*
- * Details given before a resource is loaded on a given frame. It's used by
- * ewk_frame_request_will_send() to inform the details of a to-be-loaded
- * resource, allowing them to be overridden.
+ * Details given before a resource is loaded on a given frame. It's used in
+ * Ewk_Frame_Resource_Messages to inform about the details of a resource request.
*/
struct _Ewk_Frame_Resource_Request {
const char *url; /**< url of the resource */
+ const char *first_party; /**< first party for cookies, can not be changed */
+ const char *http_method; /**< http method, can not be changed */
const unsigned long identifier; /**< identifier of resource, can not be changed */
+ Evas_Object *frame; /**< frame where the resource is requested */
+ Eina_Bool is_main_frame_request; /** < indicates if the request is for the main frame */
+};
+
+/// Creates a type name for _Ewk_Frame_Resource_Response.
+typedef struct _Ewk_Frame_Resource_Response Ewk_Frame_Resource_Response;
+
+/**
+ * @brief Structure containing details about a response to a resource request.
+ *
+ * Details given in the response to a resource request. It's used by
+ * ewk_frame_response_received() to inform about the details of a response.
+ */
+struct _Ewk_Frame_Resource_Response {
+ const char *url; /**< url of the resource */
+ int status_code; /**< http status code */
+ unsigned long identifier; /**< identifier of resource */
+ const char *mime_type; /**< MIME type of the resource */
+};
+
+/// Creates a type name for _Ewk_Frame_Resource_Messages.
+typedef struct _Ewk_Frame_Resource_Messages Ewk_Frame_Resource_Messages;
+
+struct _Ewk_Frame_Resource_Messages {
+ Ewk_Frame_Resource_Request *request; /**< resource request */
+ Ewk_Frame_Resource_Response *redirect_response; /**< redirect response, can not be changed */
+};
+
+/// Creates a type name for Ewk_Frame_Xss_Notification.
+typedef struct _Ewk_Frame_Xss_Notification Ewk_Frame_Xss_Notification;
+
+/**
+ * @brief Structure used to report reflected XSS is encountered in the page.
+ *
+ * This structure contains information received from the XSSAuditor when reflected XSS
+ * is encountered in the page. The string is temporary reference and should @b not
+ * be used after the signal callback returns. If it's required, make a copy of it.
+ */
+struct _Ewk_Frame_Xss_Notification {
+ const char *insecure_url; /**< insecure url of the document */
+ Eina_Bool is_entire_page_blocked; /** < indicates if the entire page was blocked by XSSAuditor */
};
/// Enum containing hit test data types
@@ -201,6 +257,17 @@ typedef enum {
EAPI Evas_Object *ewk_frame_view_get(const Evas_Object *o);
/**
+ * Retrieves the Ewk_Security_Origin of this frame.
+ *
+ * The returned object should be freed by ewk_security_origin_free().
+ *
+ * @param o frame object to get the security origin
+ *
+ * @return security origin object
+ */
+EAPI Ewk_Security_Origin *ewk_frame_security_origin_get(const Evas_Object *o);
+
+/**
* Returns a new iterator over all direct children frames.
*
* Keep frame object intact while iteration happens otherwise frame
diff --git a/Source/WebKit/efl/ewk/ewk_history.cpp b/Source/WebKit/efl/ewk/ewk_history.cpp
index c0a0b185d..1a4e9b71f 100644
--- a/Source/WebKit/efl/ewk/ewk_history.cpp
+++ b/Source/WebKit/efl/ewk/ewk_history.cpp
@@ -341,7 +341,9 @@ cairo_surface_t* ewk_history_item_icon_surface_get(const Ewk_History_Item* item)
ERR("icon is NULL.");
return 0;
}
- return icon->nativeImageForCurrentFrame();
+
+ WebCore::NativeImageCairo* nativeImage = icon->nativeImageForCurrentFrame();
+ return nativeImage ? nativeImage->surface() : 0;
}
Evas_Object* ewk_history_item_icon_object_add(const Ewk_History_Item* item, Evas* canvas)
@@ -349,15 +351,14 @@ Evas_Object* ewk_history_item_icon_object_add(const Ewk_History_Item* item, Evas
EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, 0);
EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0);
WebCore::Image* icon = WebCore::iconDatabase().synchronousIconForPageURL(core->url(), WebCore::IntSize(16, 16));
- cairo_surface_t* surface;
if (!icon) {
ERR("icon is NULL.");
return 0;
}
- surface = icon->nativeImageForCurrentFrame();
- return ewk_util_image_from_cairo_surface_add(canvas, surface);
+ WebCore::NativeImageCairo* nativeImage = icon->nativeImageForCurrentFrame();
+ return nativeImage ? ewk_util_image_from_cairo_surface_add(canvas, nativeImage->surface()) : 0;
}
Eina_Bool ewk_history_item_page_cache_exists(const Ewk_History_Item* item)
diff --git a/Source/WebKit/efl/ewk/ewk_private.h b/Source/WebKit/efl/ewk/ewk_private.h
index b4a8dd936..26d448d0e 100644
--- a/Source/WebKit/efl/ewk/ewk_private.h
+++ b/Source/WebKit/efl/ewk/ewk_private.h
@@ -36,6 +36,9 @@
#include "ewk_js.h"
#include "ewk_view.h"
#include <Evas.h>
+#if USE(ACCELERATED_COMPOSITING)
+#include <Evas_GL.h>
+#endif
#include <wtf/PassRefPtr.h>
#include <wtf/Vector.h>
@@ -74,6 +77,15 @@ namespace WebCore {
struct PopupMenuClient;
struct ContextMenu;
struct ContextMenuItem;
+#if ENABLE(INPUT_TYPE_COLOR)
+struct Color;
+struct ColorChooserClient;
+#endif
+#if USE(ACCELERATED_COMPOSITING)
+class GraphicsContext3D;
+class GraphicsLayer;
+#endif
+class SecurityOrigin;
}
struct Ewk_Window_Object_Cleared_Event {
@@ -87,6 +99,7 @@ namespace EWKPrivate {
WebCore::Frame *coreFrame(const Evas_Object *ewkFrame);
WebCore::Page *corePage(const Evas_Object *ewkView);
WebCore::HistoryItem *coreHistoryItem(const Ewk_History_Item *ewkHistoryItem);
+PlatformPageClient corePageClient(Evas_Object* ewkView);
Evas_Object* kitFrame(const WebCore::Frame* coreFrame);
@@ -97,7 +110,7 @@ void ewk_view_input_method_state_set(Evas_Object* ewkView, bool active);
void ewk_view_title_set(Evas_Object* ewkView, const char* title);
void ewk_view_uri_changed(Evas_Object* ewkView);
void ewk_view_load_document_finished(Evas_Object* ewkView, Evas_Object* frame);
-void ewk_view_load_started(Evas_Object* ewkView);
+void ewk_view_load_started(Evas_Object* ewkView, Evas_Object* ewkFrame);
void ewk_view_load_provisional(Evas_Object* ewkView);
void ewk_view_frame_main_load_started(Evas_Object* ewkView);
void ewk_view_frame_main_cleared(Evas_Object* ewkView);
@@ -106,6 +119,7 @@ void ewk_view_load_finished(Evas_Object* ewkView, const Ewk_Frame_Load_Error* er
void ewk_view_load_error(Evas_Object* ewkView, const Ewk_Frame_Load_Error* error);
void ewk_view_load_progress_changed(Evas_Object* ewkView);
void ewk_view_load_show(Evas_Object* ewkView);
+void ewk_view_onload_event(Evas_Object* ewkView, Evas_Object* frame);
void ewk_view_restore_state(Evas_Object* ewkView, Evas_Object* frame);
Evas_Object* ewk_view_window_create(Evas_Object* ewkView, bool javascript, const WebCore::WindowFeatures* coreFeatures);
void ewk_view_window_close(Evas_Object* ewkView);
@@ -146,6 +160,11 @@ WTF::PassRefPtr<WebCore::Frame> ewk_view_frame_create(Evas_Object* ewkView, Evas
WTF::PassRefPtr<WebCore::Widget> ewk_view_plugin_create(Evas_Object* ewkView, Evas_Object* frame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually);
+#if ENABLE(INPUT_TYPE_COLOR)
+void ewk_view_color_chooser_new(Evas_Object* ewkView, WebCore::ColorChooserClient* client, const WebCore::Color& initialColor);
+void ewk_view_color_chooser_changed(Evas_Object* ewkView, const WebCore::Color& newColor);
+#endif
+
void ewk_view_popup_new(Evas_Object* ewkView, WebCore::PopupMenuClient* client, int selected, const WebCore::IntRect& rect);
void ewk_view_viewport_attributes_set(Evas_Object* ewkView, const WebCore::ViewportArguments& arguments);
@@ -194,17 +213,24 @@ void ewk_frame_view_set(Evas_Object* ewkFrame, Evas_Object* newParent);
void ewk_frame_core_gone(Evas_Object* ewkFrame);
+void ewk_frame_load_committed(Evas_Object* ewkFrame);
void ewk_frame_load_started(Evas_Object* ewkFrame);
void ewk_frame_load_provisional(Evas_Object* ewkFrame);
void ewk_frame_load_firstlayout_finished(Evas_Object* ewkFrame);
void ewk_frame_load_firstlayout_nonempty_finished(Evas_Object* ewkFrame);
void ewk_frame_load_document_finished(Evas_Object* ewkFrame);
void ewk_frame_load_finished(Evas_Object* ewkFrame, const char* errorDomain, int errorCode, bool isCancellation, const char* errorDescription, const char* failingUrl);
+void ewk_frame_load_resource_finished(Evas_Object* ewkFrame, unsigned long identifier);
+void ewk_frame_load_resource_failed(Evas_Object* ewkFrame, Ewk_Frame_Load_Error* error);
void ewk_frame_load_error(Evas_Object* ewkFrame, const char* errorDomain, int errorCode, bool isCancellation, const char* errorDescription, const char* failingUrl);
void ewk_frame_load_progress_changed(Evas_Object* ewkFrame);
-void ewk_frame_request_will_send(Evas_Object* ewkFrame, Ewk_Frame_Resource_Request* request);
+void ewk_frame_redirect_cancelled(Evas_Object* ewkFrame);
+void ewk_frame_redirect_provisional_load(Evas_Object* ewkFrame);
+void ewk_frame_redirect_requested(Evas_Object* ewkFrame, const char* url);
+void ewk_frame_request_will_send(Evas_Object* ewkFrame, Ewk_Frame_Resource_Messages* messages);
void ewk_frame_request_assign_identifier(Evas_Object* ewkFrame, const Ewk_Frame_Resource_Request* request);
+void ewk_frame_response_received(Evas_Object* ewkFrame, Ewk_Frame_Resource_Response* response);
void ewk_frame_view_state_save(Evas_Object* ewkFrame, WebCore::HistoryItem* item);
void ewk_frame_did_perform_first_navigation(Evas_Object* ewkFrame);
@@ -233,5 +259,13 @@ void ewk_frame_mixed_content_displayed_set(Evas_Object* ewkFrame, bool hasDispla
void ewk_frame_mixed_content_run_set(Evas_Object* ewkFrame, bool hasRun);
void ewk_view_mixed_content_displayed_set(Evas_Object* ewkView, bool hasDisplayed);
void ewk_view_mixed_content_run_set(Evas_Object* ewkView, bool hasRun);
+void ewk_frame_xss_detected(Evas_Object* ewkFrame, const Ewk_Frame_Xss_Notification* xssInfo);
+
+Ewk_Security_Origin* ewk_security_origin_new(WebCore::SecurityOrigin* origin);
+
+#if USE(ACCELERATED_COMPOSITING)
+bool ewk_view_accelerated_compositing_object_create(Evas_Object* ewkView, Evas_Native_Surface* nativeSurface, const WebCore::IntRect& rect);
+WebCore::GraphicsContext3D* ewk_view_accelerated_compositing_context_get(Evas_Object* ewkView);
+#endif
#endif // ewk_private_h
diff --git a/Source/WebKit/efl/ewk/ewk_security_origin.cpp b/Source/WebKit/efl/ewk/ewk_security_origin.cpp
new file mode 100644
index 000000000..cd1f81526
--- /dev/null
+++ b/Source/WebKit/efl/ewk/ewk_security_origin.cpp
@@ -0,0 +1,109 @@
+/*
+ Copyright (C) 2012 Intel Corporation
+
+ 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 "ewk_security_origin.h"
+
+#include "DatabaseTracker.h"
+#include "SecurityOrigin.h"
+#include "ewk_private.h"
+#include <Eina.h>
+#include <wtf/RefPtr.h>
+#include <wtf/text/CString.h>
+
+struct _Ewk_Security_Origin {
+ RefPtr<WebCore::SecurityOrigin> securityOrigin;
+ const char* protocol;
+ const char* host;
+};
+
+const char* ewk_security_origin_protocol_get(Ewk_Security_Origin* origin)
+{
+ if (!origin->protocol)
+ origin->protocol = eina_stringshare_add(origin->securityOrigin->protocol().utf8().data());
+
+ return origin->protocol;
+}
+
+const char* ewk_security_origin_host_get(Ewk_Security_Origin* origin)
+{
+ if (!origin->host)
+ origin->host = eina_stringshare_add(origin->securityOrigin->host().utf8().data());
+
+ return origin->host;
+}
+
+uint32_t ewk_security_origin_port_get(const Ewk_Security_Origin* origin)
+{
+ return origin->securityOrigin->port();
+}
+
+uint64_t ewk_security_origin_web_database_usage_get(const Ewk_Security_Origin* origin)
+{
+#if ENABLE(SQL_DATABASE)
+ return WebCore::DatabaseTracker::tracker().usageForOrigin(origin->securityOrigin.get());
+#else
+ return 0;
+#endif
+}
+
+uint64_t ewk_security_origin_web_database_quota_get(const Ewk_Security_Origin* origin)
+{
+#if ENABLE(SQL_DATABASE)
+ return WebCore::DatabaseTracker::tracker().quotaForOrigin(origin->securityOrigin.get());
+#else
+ return 0;
+#endif
+}
+
+void ewk_security_origin_web_database_quota_set(const Ewk_Security_Origin* origin, uint64_t quota)
+{
+#if ENABLE(SQL_DATABASE)
+ WebCore::DatabaseTracker::tracker().setQuota(origin->securityOrigin.get(), quota);
+#endif
+}
+
+void ewk_security_origin_free(Ewk_Security_Origin* origin)
+{
+ origin->securityOrigin = 0;
+ eina_stringshare_del(origin->host);
+ eina_stringshare_del(origin->protocol);
+
+ delete origin;
+}
+
+/**
+ * @internal
+ * Creates a EWK wrapper for WebCore Security Origin object.
+ *
+ * @param coreOrigin WebCore Security Origin object
+ *
+ * @return a EWK wrapper of WebCore Security Origin object which should be
+ * freed by ewk_security_origin_free()
+ */
+Ewk_Security_Origin* ewk_security_origin_new(WebCore::SecurityOrigin* coreOrigin)
+{
+ Ewk_Security_Origin* origin = new Ewk_Security_Origin;
+
+ origin->securityOrigin = coreOrigin;
+ origin->host = 0;
+ origin->protocol = 0;
+
+ return origin;
+}
diff --git a/Source/WebKit/efl/ewk/ewk_security_origin.h b/Source/WebKit/efl/ewk/ewk_security_origin.h
new file mode 100644
index 000000000..86167f3c8
--- /dev/null
+++ b/Source/WebKit/efl/ewk/ewk_security_origin.h
@@ -0,0 +1,122 @@
+/*
+ Copyright (C) 2012 Intel Corporation
+
+ 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.
+*/
+
+/**
+ * @file ewk_security_origin.h
+ * @brief Security Origin API.
+ *
+ * Security Origin is the mechanism that defines the access limits of a website.
+ * Based on information such as domain, protocol and port, you can grant or not
+ * authorization for accessing data and performing certain tasks. Database quota
+ * can also be defined based on the security origin.
+ *
+ * The database related functions will do nothing if WebKit is built without Web
+ * SQL Database support.
+ */
+
+#ifndef ewk_security_origin_h
+#define ewk_security_origin_h
+
+#include <Evas.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _Ewk_Security_Origin Ewk_Security_Origin;
+
+/**
+ * Returns the protocol of the security origin.
+ *
+ * @param o security origin object
+ *
+ * It returns a internal string which should not
+ * be modified. The string is guaranteed to be stringshared.
+ *
+ * @return the protocol scheme
+ */
+EAPI const char *ewk_security_origin_protocol_get(Ewk_Security_Origin *o);
+
+/**
+ * Returns the host of the security origin.
+ *
+ * It returns a internal string which should not
+ * be modified. The string is guaranteed to be stringshared.
+ *
+ * @param o security origin object
+ *
+ * @return the host domain
+ */
+EAPI const char *ewk_security_origin_host_get(Ewk_Security_Origin *o);
+
+/**
+ * Returns the port of the security origin.
+ *
+ * @param o security origin object
+ *
+ * @return the port
+ */
+EAPI uint32_t ewk_security_origin_port_get(const Ewk_Security_Origin *o);
+
+/**
+ * Retrieves the usage of a database for a security origin.
+ *
+ * This function won't work if Web SQL Database was not enabled when
+ * building WebKit and will just return 0.
+ *
+ * @param o security origin object
+ *
+ * @return the usage in bytes
+ */
+EAPI uint64_t ewk_security_origin_web_database_usage_get(const Ewk_Security_Origin *o);
+
+/**
+ * Retrieves the quota of a database for a security origin.
+ *
+ * This function won't work if Web SQL Database was not enabled when
+ * building WebKit and will just return 0.
+ *
+ * @param o security origin object
+ *
+ * @return the quota in bytes
+ */
+EAPI uint64_t ewk_security_origin_web_database_quota_get(const Ewk_Security_Origin *o);
+
+/**
+ * Sets the database usage quota for a security origin.
+ *
+ * This function won't work if Web SQL Database was not enabled when
+ * building WebKit.
+ *
+ * @param o security origin object
+ * @param quota the usage quota in bytes
+ */
+EAPI void ewk_security_origin_web_database_quota_set(const Ewk_Security_Origin *o, uint64_t quota);
+
+/**
+ * Release all resources allocated by a security origin object.
+ *
+ * @param o security origin object
+ */
+EAPI void ewk_security_origin_free(Ewk_Security_Origin *o);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // ewk_security_origin_h
diff --git a/Source/WebKit/efl/ewk/ewk_settings.cpp b/Source/WebKit/efl/ewk/ewk_settings.cpp
index d13b39e7e..7866cde47 100644
--- a/Source/WebKit/efl/ewk/ewk_settings.cpp
+++ b/Source/WebKit/efl/ewk/ewk_settings.cpp
@@ -225,25 +225,25 @@ cairo_surface_t* ewk_settings_icon_database_icon_surface_get(const char* url)
return 0;
}
- return icon->nativeImageForCurrentFrame();
+ WebCore::NativeImageCairo* nativeImage = icon->nativeImageForCurrentFrame();
+ return nativeImage ? nativeImage->surface() : 0;
}
-Evas_Object* ewk_settings_icon_database_icon_object_add(const char* url, Evas* canvas)
+Evas_Object* ewk_settings_icon_database_icon_object_get(const char* url, Evas* canvas)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0);
EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0);
WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(url));
WebCore::Image* icon = WebCore::iconDatabase().synchronousIconForPageURL(kurl.string(), WebCore::IntSize(16, 16));
- cairo_surface_t* surface;
if (!icon) {
ERR("no icon for url %s", url);
return 0;
}
- surface = icon->nativeImageForCurrentFrame();
- return ewk_util_image_from_cairo_surface_add(canvas, surface);
+ WebCore::NativeImageCairo* nativeImage = icon->nativeImageForCurrentFrame();
+ return nativeImage ? ewk_util_image_from_cairo_surface_add(canvas, nativeImage->surface()) : 0;
}
void ewk_settings_object_cache_capacity_set(unsigned minDeadCapacity, unsigned maxDeadCapacity, unsigned totalCapacity)
diff --git a/Source/WebKit/efl/ewk/ewk_settings.h b/Source/WebKit/efl/ewk/ewk_settings.h
index cce9a5aa7..8c2200e07 100644
--- a/Source/WebKit/efl/ewk/ewk_settings.h
+++ b/Source/WebKit/efl/ewk/ewk_settings.h
@@ -175,7 +175,7 @@ EAPI Eina_Bool ewk_settings_icon_database_clear(void);
EAPI cairo_surface_t *ewk_settings_icon_database_icon_surface_get(const char *url);
/**
- * Creates Evas_Object of type image representing the given URL.
+ * Gets image representing the given URL.
*
* This is an utility function that creates an Evas_Object of type
* image set to have fill always match object size
@@ -184,13 +184,16 @@ EAPI cairo_surface_t *ewk_settings_icon_database_icon_surface_get(const char *ur
* @note In order to have this working, one must open icon database
* with ewk_settings_icon_database_path_set().
*
+ * @note The "load,finished" signal doesn't guarantee that icons are completely loaded and
+ * saved to database. Icon can be taken after the "icon,received" signal.
+ *
* @param url which url to query icon
* @param canvas evas instance where to add resulting object
*
* @return newly allocated Evas_Object instance or @c 0 on
* errors. Delete the object with evas_object_del().
*/
-EAPI Evas_Object *ewk_settings_icon_database_icon_object_add(const char *url, Evas *canvas);
+EAPI Evas_Object *ewk_settings_icon_database_icon_object_get(const char *url, Evas *canvas);
/**
* Sets the path where the application cache will be stored.
diff --git a/Source/WebKit/efl/ewk/ewk_tiled_backing_store.cpp b/Source/WebKit/efl/ewk/ewk_tiled_backing_store.cpp
index 3a46c80b6..7cd43edcb 100644
--- a/Source/WebKit/efl/ewk/ewk_tiled_backing_store.cpp
+++ b/Source/WebKit/efl/ewk/ewk_tiled_backing_store.cpp
@@ -26,14 +26,14 @@
#include "ewk_tiled_private.h"
#include <Ecore.h>
#include <Eina.h>
-#include <OwnPtr.h>
-#include <PassOwnPtr.h>
#include <algorithm>
#include <errno.h>
#include <math.h>
#include <stdio.h> // XXX REMOVE ME LATER
#include <stdlib.h>
#include <string.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
#define IDX(column, row, rowspan) (column + (row * rowspan))
@@ -1501,7 +1501,11 @@ static Eina_Bool _ewk_tiled_backing_store_zoom_set_internal(Ewk_Tiled_Backing_St
priv->view.offset.zoomCenter.x = currentX;
priv->view.offset.zoomCenter.y = currentY;
- ewk_tile_matrix_zoom_level_set(priv->model.matrix, *zoom);
+ unsigned long columns, rows;
+ ewk_tile_matrix_size_get(priv->model.matrix, &columns, &rows);
+ if (!ewk_tile_matrix_zoom_level_set(priv->model.matrix, *zoom))
+ ewk_tile_matrix_entry_new(priv->model.matrix, *zoom);
+ ewk_tile_matrix_resize(priv->model.matrix, columns, rows);
if (!priv->view.width || !priv->view.height) {
priv->view.offset.base.x = 0;
diff --git a/Source/WebKit/efl/ewk/ewk_tiled_matrix.cpp b/Source/WebKit/efl/ewk/ewk_tiled_matrix.cpp
index 55a0f5da1..151681fd7 100644
--- a/Source/WebKit/efl/ewk/ewk_tiled_matrix.cpp
+++ b/Source/WebKit/efl/ewk/ewk_tiled_matrix.cpp
@@ -25,14 +25,14 @@
#include "ewk_tiled_backing_store.h"
#include "ewk_tiled_private.h"
#include <Eina.h>
-#include <OwnPtr.h>
-#include <PassOwnPtr.h>
#include <errno.h>
#include <inttypes.h>
#include <math.h>
#include <stdio.h> // XXX remove me later
#include <stdlib.h>
#include <string.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
struct _Ewk_Tile_Matrix_Entry {
EINA_INLIST;
@@ -201,14 +201,10 @@ Ewk_Tile_Matrix* ewk_tile_matrix_new(Ewk_Tile_Unused_Cache* tileUnusedCache, uns
{
OwnPtr<Ewk_Tile_Matrix> tileMatrix = adoptPtr(new Ewk_Tile_Matrix);
- tileMatrix->matrix = eina_matrixsparse_new(rows, columns, _ewk_tile_matrix_cell_free, tileMatrix.get());
- if (!tileMatrix->matrix) {
- ERR("could not create sparse matrix.");
- return 0;
- }
-
tileMatrix->matrices = 0;
- ewk_tile_matrix_zoom_level_set(tileMatrix.get(), zoomLevel);
+ if (!ewk_tile_matrix_zoom_level_set(tileMatrix.get(), zoomLevel))
+ ewk_tile_matrix_entry_new(tileMatrix.get(), zoomLevel);
+ ewk_tile_matrix_resize(tileMatrix.get(), columns, rows);
if (tileUnusedCache)
tileMatrix->tileUnusedCache = ewk_tile_unused_cache_ref(tileUnusedCache);
@@ -238,38 +234,48 @@ Ewk_Tile_Matrix* ewk_tile_matrix_new(Ewk_Tile_Unused_Cache* tileUnusedCache, uns
return tileMatrix.leakPtr();
}
-void ewk_tile_matrix_zoom_level_set(Ewk_Tile_Matrix* tileMatrix, float zoom)
+/**
+ * Find the matrix with the same zoom and set it as current matrix.
+ *
+ * @param tileMatrix tile matrix to search the matrix in.
+ * @param zoom zoom factor to find the same matrix with it in matrices.
+ *
+ * @return @c true if found, @c false otherwise.
+ */
+bool ewk_tile_matrix_zoom_level_set(Ewk_Tile_Matrix* tileMatrix, float zoom)
{
- EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(tileMatrix, false);
Ewk_Tile_Matrix_Entry* iterator = 0;
Ewk_Tile_Matrix_Entry* entry = 0;
- unsigned long rows = 0, columns = 0;
-
- eina_matrixsparse_size_get(tileMatrix->matrix, &rows, &columns);
EINA_INLIST_FOREACH(tileMatrix->matrices, iterator) {
if (iterator->zoom != zoom)
continue;
entry = iterator;
tileMatrix->matrices = eina_inlist_promote(tileMatrix->matrices, EINA_INLIST_GET(entry));
- eina_matrixsparse_size_set(entry->matrix, rows, columns);
+ tileMatrix->matrix = entry->matrix;
+ return true;
}
+ return false;
+}
- if (!entry) {
- entry = new Ewk_Tile_Matrix_Entry;
- memset(entry, 0, sizeof(Ewk_Tile_Matrix_Entry));
- entry->matrix = eina_matrixsparse_new(rows, columns, _ewk_tile_matrix_cell_free, tileMatrix);
- entry->count = 0;
+void ewk_tile_matrix_entry_new(Ewk_Tile_Matrix* tileMatrix, float zoom)
+{
+ EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
+
+ Ewk_Tile_Matrix_Entry* entry = new Ewk_Tile_Matrix_Entry;
+ if (entry) {
entry->zoom = zoom;
+ entry->count = 0;
+ entry->matrix = eina_matrixsparse_new(1, 1, _ewk_tile_matrix_cell_free, tileMatrix);
if (!entry->matrix) {
ERR("could not create sparse matrix.");
delete entry;
return;
}
tileMatrix->matrices = eina_inlist_prepend(tileMatrix->matrices, EINA_INLIST_GET(entry));
+ tileMatrix->matrix = entry->matrix;
}
-
- tileMatrix->matrix = entry->matrix;
}
void ewk_tile_matrix_invalidate(Ewk_Tile_Matrix* tileMatrix)
@@ -356,6 +362,12 @@ void ewk_tile_matrix_resize(Ewk_Tile_Matrix* tileMatrix, unsigned long cols, uns
eina_matrixsparse_size_set(tileMatrix->matrix, rows, cols);
}
+void ewk_tile_matrix_size_get(Ewk_Tile_Matrix* tileMatrix, unsigned long* columns, unsigned long* rows)
+{
+ EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
+ eina_matrixsparse_size_get(tileMatrix->matrix, rows, columns);
+}
+
/**
* Get the cache of unused tiles in use by given matrix.
*
diff --git a/Source/WebKit/efl/ewk/ewk_tiled_matrix.h b/Source/WebKit/efl/ewk/ewk_tiled_matrix.h
index 98b95921b..03ed14cba 100644
--- a/Source/WebKit/efl/ewk/ewk_tiled_matrix.h
+++ b/Source/WebKit/efl/ewk/ewk_tiled_matrix.h
@@ -27,10 +27,12 @@
/* matrix of tiles */
Ewk_Tile_Matrix *ewk_tile_matrix_new(Ewk_Tile_Unused_Cache *tuc, unsigned long cols, unsigned long rows, float zoom_level, Evas_Colorspace color_space, void (*render_callback)(void *data, Ewk_Tile *t, const Eina_Rectangle *update), const void *render_data);
+void ewk_tile_matrix_entry_new(Ewk_Tile_Matrix *tm, float zoom);
void ewk_tile_matrix_free(Ewk_Tile_Matrix *tm);
void ewk_tile_matrix_resize(Ewk_Tile_Matrix *tm, unsigned long cols, unsigned long rows);
-void ewk_tile_matrix_zoom_level_set(Ewk_Tile_Matrix *tm, float zoom);
+void ewk_tile_matrix_size_get(Ewk_Tile_Matrix *tm, unsigned long *cols, unsigned long *rows);
+bool ewk_tile_matrix_zoom_level_set(Ewk_Tile_Matrix *tm, float zoom);
void ewk_tile_matrix_invalidate(Ewk_Tile_Matrix *tm);
Ewk_Tile_Unused_Cache *ewk_tile_matrix_unused_cache_get(const Ewk_Tile_Matrix *tm);
diff --git a/Source/WebKit/efl/ewk/ewk_view.cpp b/Source/WebKit/efl/ewk/ewk_view.cpp
index 17a6ea069..7a0ee1ed6 100644
--- a/Source/WebKit/efl/ewk/ewk_view.cpp
+++ b/Source/WebKit/efl/ewk/ewk_view.cpp
@@ -1,6 +1,7 @@
/*
Copyright (C) 2009-2010 ProFUSION embedded systems
Copyright (C) 2009-2012 Samsung Electronics
+ Copyright (C) 2012 Intel Corporation
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -45,6 +46,7 @@
#include "JSDOMWindow.h"
#include "JSLock.h"
#include "LayoutTypes.h"
+#include "PageClientEfl.h"
#include "PlatformMouseEvent.h"
#include "PopupMenuClient.h"
#include "ProgressTracker.h"
@@ -74,6 +76,22 @@
#include "VibrationClientEfl.h"
#endif
+#if ENABLE(BATTERY_STATUS)
+#include "BatteryClientEfl.h"
+#endif
+
+#if USE(ACCELERATED_COMPOSITING)
+#include "NotImplemented.h"
+#endif
+
+#if ENABLE(NETWORK_INFO)
+#include "NetworkInfoClientEfl.h"
+#endif
+
+#if ENABLE(INPUT_TYPE_COLOR)
+#include "ColorChooserClient.h"
+#endif
+
static const float zoomMinimum = 0.05;
static const float zoomMaximum = 4.0;
@@ -90,6 +108,9 @@ static const size_t ewkViewScrollsSizeStep = 2;
static const size_t ewkViewScrollsSizeMaximumFree = 32;
static const Evas_Smart_Cb_Description _ewk_view_callback_names[] = {
+ { "colorchooser,create", "(yyyy)" },
+ { "colorchooser,willdelete", "" },
+ { "colorchooser,color,changed", "(yyyy)" },
{ "download,request", "p" },
{ "editorclient,contents,changed", "" },
{ "editorclient,selection,changed", "" },
@@ -138,6 +159,10 @@ struct _Ewk_View_Private_Data {
WebCore::Frame* mainFrame;
WebCore::ViewportArguments viewportArguments;
Ewk_History* history;
+ OwnPtr<PageClientEfl> pageClient;
+#if ENABLE(INPUT_TYPE_COLOR)
+ WebCore::ColorChooserClient* colorChooserClient;
+#endif
struct {
Ewk_Menu menu;
WebCore::PopupMenuClient* menuClient;
@@ -184,8 +209,15 @@ struct _Ewk_View_Private_Data {
bool enablePlugins : 1;
bool enableFrameFlattening : 1;
bool encodingDetector : 1;
+ bool hyperlinkAuditingEnabled : 1;
bool scriptsCanOpenWindows : 1;
bool scriptsCanCloseWindows : 1;
+#if ENABLE(VIDEO_TRACK)
+ bool shouldDisplayCaptions : 1;
+ bool shouldDisplaySubtitles : 1;
+ bool shouldDisplayTextDescriptions: 1;
+#endif
+ bool scriptsCanAccessClipboard : 1;
bool resizableTextareas : 1;
bool privateBrowsing : 1;
bool caretBrowsing : 1;
@@ -193,6 +225,12 @@ struct _Ewk_View_Private_Data {
bool localStorage : 1;
bool offlineAppCache : 1;
bool pageCache : 1;
+ bool enableXSSAuditor : 1;
+#if ENABLE(WEB_AUDIO)
+ bool webAudio : 1;
+#endif
+ bool webGLEnabled : 1;
+ bool tabsToLinks : 1;
struct {
float minScale;
float maxScale;
@@ -614,10 +652,18 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* smartData)
WebCore::provideDeviceOrientationTo(priv->page.get(), new WebCore::DeviceOrientationClientEfl);
#endif
+#if ENABLE(NETWORK_INFO)
+ WebCore::provideNetworkInfoTo(priv->page.get(), new WebCore::NetworkInfoClientEfl);
+#endif
+
#if ENABLE(VIBRATION)
WebCore::provideVibrationTo(priv->page.get(), new WebCore::VibrationClientEfl(smartData->self));
#endif
+#if ENABLE(BATTERY_STATUS)
+ WebCore::provideBatteryTo(priv->page.get(), new WebCore::BatteryClientEfl);
+#endif
+
priv->pageSettings = priv->page->settings();
priv->viewportArguments.width = WebCore::ViewportArguments::ValueAuto;
@@ -636,13 +682,18 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* smartData)
priv->pageSettings->setFixedFontFamily("monotype");
priv->pageSettings->setSansSerifFontFamily("sans");
priv->pageSettings->setStandardFontFamily("sans");
+ priv->pageSettings->setHyperlinkAuditingEnabled(false);
priv->pageSettings->setScriptEnabled(true);
priv->pageSettings->setPluginsEnabled(true);
priv->pageSettings->setLocalStorageEnabled(true);
priv->pageSettings->setOfflineWebApplicationCacheEnabled(true);
priv->pageSettings->setUsesPageCache(true);
priv->pageSettings->setUsesEncodingDetector(false);
+#if ENABLE(WEB_AUDIO)
+ priv->pageSettings->setWebAudioEnabled(false);
+#endif
priv->pageSettings->setWebGLEnabled(true);
+ priv->pageSettings->setXSSAuditorEnabled(true);
url = priv->pageSettings->userStyleSheetLocation();
priv->settings.userStylesheet = eina_stringshare_add(url.string().utf8().data());
@@ -679,8 +730,16 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* smartData)
priv->settings.enableScripts = priv->pageSettings->isScriptEnabled();
priv->settings.enablePlugins = priv->pageSettings->arePluginsEnabled();
priv->settings.enableFrameFlattening = priv->pageSettings->frameFlatteningEnabled();
+ priv->settings.enableXSSAuditor = priv->pageSettings->xssAuditorEnabled();
+ priv->settings.hyperlinkAuditingEnabled = priv->pageSettings->hyperlinkAuditingEnabled();
priv->settings.scriptsCanOpenWindows = priv->pageSettings->javaScriptCanOpenWindowsAutomatically();
priv->settings.scriptsCanCloseWindows = priv->pageSettings->allowScriptsToCloseWindows();
+#if ENABLE(VIDEO_TRACK)
+ priv->settings.shouldDisplayCaptions = priv->pageSettings->shouldDisplayCaptions();
+ priv->settings.shouldDisplaySubtitles = priv->pageSettings->shouldDisplaySubtitles();
+ priv->settings.shouldDisplayTextDescriptions = priv->pageSettings->shouldDisplayTextDescriptions();
+#endif
+ priv->settings.scriptsCanAccessClipboard = priv->pageSettings->javaScriptCanAccessClipboard();
priv->settings.resizableTextareas = priv->pageSettings->textAreasAreResizable();
priv->settings.privateBrowsing = priv->pageSettings->privateBrowsingEnabled();
priv->settings.caretBrowsing = priv->pageSettings->caretBrowsingEnabled();
@@ -689,8 +748,13 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* smartData)
priv->settings.offlineAppCache = true; // XXX no function to read setting; this keeps the original setting
priv->settings.pageCache = priv->pageSettings->usesPageCache();
priv->settings.encodingDetector = priv->pageSettings->usesEncodingDetector();
+ priv->settings.webGLEnabled = priv->pageSettings->webGLEnabled();
+ priv->settings.tabsToLinks = true;
priv->settings.userAgent = ewk_settings_default_user_agent_get();
+#if ENABLE(WEB_AUDIO)
+ priv->settings.webAudio = priv->pageSettings->webAudioEnabled();
+#endif
// Since there's no scale separated from zooming in webkit-efl, this functionality of
// viewport meta tag is implemented using zoom. When scale zoom is supported by webkit-efl,
@@ -708,6 +772,8 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* smartData)
priv->soupSession = WebCore::ResourceHandle::defaultSession();
+ priv->pageClient = adoptPtr(new PageClientEfl(smartData->self));
+
return priv;
}
@@ -1625,7 +1691,7 @@ Eina_Bool ewk_view_scale_set(Evas_Object* ewkView, float scaleFactor, Evas_Coord
if (currentScaleFactor == -1)
return false;
- priv->page->setPageScaleFactor(scaleFactor, WebCore::LayoutPoint(scrollX, scrollY));
+ priv->page->setPageScaleFactor(scaleFactor, WebCore::IntPoint(scrollX, scrollY));
return true;
}
@@ -2041,6 +2107,25 @@ Eina_Bool ewk_view_setting_scripts_can_close_windows_set(Evas_Object* ewkView, E
return true;
}
+Eina_Bool ewk_view_setting_scripts_can_access_clipboard_get(const Evas_Object* ewkView)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ return priv->settings.scriptsCanAccessClipboard;
+}
+
+Eina_Bool ewk_view_setting_scripts_can_access_clipboard_set(Evas_Object* ewkView, Eina_Bool allow)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ allow = !!allow;
+ if (priv->settings.scriptsCanAccessClipboard != allow) {
+ priv->pageSettings->setJavaScriptCanAccessClipboard(allow);
+ priv->settings.scriptsCanAccessClipboard = allow;
+ }
+ return true;
+}
+
Eina_Bool ewk_view_setting_resizable_textareas_get(const Evas_Object* ewkView)
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
@@ -2421,6 +2506,60 @@ double ewk_view_setting_minimum_timer_interval_get(const Evas_Object* ewkView)
return priv->settings.domTimerInterval;
}
+Eina_Bool ewk_view_setting_enable_webgl_get(const Evas_Object* ewkView)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ return priv->settings.webGLEnabled;
+}
+
+Eina_Bool ewk_view_setting_enable_webgl_set(Evas_Object* ewkView, Eina_Bool enable)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ enable = !!enable;
+ if (priv->settings.webGLEnabled != enable) {
+ priv->pageSettings->setWebGLEnabled(enable);
+ priv->settings.webGLEnabled = enable;
+ }
+ return true;
+}
+
+Eina_Bool ewk_view_setting_include_links_in_focus_chain_get(const Evas_Object* ewkView)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ return priv->settings.tabsToLinks;
+}
+
+Eina_Bool ewk_view_setting_include_links_in_focus_chain_set(Evas_Object* ewkView, Eina_Bool enable)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ enable = !!enable;
+ priv->settings.tabsToLinks = enable;
+ return true;
+}
+
+Eina_Bool ewk_view_setting_enable_hyperlink_auditing_get(const Evas_Object* ewkView)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ return priv->settings.hyperlinkAuditingEnabled;
+}
+
+Eina_Bool ewk_view_setting_enable_hyperlink_auditing_set(Evas_Object* ewkView, Eina_Bool enable)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ enable = !!enable;
+ if (priv->settings.hyperlinkAuditingEnabled != enable) {
+ priv->pageSettings->setHyperlinkAuditingEnabled(enable);
+ priv->settings.hyperlinkAuditingEnabled = enable;
+ }
+ return true;
+}
+
Ewk_View_Smart_Data* ewk_view_smart_data_get(const Evas_Object* ewkView)
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
@@ -2778,13 +2917,14 @@ void ewk_view_load_document_finished(Evas_Object* ewkView, Evas_Object* frame)
* Reports the view started loading something.
*
* @param ewkView View.
+ * @param ewkFrame Frame being loaded.
*
* Emits signal: "load,started" with no parameters.
*/
-void ewk_view_load_started(Evas_Object* ewkView)
+void ewk_view_load_started(Evas_Object* ewkView, Evas_Object* ewkFrame)
{
- DBG("ewkView=%p", ewkView);
- evas_object_smart_callback_call(ewkView, "load,started", 0);
+ DBG("ewkView=%p, ewkFrame=%p", ewkView, ewkFrame);
+ evas_object_smart_callback_call(ewkView, "load,started", ewkFrame);
}
/**
@@ -2829,6 +2969,19 @@ void ewk_view_load_show(Evas_Object* ewkView)
evas_object_smart_callback_call(ewkView, "load,newwindow,show", 0);
}
+/**
+ * @internal
+ * Reports an onload event for @p frame.
+ *
+ * @param ewkView View which contains the frame.
+ * @param frame The frame whose onload event was received.
+ *
+ * Emits signal: "onload,event" with @p frame as the parameter.
+ */
+void ewk_view_onload_event(Evas_Object* ewkView, Evas_Object* frame)
+{
+ evas_object_smart_callback_call(ewkView, "onload,event", frame);
+}
/**
* @internal
@@ -3497,6 +3650,88 @@ void ewk_view_popup_selected_set(Evas_Object* ewkView, int index)
priv->popup.menuClient->valueChanged(index);
}
+#if ENABLE(INPUT_TYPE_COLOR)
+/**
+ * @internal
+ *
+ * Creates a new color chooser with an initial selected color.
+ *
+ * @param client ColorChooserClient instance that allows communication with webkit.
+ * @param initialColor The initial selected color.
+ *
+ */
+void ewk_view_color_chooser_new(Evas_Object* ewkView, WebCore::ColorChooserClient* client, const WebCore::Color& initialColor)
+{
+ INF("ewkView=%p", ewkView);
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+ if (priv->colorChooserClient)
+ ewk_view_color_chooser_destroy(ewkView);
+
+ priv->colorChooserClient = client;
+
+ Ewk_Color color;
+ color.r = initialColor.red();
+ color.g = initialColor.green();
+ color.b = initialColor.blue();
+ color.a = initialColor.alpha();
+
+ evas_object_smart_callback_call(ewkView, "colorchooser,create", &color);
+}
+
+Eina_Bool ewk_view_color_chooser_destroy(Evas_Object* ewkView)
+{
+ INF("ewkView=%p", ewkView);
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+
+ if (!priv->colorChooserClient)
+ return false;
+
+ evas_object_smart_callback_call(ewkView, "colorchooser,willdelete", 0);
+
+ priv->colorChooserClient->didEndChooser();
+ priv->colorChooserClient = 0;
+
+ return true;
+}
+
+void ewk_view_color_chooser_color_set(Evas_Object *ewkView, int r, int g, int b)
+{
+ INF("ewkView=%p", ewkView);
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+ EINA_SAFETY_ON_NULL_RETURN(priv->colorChooserClient);
+
+ // Alpha channel is not allowed, see ColorInputType::sanitizeValue().
+ priv->colorChooserClient->didChooseColor(WebCore::Color(r, g, b));
+}
+
+/**
+ * @internal
+ *
+ * The selected color of the color input associated with the color chooser has
+ * changed. Usually the browser should updated the current selected value on the
+ * color picker if the user is not interacting.
+ *
+ * @param newColor The new selected color.
+ *
+ */
+void ewk_view_color_chooser_changed(Evas_Object* ewkView, const WebCore::Color& newColor)
+{
+ INF("ewkView=%p", ewkView);
+
+ Ewk_Color color;
+ color.r = newColor.red();
+ color.g = newColor.green();
+ color.b = newColor.blue();
+ color.a = newColor.alpha();
+
+ evas_object_smart_callback_call(ewkView, "colorchooser,color,changed", &color);
+}
+#endif
+
/**
* @internal
* Request a download to user.
@@ -3777,8 +4012,8 @@ Eina_Bool ewk_view_mode_set(Evas_Object* ewkView, Ewk_View_Mode viewMode)
Ewk_View_Mode ewk_view_mode_get(const Evas_Object* ewkView)
{
- EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, EWK_VIEW_MODE_WINDOWED);
- EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, EWK_VIEW_MODE_WINDOWED);
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, EWK_VIEW_MODE_INVALID);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, EWK_VIEW_MODE_INVALID);
return static_cast<Ewk_View_Mode>(priv->page->viewMode());
}
@@ -3916,6 +4151,136 @@ void ewk_view_soup_session_set(Evas_Object* ewkView, SoupSession* session)
priv->soupSession = session;
}
+Eina_Bool ewk_view_setting_enable_xss_auditor_get(const Evas_Object* ewkView)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, EINA_FALSE);
+ return priv->settings.enableXSSAuditor;
+}
+
+void ewk_view_setting_enable_xss_auditor_set(Evas_Object* ewkView, Eina_Bool enable)
+{
+ EWK_VIEW_SD_GET(ewkView, smartData);
+ EWK_VIEW_PRIV_GET(smartData, priv);
+ enable = !!enable;
+ if (priv->settings.enableXSSAuditor != enable) {
+ priv->pageSettings->setXSSAuditorEnabled(enable);
+ priv->settings.enableXSSAuditor = enable;
+ }
+}
+
+Eina_Bool ewk_view_setting_should_display_subtitles_get(const Evas_Object *ewkView)
+{
+#if ENABLE(VIDEO_TRACK)
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ return priv->settings.shouldDisplaySubtitles;
+#else
+ return false;
+#endif
+}
+
+Eina_Bool ewk_view_setting_should_display_captions_get(const Evas_Object *ewkView)
+{
+#if ENABLE(VIDEO_TRACK)
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ return priv->settings.shouldDisplayCaptions;
+#else
+ return false;
+#endif
+}
+
+void ewk_view_setting_should_display_captions_set(Evas_Object *ewkView, Eina_Bool enable)
+{
+#if ENABLE(VIDEO_TRACK)
+ EWK_VIEW_SD_GET(ewkView, smartData);
+ EWK_VIEW_PRIV_GET(smartData, priv);
+ enable = !!enable;
+ if (priv->settings.shouldDisplayCaptions != enable) {
+ priv->pageSettings->setShouldDisplayCaptions(enable);
+ priv->settings.shouldDisplayCaptions = enable;
+ }
+#endif
+}
+
+void ewk_view_setting_should_display_subtitles_set(Evas_Object *ewkView, Eina_Bool enable)
+{
+#if ENABLE(VIDEO_TRACK)
+ EWK_VIEW_SD_GET(ewkView, smartData);
+ EWK_VIEW_PRIV_GET(smartData, priv);
+ enable = !!enable;
+ if (priv->settings.shouldDisplaySubtitles != enable) {
+ priv->pageSettings->setShouldDisplaySubtitles(enable);
+ priv->settings.shouldDisplaySubtitles = enable;
+ }
+#endif
+}
+
+Eina_Bool ewk_view_setting_should_display_text_descriptions_get(const Evas_Object *ewkView)
+{
+#if ENABLE(VIDEO_TRACK)
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ return priv->settings.shouldDisplayTextDescriptions;
+#else
+ return false;
+#endif
+}
+
+void ewk_view_setting_should_display_text_descriptions_set(Evas_Object *ewkView, Eina_Bool enable)
+{
+#if ENABLE(VIDEO_TRACK)
+ EWK_VIEW_SD_GET(ewkView, smartData);
+ EWK_VIEW_PRIV_GET(smartData, priv);
+ enable = !!enable;
+ if (priv->settings.shouldDisplayTextDescriptions != enable) {
+ priv->pageSettings->setShouldDisplayTextDescriptions(enable);
+ priv->settings.shouldDisplayTextDescriptions = enable;
+ }
+#endif
+}
+
+#if USE(ACCELERATED_COMPOSITING)
+bool ewk_view_accelerated_compositing_object_create(Evas_Object* ewkView, Evas_Native_Surface* nativeSurface, const WebCore::IntRect& rect)
+{
+ notImplemented();
+ return false;
+}
+
+WebCore::GraphicsContext3D* ewk_view_accelerated_compositing_context_get(Evas_Object* ewkView)
+{
+ notImplemented();
+ return 0;
+}
+#endif
+
+Eina_Bool ewk_view_setting_web_audio_get(const Evas_Object* ewkView)
+{
+#if ENABLE(WEB_AUDIO)
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ return priv->settings.webAudio;
+#else
+ return false;
+#endif
+}
+
+Eina_Bool ewk_view_setting_web_audio_set(Evas_Object* ewkView, Eina_Bool enable)
+{
+#if ENABLE(WEB_AUDIO)
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ if (priv->settings.webAudio != enable) {
+ priv->pageSettings->setWebAudioEnabled(enable);
+ priv->settings.webAudio = enable;
+ }
+ return true;
+#else
+ return false;
+#endif
+}
+
namespace EWKPrivate {
WebCore::Page *corePage(const Evas_Object *ewkView)
@@ -3925,4 +4290,11 @@ WebCore::Page *corePage(const Evas_Object *ewkView)
return priv->page.get();
}
+PlatformPageClient corePageClient(Evas_Object* ewkView)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
+ return priv->pageClient.get();
+}
+
} // namespace EWKPrivate
diff --git a/Source/WebKit/efl/ewk/ewk_view.h b/Source/WebKit/efl/ewk/ewk_view.h
index 7de0e462f..4d87724da 100644
--- a/Source/WebKit/efl/ewk/ewk_view.h
+++ b/Source/WebKit/efl/ewk/ewk_view.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2009-2010 ProFUSION embedded systems
- Copyright (C) 2009-2010 Samsung Electronics
+ Copyright (C) 2009-2012 Samsung Electronics
+ Copyright (C) 2012 Intel Corporation
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -33,6 +34,11 @@
*
* The following signals (see evas_object_smart_callback_add()) are emitted:
*
+ * - "colorchooser,create", Ewk_Color: a new color chooser should be created.
+ * - "colorchooser,willdelete", void: reports that a previously created color
+ * chooser will be deleted.
+ * - "colorchooser,color,changed", Ewk_Color: the value at the color input widget
+ * corresponding to the color chooser has changed.
* - "download,request", Ewk_Download: reports a download is being requested
* - "editorclient,contents,changed", void: reports to the view that editor
* client's contents were changed
@@ -54,14 +60,23 @@
* - "load,progress", double*: load progress is changed (overall value
* from 0.0 to 1.0, connect to individual frames for fine grained).
* - "load,provisional", void: view started provisional load.
- * - "load,started", void: frame started loading the document.
+ * - "load,resource,finished", unsigned long*: reports resource load finished and it gives
+ * a pointer to its identifier.
+ * - "load,resource,failed", Ewk_Frame_Load_Error*: reports resource load failure and it
+ * gives a pointer to structure defining the error as an argument.
+ * - "load,started", Evas_Object*: frame started loading the document.
* - "menubar,visible,get", Eina_Bool *: expects a @c EINA_TRUE if menubar is
* visible; @c EINA_FALSE, otherwise.
* - "menubar,visible,set", Eina_Bool: sets menubar visibility.
* - "mixedcontent,displayed", void: any of the containing frames has loaded and displayed mixed content.
* - "mixedcontent,run", void: any of the containing frames has loaded and run mixed content.
+ * - "onload,event", Evas_Object*: a frame onload event has been received.
* - "ready", void: page is fully loaded.
- * - "resource,request,willsend", Ewk_Frame_Resource_Request*: the network request for the main frame will be sent.
+ * - "resource,request,new", Ewk_Frame_Resource_Request*: reports that
+ * there's a new resource request.
+ * - "resource,request,willsend", Ewk_Frame_Resource_Messages*: a resource will be requested.
+ * and the possible redirect response.
+ * - "resource,response,received", Ewk_Frame_Resource_Response*: the network response for a resource.
* - "scrollbars,visible,get", Eina_Bool *: expects a @c EINA_TRUE if scrollbars
* are visible; @c EINA_FALSE, otherwise.
* - "scrollbars,visible,set", Eina_Bool: sets scrollbars visibility.
@@ -283,6 +298,16 @@ struct _Ewk_Scroll_Request {
Evas_Coord x, y, w, h, x2, y2;
};
+/// Creates a type name for @a _Ewk_Color.
+typedef struct _Ewk_Color Ewk_Color;
+/// Represents a color using the RGBA format.
+struct _Ewk_Color {
+ unsigned char r; /**< Red channel. */
+ unsigned char g; /**< Green channel. */
+ unsigned char b; /**< Blue channel. */
+ unsigned char a; /**< Alpha channel. */
+};
+
/**
* @brief Contains an internal View data.
*
@@ -749,6 +774,35 @@ typedef enum _Ewk_Editor_Command Ewk_Editor_Command;
EAPI Eina_Bool ewk_view_execute_editor_command(Evas_Object *o, const Ewk_Editor_Command command, const char *value);
/**
+ * Destroys a previously created color chooser.
+ *
+ * Before destroying, it informs client that color chooser's data is ready to be
+ * destroyed by sending a "colorchooser,willdelete". Then it removes any reference
+ * to the color chooser inside webkit. It's safe to call this function either from
+ * inside webkit or from browser.
+ *
+ * @param o view object
+ *
+ * @return @c EINA_TRUE in case color chooser was successfully destroyed or @c EINA_TRUE in
+ * case there wasn't any color chooser to be destroyed
+ */
+EAPI Eina_Bool ewk_view_color_chooser_destroy(Evas_Object* o);
+
+/**
+ * Changes the selected color.
+ *
+ * Changes the color selected in the color input widget. The browser should call
+ * this when the user chooses a new color. It's likely that ewk_view_color_chooser_destroy
+ * will be called afterwards.
+ *
+ * @param o view object
+ * @param r red color component
+ * @param g green color component
+ * @param b blue color component
+ */
+EAPI void ewk_view_color_chooser_color_set(Evas_Object* o, int r, int g, int b);
+
+/**
* Changes currently selected item.
*
* Changes the option selected in select widget. This is called by browser
@@ -1501,6 +1555,27 @@ EAPI Eina_Bool ewk_view_setting_scripts_can_close_windows_get(const Evas_Obje
EAPI Eina_Bool ewk_view_setting_scripts_can_close_windows_set(Evas_Object *o, Eina_Bool allow);
/**
+ * Returns whether scripts can access clipboard.
+ *
+ * @param o View whose settings to check.
+ *
+ * @return @c EINA_TRUE if scripts can access clipboard, @c EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool ewk_view_setting_scripts_can_access_clipboard_get(const Evas_Object *o);
+
+/**
+ * Sets whether scripts are allowed to access clipboard.
+ *
+ * @param o View whose settings to change.
+ * @param allow @c EINA_TRUE to allow scripts access clipboard,
+ * @c EINA_FALSE otherwise.
+ *
+ * @return @c EINA_TRUE if the setting could be changed successfully,
+ * @c EINA_FALSE in case an error occurred.
+ */
+EAPI Eina_Bool ewk_view_setting_scripts_can_access_clipboard_set(Evas_Object *o, Eina_Bool allow);
+
+/**
* Queries if HTML elements @c textarea can be resizable.
*
* @param o view object to query if the textarea elements can be resizable
@@ -1940,6 +2015,87 @@ EAPI Eina_Bool ewk_view_setting_minimum_timer_interval_set(Evas_Object *o, do
EAPI double ewk_view_setting_minimum_timer_interval_get(const Evas_Object *o);
/**
+ * Queries whether WebGL support is enabled.
+ *
+ * WebGL support is enabled by default.
+ *
+ * @param o view object to query whether WebGL support is enabled
+ *
+ * @return @c EINA_TRUE if WebGL support enabled,
+ * @c EINA_FALSE if not or on failure
+ */
+EAPI Eina_Bool ewk_view_setting_enable_webgl_get(const Evas_Object *o);
+
+/**
+ * Enables/disables WebGL support.
+ *
+ * WebGL support is enabled by default.
+ *
+ * @param o view object to set WebGL
+ * @param enable @c EINA_TRUE to enable WebGL support,
+ * @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_setting_enable_webgl_set(Evas_Object *o, Eina_Bool enable);
+
+/**
+ * Queries if tab key focusing of page elements is enabled.
+ *
+ * When this setting is enabled, the elements in the page (links and form controls) will be cycled through by pressing the tab key.
+ * Tab key focusing of page elements is enabled by default.
+ *
+ * @param o view object to query if tab key focusing of page elements is enabled
+ *
+ * @return @c EINA_TRUE if tab key focusing of page elements is enabled, @c EINA_FALSE
+ * otherwise
+ */
+EAPI Eina_Bool ewk_view_setting_include_links_in_focus_chain_get(const Evas_Object *o);
+
+/**
+ * Enables/disables tab key focusing of page elements.
+ *
+ * When this setting is enabled, the elements in the page (links and form controls) will be cycled through by pressing the tab key.
+ * Tab key focusing of page elements is enabled by default.
+ *
+ * @param o view object to set tab key focusing of page elements
+ * @param enable @c EINA_TRUE to enable tab key focusing of page elements, @c EINA_FALSE to
+ * disable
+ *
+ * @return @c EINA_TRUE on success or @EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_setting_include_links_in_focus_chain_set(Evas_Object *o, Eina_Bool enable);
+
+/**
+ * Queries if hyperlink auditing is enabled.
+ *
+ * Hyperlink auditing is used if a hyperlink created by an @c a or @c area element has a @c ping attribute.
+ * Please refer to the hyperlink auditing specification at http://www.whatwg.org/specs/web-apps/current-work/#hyperlink-auditing.
+ * Hyperlink auditing is disabled by default.
+ *
+ * @param o view object to query if hyperlink auditing is enabled
+ *
+ * @return @c EINA_TRUE if hyperlink auditing is enabled, @c EINA_FALSE
+ * otherwise
+ */
+EAPI Eina_Bool ewk_view_setting_enable_hyperlink_auditing_get(const Evas_Object *o);
+
+/**
+ * Enables/disables hyperlink auditing.
+ *
+ * Hyperlink auditing is used if a hyperlink created by an @c a or @c area element has a @c ping attribute.
+ * Please refer to the hyperlink auditing specification at http://www.whatwg.org/specs/web-apps/current-work/#hyperlink-auditing.
+ * Hyperlink auditing is disabled by default.
+ *
+ * @param o view object to set hyperlink auditing
+ * @param enable @c EINA_TRUE to enable hyperlink auditing, @c EINA_FALSE to
+ * disable
+ *
+ * @return @c EINA_TRUE on success or @EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_setting_enable_hyperlink_auditing_set(Evas_Object *o, Eina_Bool enable);
+
+/**
* Gets the internal data of @a o.
*
* This is similar to evas_object_smart_data_get(), but additionally does type checking.
@@ -2239,7 +2395,8 @@ EAPI Eina_Bool ewk_view_mode_set(Evas_Object *o, Ewk_View_Mode view_mode);
*
* @param o view object to get the view mode
*
- * @return enum value of @a Ewk_View_Mode that indicates current view mode
+ * @return enum value of @a Ewk_View_Mode that indicates current view mode on success or
+ * EWK_VIEW_MODE_INVALID otherwise
*
* @see ewk_view_mode_set()
*/
@@ -2261,7 +2418,8 @@ EAPI Eina_Bool ewk_view_js_object_add(Evas_Object *o, Ewk_JS_Object *obj, const
enum _Ewk_Page_Visibility_State {
EWK_PAGE_VISIBILITY_STATE_VISIBLE,
EWK_PAGE_VISIBILITY_STATE_HIDDEN,
- EWK_PAGE_VISIBILITY_STATE_PRERENDER
+ EWK_PAGE_VISIBILITY_STATE_PRERENDER,
+ EWK_PAGE_VISIBILITY_STATE_PREVIEW
};
/// Creates a type name for @a _Ewk_Page_Visibility_State.
typedef enum _Ewk_Page_Visibility_State Ewk_Page_Visibility_State;
@@ -2364,6 +2522,115 @@ EAPI SoupSession* ewk_view_soup_session_get(const Evas_Object *o);
*/
EAPI void ewk_view_soup_session_set(Evas_Object *o, SoupSession *session);
+/**
+ * Returns whether XSSAuditor feature is enabled.
+ *
+ * @param o view object to query whether XSSAuditor feature is enabled.
+ *
+ * @return @c EINA_TRUE if the XSSAuditor feature is enabled,
+ * @c EINA_FALSE if not or on failure.
+ */
+EAPI Eina_Bool ewk_view_setting_enable_xss_auditor_get(const Evas_Object *o);
+
+/**
+ * Enables/disables the XSSAuditor feature.
+ *
+ * The XSSAuditor (cross-site scripting protection) feature provides protection
+ * from reflected XSS attacks on vulnerable web sites. When XSS is encountered
+ * in the page, frame sends a signal "xss,detected" with additional information
+ * on whether the entire page was blocked or only injected scripts were removed.
+ * This feature is enabled by default.
+ *
+ * @param o view object to set the XSSAuditor feature.
+ * @param enable @c EINA_TRUE to enable the XSSAuditor feature,
+ * @c EINA_FALSE to disable.
+ */
+EAPI void ewk_view_setting_enable_xss_auditor_set(Evas_Object *o, Eina_Bool enable);
+
+/**
+ * Returns whether video captions display feature is enabled.
+ *
+ * @param o view object to query whether video captions display feature is enabled.
+ *
+ * @return @c EINA_TRUE if the video captions display feature is enabled,
+ * @c EINA_FALSE if not or on failure.
+ */
+EAPI Eina_Bool ewk_view_setting_should_display_captions_get(const Evas_Object *o);
+
+/**
+ * Enables/disables the video captions display feature.
+ *
+ * The video captions display feature is part of track support for HTML5 video.
+ *
+ * @param o view object to set the video captions display feature.
+ * @param enable @c EINA_TRUE to enable the video captions display feature,
+ * @c EINA_FALSE to disable.
+ */
+EAPI void ewk_view_setting_should_display_captions_set(Evas_Object *o, Eina_Bool enable);
+
+/**
+ * Returns whether video subtitles display feature is enabled.
+ *
+ * @param o view object to query whether video subtitles display feature is enabled.
+ *
+ * @return @c EINA_TRUE if the video subtitles display feature is enabled,
+ * @c EINA_FALSE if not or on failure.
+ */
+EAPI Eina_Bool ewk_view_setting_should_display_subtitles_get(const Evas_Object *o);
+
+/**
+ * Enables/disables the video subtitles display feature.
+ *
+ * The video subtitles display feature is part of track support for HTML5 video.
+ *
+ * @param o view object to set the video subtitles display feature.
+ * @param enable @c EINA_TRUE to enable the video subtitles display feature,
+ * @c EINA_FALSE to disable.
+ */
+EAPI void ewk_view_setting_should_display_subtitles_set(Evas_Object *o, Eina_Bool enable);
+
+/**
+ * Returns whether video text descriptions display feature is enabled.
+ *
+ * @param o view object to query whether video text descriptions display feature is enabled.
+ *
+ * @return @c EINA_TRUE if the video text descriptions display feature is enabled,
+ * @c EINA_FALSE if not or on failure.
+ */
+EAPI Eina_Bool ewk_view_setting_should_display_text_descriptions_get(const Evas_Object *o);
+
+/**
+ * Enables/disables the video text descriptions display feature.
+ *
+ * The video text descriptions display feature is part of track support for HTML5 video.
+ *
+ * @param o view object to set the video text descriptions display feature.
+ * @param enable @c EINA_TRUE to enable the video text descriptions display feature,
+ * @c EINA_FALSE to disable.
+ */
+EAPI void ewk_view_setting_should_display_text_descriptions_set(Evas_Object *o, Eina_Bool enable);
+
+/**
+ * Queries if the web audio feature of HTML5 is enabled.
+ *
+ * @param o view object to query if the web audio feature is enabled
+ *
+ * @return @c EINA_TRUE if web audio is enabled,
+ * @c EINA_FALSE if not or on failure
+ */
+EAPI Eina_Bool ewk_view_setting_web_audio_get(const Evas_Object *o);
+
+/**
+ * Enables/disables the web audio feature of HTML5.
+ *
+ * @param o view object to set the web audio
+ * @param enable @c EINA_TRUE to enable the web audio feature,
+ * @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_setting_web_audio_set(Evas_Object *o, Eina_Bool enable);
+
#ifdef __cplusplus
}
#endif
diff --git a/Source/WebKit/gtk/ChangeLog b/Source/WebKit/gtk/ChangeLog
index 7940ca3cd..770526e53 100644
--- a/Source/WebKit/gtk/ChangeLog
+++ b/Source/WebKit/gtk/ChangeLog
@@ -1,3 +1,1008 @@
+2012-05-06 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert isPageBoxVisible to use Internals interface.
+ https://bugs.webkit.org/show_bug.cgi?id=85692
+
+ Reviewed by Darin Adler.
+
+ Remove isPageBoxVisible functions, because it is able to work in the
+ cross-port way through the Internals interface.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+ (DumpRenderTreeSupportGtk):
+
+2012-05-05 Martin Robinson <mrobinson@igalia.com>
+
+ Fix the GTK+ TextureMapper accelerated compositing build.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_realize): Properly access the private data
+ structure of the WebKitWebView.
+
+2012-05-05 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] WebKit should properly set the input method context window location
+ https://bugs.webkit.org/show_bug.cgi?id=84981
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::paint): During painting, update the cursor rectangle
+ if possible.
+
+2012-05-05 Gustavo Noronha Silva <gns@gnome.org>
+
+ Unreviewed preparation for 1.9.2.
+
+ * NEWS: changes from 1.9.1.
+
+2012-05-04 Gustavo Noronha Silva <gns@gnome.org>
+
+ [GTK] Simplify how libWebCoreModules is linked in, and fix WebKit2 build
+ https://bugs.webkit.org/show_bug.cgi?id=85691
+
+ * GNUmakefile.am: no longer link libwebkitgtk to libWebCoreModules.
+
+2012-05-04 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
+
+ [GTK] DRT needs an implementation of LayoutTestController::setDefersLoading and ::goBack
+ https://bugs.webkit.org/show_bug.cgi?id=85134
+
+ Reviewed by Martin Robinson.
+
+ Add support for setDefersLoading in DumpRenderTreeSupportGtk.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::setDefersLoading):
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+ (DumpRenderTreeSupportGtk):
+
+2012-05-04 Martin Robinson <mrobinson@igalia.com>
+
+ Fix the GTK+ debug build after the r116114.
+
+ * WebCoreSupport/EditorClientGtk.cpp:
+ (WebKit::EditorClient::handleInputMethodKeyboardEvent): Update an
+ assertion to reflect a real method name in PlatformKeyboardEvent
+ and remove an unnecessary call to preventDefault() which triggered
+ an assertion failure higher in the call stack.
+
+2012-05-04 Nate Chapin <japhet@chromium.org>
+
+ Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+ https://bugs.webkit.org/show_bug.cgi?id=85533
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::FrameLoaderClient):
+ (WebKit):
+ (WebKit::FrameLoaderClient::finishedLoading):
+ * WebCoreSupport/FrameLoaderClientGtk.h:
+ (WebKit::FrameLoaderClient::makeRepresentation):
+ (WebKit::FrameLoaderClient::revertToProvisionalState):
+ (FrameLoaderClient):
+
+2012-05-03 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Rework IME handling to fix bugs and prepare for WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=84556
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Rework input method handling logic into a class called GtkInputMethodFilter.
+ This filter now runs before WebCore event handling, allowing the code to more
+ easily fake simple compositions that should be seen as keystrokes. We can also
+ filter keypresses that should not go to web content at all, such as key up events
+ related to key down events that were filtered.
+
+ Also added is a WebViewInputMethodFilter which is a concrete implementation of
+ GtkInputMethodFilter. This class contains logic for actually sending events to
+ WebCore. In WebKit2 an implementation of GtkInputMethodFilter will send events
+ across the IPC channel.
+
+ * GNUmakefile.am: Add new files to the source list.
+ * WebCoreSupport/ContextMenuClientGtk.cpp:
+ (WebKit::inputMethodsMenuItem): Access the input method context via the filter.
+ * WebCoreSupport/EditorClientGtk.cpp: Remove the tricky logic of input method
+ events from this class, because it's now in the GtkInputMethodFilter.
+ (WebKit::EditorClient::setInputMethodState): Call into the filter.
+ (WebKit::EditorClient::shouldBeginEditing): We no longer need to update the composition here.
+ This is handled by the focus in and focus out logic in the filter.
+ (WebKit::EditorClient::shouldEndEditing): Ditto.
+ (WebKit::EditorClient::respondToChangedSelection): Call into the filter now.
+ (WebKit::EditorClient::handleInputMethodKeyboardEvent): Added this helper which executes
+ any pending composition confirmation or preedit update actions as the default action of
+ the keydown event.
+ (WebKit::EditorClient::handleKeyboardEvent): Call handleInputMethodKeyboardEvent to do
+ any pending composition action.
+ (WebKit::EditorClient::handleInputMethodKeydown): Remove all the logic from this method.
+ Keys are filtered before they are sent to WebCore now and the actual action of input method
+ events happens in the keydown default action to increase compatibility with other browsers.
+ (WebKit::EditorClient::EditorClient): Remove context signal management.
+ (WebKit::EditorClient::~EditorClient): Ditto.
+ * WebCoreSupport/EditorClientGtk.h:
+ (EditorClient): No longer has some members that tracked IME status.
+ * WebCoreSupport/WebViewInputMethodFilter.cpp: Added.
+ * WebCoreSupport/WebViewInputMethodFilter.h: Added.
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_get_property): Get the context from the filter now.
+ (webkit_web_view_key_press_event): Just send events straight to the filter.
+ The filter will decide whether or not to send them to WebCore.
+ (webkit_web_view_key_release_event): Ditto.
+ (webkit_web_view_button_press_event): Use the filter to handle button press
+ events related to IME.
+ (webkit_web_view_focus_in_event): Notify the filter now.
+ (webkit_web_view_focus_out_event): Ditto.
+ (webkit_web_view_realize): The filter takes care of listening for realize now.
+ (webkit_web_view_init): Set the WebView widget on the filter.
+ * webkit/webkitwebviewprivate.h: Change the GtkIMContext member to be a GtkInputMethodFilter member.
+
+2012-05-03 Fady Samuel <fsamuel@chromium.org>
+
+ Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
+ https://bugs.webkit.org/show_bug.cgi?id=70609
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::dumpConfigurationForViewport):
+
+2012-04-18 Jon Honeycutt <jhoneycutt@apple.com>
+
+ FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
+ information about the form being submitted
+ https://bugs.webkit.org/show_bug.cgi?id=84297
+
+ Reviewed by Andy Estes.
+
+ * WebCoreSupport/FrameLoaderClientGtk.h:
+ (WebKit::FrameLoaderClient::dispatchWillSendSubmitEvent):
+ Updated method declaration.
+
+2012-05-01 Ryosuke Niwa <rniwa@webkit.org>
+
+ *Command.h files shouldn't be exported to WebKit layer
+ https://bugs.webkit.org/show_bug.cgi?id=74778
+
+ Reviewed by Eric Seidel.
+
+ * webkit/webkitwebframe.cpp:
+
+2012-04-30 Emil A Eklund <eae@chromium.org>
+
+ [gtk, qt, chromium, win] Fix usage of LayoutUnits and rounding in platform code
+ https://bugs.webkit.org/show_bug.cgi?id=85222
+
+ Reviewed by Eric Seidel.
+
+ Update platform code to use the pixel snapped values for painting rects
+ to line up with device pixels and change platform specific hit testing
+ code to use roundedPoint as hit testing is still mostly done on integer
+ bounds.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::mouseDidMoveOverElement):
+ * webkit/webkithittestresult.cpp:
+ (WebKit::kit):
+ * webkit/webkitwebview.cpp:
+ (getLocationForKeyboardGeneratedContextMenu):
+ (webkit_web_view_query_tooltip):
+
+2012-04-30 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Update NEWS and configure.ac for 1.9.1 release
+ https://bugs.webkit.org/show_bug.cgi?id=85175
+
+ Reviewed by Philippe Normand.
+
+ * NEWS: Added release notes for 1.9.1.
+
+2012-04-30 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
+
+ [GTK] DRT support for layoutTestController.removeOriginAccessWhitelistEntry
+ https://bugs.webkit.org/show_bug.cgi?id=85156
+
+ Reviewed by Martin Robinson.
+
+ Add support for removeOriginAccessWhitelistEntry which allow
+ layout tests to remove origins whitelisting.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::removeWhiteListAccessFromOrigin):
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+ (DumpRenderTreeSupportGtk):
+
+2012-04-29 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
+
+ [GTK] DRT needs an implementation of layoutTestController.setDomainRelaxationForbiddenForURLScheme
+ https://bugs.webkit.org/show_bug.cgi?id=85131
+
+ Reviewed by Martin Robinson.
+
+ Add support for setDomainRelaxationForbiddenForURLScheme which allow
+ disabling domain relaxation.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::setDomainRelaxationForbiddenForURLScheme):
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+ (DumpRenderTreeSupportGtk):
+
+2012-04-22 Adrian Bunk <bunk@stusta.de>
+
+ [GTK] Remove the obsolete Hildon UI extensions
+ https://bugs.webkit.org/show_bug.cgi?id=83420
+
+ Reviewed by Martin Robinson.
+
+ * GNUmakefile.am:
+ * WebCoreSupport/EditorClientGtk.cpp:
+ (WebKit::EditorClient::setInputMethodState):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_button_release_event):
+
+2012-04-20 Zan Dobersek <zandobersek@gmail.com>
+
+ [Gtk][WK1] Use mock scrollbars when testing
+ https://bugs.webkit.org/show_bug.cgi?id=79577
+
+ Reviewed by Daniel Bates.
+
+ Enable mock scrollbars if running DumpRenderTree.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_update_settings):
+
+2012-04-18 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r114506.
+ http://trac.webkit.org/changeset/114506
+ https://bugs.webkit.org/show_bug.cgi?id=84254
+
+ Seems to be making gtk's DumpRenderTree crash occasionally
+ (Requested by tomz on #webkit).
+
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_class_init):
+ (webkit_web_settings_set_property):
+ (webkit_web_settings_get_property):
+ * webkit/webkitwebsettingsprivate.h:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_update_settings):
+ (webkit_web_view_settings_notify):
+
+2012-04-18 Simon Pena <spena@igalia.com>
+
+ [GTK] r114021 triggered media flakyness
+ https://bugs.webkit.org/show_bug.cgi?id=83874
+
+ Reviewed by Philippe Normand.
+
+ When the MediaPlaybackRequiresUserGesture setting was added, no gtk
+ API was implemented to access it.
+
+ This adds a property to gtk WebKit WebSettings, and connects it to
+ WebKit WebView, thus allowing clients to programmatically modify it.
+
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_class_init):
+ (webkit_web_settings_set_property):
+ (webkit_web_settings_get_property):
+ * webkit/webkitwebsettingsprivate.h:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_update_settings):
+ (webkit_web_view_settings_notify):
+
+2012-04-17 Carlos Garnacho <carlos@lanedo.com>
+
+ [GTK] Enable back double buffering on WebKitWebView to fix flickering
+ https://bugs.webkit.org/show_bug.cgi?id=84149
+
+ Reviewed by Martin Robinson.
+
+ Despite having WebKitWebView its own backing buffer, calling
+ gtk_widget_set_double_buffered(...,FALSE) may still pose side
+ effects, such as ensuring that all drawing operations are
+ flushed to the X server before rendering a non-double buffered
+ widget, which may translate into flickering of the parent
+ GdkWindow before the WebKitWebView itself is rendered.
+
+ Enabling back double buffering solves this as all contents are
+ first composited together before getting to the front buffer,
+ but effectively acts as 3rd buffer. This is sort of unavoidable
+ unless GTK+ gains a "let me take ownership of the backing buffer
+ for this widget", which currently lacks.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_init): Remove call to gtk_widget_set_double_buffered(..., FALSE)
+
+2012-04-06 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Accelerated compositing is broken after recent TextureMapper reorganizations
+ https://bugs.webkit.org/show_bug.cgi?id=83393
+
+ Reviewed by Noam Rosenthal.
+
+ Ensure that the layer tree is synced when the root layer is resized.
+
+ * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
+ (WebKit::AcceleratedCompositingContext::resizeRootLayer): Ensure that the layer
+ tree is synced when the root layer resizes and remove a call to recomposite
+ the tree, as it happens anyway.
+
+2012-04-05 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Scrolling some iframes that are partially out of the viewport leads to repaint errors
+ https://bugs.webkit.org/show_bug.cgi?id=83309
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Instead of only updating scrollRect - preservedRegion, update
+ scrollRect - (preservedRegion - offscreenPreservedRegion). This ensures that
+ when part of the scroll rect is moved onscreen from offscreen that part is
+ queued for a redraw.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::scroll): Properly calculate the area to repaint.
+
+2012-04-04 Mariusz Grzegorczyk <mariusz.g@samsung.com>
+
+ Fix build break when CONTEXT_MENUS is disabled.
+ https://bugs.webkit.org/show_bug.cgi?id=82342
+
+ Reviewed by Andreas Kling.
+
+ Fixes build break in WebKit-Gtk, and WebKit-EFL ports when CONTEXT_MENUS macro is disabled.
+
+ * WebCoreSupport/ContextMenuClientGtk.cpp:
+ * WebCoreSupport/ContextMenuClientGtk.h:
+ * webkit/webkitglobals.cpp:
+ (webkit_context_menu_item_get_action):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_button_press_event):
+ (webkit_web_view_class_init):
+ (webkit_web_view_init):
+
+2012-04-03 Simon Pena <spena@igalia.com>
+
+ [GTK] DRT missing didRunInsecureContent notification
+ https://bugs.webkit.org/show_bug.cgi?id=59367
+
+ Reviewed by Philippe Normand.
+
+ Add a new signal "insecure-content-run" to the WebFrame to notify
+ when insecure HTTP content (such as CSS, an iframe or a script) is
+ run from a secure HTTPS WebFrame. Implement didRunInsecureContent
+ in gtk's FrameLoaderClient by means of emitting that signal.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp: Implement
+ didRunInsecureContent by emitting WebFrame's
+ "insecure-content-run" signal
+ (WebKit::FrameLoaderClient::didRunInsecureContent):
+ * webkit/webkitwebframe.cpp: Add "insecure-content-run" signal
+ (webkit_web_frame_class_init):
+
+2012-03-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ GEOLOCATION should be implemented as Page Supplement
+ https://bugs.webkit.org/show_bug.cgi?id=82228
+
+ Reviewed by Adam Barth.
+
+ Geolocation is now a Supplement in Page so the interface
+ has changed for setting up the page's geolocation client
+ initially and accessing the controller later.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::resetGeolocationClientMock):
+ (DumpRenderTreeSupportGtk::setMockGeolocationPermission):
+ (DumpRenderTreeSupportGtk::setMockGeolocationPosition):
+ (DumpRenderTreeSupportGtk::setMockGeolocationError):
+ (DumpRenderTreeSupportGtk::numberOfPendingGeolocationPermissionRequests):
+ * WebCoreSupport/GeolocationClientGtk.cpp:
+ (WebKit::GeolocationClient::updatePosition):
+ (WebKit::GeolocationClient::errorOccured):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_init):
+
+2012-03-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r112553.
+ http://trac.webkit.org/changeset/112553
+ https://bugs.webkit.org/show_bug.cgi?id=82638
+
+ It made all tests crash on Qt WK2 (Requested by Ossy_away on
+ #webkit).
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::resetGeolocationClientMock):
+ (DumpRenderTreeSupportGtk::setMockGeolocationPermission):
+ (DumpRenderTreeSupportGtk::setMockGeolocationPosition):
+ (DumpRenderTreeSupportGtk::setMockGeolocationError):
+ (DumpRenderTreeSupportGtk::numberOfPendingGeolocationPermissionRequests):
+ * WebCoreSupport/GeolocationClientGtk.cpp:
+ (WebKit::GeolocationClient::updatePosition):
+ (WebKit::GeolocationClient::errorOccured):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_init):
+
+2012-03-29 Mark Pilgrim <pilgrim@chromium.org>
+
+ GEOLOCATION should be implemented as Page Supplement
+ https://bugs.webkit.org/show_bug.cgi?id=82228
+
+ Reviewed by Adam Barth.
+
+ Geolocation is now a Supplement in Page so the interface
+ has changed for setting up the page's geolocation client
+ initially and accessing the controller later.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::resetGeolocationClientMock):
+ (DumpRenderTreeSupportGtk::setMockGeolocationPermission):
+ (DumpRenderTreeSupportGtk::setMockGeolocationPosition):
+ (DumpRenderTreeSupportGtk::setMockGeolocationError):
+ (DumpRenderTreeSupportGtk::numberOfPendingGeolocationPermissionRequests):
+ * WebCoreSupport/GeolocationClientGtk.cpp:
+ (WebKit::GeolocationClient::updatePosition):
+ (WebKit::GeolocationClient::errorOccured):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_init):
+
+2012-03-28 Nate Chapin <japhet@chromium.org>
+
+ Remove dispatchDidLoadMainResource callback, since no
+ port implements it.
+ https://bugs.webkit.org/show_bug.cgi?id=82539
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit):
+ * WebCoreSupport/FrameLoaderClientGtk.h:
+ (FrameLoaderClient):
+
+2012-03-28 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Implement PlatformStrategies
+ https://bugs.webkit.org/show_bug.cgi?id=82454
+
+ Reviewed by Xan Lopez.
+
+ * GNUmakefile.am: Add new files to compilation.
+ * WebCoreSupport/PlatformStrategiesGtk.cpp: Added.
+ (PlatformStrategiesGtk::initialize): Initialize platform
+ strategies.
+ (PlatformStrategiesGtk::PlatformStrategiesGtk):
+ (PlatformStrategiesGtk::createCookiesStrategy): Return this.
+ (PlatformStrategiesGtk::createPluginStrategy): Ditto.
+ (PlatformStrategiesGtk::createVisitedLinkStrategy): Ditto.
+ (PlatformStrategiesGtk::createPasteboardStrategy): Return 0, since
+ PasteboardStrategy is only used by mac code for now.
+ (PlatformStrategiesGtk::notifyCookiesChanged):
+ (PlatformStrategiesGtk::refreshPlugins): Refresh the plugin
+ database.
+ (PlatformStrategiesGtk::getPluginInfo): Initialize plugins and
+ populate the given vector with plugins information.
+ (PlatformStrategiesGtk::isLinkVisited): Return whether the given
+ hash is a visited link of the page group.
+ (PlatformStrategiesGtk::addVisitedLink): Add the given hash to the
+ page group visited links.
+ * WebCoreSupport/PlatformStrategiesGtk.h: Added.
+ * webkit/webkitglobals.cpp:
+ (webkitInit): Initialize PlatformStrategiesGtk.
+
+2012-03-26 Joone Hur <joone.hur@collabora.co.uk>
+
+ [GTK] Build fix for Accelerated Compositing with Clutter
+ https://bugs.webkit.org/show_bug.cgi?id=81785
+
+ Reviewed by Martin Robinson.
+
+ AcceleratedCompositingContext was introduced to isolate different accelerated
+ compositing implementations(r104194), but the Clutter implementation doesn't
+ build with it. This fixes the build error.
+
+ * WebCoreSupport/AcceleratedCompositingContext.h:
+ (AcceleratedCompositingContext):
+ * WebCoreSupport/AcceleratedCompositingContextClutter.cpp:
+ (WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext):
+ (WebKit::AcceleratedCompositingContext::renderLayersToWindow):
+ (WebKit::AcceleratedCompositingContext::resizeRootLayer):
+ (WebKit::AcceleratedCompositingContext::syncLayersNow):
+ (WebKit::AcceleratedCompositingContext::syncLayersTimeout):
+ (WebKit):
+
+2012-03-26 Gary Kramlich <grim@reaperworld.com>
+
+ WebKitWebView signals with GError parameters cause crashes when using GObject Introspection
+ https://bugs.webkit.org/show_bug.cgi?id=81977
+
+ Reviewed by Martin Robinson.
+
+ Added marshalers for BOOLEAN:OBJECT,STRING,BOXED and VOID:OBJECT,OBJECT,BOXED
+ and changed the signal signatures for WebKitWebView::load-fail and
+ WebKitWebView::resource-load-failed to use the new marshalers since
+ GError has been a GBoxed type since Gtk 2.26. This fixes these signals
+ for the gobject-introspection bindings.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_class_init):
+ * webkitmarshal.list:
+
+2012-03-24 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Replace occurrences of "uri" in the documentation with "URI"
+ https://bugs.webkit.org/show_bug.cgi?id=82025
+
+ Reviewed by Gustavo Noronha Silva.
+
+ In documentation "uri" should really be written as "URI" so
+ we should fix all existing strings.
+
+ * webkit/webkitdownload.cpp: Replace "uri" with "URI."
+ * webkit/webkitnetworkrequest.cpp: Ditto.
+ * webkit/webkitnetworkresponse.cpp: Ditto.
+ * webkit/webkitwebhistoryitem.cpp: Ditto.
+ * webkit/webkitwebresource.cpp: Ditto.
+ (webkit_web_resource_class_init):
+
+2012-03-23 Zan Dobersek <zandobersek@gmail.com>
+
+ [Gtk] Webkit fails to build with --disable-geolocation
+ https://bugs.webkit.org/show_bug.cgi?id=81451
+
+ Reviewed by Benjamin Poulain.
+
+ Wrap uses of WebCore::Geolocation in WebKitGeolocationPolicyDecision
+ and WebKitWebView in ifdefs, removing compilation errors when compiling
+ with geolocation support disabled. Affected public API methods are then
+ stubs, throwing a warning that feature was not enabled at compile-time.
+
+ * webkit/webkitgeolocationpolicydecision.cpp:
+ (_WebKitGeolocationPolicyDecisionPrivate):
+ (webkit_geolocation_policy_decision_new):
+ (webkit_geolocation_policy_allow):
+ (webkit_geolocation_policy_deny):
+ * webkit/webkitgeolocationpolicydecisionprivate.h:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_init):
+
+2012-03-23 Zan Dobersek <zandobersek@gmail.com>
+
+ [GObject bindings] Supplemental interfaces are not disabled with the "Conditional" attribute
+ https://bugs.webkit.org/show_bug.cgi?id=80030
+
+ Reviewed by Martin Robinson.
+
+ Add a private macro that can be used when necessary to throw a warning
+ about a future not enabled at compile-time.
+
+ * webkit/webkitglobalsprivate.h:
+
+2012-03-23 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Add a way to expose well known names for items in the default context menu
+ https://bugs.webkit.org/show_bug.cgi?id=67660
+
+ Reviewed by Martin Robinson.
+
+ Add WebKitContextMenuAction enum containing all possible context
+ menu item actions.
+
+ * GNUmakefile.am: Add new files to compilation.
+ * WebCoreSupport/ContextMenuClientGtk.cpp:
+ (WebKit::inputMethodsMenuItem): Use WebCore context menu classes
+ to create the context menu and its items to make sure all items
+ have a GtkAction associated.
+ (WebKit::insertControlCharacter):
+ (WebKit::unicodeMenuItem): Ditto.
+ * tests/testcontextmenu.c: Added.
+ (testInfoNew):
+ (testInfoDestroy):
+ (contextMenuFixtureSetup):
+ (contextMenuFixtureTeardown):
+ (checkAction):
+ (checkActionWithSubmenu):
+ (checkSeparator):
+ (contextMenuCallback):
+ (pushEvent):
+ (loadStatusCallback):
+ (mapEventCallback):
+ (testContextMenu):
+ (contextMenuCustomItemCallback):
+ (testContextMenuCustomItem):
+ (main):
+ * webkit/webkitglobals.cpp:
+ (webkit_context_menu_item_get_action): Return the
+ WebKitContextMenuAction for the given context menu item.
+ * webkit/webkitglobals.h:
+
+2012-03-23 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Unreviewed. Rename a variable name in API documentation.
+
+ Rename keyboard_mode to triggered_with_keyboard in
+ WebKitWebView::context-menu signal documentation as suggested by
+ Martin and Gustavo. I forgot to make this change before landing
+ previous patch.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_class_init):
+
+2012-03-23 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Add a signal to allow applications to handle its own context menu
+ https://bugs.webkit.org/show_bug.cgi?id=49904
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * tests/testhittestresult.c:
+ (load_status_cb): Test x, y properties of WebKitHitTestResult.
+ * webkit/webkithittestresult.cpp:
+ (webkit_hit_test_result_get_property):
+ (webkit_hit_test_result_set_property):
+ (webkit_hit_test_result_class_init): Add x and y construct only
+ properties to keep the coordinates of the event relative to view's
+ widget.
+ (WebKit::kit):
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_class_init): Mark enable-default-context-menu
+ property as deprecated.
+ * webkit/webkitwebview.cpp:
+ (prepareMouseEventForFrame):
+ (defaultContextMenuEnabled): Helper function to check whether
+ default context menu setting is enabled or not.
+ (webkit_web_view_forward_context_menu_event): Emit the new
+ context-menu signal.
+ (webkit_web_view_popup_menu_handler):
+ (webkit_web_view_button_press_event):
+ (webkit_web_view_class_init): Add new context-menu signal and mark
+ populate-popup as deprecated.
+ * webkitmarshal.list:
+
+2012-03-23 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Unreviewed. Fix GTK+ build after r111707.
+
+ * WebCoreSupport/UserMediaClientGtk.h:
+
+2012-03-22 Mao Yujie <yujie.mao@intel.com>
+
+ [GTK] Add MediaStream feature to avoid MediaStream test failure
+ https://bugs.webkit.org/show_bug.cgi?id=81727
+
+ Reviewed by Martin Robinson.
+
+ * GNUmakefile.am:
+ * WebCoreSupport/UserMediaClientGtk.cpp: Added.
+ (WebKit):
+ (WebKit::UserMediaClientGtk::UserMediaClientGtk):
+ (WebKit::UserMediaClientGtk::~UserMediaClientGtk):
+ (WebKit::UserMediaClientGtk::pageDestroyed):
+ (WebKit::UserMediaClientGtk::requestUserMedia):
+ (WebKit::UserMediaClientGtk::cancelUserMediaRequest):
+ * WebCoreSupport/UserMediaClientGtk.h: Added.
+ (WebKit):
+ (UserMediaClientGtk):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_init):
+
+2012-03-22 Sergio Villar Senin <svillar@igalia.com>
+
+ [GTK] icon database requests not dispatched until new data arrives
+ https://bugs.webkit.org/show_bug.cgi?id=81665
+
+ Reviewed by Martin Robinson.
+
+ Wait for the import to finish before reporting that the favicon
+ cache does not have a pixbuf for an URL.
+
+ Changes already covered by the favicon database unit tests.
+
+ * webkit/webkitfavicondatabase.cpp:
+ (webkit_favicon_database_get_favicon_pixbuf):
+
+2012-03-22 Carlos Garcia Campos <cgarcia@bb-webkit-rel-64.local.igalia.com>
+
+ [GTK] Use the angle-bracket form to include wtf headers
+ https://bugs.webkit.org/show_bug.cgi?id=81884
+
+ Reviewed by Eric Seidel.
+
+ Use #include <wtf/foo> instead of #include "foo".
+
+ * WebCoreSupport/DocumentLoaderGtk.cpp:
+ * WebCoreSupport/DragClientGtk.h:
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ * WebCoreSupport/FullscreenVideoController.h:
+ * WebCoreSupport/GeolocationClientGtk.h:
+ * WebCoreSupport/InspectorClientGtk.h:
+ * WebCoreSupport/TextCheckerClientGtk.cpp:
+ * WebCoreSupport/TextCheckerClientGtk.h:
+ * webkit/webkitdownload.cpp:
+ * webkit/webkitfavicondatabase.cpp:
+ * webkit/webkitglobals.cpp:
+ * webkit/webkithittestresult.cpp:
+ * webkit/webkitnetworkrequest.cpp:
+ * webkit/webkitnetworkresponse.cpp:
+ * webkit/webkitspellcheckerenchant.cpp:
+ * webkit/webkitwebdatasourceprivate.h:
+ * webkit/webkitwebsettings.cpp:
+ * webkit/webkitwebsettingsprivate.h:
+ * webkit/webkitwebviewprivate.h:
+
+2012-03-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert hasSpellingMarker to use Internals interface.
+ https://bugs.webkit.org/show_bug.cgi?id=81300
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove DumpRenderTreeSupportGtk::webkitWebFrameSelectionHasSpellingMarker support,
+ since it can support in the cross-port way through the Internals interface.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+ (DumpRenderTreeSupportGtk):
+
+2012-03-19 Adam Barth <abarth@webkit.org>
+
+ Remove support for "magic" iframe
+ https://bugs.webkit.org/show_bug.cgi?id=81590
+
+ Reviewed by Eric Seidel.
+
+ Remove FrameLoaderClient methods that no longer exist.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit):
+ * WebCoreSupport/FrameLoaderClientGtk.h:
+ (FrameLoaderClient):
+
+2012-03-19 Gustavo Noronha Silva <gns@gnome.org>
+
+ [GTK] libWebCore.la has become too big for make
+ https://bugs.webkit.org/show_bug.cgi?id=81582
+
+ Unreviewed build fix.
+
+ * GNUmakefile.am: link-in the new libDerivedWebCore.la
+
+2012-03-16 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Allow running run-gtk-tests during 'make dist'
+ https://bugs.webkit.org/show_bug.cgi?id=81415
+
+ Reviewed by Philippe Normand.
+
+ * GNUmakefile.am: Remove 'make check' rules from the makefile
+ Instead this functionality is now in the Tools makefile.
+
+2012-03-16 Victor Lucero <victor.lucero@ipartner.cl>
+
+ [GTK] WebKitWebResource::load-failed uses the wrong marshaller
+ https://bugs.webkit.org/show_bug.cgi?id=81229
+
+ Reviewed by Philippe Normand.
+
+ * webkit/webkitwebresource.cpp:
+ (webkit_web_resource_class_init): load-failed signal in WebkitWebResource was using the wrong marshaller
+
+2012-03-14 Landry Breuil <landry@openbsd.org>
+
+ WebKit/gtk/resources/error.html font-size error
+ https://bugs.webkit.org/show_bug.cgi?id=39232
+
+ Reviewed by Martin Robinson.
+
+ Fix font-size in the 404 error page. Apparently the % is filtered out,
+ so 120% becomes 120 and the error message is huge. Experienced in epiphany.
+
+ * resources/error.html: Double the % so it doesn't get filtered
+
+2012-03-16 Carlos Garcia Campos <cgarcia@igalia.com> and Sergio Villar Senin <svillar@igalia.com>
+
+ [GTK] WebKitIconDatabase doesn't keep icons cached
+ https://bugs.webkit.org/show_bug.cgi?id=56200
+
+ Reviewed by Martin Robinson.
+
+ * GNUmakefile.am: Added new files to compilation.
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::registerForIconNotification): instruct
+ the WebView to listen to IconDatabase's notifications.
+ (WebKit::FrameLoaderClient::dispatchDidReceiveIcon): ask both
+ WebView and IconDatabase to issue notifications for a new icon.
+ * docs/webkitgtk-docs.sgml: updated docs.
+ * docs/webkitgtk-sections.txt: ditto.
+ * docs/webkitgtk.types: ditto.
+ * tests/testicondatabase.c: Added.
+ (server_callback):
+ (deleteDatabaseFileIfExists):
+ (testWebkitIconDatabaseSetPath):
+ (iconDatabaseGetIconValidCallback):
+ (iconDatabaseGetIconInvalidCallback):
+ (iconDatabaseGetIconCancelledCallback):
+ (mainLoopQuitIfLoadCompleted):
+ (idleQuitLoopCallback):
+ (webkitWebViewIconLoaded):
+ (loadURI):
+ (faviconDatabaseGetFaviconValidIdle):
+ (faviconDatabaseGetFaviconInvalidIdle):
+ (faviconDatabaseGetFaviconCancelledIdle):
+ (testWebKitFaviconDatabaseGetFavicon):
+ (testWebKitFaviconDatabaseGetFaviconURI):
+ (testWebKitFaviconDatabaseRemoveAll):
+ (testWebKitFaviconDatabaseCloseDatabase):
+ (main):
+ * webkit/webkit.h: added new API.
+ * webkit/webkitdefines.h: added WebKitFaviconDatabase.
+ * webkit/webkitfavicondatabase.cpp:
+ (IconDatabaseClientGtk): IconDatabaseClient implementation.
+ (IconDatabaseClientGtk::performImport):
+ (IconDatabaseClientGtk::didRemoveAllIcons):
+ (IconDatabaseClientGtk::didImportIconURLForPageURL):
+ (IconDatabaseClientGtk::didImportIconDataForPageURL):
+ (IconDatabaseClientGtk::didChangeIconForPageURL):
+ (IconDatabaseClientGtk::didFinishURLImport):
+ (PendingIconRequest): machinery for asynchronous calls.
+ (PendingIconRequest::PendingIconRequest):
+ (PendingIconRequest::~PendingIconRequest):
+ (PendingIconRequest::pageURI):
+ (PendingIconRequest::asyncResult):
+ (PendingIconRequest::asyncResultCancel):
+ (PendingIconRequest::asyncResultCompleteInIdle):
+ (PendingIconRequest::asyncResultComplete):
+ (_WebKitIconDatabasePrivate):
+ (webkit_favicon_database_dispose): GObject stuff.
+ (webkit_favicon_database_set_property): ditto.
+ (webkit_favicon_database_get_property): ditto.
+ (webkit_favicon_database_class_init): ditto.
+ (webkit_favicon_database_init): ditto.
+ (webkitFaviconDatabaseNotifyAndUpdateExpiration): notify about new
+ icons and update expiration times.
+ (webkitFaviconDatabaseDispatchDidReceiveIcon): "protected" method
+ called by the FrameLoaderClient to inform about new icons.
+ (webkit_favicon_database_get_path): retrieves database path.
+ (selectQueryCallback): releases expired icons to let IconDatabase
+ prune them.
+ (webkitFaviconDatabasePruneExpiredIcons): selects the icons to be
+ pruned by the IconDatabase.
+ (webkitFaviconDatabaseClose): close the database.
+ (createExpirationTimesDatabaseTableIfNotExists): creates the
+ database used to control expiration times.
+ (webkit_favicon_database_set_path): opens the database delaying the
+ cleanup of icons until the import is complete.
+ (webkit_favicon_database_get_favicon_uri): returns the uri of the
+ favicon.
+ (getIconPixbufSynchronously): helper function to call
+ IconDatabase::synchronousIconURLForPageURL().
+ (webkit_favicon_database_try_get_favicon_pixbuf): returns the
+ favicon if exists and is loaded from disk.
+ (webkitFaviconDatabaseGetOrCreateRequests): helper function to get
+ the vector of pending requests for the given uri.
+ (webkitfavicondatabaseDeleteRequests): helper function to remove the
+ vector of pending requests for the given uri.
+ (getIconPixbufCancelled):
+ (webkitFaviconDatabaseGetIconPixbufCancelled):
+ (webkit_favicon_database_get_favicon_pixbuf): asynchronously
+ retrieve icons from the database.
+ (webkit_favicon_database_get_favicon_pixbuf_finish): finishes an
+ operation started with webkit_icon_database_get_icon_pixbuf().
+ (webkitFaviconDatabaseProcessPendingIconsForURI): process pending
+ requests once the import is finished.
+ (webkitFaviconDatabaseImportFinished): check pending requests and
+ delete those that ask for icons that do not exist in the database.
+ (webkit_favicon_database_clear): clears the database.
+ * webkit/webkitfavicondatabase.h: added.
+ (_WebKitFaviconDatabase):
+ (_WebKitFaviconDatabaseClass):
+ * webkit/webkitfavicondatabaseprivate.h: Added.
+ * webkit/webkitglobals.cpp:
+ (webkit_get_favicon_database): retrieves the new
+ WebKitFaviconDatabase.
+ (webkitExit): unref icon database on exit.
+ * webkit/webkitglobals.h: added new API.
+ * webkit/webkiticondatabase.cpp: added deprecation documentation.
+ (webkit_icon_database_class_init):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_try_get_icon_pixbuf): new API that uses the new
+ WebKitFaviconDatabase API.
+ (webkitWebViewIconLoaded): dispatch the icon-loaded signal when
+ requested by the FrameLoaderClient.
+ (webkitWebViewRegisterForIconNotification): starts/stops listening
+ to icon database notifications.
+ * webkit/webkitwebview.h: added new API.
+ * webkit/webkitwebviewprivate.h: added some protected methods.
+
+2012-03-16 Zan Dobersek <zandobersek@gmail.com>
+
+ [Gtk] Add computedStyleIncludingVisitedInfo to DumpRenderTreeSupport
+ https://bugs.webkit.org/show_bug.cgi?id=81232
+
+ Reviewed by Philippe Normand.
+
+ Add computedStyleIncludingVisitedInfo helper method to
+ DumpRenderTreeSupportGtk.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::computedStyleIncludingVisitedInfo):
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+ (DumpRenderTreeSupportGtk):
+
+2012-03-16 Zan Dobersek <zandobersek@gmail.com>
+
+ [Gtk] Properly set forms tests-specific settings
+ https://bugs.webkit.org/show_bug.cgi?id=81237
+
+ Reviewed by Philippe Normand.
+
+ Call Settings::setInteractiveFormValidationEnabled and
+ Settings::setValidationMessageTimerMagnification with
+ proper values when in testing mode.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_init):
+
+2012-03-15 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Implement unicode submenu items
+ https://bugs.webkit.org/show_bug.cgi?id=81117
+
+ Reviewed by Martin Robinson.
+
+ * WebCoreSupport/ContextMenuClientGtk.cpp:
+ (WebKit::getUnicodeMenuItemPosition): Helper function to get the
+ position of the unicode menu item in the default context menu.
+ (WebKit::ContextMenuClient::getCustomMenuFromDefaultItems): Remove
+ code to build the unicode menu, since it's now built by WebCore.
+ * WebCoreSupport/EditorClientGtk.cpp:
+ (WebKit::EditorClient::shouldShowUnicodeMenu): Check whether
+ unicode menu should be shown based on gtk-show-unicode-menu GtkSetting.
+ * WebCoreSupport/EditorClientGtk.h:
+
+2012-03-13 Adam Barth <abarth@webkit.org> && Benjamin Poulain <bpoulain@apple.com>
+
+ Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
+ https://bugs.webkit.org/show_bug.cgi?id=78853
+
+ Reviewed by Adam Barth.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit):
+ * WebCoreSupport/ChromeClientGtk.h:
+ (WebKit::ChromeClient::scrollRectIntoView):
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::resetGeolocationClientMock):
+ (DumpRenderTreeSupportGtk::setMockGeolocationPermission):
+ (DumpRenderTreeSupportGtk::setMockGeolocationPosition):
+ (DumpRenderTreeSupportGtk::setMockGeolocationError):
+ (DumpRenderTreeSupportGtk::numberOfPendingGeolocationPermissionRequests):
+ * WebCoreSupport/GeolocationClientGtk.cpp:
+ (WebKit::GeolocationClient::requestPermission):
+ (WebKit::GeolocationClient::cancelPermissionRequest):
+ * WebCoreSupport/GeolocationClientGtk.h:
+ (WebKit):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_init):
+
+2012-03-12 Antonio Gomes <agomes@rim.com>
+
+ Convert nodesFromRect tests to use Internals interface
+ https://bugs.webkit.org/show_bug.cgi?id=80886
+
+ Reviewed by Ryosuke Niwa.
+
+ Removed DRTSupportGtk::nodesFromRect support, since
+ it can work in the cross-port way through the
+ Internals interface.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+ (DumpRenderTreeSupportGtk):
+
2012-03-07 Kangil Han <kangil.han@samsung.com>
[DRT] Remove PlainTextController implementations.
diff --git a/Source/WebKit/gtk/GNUmakefile.am b/Source/WebKit/gtk/GNUmakefile.am
index 069b5b0a5..11d49838e 100644
--- a/Source/WebKit/gtk/GNUmakefile.am
+++ b/Source/WebKit/gtk/GNUmakefile.am
@@ -1,8 +1,3 @@
-
-# Programs to run the WebKitGtk unit tests
-GTESTER = gtester
-GTESTER_REPORT = gtester-report
-
lib_LTLIBRARIES += \
libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
@@ -57,7 +52,6 @@ libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPF
$(javascriptcore_cppflags) \
$(webkitgtk_cppflags) \
-fno-strict-aliasing \
- $(HILDON_CPPFLAGS) \
$(CLUTTER_CFLAGS) \
$(CLUTTER_GTK_CFLAGS) \
$(COVERAGE_CFLAGS) \
@@ -67,7 +61,6 @@ libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPF
$(GLIB_CFLAGS) \
$(GSTREAMER_CFLAGS) \
$(GTK_CFLAGS) \
- $(HILDON_CFLAGS) \
$(LIBSOUP_CFLAGS) \
$(LIBXML_CFLAGS) \
$(LIBXSLT_CFLAGS) \
@@ -86,7 +79,6 @@ libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBA
libWebCore.la \
libWebCoreGtk.la \
libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
- $(webcore_ldflags) \
$(CAIRO_LIBS) \
$(CLUTTER_LIBS) \
$(CLUTTER_GTK_LIBS) \
@@ -98,7 +90,6 @@ libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBA
$(GLIB_LIBS) \
$(GSTREAMER_LIBS) \
$(GTK_LIBS) \
- $(HILDON_LIBS) \
$(JPEG_LIBS) \
$(LIBSOUP_LIBS) \
$(LIBXML_LIBS) \
@@ -121,6 +112,7 @@ webkitgtk_static_h_api += \
$(srcdir)/Source/WebKit/gtk/webkit/webkitdefines.h \
$(srcdir)/Source/WebKit/gtk/webkit/webkitdownload.h \
$(srcdir)/Source/WebKit/gtk/webkit/webkiterror.h \
+ $(srcdir)/Source/WebKit/gtk/webkit/webkitfavicondatabase.h \
$(srcdir)/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.h \
$(srcdir)/Source/WebKit/gtk/webkit/webkitglobals.h \
$(srcdir)/Source/WebKit/gtk/webkit/webkithittestresult.h \
@@ -215,10 +207,18 @@ webkitgtk_sources += \
Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
Source/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
+ Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.h \
+ Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp \
+ Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.cpp \
+ Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.h \
+ Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.cpp \
+ Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.h \
Source/WebKit/gtk/webkit/webkitapplicationcache.cpp \
Source/WebKit/gtk/webkit/webkitdownload.cpp \
Source/WebKit/gtk/webkit/webkitdownloadprivate.h \
Source/WebKit/gtk/webkit/webkiterror.cpp \
+ Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp \
+ Source/WebKit/gtk/webkit/webkitfavicondatabaseprivate.h \
Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp \
Source/WebKit/gtk/webkit/webkitgeolocationpolicydecisionprivate.h \
Source/WebKit/gtk/webkit/webkitglobals.cpp \
@@ -405,7 +405,6 @@ dist_resources_DATA = \
$(shell ls $(srcdir)/Source/WebKit/gtk/resources/*.html)
# Build unit tests
-noinst_PROGRAMS += $(TEST_PROGS)
webkit_tests_cflags = \
-fno-strict-aliasing \
-I$(srcdir)/Source/JavaScriptCore/ForwardingHeaders \
@@ -434,12 +433,14 @@ webkit_tests_ldflags = \
-no-install \
-no-fast-install
-TEST_PROGS += \
+noinst_PROGRAMS += \
Programs/unittests/testapplicationcache \
+ Programs/unittests/testcontextmenu \
Programs/unittests/testdomdocument \
Programs/unittests/testdomdomwindow \
Programs/unittests/testdomnode \
Programs/unittests/testhttpbackend \
+ Programs/unittests/testfavicondatabase \
Programs/unittests/testloading \
Programs/unittests/testglobals \
Programs/unittests/testmimehandling \
@@ -468,6 +469,11 @@ Programs_unittests_testapplicationcache_CFLAGS = $(webkit_tests_cflags)
Programs_unittests_testapplicationcache_LDADD = $(webkit_tests_ldadd)
Programs_unittests_testapplicationcache_LDFLAGS = $(webkit_tests_ldflags)
+Programs_unittests_testcontextmenu_SOURCES = Source/WebKit/gtk/tests/testcontextmenu.c
+Programs_unittests_testcontextmenu_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testcontextmenu_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testcontextmenu_LDFLAGS = $(webkit_tests_ldflags)
+
Programs_unittests_testdomdocument_SOURCES = Source/WebKit/gtk/tests/testdomdocument.c
Programs_unittests_testdomdocument_CFLAGS = $(webkit_tests_cflags)
Programs_unittests_testdomdocument_LDADD = $(webkit_tests_ldadd)
@@ -488,6 +494,11 @@ Programs_unittests_testhttpbackend_CFLAGS = $(webkit_tests_cflags)
Programs_unittests_testhttpbackend_LDADD = $(webkit_tests_ldadd)
Programs_unittests_testhttpbackend_LDFLAGS = $(webkit_tests_ldflags)
+Programs_unittests_testfavicondatabase_SOURCES = Source/WebKit/gtk/tests/testfavicondatabase.c Source/WebKit/gtk/tests/test_utils.c
+Programs_unittests_testfavicondatabase_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testfavicondatabase_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testfavicondatabase_LDFLAGS = $(webkit_tests_ldflags)
+
Programs_unittests_testglobals_SOURCES = Source/WebKit/gtk/tests/testglobals.c
Programs_unittests_testglobals_CFLAGS = $(webkit_tests_cflags)
Programs_unittests_testglobals_LDADD = $(webkit_tests_ldadd)
@@ -612,22 +623,3 @@ install-data-local: po-install-data-local
installdirs-data-local: po-installdirs-data-local
uninstall-local: po-uninstall-local
-# Run all tests in cwd
-# FIXME: we should run this under xvfb
-test: $(TEST_PROGS)
- $(GTESTER) --verbose $(TEST_PROGS);
-
-# test-report: run tests in cwd and generate report
-# full-report: run tests in cwd with -m perf and -m slow and generate report
-# perf-report: run tests in cwd with -m perf and generate report
-test-report full-report perf-report: $(TEST_PROGS)
- @ case $@ in \
- test-report) test_options="-k";; \
- full-report) test_options="-k -m=perf";; \
- perf-report) test_options="-k -m=perf -m=slow";; \
- esac ; \
- $(GTESTER) --verbose $$test_options -o test-report.xml $(TEST_PROGS); \
- $(GTESTER_REPORT) test-report.xml > test-report.html ;
-
-.PHONY: test test-report perf-report full-report
-check-local: test
diff --git a/Source/WebKit/gtk/NEWS b/Source/WebKit/gtk/NEWS
index 0aa4791e7..6313ac61d 100644
--- a/Source/WebKit/gtk/NEWS
+++ b/Source/WebKit/gtk/NEWS
@@ -1,4 +1,89 @@
=================
+WebKitGTK+ 1.9.2
+=================
+
+What's new in WebKitGTK+ 1.9.2?
+
+ - Fix exceeding arguments list build problem, by splitting more
+ files off libWebCore into the new libWebCoreModules convenience
+ library.
+ - Remove left over soup_session_pause_message() and properly handle
+ that case for defersLoading.
+ - Fix response being the new one instead of the one that caused the
+ redirect when emitting WebKitWebView::resource-request-starting.
+ - Refactor of IME handling to fix bugs and prepare for sharing with
+ WebKit2.
+ - Add file chooser API to WebKit2.
+
+=================
+WebKitGTK+ 1.9.1
+=================
+
+What's new in WebKitGTK+ 1.9.1?
+
+ - Geolocation support is built by default now. Use
+ --disable-geolocation during build to disable it.
+ - LINGUAS environment variable is honored now.
+ - Throttle DNS prefetching to avoid overloading the resolver.
+ - Remove defunct WebInspector GSettings mapping.
+ - Fix a crash when emitting signals with a GError parameter when
+ using GObject Introspection.
+ - Fix flickering during scrolling and resizing in newer versions of
+ GTK+.
+ - Fix a bug where the Content-Length header was not sent for certain
+ XMLHttpRequests.
+ - Fix a WebProcess segmentation fault related to clipboard handling.
+ - Fix a repainting error that occurred during interior frame
+ scrolling.
+ - Fix a crash when WebKitWebView is created without a WebContext.
+ - Fix a crash that could occur during synchronous XMLHttpRequests.
+ - Fix rendering of combobox / menulist buttons that do not have
+ separators.
+ - Fix the rendering of toggle buttons with larger-than-default
+ widths and heights with the Adwaita theme.
+ - Fix misrendering of text shadow extents in some situations.
+ - Fix a crash when closing browser with inspector window opened.
+ - Now interpret plugin metadata as UTF-8.
+ - Fix rendering of GtkWidgets embedded on WebKitWebView.
+ - Web content (except plugins) should no longer steal focus from
+ other GTK+ widgets.
+ - WebKit will try to use the default libsoup proxy resolver
+ automatically.
+ - Performance improvements in WebKitWebView by avoiding doing a lot
+ of work in size_allocate when the view is not mapped.
+ - Web Timing is now enabled.
+ - Add support for smooth scrolling.
+ - Implement unicode submenu items.
+ - FFTFrame implementation in GStreamer backend.
+ - More work on GStreamer 0.11 support.
+ - Add support for windowed plugins in WebKit2.
+ - Add full printing support to WebKit2.
+ - Add a new favicon database API that corrects the problems of the
+ old one.
+ - Add WebKitWebView::context-menu signal to allow applications to
+ handle its own context menu. WebKitWebView::populate-popup signal
+ and default-context setting are now deprecated.
+ - Well known names for menu items in the default context menu are
+ now exposed in an enumeration.
+ - Add entering/leaving fullscreen signals to WebKit API.
+ - Add enable-webaudio setting to WebKit2 GTK+ API.
+ - Add support for registering custom uri schemes in WebKit2.
+ - Add WebKitWebView::mouse-target-changed signal to WebKit2 GTK+
+ API.
+ - Add enter/leave fullscreen signals to WebKit2 GTK+ API.
+ - Add find API to WebKit2 GTK+ API.
+ - Use a single signal for script dialogs in WebKit2 GTK+ API.
+ - Add cookies API to WebKit2 GTK+ API.
+ - Add webkit_print_operation_print() to WebKit2 GTK+ API.
+ - Add resources API to WebKit2 GTK+ API.
+ - Add support for Response policy decisions to WebKit2 GTK+ API.
+ - Add javascript clipboard functionality settings to WebKit2 GTK+
+ API.
+ - Add cut, copy and paste methods to WebKit2 GTK+ API.
+ - Add zoom-text-only setting to WebKit2 GTK+ API.
+ - Add webkit_web_view_run_javascript() to WebKit2 GTK+ API.
+
+=================
WebKitGTK+ 1.7.5
=================
diff --git a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h
index b2567eb5f..1120d867e 100644
--- a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h
+++ b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h
@@ -63,14 +63,15 @@ public:
private:
WebKitWebView* m_webView;
- OwnPtr<WebCore::GraphicsLayer> m_rootGraphicsLayer;
unsigned int m_syncTimerCallbackId;
#if USE(CLUTTER)
+ WebCore::GraphicsLayer* m_rootGraphicsLayer;
GtkWidget* m_rootLayerEmbedder;
#elif USE(TEXTURE_MAPPER_GL)
WebCore::GLContext* glContext();
WebCore::TextureMapperLayer* m_rootTextureMapperLayer;
+ OwnPtr<WebCore::GraphicsLayer> m_rootGraphicsLayer;
OwnPtr<WebCore::TextureMapper> m_textureMapper;
#endif
diff --git a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp
index 2e95fc56e..00a191a90 100644
--- a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp
@@ -25,6 +25,7 @@
#include "Frame.h"
#include "FrameView.h"
#include "GraphicsLayer.h"
+#include "NotImplemented.h"
#include "webkitwebviewprivate.h"
#include <clutter-gtk/clutter-gtk.h>
#include <clutter/clutter.h>
@@ -35,8 +36,8 @@ namespace WebKit {
AcceleratedCompositingContext::AcceleratedCompositingContext(WebKitWebView* webView)
: m_webView(webView)
- , m_rootGraphicsLayer(0)
, m_syncTimerCallbackId(0)
+ , m_rootGraphicsLayer(0)
, m_rootLayerEmbedder(0)
{
}
@@ -52,7 +53,7 @@ bool AcceleratedCompositingContext::enabled()
return m_rootGraphicsLayer;
}
-bool AcceleratedCompositingContext::renderLayersToWindow(cairo_t* widgetCr, const IntRect& clipRect)
+bool AcceleratedCompositingContext::renderLayersToWindow(const IntRect& clipRect)
{
notImplemented();
return false;
@@ -108,7 +109,7 @@ void AcceleratedCompositingContext::resizeRootLayer(const IntSize& size)
allocation.y = 0;
allocation.width = size.width();
allocation.height = size.height();
- gtk_widget_size_allocate(GTK_WIDGET(m_webView->priv->rootLayerEmbedder), &allocation);
+ gtk_widget_size_allocate(GTK_WIDGET(m_rootLayerEmbedder), &allocation);
}
static gboolean syncLayersTimeoutCallback(AcceleratedCompositingContext* context)
@@ -127,11 +128,24 @@ void AcceleratedCompositingContext::markForSync()
m_syncTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, 0, reinterpret_cast<GSourceFunc>(syncLayersTimeoutCallback), this, 0);
}
-void AcceleratedCompositingContext::syncLayersTimeout()
+void AcceleratedCompositingContext::syncLayersNow()
{
+ if (m_rootGraphicsLayer)
+ m_rootGraphicsLayer->syncCompositingStateForThisLayerOnly();
+
core(m_webView)->mainFrame()->view()->syncCompositingStateIncludingSubframes();
}
+void AcceleratedCompositingContext::syncLayersTimeout()
+{
+ m_syncTimerCallbackId = 0;
+ syncLayersNow();
+ if (!m_rootGraphicsLayer)
+ return;
+
+ renderLayersToWindow(IntRect());
+}
+
void AcceleratedCompositingContext::notifyAnimationStarted(const WebCore::GraphicsLayer*, double time)
{
ASSERT_NOT_REACHED();
diff --git a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp
index 6d338970a..8c63a8772 100644
--- a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp
@@ -139,7 +139,7 @@ void AcceleratedCompositingContext::resizeRootLayer(const IntSize& size)
if (!m_rootGraphicsLayer)
return;
m_rootGraphicsLayer->setSize(size);
- m_rootGraphicsLayer->setNeedsDisplay();
+ m_rootGraphicsLayer->syncCompositingStateForThisLayerOnly();
}
static gboolean syncLayersTimeoutCallback(AcceleratedCompositingContext* context)
diff --git a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index d282f290a..0f27b1428 100644
--- a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -33,6 +33,7 @@
#include "FileIconLoader.h"
#include "FileSystem.h"
#include "FloatRect.h"
+#include "FocusController.h"
#include "FrameLoadRequest.h"
#include "FrameView.h"
#include "GtkUtilities.h"
@@ -598,6 +599,13 @@ void ChromeClient::paint(WebCore::Timer<ChromeClient>*)
m_dirtyRegion = Region();
m_lastDisplayTime = currentTime();
m_repaintSoonSourceId = 0;
+
+ // We update the IM context window location here, because we want it to be
+ // synced with cursor movement. For instance, a text field can move without
+ // the selection changing.
+ Frame* focusedFrame = core(m_webView)->focusController()->focusedOrMainFrame();
+ if (focusedFrame && focusedFrame->editor()->canEdit())
+ m_webView->priv->imFilter.setCursorRect(frame->selection()->absoluteCaretBounds());
}
void ChromeClient::invalidateRootView(const IntRect&, bool immediate)
@@ -638,8 +646,12 @@ void ChromeClient::scroll(const IntSize& delta, const IntRect& rectToScroll, con
m_dirtyRegion.unite(movedDirtyRegionInScrollRect);
}
- // Compute the scroll repaint region.
- Region scrollRepaintRegion = subtract(rectToScroll, translate(rectToScroll, delta));
+ // Compute the scroll repaint region. We ensure that we are not subtracting areas
+ // that we've scrolled from outside the viewport from the repaint region.
+ IntRect onScreenScrollRect = rectToScroll;
+ onScreenScrollRect.intersect(IntRect(IntPoint(), enclosingIntRect(pageRect()).size()));
+ Region scrollRepaintRegion = subtract(rectToScroll, translate(onScreenScrollRect, delta));
+
m_dirtyRegion.unite(scrollRepaintRegion);
m_displayTimer.startOneShot(0);
@@ -746,7 +758,7 @@ void ChromeClient::mouseDidMoveOverElement(const HitTestResult& hit, unsigned mo
if (Node* node = hit.innerNonSharedNode()) {
Frame* frame = node->document()->frame();
FrameView* view = frame ? frame->view() : 0;
- m_webView->priv->tooltipArea = view ? view->contentsToWindow(node->getRect()) : IntRect();
+ m_webView->priv->tooltipArea = view ? view->contentsToWindow(node->getPixelSnappedRect()) : IntRect();
} else
m_webView->priv->tooltipArea = IntRect();
}
@@ -862,22 +874,6 @@ void ChromeClient::setCursorHiddenUntilMouseMoves(bool)
notImplemented();
}
-void ChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
-{
- WebKitWebFrame* webFrame = kit(frame);
- GRefPtr<WebKitGeolocationPolicyDecision> policyDecision(adoptGRef(webkit_geolocation_policy_decision_new(webFrame, geolocation)));
-
- gboolean isHandled = FALSE;
- g_signal_emit_by_name(m_webView, "geolocation-policy-decision-requested", webFrame, policyDecision.get(), &isHandled);
- if (!isHandled)
- webkit_geolocation_policy_deny(policyDecision.get());
-}
-
-void ChromeClient::cancelGeolocationPermissionRequestForFrame(WebCore::Frame* frame, WebCore::Geolocation*)
-{
- g_signal_emit_by_name(m_webView, "geolocation-policy-decision-cancelled", kit(frame));
-}
-
bool ChromeClient::selectItemWritingDirectionIsNatural()
{
return false;
diff --git a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
index dcea2f0c4..22b54f7c7 100644
--- a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
@@ -134,8 +134,6 @@ namespace WebKit {
virtual void setCursorHiddenUntilMouseMoves(bool);
virtual void scrollRectIntoView(const IntRect&) const { }
- virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
- virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*);
virtual bool selectItemWritingDirectionIsNatural();
virtual bool selectItemAlignmentFollowsMenuWritingDirection();
diff --git a/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp
index d9c59d07e..e0c3ed9d1 100644
--- a/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp
@@ -18,12 +18,16 @@
*/
#include "config.h"
+
+#if ENABLE(CONTEXT_MENUS)
+
#include "ContextMenuClientGtk.h"
#include "ContextMenu.h"
#include "ContextMenuController.h"
#include "HitTestResult.h"
#include "KURL.h"
+#include "LocalizedStrings.h"
#include "NotImplemented.h"
#include "Page.h"
#include "webkitwebviewprivate.h"
@@ -58,72 +62,32 @@ static GtkWidget* inputMethodsMenuItem (WebKitWebView* webView)
return 0;
}
- GtkWidget* menuitem = gtk_image_menu_item_new_with_mnemonic(
- _("Input _Methods"));
-
WebKitWebViewPrivate* priv = webView->priv;
- GtkWidget* imContextMenu = gtk_menu_new();
- gtk_im_multicontext_append_menuitems(GTK_IM_MULTICONTEXT(priv->imContext.get()), GTK_MENU_SHELL(imContextMenu));
+ ContextMenu imContextMenu;
+ gtk_im_multicontext_append_menuitems(GTK_IM_MULTICONTEXT(priv->imFilter.context()), GTK_MENU_SHELL(imContextMenu.platformDescription()));
- gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), imContextMenu);
+ ContextMenuItem menuItem(ActionType, ContextMenuItemTagInputMethods, contextMenuItemTagInputMethods(), &imContextMenu);
+ imContextMenu.releasePlatformDescription();
- return menuitem;
-}
-
-// Values taken from gtktextutil.c
-typedef struct {
- const char *label;
- gunichar ch;
-} GtkUnicodeMenuEntry;
-static const GtkUnicodeMenuEntry bidi_menu_entries[] = {
- { N_("LRM _Left-to-right mark"), 0x200E },
- { N_("RLM _Right-to-left mark"), 0x200F },
- { N_("LRE Left-to-right _embedding"), 0x202A },
- { N_("RLE Right-to-left e_mbedding"), 0x202B },
- { N_("LRO Left-to-right _override"), 0x202D },
- { N_("RLO Right-to-left o_verride"), 0x202E },
- { N_("PDF _Pop directional formatting"), 0x202C },
- { N_("ZWS _Zero width space"), 0x200B },
- { N_("ZWJ Zero width _joiner"), 0x200D },
- { N_("ZWNJ Zero width _non-joiner"), 0x200C }
-};
-
-static void insertControlCharacter(GtkWidget* widget)
-{
- // GtkUnicodeMenuEntry* entry = (GtkUnicodeMenuEntry*)g_object_get_data(G_OBJECT(widget), "gtk-unicode-menu-entry");
- notImplemented();
+ return GTK_WIDGET(menuItem.releasePlatformDescription());
}
-static GtkWidget* unicodeMenuItem(WebKitWebView* webView)
+static int getUnicodeMenuItemPosition(GtkMenu* menu)
{
- if (gtk_major_version > 2 || (gtk_major_version == 2 && gtk_minor_version >= 10)) {
- GtkSettings* settings = webView ? gtk_widget_get_settings(GTK_WIDGET(webView)) : gtk_settings_get_default();
-
- gboolean showMenu = TRUE;
- if (settings)
- g_object_get(settings, "gtk-show-unicode-menu", &showMenu, NULL);
- if (!showMenu)
- return 0;
- }
-
- GtkWidget* menuitem = gtk_image_menu_item_new_with_mnemonic(
- _("_Insert Unicode Control Character"));
-
- GtkWidget* unicodeContextMenu = gtk_menu_new();
- unsigned i;
- for (i = 0; i < G_N_ELEMENTS(bidi_menu_entries); i++) {
- GtkWidget* menuitem = gtk_menu_item_new_with_mnemonic(_(bidi_menu_entries[i].label));
- g_object_set_data(G_OBJECT(menuitem), "gtk-unicode-menu-entry", (gpointer)&bidi_menu_entries[i]);
- g_signal_connect(menuitem, "activate", G_CALLBACK(insertControlCharacter), 0);
- gtk_widget_show(menuitem);
- gtk_menu_shell_append(GTK_MENU_SHELL(unicodeContextMenu), menuitem);
- // FIXME: Make the item sensitive as insertControlCharacter() is implemented
- gtk_widget_set_sensitive(menuitem, FALSE);
+ GOwnPtr<GList> items(gtk_container_get_children(GTK_CONTAINER(menu)));
+ int unicodeMenuItemPosition = -1;
+ GList* iter;
+ int i = 0;
+ for (iter = items.get(), i = 0; iter; iter = g_list_next(iter), ++i) {
+ GtkMenuItem* item = GTK_MENU_ITEM(iter->data);
+ if (GTK_IS_SEPARATOR_MENU_ITEM(item))
+ continue;
+ if (String::fromUTF8(gtk_menu_item_get_label(item)) == contextMenuItemTagUnicode()) {
+ unicodeMenuItemPosition = i;
+ break;
+ }
}
-
- gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), unicodeContextMenu);
-
- return menuitem;
+ return unicodeMenuItemPosition;
}
PlatformMenuDescription ContextMenuClient::getCustomMenuFromDefaultItems(ContextMenu* menu)
@@ -134,26 +98,21 @@ PlatformMenuDescription ContextMenuClient::getCustomMenuFromDefaultItems(Context
HitTestResult result = core(webView)->contextMenuController()->hitTestResult();
if (result.isContentEditable()) {
-
GtkWidget* imContextMenu = inputMethodsMenuItem(webView);
- GtkWidget* unicodeContextMenu = unicodeMenuItem(webView);
+ if (!imContextMenu)
+ return gtkmenu;
- if (imContextMenu || unicodeContextMenu) {
+ // Place the im context menu item right before the unicode menu item
+ // if it's present.
+ int unicodeMenuItemPosition = getUnicodeMenuItemPosition(gtkmenu);
+ if (unicodeMenuItemPosition == -1) {
GtkWidget* separator = gtk_separator_menu_item_new();
gtk_menu_shell_append(GTK_MENU_SHELL(gtkmenu), separator);
gtk_widget_show(separator);
}
- if (imContextMenu) {
- gtk_menu_shell_append(GTK_MENU_SHELL(gtkmenu), imContextMenu);
- gtk_widget_show(imContextMenu);
- }
-
- if (unicodeContextMenu) {
- gtk_menu_shell_append(GTK_MENU_SHELL(gtkmenu), unicodeContextMenu);
- gtk_widget_show(unicodeContextMenu);
- }
-
+ gtk_menu_shell_insert(GTK_MENU_SHELL(gtkmenu), imContextMenu, unicodeMenuItemPosition);
+ gtk_widget_show(imContextMenu);
}
return gtkmenu;
@@ -205,3 +164,5 @@ bool ContextMenuClient::isSpeaking()
}
+#endif // ENABLE(CONTEXT_MENUS)
+
diff --git a/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h
index 07a022c85..d6774b583 100644
--- a/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h
@@ -26,6 +26,8 @@
#ifndef ContextMenuClientGtk_h
#define ContextMenuClientGtk_h
+#if ENABLE(CONTEXT_MENUS)
+
#include "ContextMenuClient.h"
typedef struct _WebKitWebView WebKitWebView;
@@ -59,4 +61,5 @@ namespace WebKit {
};
}
+#endif // ENABLE(CONTEXT_MENUS)
#endif
diff --git a/Source/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
index 6031b6231..1edc71260 100644
--- a/Source/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
@@ -30,9 +30,9 @@
#include "config.h"
#include "DocumentLoaderGtk.h"
-#include "GRefPtr.h"
#include "webkitwebdatasource.h"
#include "webkitwebdatasourceprivate.h"
+#include <wtf/gobject/GRefPtr.h>
using namespace WebCore;
diff --git a/Source/WebKit/gtk/WebCoreSupport/DragClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/DragClientGtk.h
index 55876c46a..76c759601 100644
--- a/Source/WebKit/gtk/WebCoreSupport/DragClientGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/DragClientGtk.h
@@ -32,7 +32,7 @@
#include "DragClient.h"
#include "DragIcon.h"
-#include "GRefPtr.h"
+#include <wtf/gobject/GRefPtr.h>
typedef struct _WebKitWebView WebKitWebView;
diff --git a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
index 80437ffe5..1a0f32f2d 100644
--- a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
@@ -26,6 +26,7 @@
#include "AXObjectCache.h"
#include "AccessibilityObject.h"
#include "AnimationController.h"
+#include "CSSComputedStyleDeclaration.h"
#include "DOMWrapperWorld.h"
#include "Document.h"
#include "EditorClientGtk.h"
@@ -41,6 +42,7 @@
#include "GeolocationPosition.h"
#include "GraphicsContext.h"
#include "HTMLInputElement.h"
+#include "JSCSSStyleDeclaration.h"
#include "JSDOMWindow.h"
#include "JSDocument.h"
#include "JSElement.h"
@@ -54,6 +56,7 @@
#include "RenderListItem.h"
#include "RenderTreeAsText.h"
#include "RenderView.h"
+#include "SchemeRegistry.h"
#include "SecurityOrigin.h"
#include "SecurityPolicy.h"
#include "Settings.h"
@@ -113,22 +116,6 @@ bool DumpRenderTreeSupportGtk::selectTrailingWhitespaceEnabled()
return s_selectTrailingWhitespaceEnabled;
}
-JSValueRef DumpRenderTreeSupportGtk::nodesFromRect(JSContextRef context, JSValueRef value, int x, int y, unsigned top, unsigned right, unsigned bottom, unsigned left, 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()));
-}
-
/**
* getFrameChildren:
* @frame: a #WebKitWebFrame
@@ -284,24 +271,6 @@ CString DumpRenderTreeSupportGtk::pageProperty(WebKitWebFrame* frame, const char
}
/**
- * isPageBoxVisible
- * @frame: a #WebKitWebFrame
- * @pageNumber: number of a page
- *
- * Return value: TRUE if a page box is visible.
- */
-bool DumpRenderTreeSupportGtk::isPageBoxVisible(WebKitWebFrame* frame, int pageNumber)
-{
- g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), false);
-
- Frame* coreFrame = core(frame);
- if (!coreFrame)
- return false;
-
- return coreFrame->document()->isPageBoxVisible(pageNumber);
-}
-
-/**
* pageSizeAndMarginsInPixels
* @frame: a #WebKitWebFrame
* @pageNumber: number of a page
@@ -622,6 +591,11 @@ bool DumpRenderTreeSupportGtk::selectedRange(WebKitWebView* webView, int* start,
return true;
}
+void DumpRenderTreeSupportGtk::setDefersLoading(WebKitWebView* webView, bool defers)
+{
+ core(webView)->setDefersLoading(defers);
+}
+
void DumpRenderTreeSupportGtk::setSmartInsertDeleteEnabled(WebKitWebView* webView, bool enabled)
{
g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
@@ -636,6 +610,11 @@ void DumpRenderTreeSupportGtk::whiteListAccessFromOrigin(const gchar* sourceOrig
SecurityPolicy::addOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains);
}
+void DumpRenderTreeSupportGtk::removeWhiteListAccessFromOrigin(const char* sourceOrigin, const char* destinationProtocol, const char* destinationHost, bool allowDestinationSubdomains)
+{
+ SecurityPolicy::removeOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains);
+}
+
void DumpRenderTreeSupportGtk::resetOriginAccessWhiteLists()
{
SecurityPolicy::resetOriginAccessWhitelists();
@@ -679,7 +658,7 @@ void DumpRenderTreeSupportGtk::dumpConfigurationForViewport(WebKitWebView* webVi
ViewportAttributes attrs = computeViewportAttributes(arguments, /* default layout width for non-mobile pages */ 980, deviceWidth, deviceHeight, deviceDPI, IntSize(availableWidth, availableHeight));
restrictMinimumScaleFactorToViewportSize(attrs, IntSize(availableWidth, availableHeight));
restrictScaleFactorToInitialScaleIfNotUserScalable(attrs);
- fprintf(stdout, "viewport size %dx%d scale %f with limits [%f, %f] and userScalable %f\n", attrs.layoutSize.width(), attrs.layoutSize.height(), attrs.initialScale, attrs.minimumScale, attrs.maximumScale, attrs.userScalable);
+ fprintf(stdout, "viewport size %dx%d scale %f with limits [%f, %f] and userScalable %f\n", static_cast<int>(attrs.layoutSize.width()), static_cast<int>(attrs.layoutSize.height()), attrs.initialScale, attrs.minimumScale, attrs.maximumScale, attrs.userScalable);
}
void DumpRenderTreeSupportGtk::clearOpener(WebKitWebFrame* frame)
@@ -698,13 +677,6 @@ unsigned int DumpRenderTreeSupportGtk::workerThreadCount()
#endif
}
-bool DumpRenderTreeSupportGtk::webkitWebFrameSelectionHasSpellingMarker(WebKitWebFrame *frame, gint from, gint length)
-{
- g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), FALSE);
-
- return core(frame)->editor()->selectionStartHasMarkerFor(DocumentMarker::Spelling, from, length);
-}
-
bool DumpRenderTreeSupportGtk::findString(WebKitWebView* webView, const gchar* targetString, WebKitFindOptions findOptions)
{
return core(webView)->findString(String::fromUTF8(targetString), findOptions);
@@ -814,24 +786,24 @@ void DumpRenderTreeSupportGtk::scalePageBy(WebKitWebView* webView, float scaleFa
void DumpRenderTreeSupportGtk::resetGeolocationClientMock(WebKitWebView* webView)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- GeolocationClientMock* mock = static_cast<GeolocationClientMock*>(core(webView)->geolocationController()->client());
+#if ENABLE(GEOLOCATION)
+ GeolocationClientMock* mock = static_cast<GeolocationClientMock*>(GeolocationController::from(core(webView))->client());
mock->reset();
#endif
}
void DumpRenderTreeSupportGtk::setMockGeolocationPermission(WebKitWebView* webView, bool allowed)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- GeolocationClientMock* mock = static_cast<GeolocationClientMock*>(core(webView)->geolocationController()->client());
+#if ENABLE(GEOLOCATION)
+ GeolocationClientMock* mock = static_cast<GeolocationClientMock*>(GeolocationController::from(core(webView))->client());
mock->setPermission(allowed);
#endif
}
void DumpRenderTreeSupportGtk::setMockGeolocationPosition(WebKitWebView* webView, double latitude, double longitude, double accuracy)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- GeolocationClientMock* mock = static_cast<GeolocationClientMock*>(core(webView)->geolocationController()->client());
+#if ENABLE(GEOLOCATION)
+ GeolocationClientMock* mock = static_cast<GeolocationClientMock*>(GeolocationController::from(core(webView))->client());
double timestamp = g_get_real_time() / 1000000.0;
mock->setPosition(GeolocationPosition::create(timestamp, latitude, longitude, accuracy));
@@ -840,8 +812,8 @@ void DumpRenderTreeSupportGtk::setMockGeolocationPosition(WebKitWebView* webView
void DumpRenderTreeSupportGtk::setMockGeolocationError(WebKitWebView* webView, int errorCode, const gchar* errorMessage)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- GeolocationClientMock* mock = static_cast<GeolocationClientMock*>(core(webView)->geolocationController()->client());
+#if ENABLE(GEOLOCATION)
+ GeolocationClientMock* mock = static_cast<GeolocationClientMock*>(GeolocationController::from(core(webView))->client());
GeolocationError::ErrorCode code;
switch (errorCode) {
@@ -860,11 +832,9 @@ void DumpRenderTreeSupportGtk::setMockGeolocationError(WebKitWebView* webView, i
int DumpRenderTreeSupportGtk::numberOfPendingGeolocationPermissionRequests(WebKitWebView* webView)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- GeolocationClientMock* mock = static_cast<GeolocationClientMock*>(core(webView)->geolocationController()->client());
+#if ENABLE(GEOLOCATION)
+ GeolocationClientMock* mock = static_cast<GeolocationClientMock*>(GeolocationController::from(core(webView))->client());
return mock->numberOfPendingPermissionRequests();
-#else
- return 0;
#endif
}
@@ -906,9 +876,30 @@ bool DumpRenderTreeSupportGtk::elementDoesAutoCompleteForElementWithId(WebKitWeb
return inputElement->isTextField() && !inputElement->isPasswordField() && inputElement->shouldAutocomplete();
}
+JSValueRef DumpRenderTreeSupportGtk::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef nodeObject)
+{
+ JSC::ExecState* exec = toJS(context);
+ if (!nodeObject)
+ return JSValueMakeUndefined(context);
+
+ JSValue jsValue = toJS(exec, nodeObject);
+ if (!jsValue.inherits(&JSElement::s_info))
+ return JSValueMakeUndefined(context);
+
+ JSElement* jsElement = static_cast<JSElement*>(asObject(jsValue));
+ Element* element = jsElement->impl();
+ RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(element, true);
+ return toRef(exec, toJS(exec, jsElement->globalObject(), style.get()));
+}
+
void DumpRenderTreeSupportGtk::deliverAllMutationsIfNecessary()
{
#if ENABLE(MUTATION_OBSERVERS)
WebKitMutationObserver::deliverAllMutations();
#endif
}
+
+void DumpRenderTreeSupportGtk::setDomainRelaxationForbiddenForURLScheme(bool forbidden, const char* urlScheme)
+{
+ SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, String::fromUTF8(urlScheme));
+}
diff --git a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
index 41ab40fff..7db85cffe 100644
--- a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
@@ -53,7 +53,6 @@ public:
static void setSelectTrailingWhitespaceEnabled(bool);
static bool selectTrailingWhitespaceEnabled();
- static JSValueRef nodesFromRect(JSContextRef context, JSValueRef value, int x, int y, unsigned top, unsigned right, unsigned bottom, unsigned left, bool ignoreClipping);
static void dumpConfigurationForViewport(WebKitWebView* webView, gint deviceDPI, gint deviceWidth, gint deviceHeight, gint availableWidth, gint availableHeight);
static void clearOpener(WebKitWebFrame*);
@@ -66,7 +65,6 @@ public:
static int pageNumberForElementById(WebKitWebFrame*, const char* id, float pageWidth, float pageHeight);
static int numberOfPagesForFrame(WebKitWebFrame*, float pageWidth, float pageHeight);
static WTF::CString pageProperty(WebKitWebFrame*, const char* propertyName, int pageNumber);
- static bool isPageBoxVisible(WebKitWebFrame*, int pageNumber);
static WTF::CString pageSizeAndMarginsInPixels(WebKitWebFrame*, int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft);
static void addUserStyleSheet(WebKitWebFrame*, const char* sourceCode, bool allFrames);
static guint getPendingUnloadEventCount(WebKitWebFrame*);
@@ -84,6 +82,7 @@ public:
static void setValueForUser(JSContextRef, JSValueRef, JSStringRef);
static bool shouldClose(WebKitWebFrame*);
static bool elementDoesAutoCompleteForElementWithId(WebKitWebFrame*, JSStringRef);
+ static JSValueRef computedStyleIncludingVisitedInfo(JSContextRef, JSValueRef);
// WebKitWebView
static void executeCoreCommandByName(WebKitWebView*, const gchar* name, const gchar* value);
@@ -93,6 +92,7 @@ public:
static void setMinimumTimerInterval(WebKitWebView*, double);
static void rectangleForSelection(WebKitWebFrame*, cairo_rectangle_int_t*);
static void scalePageBy(WebKitWebView*, float, float, float);
+ static void setDefersLoading(WebKitWebView*, bool);
static void setSmartInsertDeleteEnabled(WebKitWebView*, bool);
// Accessibility
@@ -114,9 +114,9 @@ public:
static unsigned long gcCountJavascriptObjects();
static void whiteListAccessFromOrigin(const gchar* sourceOrigin, const gchar* destinationProtocol, const gchar* destinationHost, bool allowDestinationSubdomains);
+ static void removeWhiteListAccessFromOrigin(const char* sourceOrigin, const char* destinationProtocol, const char* destinationHost, bool allowDestinationSubdomains);
static void resetOriginAccessWhiteLists();
static unsigned int workerThreadCount();
- static bool webkitWebFrameSelectionHasSpellingMarker(WebKitWebFrame*, gint from, gint length);
static void resetGeolocationClientMock(WebKitWebView*);
static void setMockGeolocationPermission(WebKitWebView*, bool allowed);
@@ -128,6 +128,7 @@ public:
static void setPageCacheSupportsPlugins(WebKitWebView*, bool enabled);
static void deliverAllMutationsIfNecessary();
+ static void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const char* urlScheme);
private:
static bool s_drtRun;
diff --git a/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
index b8e160e28..0e5256436 100644
--- a/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
@@ -62,75 +62,28 @@ using namespace WebCore;
namespace WebKit {
-static void imContextCommitted(GtkIMContext* context, const gchar* compositionString, EditorClient* client)
-{
- Frame* frame = core(static_cast<WebKitWebView*>(client->webView()))->focusController()->focusedOrMainFrame();
- if (!frame || !frame->editor()->canEdit())
- return;
-
- // If this signal fires during a keydown event when we are not in the middle
- // of a composition, then treat this 'commit' as a normal key event and just
- // change the editable area right before the keypress event.
- if (client->treatContextCommitAsKeyEvent()) {
- client->updatePendingComposition(compositionString);
- return;
- }
-
- // If this signal fires during a mousepress event when we are in the middle
- // of a composition, skip this 'commit' because the composition is already confirmed.
- if (client->preventNextCompositionCommit())
- return;
-
- frame->editor()->confirmComposition(String::fromUTF8(compositionString));
- client->clearPendingComposition();
-}
-
-static void imContextPreeditChanged(GtkIMContext* context, EditorClient* client)
-{
- Frame* frame = core(static_cast<WebKitWebView*>(client->webView()))->focusController()->focusedOrMainFrame();
- if (!frame || !frame->editor()->canEdit())
- return;
-
- // We ignore the provided PangoAttrList for now.
- GOwnPtr<gchar> newPreedit(0);
- gtk_im_context_get_preedit_string(context, &newPreedit.outPtr(), 0, 0);
-
- String preeditString = String::fromUTF8(newPreedit.get());
- Vector<CompositionUnderline> underlines;
- underlines.append(CompositionUnderline(0, preeditString.length(), Color(0, 0, 0), false));
- frame->editor()->setComposition(preeditString, underlines, 0, 0);
-}
-
-
-void EditorClient::updatePendingComposition(const gchar* newComposition)
+void EditorClient::willSetInputMethodState()
{
- // The IMContext may signal more than one completed composition in a row,
- // in which case we want to append them, rather than overwrite the old one.
- if (!m_pendingComposition)
- m_pendingComposition.set(g_strdup(newComposition));
- else
- m_pendingComposition.set(g_strconcat(m_pendingComposition.get(), newComposition, NULL));
}
-void EditorClient::willSetInputMethodState()
+void EditorClient::setInputMethodState(bool active)
{
+ m_webView->priv->imFilter.setEnabled(active);
}
-void EditorClient::setInputMethodState(bool active)
+bool EditorClient::shouldShowUnicodeMenu()
{
- WebKitWebViewPrivate* priv = m_webView->priv;
+ if (gtk_major_version > 2 || (gtk_major_version == 2 && gtk_minor_version >= 10)) {
+ GtkSettings* settings = gtk_widget_get_settings(GTK_WIDGET(m_webView));
+ if (!settings)
+ return true;
- if (active)
- gtk_im_context_focus_in(priv->imContext.get());
- else
- gtk_im_context_focus_out(priv->imContext.get());
+ gboolean enabled;
+ g_object_get(settings, "gtk-show-unicode-menu", &enabled, NULL);
+ return enabled;
+ }
-#ifdef MAEMO_CHANGES
- if (active)
- hildon_gtk_im_context_show(priv->imContext.get());
- else
- hildon_gtk_im_context_hide(priv->imContext.get());
-#endif
+ return true;
}
bool EditorClient::shouldDeleteRange(Range* range)
@@ -173,8 +126,6 @@ int EditorClient::spellCheckerDocumentTag()
bool EditorClient::shouldBeginEditing(WebCore::Range* range)
{
- clearPendingComposition();
-
gboolean accept = TRUE;
GRefPtr<WebKitDOMRange> kitRange(adoptGRef(kit(range)));
g_signal_emit_by_name(m_webView, "should-begin-editing", kitRange.get(), &accept);
@@ -183,8 +134,6 @@ bool EditorClient::shouldBeginEditing(WebCore::Range* range)
bool EditorClient::shouldEndEditing(WebCore::Range* range)
{
- clearPendingComposition();
-
gboolean accept = TRUE;
GRefPtr<WebKitDOMRange> kitRange(adoptGRef(kit(range)));
g_signal_emit_by_name(m_webView, "should-end-editing", kitRange.get(), &accept);
@@ -309,25 +258,17 @@ void EditorClient::respondToChangedSelection(Frame* frame)
if (!frame)
return;
- if (frame->editor()->ignoreCompositionSelectionChange())
- return;
-
#if PLATFORM(X11)
setSelectionPrimaryClipboardIfNeeded(m_webView);
#endif
- if (!frame->editor()->hasComposition())
+ if (m_updatingComposition || !frame->editor()->hasComposition() || frame->editor()->ignoreCompositionSelectionChange())
return;
unsigned start;
unsigned end;
- WebKitWebViewPrivate* priv = m_webView->priv;
-
- if (!frame->editor()->getCompositionSelection(start, end)) {
- // gtk_im_context_reset() clears the composition for us.
- gtk_im_context_reset(priv->imContext.get());
- frame->editor()->cancelComposition();
- }
+ if (!frame->editor()->getCompositionSelection(start, end))
+ m_webView->priv->imFilter.resetContext();
}
void EditorClient::didEndEditing()
@@ -474,13 +415,45 @@ bool EditorClient::executePendingEditorCommands(Frame* frame, bool allowTextInse
}
m_pendingEditorCommands.clear();
+ return success;
+}
- // If we successfully completed all editor commands, then
- // this signals a canceling of the composition.
- if (success)
- clearPendingComposition();
+bool EditorClient::handleInputMethodKeyboardEvent(KeyboardEvent* event)
+{
+ if (event->type() != eventNames().keydownEvent)
+ return false;
- return success;
+ const PlatformKeyboardEvent* platformEvent = event->keyEvent();
+ if (!platformEvent)
+ return false;
+
+ Frame* frame = core(m_webView)->focusController()->focusedOrMainFrame();
+ if (!frame || !frame->editor()->canEdit())
+ return false;
+
+ const CompositionResults& compositionResults = platformEvent->compositionResults();
+ if (!compositionResults.compositionUpdated())
+ return false;
+
+ m_updatingComposition = true;
+
+ // PlatformKeyboardEvent returns an empty string when there are composition results.
+ // That prevents the delivery of keypress, which is the behavior we want for composition
+ // events. See EventHandler::keyEvent.
+ ASSERT(platformEvent->text().isNull());
+
+ if (!compositionResults.confirmedComposition.isNull())
+ frame->editor()->confirmComposition(compositionResults.confirmedComposition);
+
+ String preedit = compositionResults.preedit;
+ if (!preedit.isNull()) {
+ Vector<CompositionUnderline> underlines;
+ underlines.append(CompositionUnderline(0, preedit.length(), Color(1, 1, 1), false));
+ frame->editor()->setComposition(preedit, underlines, compositionResults.preeditCursorOffset, compositionResults.preeditCursorOffset);
+ }
+
+ m_updatingComposition = false;
+ return true;
}
void EditorClient::handleKeyboardEvent(KeyboardEvent* event)
@@ -494,6 +467,9 @@ void EditorClient::handleKeyboardEvent(KeyboardEvent* event)
if (!platformEvent)
return;
+ if (handleInputMethodKeyboardEvent(event))
+ return;
+
KeyBindingTranslator::EventType type = event->type() == eventNames().keydownEvent ?
KeyBindingTranslator::KeyDown : KeyBindingTranslator::KeyPress;
m_keyBindingTranslator.getEditorCommandsForKeyEvent(platformEvent->gdkEventKey(), type, m_pendingEditorCommands);
@@ -523,103 +499,26 @@ void EditorClient::handleKeyboardEvent(KeyboardEvent* event)
// This is just a normal text insertion, so wait to execute the insertion
// until a keypress event happens. This will ensure that the insertion will not
// be reflected in the contents of the field until the keyup DOM event.
- if (event->type() == eventNames().keypressEvent) {
-
- // If we have a pending composition at this point, it happened while
- // filtering a keypress, so we treat it as a normal text insertion.
- // This will also ensure that if the keypress event handler changed the
- // currently focused node, the text is still inserted into the original
- // node (insertText() has this logic, but confirmComposition() does not).
- if (m_pendingComposition) {
- frame->editor()->insertText(String::fromUTF8(m_pendingComposition.get()), event);
- clearPendingComposition();
- event->setDefaultHandled();
+ if (event->type() != eventNames().keypressEvent)
+ return;
- } else {
- // Don't insert null or control characters as they can result in unexpected behaviour
- if (event->charCode() < ' ')
- return;
+ // Don't insert null or control characters as they can result in unexpected behaviour
+ if (event->charCode() < ' ')
+ return;
- // Don't insert anything if a modifier is pressed
- if (platformEvent->ctrlKey() || platformEvent->altKey())
- return;
+ // Don't insert anything if a modifier is pressed
+ if (platformEvent->ctrlKey() || platformEvent->altKey())
+ return;
- if (frame->editor()->insertText(platformEvent->text(), event))
- event->setDefaultHandled();
- }
- }
+ if (frame->editor()->insertText(platformEvent->text(), event))
+ event->setDefaultHandled();
}
void EditorClient::handleInputMethodKeydown(KeyboardEvent* event)
{
- Frame* targetFrame = core(m_webView)->focusController()->focusedOrMainFrame();
- if (!targetFrame || !targetFrame->editor()->canEdit())
- return;
-
- WebKitWebViewPrivate* priv = m_webView->priv;
-
- m_preventNextCompositionCommit = false;
-
- // Some IM contexts (e.g. 'simple') will act as if they filter every
- // keystroke and just issue a 'commit' signal during handling. In situations
- // where the 'commit' signal happens during filtering and there is no active
- // composition, act as if the keystroke was not filtered. The one exception to
- // this is when the keyval parameter of the GdkKeyEvent is 0, which is often
- // a key event sent by the IM context for committing the current composition.
-
- // Here is a typical sequence of events for the 'simple' context:
- // 1. GDK key press event -> webkit_web_view_key_press_event
- // 2. Keydown event -> EditorClient::handleInputMethodKeydown
- // gtk_im_context_filter_keypress returns true, but there is a pending
- // composition so event->preventDefault is not called (below).
- // 3. Keydown event bubbles through the DOM
- // 4. Keydown event -> EditorClient::handleKeyboardEvent
- // No action taken.
- // 4. GDK key release event -> webkit_web_view_key_release_event
- // 5. gtk_im_context_filter_keypress is called on the release event.
- // Simple does not filter most key releases, so the event continues.
- // 6. Keypress event bubbles through the DOM.
- // 7. Keypress event -> EditorClient::handleKeyboardEvent
- // pending composition is inserted.
- // 8. Keyup event bubbles through the DOM.
- // 9. Keyup event -> EditorClient::handleKeyboardEvent
- // No action taken.
-
- // There are two situations where we do filter the keystroke:
- // 1. The IMContext instructed us to filter and we have no pending composition.
- // 2. The IMContext did not instruct us to filter, but the keystroke caused a
- // composition in progress to finish. It seems that sometimes SCIM will finish
- // a composition and not mark the keystroke as filtered.
- m_treatContextCommitAsKeyEvent = (!targetFrame->editor()->hasComposition())
- && event->keyEvent()->gdkEventKey()->keyval;
- clearPendingComposition();
- if ((gtk_im_context_filter_keypress(priv->imContext.get(), event->keyEvent()->gdkEventKey()) && !m_pendingComposition)
- || (!m_treatContextCommitAsKeyEvent && !targetFrame->editor()->hasComposition()))
- event->preventDefault();
-
- m_treatContextCommitAsKeyEvent = false;
-}
-
-void EditorClient::handleInputMethodMousePress()
-{
- Frame* targetFrame = core(m_webView)->focusController()->focusedOrMainFrame();
-
- if (!targetFrame || !targetFrame->editor()->canEdit())
- return;
-
- WebKitWebViewPrivate* priv = m_webView->priv;
-
- // When a mouse press fires, the commit signal happens during a composition.
- // In this case, if the focused node is changed, the commit signal happens in a diffrent node.
- // Therefore, we need to confirm the current compositon and ignore the next commit signal.
- GOwnPtr<gchar> newPreedit(0);
- gtk_im_context_get_preedit_string(priv->imContext.get(), &newPreedit.outPtr(), 0, 0);
-
- if (g_utf8_strlen(newPreedit.get(), -1)) {
- targetFrame->editor()->confirmComposition();
- m_preventNextCompositionCommit = true;
- gtk_im_context_reset(priv->imContext.get());
- }
+ // Input method results are handled in handleKeyboardEvent, so that we can wait
+ // to trigger composition updates until after the keydown event handler. This better
+ // matches other browsers.
}
EditorClient::EditorClient(WebKitWebView* webView)
@@ -628,20 +527,13 @@ EditorClient::EditorClient(WebKitWebView* webView)
, m_textCheckerClient(WEBKIT_SPELL_CHECKER(webkit_get_text_checker()))
#endif
, m_webView(webView)
- , m_preventNextCompositionCommit(false)
- , m_treatContextCommitAsKeyEvent(false)
, m_smartInsertDeleteEnabled(false)
+ , m_updatingComposition(false)
{
- WebKitWebViewPrivate* priv = m_webView->priv;
- g_signal_connect(priv->imContext.get(), "commit", G_CALLBACK(imContextCommitted), this);
- g_signal_connect(priv->imContext.get(), "preedit-changed", G_CALLBACK(imContextPreeditChanged), this);
}
EditorClient::~EditorClient()
{
- WebKitWebViewPrivate* priv = m_webView->priv;
- g_signal_handlers_disconnect_by_func(priv->imContext.get(), (gpointer)imContextCommitted, this);
- g_signal_handlers_disconnect_by_func(priv->imContext.get(), (gpointer)imContextPreeditChanged, this);
}
void EditorClient::textFieldDidBeginEditing(Element*)
diff --git a/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
index ef159c646..3612d9003 100644
--- a/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
@@ -65,12 +65,7 @@ class EditorClient : public WebCore::EditorClient {
EditorClient(WebKitWebView*);
~EditorClient();
WebKitWebView* webView() { return m_webView; }
- bool treatContextCommitAsKeyEvent() { return m_treatContextCommitAsKeyEvent; }
- bool preventNextCompositionCommit() { return m_preventNextCompositionCommit; }
- void clearPendingComposition() { m_pendingComposition.set(0); }
- bool hasPendingComposition() { return m_pendingComposition; }
void addPendingEditorCommand(const char* command) { m_pendingEditorCommands.append(command); }
- void updatePendingComposition(const char*);
void generateEditorCommands(const WebCore::KeyboardEvent*);
bool executePendingEditorCommands(WebCore::Frame*, bool);
@@ -119,7 +114,6 @@ class EditorClient : public WebCore::EditorClient {
virtual void handleKeyboardEvent(WebCore::KeyboardEvent*);
virtual void handleInputMethodKeydown(WebCore::KeyboardEvent*);
- virtual void handleInputMethodMousePress();
virtual void textFieldDidBeginEditing(WebCore::Element*);
virtual void textFieldDidEndEditing(WebCore::Element*);
@@ -137,21 +131,21 @@ class EditorClient : public WebCore::EditorClient {
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
+ virtual bool shouldShowUnicodeMenu();
+
private:
+ bool handleInputMethodKeyboardEvent(WebCore::KeyboardEvent*);
+
#if ENABLE(SPELLCHECK)
TextCheckerClientGtk m_textCheckerClient;
#else
WebCore::EmptyTextCheckerClient m_textCheckerClient;
#endif
WebKitWebView* m_webView;
- bool m_preventNextCompositionCommit;
- bool m_treatContextCommitAsKeyEvent;
- GOwnPtr<gchar> m_pendingComposition;
-
WebCore::KeyBindingTranslator m_keyBindingTranslator;
Vector<WTF::String> m_pendingEditorCommands;
-
bool m_smartInsertDeleteEnabled;
+ bool m_updatingComposition;
};
}
diff --git a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index 42a494583..7f6c94f19 100644
--- a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -39,8 +39,6 @@
#include "FrameNetworkingContextGtk.h"
#include "FrameTree.h"
#include "FrameView.h"
-#include "GOwnPtr.h"
-#include "GRefPtr.h"
#include "GtkPluginWidget.h"
#include "HTMLAppletElement.h"
#include "HTMLFormElement.h"
@@ -65,13 +63,15 @@
#include "ScriptController.h"
#include "Settings.h"
#include "webkiterror.h"
+#include "webkitfavicondatabase.h"
+#include "webkitfavicondatabaseprivate.h"
#include "webkitglobals.h"
#include "webkitglobalsprivate.h"
-#include "webkiticondatabase.h"
#include "webkitnetworkrequest.h"
#include "webkitnetworkrequestprivate.h"
#include "webkitnetworkresponse.h"
#include "webkitnetworkresponseprivate.h"
+#include "webkitsecurityoriginprivate.h"
#include "webkitviewportattributes.h"
#include "webkitviewportattributesprivate.h"
#include "webkitwebdatasourceprivate.h"
@@ -91,6 +91,8 @@
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <stdio.h>
+#include <wtf/gobject/GOwnPtr.h>
+#include <wtf/gobject/GRefPtr.h>
#include <wtf/text/CString.h>
#include <wtf/text/StringConcatenate.h>
@@ -104,7 +106,6 @@ FrameLoaderClient::FrameLoaderClient(WebKitWebFrame* frame)
, m_loadingErrorPage(false)
, m_pluginView(0)
, m_hasSentResponseToPlugin(false)
- , m_hasRepresentation(false)
{
ASSERT(m_frame);
}
@@ -531,35 +532,6 @@ PassRefPtr<Frame> FrameLoaderClient::createFrame(const KURL& url, const String&
return childFrame.release();
}
-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::transferLoadingResourceFromPage(WebCore::ResourceLoader* loader, const WebCore::ResourceRequest& request, WebCore::Page* oldPage)
-{
- ASSERT(oldPage != core(m_frame)->page());
-
- GOwnPtr<gchar> identifierString(toString(loader->identifier()));
- ASSERT(!webkit_web_view_get_resource(getViewFromFrame(m_frame), identifierString.get()));
-
- assignIdentifierToInitialRequest(loader->identifier(), loader->documentLoader(), request);
-
- webkit_web_view_remove_resource(kit(oldPage), identifierString.get());
-}
-
void FrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget)
{
ASSERT(!m_pluginView);
@@ -625,7 +597,7 @@ void FrameLoaderClient::didPerformFirstNavigation() const
void FrameLoaderClient::registerForIconNotification(bool shouldRegister)
{
- notImplemented();
+ webkitWebViewRegisterForIconNotification(getViewFromFrame(m_frame), shouldRegister);
}
void FrameLoaderClient::setMainFrameDocumentReady(bool ready)
@@ -682,9 +654,9 @@ void FrameLoaderClient::didDisplayInsecureContent()
notImplemented();
}
-void FrameLoaderClient::didRunInsecureContent(SecurityOrigin*, const KURL&)
+void FrameLoaderClient::didRunInsecureContent(SecurityOrigin* coreOrigin, const KURL& url)
{
- notImplemented();
+ g_signal_emit_by_name(m_frame, "insecure-content-run", kit(coreOrigin), url.string().utf8().data());
}
void FrameLoaderClient::didDetectXSS(const KURL&, bool)
@@ -692,11 +664,6 @@ void FrameLoaderClient::didDetectXSS(const KURL&, bool)
notImplemented();
}
-void FrameLoaderClient::makeRepresentation(WebCore::DocumentLoader*)
-{
- m_hasRepresentation = true;
-}
-
void FrameLoaderClient::forceLayout()
{
FrameView* view = core(m_frame)->view();
@@ -802,18 +769,14 @@ void FrameLoaderClient::dispatchDidReceiveIcon()
if (m_loadingErrorPage)
return;
- const gchar* frameURI = webkit_web_frame_get_uri(m_frame);
- WebKitIconDatabase* database = webkit_get_icon_database();
- g_signal_emit_by_name(database, "icon-loaded", m_frame, frameURI);
-
+ // IconController loads icons only for the main frame.
WebKitWebView* webView = getViewFromFrame(m_frame);
+ ASSERT(m_frame == webkit_web_view_get_main_frame(webView));
- // Avoid reporting favicons for non-main frames.
- if (m_frame != webkit_web_view_get_main_frame(webView))
- return;
-
- g_object_notify(G_OBJECT(webView), "icon-uri");
- g_signal_emit_by_name(webView, "icon-loaded", webkit_web_view_get_icon_uri(webView));
+ const char* frameURI = webkit_web_frame_get_uri(m_frame);
+ WebKitFaviconDatabase* database = webkit_get_favicon_database();
+ webkitFaviconDatabaseDispatchDidReceiveIcon(database, frameURI);
+ webkitWebViewIconLoaded(database, frameURI, webView);
}
void FrameLoaderClient::dispatchDidStartProvisionalLoad()
@@ -914,16 +877,6 @@ void FrameLoaderClient::cancelPolicyCheck()
webkit_web_policy_decision_cancel(m_policyDecision);
}
-void FrameLoaderClient::dispatchDidLoadMainResource(WebCore::DocumentLoader*)
-{
- notImplemented();
-}
-
-void FrameLoaderClient::revertToProvisionalState(WebCore::DocumentLoader*)
-{
- m_hasRepresentation = true;
-}
-
void FrameLoaderClient::willChangeTitle(WebCore::DocumentLoader*)
{
notImplemented();
@@ -966,14 +919,9 @@ String FrameLoaderClient::generatedMIMETypeForURLScheme(const String&) const
return String();
}
-void FrameLoaderClient::finishedLoading(WebCore::DocumentLoader* documentLoader)
+void FrameLoaderClient::finishedLoading(WebCore::DocumentLoader*)
{
- if (!m_pluginView) {
- // This is necessary to create an empty document,
- // but it has to be skipped in the provisional phase.
- if (m_hasRepresentation)
- documentLoader->writer()->setEncoding("", false);
- } else {
+ if (m_pluginView) {
m_pluginView->didFinishLoading();
m_pluginView = 0;
m_hasSentResponseToPlugin = false;
diff --git a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
index a2c907635..685c93cd4 100644
--- a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
@@ -49,7 +49,7 @@ namespace WebKit {
virtual bool hasWebView() const;
- virtual void makeRepresentation(WebCore::DocumentLoader*);
+ virtual void makeRepresentation(WebCore::DocumentLoader*) { }
virtual void forceLayout();
virtual void forceLayoutForNonHTML();
@@ -102,11 +102,10 @@ namespace WebKit {
virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&);
- virtual void dispatchWillSendSubmitEvent(WebCore::HTMLFormElement*) { }
+ virtual void dispatchWillSendSubmitEvent(WTF::PassRefPtr<WebCore::FormState>) { }
virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction, WTF::PassRefPtr<WebCore::FormState>);
- virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*);
- virtual void revertToProvisionalState(WebCore::DocumentLoader*);
+ virtual void revertToProvisionalState(WebCore::DocumentLoader*) { }
virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&);
virtual void postProgressStartedNotification();
@@ -115,8 +114,6 @@ 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(WebCore::Page*);
- virtual void transferLoadingResourceFromPage(WebCore::ResourceLoader*, const WebCore::ResourceRequest&, 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);
@@ -201,8 +198,6 @@ namespace WebKit {
// Plugin view to redirect data to
WebCore::PluginView* m_pluginView;
bool m_hasSentResponseToPlugin;
-
- bool m_hasRepresentation;
};
}
diff --git a/Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h b/Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h
index cbc5c2552..817bc19df 100644
--- a/Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h
+++ b/Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h
@@ -22,10 +22,10 @@
#if ENABLE(VIDEO) && !defined(GST_API_VERSION_1)
-#include "GRefPtr.h"
#include "GStreamerGWorld.h"
#include "HTMLMediaElement.h"
#include <wtf/RefPtr.h>
+#include <wtf/gobject/GRefPtr.h>
class FullscreenVideoController {
WTF_MAKE_NONCOPYABLE(FullscreenVideoController);
diff --git a/Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.cpp
index 06e9fbd3f..9f6915c87 100644
--- a/Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.cpp
@@ -21,7 +21,7 @@
#include "config.h"
#include "GeolocationClientGtk.h"
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
#include "Chrome.h"
#include "ChromeClient.h"
@@ -29,6 +29,8 @@
#include "GeolocationController.h"
#include "GeolocationError.h"
#include "GeolocationPosition.h"
+#include "webkitgeolocationpolicydecisionprivate.h"
+#include "webkitwebframeprivate.h"
#include "webkitwebviewprivate.h"
#include <glib/gi18n-lib.h>
@@ -138,12 +140,18 @@ WebCore::GeolocationPosition* GeolocationClient::lastPosition()
void GeolocationClient::requestPermission(WebCore::Geolocation* geolocation)
{
- core(m_webView)->chrome()->client()->requestGeolocationPermissionForFrame(geolocation->frame(), geolocation);
+ WebKitWebFrame* webFrame = kit(geolocation->frame());
+ GRefPtr<WebKitGeolocationPolicyDecision> policyDecision(adoptGRef(webkit_geolocation_policy_decision_new(webFrame, geolocation)));
+
+ gboolean isHandled = FALSE;
+ g_signal_emit_by_name(m_webView, "geolocation-policy-decision-requested", webFrame, policyDecision.get(), &isHandled);
+ if (!isHandled)
+ webkit_geolocation_policy_deny(policyDecision.get());
}
void GeolocationClient::cancelPermissionRequest(WebCore::Geolocation* geolocation)
{
- core(m_webView)->chrome()->client()->cancelGeolocationPermissionRequestForFrame(geolocation->frame(), geolocation);
+ g_signal_emit_by_name(m_webView, "geolocation-policy-decision-cancelled", kit(geolocation->frame()));
}
void GeolocationClient::positionChanged(GeocluePosition*, GeocluePositionFields fields, int timestamp, double latitude, double longitude, double altitude, GeoclueAccuracy* accuracy)
@@ -167,15 +175,15 @@ void GeolocationClient::updatePosition()
{
m_lastPosition = WebCore::GeolocationPosition::create(static_cast<double>(m_timestamp), m_latitude, m_longitude, m_accuracy,
true, m_altitude, true, m_altitudeAccuracy, false, 0, false, 0);
- core(m_webView)->geolocationController()->positionChanged(m_lastPosition.get());
+ WebCore::GeolocationController::from(core(m_webView))->positionChanged(m_lastPosition.get());
}
void GeolocationClient::errorOccured(const char* message)
{
RefPtr<WebCore::GeolocationError> error = WebCore::GeolocationError::create(WebCore::GeolocationError::PositionUnavailable, message);
- core(m_webView)->geolocationController()->errorOccurred(error.get());
+ WebCore::GeolocationController::from(core(m_webView))->errorOccurred(error.get());
}
}
-#endif // ENABLE(CLIENT_BASED_GEOLOCATION)
+#endif // ENABLE(GEOLOCATION)
diff --git a/Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.h
index bf17c7135..602e0f2a6 100644
--- a/Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.h
@@ -21,13 +21,13 @@
#ifndef GeolocationClientGtk_h
#define GeolocationClientGtk_h
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
-#include "GRefPtr.h"
#include "GeolocationClient.h"
#include "GeolocationPosition.h"
#include <geoclue/geoclue-master.h>
#include <geoclue/geoclue-position.h>
+#include <wtf/gobject/GRefPtr.h>
typedef struct _WebKitWebView WebKitWebView;
@@ -75,8 +75,9 @@ private:
bool m_enableHighAccuracy;
bool m_isUpdating;
};
+
} // namespace WebKit
-#endif // ENABLE(CLIENT_BASED_GEOLOCATION)
+#endif // ENABLE(GEOLOCATION)
#endif // GeolocationClientGtk_h
diff --git a/Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h
index db558f096..63fc42012 100644
--- a/Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h
@@ -29,13 +29,13 @@
#ifndef InspectorClientGtk_h
#define InspectorClientGtk_h
-#include "GOwnPtr.h"
-#include "GRefPtr.h"
#include "InspectorClient.h"
#include "InspectorFrontendClientLocal.h"
#include "webkitwebview.h"
#include "webkitwebinspector.h"
#include <wtf/Forward.h>
+#include <wtf/gobject/GOwnPtr.h>
+#include <wtf/gobject/GRefPtr.h>
namespace WebCore {
class Page;
diff --git a/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp
new file mode 100644
index 000000000..292173ae2
--- /dev/null
+++ b/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#include "PlatformStrategiesGtk.h"
+
+#include "NotImplemented.h"
+#include "Page.h"
+#include "PageGroup.h"
+#include "PluginDatabase.h"
+#include "PluginPackage.h"
+
+using namespace WebCore;
+
+void PlatformStrategiesGtk::initialize()
+{
+ DEFINE_STATIC_LOCAL(PlatformStrategiesGtk, platformStrategies, ());
+ setPlatformStrategies(&platformStrategies);
+}
+
+PlatformStrategiesGtk::PlatformStrategiesGtk()
+{
+}
+
+CookiesStrategy* PlatformStrategiesGtk::createCookiesStrategy()
+{
+ return this;
+}
+
+PluginStrategy* PlatformStrategiesGtk::createPluginStrategy()
+{
+ return this;
+}
+
+VisitedLinkStrategy* PlatformStrategiesGtk::createVisitedLinkStrategy()
+{
+ return this;
+}
+
+PasteboardStrategy* PlatformStrategiesGtk::createPasteboardStrategy()
+{
+ // This is currently used only by mac code.
+ notImplemented();
+ return 0;
+}
+
+// CookiesStrategy
+void PlatformStrategiesGtk::notifyCookiesChanged()
+{
+}
+
+// PluginStrategy
+void PlatformStrategiesGtk::refreshPlugins()
+{
+ PluginDatabase::installedPlugins()->refresh();
+}
+
+void PlatformStrategiesGtk::getPluginInfo(const Page* page, Vector<PluginInfo>& outPlugins)
+{
+ PluginDatabase* database = PluginDatabase::installedPlugins();
+ const Vector<PluginPackage*> &plugins = database->plugins();
+ outPlugins.resize(plugins.size());
+
+ for (size_t i = 0; i < plugins.size(); ++i) {
+ PluginPackage* package = plugins[i];
+
+ PluginInfo pluginInfo;
+ pluginInfo.name = package->name();
+ pluginInfo.file = package->fileName();
+ pluginInfo.desc = package->description();
+
+ const MIMEToDescriptionsMap& mimeToDescriptions = package->mimeToDescriptions();
+ 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);
+ pluginInfo.mimes.append(mime);
+ }
+
+ outPlugins.append(pluginInfo);
+ }
+}
+
+// VisitedLinkStrategy
+bool PlatformStrategiesGtk::isLinkVisited(Page* page, LinkHash hash, const KURL&, const AtomicString&)
+{
+ return page->group().isLinkVisited(hash);
+}
+
+void PlatformStrategiesGtk::addVisitedLink(Page* page, LinkHash hash)
+{
+ page->group().addVisitedLinkHash(hash);
+}
diff --git a/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.h b/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.h
new file mode 100644
index 000000000..5506d172e
--- /dev/null
+++ b/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef PlatformStrategiesGtk_h
+#define PlatformStrategiesGtk_h
+
+#include "CookiesStrategy.h"
+#include "PasteboardStrategy.h"
+#include "PlatformStrategies.h"
+#include "PluginStrategy.h"
+#include "VisitedLinkStrategy.h"
+
+class PlatformStrategiesGtk : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::PluginStrategy, private WebCore::VisitedLinkStrategy {
+public:
+ static void initialize();
+
+private:
+ PlatformStrategiesGtk();
+
+ // WebCore::PlatformStrategies
+ virtual WebCore::CookiesStrategy* createCookiesStrategy();
+ virtual WebCore::PluginStrategy* createPluginStrategy();
+ virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy();
+ virtual WebCore::PasteboardStrategy* createPasteboardStrategy();
+
+ // WebCore::CookiesStrategy
+ virtual void notifyCookiesChanged();
+
+ // WebCore::PluginStrategy
+ virtual void refreshPlugins();
+ virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
+
+ // WebCore::VisitedLinkStrategy
+ virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::KURL& baseURL, const WTF::AtomicString& attributeURL);
+ virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
+};
+
+#endif // PlatformStrategiesGtk_h
diff --git a/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.cpp
index 6dbb48fd2..71c4dcbb1 100644
--- a/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.cpp
@@ -24,11 +24,11 @@
#include "config.h"
#include "TextCheckerClientGtk.h"
-#include "GOwnPtr.h"
#include "NotImplemented.h"
#include "webkitspellchecker.h"
#include "webkitwebsettingsprivate.h"
#include <glib.h>
+#include <wtf/gobject/GOwnPtr.h>
#include <wtf/text/CString.h>
using namespace WebCore;
diff --git a/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.h
index b3fa04994..db4f71e17 100644
--- a/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.h
@@ -31,8 +31,8 @@
#ifndef TextCheckerClientGtk_h
#define TextCheckerClientGtk_h
-#include "GRefPtr.h"
#include "TextCheckerClient.h"
+#include <wtf/gobject/GRefPtr.h>
typedef struct _WebKitSpellChecker WebKitSpellChecker;
diff --git a/Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp b/Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.cpp
index 464633784..391676afb 100644
--- a/Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Intel Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -19,45 +19,40 @@
*/
#include "config.h"
-#include "DeviceMotionClientQt.h"
+#include "UserMediaClientGtk.h"
-#include "DeviceMotionProviderQt.h"
+#if ENABLE(MEDIA_STREAM)
+#include "MediaStreamSource.h"
+#include "NotImplemented.h"
+#include "UserMediaRequest.h"
-namespace WebCore {
+using namespace WebCore;
-DeviceMotionClientQt::DeviceMotionClientQt()
- : m_provider(new DeviceMotionProviderQt)
-{
-}
+namespace WebKit {
-DeviceMotionClientQt::~DeviceMotionClientQt()
+UserMediaClientGtk::UserMediaClientGtk()
{
- delete m_provider;
}
-void DeviceMotionClientQt::setController(DeviceMotionController* controller)
+UserMediaClientGtk::~UserMediaClientGtk()
{
- m_provider->setController(controller);
}
-void DeviceMotionClientQt::startUpdating()
+void UserMediaClientGtk::pageDestroyed()
{
- m_provider->start();
+ notImplemented();
}
-void DeviceMotionClientQt::stopUpdating()
+void UserMediaClientGtk::requestUserMedia(WTF::PassRefPtr<UserMediaRequest> prpRequest, const MediaStreamSourceVector& audioSource, const MediaStreamSourceVector& videoSource)
{
- m_provider->stop();
+ notImplemented();
}
-DeviceMotionData* DeviceMotionClientQt::currentDeviceMotion() const
+void UserMediaClientGtk::cancelUserMediaRequest(UserMediaRequest* request)
{
- return m_provider->currentDeviceMotion();
+ notImplemented();
}
-void DeviceMotionClientQt::deviceMotionControllerDestroyed()
-{
- delete this;
-}
+} // namespace WebKit;
-} // namespace WebCore
+#endif // MEDIA_STREAM
diff --git a/Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h b/Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.h
index 2b964a33e..0362a4a3d 100644
--- a/Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h
+++ b/Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Intel Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -17,33 +17,27 @@
* Boston, MA 02110-1301, USA.
*
*/
+#ifndef UserMediaClientGtk_h
+#define UserMediaClientGtk_h
-#ifndef DeviceMotionClientQt_h
-#define DeviceMotionClientQt_h
+#if ENABLE(MEDIA_STREAM)
-#include "DeviceMotionClient.h"
-#include "DeviceMotionData.h"
+#include "UserMediaClient.h"
-namespace WebCore {
+namespace WebKit {
-class DeviceMotionController;
-class DeviceMotionProviderQt;
-
-class DeviceMotionClientQt : public DeviceMotionClient {
+class UserMediaClientGtk : public WebCore::UserMediaClient {
public:
- DeviceMotionClientQt();
- virtual ~DeviceMotionClientQt();
-
- virtual void setController(DeviceMotionController*);
- virtual void startUpdating();
- virtual void stopUpdating();
- virtual DeviceMotionData* currentDeviceMotion() const;
- virtual void deviceMotionControllerDestroyed();
+ UserMediaClientGtk();
+ virtual ~UserMediaClientGtk();
-private:
- DeviceMotionProviderQt* m_provider;
+ virtual void pageDestroyed();
+ virtual void requestUserMedia(WTF::PassRefPtr<WebCore::UserMediaRequest>, const WebCore::MediaStreamSourceVector&, const WebCore::MediaStreamSourceVector&);
+ virtual void cancelUserMediaRequest(WebCore::UserMediaRequest*);
};
-} // namespece WebCore
+} // namespace WebKit
+
+#endif // ENABLE(MEDIA_STREAM)
-#endif // DeviceMotionClientQt_h
+#endif // UserMediaClientGtk_h
diff --git a/Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.cpp b/Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.cpp
new file mode 100644
index 000000000..35ca23b01
--- /dev/null
+++ b/Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.cpp
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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 "WebViewInputMethodFilter.h"
+
+#include "FocusController.h"
+#include "Frame.h"
+#include "PlatformKeyboardEvent.h"
+#include "webkitwebviewprivate.h"
+#include <wtf/text/CString.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+Frame* WebViewInputMethodFilter::focusedOrMainFrame()
+{
+ ASSERT(m_webView);
+ Page* page = core(m_webView);
+ if (!page)
+ return 0;
+
+ return page->focusController()->focusedOrMainFrame();
+}
+
+void WebViewInputMethodFilter::setWebView(WebKitWebView* webView)
+{
+ m_webView = webView;
+ GtkInputMethodFilter::setWidget(GTK_WIDGET(webView));
+}
+
+bool WebViewInputMethodFilter::canEdit()
+{
+ Frame* frame = focusedOrMainFrame();
+ return frame && frame->editor()->canEdit();
+}
+
+bool WebViewInputMethodFilter::sendSimpleKeyEvent(GdkEventKey* event, WTF::String simpleString)
+{
+ PlatformKeyboardEvent platformEvent(event, CompositionResults(simpleString));
+ return focusedOrMainFrame()->eventHandler()->keyEvent(platformEvent);
+}
+
+bool WebViewInputMethodFilter::sendKeyEventWithCompositionResults(GdkEventKey* event, ResultsToSend resultsToSend)
+{
+ PlatformKeyboardEvent platformEvent(event, CompositionResults(resultsToSend & Composition ? m_confirmedComposition : String(),
+ resultsToSend & Preedit ? m_preedit : String(),
+ m_cursorOffset));
+ return focusedOrMainFrame()->eventHandler()->keyEvent(platformEvent);
+}
+
+void WebViewInputMethodFilter::confirmCompositionText(String text)
+{
+ Frame* frame = focusedOrMainFrame();
+ if (!frame || !frame->editor()->canEdit())
+ return;
+
+ if (text.isNull()) {
+ confirmCurrentComposition();
+ return;
+ }
+ frame->editor()->confirmComposition(m_confirmedComposition);
+}
+
+void WebViewInputMethodFilter::confirmCurrentComposition()
+{
+ Frame* frame = focusedOrMainFrame();
+ if (!frame || !frame->editor()->canEdit())
+ return;
+ frame->editor()->confirmComposition();
+}
+
+void WebViewInputMethodFilter::cancelCurrentComposition()
+{
+ Frame* frame = focusedOrMainFrame();
+ if (!frame || !frame->editor()->canEdit())
+ return;
+ frame->editor()->cancelComposition();
+}
+
+void WebViewInputMethodFilter::setPreedit(String newPreedit, int cursorOffset)
+{
+ Frame* frame = focusedOrMainFrame();
+ if (!frame || !frame->editor()->canEdit())
+ return;
+
+ // TODO: We should parse the PangoAttrList that we get from the IM context here.
+ Vector<CompositionUnderline> underlines;
+ underlines.append(CompositionUnderline(0, newPreedit.length(), Color(1, 1, 1), false));
+ frame->editor()->setComposition(newPreedit, underlines, m_cursorOffset, m_cursorOffset);
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.h b/Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.h
new file mode 100644
index 000000000..fd70edb8f
--- /dev/null
+++ b/Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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 WebViewInputMethodFilter_h
+#define WebViewInputMethodFilter_h
+
+#include "GtkInputMethodFilter.h"
+
+namespace WebCore {
+class Frame;
+}
+
+typedef struct _WebKitWebView WebKitWebView;
+
+namespace WebKit {
+
+class WebViewInputMethodFilter : public WebCore::GtkInputMethodFilter {
+public:
+ void setWebView(WebKitWebView*);
+
+protected:
+ virtual bool sendSimpleKeyEvent(GdkEventKey*, WTF::String eventString);
+ virtual bool sendKeyEventWithCompositionResults(GdkEventKey*, ResultsToSend);
+ virtual bool canEdit();
+ virtual void confirmCompositionText(String);
+ virtual void confirmCurrentComposition();
+ virtual void cancelCurrentComposition();
+ virtual void setPreedit(String, int cursorOffset);
+
+private:
+ WebCore::Frame* focusedOrMainFrame();
+
+ WebKitWebView* m_webView;
+};
+
+} // namespace WebKit
+
+#endif // WebViewInputMethodFilter_h
diff --git a/Source/WebKit/gtk/docs/webkitgtk-docs.sgml b/Source/WebKit/gtk/docs/webkitgtk-docs.sgml
index 3ad0fae10..b4eb26d65 100644
--- a/Source/WebKit/gtk/docs/webkitgtk-docs.sgml
+++ b/Source/WebKit/gtk/docs/webkitgtk-docs.sgml
@@ -40,6 +40,7 @@
<xi:include href="xml/webkitwebwindowfeatures.xml"/>
<xi:include href="xml/webkiticondatabase.xml"/>
<xi:include href="xml/webkitspellchecker.xml"/>
+ <xi:include href="xml/webkitfavicondatabase.xml"/>
</chapter>
<chapter>
diff --git a/Source/WebKit/gtk/docs/webkitgtk-sections.txt b/Source/WebKit/gtk/docs/webkitgtk-sections.txt
index 4a358e83d..c97489b6c 100644
--- a/Source/WebKit/gtk/docs/webkitgtk-sections.txt
+++ b/Source/WebKit/gtk/docs/webkitgtk-sections.txt
@@ -468,6 +468,7 @@ webkit_web_view_set_view_mode
webkit_web_view_set_view_source_mode
webkit_web_view_set_zoom_level
webkit_web_view_stop_loading
+webkit_web_view_try_get_favicon_pixbuf
webkit_web_view_undo
webkit_web_view_unmark_text_matches
webkit_web_view_zoom_in
@@ -517,6 +518,7 @@ webkit_get_web_plugin_database
webkit_remove_all_web_databases
webkit_set_default_web_database_quota
webkit_set_web_database_directory_path
+webkit_get_favicon_database
webkit_get_icon_database
webkit_get_text_checker
webkit_set_text_checker
@@ -528,6 +530,9 @@ webkit_application_cache_set_maximum_size
WebKitCacheModel
webkit_get_cache_model
webkit_set_cache_model
+<SUBSECTION ContextMenuItem>
+WebKitContextMenuAction
+webkit_context_menu_item_get_action
<SUBSECTION Private>
WEBKITGTK_API_VERSION
</SECTION>
@@ -674,6 +679,30 @@ WebKitIconDatabasePrivate
</SECTION>
<SECTION>
+<FILE>webkitfavicondatabase</FILE>
+<TITLE>WebKitFaviconDatabase</TITLE>
+WebKitFaviconDatabase
+webkit_favicon_database_clear
+webkit_favicon_database_get_favicon_pixbuf
+webkit_favicon_database_get_favicon_pixbuf_finish
+webkit_favicon_database_get_favicon_uri
+webkit_favicon_database_get_path
+webkit_favicon_database_get_type
+webkit_favicon_database_set_path
+webkit_favicon_database_try_get_favicon_pixbuf
+<SUBSECTION Standard>
+WEBKIT_TYPE_FAVICON_DATABASE
+WEBKIT_FAVICON_DATABASE
+WEBKIT_FAVICON_DATABASE_CLASS
+WEBKIT_FAVICON_DATABASE_GET_CLASS
+WEBKIT_IS_FAVICON_DATABASE
+WEBKIT_IS_FAVICON_DATABASE_CLASS
+<SUBSECTION Private>
+WebKitFaviconDatabaseClass
+WebKitFaviconDatabasePrivate
+</SECTION>
+
+<SECTION>
<FILE>webkitdefines</FILE>
WEBKIT_API
WEBKITGTK_API_VERSION
diff --git a/Source/WebKit/gtk/docs/webkitgtk.types b/Source/WebKit/gtk/docs/webkitgtk.types
index 8a6db97a9..2be1a8c74 100644
--- a/Source/WebKit/gtk/docs/webkitgtk.types
+++ b/Source/WebKit/gtk/docs/webkitgtk.types
@@ -1,5 +1,6 @@
#include <webkit/webkit.h>
webkit_download_get_type
+webkit_favicon_database_get_type
webkit_geolocation_policy_decision_get_type
webkit_hit_test_result_get_type
webkit_icon_database_get_type
diff --git a/Source/WebKit/gtk/po/ChangeLog b/Source/WebKit/gtk/po/ChangeLog
index 6cd5910a0..b6e0ba316 100644
--- a/Source/WebKit/gtk/po/ChangeLog
+++ b/Source/WebKit/gtk/po/ChangeLog
@@ -1,3 +1,84 @@
+2012-05-04 Daniel Mustieles <daniel.mustieles@gmail.com>
+
+ Updated Spanish translation
+ https://bugs.webkit.org/show_bug.cgi?id=83995
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * es.po:
+
+2012-04-30 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Unreviewed. Fix make distcheck.
+
+ * GNUmakefile.am: Use += for ALL_MOFILES variable to make sure all
+ .mo files are cleaned by distclean.
+
+2012-03-24 Christian Kirbach <Christian.Kirbach@googlemail.com>
+
+ Updated German translation
+ https://bugs.webkit.org/show_bug.cgi?id=77834
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * de.po:
+
+2012-03-24 Kjartan Maraas <kmaraas@gnome.org>
+
+ Updated Norwegian bokmål translation for webkitgtk
+ https://bugs.webkit.org/show_bug.cgi?id=73891
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * nb.po:
+
+2012-03-24 Gustavo Noronha Silva <gns@gnome.org>
+
+ Unreviewed, rolling out r90755.
+ http://trac.webkit.org/changeset/90755
+ https://bugs.webkit.org/show_bug.cgi?id=44410
+
+ This is actually less up-to-date then the one we committed
+ before
+
+ * id.po:
+
+2012-03-24 Sandeep Shedmake <sshedmak@redhat.com>
+
+ [l10n] [mr] WebKitGTK+ Marathi Translations
+ https://bugs.webkit.org/show_bug.cgi?id=82014
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * mr.po: Added.
+
+2012-03-24 Chris Leonard <cjl@laptop.org>
+
+ Updated en_GB translation of WebKitGTK+
+ https://bugs.webkit.org/show_bug.cgi?id=82093
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * en_GB.po:
+
+2012-03-24 Fran Dieguez <frandieguez@gnome.org>
+
+ Add Galician translations for webkitgtk
+ https://bugs.webkit.org/show_bug.cgi?id=67591
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * gl.po:
+
+2012-03-24 Matej Urbančič <mateju@svn.gnome.org>
+
+ Slovenian translation update
+ https://bugs.webkit.org/show_bug.cgi?id=68504
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * sl.po:
+
2012-03-02 Alexandre Rostovtsev <tetromino@gentoo.org>
Make webkit-gtk translations respect LINGUAS
diff --git a/Source/WebKit/gtk/po/GNUmakefile.am b/Source/WebKit/gtk/po/GNUmakefile.am
index 3eddaac2b..6134fb0e2 100644
--- a/Source/WebKit/gtk/po/GNUmakefile.am
+++ b/Source/WebKit/gtk/po/GNUmakefile.am
@@ -35,7 +35,7 @@ USE_LINGUAS += $(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLI
MOFILES += $(USE_LINGUAS:%=Source/WebKit/gtk/po/%.mo)
-ALL_MOFILES := $(shell echo $(POFILES) | tr ' ' '\n' | sed "s,^$(srcdir)/,,g" | sed 's/\.po/.mo/g')
+ALL_MOFILES += $(shell echo $(POFILES) | tr ' ' '\n' | sed "s,^$(srcdir)/,,g" | sed 's/\.po/.mo/g')
.po.mo:
test -d Source/WebKit/gtk/po/ || mkdir -p Source/WebKit/gtk/po/
diff --git a/Source/WebKit/gtk/po/de.po b/Source/WebKit/gtk/po/de.po
index 5b4816899..b52beb55e 100644
--- a/Source/WebKit/gtk/po/de.po
+++ b/Source/WebKit/gtk/po/de.po
@@ -1,14 +1,15 @@
# German translations for WebKit package.
# This file is put in the public domain.
# Copyright (C) 2009 Christian Dywan <christian@twotoasts.de>, 2009.
-# Mario Blättermann <mariobl@gnome.org>, 2010.
-# Christian Kirbach <Christian.Kirbach@googlemail.com>, 2010.
+# Mario Blättermann <mario.blaettermann@gmail.com>, 2010, 2012.
+# Christian Kirbach <Christian.Kirbach@googlemail.com>, 2010, 2012.
+#
msgid ""
msgstr ""
-"Project-Id-Version: webkit 1.1.21\n"
-"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n"
-"POT-Creation-Date: 2010-02-25 15:53-0300\n"
-"PO-Revision-Date: 2010-03-21 21:14+0100\n"
+"Project-Id-Version: webkit HEAD\n"
+"Report-Msgid-Bugs-To: http://bugs.webkit.org\n"
+"POT-Creation-Date: 2010-12-27 15:26+0000\n"
+"PO-Revision-Date: 2012-01-29 19:03+0100\n"
"Last-Translator: Christian Kirbach <Christian.Kirbach@googlemail.com>\n"
"Language-Team: Deutsch <gnome-de@gnome.org>\n"
"MIME-Version: 1.0\n"
@@ -18,1080 +19,1431 @@ msgstr ""
"X-Poedit-Language: German\n"
"X-Poedit-Country: GERMANY\n"
-#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535
+#: ../WebCoreSupport/ChromeClientGtk.cpp:589
msgid "Upload File"
msgstr "Datei hochladen"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:63
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:194
msgid "Input _Methods"
msgstr "Eingabe_methoden"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:80
msgid "LRM _Left-to-right mark"
msgstr "LRM Von-_links-nach-rechts-Marke"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:81
msgid "RLM _Right-to-left mark"
msgstr "RLM Von-_rechts-nach-links-Marke"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:82
msgid "LRE Left-to-right _embedding"
msgstr "LRE Von-links-nach-rechts-_Einbettung"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:83
msgid "RLE Right-to-left e_mbedding"
msgstr "RLE Von-rechts-nach-Links-E_inbettung"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:84
msgid "LRO Left-to-right _override"
msgstr "LRO Von-links-nach-rechts-Ü_berschreiben"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:85
msgid "RLO Right-to-left o_verride"
msgstr "RLO Von-rechts-nach-links-Ü_berschreiben"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:86
msgid "PDF _Pop directional formatting"
msgstr "PDF Richtungsformatierungs-_Pop"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:87
msgid "ZWS _Zero width space"
msgstr "ZWS-Leerraum mit Breite _null"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:88
msgid "ZWJ Zero width _joiner"
msgstr "ZWJ-_Verbinder mit Breite null"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:89
msgid "ZWNJ Zero width _non-joiner"
msgstr "ZWNJ-_Trenner mit Breite null"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:111
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:189
msgid "_Insert Unicode Control Character"
msgstr "_Unicode-Steuerzeichen einfügen"
-#: WebKit/gtk/webkit/webkitdownload.cpp:266
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1180
+msgid "Load request cancelled"
+msgstr "Ladeanforderung abgebrochen"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1186
+msgid "Not allowed to use restricted network port"
+msgstr "Keine Berechtigung, einen eingeschränkten Netzwerk-Port zu verwenden"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1192
+msgid "URL cannot be shown"
+msgstr "Die Adresse kann nicht angezeigt werden"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1198
+msgid "Frame load was interrupted"
+msgstr "Laden des Rahmens wurde unterbrochen"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1204
+msgid "Content with the specified MIME type cannot be shown"
+msgstr "Der Inhalt kann mit dem angegebenen MIME-Typen nicht angezeigt werden"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1210
+msgid "File does not exist"
+msgstr "Datei existiert nicht"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1216
+msgid "Plugin will handle load"
+msgstr "Inhalt wird durch Plugin geladen"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:385
+msgid "Play"
+msgstr "Wiedergeben"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:387
+msgid "Pause"
+msgstr "Anhalten"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:533
+msgid "Play / Pause"
+msgstr "Wiedergabe / Anhalten"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:533
+msgid "Play or pause the media"
+msgstr "Das Medium wiedergeben oder anhalten"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:541
+msgid "Time:"
+msgstr "Zeit:"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:565
+msgid "Exit Fullscreen"
+msgstr "Vollbild verlassen"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:565
+msgid "Exit from fullscreen mode"
+msgstr "Den Vollbildmodus verlassen"
+
+#: ../webkit/webkitdownload.cpp:273
msgid "Network Request"
msgstr "Netzwerkanfrage"
-#: WebKit/gtk/webkit/webkitdownload.cpp:267
+#: ../webkit/webkitdownload.cpp:274
msgid "The network request for the URI that should be downloaded"
msgstr "Die Netzwerkanfrage der Adresse, welche heruntergeladen werden soll"
-#: WebKit/gtk/webkit/webkitdownload.cpp:281
+#: ../webkit/webkitdownload.cpp:288
msgid "Network Response"
msgstr "Netzwerkantwort"
-#: WebKit/gtk/webkit/webkitdownload.cpp:282
+#: ../webkit/webkitdownload.cpp:289
msgid "The network response for the URI that should be downloaded"
msgstr "Die Netzwerkantwort der Adresse, welche heruntergeladen werden soll"
-#: WebKit/gtk/webkit/webkitdownload.cpp:296
+#: ../webkit/webkitdownload.cpp:303
msgid "Destination URI"
msgstr "Zieladresse"
-#: WebKit/gtk/webkit/webkitdownload.cpp:297
+#: ../webkit/webkitdownload.cpp:304
msgid "The destination URI where to save the file"
msgstr "Die Zieladresse, an welcher die Datei gespeichert werden soll"
-#: WebKit/gtk/webkit/webkitdownload.cpp:311
+#: ../webkit/webkitdownload.cpp:318
msgid "Suggested Filename"
msgstr "Vorgeschlagener Dateiname"
-#: WebKit/gtk/webkit/webkitdownload.cpp:312
+#: ../webkit/webkitdownload.cpp:319
msgid "The filename suggested as default when saving"
msgstr "Der beim Speichern als Vorgabe vorgeschlagene Dateiname"
-#: WebKit/gtk/webkit/webkitdownload.cpp:329
+#: ../webkit/webkitdownload.cpp:336
msgid "Progress"
msgstr "Fortschritt"
-#: WebKit/gtk/webkit/webkitdownload.cpp:330
+#: ../webkit/webkitdownload.cpp:337
msgid "Determines the current progress of the download"
msgstr "Bestimmt den aktuellen Fortschritt des Herunterladens"
-#: WebKit/gtk/webkit/webkitdownload.cpp:343
+#: ../webkit/webkitdownload.cpp:350
msgid "Status"
msgstr "Status"
-#: WebKit/gtk/webkit/webkitdownload.cpp:344
+#: ../webkit/webkitdownload.cpp:351
msgid "Determines the current status of the download"
msgstr "Bestimmt den aktuellen Status des Herunterladens"
-#: WebKit/gtk/webkit/webkitdownload.cpp:359
+#: ../webkit/webkitdownload.cpp:366
msgid "Current Size"
msgstr "Aktuelle Größe"
-#: WebKit/gtk/webkit/webkitdownload.cpp:360
+#: ../webkit/webkitdownload.cpp:367
msgid "The length of the data already downloaded"
msgstr "Die Länge der bereits heruntergeladenen Daten"
-#: WebKit/gtk/webkit/webkitdownload.cpp:374
+#: ../webkit/webkitdownload.cpp:381
msgid "Total Size"
msgstr "Gesamtgröße"
-#: WebKit/gtk/webkit/webkitdownload.cpp:375
+#: ../webkit/webkitdownload.cpp:382
msgid "The total size of the file"
msgstr "Die Gesamtgröße der Datei"
-#: WebKit/gtk/webkit/webkitdownload.cpp:526
+#: ../webkit/webkitdownload.cpp:534
msgid "User cancelled the download"
msgstr "Download wurde vom Benutzer abgebrochen"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248
+#: ../webkit/webkithittestresult.cpp:156
+msgid "Context"
+msgstr "Kontext"
+
+#: ../webkit/webkithittestresult.cpp:157
+msgid "Flags indicating the kind of target that received the event."
+msgstr ""
+"Flags, welche die Art des Ziels angeben, welches das Ereignis empfangen hat."
+
+#: ../webkit/webkithittestresult.cpp:171
+msgid "Link URI"
+msgstr "Adresse des Verweises"
+
+#: ../webkit/webkithittestresult.cpp:172
+#, fuzzy
+msgid "The URI to which the target that received the event points, if any."
+msgstr ""
+"Die Adresse zum Ziel ?, welches die Ereignispunkte erhalten hat, falls "
+"überhaupt."
+
+#: ../webkit/webkithittestresult.cpp:185
+msgid "Image URI"
+msgstr "Bildadresse"
+
+#: ../webkit/webkithittestresult.cpp:186
+msgid ""
+"The URI of the image that is part of the target that received the event, if "
+"any."
+msgstr ""
+"Die Adresse des Bildes, welches Teils des Ziels ist, welches das Ereignis "
+"empfangen hat, falls verfügbar."
+
+#: ../webkit/webkithittestresult.cpp:199
+msgid "Media URI"
+msgstr "Medienadresse"
+
+#: ../webkit/webkithittestresult.cpp:200
+msgid ""
+"The URI of the media that is part of the target that received the event, if "
+"any."
+msgstr ""
+"Die Adresse des Mediums, welches Teils des Ziels ist, welches das Ereignis "
+"empfangen hat, falls verfügbar."
+
+#: ../webkit/webkithittestresult.cpp:221
+msgid "Inner node"
+msgstr "Innerer Knoten"
+
+#: ../webkit/webkithittestresult.cpp:222
+msgid "The inner DOM node associated with the hit test result."
+msgstr "Der innere DOM-Knoten, der mit Trefferergebnis verknüpft ist."
+
+#: ../webkit/webkitnetworkrequest.cpp:134
+#: ../webkit/webkitnetworkresponse.cpp:134 ../webkit/webkitwebframe.cpp:323
+#: ../webkit/webkitwebhistoryitem.cpp:176 ../webkit/webkitwebresource.cpp:126
+#: ../webkit/webkitwebview.cpp:2997
+msgid "URI"
+msgstr "Adresse"
+
+#: ../webkit/webkitnetworkrequest.cpp:135
+msgid "The URI to which the request will be made."
+msgstr "Die Adresse, an welche die Anfrage gestellt wird."
+
+#: ../webkit/webkitnetworkrequest.cpp:148
+#: ../webkit/webkitnetworkresponse.cpp:148
+msgid "Message"
+msgstr "Meldung"
+
+#: ../webkit/webkitnetworkrequest.cpp:149
+msgid "The SoupMessage that backs the request."
+msgstr "Die SoupMessage, welche die Anfrage vorbringt."
+
+#: ../webkit/webkitnetworkresponse.cpp:135
+msgid "The URI to which the response will be made."
+msgstr "Die Adresse, an welche die Antwort gegeben wird."
+
+#: ../webkit/webkitnetworkresponse.cpp:149
+msgid "The SoupMessage that backs the response."
+msgstr "Die SoupMessage, welche die Antwort trägt."
+
+#: ../webkit/webkitsecurityorigin.cpp:150
+msgid "Protocol"
+msgstr "Protokoll"
+
+#: ../webkit/webkitsecurityorigin.cpp:151
+#, fuzzy
+msgid "The protocol of the security origin"
+msgstr "Das Protokoll der ?"
+
+#: ../webkit/webkitsecurityorigin.cpp:164
+msgid "Host"
+msgstr "Rechner"
+
+#: ../webkit/webkitsecurityorigin.cpp:165
+#, fuzzy
+msgid "The host of the security origin"
+msgstr "Der Rechner der ?"
+
+#: ../webkit/webkitsecurityorigin.cpp:178
+msgid "Port"
+msgstr "Port"
+
+#: ../webkit/webkitsecurityorigin.cpp:179
+#, fuzzy
+msgid "The port of the security origin"
+msgstr "Der Port der ?"
+
+#: ../webkit/webkitsecurityorigin.cpp:192
+msgid "Web Database Usage"
+msgstr "Verwendung der Web-Datenbank"
+
+#: ../webkit/webkitsecurityorigin.cpp:193
+#, fuzzy
+msgid "The cumulative size of all web databases in the security origin"
+msgstr "Die Gesamtgröße aller Web-Datenbanken im ?"
+
+#: ../webkit/webkitsecurityorigin.cpp:205
+msgid "Web Database Quota"
+msgstr "Speicherplatzbegrenzung der Web-Datenbank"
+
+#: ../webkit/webkitsecurityorigin.cpp:206
+#, fuzzy
+msgid "The web database quota of the security origin in bytes"
+msgstr "Die Speicherplatzbegrenzung des ? in Bytes"
+
+#: ../webkit/webkitsoupauthdialog.c:264
#, c-format
msgid "A username and password are being requested by the site %s"
msgstr "Ein Benutzername und ein Passwort sind für die Seite %s erforderlich"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278
+#: ../webkit/webkitsoupauthdialog.c:294
msgid "Server message:"
msgstr "Server-Nachricht:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291
+#: ../webkit/webkitsoupauthdialog.c:307
msgid "Username:"
msgstr "Benutzername:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293
+#: ../webkit/webkitsoupauthdialog.c:309
msgid "Password:"
msgstr "Passwort:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302
+#: ../webkit/webkitsoupauthdialog.c:318
msgid "_Remember password"
msgstr "An Passwort _erinnern"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:298
+#: ../webkit/webkitwebdatabase.cpp:173
+msgid "Security Origin"
+msgstr ""
+
+#: ../webkit/webkitwebdatabase.cpp:174
+#, fuzzy
+msgid "The security origin of the database"
+msgstr "Das ? der Datenbank"
+
+#: ../webkit/webkitwebdatabase.cpp:187 ../webkit/webkitwebframe.cpp:309
msgid "Name"
msgstr "Name"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:299
+#: ../webkit/webkitwebdatabase.cpp:188
+msgid "The name of the Web Database database"
+msgstr "Der Name der Web-Datenbank"
+
+#: ../webkit/webkitwebdatabase.cpp:201
+msgid "Display Name"
+msgstr "Anzeigename"
+
+#: ../webkit/webkitwebdatabase.cpp:202
+msgid "The display name of the Web Storage database"
+msgstr "Der Anzeigename der Webspeicher-Datenbank"
+
+#: ../webkit/webkitwebdatabase.cpp:215
+msgid "Expected Size"
+msgstr "Erwartete Größe"
+
+#: ../webkit/webkitwebdatabase.cpp:216
+msgid "The expected size of the Web Database database"
+msgstr "Die erwartete Größe der Web-Datenbank"
+
+#: ../webkit/webkitwebdatabase.cpp:228
+msgid "Size"
+msgstr "Größe"
+
+#: ../webkit/webkitwebdatabase.cpp:229
+msgid "The current size of the Web Database database"
+msgstr "Die aktuelle Größe der Web-Datenbank"
+
+#: ../webkit/webkitwebdatabase.cpp:241
+msgid "Filename"
+msgstr "Dateiname"
+
+#: ../webkit/webkitwebdatabase.cpp:242
+msgid "The absolute filename of the Web Storage database"
+msgstr "Der absolute Dateiname der Webspeicher-Datenbank"
+
+#: ../webkit/webkitwebframe.cpp:310
msgid "The name of the frame"
msgstr "Der Name des Rahmens"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:305
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146
-#: WebKit/gtk/webkit/webkitwebview.cpp:2318
+#: ../webkit/webkitwebframe.cpp:316 ../webkit/webkitwebhistoryitem.cpp:144
+#: ../webkit/webkitwebview.cpp:2983
msgid "Title"
msgstr "Titel"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:306
+#: ../webkit/webkitwebframe.cpp:317
msgid "The document title of the frame"
msgstr "Der Titel des Dokuments in dem Rahmen"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:312
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178
-#: WebKit/gtk/webkit/webkitwebview.cpp:2332
-msgid "URI"
-msgstr "Adresse"
-
-#: WebKit/gtk/webkit/webkitwebframe.cpp:313
+#: ../webkit/webkitwebframe.cpp:324
msgid "The current URI of the contents displayed by the frame"
msgstr "Die aktuelle Adresse der im Rahmen dargestellten Inhalte"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:344
+#: ../webkit/webkitwebframe.cpp:355
msgid "Horizontal Scrollbar Policy"
msgstr "Richtlinie für horizontal Rollbalken"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:345
+#: ../webkit/webkitwebframe.cpp:356
msgid ""
"Determines the current policy for the horizontal scrollbar of the frame."
msgstr ""
"Bestimmt die aktuelle Richtlinie für den horizontalen Rollbalken des Rahmens."
-#: WebKit/gtk/webkit/webkitwebframe.cpp:362
+#: ../webkit/webkitwebframe.cpp:373
msgid "Vertical Scrollbar Policy"
msgstr "Richtlinie für vertikale Rollbalken"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:363
+#: ../webkit/webkitwebframe.cpp:374
msgid "Determines the current policy for the vertical scrollbar of the frame."
msgstr ""
"Bestimmt die aktuelle Richtlinie für den vertikalen Rollbalken des Rahmens."
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147
+#: ../webkit/webkitwebhistoryitem.cpp:145
msgid "The title of the history item"
msgstr "Der Titel des Chronikeintrags"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162
+#: ../webkit/webkitwebhistoryitem.cpp:160
msgid "Alternate Title"
msgstr "Alternativer Titel"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163
+#: ../webkit/webkitwebhistoryitem.cpp:161
msgid "The alternate title of the history item"
msgstr "Der alternative Titel des Chronikeintrags"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179
+#: ../webkit/webkitwebhistoryitem.cpp:177
msgid "The URI of the history item"
msgstr "Die Adresse des Chronikobjekts"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173
+#: ../webkit/webkitwebhistoryitem.cpp:192
+#: ../webkit/webkitwebnavigationaction.cpp:171
msgid "Original URI"
msgstr "Originaladresse"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195
+#: ../webkit/webkitwebhistoryitem.cpp:193
msgid "The original URI of the history item"
msgstr "Die Originaladresse des Chronikeintrags"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210
+#: ../webkit/webkitwebhistoryitem.cpp:208
msgid "Last visited Time"
msgstr "Zeit des letzten Besuchs"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211
+#: ../webkit/webkitwebhistoryitem.cpp:209
msgid "The time at which the history item was last visited"
msgstr "Der Zeitpunkt, an dem der Chronikeintrag zuletzt besucht wurde"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:268
+#: ../webkit/webkitwebinspector.cpp:270
msgid "Web View"
msgstr "Webansicht"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:269
+#: ../webkit/webkitwebinspector.cpp:271
msgid "The Web View that renders the Web Inspector itself"
msgstr "Die Webansicht, die den Web-Inspektor selbst darstellt"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:282
+#: ../webkit/webkitwebinspector.cpp:284
msgid "Inspected URI"
msgstr "Untersuchte Adresse"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:283
+#: ../webkit/webkitwebinspector.cpp:285
msgid "The URI that is currently being inspected"
msgstr "Die Adresse, die derzeit untersucht wird"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:299
+#: ../webkit/webkitwebinspector.cpp:301
msgid "Enable JavaScript profiling"
msgstr "JavaScript-Profiling aktivieren"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:300
+#: ../webkit/webkitwebinspector.cpp:302
msgid "Profile the executed JavaScript."
msgstr "Das ausgeführte JavaScript profilieren."
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:315
+#: ../webkit/webkitwebinspector.cpp:317
msgid "Enable Timeline profiling"
msgstr "Timeline-Profiling aktivieren"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:316
+#: ../webkit/webkitwebinspector.cpp:318
msgid "Profile the WebCore instrumentation."
msgstr "Die WebCore-Instrumentation profilieren."
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158
+#: ../webkit/webkitwebnavigationaction.cpp:156
msgid "Reason"
msgstr "Grund"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159
+#: ../webkit/webkitwebnavigationaction.cpp:157
msgid "The reason why this navigation is occurring"
msgstr "Der Grund, warum diese Navigation geschieht"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174
+#: ../webkit/webkitwebnavigationaction.cpp:172
msgid "The URI that was requested as the target for the navigation"
msgstr "Die Adresse, die als Navigationsziel angefordert wurde"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188
+#: ../webkit/webkitwebnavigationaction.cpp:186
msgid "Button"
msgstr "Knopf"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189
+#: ../webkit/webkitwebnavigationaction.cpp:187
msgid "The button used to click"
msgstr "Der angeklickte Knopf"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204
+#: ../webkit/webkitwebnavigationaction.cpp:202
msgid "Modifier state"
msgstr "Modifikatorstatus"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205
+#: ../webkit/webkitwebnavigationaction.cpp:203
msgid "A bitmask representing the state of the modifier keys"
msgstr "Eine Bitmaske, die den Status der Zusatztasten darstellt."
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220
+#: ../webkit/webkitwebnavigationaction.cpp:218
msgid "Target frame"
msgstr "Zielrahmen"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221
+#: ../webkit/webkitwebnavigationaction.cpp:219
msgid "The target frame for the navigation"
msgstr "Der Zielrahmen der Navigation"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:237
+#: ../webkit/webkitwebresource.cpp:127
+msgid "The uri of the resource"
+msgstr "Die Adresse der Ressource"
+
+#: ../webkit/webkitwebresource.cpp:141
+msgid "MIME Type"
+msgstr "MIME-Typ"
+
+#: ../webkit/webkitwebresource.cpp:142
+msgid "The MIME type of the resource"
+msgstr "Der MIME-Typ der Ressource"
+
+#: ../webkit/webkitwebresource.cpp:156 ../webkit/webkitwebview.cpp:3132
+msgid "Encoding"
+msgstr "Zeichenkodierung"
+
+#: ../webkit/webkitwebresource.cpp:157
+msgid "The text encoding name of the resource"
+msgstr "Der Name der Zeichenkodierung der Ressource"
+
+#: ../webkit/webkitwebresource.cpp:172
+msgid "Frame Name"
+msgstr "Der Name des Rahmens"
+
+#: ../webkit/webkitwebresource.cpp:173
+msgid "The frame name of the resource"
+msgstr "Der Name der Ressource"
+
+#: ../webkit/webkitwebsettings.cpp:252
msgid "Default Encoding"
msgstr "Voreingestellte Zeichenkodierung"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:238
+#: ../webkit/webkitwebsettings.cpp:253
msgid "The default encoding used to display text."
msgstr "Die voreingestellte Zeichenkodierung zur Darstellung von Text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:246
+#: ../webkit/webkitwebsettings.cpp:261
msgid "Cursive Font Family"
msgstr "Kursiv-Schriftfamilie"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:247
+#: ../webkit/webkitwebsettings.cpp:262
msgid "The default Cursive font family used to display text."
msgstr "Die vorgegebene Kursiv-Schriftfamilie zur Darstellung von Text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:255
+#: ../webkit/webkitwebsettings.cpp:270
msgid "Default Font Family"
msgstr "Voreingestellte Schriftfamilie"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:256
+#: ../webkit/webkitwebsettings.cpp:271
msgid "The default font family used to display text."
msgstr "Die voreingestellte Schriftfamilie zur Darstellung von Text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:264
+#: ../webkit/webkitwebsettings.cpp:279
msgid "Fantasy Font Family"
msgstr "Fantasy-Schriftfamilie"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:265
+#: ../webkit/webkitwebsettings.cpp:280
msgid "The default Fantasy font family used to display text."
msgstr "Die voreingestellte Fantasy-Schriftfamilie zur Darstellung von Text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:273
+#: ../webkit/webkitwebsettings.cpp:288
msgid "Monospace Font Family"
msgstr "Monospace-Schriftfamilie"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:274
+#: ../webkit/webkitwebsettings.cpp:289
msgid "The default font family used to display monospace text."
msgstr ""
"Die voreingestellte Schriftfamilie zur Darstellung von dicktengleichem Text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:282
+#: ../webkit/webkitwebsettings.cpp:297
msgid "Sans Serif Font Family"
msgstr "Sans-Serif-Schriftfamilie"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:283
+#: ../webkit/webkitwebsettings.cpp:298
msgid "The default Sans Serif font family used to display text."
msgstr ""
"Die voreingestellte Sans-Serif-Schriftfamilie zur Darstellung von Text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:291
+#: ../webkit/webkitwebsettings.cpp:306
msgid "Serif Font Family"
msgstr "Serif-Schriftfamilie"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:292
+#: ../webkit/webkitwebsettings.cpp:307
msgid "The default Serif font family used to display text."
msgstr "Die voreingestellte Serif-Schriftfamilie zur Darstellung von Text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:300
+#: ../webkit/webkitwebsettings.cpp:315
msgid "Default Font Size"
msgstr "Voreingestellte Schriftgröße"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:301
+#: ../webkit/webkitwebsettings.cpp:316
msgid "The default font size used to display text."
msgstr "Die voreingestellte Schriftgröße zur Darstellung von Text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:309
+#: ../webkit/webkitwebsettings.cpp:324
msgid "Default Monospace Font Size"
msgstr "Voreingestellte Monospace-Schriftgröße"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:310
+#: ../webkit/webkitwebsettings.cpp:325
msgid "The default font size used to display monospace text."
msgstr ""
"Die voreingestellte Schriftgröße zur Darstellung von dicktengleichem Text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:318
+#: ../webkit/webkitwebsettings.cpp:333
msgid "Minimum Font Size"
msgstr "Mindestschriftgröße"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:319
+#: ../webkit/webkitwebsettings.cpp:334
msgid "The minimum font size used to display text."
msgstr "Die Mindestgröße der Schrift zur Darstellung von Text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:327
+#: ../webkit/webkitwebsettings.cpp:342
msgid "Minimum Logical Font Size"
msgstr "Kleinste logische Schriftgröße"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:328
+#: ../webkit/webkitwebsettings.cpp:343
msgid "The minimum logical font size used to display text."
msgstr "Die kleinste logische Schriftgröße zur Darstellung von Text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:347
+#: ../webkit/webkitwebsettings.cpp:362
msgid "Enforce 96 DPI"
msgstr "96 dpi erzwingen"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:348
+#: ../webkit/webkitwebsettings.cpp:363
msgid "Enforce a resolution of 96 DPI"
msgstr "Eine Auflösung von 96 dpi erzwingen"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:356
+#: ../webkit/webkitwebsettings.cpp:371
msgid "Auto Load Images"
msgstr "Bilder automatisch laden"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:357
+#: ../webkit/webkitwebsettings.cpp:372
msgid "Load images automatically."
msgstr "Bilder automatisch laden."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:365
+#: ../webkit/webkitwebsettings.cpp:380
msgid "Auto Shrink Images"
msgstr "Bilder automatisch verkleinern"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:366
+#: ../webkit/webkitwebsettings.cpp:381
msgid "Automatically shrink standalone images to fit."
msgstr "Größe alleinstehender Bilder automatisch anpassen."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:374
+#: ../webkit/webkitwebsettings.cpp:389
msgid "Print Backgrounds"
msgstr "Hintergründe drucken"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:375
+#: ../webkit/webkitwebsettings.cpp:390
msgid "Whether background images should be printed."
msgstr "Gibt an, ob Hintergrundbilder gedruckt werden sollen."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:383
+#: ../webkit/webkitwebsettings.cpp:398
msgid "Enable Scripts"
msgstr "Skripte aktivieren"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:384
+#: ../webkit/webkitwebsettings.cpp:399
msgid "Enable embedded scripting languages."
msgstr "Eingebettete Skriptsprachen aktivieren."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:392
+#: ../webkit/webkitwebsettings.cpp:407
msgid "Enable Plugins"
msgstr "Plugins aktivieren"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:393
+#: ../webkit/webkitwebsettings.cpp:408
msgid "Enable embedded plugin objects."
msgstr "Eingebettete Plugin-Objekte aktivieren."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:401
+#: ../webkit/webkitwebsettings.cpp:416
msgid "Resizable Text Areas"
msgstr "Größenänderung für Textfelder"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:402
+#: ../webkit/webkitwebsettings.cpp:417
msgid "Whether text areas are resizable."
msgstr "Gibt an, ob die Größe von Textfeldern geändert werden kann."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:409
+#: ../webkit/webkitwebsettings.cpp:424
msgid "User Stylesheet URI"
msgstr "Adresse der Benutzer-Stilvorlage"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:410
+#: ../webkit/webkitwebsettings.cpp:425
msgid "The URI of a stylesheet that is applied to every page."
msgstr ""
"Die Adresse einer benutzerdefinierten Stilvorlage, die auf alle Seiten "
"angewendet werden soll."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:425
+#: ../webkit/webkitwebsettings.cpp:440
msgid "Zoom Stepping Value"
msgstr "Schrittweite für Größenänderungen"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:426
+#: ../webkit/webkitwebsettings.cpp:441
msgid "The value by which the zoom level is changed when zooming in or out."
msgstr "Der Wert für Größenänderungensstufen beim Vergrößern oder Verkleinern."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:444
+#: ../webkit/webkitwebsettings.cpp:459
msgid "Enable Developer Extras"
msgstr "Erweiterungen für Entwickler aktivieren"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:445
+#: ../webkit/webkitwebsettings.cpp:460
msgid "Enables special extensions that help developers"
msgstr "Aktiviert spezielle Erweiterungen, die Entwickler unterstützen"
# Steht so im KDE-Browser rekonq.
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:465
+#: ../webkit/webkitwebsettings.cpp:480
msgid "Enable Private Browsing"
msgstr "Privaten Modus aktivieren"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:466
+#: ../webkit/webkitwebsettings.cpp:481
msgid "Enables private browsing mode"
msgstr "Aktiviert den privaten Modus für den Browser."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:481
+#: ../webkit/webkitwebsettings.cpp:496
msgid "Enable Spell Checking"
msgstr "Rechtschreibprüfung aktivieren"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:482
+#: ../webkit/webkitwebsettings.cpp:497
msgid "Enables spell checking while typing"
msgstr "Rechtschreibung beim Tippen überprüfen"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:505
+#: ../webkit/webkitwebsettings.cpp:520
msgid "Languages to use for spell checking"
msgstr "Sprachen für die Rechtschreibprüfung"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:506
+#: ../webkit/webkitwebsettings.cpp:521
msgid "Comma separated list of languages to use for spell checking"
msgstr "Durch Kommata getrennte Liste von Sprachen für die Rechtschreibprüfung"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:520
+#: ../webkit/webkitwebsettings.cpp:535
msgid "Enable Caret Browsing"
msgstr "Caret-Modus aktivieren"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:521
-msgid "Whether to enable accessibility enhanced keyboard navigation"
+#: ../webkit/webkitwebsettings.cpp:536
+msgid "Whether to enable accesibility enhanced keyboard navigation"
msgstr ""
-"Legt fest, ob die barrierefreie Tastaturnavigation aktiviert werden soll"
+"Legt fest, ob die erweiterte barrierefreie Tastaturnavigation aktiviert "
+"werden soll"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:536
+#: ../webkit/webkitwebsettings.cpp:551
msgid "Enable HTML5 Database"
msgstr "HTML5-Datenbank aktivieren"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:537
+#: ../webkit/webkitwebsettings.cpp:552
msgid "Whether to enable HTML5 database support"
msgstr "Legt fest, ob HTML5-Datenbanken unterstützt werden"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:552
+#: ../webkit/webkitwebsettings.cpp:567
msgid "Enable HTML5 Local Storage"
msgstr "Lokale Speicherung nach HTML5 aktivieren"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:553
+#: ../webkit/webkitwebsettings.cpp:568
msgid "Whether to enable HTML5 Local Storage support"
msgstr "Legt fest, ob lokale Speicherung nach HTML5 unterstützt wird"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:567
+#: ../webkit/webkitwebsettings.cpp:582
msgid "Enable XSS Auditor"
msgstr "XSS-Auditor aktivieren"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:568
-msgid "Whether to enable teh XSS auditor"
-msgstr "Legt fest, ob der XSS-Auditor aktiviert ist"
+#: ../webkit/webkitwebsettings.cpp:583
+msgid "Whether to enable the XSS auditor"
+msgstr "Legt fest, ob der XSS-Auditor aktiviert werden soll"
+
+#: ../webkit/webkitwebsettings.cpp:601
+msgid "Enable Spatial Navigation"
+msgstr "Räumliche Navigation aktivieren"
+
+#: ../webkit/webkitwebsettings.cpp:602
+msgid "Whether to enable Spatial Navigation"
+msgstr "Legt fest, ob die räumliche Navigation aktiviert werden soll"
+
+# Steht so im KDE-Browser rekonq.
+#: ../webkit/webkitwebsettings.cpp:620
+msgid "Enable Frame Flattening"
+msgstr "Rahmen zusammenfügen "
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:586
+# Steht so im KDE-Browser rekonq.
+#: ../webkit/webkitwebsettings.cpp:621
+msgid "Whether to enable Frame Flattening"
+msgstr "Gibt an, ob Rahmen zusammengefügt werden sollen"
+
+#: ../webkit/webkitwebsettings.cpp:638
msgid "User Agent"
msgstr "Benutzerprogramm"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:587
+#: ../webkit/webkitwebsettings.cpp:639
msgid "The User-Agent string used by WebKitGtk"
msgstr "Von WebKitGtk verwendete Zeichenkette für das Benutzerprogramm"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:602
+#: ../webkit/webkitwebsettings.cpp:654
msgid "JavaScript can open windows automatically"
msgstr "JavaScript darf Fenster automatisch öffnen"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:603
+#: ../webkit/webkitwebsettings.cpp:655
msgid "Whether JavaScript can open windows automatically"
msgstr "Legt fest, ob JavaScript Fenster automatisch öffnen darf"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:618
+#: ../webkit/webkitwebsettings.cpp:669
+msgid "JavaScript can access Clipboard"
+msgstr "Legt fest, ob JavaScript auf die Zwischenablage zugreifen darf"
+
+#: ../webkit/webkitwebsettings.cpp:670
+msgid "Whether JavaScript can access Clipboard"
+msgstr "Legt fest, ob JavaScript auf die Zwischenablage zugreifen darf"
+
+#: ../webkit/webkitwebsettings.cpp:686
msgid "Enable offline web application cache"
msgstr "Offline-Webanwendungscache aktivieren"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:619
+#: ../webkit/webkitwebsettings.cpp:687
msgid "Whether to enable offline web application cache"
msgstr "Legt fest, ob der Offline-Webanwendungscache aktiviert wird"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:646
+#: ../webkit/webkitwebsettings.cpp:715
msgid "Editing behavior"
msgstr "Bearbeitungsverhalten"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:647
+#: ../webkit/webkitwebsettings.cpp:716
msgid "The behavior mode to use in editing mode"
msgstr "Das Verhalten im Bearbeitungsmodus"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:663
+#: ../webkit/webkitwebsettings.cpp:732
msgid "Enable universal access from file URIs"
msgstr "Unbeschränkten Zugriff von Datei-Adressen aktivieren"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:664
+#: ../webkit/webkitwebsettings.cpp:733
msgid "Whether to allow universal access from file URIs"
msgstr "Legt fest, ob unbeschränkter Zugriff von Datei-Adressen aktiviert wird"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:679
+#: ../webkit/webkitwebsettings.cpp:748
msgid "Enable DOM paste"
msgstr "Einfügen ins DOM aktivieren"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:680
+#: ../webkit/webkitwebsettings.cpp:749
msgid "Whether to enable DOM paste"
msgstr "Legt fest, ob Einfügen ins DOM aktiviert ist"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:698
+#: ../webkit/webkitwebsettings.cpp:767
msgid "Tab key cycles through elements"
msgstr "Tabulatortaste wechselt zwischen Elementen"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:699
+#: ../webkit/webkitwebsettings.cpp:768
msgid "Whether the tab key cycles through elements on the page."
msgstr ""
"Legt fest, ob die Tabulatortaste zwischen Elementen auf der Seite wechselt."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:719
+#: ../webkit/webkitwebsettings.cpp:788
msgid "Enable Default Context Menu"
msgstr "Voreingestelltes Kontext-Menü aktivieren"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:720
+#: ../webkit/webkitwebsettings.cpp:789
msgid ""
"Enables the handling of right-clicks for the creation of the default context "
"menu"
msgstr ""
"Drücken der rechten Maustaste blendet das voreingestellte Kontext-Menü ein"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:740
+#: ../webkit/webkitwebsettings.cpp:809
msgid "Enable Site Specific Quirks"
msgstr "Seitenspezifische Fehlerumgehungen aktivieren"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:741
+#: ../webkit/webkitwebsettings.cpp:810
msgid "Enables the site-specific compatibility workarounds"
msgstr "Seitenspezifische Kompatibilitätsprobleme umgehen"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:763
+#: ../webkit/webkitwebsettings.cpp:832
msgid "Enable page cache"
msgstr "Seiten-Cache aktivieren"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:764
+#: ../webkit/webkitwebsettings.cpp:833
msgid "Whether the page cache should be used"
msgstr "Legt fest, ob Seiten-Cache verwendet werden soll"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:784
+#: ../webkit/webkitwebsettings.cpp:853
msgid "Auto Resize Window"
msgstr "Fenstergröße automatisch anpassen"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:785
+#: ../webkit/webkitwebsettings.cpp:854
msgid "Automatically resize the toplevel window when a page requests it"
msgstr ""
"Die Größe des obersten Fensters auf Aufforderung einer Seite automatisch "
"anpassen"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:817
+#: ../webkit/webkitwebsettings.cpp:886
msgid "Enable Java Applet"
msgstr "Java-Applet aktivieren"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:818
+#: ../webkit/webkitwebsettings.cpp:887
msgid "Whether Java Applet support through <applet> should be enabled"
msgstr "Legt fest, ob Java-Applets mittels <applet> unterstützt werden sollen"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2319
+#: ../webkit/webkitwebsettings.cpp:901
+msgid "Enable Hyperlink Auditing"
+msgstr "Hyperlink-Auditing aktivieren"
+
+#: ../webkit/webkitwebsettings.cpp:902
+#, fuzzy
+#| msgid "Whether the page cache should be used"
+msgid "Whether <a ping> should be able to send pings"
+msgstr "Legt fest, ob <ein ping> pings senden können soll"
+
+#: ../webkit/webkitwebsettings.cpp:910
+msgid "Enable Fullscreen"
+msgstr "Vollbild aktivieren"
+
+#: ../webkit/webkitwebsettings.cpp:911
+msgid "Whether the Mozilla style API should be enabled."
+msgstr "Legt fest, ob eine API im Mozilla-Stil aktiviert werden soll."
+
+#: ../webkit/webkitwebview.cpp:2984
msgid "Returns the @web_view's document title"
msgstr "Gibt den Dokumenttitel von @web_view zurück"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2333
+#: ../webkit/webkitwebview.cpp:2998
msgid "Returns the current URI of the contents displayed by the @web_view"
msgstr "Gibt die aktuelle Adresse des von @web_view angezeigten Inhalts zurück"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2346
+#: ../webkit/webkitwebview.cpp:3011
msgid "Copy target list"
msgstr "Liste der Kopierziele"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2347
+#: ../webkit/webkitwebview.cpp:3012
msgid "The list of targets this web view supports for clipboard copying"
msgstr ""
"Die Liste der Ziele, die diese Webansicht für Kopieren in die Zwischenablage "
"unterstützt"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2360
+#: ../webkit/webkitwebview.cpp:3025
msgid "Paste target list"
msgstr "Liste der Einfügeziele"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2361
+#: ../webkit/webkitwebview.cpp:3026
msgid "The list of targets this web view supports for clipboard pasting"
msgstr ""
"Die Liste der Ziele, die diese Webansicht für Einfügen der Zwischenablage "
"unterstützt"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2367
+#: ../webkit/webkitwebview.cpp:3032
msgid "Settings"
msgstr "Einstellungen"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2368
+#: ../webkit/webkitwebview.cpp:3033
msgid "An associated WebKitWebSettings instance"
msgstr "Eine zugeordnete WebKitWebSettings-Instanz"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2381
+#: ../webkit/webkitwebview.cpp:3046
msgid "Web Inspector"
msgstr "Web-Inspektor"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2382
+#: ../webkit/webkitwebview.cpp:3047
msgid "The associated WebKitWebInspector instance"
msgstr "Die zugeordnete WebKitWebInspector-Instanz"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2402
+#: ../webkit/webkitwebview.cpp:3060
+msgid "Viewport Attributes"
+msgstr "Sichtfeld-Attribute"
+
+#: ../webkit/webkitwebview.cpp:3061
+msgid "The associated WebKitViewportAttributes instance"
+msgstr "Die zugeordnete WebKitViewportAttributes-Instanz"
+
+#: ../webkit/webkitwebview.cpp:3081
msgid "Editable"
msgstr "Bearbeitbar"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2403
+#: ../webkit/webkitwebview.cpp:3082
msgid "Whether content can be modified by the user"
msgstr "Gibt an, ob der Inhalt vom Benutzer bearbeitet werden kann"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2409
+#: ../webkit/webkitwebview.cpp:3088
msgid "Transparent"
msgstr "Transparent"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2410
+#: ../webkit/webkitwebview.cpp:3089
msgid "Whether content has a transparent background"
msgstr "Gibt an, ob der Inhalt einen transparenten Hintergrund hat"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2423
+#: ../webkit/webkitwebview.cpp:3102
msgid "Zoom level"
msgstr "Vergrößerungsstufe"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2424
+#: ../webkit/webkitwebview.cpp:3103
msgid "The level of zoom of the content"
msgstr "Die Vergrößerungsstufe des Inhalts"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2439
+#: ../webkit/webkitwebview.cpp:3118
msgid "Full content zoom"
msgstr "Vollständige Größenänderung"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2440
+#: ../webkit/webkitwebview.cpp:3119
msgid "Whether the full content is scaled when zooming"
msgstr "Gibt an, ob Größenänderungen den gesamten Inhalt beeinflussen"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2453
-msgid "Encoding"
-msgstr "Zeichenkodierung"
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2454
+#: ../webkit/webkitwebview.cpp:3133
msgid "The default encoding of the web view"
msgstr "Die vorgegebene Zeichenkodierung der Webansicht"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2467
+#: ../webkit/webkitwebview.cpp:3146
msgid "Custom Encoding"
msgstr "Benutzerdefinierte Zeichenkodierung"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2468
+#: ../webkit/webkitwebview.cpp:3147
msgid "The custom encoding of the web view"
msgstr "Die benutzerdefinierte Zeichenkodierung der Webansicht"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2520
+#: ../webkit/webkitwebview.cpp:3199
msgid "Icon URI"
msgstr "Symboladresse"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2521
+#: ../webkit/webkitwebview.cpp:3200
msgid "The URI for the favicon for the #WebKitWebView."
msgstr "Die Adresse des favicon-Symbols für #WebKitWebView."
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:56
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:61
msgid "Submit"
msgstr "Absenden"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:66
msgid "Reset"
msgstr "Zurücksetzen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:71
msgid "This is a searchable index. Enter search keywords: "
msgstr "Dieser Index ist durchsuchbar. Geben Sie Suchbegriffe ein: "
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:76
msgid "Choose File"
msgstr "Datei wählen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:81
msgid "(None)"
msgstr "(Kein)"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:86
msgid "Open Link in New _Window"
msgstr "Verweis in neuem _Reiter öffnen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:91
msgid "_Download Linked File"
msgstr "Verweisziel herunter_laden"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:96
msgid "Copy Link Loc_ation"
msgstr "Verweisziel _kopieren"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:101
msgid "Open _Image in New Window"
msgstr "_Bild in neuem Fenster öffnen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:106
msgid "Sa_ve Image As"
msgstr "Bil_d speichern unter"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:111
msgid "Cop_y Image"
msgstr "Bild k_opieren"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:116
+msgid "Open _Video in New Window"
+msgstr "_Video in neuem Fenster öffnen"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:121
+msgid "Open _Audio in New Window"
+msgstr "_Audio in neuem Fenster öffnen"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:126
+msgid "Cop_y Video Link Location"
+msgstr "Video-Verweisziel _kopieren"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:131
+msgid "Cop_y Audio Link Location"
+msgstr "Audio-Verweisziel _kopieren"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:136
+msgid "_Toggle Media Controls"
+msgstr "Medien-Steuerung _an-/ausschalten"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:141
+msgid "Toggle Media _Loop Playback"
+msgstr "End_loswiedergabe von Medien ein-/ausschalten"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:146
+msgid "Switch Video to _Fullscreen"
+msgstr "Video in Vollbild umschalten"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:151
+msgid "_Play"
+msgstr "_Wiedergeben"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:156
+msgid "_Pause"
+msgstr "_Anhalten"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:161
+msgid "_Mute"
+msgstr "_Stumm schalten"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
msgid "Open _Frame in New Window"
msgstr "_Rahmen in neuem Fenster öffnen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:217
msgid "_Reload"
msgstr "_Neu laden"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:234
msgid "No Guesses Found"
msgstr "Keine Vorschläge verfügbar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:239
msgid "_Ignore Spelling"
msgstr "Rechtschreibung _ignorieren"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:244
msgid "_Learn Spelling"
msgstr "Rechtschreibung _hinzufügen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:249
msgid "_Search the Web"
msgstr "Im Netz _suchen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:254
msgid "_Look Up in Dictionary"
msgstr "In _Wörterbuch nachschlagen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:259
msgid "_Open Link"
msgstr "Verweis ö_ffnen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:264
msgid "Ignore _Grammar"
msgstr "Grammatik _ignorieren"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:269
msgid "Spelling and _Grammar"
msgstr "Rechtschreibung und _Grammatik"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:274
msgid "_Show Spelling and Grammar"
msgstr "Rechtschreibung und Grammatik _anzeigen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:274
msgid "_Hide Spelling and Grammar"
msgstr "Rechtschreibung und Grammatik _verbergen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:279
msgid "_Check Document Now"
msgstr "Dokument jetzt ü_berprüfen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:284
msgid "Check Spelling While _Typing"
msgstr "Rechtschreibung beim _Eintippen überprüfen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:289
msgid "Check _Grammar With Spelling"
msgstr "Grammatik beim _Eintippen überprüfen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:294
msgid "_Font"
msgstr "_Schriftart"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:317
msgid "_Outline"
msgstr "_Umrandung"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:322
msgid "Inspect _Element"
msgstr "Element _untersuchen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:327
msgid "No recent searches"
msgstr "Keine vergangenen Suchen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:332
msgid "Recent searches"
msgstr "Letzte Suchen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:337
msgid "_Clear recent searches"
msgstr "Letzte Su_chen löschen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
msgid "term"
msgstr "Begriff"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
msgid "definition"
msgstr "Festlegung"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:352
msgid "press"
msgstr "drücken"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:357
msgid "select"
msgstr "markieren"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:362
msgid "activate"
msgstr "aktivieren"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:367
msgid "uncheck"
msgstr "abwählen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:372
msgid "check"
msgstr "wählen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
msgid "jump"
msgstr "überspringen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:392
+msgid "Missing Plug-in"
+msgstr "Fehlendes Plugin"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:398
+msgid "Plug-in Failure"
+msgstr "Versagen des Plugins"
+
+#. 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:404
msgid " files"
msgstr " Dateien"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
msgid "Unknown"
msgstr "Unbekannt"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:414
+#, c-format
+msgctxt "Title string for images"
+msgid "%s (%dx%d pixels)"
+msgstr "%s (%dx%d Pixel)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
msgid "Loading..."
msgstr "Ladevorgang …"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:431
msgid "Live Broadcast"
msgstr "Live-Ausstrahlung"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:437
msgid "audio element controller"
msgstr "Steuerung für Audio-Elemente"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:439
msgid "video element controller"
msgstr "Steuerung für Video-Elemente"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:441
msgid "mute"
msgstr "Stumm schalten"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:443
msgid "unmute"
msgstr "Laut schalten"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:445
msgid "play"
msgstr "Abspielen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:447
msgid "pause"
msgstr "Pausieren"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:449
msgid "movie time"
msgstr "Filmdauer"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:451
msgid "timeline slider thumb"
msgstr "Rollbalken-Schieber der Zeitleiste"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:453
msgid "back 30 seconds"
msgstr "30 Sekunden zurück"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:455
msgid "return to realtime"
msgstr "Auf Echtzeit zurückstellen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:457
msgid "elapsed time"
msgstr "Vergangene Zeit"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:459
msgid "remaining time"
msgstr "Verbleibende Zeit"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
msgid "status"
msgstr "Status"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:463
msgid "fullscreen"
msgstr "Vollbild"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:465
msgid "fast forward"
msgstr "Vorspulen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:467
msgid "fast reverse"
msgstr "Zurückspulen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:469
msgid "show closed captions"
msgstr "geschlossene Beschriftung zeigen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:471
msgid "hide closed captions"
msgstr "geschlossene Beschriftung verbergen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:480
msgid "audio element playback controls and status display"
msgstr "Wiedergabesteuerung und Statusanzeige für Audio-Elemente"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:482
msgid "video element playback controls and status display"
msgstr "Wiedergabesteuerung und Statusanzeige für Video-Elemente"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:484
msgid "mute audio tracks"
msgstr "Tonspuren stumm schalten"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:486
msgid "unmute audio tracks"
msgstr "Tonspuren laut schalten"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:488
msgid "begin playback"
msgstr "Wiedergabe starten"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:490
msgid "pause playback"
msgstr "Wiedergabe pausieren"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:492
msgid "movie time scrubber"
msgstr "Zeitschieber für Filme"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:494
msgid "movie time scrubber thumb"
msgstr "Zeitschiebergriff für Filme"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:496
msgid "seek movie back 30 seconds"
msgstr "Film 30 Sekunden zurückspulen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:498
msgid "return streaming movie to real time"
msgstr "Streaming-Video auf Echtzeit zurückstellen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:500
msgid "current movie time in seconds"
msgstr "Aktuelle Filmwiedergabezeit in Sekunden"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
msgid "number of seconds of movie remaining"
msgstr "Anzahl verbleibender Sekunden des Films"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:504
msgid "current movie status"
msgstr "Status des aktuellen Films"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:506
msgid "seek quickly back"
msgstr "Schnell zurückspulen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:508
msgid "seek quickly forward"
msgstr "Schnell vorspulen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:510
msgid "Play movie in fullscreen mode"
msgstr "Den momentanen Film im Vollbildmodus wiedergeben"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
msgid "start displaying closed captions"
msgstr "beginnen, geschlossene Beschriftung zu zeigen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:514
msgid "stop displaying closed captions"
msgstr "beenden, geschlossene Beschriftung zu zeigen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:523
msgid "indefinite time"
msgstr "Unbegrenzte Zeit"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:553
msgid "value missing"
msgstr "Wert fehlt"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:589
msgid "type mismatch"
msgstr "Typ passt nicht"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:612
msgid "pattern mismatch"
msgstr "Muster passt nicht"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:617
msgid "too long"
msgstr "Zu lang"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:622
msgid "range underflow"
msgstr "Bereich unterschritten"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:627
msgid "range overflow"
msgstr "Bereich überschritten"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:632
msgid "step mismatch"
msgstr "Schritt passt nicht"
diff --git a/Source/WebKit/gtk/po/en_GB.po b/Source/WebKit/gtk/po/en_GB.po
index e202814a3..bf4e3fb1f 100644
--- a/Source/WebKit/gtk/po/en_GB.po
+++ b/Source/WebKit/gtk/po/en_GB.po
@@ -2,1094 +2,1445 @@
# Copyright (C) 2009 webkit's COPYRIGHT HOLDER
# This file is distributed under the same licence as the webkit package.
# Bruce Cowan <bcowan@fastmail.co.uk>, 2009.
-#
+# Chris Leonard <cjl@laptop.org>, 2012.
msgid ""
msgstr ""
"Project-Id-Version: webkit HEAD\n"
-"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n"
-"POT-Creation-Date: 2010-02-25 15:53-0300\n"
-"PO-Revision-Date: 2009-07-14 02:01+0100\n"
-"Last-Translator: Bruce Cowan <bcowan@fastmail.co.uk>\n"
-"Language-Team: British English <en@li.org>\n"
+"Report-Msgid-Bugs-To: http://bugs.webkit.org\n"
+"POT-Creation-Date: 2010-12-27 15:26+0000\n"
+"PO-Revision-Date: 2012-03-23 03:00-0400\n"
+"Last-Translator: Chris Leonard <cjl@laptop.org>\n"
+"Language-Team: Sugar Labs\n"
+"Language: en_GB\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Virtaal 0.7.0\n"
-#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535
+#: ../WebCoreSupport/ChromeClientGtk.cpp:589
msgid "Upload File"
msgstr "Upload File"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:63
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:194
msgid "Input _Methods"
msgstr "Input _Methods"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:80
msgid "LRM _Left-to-right mark"
msgstr "LRM _Left-to-right mark"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:81
msgid "RLM _Right-to-left mark"
msgstr "RLM _Right-to-left mark"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:82
msgid "LRE Left-to-right _embedding"
msgstr "LRE Left-to-right _embedding"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:83
msgid "RLE Right-to-left e_mbedding"
msgstr "RLE Right-to-left e_mbedding"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:84
msgid "LRO Left-to-right _override"
msgstr "LRO Left-to-right _override"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:85
msgid "RLO Right-to-left o_verride"
msgstr "RLO Right-to-left o_verride"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:86
msgid "PDF _Pop directional formatting"
msgstr "PDF _Pop directional formatting"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:87
msgid "ZWS _Zero width space"
msgstr "ZWS _Zero width space"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:88
msgid "ZWJ Zero width _joiner"
msgstr "ZWJ Zero width _joiner"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:89
msgid "ZWNJ Zero width _non-joiner"
msgstr "ZWNJ Zero width _non-joiner"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:111
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:189
msgid "_Insert Unicode Control Character"
msgstr "_Insert Unicode Control Character"
-#: WebKit/gtk/webkit/webkitdownload.cpp:266
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1180
+msgid "Load request cancelled"
+msgstr "Load request cancelled"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1186
+msgid "Not allowed to use restricted network port"
+msgstr "Not allowed to use restricted network port"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1192
+msgid "URL cannot be shown"
+msgstr "URL cannot be shown"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1198
+msgid "Frame load was interrupted"
+msgstr "Frame load was interrupted"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1204
+msgid "Content with the specified MIME type cannot be shown"
+msgstr "Content with the specified MIME type cannot be shown"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1210
+msgid "File does not exist"
+msgstr "File does not exist"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1216
+msgid "Plugin will handle load"
+msgstr "Plugin will handle load"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:385
+msgid "Play"
+msgstr "Play"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:387
+msgid "Pause"
+msgstr "Pause"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:533
+msgid "Play / Pause"
+msgstr "Play / Pause"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:533
+msgid "Play or pause the media"
+msgstr "Play or pause the media"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:541
+#| msgid "Title"
+msgid "Time:"
+msgstr "Time:"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:565
+msgid "Exit Fullscreen"
+msgstr "Exit Fullscreen"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:565
+msgid "Exit from fullscreen mode"
+msgstr "Exit from fullscreen mode"
+
+#: ../webkit/webkitdownload.cpp:273
msgid "Network Request"
msgstr "Network Request"
-#: WebKit/gtk/webkit/webkitdownload.cpp:267
+#: ../webkit/webkitdownload.cpp:274
msgid "The network request for the URI that should be downloaded"
msgstr "The network request for the URI that should be downloaded"
-#: WebKit/gtk/webkit/webkitdownload.cpp:281
-#, fuzzy
+#: ../webkit/webkitdownload.cpp:288
msgid "Network Response"
-msgstr "Network Request"
+msgstr "Network Response"
-#: WebKit/gtk/webkit/webkitdownload.cpp:282
-#, fuzzy
+#: ../webkit/webkitdownload.cpp:289
msgid "The network response for the URI that should be downloaded"
-msgstr "The network request for the URI that should be downloaded"
+msgstr "The network response for the URI that should be downloaded"
-#: WebKit/gtk/webkit/webkitdownload.cpp:296
+#: ../webkit/webkitdownload.cpp:303
msgid "Destination URI"
msgstr "Destination URI"
-#: WebKit/gtk/webkit/webkitdownload.cpp:297
+#: ../webkit/webkitdownload.cpp:304
msgid "The destination URI where to save the file"
msgstr "The destination URI where to save the file"
-#: WebKit/gtk/webkit/webkitdownload.cpp:311
+#: ../webkit/webkitdownload.cpp:318
msgid "Suggested Filename"
msgstr "Suggested Filename"
-#: WebKit/gtk/webkit/webkitdownload.cpp:312
+#: ../webkit/webkitdownload.cpp:319
msgid "The filename suggested as default when saving"
msgstr "The filename suggested as default when saving"
-#: WebKit/gtk/webkit/webkitdownload.cpp:329
+#: ../webkit/webkitdownload.cpp:336
msgid "Progress"
msgstr "Progress"
-#: WebKit/gtk/webkit/webkitdownload.cpp:330
+#: ../webkit/webkitdownload.cpp:337
msgid "Determines the current progress of the download"
msgstr "Determines the current progress of the download"
-#: WebKit/gtk/webkit/webkitdownload.cpp:343
+#: ../webkit/webkitdownload.cpp:350
msgid "Status"
msgstr "Status"
-#: WebKit/gtk/webkit/webkitdownload.cpp:344
+#: ../webkit/webkitdownload.cpp:351
msgid "Determines the current status of the download"
msgstr "Determines the current status of the download"
-#: WebKit/gtk/webkit/webkitdownload.cpp:359
+#: ../webkit/webkitdownload.cpp:366
msgid "Current Size"
msgstr "Current Size"
-#: WebKit/gtk/webkit/webkitdownload.cpp:360
+#: ../webkit/webkitdownload.cpp:367
msgid "The length of the data already downloaded"
msgstr "The length of the data already downloaded"
-#: WebKit/gtk/webkit/webkitdownload.cpp:374
+#: ../webkit/webkitdownload.cpp:381
msgid "Total Size"
msgstr "Total Size"
-#: WebKit/gtk/webkit/webkitdownload.cpp:375
+#: ../webkit/webkitdownload.cpp:382
msgid "The total size of the file"
msgstr "The total size of the file"
-#: WebKit/gtk/webkit/webkitdownload.cpp:526
+#: ../webkit/webkitdownload.cpp:534
+#, fuzzy
msgid "User cancelled the download"
msgstr "User cancelled the download"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248
+#: ../webkit/webkithittestresult.cpp:156
+msgid "Context"
+msgstr "Context"
+
+#: ../webkit/webkithittestresult.cpp:157
+msgid "Flags indicating the kind of target that received the event."
+msgstr "Flags indicating the kind of target that received the event."
+
+#: ../webkit/webkithittestresult.cpp:171
+#| msgid "Original URI"
+msgid "Link URI"
+msgstr "Link URI"
+
+#: ../webkit/webkithittestresult.cpp:172
+msgid "The URI to which the target that received the event points, if any."
+msgstr "The URI to which the target that received the event points, if any."
+
+#: ../webkit/webkithittestresult.cpp:185
+msgid "Image URI"
+msgstr "Image URI"
+
+#: ../webkit/webkithittestresult.cpp:186
+msgid ""
+"The URI of the image that is part of the target that received the event, if "
+"any."
+msgstr ""
+"The URI of the image that is part of the target that received the event, if "
+"any."
+
+#: ../webkit/webkithittestresult.cpp:199
+msgid "Media URI"
+msgstr "Media URI"
+
+#: ../webkit/webkithittestresult.cpp:200
+msgid ""
+"The URI of the media that is part of the target that received the event, if "
+"any."
+msgstr ""
+"The URI of the media that is part of the target that received the event, if "
+"any."
+
+#: ../webkit/webkithittestresult.cpp:221
+msgid "Inner node"
+msgstr "Inner node"
+
+#: ../webkit/webkithittestresult.cpp:222
+msgid "The inner DOM node associated with the hit test result."
+msgstr "The inner DOM node associated with the hit test result."
+
+#: ../webkit/webkitnetworkrequest.cpp:134
+#: ../webkit/webkitnetworkresponse.cpp:134 ../webkit/webkitwebframe.cpp:323
+#: ../webkit/webkitwebhistoryitem.cpp:176 ../webkit/webkitwebresource.cpp:126
+#: ../webkit/webkitwebview.cpp:2997
+msgid "URI"
+msgstr "URI"
+
+#: ../webkit/webkitnetworkrequest.cpp:135
+msgid "The URI to which the request will be made."
+msgstr "The URI to which the request will be made."
+
+#: ../webkit/webkitnetworkrequest.cpp:148
+#: ../webkit/webkitnetworkresponse.cpp:148
+msgid "Message"
+msgstr "Message"
+
+#: ../webkit/webkitnetworkrequest.cpp:149
+msgid "The SoupMessage that backs the request."
+msgstr "The SoupMessage that backs the request."
+
+#: ../webkit/webkitnetworkresponse.cpp:135
+msgid "The URI to which the response will be made."
+msgstr "The URI to which the response will be made."
+
+#: ../webkit/webkitnetworkresponse.cpp:149
+msgid "The SoupMessage that backs the response."
+msgstr "The SoupMessage that backs the response."
+
+#: ../webkit/webkitsecurityorigin.cpp:150
+msgid "Protocol"
+msgstr "Protocol"
+
+#: ../webkit/webkitsecurityorigin.cpp:151
+msgid "The protocol of the security origin"
+msgstr "The protocol of the security origin"
+
+#: ../webkit/webkitsecurityorigin.cpp:164
+msgid "Host"
+msgstr "Host"
+
+#: ../webkit/webkitsecurityorigin.cpp:165
+#| msgid "The title of the history item"
+msgid "The host of the security origin"
+msgstr "The host of the security origin"
+
+#: ../webkit/webkitsecurityorigin.cpp:178
+msgid "Port"
+msgstr "Port"
+
+#: ../webkit/webkitsecurityorigin.cpp:179
+#| msgid "The title of the history item"
+msgid "The port of the security origin"
+msgstr "The port of the security origin"
+
+#: ../webkit/webkitsecurityorigin.cpp:192
+msgid "Web Database Usage"
+msgstr "Web Database Usage"
+
+#: ../webkit/webkitsecurityorigin.cpp:193
+msgid "The cumulative size of all web databases in the security origin"
+msgstr "The cumulative size of all web databases in the security origin"
+
+#: ../webkit/webkitsecurityorigin.cpp:205
+msgid "Web Database Quota"
+msgstr "Web Database Quota"
+
+#: ../webkit/webkitsecurityorigin.cpp:206
+msgid "The web database quota of the security origin in bytes"
+msgstr "The web database quota of the security origin in bytes"
+
+#: ../webkit/webkitsoupauthdialog.c:264
#, c-format
msgid "A username and password are being requested by the site %s"
msgstr "A username and password are being requested by the site %s"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278
+#: ../webkit/webkitsoupauthdialog.c:294
msgid "Server message:"
-msgstr ""
+msgstr "Server message:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291
+#: ../webkit/webkitsoupauthdialog.c:307
msgid "Username:"
msgstr "Username:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293
+#: ../webkit/webkitsoupauthdialog.c:309
msgid "Password:"
msgstr "Password:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302
-#, fuzzy
+#: ../webkit/webkitsoupauthdialog.c:318
msgid "_Remember password"
-msgstr "Remember password"
+msgstr "_Remember password"
+
+#: ../webkit/webkitwebdatabase.cpp:173
+msgid "Security Origin"
+msgstr "Security Origin"
+
+#: ../webkit/webkitwebdatabase.cpp:174
+#| msgid "The custom encoding of the web view"
+msgid "The security origin of the database"
+msgstr "The security origin of the database"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:298
+#: ../webkit/webkitwebdatabase.cpp:187 ../webkit/webkitwebframe.cpp:309
msgid "Name"
msgstr "Name"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:299
+#: ../webkit/webkitwebdatabase.cpp:188
+#| msgid "The name of the frame"
+msgid "The name of the Web Database database"
+msgstr "The name of the Web Database database"
+
+#: ../webkit/webkitwebdatabase.cpp:201
+msgid "Display Name"
+msgstr "Display Name"
+
+#: ../webkit/webkitwebdatabase.cpp:202
+msgid "The display name of the Web Storage database"
+msgstr "The display name of the Web Storage database"
+
+#: ../webkit/webkitwebdatabase.cpp:215
+msgid "Expected Size"
+msgstr "Expected Size"
+
+#: ../webkit/webkitwebdatabase.cpp:216
+msgid "The expected size of the Web Database database"
+msgstr "The expected size of the Web Database database"
+
+#: ../webkit/webkitwebdatabase.cpp:228
+msgid "Size"
+msgstr "Size"
+
+#: ../webkit/webkitwebdatabase.cpp:229
+msgid "The current size of the Web Database database"
+msgstr "The current size of the Web Database database"
+
+#: ../webkit/webkitwebdatabase.cpp:241
+#| msgid "Suggested Filename"
+msgid "Filename"
+msgstr "Filename"
+
+#: ../webkit/webkitwebdatabase.cpp:242
+msgid "The absolute filename of the Web Storage database"
+msgstr "The absolute filename of the Web Storage database"
+
+#: ../webkit/webkitwebframe.cpp:310
msgid "The name of the frame"
msgstr "The name of the frame"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:305
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146
-#: WebKit/gtk/webkit/webkitwebview.cpp:2318
+#: ../webkit/webkitwebframe.cpp:316 ../webkit/webkitwebhistoryitem.cpp:144
+#: ../webkit/webkitwebview.cpp:2983
msgid "Title"
msgstr "Title"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:306
+#: ../webkit/webkitwebframe.cpp:317
msgid "The document title of the frame"
msgstr "The document title of the frame"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:312
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178
-#: WebKit/gtk/webkit/webkitwebview.cpp:2332
-msgid "URI"
-msgstr "URI"
-
-#: WebKit/gtk/webkit/webkitwebframe.cpp:313
+#: ../webkit/webkitwebframe.cpp:324
msgid "The current URI of the contents displayed by the frame"
msgstr "The current URI of the contents displayed by the frame"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:344
+#: ../webkit/webkitwebframe.cpp:355
msgid "Horizontal Scrollbar Policy"
-msgstr ""
+msgstr "Horizontal Scrollbar Policy"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:345
-#, fuzzy
+#: ../webkit/webkitwebframe.cpp:356
msgid ""
"Determines the current policy for the horizontal scrollbar of the frame."
-msgstr "Determines the current progress of the download"
+msgstr ""
+"Determines the current policy for the horizontal scrollbar of the frame."
-#: WebKit/gtk/webkit/webkitwebframe.cpp:362
+#: ../webkit/webkitwebframe.cpp:373
msgid "Vertical Scrollbar Policy"
-msgstr ""
+msgstr "Vertical Scrollbar Policy"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:363
-#, fuzzy
+#: ../webkit/webkitwebframe.cpp:374
msgid "Determines the current policy for the vertical scrollbar of the frame."
-msgstr "Determines the current progress of the download"
+msgstr "Determines the current policy for the vertical scrollbar of the frame."
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147
+#: ../webkit/webkitwebhistoryitem.cpp:145
msgid "The title of the history item"
msgstr "The title of the history item"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162
+#: ../webkit/webkitwebhistoryitem.cpp:160
msgid "Alternate Title"
msgstr "Alternate Title"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163
+#: ../webkit/webkitwebhistoryitem.cpp:161
msgid "The alternate title of the history item"
msgstr "The alternate title of the history item"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179
+#: ../webkit/webkitwebhistoryitem.cpp:177
msgid "The URI of the history item"
msgstr "The URI of the history item"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173
+#: ../webkit/webkitwebhistoryitem.cpp:192
+#: ../webkit/webkitwebnavigationaction.cpp:171
msgid "Original URI"
msgstr "Original URI"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195
+#: ../webkit/webkitwebhistoryitem.cpp:193
msgid "The original URI of the history item"
msgstr "The original URI of the history item"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210
+#: ../webkit/webkitwebhistoryitem.cpp:208
msgid "Last visited Time"
msgstr "Last visited Time"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211
+#: ../webkit/webkitwebhistoryitem.cpp:209
msgid "The time at which the history item was last visited"
msgstr "The time at which the history item was last visited"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:268
+#: ../webkit/webkitwebinspector.cpp:270
msgid "Web View"
msgstr "Web View"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:269
+#: ../webkit/webkitwebinspector.cpp:271
msgid "The Web View that renders the Web Inspector itself"
msgstr "The Web View that renders the Web Inspector itself"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:282
+#: ../webkit/webkitwebinspector.cpp:284
msgid "Inspected URI"
msgstr "Inspected URI"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:283
+#: ../webkit/webkitwebinspector.cpp:285
msgid "The URI that is currently being inspected"
msgstr "The URI that is currently being inspected"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:299
+#: ../webkit/webkitwebinspector.cpp:301
msgid "Enable JavaScript profiling"
msgstr "Enable JavaScript profiling"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:300
+#: ../webkit/webkitwebinspector.cpp:302
msgid "Profile the executed JavaScript."
msgstr "Profile the executed JavaScript."
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:315
-#, fuzzy
+#: ../webkit/webkitwebinspector.cpp:317
msgid "Enable Timeline profiling"
-msgstr "Enable JavaScript profiling"
+msgstr "Enable Timeline profiling"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:316
+#: ../webkit/webkitwebinspector.cpp:318
msgid "Profile the WebCore instrumentation."
-msgstr ""
+msgstr "Profile the WebCore instrumentation."
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158
+#: ../webkit/webkitwebnavigationaction.cpp:156
msgid "Reason"
msgstr "Reason"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159
+#: ../webkit/webkitwebnavigationaction.cpp:157
msgid "The reason why this navigation is occurring"
msgstr "The reason why this navigation is occurring"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174
+#: ../webkit/webkitwebnavigationaction.cpp:172
msgid "The URI that was requested as the target for the navigation"
msgstr "The URI that was requested as the target for the navigation"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188
+#: ../webkit/webkitwebnavigationaction.cpp:186
msgid "Button"
msgstr "Button"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189
+#: ../webkit/webkitwebnavigationaction.cpp:187
msgid "The button used to click"
msgstr "The button used to click"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204
+#: ../webkit/webkitwebnavigationaction.cpp:202
msgid "Modifier state"
msgstr "Modifier state"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205
+#: ../webkit/webkitwebnavigationaction.cpp:203
msgid "A bitmask representing the state of the modifier keys"
msgstr "A bitmask representing the state of the modifier keys"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220
-#, fuzzy
+#: ../webkit/webkitwebnavigationaction.cpp:218
msgid "Target frame"
-msgstr "The name of the frame"
+msgstr "Target frame"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221
-#, fuzzy
+#: ../webkit/webkitwebnavigationaction.cpp:219
msgid "The target frame for the navigation"
-msgstr "The URI that was requested as the target for the navigation"
+msgstr "The target frame for the navigation"
+
+#: ../webkit/webkitwebresource.cpp:127
+#| msgid "The title of the history item"
+msgid "The uri of the resource"
+msgstr "The URI of the resource"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:237
+#: ../webkit/webkitwebresource.cpp:141
+msgid "MIME Type"
+msgstr "MIME Type"
+
+#: ../webkit/webkitwebresource.cpp:142
+#| msgid "The title of the history item"
+msgid "The MIME type of the resource"
+msgstr "The MIME type of the resource"
+
+#: ../webkit/webkitwebresource.cpp:156 ../webkit/webkitwebview.cpp:3132
+msgid "Encoding"
+msgstr "Encoding"
+
+#: ../webkit/webkitwebresource.cpp:157
+#| msgid "The default encoding of the web view"
+msgid "The text encoding name of the resource"
+msgstr "The text encoding name of the resource"
+
+#: ../webkit/webkitwebresource.cpp:172
+msgid "Frame Name"
+msgstr "Frame Name"
+
+#: ../webkit/webkitwebresource.cpp:173
+#| msgid "The name of the frame"
+msgid "The frame name of the resource"
+msgstr "The frame name of the resource"
+
+#: ../webkit/webkitwebsettings.cpp:252
msgid "Default Encoding"
msgstr "Default Encoding"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:238
+#: ../webkit/webkitwebsettings.cpp:253
msgid "The default encoding used to display text."
msgstr "The default encoding used to display text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:246
+#: ../webkit/webkitwebsettings.cpp:261
msgid "Cursive Font Family"
msgstr "Cursive Font Family"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:247
+#: ../webkit/webkitwebsettings.cpp:262
msgid "The default Cursive font family used to display text."
msgstr "The default Cursive font family used to display text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:255
+#: ../webkit/webkitwebsettings.cpp:270
msgid "Default Font Family"
msgstr "Default Font Family"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:256
+#: ../webkit/webkitwebsettings.cpp:271
msgid "The default font family used to display text."
msgstr "The default font family used to display text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:264
+#: ../webkit/webkitwebsettings.cpp:279
msgid "Fantasy Font Family"
msgstr "Fantasy Font Family"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:265
+#: ../webkit/webkitwebsettings.cpp:280
msgid "The default Fantasy font family used to display text."
msgstr "The default Fantasy font family used to display text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:273
+#: ../webkit/webkitwebsettings.cpp:288
msgid "Monospace Font Family"
msgstr "Monospace Font Family"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:274
+#: ../webkit/webkitwebsettings.cpp:289
msgid "The default font family used to display monospace text."
msgstr "The default font family used to display monospace text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:282
+#: ../webkit/webkitwebsettings.cpp:297
msgid "Sans Serif Font Family"
msgstr "Sans Serif Font Family"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:283
+#: ../webkit/webkitwebsettings.cpp:298
msgid "The default Sans Serif font family used to display text."
msgstr "The default Sans Serif font family used to display text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:291
+#: ../webkit/webkitwebsettings.cpp:306
msgid "Serif Font Family"
msgstr "Serif Font Family"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:292
+#: ../webkit/webkitwebsettings.cpp:307
msgid "The default Serif font family used to display text."
msgstr "The default Serif font family used to display text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:300
+#: ../webkit/webkitwebsettings.cpp:315
msgid "Default Font Size"
msgstr "Default Font Size"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:301
+#: ../webkit/webkitwebsettings.cpp:316
msgid "The default font size used to display text."
msgstr "The default font size used to display text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:309
+#: ../webkit/webkitwebsettings.cpp:324
msgid "Default Monospace Font Size"
msgstr "Default Monospace Font Size"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:310
+#: ../webkit/webkitwebsettings.cpp:325
msgid "The default font size used to display monospace text."
msgstr "The default font size used to display monospace text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:318
+#: ../webkit/webkitwebsettings.cpp:333
msgid "Minimum Font Size"
msgstr "Minimum Font Size"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:319
+#: ../webkit/webkitwebsettings.cpp:334
msgid "The minimum font size used to display text."
msgstr "The minimum font size used to display text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:327
+#: ../webkit/webkitwebsettings.cpp:342
msgid "Minimum Logical Font Size"
msgstr "Minimum Logical Font Size"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:328
+#: ../webkit/webkitwebsettings.cpp:343
msgid "The minimum logical font size used to display text."
msgstr "The minimum logical font size used to display text."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:347
+#: ../webkit/webkitwebsettings.cpp:362
msgid "Enforce 96 DPI"
msgstr "Enforce 96 DPI"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:348
+#: ../webkit/webkitwebsettings.cpp:363
msgid "Enforce a resolution of 96 DPI"
msgstr "Enforce a resolution of 96 DPI"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:356
+#: ../webkit/webkitwebsettings.cpp:371
msgid "Auto Load Images"
msgstr "Auto Load Images"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:357
+#: ../webkit/webkitwebsettings.cpp:372
msgid "Load images automatically."
msgstr "Load images automatically."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:365
+#: ../webkit/webkitwebsettings.cpp:380
msgid "Auto Shrink Images"
msgstr "Auto Shrink Images"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:366
+#: ../webkit/webkitwebsettings.cpp:381
msgid "Automatically shrink standalone images to fit."
msgstr "Automatically shrink standalone images to fit."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:374
+#: ../webkit/webkitwebsettings.cpp:389
msgid "Print Backgrounds"
msgstr "Print Backgrounds"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:375
+#: ../webkit/webkitwebsettings.cpp:390
msgid "Whether background images should be printed."
msgstr "Whether background images should be printed."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:383
+#: ../webkit/webkitwebsettings.cpp:398
msgid "Enable Scripts"
msgstr "Enable Scripts"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:384
+#: ../webkit/webkitwebsettings.cpp:399
msgid "Enable embedded scripting languages."
msgstr "Enable embedded scripting languages."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:392
+#: ../webkit/webkitwebsettings.cpp:407
msgid "Enable Plugins"
msgstr "Enable Plugins"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:393
+#: ../webkit/webkitwebsettings.cpp:408
msgid "Enable embedded plugin objects."
msgstr "Enable embedded plugin objects."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:401
+#: ../webkit/webkitwebsettings.cpp:416
msgid "Resizable Text Areas"
msgstr "Resizable Text Areas"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:402
+#: ../webkit/webkitwebsettings.cpp:417
msgid "Whether text areas are resizable."
msgstr "Whether text areas are resizable."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:409
+#: ../webkit/webkitwebsettings.cpp:424
msgid "User Stylesheet URI"
msgstr "User Stylesheet URI"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:410
+#: ../webkit/webkitwebsettings.cpp:425
msgid "The URI of a stylesheet that is applied to every page."
msgstr "The URI of a stylesheet that is applied to every page."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:425
+#: ../webkit/webkitwebsettings.cpp:440
msgid "Zoom Stepping Value"
msgstr "Zoom Stepping Value"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:426
+#: ../webkit/webkitwebsettings.cpp:441
msgid "The value by which the zoom level is changed when zooming in or out."
msgstr "The value by which the zoom level is changed when zooming in or out."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:444
+#: ../webkit/webkitwebsettings.cpp:459
msgid "Enable Developer Extras"
msgstr "Enable Developer Extras"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:445
+#: ../webkit/webkitwebsettings.cpp:460
msgid "Enables special extensions that help developers"
msgstr "Enables special extensions that help developers"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:465
+#: ../webkit/webkitwebsettings.cpp:480
msgid "Enable Private Browsing"
msgstr "Enable Private Browsing"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:466
+#: ../webkit/webkitwebsettings.cpp:481
msgid "Enables private browsing mode"
msgstr "Enables private browsing mode"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:481
+#: ../webkit/webkitwebsettings.cpp:496
msgid "Enable Spell Checking"
-msgstr ""
+msgstr "Enable Spell Checking"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:482
-#, fuzzy
+#: ../webkit/webkitwebsettings.cpp:497
msgid "Enables spell checking while typing"
-msgstr "Check Spelling While _Typing"
+msgstr "Enables spell checking while typing"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:505
+#: ../webkit/webkitwebsettings.cpp:520
msgid "Languages to use for spell checking"
-msgstr ""
+msgstr "Languages to use for spell checking"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:506
+#: ../webkit/webkitwebsettings.cpp:521
msgid "Comma separated list of languages to use for spell checking"
-msgstr ""
+msgstr "Comma separated list of languages to use for spell checking"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:520
-#, fuzzy
+#: ../webkit/webkitwebsettings.cpp:535
msgid "Enable Caret Browsing"
-msgstr "Enable Private Browsing"
+msgstr "Enable Caret Browsing"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:521
-msgid "Whether to enable accessibility enhanced keyboard navigation"
-msgstr ""
+#: ../webkit/webkitwebsettings.cpp:536
+msgid "Whether to enable accesibility enhanced keyboard navigation"
+msgstr "Whether to enable accessibility enhanced keyboard navigation"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:536
+#: ../webkit/webkitwebsettings.cpp:551
msgid "Enable HTML5 Database"
-msgstr ""
+msgstr "Enable HTML5 Database"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:537
+#: ../webkit/webkitwebsettings.cpp:552
msgid "Whether to enable HTML5 database support"
-msgstr ""
+msgstr "Whether to enable HTML5 database support"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:552
+#: ../webkit/webkitwebsettings.cpp:567
msgid "Enable HTML5 Local Storage"
-msgstr ""
+msgstr "Enable HTML5 Local Storage"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:553
+#: ../webkit/webkitwebsettings.cpp:568
msgid "Whether to enable HTML5 Local Storage support"
-msgstr ""
+msgstr "Whether to enable HTML5 Local Storage support"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:567
-#, fuzzy
+#: ../webkit/webkitwebsettings.cpp:582
msgid "Enable XSS Auditor"
-msgstr "Enable Scripts"
+msgstr "Enable XSS Auditor"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:568
-msgid "Whether to enable teh XSS auditor"
-msgstr ""
+#: ../webkit/webkitwebsettings.cpp:583
+msgid "Whether to enable the XSS auditor"
+msgstr "Whether to enable the XSS auditor"
+
+#: ../webkit/webkitwebsettings.cpp:601
+msgid "Enable Spatial Navigation"
+msgstr "Enable Spatial Navigation"
+
+#: ../webkit/webkitwebsettings.cpp:602
+msgid "Whether to enable Spatial Navigation"
+msgstr "Whether to enable Spatial Navigation"
+
+#: ../webkit/webkitwebsettings.cpp:620
+#| msgid "Enable Private Browsing"
+msgid "Enable Frame Flattening"
+msgstr "Enable Frame Flattening"
+
+#: ../webkit/webkitwebsettings.cpp:621
+msgid "Whether to enable Frame Flattening"
+msgstr "Whether to enable Frame Flattening"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:586
+#: ../webkit/webkitwebsettings.cpp:638
msgid "User Agent"
-msgstr ""
+msgstr "User Agent"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:587
+#: ../webkit/webkitwebsettings.cpp:639
msgid "The User-Agent string used by WebKitGtk"
-msgstr ""
+msgstr "The User-Agent string used by WebKitGtk"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:602
+#: ../webkit/webkitwebsettings.cpp:654
msgid "JavaScript can open windows automatically"
-msgstr ""
+msgstr "JavaScript can open windows automatically"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:603
+#: ../webkit/webkitwebsettings.cpp:655
msgid "Whether JavaScript can open windows automatically"
-msgstr ""
+msgstr "Whether JavaScript can open windows automatically"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:618
+#: ../webkit/webkitwebsettings.cpp:669
+msgid "JavaScript can access Clipboard"
+msgstr "JavaScript can access Clipboard"
+
+#: ../webkit/webkitwebsettings.cpp:670
+msgid "Whether JavaScript can access Clipboard"
+msgstr "Whether JavaScript can access Clipboard"
+
+#: ../webkit/webkitwebsettings.cpp:686
msgid "Enable offline web application cache"
-msgstr ""
+msgstr "Enable offline web application cache"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:619
+#: ../webkit/webkitwebsettings.cpp:687
msgid "Whether to enable offline web application cache"
-msgstr ""
+msgstr "Whether to enable offline web application cache"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:646
+#: ../webkit/webkitwebsettings.cpp:715
msgid "Editing behavior"
-msgstr ""
+msgstr "Editing behaviour"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:647
+#: ../webkit/webkitwebsettings.cpp:716
msgid "The behavior mode to use in editing mode"
-msgstr ""
+msgstr "The behaviour mode to use in editing mode"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:663
+#: ../webkit/webkitwebsettings.cpp:732
msgid "Enable universal access from file URIs"
-msgstr ""
+msgstr "Enable universal access from file URIs"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:664
+#: ../webkit/webkitwebsettings.cpp:733
msgid "Whether to allow universal access from file URIs"
-msgstr ""
+msgstr "Whether to allow universal access from file URIs"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:679
-#, fuzzy
+#: ../webkit/webkitwebsettings.cpp:748
msgid "Enable DOM paste"
-msgstr "Enable Scripts"
+msgstr "Enable DOM paste"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:680
+#: ../webkit/webkitwebsettings.cpp:749
msgid "Whether to enable DOM paste"
-msgstr ""
+msgstr "Whether to enable DOM paste"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:698
+#: ../webkit/webkitwebsettings.cpp:767
msgid "Tab key cycles through elements"
-msgstr ""
+msgstr "Tab key cycles through elements"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:699
+#: ../webkit/webkitwebsettings.cpp:768
msgid "Whether the tab key cycles through elements on the page."
-msgstr ""
+msgstr "Whether the tab key cycles through elements on the page."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:719
+#: ../webkit/webkitwebsettings.cpp:788
msgid "Enable Default Context Menu"
-msgstr ""
+msgstr "Enable Default Context Menu"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:720
+#: ../webkit/webkitwebsettings.cpp:789
msgid ""
"Enables the handling of right-clicks for the creation of the default context "
"menu"
msgstr ""
+"Enables the handling of right-clicks for the creation of the default context "
+"menu"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:740
+#: ../webkit/webkitwebsettings.cpp:809
+#, fuzzy
msgid "Enable Site Specific Quirks"
-msgstr ""
+msgstr "Enable Site Specific Quirks"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:741
+#: ../webkit/webkitwebsettings.cpp:810
msgid "Enables the site-specific compatibility workarounds"
-msgstr ""
+msgstr "Enables the site-specific compatibility workarounds"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:763
+#: ../webkit/webkitwebsettings.cpp:832
msgid "Enable page cache"
-msgstr ""
+msgstr "Enable page cache"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:764
-#, fuzzy
+#: ../webkit/webkitwebsettings.cpp:833
msgid "Whether the page cache should be used"
-msgstr "Whether background images should be printed."
+msgstr "Whether the page cache should be used"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:784
+#: ../webkit/webkitwebsettings.cpp:853
msgid "Auto Resize Window"
-msgstr ""
+msgstr "Auto Resize Window"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:785
+#: ../webkit/webkitwebsettings.cpp:854
msgid "Automatically resize the toplevel window when a page requests it"
-msgstr ""
+msgstr "Automatically resize the toplevel window when a page requests it"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:817
-#, fuzzy
+#: ../webkit/webkitwebsettings.cpp:886
msgid "Enable Java Applet"
-msgstr "Enable JavaScript profiling"
+msgstr "Enable Java Applet"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:818
+#: ../webkit/webkitwebsettings.cpp:887
msgid "Whether Java Applet support through <applet> should be enabled"
-msgstr ""
+msgstr "Whether Java Applet support through <applet> should be enabled"
+
+#: ../webkit/webkitwebsettings.cpp:901
+msgid "Enable Hyperlink Auditing"
+msgstr "Enable Hyperlink Auditing"
+
+#: ../webkit/webkitwebsettings.cpp:902
+msgid "Whether <a ping> should be able to send pings"
+msgstr "Whether <a ping> should be able to send pings"
+
+#: ../webkit/webkitwebsettings.cpp:910
+msgid "Enable Fullscreen"
+msgstr "Enable Fullscreen"
+
+#: ../webkit/webkitwebsettings.cpp:911
+msgid "Whether the Mozilla style API should be enabled."
+msgstr "Whether the Mozilla style API should be enabled."
-#: WebKit/gtk/webkit/webkitwebview.cpp:2319
+#: ../webkit/webkitwebview.cpp:2984
msgid "Returns the @web_view's document title"
msgstr "Returns the @web_view's document title"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2333
+#: ../webkit/webkitwebview.cpp:2998
msgid "Returns the current URI of the contents displayed by the @web_view"
msgstr "Returns the current URI of the contents displayed by the @web_view"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2346
+#: ../webkit/webkitwebview.cpp:3011
msgid "Copy target list"
msgstr "Copy target list"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2347
+#: ../webkit/webkitwebview.cpp:3012
msgid "The list of targets this web view supports for clipboard copying"
msgstr "The list of targets this web view supports for clipboard copying"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2360
+#: ../webkit/webkitwebview.cpp:3025
msgid "Paste target list"
msgstr "Paste target list"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2361
+#: ../webkit/webkitwebview.cpp:3026
msgid "The list of targets this web view supports for clipboard pasting"
msgstr "The list of targets this web view supports for clipboard pasting"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2367
+#: ../webkit/webkitwebview.cpp:3032
msgid "Settings"
msgstr "Settings"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2368
+#: ../webkit/webkitwebview.cpp:3033
msgid "An associated WebKitWebSettings instance"
msgstr "An associated WebKitWebSettings instance"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2381
+#: ../webkit/webkitwebview.cpp:3046
msgid "Web Inspector"
msgstr "Web Inspector"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2382
+#: ../webkit/webkitwebview.cpp:3047
msgid "The associated WebKitWebInspector instance"
msgstr "The associated WebKitWebInspector instance"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2402
+#: ../webkit/webkitwebview.cpp:3060
+msgid "Viewport Attributes"
+msgstr "Viewport Attributes"
+
+#: ../webkit/webkitwebview.cpp:3061
+#| msgid "The associated WebKitWebInspector instance"
+msgid "The associated WebKitViewportAttributes instance"
+msgstr "The associated WebKitViewportAttributes instance"
+
+#: ../webkit/webkitwebview.cpp:3081
msgid "Editable"
msgstr "Editable"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2403
+#: ../webkit/webkitwebview.cpp:3082
msgid "Whether content can be modified by the user"
msgstr "Whether content can be modified by the user"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2409
+#: ../webkit/webkitwebview.cpp:3088
msgid "Transparent"
msgstr "Transparent"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2410
+#: ../webkit/webkitwebview.cpp:3089
msgid "Whether content has a transparent background"
msgstr "Whether content has a transparent background"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2423
+#: ../webkit/webkitwebview.cpp:3102
msgid "Zoom level"
msgstr "Zoom level"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2424
+#: ../webkit/webkitwebview.cpp:3103
msgid "The level of zoom of the content"
msgstr "The level of zoom of the content"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2439
+#: ../webkit/webkitwebview.cpp:3118
msgid "Full content zoom"
msgstr "Full content zoom"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2440
+#: ../webkit/webkitwebview.cpp:3119
msgid "Whether the full content is scaled when zooming"
msgstr "Whether the full content is scaled when zooming"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2453
-msgid "Encoding"
-msgstr "Encoding"
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2454
+#: ../webkit/webkitwebview.cpp:3133
msgid "The default encoding of the web view"
msgstr "The default encoding of the web view"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2467
+#: ../webkit/webkitwebview.cpp:3146
msgid "Custom Encoding"
msgstr "Custom Encoding"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2468
+#: ../webkit/webkitwebview.cpp:3147
msgid "The custom encoding of the web view"
msgstr "The custom encoding of the web view"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2520
+#: ../webkit/webkitwebview.cpp:3199
msgid "Icon URI"
-msgstr ""
+msgstr "Icon URI"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2521
+#: ../webkit/webkitwebview.cpp:3200
+#, fuzzy
msgid "The URI for the favicon for the #WebKitWebView."
-msgstr ""
+msgstr "The URI for the favicon for the #WebKitWebView."
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:56
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:61
msgid "Submit"
msgstr "Submit"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:66
msgid "Reset"
msgstr "Reset"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:71
msgid "This is a searchable index. Enter search keywords: "
-msgstr ""
+msgstr "This is a searchable index. Enter search keywords: "
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:76
msgid "Choose File"
msgstr "Choose File"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:81
msgid "(None)"
msgstr "(None)"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:86
msgid "Open Link in New _Window"
msgstr "Open Link in New _Window"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:91
msgid "_Download Linked File"
msgstr "_Download Linked File"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:96
msgid "Copy Link Loc_ation"
msgstr "Copy Link Loc_ation"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:101
msgid "Open _Image in New Window"
msgstr "Open _Image in New Window"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:106
msgid "Sa_ve Image As"
msgstr "Sa_ve Image As"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:111
msgid "Cop_y Image"
msgstr "Cop_y Image"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:116
+#| msgid "Open _Image in New Window"
+msgid "Open _Video in New Window"
+msgstr "Open _Video in New Window"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:121
+#| msgid "Open Link in New _Window"
+msgid "Open _Audio in New Window"
+msgstr "Open _Audio in New Window"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:126
+#| msgid "Copy Link Loc_ation"
+msgid "Cop_y Video Link Location"
+msgstr "Cop_y Video Link Location"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:131
+#| msgid "Copy Link Loc_ation"
+msgid "Cop_y Audio Link Location"
+msgstr "Cop_y Audio Link Location"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:136
+msgid "_Toggle Media Controls"
+msgstr "_Toggle Media Controls"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:141
+msgid "Toggle Media _Loop Playback"
+msgstr "Toggle Media _Loop Playback"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:146
+msgid "Switch Video to _Fullscreen"
+msgstr "Switch Video to _Fullscreen"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:151
+msgid "_Play"
+msgstr "_Play"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:156
+msgid "_Pause"
+msgstr "_Pause"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:161
+#| msgid "_Outline"
+msgid "_Mute"
+msgstr "_Mute"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
msgid "Open _Frame in New Window"
msgstr "Open _Frame in New Window"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:217
msgid "_Reload"
msgstr "_Reload"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:234
msgid "No Guesses Found"
msgstr "No Guesses Found"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:239
msgid "_Ignore Spelling"
msgstr "_Ignore Spelling"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:244
msgid "_Learn Spelling"
msgstr "_Learn Spelling"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:249
msgid "_Search the Web"
msgstr "_Search the Web"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:254
msgid "_Look Up in Dictionary"
msgstr "_Look Up in Dictionary"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:259
msgid "_Open Link"
msgstr "_Open Link"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:264
msgid "Ignore _Grammar"
msgstr "Ignore _Grammar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:269
msgid "Spelling and _Grammar"
msgstr "Spelling and _Grammar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:274
msgid "_Show Spelling and Grammar"
msgstr "_Show Spelling and Grammar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:274
msgid "_Hide Spelling and Grammar"
msgstr "_Hide Spelling and Grammar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:279
msgid "_Check Document Now"
msgstr "_Check Document Now"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:284
msgid "Check Spelling While _Typing"
msgstr "Check Spelling While _Typing"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:289
msgid "Check _Grammar With Spelling"
msgstr "Check _Grammar With Spelling"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:294
msgid "_Font"
msgstr "_Font"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:317
msgid "_Outline"
msgstr "_Outline"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:322
msgid "Inspect _Element"
msgstr "Inspect _Element"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:327
msgid "No recent searches"
msgstr "No recent searches"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:332
msgid "Recent searches"
msgstr "Recent searches"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:337
msgid "_Clear recent searches"
msgstr "_Clear recent searches"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
msgid "term"
msgstr "term"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
msgid "definition"
msgstr "definition"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:352
msgid "press"
msgstr "press"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:357
msgid "select"
msgstr "select"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:362
msgid "activate"
msgstr "activate"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:367
msgid "uncheck"
msgstr "untick"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:372
msgid "check"
msgstr "tick"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
msgid "jump"
msgstr "jump"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:392
+msgid "Missing Plug-in"
+msgstr "Missing Plug-in"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:398
+msgid "Plug-in Failure"
+msgstr "Plug-in Failure"
+
+#. 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:404
msgid " files"
msgstr " files"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
msgid "Unknown"
msgstr "Unknown"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:414
+#, c-format
+msgctxt "Title string for images"
+msgid "%s (%dx%d pixels)"
+msgstr "%s (%dx%d pixels)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
msgid "Loading..."
-msgstr ""
+msgstr "Loading..."
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:431
msgid "Live Broadcast"
-msgstr ""
+msgstr "Live Broadcast"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:437
msgid "audio element controller"
-msgstr ""
+msgstr "audio element controller"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:439
msgid "video element controller"
-msgstr ""
+msgstr "video element controller"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:441
msgid "mute"
-msgstr ""
+msgstr "mute"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:443
msgid "unmute"
-msgstr ""
+msgstr "unmute"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:445
msgid "play"
-msgstr ""
+msgstr "play"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:447
msgid "pause"
-msgstr ""
+msgstr "pause"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:449
msgid "movie time"
-msgstr ""
+msgstr "movie time"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:451
msgid "timeline slider thumb"
-msgstr ""
+msgstr "timeline slider thumb"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:453
msgid "back 30 seconds"
-msgstr ""
+msgstr "back 30 seconds"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:455
msgid "return to realtime"
-msgstr ""
+msgstr "return to realtime"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:457
msgid "elapsed time"
-msgstr ""
+msgstr "elapsed time"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:459
msgid "remaining time"
-msgstr ""
+msgstr "remaining time"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399
-#, fuzzy
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
msgid "status"
-msgstr "Status"
+msgstr "status"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:463
msgid "fullscreen"
-msgstr ""
+msgstr "fullscreen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:465
msgid "fast forward"
-msgstr ""
+msgstr "fast forward"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:467
msgid "fast reverse"
-msgstr ""
+msgstr "fast reverse"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:469
+#, fuzzy
msgid "show closed captions"
-msgstr ""
+msgstr "show closed captions"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:471
+#, fuzzy
msgid "hide closed captions"
-msgstr ""
+msgstr "hide closed captions"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:480
msgid "audio element playback controls and status display"
-msgstr ""
+msgstr "audio element playback controls and status display"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:482
msgid "video element playback controls and status display"
-msgstr ""
+msgstr "video element playback controls and status display"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:484
msgid "mute audio tracks"
-msgstr ""
+msgstr "mute audio tracks"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:486
msgid "unmute audio tracks"
-msgstr ""
+msgstr "unmute audio tracks"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:488
msgid "begin playback"
-msgstr ""
+msgstr "begin playback"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:490
msgid "pause playback"
-msgstr ""
+msgstr "pause playback"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:492
+#, fuzzy
msgid "movie time scrubber"
-msgstr ""
+msgstr "movie time scrubber"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:494
+#, fuzzy
msgid "movie time scrubber thumb"
-msgstr ""
+msgstr "movie time scrubber thumb"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:496
msgid "seek movie back 30 seconds"
-msgstr ""
+msgstr "seek movie back 30 seconds"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:498
msgid "return streaming movie to real time"
-msgstr ""
+msgstr "return streaming movie to real time"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:500
msgid "current movie time in seconds"
-msgstr ""
+msgstr "current movie time in seconds"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
msgid "number of seconds of movie remaining"
-msgstr ""
+msgstr "number of seconds of movie remaining"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:504
msgid "current movie status"
-msgstr ""
+msgstr "current movie status"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:506
msgid "seek quickly back"
-msgstr ""
+msgstr "seek quickly back"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:508
msgid "seek quickly forward"
-msgstr ""
+msgstr "seek quickly forward"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:510
msgid "Play movie in fullscreen mode"
-msgstr ""
+msgstr "Play movie in fullscreen mode"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
msgid "start displaying closed captions"
-msgstr ""
+msgstr "start displaying closed captions"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:514
msgid "stop displaying closed captions"
-msgstr ""
+msgstr "stop displaying closed captions"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
-#, fuzzy
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:523
msgid "indefinite time"
-msgstr "definition"
+msgstr "indefinite time"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:553
msgid "value missing"
-msgstr ""
+msgstr "value missing"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:589
msgid "type mismatch"
-msgstr ""
+msgstr "type mismatch"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:612
msgid "pattern mismatch"
-msgstr ""
+msgstr "pattern mismatch"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:617
msgid "too long"
-msgstr ""
+msgstr "too long"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:622
msgid "range underflow"
-msgstr ""
+msgstr "range underflow"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:627
msgid "range overflow"
-msgstr ""
+msgstr "range overflow"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:632
msgid "step mismatch"
-msgstr ""
+msgstr "step mismatch"
#~ msgid "_Searchable Index"
#~ msgstr "_Searchable Index"
diff --git a/Source/WebKit/gtk/po/es.po b/Source/WebKit/gtk/po/es.po
index beb6ce404..db5f99d3e 100644
--- a/Source/WebKit/gtk/po/es.po
+++ b/Source/WebKit/gtk/po/es.po
@@ -1,1101 +1,1473 @@
# translation of webkit.po to Español
# This file is put in the public domain.
# Jorge González González <aloriel@gmail.com>, 2010.
+# Chris Leonard <cjl@laptop.org>, 2012.
+# Daniel Mustieles <daniel.mustieles@gmail.com>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: webkit\n"
-"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n"
-"POT-Creation-Date: 2010-02-25 15:53-0300\n"
-"PO-Revision-Date: 2010-08-22 12:03+0200\n"
-"Last-Translator: Jorge González González <aloriel@gmail.com>\n"
-"Language-Team: Spanish <es@li.org>\n"
+"Report-Msgid-Bugs-To: http://bugs.webkit.org\n"
+"POT-Creation-Date: 2010-12-27 15:26+0000\n"
+"PO-Revision-Date: 2012-04-15 13:42+0200\n"
+"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
+"Language-Team: Español <gnome-es-list@gnome.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.11.4\n"
+"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Virtaal 0.7.0\n"
-#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535
+#: ../WebCoreSupport/ChromeClientGtk.cpp:589
msgid "Upload File"
msgstr "Subir archivo"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:63
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:194
msgid "Input _Methods"
msgstr "_Métodos de entrada"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:80
msgid "LRM _Left-to-right mark"
-msgstr "Marca de _izquierda-a-derecha [LRM]"
+msgstr "Marca de _izquierda a derecha [LRM]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:81
msgid "RLM _Right-to-left mark"
-msgstr "Marca de _derecha-a-izquierda [RLM]"
+msgstr "Marca de _derecha a izquierda [RLM]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:82
msgid "LRE Left-to-right _embedding"
-msgstr "In_crustamiento de izquierda-a-derecha [LRE]"
+msgstr "In_crustamiento de izquierda a derecha [LRE]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:83
msgid "RLE Right-to-left e_mbedding"
-msgstr "Inc_rustamiento de derecha-a-izquierda [RLE]"
+msgstr "Inc_rustamiento de derecha a izquierda [RLE]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:84
msgid "LRO Left-to-right _override"
-msgstr "_Prevalencia de izquierda-a-derecha [LRO]"
+msgstr "_Sobreescritura de izquierda a derecha [LRO]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:85
msgid "RLO Right-to-left o_verride"
-msgstr "Pre_valencia de derecha-a-izquierda [RLO]"
+msgstr "Sobrees_critura de derecha-a-izquierda [RLO]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:86
msgid "PDF _Pop directional formatting"
-msgstr "Formateo d_ireccional emergente [PDF]"
+msgstr "Formateado d_ireccional emergente [PDF]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:87
msgid "ZWS _Zero width space"
-msgstr "Espacio de ancho _cero [ZWS]"
+msgstr "Espacio de anchura _cero [ZWS]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:88
msgid "ZWJ Zero width _joiner"
-msgstr "En_samblador de ancho cero [ZWJ]"
+msgstr "En_samblador de anchura cero [ZWJ]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:89
msgid "ZWNJ Zero width _non-joiner"
-msgstr "_No ensamblador de ancho cero [ZWNJ]"
+msgstr "_No ensamblador de anchura cero [ZWNJ]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:111
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:189
msgid "_Insert Unicode Control Character"
-msgstr "_Insertar un carácter de control Unicode"
+msgstr "_Insertar carácter de control Unicode"
-#: WebKit/gtk/webkit/webkitdownload.cpp:266
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1180
+msgid "Load request cancelled"
+msgstr "Solicitud de carga cancelada"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1186
+msgid "Not allowed to use restricted network port"
+msgstr "No permite para utilizar el puerto de red restringido"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1192
+msgid "URL cannot be shown"
+msgstr "No se pueden mostrar el URL"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1198
+msgid "Frame load was interrupted"
+msgstr "Se interrumpió la carga del marco"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1204
+msgid "Content with the specified MIME type cannot be shown"
+msgstr "No se puede mostrar el contenido con el tipo MIME especificado"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1210
+msgid "File does not exist"
+msgstr "El archivo no existe"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1216
+msgid "Plugin will handle load"
+msgstr "El complemento controlará la carga"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:385
+msgid "Play"
+msgstr "Reproducir"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:387
+msgid "Pause"
+msgstr "Pausar"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:533
+msgid "Play / Pause"
+msgstr "Reproducir / Pausar"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:533
+msgid "Play or pause the media"
+msgstr "Reproducir o pausar los medios"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:541
+msgid "Time:"
+msgstr "Tiempo:"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:565
+msgid "Exit Fullscreen"
+msgstr "Salir de pantalla completa"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:565
+msgid "Exit from fullscreen mode"
+msgstr "Salir del modo a pantalla completa"
+
+#: ../webkit/webkitdownload.cpp:273
msgid "Network Request"
msgstr "Solicitud de red"
-#: WebKit/gtk/webkit/webkitdownload.cpp:267
+#: ../webkit/webkitdownload.cpp:274
msgid "The network request for the URI that should be downloaded"
msgstr "La solicitud de red para el URI que se debe descargar"
-#: WebKit/gtk/webkit/webkitdownload.cpp:281
+#: ../webkit/webkitdownload.cpp:288
msgid "Network Response"
msgstr "Respuesta de red"
-#: WebKit/gtk/webkit/webkitdownload.cpp:282
+#: ../webkit/webkitdownload.cpp:289
msgid "The network response for the URI that should be downloaded"
-msgstr "La respuesta de red para el URI que se debería descargar"
+msgstr "La respuesta de red para el URI que se debe descargar"
-#: WebKit/gtk/webkit/webkitdownload.cpp:296
+#: ../webkit/webkitdownload.cpp:303
msgid "Destination URI"
msgstr "URI de destino"
-#: WebKit/gtk/webkit/webkitdownload.cpp:297
+#: ../webkit/webkitdownload.cpp:304
msgid "The destination URI where to save the file"
msgstr "El URI de destino donde guardar el archivo"
-#: WebKit/gtk/webkit/webkitdownload.cpp:311
+#: ../webkit/webkitdownload.cpp:318
msgid "Suggested Filename"
msgstr "Nombre de archivo sugerido"
-#: WebKit/gtk/webkit/webkitdownload.cpp:312
+#: ../webkit/webkitdownload.cpp:319
msgid "The filename suggested as default when saving"
msgstr "El nombre de archivo sugerido como predeterminado al guardar"
-#: WebKit/gtk/webkit/webkitdownload.cpp:329
+#: ../webkit/webkitdownload.cpp:336
msgid "Progress"
msgstr "Progreso"
-#: WebKit/gtk/webkit/webkitdownload.cpp:330
+#: ../webkit/webkitdownload.cpp:337
msgid "Determines the current progress of the download"
msgstr "Determina el progreso actual de la descarga"
-#: WebKit/gtk/webkit/webkitdownload.cpp:343
+#: ../webkit/webkitdownload.cpp:350
msgid "Status"
msgstr "Estado"
-#: WebKit/gtk/webkit/webkitdownload.cpp:344
+#: ../webkit/webkitdownload.cpp:351
msgid "Determines the current status of the download"
msgstr "Determina el estado actual de la descarga"
-#: WebKit/gtk/webkit/webkitdownload.cpp:359
+#: ../webkit/webkitdownload.cpp:366
msgid "Current Size"
msgstr "Tamaño actual"
-#: WebKit/gtk/webkit/webkitdownload.cpp:360
+#: ../webkit/webkitdownload.cpp:367
msgid "The length of the data already downloaded"
msgstr "El tamaño de los datos ya descargados"
-#: WebKit/gtk/webkit/webkitdownload.cpp:374
+#: ../webkit/webkitdownload.cpp:381
msgid "Total Size"
msgstr "Tamaño total"
-#: WebKit/gtk/webkit/webkitdownload.cpp:375
+#: ../webkit/webkitdownload.cpp:382
msgid "The total size of the file"
msgstr "El tamaño total del archivo"
-#: WebKit/gtk/webkit/webkitdownload.cpp:526
+#: ../webkit/webkitdownload.cpp:534
msgid "User cancelled the download"
msgstr "El usuario canceló la descarga"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248
+#: ../webkit/webkithittestresult.cpp:156
+msgid "Context"
+msgstr "Contexto"
+
+#: ../webkit/webkithittestresult.cpp:157
+msgid "Flags indicating the kind of target that received the event."
+msgstr "Opciones que indican el tipo de destino que recibió el evento."
+
+#: ../webkit/webkithittestresult.cpp:171
+#| msgid "Icon URI"
+msgid "Link URI"
+msgstr "URI del enlace"
+
+#: ../webkit/webkithittestresult.cpp:172
+msgid "The URI to which the target that received the event points, if any."
+msgstr "El URI al que apunta el destino que recibió el evento, si existe."
+
+#: ../webkit/webkithittestresult.cpp:185
+msgid "Image URI"
+msgstr "URI de la imagen"
+
+#: ../webkit/webkithittestresult.cpp:186
+msgid ""
+"The URI of the image that is part of the target that received the event, if "
+"any."
+msgstr ""
+"El URI de la imagen que es parte del destino que recibió el evento, si "
+"existe."
+
+#: ../webkit/webkithittestresult.cpp:199
+msgid "Media URI"
+msgstr "URI de los medios"
+
+#: ../webkit/webkithittestresult.cpp:200
+msgid ""
+"The URI of the media that is part of the target that received the event, if "
+"any."
+msgstr ""
+"El URI de los medios que son parte del destino que recibió el evento, si "
+"existe."
+
+#: ../webkit/webkithittestresult.cpp:221
+msgid "Inner node"
+msgstr "Nodo interno"
+
+#: ../webkit/webkithittestresult.cpp:222
+msgid "The inner DOM node associated with the hit test result."
+msgstr ""
+"El nodo DOM interno asociado con el resultado de la prueba de detección."
+
+#: ../webkit/webkitnetworkrequest.cpp:134
+#: ../webkit/webkitnetworkresponse.cpp:134 ../webkit/webkitwebframe.cpp:323
+#: ../webkit/webkitwebhistoryitem.cpp:176 ../webkit/webkitwebresource.cpp:126
+#: ../webkit/webkitwebview.cpp:2997
+msgid "URI"
+msgstr "URI"
+
+#: ../webkit/webkitnetworkrequest.cpp:135
+msgid "The URI to which the request will be made."
+msgstr "El URI al que se hará la solicitud."
+
+#: ../webkit/webkitnetworkrequest.cpp:148
+#: ../webkit/webkitnetworkresponse.cpp:148
+msgid "Message"
+msgstr "Mensaje"
+
+#: ../webkit/webkitnetworkrequest.cpp:149
+msgid "The SoupMessage that backs the request."
+msgstr "El SoupMessage que respalda la solicitud."
+
+#: ../webkit/webkitnetworkresponse.cpp:135
+msgid "The URI to which the response will be made."
+msgstr "El URI al que se hará la respuesta."
+
+#: ../webkit/webkitnetworkresponse.cpp:149
+msgid "The SoupMessage that backs the response."
+msgstr "El SoupMessage que respalda la respuesta."
+
+#: ../webkit/webkitsecurityorigin.cpp:150
+msgid "Protocol"
+msgstr "Protocolo"
+
+#: ../webkit/webkitsecurityorigin.cpp:151
+msgid "The protocol of the security origin"
+msgstr "El protocolo del origen de la seguridad"
+
+#: ../webkit/webkitsecurityorigin.cpp:164
+msgid "Host"
+msgstr "Equipo"
+
+#: ../webkit/webkitsecurityorigin.cpp:165
+#| msgid "The title of the history item"
+msgid "The host of the security origin"
+msgstr "El equipo del origen de la seguridad"
+
+#: ../webkit/webkitsecurityorigin.cpp:178
+msgid "Port"
+msgstr "Puerto"
+
+#: ../webkit/webkitsecurityorigin.cpp:179
+#| msgid "The title of the history item"
+msgid "The port of the security origin"
+msgstr "El puerto del origen de la seguridad"
+
+#: ../webkit/webkitsecurityorigin.cpp:192
+msgid "Web Database Usage"
+msgstr "Uso de base de datos de la Web"
+
+#: ../webkit/webkitsecurityorigin.cpp:193
+msgid "The cumulative size of all web databases in the security origin"
+msgstr ""
+"El tamaño acumulado de todas las bases de datos de la web en el origen de la "
+"seguridad"
+
+#: ../webkit/webkitsecurityorigin.cpp:205
+msgid "Web Database Quota"
+msgstr "Cuota de base de datos de la web"
+
+#: ../webkit/webkitsecurityorigin.cpp:206
+msgid "The web database quota of the security origin in bytes"
+msgstr ""
+"La cuota de base de datos de la web del origen de la seguridad, en bytes"
+
+#: ../webkit/webkitsoupauthdialog.c:264
#, c-format
msgid "A username and password are being requested by the site %s"
-msgstr "El sitio %s está solicitando un usuario y una contraseña"
+msgstr "El sitio %s está solicitando un nombre de usuario y una contraseña"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278
+#: ../webkit/webkitsoupauthdialog.c:294
msgid "Server message:"
msgstr "Mensaje del servidor:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291
+#: ../webkit/webkitsoupauthdialog.c:307
msgid "Username:"
msgstr "Nombre de usuario:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293
+#: ../webkit/webkitsoupauthdialog.c:309
msgid "Password:"
msgstr "Contraseña:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302
+#: ../webkit/webkitsoupauthdialog.c:318
msgid "_Remember password"
msgstr "_Recordar contraseña"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:298
+#: ../webkit/webkitwebdatabase.cpp:173
+msgid "Security Origin"
+msgstr "Origen de la seguridad"
+
+#: ../webkit/webkitwebdatabase.cpp:174
+#| msgid "The custom encoding of the web view"
+msgid "The security origin of the database"
+msgstr "El origen de la seguridad de la base de datos"
+
+#: ../webkit/webkitwebdatabase.cpp:187 ../webkit/webkitwebframe.cpp:309
msgid "Name"
msgstr "Nombre"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:299
+# Duplicate «database» in this string
+#: ../webkit/webkitwebdatabase.cpp:188
+#| msgid "The name of the frame"
+msgid "The name of the Web Database database"
+msgstr "El nombre de la base de datos de la web"
+
+#: ../webkit/webkitwebdatabase.cpp:201
+msgid "Display Name"
+msgstr "Nombre que mostrar"
+
+#: ../webkit/webkitwebdatabase.cpp:202
+msgid "The display name of the Web Storage database"
+msgstr "El nombre que mostrar de la base de datos de la web"
+
+#: ../webkit/webkitwebdatabase.cpp:215
+msgid "Expected Size"
+msgstr "Tamaño esperado"
+
+#: ../webkit/webkitwebdatabase.cpp:216
+msgid "The expected size of the Web Database database"
+msgstr "El tamaño esperado de la base de datos de la web"
+
+#: ../webkit/webkitwebdatabase.cpp:228
+msgid "Size"
+msgstr "Tamaño"
+
+#: ../webkit/webkitwebdatabase.cpp:229
+msgid "The current size of the Web Database database"
+msgstr "El tamaño actual de la base de datos de la web"
+
+#: ../webkit/webkitwebdatabase.cpp:241
+#| msgid "Suggested Filename"
+msgid "Filename"
+msgstr "Nombre de archivo"
+
+#: ../webkit/webkitwebdatabase.cpp:242
+msgid "The absolute filename of the Web Storage database"
+msgstr "El nombre de archivo absoluto de la base de datos de la web"
+
+#: ../webkit/webkitwebframe.cpp:310
msgid "The name of the frame"
msgstr "El nombre del marco"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:305
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146
-#: WebKit/gtk/webkit/webkitwebview.cpp:2318
+#: ../webkit/webkitwebframe.cpp:316 ../webkit/webkitwebhistoryitem.cpp:144
+#: ../webkit/webkitwebview.cpp:2983
msgid "Title"
msgstr "Título"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:306
+#: ../webkit/webkitwebframe.cpp:317
msgid "The document title of the frame"
-msgstr "El nombre de documento del marco"
+msgstr "El título del documento del marco"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:312
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178
-#: WebKit/gtk/webkit/webkitwebview.cpp:2332
-msgid "URI"
-msgstr "URI"
-
-#: WebKit/gtk/webkit/webkitwebframe.cpp:313
+#: ../webkit/webkitwebframe.cpp:324
msgid "The current URI of the contents displayed by the frame"
msgstr "El URI actual del contenido mostrado en el marco"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:344
+#: ../webkit/webkitwebframe.cpp:355
msgid "Horizontal Scrollbar Policy"
-msgstr "Directiva de la barra de desplazamiento horizontal"
+msgstr "Política de la barra de desplazamiento horizontal"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:345
+#: ../webkit/webkitwebframe.cpp:356
msgid ""
"Determines the current policy for the horizontal scrollbar of the frame."
msgstr ""
"Determina la política actual para la barra de desplazamiento horizontal del "
"marco."
-#: WebKit/gtk/webkit/webkitwebframe.cpp:362
+#: ../webkit/webkitwebframe.cpp:373
msgid "Vertical Scrollbar Policy"
-msgstr "Directiva de la barra de desplazamiento vertical"
+msgstr "Política de la barra de desplazamiento vertical"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:363
+#: ../webkit/webkitwebframe.cpp:374
msgid "Determines the current policy for the vertical scrollbar of the frame."
msgstr ""
"Determina la política actual para la barra de desplazamiento vertical del "
"marco."
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147
+#: ../webkit/webkitwebhistoryitem.cpp:145
msgid "The title of the history item"
msgstr "El título del elemento del histórico"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162
+#: ../webkit/webkitwebhistoryitem.cpp:160
msgid "Alternate Title"
msgstr "Título alternativo"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163
+#: ../webkit/webkitwebhistoryitem.cpp:161
msgid "The alternate title of the history item"
msgstr "El título alternativo del elemento del histórico"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179
+#: ../webkit/webkitwebhistoryitem.cpp:177
msgid "The URI of the history item"
msgstr "El URI del elemento del histórico"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173
+#: ../webkit/webkitwebhistoryitem.cpp:192
+#: ../webkit/webkitwebnavigationaction.cpp:171
msgid "Original URI"
msgstr "URI original"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195
+#: ../webkit/webkitwebhistoryitem.cpp:193
msgid "The original URI of the history item"
msgstr "El URI original del elemento del histórico"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210
+#: ../webkit/webkitwebhistoryitem.cpp:208
msgid "Last visited Time"
msgstr "Hora de la última visita"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211
+#: ../webkit/webkitwebhistoryitem.cpp:209
msgid "The time at which the history item was last visited"
-msgstr "La hora en la que se vió el elemento del histórico por última vez"
+msgstr "La hora en la que se visitó el elemento del histórico por última vez"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:268
+#: ../webkit/webkitwebinspector.cpp:270
msgid "Web View"
msgstr "Vista web"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:269
+#: ../webkit/webkitwebinspector.cpp:271
msgid "The Web View that renders the Web Inspector itself"
-msgstr "La vista de web que renderiza el inspector web en sí"
+msgstr "La vista de la web que renderiza el inspector web en sí"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:282
+#: ../webkit/webkitwebinspector.cpp:284
msgid "Inspected URI"
-msgstr "URI inspeccionada"
+msgstr "URI inspeccionado"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:283
+#: ../webkit/webkitwebinspector.cpp:285
msgid "The URI that is currently being inspected"
-msgstr "El URI que actualmente está siendo inspeccionado"
+msgstr "El URI que se está inspeccionando actualmente"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:299
+#: ../webkit/webkitwebinspector.cpp:301
msgid "Enable JavaScript profiling"
msgstr "Activar perfilado de JavaScript"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:300
+#: ../webkit/webkitwebinspector.cpp:302
msgid "Profile the executed JavaScript."
msgstr "Perfilar el JavaScript ejecutado."
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:315
+#: ../webkit/webkitwebinspector.cpp:317
msgid "Enable Timeline profiling"
msgstr "Activar perfilado de tiempo"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:316
+#: ../webkit/webkitwebinspector.cpp:318
msgid "Profile the WebCore instrumentation."
-msgstr ""
+msgstr "Perfilar la instrumentación de WebCore."
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158
+#: ../webkit/webkitwebnavigationaction.cpp:156
msgid "Reason"
msgstr "Razón"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159
+#: ../webkit/webkitwebnavigationaction.cpp:157
msgid "The reason why this navigation is occurring"
-msgstr "La razón por la cuál está ocurriendo esta navegación"
+msgstr "La razón por la que se produce esta navegación"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174
+#: ../webkit/webkitwebnavigationaction.cpp:172
msgid "The URI that was requested as the target for the navigation"
msgstr "El URI solicitado como el objetivo para la navegación"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188
+#: ../webkit/webkitwebnavigationaction.cpp:186
msgid "Button"
msgstr "Botón"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189
+#: ../webkit/webkitwebnavigationaction.cpp:187
msgid "The button used to click"
msgstr "El botón usado para pulsar"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204
+#: ../webkit/webkitwebnavigationaction.cpp:202
msgid "Modifier state"
msgstr "Estado del modificador"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205
+#: ../webkit/webkitwebnavigationaction.cpp:203
msgid "A bitmask representing the state of the modifier keys"
msgstr ""
"Una máscara de bits que representa el estado de las teclas modificadoras"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220
+#: ../webkit/webkitwebnavigationaction.cpp:218
msgid "Target frame"
msgstr "Marco de destino"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221
+#: ../webkit/webkitwebnavigationaction.cpp:219
msgid "The target frame for the navigation"
msgstr "El marco de destino para la navegación"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:237
+#: ../webkit/webkitwebresource.cpp:127
+#| msgid "The title of the history item"
+msgid "The uri of the resource"
+msgstr "El URI del recurso"
+
+#: ../webkit/webkitwebresource.cpp:141
+msgid "MIME Type"
+msgstr "Tipo MIME"
+
+#: ../webkit/webkitwebresource.cpp:142
+#| msgid "The title of the history item"
+msgid "The MIME type of the resource"
+msgstr "El tipo MIME del recurso"
+
+#: ../webkit/webkitwebresource.cpp:156 ../webkit/webkitwebview.cpp:3132
+msgid "Encoding"
+msgstr "Codificación"
+
+#: ../webkit/webkitwebresource.cpp:157
+#| msgid "The default encoding of the web view"
+msgid "The text encoding name of the resource"
+msgstr "El nombre de la codificación del texto del recurso"
+
+#: ../webkit/webkitwebresource.cpp:172
+msgid "Frame Name"
+msgstr "Nombre del marco"
+
+#: ../webkit/webkitwebresource.cpp:173
+#| msgid "The name of the frame"
+msgid "The frame name of the resource"
+msgstr "El nombre del marco del recurso"
+
+#: ../webkit/webkitwebsettings.cpp:252
msgid "Default Encoding"
msgstr "Codificación predeterminada"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:238
+#: ../webkit/webkitwebsettings.cpp:253
msgid "The default encoding used to display text."
msgstr "La codificación predeterminada usada para mostrar texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:246
+#: ../webkit/webkitwebsettings.cpp:261
msgid "Cursive Font Family"
-msgstr "Tipografía cursiva"
+msgstr "Familia tipográfica cursiva"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:247
+#: ../webkit/webkitwebsettings.cpp:262
msgid "The default Cursive font family used to display text."
msgstr ""
"La familia tipográfica cursiva predeterminada usada para mostrar texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:255
+#: ../webkit/webkitwebsettings.cpp:270
msgid "Default Font Family"
-msgstr "Tipografía predeterminada"
+msgstr "Familia tipográfica predeterminada"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:256
+#: ../webkit/webkitwebsettings.cpp:271
msgid "The default font family used to display text."
msgstr "La familia tipográfica predeterminada usada para mostrar texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:264
+#: ../webkit/webkitwebsettings.cpp:279
msgid "Fantasy Font Family"
-msgstr "Familia de tipografía fantasía"
+msgstr "Familia tipográfica de fantasía"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:265
+#: ../webkit/webkitwebsettings.cpp:280
msgid "The default Fantasy font family used to display text."
msgstr ""
-"La familia tipográfica fantasía predeterminada usada para mostrar texto."
+"La familia tipográfica de fantasía predeterminada usada para mostrar texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:273
+#: ../webkit/webkitwebsettings.cpp:288
msgid "Monospace Font Family"
-msgstr "Tipografía Monospace"
+msgstr "Familia tipográfica monoespaciada"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:274
+#: ../webkit/webkitwebsettings.cpp:289
msgid "The default font family used to display monospace text."
msgstr ""
"La familia tipográfica predeterminada usada para mostrar texto monoespaciado."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:282
+#: ../webkit/webkitwebsettings.cpp:297
msgid "Sans Serif Font Family"
-msgstr "Tipografía Sans Serif"
+msgstr "Familia tipográfica Sans Serif"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:283
+#: ../webkit/webkitwebsettings.cpp:298
msgid "The default Sans Serif font family used to display text."
msgstr ""
"La familia tipográfica Sans Serif predeterminada usada para mostrar texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:291
+#: ../webkit/webkitwebsettings.cpp:306
msgid "Serif Font Family"
-msgstr "Tipografía Serif"
+msgstr "Familia tipográfica Serif"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:292
+#: ../webkit/webkitwebsettings.cpp:307
msgid "The default Serif font family used to display text."
msgstr "La familia tipográfica Serif predeterminada usada para mostrar texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:300
+#: ../webkit/webkitwebsettings.cpp:315
msgid "Default Font Size"
-msgstr "Tamaño de predeterminado de tipografía"
+msgstr "Tamaño de predeterminado de la tipografía"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:301
+#: ../webkit/webkitwebsettings.cpp:316
msgid "The default font size used to display text."
-msgstr "El tamaño de tipografía predeterminado usado para mostrar texto."
+msgstr "El tamaño predeterminado de la tipografía usada para mostrar texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:309
+#: ../webkit/webkitwebsettings.cpp:324
msgid "Default Monospace Font Size"
-msgstr "Tipografía predeterminada Monospace"
+msgstr "Tamaño predeterminado de la tipografía monoespaciada"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:310
+#: ../webkit/webkitwebsettings.cpp:325
msgid "The default font size used to display monospace text."
msgstr ""
-"El tamaño de tipografía predeterminado usado para mostrar texto "
+"El tamaño predeterminado de la tipografía usada para mostrar texto "
"monoespaciado."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:318
+#: ../webkit/webkitwebsettings.cpp:333
msgid "Minimum Font Size"
-msgstr "Tamaño mínimo de tipografía"
+msgstr "Tamaño mínimo de la tipografía"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:319
+#: ../webkit/webkitwebsettings.cpp:334
msgid "The minimum font size used to display text."
-msgstr "El mínimo tamaño de tipografía usado para mostrar texto."
+msgstr "El mínimo tamaño de la tipografía usada para mostrar texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:327
+#: ../webkit/webkitwebsettings.cpp:342
msgid "Minimum Logical Font Size"
-msgstr "Tamaño mínimo lógico de tipografía"
+msgstr "Tamaño lógico mínimo de la tipografía"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:328
+#: ../webkit/webkitwebsettings.cpp:343
msgid "The minimum logical font size used to display text."
-msgstr "El tamaño mínimo lógico de tipografía usado para mostrar texto."
+msgstr "El tamaño lógico mínimo de la tipografía usada para mostrar texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:347
+#: ../webkit/webkitwebsettings.cpp:362
msgid "Enforce 96 DPI"
msgstr "Forzar 96 DPI"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:348
+#: ../webkit/webkitwebsettings.cpp:363
msgid "Enforce a resolution of 96 DPI"
msgstr "Forzar una resolución de 96 DPI"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:356
+#: ../webkit/webkitwebsettings.cpp:371
msgid "Auto Load Images"
msgstr "Cargar imágenes automáticamente"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:357
+#: ../webkit/webkitwebsettings.cpp:372
msgid "Load images automatically."
msgstr "Cargar imágenes automáticamente."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:365
+#: ../webkit/webkitwebsettings.cpp:380
msgid "Auto Shrink Images"
-msgstr "Autoencoger imágenes"
+msgstr "Encoger imágenes automáticamente"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:366
+#: ../webkit/webkitwebsettings.cpp:381
msgid "Automatically shrink standalone images to fit."
msgstr "Encoger imágenes independientes para ajustarlas."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:374
+#: ../webkit/webkitwebsettings.cpp:389
msgid "Print Backgrounds"
msgstr "Imprimir fondos"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:375
+#: ../webkit/webkitwebsettings.cpp:390
msgid "Whether background images should be printed."
msgstr "Indica si se deben imprimir las imágenes de fondo."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:383
+#: ../webkit/webkitwebsettings.cpp:398
msgid "Enable Scripts"
msgstr "Activar scripts"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:384
+#: ../webkit/webkitwebsettings.cpp:399
msgid "Enable embedded scripting languages."
-msgstr "Activar lenguajes de scrpting empotrados"
+msgstr "Activar lenguajes de scripting empotrados"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:392
+#: ../webkit/webkitwebsettings.cpp:407
msgid "Enable Plugins"
msgstr "Activar complementos"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:393
+#: ../webkit/webkitwebsettings.cpp:408
msgid "Enable embedded plugin objects."
-msgstr "Activar objetos de complemento empotrados."
+msgstr "Activar objetos de complementos empotrados."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:401
+#: ../webkit/webkitwebsettings.cpp:416
msgid "Resizable Text Areas"
msgstr "Áreas de texto redimensionables"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:402
+#: ../webkit/webkitwebsettings.cpp:417
msgid "Whether text areas are resizable."
msgstr "Indica si las áreas de texto son redimensionables."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:409
+#: ../webkit/webkitwebsettings.cpp:424
msgid "User Stylesheet URI"
msgstr "URI de la hoja de estilo del usuario"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:410
+#: ../webkit/webkitwebsettings.cpp:425
msgid "The URI of a stylesheet that is applied to every page."
msgstr "El URI de una hoja de estilo que se aplica a cada página."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:425
+#: ../webkit/webkitwebsettings.cpp:440
msgid "Zoom Stepping Value"
msgstr "Valor del paso de la ampliación"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:426
+#: ../webkit/webkitwebsettings.cpp:441
msgid "The value by which the zoom level is changed when zooming in or out."
msgstr ""
-"El valor por el cuál el nivel de ampliación se cambia al ampliar o reducir."
+"El valor según el cuál se cambia el nivel de ampliación al ampliar o reducir."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:444
+#: ../webkit/webkitwebsettings.cpp:459
msgid "Enable Developer Extras"
msgstr "Activar extras para desarrolladores"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:445
+#: ../webkit/webkitwebsettings.cpp:460
msgid "Enables special extensions that help developers"
msgstr "Activa extensiones especiales para ayudar a los desarrolladores"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:465
+#: ../webkit/webkitwebsettings.cpp:480
msgid "Enable Private Browsing"
msgstr "Activar navegación privada"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:466
+#: ../webkit/webkitwebsettings.cpp:481
msgid "Enables private browsing mode"
-msgstr "Activa el modo de navegación privado"
+msgstr "Activa el modo de navegación privada"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:481
+#: ../webkit/webkitwebsettings.cpp:496
msgid "Enable Spell Checking"
msgstr "Activar revisión ortográfica"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:482
+#: ../webkit/webkitwebsettings.cpp:497
msgid "Enables spell checking while typing"
msgstr "Activa la revisión ortográfica al escribir"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:505
+#: ../webkit/webkitwebsettings.cpp:520
msgid "Languages to use for spell checking"
msgstr "Idiomas que usar para la revisión ortográfica"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:506
+#: ../webkit/webkitwebsettings.cpp:521
msgid "Comma separated list of languages to use for spell checking"
msgstr ""
"Lista separada por comas de los idiomas que usar para la revisión ortográfica"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:520
+#: ../webkit/webkitwebsettings.cpp:535
msgid "Enable Caret Browsing"
msgstr "Activar navegación por cursor"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:521
-msgid "Whether to enable accessibility enhanced keyboard navigation"
+#: ../webkit/webkitwebsettings.cpp:536
+#| msgid "Whether to enable accessibility enhanced keyboard navigation"
+msgid "Whether to enable accesibility enhanced keyboard navigation"
msgstr ""
-"Indica si activar la mejora de accesibilidad para navegación por teclado"
+"Indica si se debe activar accesibilidad mejorada de la navegación por teclado"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:536
+#: ../webkit/webkitwebsettings.cpp:551
msgid "Enable HTML5 Database"
msgstr "Activar la base de datos de HTML5"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:537
+#: ../webkit/webkitwebsettings.cpp:552
msgid "Whether to enable HTML5 database support"
msgstr "Indica si se debe activar el soporte para la base de datos de HTML5"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:552
+#: ../webkit/webkitwebsettings.cpp:567
msgid "Enable HTML5 Local Storage"
msgstr "Activar almacén local de HTML5"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:553
+#: ../webkit/webkitwebsettings.cpp:568
msgid "Whether to enable HTML5 Local Storage support"
-msgstr "Indica si activar el soporte de almacén local de HTML5"
+msgstr "Indica si se debe activar el soporte de almacén local de HTML5"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:567
+#: ../webkit/webkitwebsettings.cpp:582
msgid "Enable XSS Auditor"
msgstr "Activar el auditor de XSS"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:568
-msgid "Whether to enable teh XSS auditor"
+#: ../webkit/webkitwebsettings.cpp:583
+#| msgid "Whether to enable teh XSS auditor"
+msgid "Whether to enable the XSS auditor"
msgstr "Indica si se debe activar el auditor de XSS"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:586
+#: ../webkit/webkitwebsettings.cpp:601
+msgid "Enable Spatial Navigation"
+msgstr "Activar la navegación espacial"
+
+#: ../webkit/webkitwebsettings.cpp:602
+#| msgid "Whether to enable teh XSS auditor"
+msgid "Whether to enable Spatial Navigation"
+msgstr "Indica si se debe activar la navegación espacial"
+
+#: ../webkit/webkitwebsettings.cpp:620
+#| msgid "Enable Private Browsing"
+msgid "Enable Frame Flattening"
+msgstr "Activar el marco de aplanamiento"
+
+#: ../webkit/webkitwebsettings.cpp:621
+#| msgid "Whether to enable teh XSS auditor"
+msgid "Whether to enable Frame Flattening"
+msgstr "Indica si se debe activar el marco de aplanamiento"
+
+#: ../webkit/webkitwebsettings.cpp:638
msgid "User Agent"
-msgstr ""
+msgstr "Agente de usuario"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:587
+#: ../webkit/webkitwebsettings.cpp:639
msgid "The User-Agent string used by WebKitGtk"
-msgstr ""
+msgstr "La cadena del agente de usuario utilizado por WebKitGtk"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:602
+#: ../webkit/webkitwebsettings.cpp:654
msgid "JavaScript can open windows automatically"
msgstr "JavaScript puede abrir ventanas automáticamente"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:603
+#: ../webkit/webkitwebsettings.cpp:655
msgid "Whether JavaScript can open windows automatically"
msgstr "Indica si JavaScript puede abrir ventanas automáticamente"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:618
+#: ../webkit/webkitwebsettings.cpp:669
+msgid "JavaScript can access Clipboard"
+msgstr "JavaScript puede acceder al portapapeles"
+
+#: ../webkit/webkitwebsettings.cpp:670
+#| msgid "Whether JavaScript can open windows automatically"
+msgid "Whether JavaScript can access Clipboard"
+msgstr "Indica si JavaScript puede acceder al portapapeles"
+
+#: ../webkit/webkitwebsettings.cpp:686
msgid "Enable offline web application cache"
-msgstr "Activar la caché de aplicación fuera de línea"
+msgstr "Activar la caché de aplicación web desconectada"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:619
+#: ../webkit/webkitwebsettings.cpp:687
msgid "Whether to enable offline web application cache"
-msgstr "Indica si activar la caché de aplicación web fuera de línea"
+msgstr "Indica si se debe activar la caché de la aplicación web desconectada"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:646
+#: ../webkit/webkitwebsettings.cpp:715
msgid "Editing behavior"
-msgstr ""
+msgstr "Comportamiento al editar"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:647
+#: ../webkit/webkitwebsettings.cpp:716
msgid "The behavior mode to use in editing mode"
-msgstr ""
+msgstr "El modo de comportamiento que usar en el modo de edición"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:663
+#: ../webkit/webkitwebsettings.cpp:732
msgid "Enable universal access from file URIs"
-msgstr ""
+msgstr "Activar el acceso universal desde URI de archivos"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:664
+#: ../webkit/webkitwebsettings.cpp:733
msgid "Whether to allow universal access from file URIs"
-msgstr ""
+msgstr "Indica si se debe activar el acceso universal desde URI de archivos"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:679
+#: ../webkit/webkitwebsettings.cpp:748
msgid "Enable DOM paste"
-msgstr ""
+msgstr "Permitir pegado DOM"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:680
+#: ../webkit/webkitwebsettings.cpp:749
msgid "Whether to enable DOM paste"
-msgstr ""
+msgstr "Indica si debe activar el pegado DOM"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:698
+#: ../webkit/webkitwebsettings.cpp:767
msgid "Tab key cycles through elements"
-msgstr ""
+msgstr "Tecla «Tab» para moverse por los elementos"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:699
+#: ../webkit/webkitwebsettings.cpp:768
msgid "Whether the tab key cycles through elements on the page."
msgstr ""
+"Indica si se debe usar la tecla «Tab» para moverse por los elementos de la "
+"página."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:719
+#: ../webkit/webkitwebsettings.cpp:788
msgid "Enable Default Context Menu"
-msgstr ""
+msgstr "Activar el menú contextual predeterminado"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:720
+#: ../webkit/webkitwebsettings.cpp:789
msgid ""
"Enables the handling of right-clicks for the creation of the default context "
"menu"
msgstr ""
+"Activa el manejo de pulsaciones con el botón derecho para crear el menú "
+"contextual predeterminado"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:740
+#: ../webkit/webkitwebsettings.cpp:809
msgid "Enable Site Specific Quirks"
-msgstr ""
+msgstr "Activar las características especiales del sitio"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:741
+#: ../webkit/webkitwebsettings.cpp:810
msgid "Enables the site-specific compatibility workarounds"
-msgstr ""
+msgstr "Activar las compatibilidades alternativas específicas del sitio"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:763
+#: ../webkit/webkitwebsettings.cpp:832
msgid "Enable page cache"
msgstr "Activar caché de páginas"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:764
+#: ../webkit/webkitwebsettings.cpp:833
msgid "Whether the page cache should be used"
msgstr "Indica si se debería usar la caché de páginas"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:784
+#: ../webkit/webkitwebsettings.cpp:853
msgid "Auto Resize Window"
-msgstr "Autoredimensionar ventana"
+msgstr "Redimensionar ventana automáticamente"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:785
+#: ../webkit/webkitwebsettings.cpp:854
msgid "Automatically resize the toplevel window when a page requests it"
msgstr ""
"Redimensionar automáticamente la ventana de nivel superior cuando una página "
"lo solicita"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:817
+#: ../webkit/webkitwebsettings.cpp:886
msgid "Enable Java Applet"
msgstr "Activar la miniaplicación de Java"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:818
+#: ../webkit/webkitwebsettings.cpp:887
msgid "Whether Java Applet support through <applet> should be enabled"
msgstr ""
"Indica si se debería activar el soporte de miniaplicaciones Java a través de "
"<applet>"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2319
+#: ../webkit/webkitwebsettings.cpp:901
+#| msgid "Enable Timeline profiling"
+msgid "Enable Hyperlink Auditing"
+msgstr "Activar la auditoría de enlaces"
+
+#: ../webkit/webkitwebsettings.cpp:902
+#| msgid "Whether the page cache should be used"
+msgid "Whether <a ping> should be able to send pings"
+msgstr "indica si <un ping> debe poder enviar «pings»"
+
+#: ../webkit/webkitwebsettings.cpp:910
+#| msgid "fullscreen"
+msgid "Enable Fullscreen"
+msgstr "Activar pantalla completa"
+
+#: ../webkit/webkitwebsettings.cpp:911
+#| msgid "Whether the page cache should be used"
+msgid "Whether the Mozilla style API should be enabled."
+msgstr "Indica si el estilo de Mozilla API debe estar activado."
+
+#: ../webkit/webkitwebview.cpp:2984
msgid "Returns the @web_view's document title"
msgstr "Devuelve el título del documento de @web_view"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2333
+#: ../webkit/webkitwebview.cpp:2998
msgid "Returns the current URI of the contents displayed by the @web_view"
msgstr "Devuelve el contenido actual del URI mostrado en @web_view"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2346
+#: ../webkit/webkitwebview.cpp:3011
msgid "Copy target list"
-msgstr "Copiar la lista de destinos"
+msgstr "Lista de destinos de la copiado"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2347
+#: ../webkit/webkitwebview.cpp:3012
msgid "The list of targets this web view supports for clipboard copying"
msgstr ""
-"La lista de objetivos que esta vista web soporta para copiar desde el "
+"La lista de destinos que esta vista web soporta para copiar desde el "
"portapapeles"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2360
+#: ../webkit/webkitwebview.cpp:3025
msgid "Paste target list"
-msgstr "Pegar la lista de destinos"
+msgstr "Lista de destinos de pegado"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2361
+#: ../webkit/webkitwebview.cpp:3026
msgid "The list of targets this web view supports for clipboard pasting"
msgstr ""
"La lista de objetivos que esta vista web soporta para pegar desde el "
"portapapeles"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2367
+#: ../webkit/webkitwebview.cpp:3032
msgid "Settings"
-msgstr "Ajustes"
+msgstr "Configuración"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2368
+#: ../webkit/webkitwebview.cpp:3033
msgid "An associated WebKitWebSettings instance"
msgstr "Una instancia asociada de WebKitWebSettings"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2381
+#: ../webkit/webkitwebview.cpp:3046
msgid "Web Inspector"
msgstr "Inspector web"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2382
+#: ../webkit/webkitwebview.cpp:3047
msgid "The associated WebKitWebInspector instance"
-msgstr "La instanacia aosiciada de WebKitWebInspector"
+msgstr "La instancia asociada de WebKitWebInspector"
+
+#: ../webkit/webkitwebview.cpp:3060
+msgid "Viewport Attributes"
+msgstr "Atributos de Viewport"
+
+#: ../webkit/webkitwebview.cpp:3061
+msgid "The associated WebKitViewportAttributes instance"
+msgstr "La instancia asociada de WebKitViewportAttributes"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2402
+#: ../webkit/webkitwebview.cpp:3081
msgid "Editable"
msgstr "Editable"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2403
+#: ../webkit/webkitwebview.cpp:3082
msgid "Whether content can be modified by the user"
msgstr "Indica si el usuario puede modificar el contenido"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2409
+#: ../webkit/webkitwebview.cpp:3088
msgid "Transparent"
msgstr "Transparente"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2410
+#: ../webkit/webkitwebview.cpp:3089
msgid "Whether content has a transparent background"
msgstr "Indica si el contenido tiene un fondo transparente"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2423
+#: ../webkit/webkitwebview.cpp:3102
msgid "Zoom level"
msgstr "Nivel de ampliación"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2424
+#: ../webkit/webkitwebview.cpp:3103
msgid "The level of zoom of the content"
msgstr "El nivel de ampliación del contenido"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2439
+#: ../webkit/webkitwebview.cpp:3118
msgid "Full content zoom"
msgstr "Ampliación completa del contenido"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2440
+#: ../webkit/webkitwebview.cpp:3119
msgid "Whether the full content is scaled when zooming"
msgstr "Indica si el contenido completo se escala al ampliar"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2453
-msgid "Encoding"
-msgstr "Codificación"
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2454
+#: ../webkit/webkitwebview.cpp:3133
msgid "The default encoding of the web view"
msgstr "La codificación predeterminada de la vista web"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2467
+#: ../webkit/webkitwebview.cpp:3146
msgid "Custom Encoding"
msgstr "Codificación personalizada"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2468
+#: ../webkit/webkitwebview.cpp:3147
msgid "The custom encoding of the web view"
msgstr "La codificación de caracteres personalizada de la vista de la web"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2520
+#: ../webkit/webkitwebview.cpp:3199
msgid "Icon URI"
-msgstr "Icono de URI"
+msgstr "URI del icono"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2521
+#: ../webkit/webkitwebview.cpp:3200
msgid "The URI for the favicon for the #WebKitWebView."
msgstr "El URI para el icono favorito para #WebKitWebView."
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:56
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:61
msgid "Submit"
msgstr "Enviar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:66
msgid "Reset"
msgstr "Restablecer"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:71
msgid "This is a searchable index. Enter search keywords: "
msgstr ""
-"Es un índice en el que se puede buscar. Introduzca palabras clave de "
+"Es un índice en el que se puede buscar. Introduzca las palabras clave de "
"búsqueda:"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:76
msgid "Choose File"
msgstr "Elegir archivo"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:81
msgid "(None)"
msgstr "(Ninguno)"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:86
msgid "Open Link in New _Window"
msgstr "Abrir enlace en una _ventana nueva"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:91
msgid "_Download Linked File"
msgstr "_Descargar el archivo enlazado"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:96
msgid "Copy Link Loc_ation"
msgstr "_Copiar dirección del enlace"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:101
msgid "Open _Image in New Window"
msgstr "Abrir _imagen en una ventana nueva"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:106
msgid "Sa_ve Image As"
msgstr "_Guardar imagen como"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:111
msgid "Cop_y Image"
msgstr "Copia_r imagen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:116
+#| msgid "Open _Image in New Window"
+msgid "Open _Video in New Window"
+msgstr "Abrir _vídeo en una ventana nueva"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:121
+#| msgid "Open Link in New _Window"
+msgid "Open _Audio in New Window"
+msgstr "Abrir _sonido en una ventana nueva"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:126
+#| msgid "Copy Link Loc_ation"
+msgid "Cop_y Video Link Location"
+msgstr "Cop_iar la dirección del enlace de vídeo"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:131
+#| msgid "Copy Link Loc_ation"
+msgid "Cop_y Audio Link Location"
+msgstr "Copiar la _ubicación del enlace sonido"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:136
+msgid "_Toggle Media Controls"
+msgstr "Ac_tivar o desactivar los controles multimedia"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:141
+msgid "Toggle Media _Loop Playback"
+msgstr "Activar o desactivar la reproducción multimedia en buc_le"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:146
+msgid "Switch Video to _Fullscreen"
+msgstr "_Cambiar vídeo a pantalla completa"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:151
+msgid "_Play"
+msgstr "_Reproducir"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:156
+msgid "_Pause"
+msgstr "Pa_usar"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:161
+msgid "_Mute"
+msgstr "_Silenciar"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
msgid "Open _Frame in New Window"
msgstr "Abrir _marco en una ventana nueva"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:217
msgid "_Reload"
msgstr "Re_cargar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:234
msgid "No Guesses Found"
-msgstr "No se encontró ninguna sugerencia"
+msgstr "No se encontraron sugerencias"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:239
msgid "_Ignore Spelling"
msgstr "_Ignorar ortografía"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:244
msgid "_Learn Spelling"
msgstr "_Aprender ortografía"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:249
msgid "_Search the Web"
msgstr "_Buscar en la web"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:254
msgid "_Look Up in Dictionary"
msgstr "_Buscar en diccionario"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:259
msgid "_Open Link"
msgstr "_Abrir enlace"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:264
msgid "Ignore _Grammar"
msgstr "Ignorar gra_mática"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:269
msgid "Spelling and _Grammar"
msgstr "Ortografía y gra_mática"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:274
msgid "_Show Spelling and Grammar"
msgstr "_Mostrar ortografía y gramática"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:274
msgid "_Hide Spelling and Grammar"
msgstr "_Ocultar ortografía y grámatica"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:279
msgid "_Check Document Now"
msgstr "_Comprobar documento ahora"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:284
msgid "Check Spelling While _Typing"
msgstr "Comprobar ortografía al _escribir"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:289
msgid "Check _Grammar With Spelling"
msgstr "Comprobar gra_mática y ortografía"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:294
msgid "_Font"
msgstr "_Tipografía"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:317
msgid "_Outline"
msgstr "C_ontorno"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:322
msgid "Inspect _Element"
msgstr "Inspeccionar _elemento"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:327
msgid "No recent searches"
msgstr "No hay búsquedas recientes"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:332
msgid "Recent searches"
msgstr "Búsquedas recientes"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:337
msgid "_Clear recent searches"
-msgstr "_Cancelar búsquedas recientes"
+msgstr "_Limpiar búsquedas recientes"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
msgid "term"
msgstr "término"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
msgid "definition"
msgstr "definición"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:352
msgid "press"
msgstr "pulsar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:357
msgid "select"
msgstr "seleccionar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:362
msgid "activate"
msgstr "activar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:367
msgid "uncheck"
msgstr "deseleccionar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:372
msgid "check"
msgstr "seleccionar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
msgid "jump"
msgstr "saltar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:392
+msgid "Missing Plug-in"
+msgstr "Falta el complemento"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:398
+msgid "Plug-in Failure"
+msgstr "Falló el complemento"
+
+#. 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:404
msgid " files"
msgstr "archivos"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
msgid "Unknown"
msgstr "Desconocido"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:414
+#, c-format
+msgctxt "Title string for images"
+msgid "%s (%dx%d pixels)"
+msgstr "%s (%dx%d píxeles)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
msgid "Loading..."
msgstr "Cargando…"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:431
msgid "Live Broadcast"
msgstr "En directo"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:437
msgid "audio element controller"
msgstr "controlador de elemento de sonido"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:439
msgid "video element controller"
msgstr "controlador de elemento de vídeo"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:441
msgid "mute"
msgstr "silenciar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:443
msgid "unmute"
msgstr "dar voz"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:445
msgid "play"
-msgstr "play"
+msgstr "reproducir"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:447
msgid "pause"
-msgstr "pause"
+msgstr "pausar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:449
msgid "movie time"
msgstr "tiempo de la película"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:451
msgid "timeline slider thumb"
-msgstr ""
+msgstr "miniatura del deslizador de tiempo"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:453
msgid "back 30 seconds"
-msgstr "atrás 30 segundos"
+msgstr "retroceder 30 segundos"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:455
msgid "return to realtime"
msgstr "volver a tiempo real"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:457
msgid "elapsed time"
msgstr "tiempo transcurrido"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:459
msgid "remaining time"
msgstr "tiempo restante"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
msgid "status"
msgstr "estado"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:463
msgid "fullscreen"
msgstr "pantalla completa"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:465
msgid "fast forward"
-msgstr ""
+msgstr "avance rápido"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:467
msgid "fast reverse"
-msgstr ""
+msgstr "retroceso rápido"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:469
msgid "show closed captions"
-msgstr ""
+msgstr "mostrar subtítulos"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:471
msgid "hide closed captions"
-msgstr ""
+msgstr "ocultar subtítulos"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:480
msgid "audio element playback controls and status display"
-msgstr ""
+msgstr "controles de reproducción de sonido y de la pantalla de estado"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:482
msgid "video element playback controls and status display"
-msgstr ""
+msgstr "controles de reproducción de vídeo y de la pantalla de estado"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:484
msgid "mute audio tracks"
-msgstr ""
+msgstr "silenciar pistas de audio"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:486
msgid "unmute audio tracks"
-msgstr ""
+msgstr "cancelar silencio de pistas de audio"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:488
msgid "begin playback"
msgstr "comenzar la reproducción"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:490
msgid "pause playback"
msgstr "pausar la reproducción"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:492
msgid "movie time scrubber"
-msgstr ""
+msgstr "depurador del tiempo de la película"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:494
msgid "movie time scrubber thumb"
-msgstr ""
+msgstr "miniatura del depurador del tiempo de la película"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:496
msgid "seek movie back 30 seconds"
-msgstr ""
+msgstr "retroceder la película 30 segundos"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:498
msgid "return streaming movie to real time"
-msgstr ""
+msgstr "devolver el flujo de la película a tiempo real"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:500
msgid "current movie time in seconds"
-msgstr ""
+msgstr "tiempo actual de película en segundos"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
msgid "number of seconds of movie remaining"
msgstr "número de segundos restantes de la película"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:504
msgid "current movie status"
msgstr "estado actual de la película"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:506
msgid "seek quickly back"
-msgstr ""
+msgstr "búsqueda rápida hacia atrás"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:508
msgid "seek quickly forward"
-msgstr ""
+msgstr "búsqueda rápida hacia adelante"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:510
msgid "Play movie in fullscreen mode"
-msgstr ""
+msgstr "Reproducir la película en modo a pantalla completa"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
msgid "start displaying closed captions"
-msgstr ""
+msgstr "mostrar subtítulos"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:514
msgid "stop displaying closed captions"
-msgstr ""
+msgstr "dejar de mostrar subtítulos"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:523
msgid "indefinite time"
msgstr "tiempo indefinido"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:553
msgid "value missing"
-msgstr ""
+msgstr "falta el valor"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:589
msgid "type mismatch"
-msgstr ""
+msgstr "el tipo no coincide"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:612
msgid "pattern mismatch"
-msgstr ""
+msgstr "el patrón no coincide"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:617
msgid "too long"
msgstr "demasiado largo"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:622
msgid "range underflow"
-msgstr ""
+msgstr "subdesbordamiento de rango"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:627
msgid "range overflow"
-msgstr ""
+msgstr "desbordamiento de rango"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:632
msgid "step mismatch"
-msgstr ""
+msgstr "el paso no coincide"
diff --git a/Source/WebKit/gtk/po/gl.po b/Source/WebKit/gtk/po/gl.po
index 8a9da3285..a5989b989 100644
--- a/Source/WebKit/gtk/po/gl.po
+++ b/Source/WebKit/gtk/po/gl.po
@@ -2,617 +2,884 @@
# Copyright (C) 2009 webkit's COPYRIGHT HOLDER
# This file is distributed under the same license as the webkit package.
# Fran Diéguez <frandieguez@ubuntu.com>, 2009, 2010.
+# Fran Dieguez <frandieguez@gnome.org>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: webkit HEAD\n"
-"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n"
-"POT-Creation-Date: 2010-02-25 15:53-0300\n"
-"PO-Revision-Date: 2010-05-23 01:14+0200\n"
-"Last-Translator: Fran Diéguez <frandieguez@ubuntu.com>\n"
-"Language-Team: Galician <gnome@g11.net>\n"
+"Report-Msgid-Bugs-To: http://bugs.webkit.org\n"
+"POT-Creation-Date: 2010-12-27 15:26+0000\n"
+"PO-Revision-Date: 2011-09-05 10:56+0200\n"
+"Last-Translator: Fran Dieguez <frandieguez@gnome.org>\n"
+"Language-Team: Galego <gnome-l10n-gl@gnome.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n!=1);\\\n"
+"Content-Transfer-Encoding: 8bits\n"
+"Plural-Forms: nplurals=2; plural=(n!=1);\n"
-#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535
+#: ../WebCoreSupport/ChromeClientGtk.cpp:589
msgid "Upload File"
msgstr "Subir ficheiro"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:63
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:194
msgid "Input _Methods"
msgstr "_Métodos de entrada"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:80
msgid "LRM _Left-to-right mark"
msgstr "Marca de _esquerda-a-derita [LRM]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:81
msgid "RLM _Right-to-left mark"
msgstr "Marca de _dereita-a-esquerda [RLM]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:82
msgid "LRE Left-to-right _embedding"
msgstr "In_crustamento de esquerda-a-dereita [LRE]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:83
msgid "RLE Right-to-left e_mbedding"
msgstr "Inc_rustamento de dereita-a-esquerda [RLE]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:84
msgid "LRO Left-to-right _override"
msgstr "_Prevalencia de esquerda-a-dereita [LRO]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:85
msgid "RLO Right-to-left o_verride"
msgstr "Pre_valencia de dereita-a-esquerda [RLO]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:86
msgid "PDF _Pop directional formatting"
msgstr "Formatadeo d_ireccional emerxente de PDF"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:87
msgid "ZWS _Zero width space"
msgstr "Espazo de anchura _cero [ZWS]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:88
msgid "ZWJ Zero width _joiner"
msgstr "En_samblador de ancho cero [ZWJ]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:89
msgid "ZWNJ Zero width _non-joiner"
msgstr "_Non ensamblador de anchura cero [ZWNJ]"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:111
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:189
msgid "_Insert Unicode Control Character"
msgstr "_Insertar un carácter de control Unicode"
-#: WebKit/gtk/webkit/webkitdownload.cpp:266
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1180
+msgid "Load request cancelled"
+msgstr "Solicitude de carga cancelada"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1186
+msgid "Not allowed to use restricted network port"
+msgstr "Non está permitido usar un porto de rede restrinxido"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1192
+msgid "URL cannot be shown"
+msgstr "Non é posíbel mostrar o URL"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1198
+msgid "Frame load was interrupted"
+msgstr "A carga do marco foi interrompida"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1204
+msgid "Content with the specified MIME type cannot be shown"
+msgstr "Non é posíbel mostrar o contido co tipo MIME especificado"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1210
+msgid "File does not exist"
+msgstr "O ficheiro non existe"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1216
+msgid "Plugin will handle load"
+msgstr "O engadido xestionará a carga"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:385
+#| msgid "play"
+msgid "Play"
+msgstr "Reproducir"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:387
+#| msgid "pause"
+msgid "Pause"
+msgstr "Pausar"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:533
+msgid "Play / Pause"
+msgstr "Reproducir / Pausar"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:533
+msgid "Play or pause the media"
+msgstr "Reproduce ou pausa o medio"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:541
+#| msgid "Title"
+msgid "Time:"
+msgstr "Tempo:"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:565
+#| msgid "fullscreen"
+msgid "Exit Fullscreen"
+msgstr "Saír da pantalla completa"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:565
+#| msgid "Play movie in fullscreen mode"
+msgid "Exit from fullscreen mode"
+msgstr "Saír do modo a pantalla completa"
+
+#: ../webkit/webkitdownload.cpp:273
msgid "Network Request"
msgstr "Solicitude de rede"
-#: WebKit/gtk/webkit/webkitdownload.cpp:267
+#: ../webkit/webkitdownload.cpp:274
msgid "The network request for the URI that should be downloaded"
msgstr "A solicitude de rede para o URI que debe descargarse"
-#: WebKit/gtk/webkit/webkitdownload.cpp:281
-#| msgid "Network Request"
+#: ../webkit/webkitdownload.cpp:288
msgid "Network Response"
msgstr "Resposta de rede"
-#: WebKit/gtk/webkit/webkitdownload.cpp:282
-#| msgid "The network request for the URI that should be downloaded"
+#: ../webkit/webkitdownload.cpp:289
msgid "The network response for the URI that should be downloaded"
msgstr "A resposta de rede do URI que debería ser descargado"
-#: WebKit/gtk/webkit/webkitdownload.cpp:296
+#: ../webkit/webkitdownload.cpp:303
msgid "Destination URI"
msgstr "URI de destino"
-#: WebKit/gtk/webkit/webkitdownload.cpp:297
+#: ../webkit/webkitdownload.cpp:304
msgid "The destination URI where to save the file"
msgstr "A URI de destino onde gardar o ficheiro"
-#: WebKit/gtk/webkit/webkitdownload.cpp:311
+#: ../webkit/webkitdownload.cpp:318
msgid "Suggested Filename"
msgstr "Nome do ficheiro suxerido"
-#: WebKit/gtk/webkit/webkitdownload.cpp:312
+#: ../webkit/webkitdownload.cpp:319
msgid "The filename suggested as default when saving"
msgstr "O nome de ficheiro suxerido como predefinido ao gardar"
-#: WebKit/gtk/webkit/webkitdownload.cpp:329
+#: ../webkit/webkitdownload.cpp:336
msgid "Progress"
msgstr "Progreso"
-#: WebKit/gtk/webkit/webkitdownload.cpp:330
+#: ../webkit/webkitdownload.cpp:337
msgid "Determines the current progress of the download"
msgstr "Determina o progreso actual da descarga"
-#: WebKit/gtk/webkit/webkitdownload.cpp:343
+#: ../webkit/webkitdownload.cpp:350
msgid "Status"
msgstr "Estado"
-#: WebKit/gtk/webkit/webkitdownload.cpp:344
+#: ../webkit/webkitdownload.cpp:351
msgid "Determines the current status of the download"
msgstr "Determina o estado actual da descarga"
-#: WebKit/gtk/webkit/webkitdownload.cpp:359
+#: ../webkit/webkitdownload.cpp:366
msgid "Current Size"
msgstr "Tamaño actual"
-#: WebKit/gtk/webkit/webkitdownload.cpp:360
+#: ../webkit/webkitdownload.cpp:367
msgid "The length of the data already downloaded"
msgstr "A lonxitude dos datos xa descargados"
-#: WebKit/gtk/webkit/webkitdownload.cpp:374
+#: ../webkit/webkitdownload.cpp:381
msgid "Total Size"
msgstr "Tamaño total"
-#: WebKit/gtk/webkit/webkitdownload.cpp:375
+#: ../webkit/webkitdownload.cpp:382
msgid "The total size of the file"
msgstr "O tamaño total do ficheiro"
-#: WebKit/gtk/webkit/webkitdownload.cpp:526
+#: ../webkit/webkitdownload.cpp:534
msgid "User cancelled the download"
msgstr "O usuario cancelou a descarga"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248
+#: ../webkit/webkithittestresult.cpp:156
+msgid "Context"
+msgstr "Contexto"
+
+#: ../webkit/webkithittestresult.cpp:157
+msgid "Flags indicating the kind of target that received the event."
+msgstr "Opcións que indican o tipo de obxectivo que recibe o evento."
+
+#: ../webkit/webkithittestresult.cpp:171
+#| msgid "Icon URI"
+msgid "Link URI"
+msgstr "URI da ligazón"
+
+#: ../webkit/webkithittestresult.cpp:172
+msgid "The URI to which the target that received the event points, if any."
+msgstr "O URI ao que apunto o obxectivo que recibe o evento, se o hai."
+
+#: ../webkit/webkithittestresult.cpp:185
+msgid "Image URI"
+msgstr "URI da imaxe"
+
+#: ../webkit/webkithittestresult.cpp:186
+msgid ""
+"The URI of the image that is part of the target that received the event, if "
+"any."
+msgstr "O URI da imaxe que é parte do obxectivo que recibe o evento, se o hai."
+
+#: ../webkit/webkithittestresult.cpp:199
+msgid "Media URI"
+msgstr "URI do medio"
+
+#: ../webkit/webkithittestresult.cpp:200
+msgid ""
+"The URI of the media that is part of the target that received the event, if "
+"any."
+msgstr "O URI do medio que é parte do obxectivo que recibe o evento, se o hai."
+
+#: ../webkit/webkithittestresult.cpp:221
+msgid "Inner node"
+msgstr "Nodo interior"
+
+#: ../webkit/webkithittestresult.cpp:222
+msgid "The inner DOM node associated with the hit test result."
+msgstr "O nodo DOM interior asociado ao resultado de proba de impacto."
+
+#: ../webkit/webkitnetworkrequest.cpp:134
+#: ../webkit/webkitnetworkresponse.cpp:134 ../webkit/webkitwebframe.cpp:323
+#: ../webkit/webkitwebhistoryitem.cpp:176 ../webkit/webkitwebresource.cpp:126
+#: ../webkit/webkitwebview.cpp:2997
+msgid "URI"
+msgstr "URI"
+
+#: ../webkit/webkitnetworkrequest.cpp:135
+msgid "The URI to which the request will be made."
+msgstr "O URI ao que se fará a a solicitude."
+
+#: ../webkit/webkitnetworkrequest.cpp:148
+#: ../webkit/webkitnetworkresponse.cpp:148
+msgid "Message"
+msgstr "Mensaxe"
+
+#: ../webkit/webkitnetworkrequest.cpp:149
+msgid "The SoupMessage that backs the request."
+msgstr "O SoupMessage que devolve a resposta."
+
+#: ../webkit/webkitnetworkresponse.cpp:135
+msgid "The URI to which the response will be made."
+msgstr "O URI ao que se lle debe facer a resposta."
+
+#: ../webkit/webkitnetworkresponse.cpp:149
+msgid "The SoupMessage that backs the response."
+msgstr "O SoupMessage que devolve a resposta."
+
+#: ../webkit/webkitsecurityorigin.cpp:150
+msgid "Protocol"
+msgstr "Protocolo"
+
+#: ../webkit/webkitsecurityorigin.cpp:151
+msgid "The protocol of the security origin"
+msgstr "O protocolo do orixe de seguranza"
+
+#: ../webkit/webkitsecurityorigin.cpp:164
+msgid "Host"
+msgstr "Servidor"
+
+#: ../webkit/webkitsecurityorigin.cpp:165
+#| msgid "The title of the history item"
+msgid "The host of the security origin"
+msgstr "O servidor do orixe da seguranza"
+
+#: ../webkit/webkitsecurityorigin.cpp:178
+msgid "Port"
+msgstr "Porto"
+
+#: ../webkit/webkitsecurityorigin.cpp:179
+#| msgid "The title of the history item"
+msgid "The port of the security origin"
+msgstr "O porto do orixe da seguranza"
+
+#: ../webkit/webkitsecurityorigin.cpp:192
+msgid "Web Database Usage"
+msgstr "Uso da base de datos web"
+
+#: ../webkit/webkitsecurityorigin.cpp:193
+msgid "The cumulative size of all web databases in the security origin"
+msgstr "O tamaño acumulado de tódolos enderezos web no orixe de seguranza"
+
+#: ../webkit/webkitsecurityorigin.cpp:205
+msgid "Web Database Quota"
+msgstr "Cuota da base de datos web"
+
+#: ../webkit/webkitsecurityorigin.cpp:206
+msgid "The web database quota of the security origin in bytes"
+msgstr "A cuota da base de datos web da orixe de seguranza en bytes"
+
+#: ../webkit/webkitsoupauthdialog.c:264
#, c-format
msgid "A username and password are being requested by the site %s"
msgstr "O sitio %s solicitou un nome de usuario e unha contrasinal"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278
+#: ../webkit/webkitsoupauthdialog.c:294
msgid "Server message:"
msgstr "Mensaxe do servidor:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291
+#: ../webkit/webkitsoupauthdialog.c:307
msgid "Username:"
msgstr "Nome de usuario:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293
+#: ../webkit/webkitsoupauthdialog.c:309
msgid "Password:"
msgstr "Contrasinal:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302
-#| msgid "Remember password"
+#: ../webkit/webkitsoupauthdialog.c:318
msgid "_Remember password"
msgstr "_Lembrar o contrasinal"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:298
+#: ../webkit/webkitwebdatabase.cpp:173
+msgid "Security Origin"
+msgstr "Orixe de seguranza"
+
+#: ../webkit/webkitwebdatabase.cpp:174
+#| msgid "The custom encoding of the web view"
+msgid "The security origin of the database"
+msgstr "A orixe de seguranza da base de datos"
+
+#: ../webkit/webkitwebdatabase.cpp:187 ../webkit/webkitwebframe.cpp:309
msgid "Name"
msgstr "Nome"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:299
+#: ../webkit/webkitwebdatabase.cpp:188
+#| msgid "The name of the frame"
+msgid "The name of the Web Database database"
+msgstr "O nome da base de datos Web Database"
+
+#: ../webkit/webkitwebdatabase.cpp:201
+msgid "Display Name"
+msgstr "Nome en pantalla"
+
+#: ../webkit/webkitwebdatabase.cpp:202
+msgid "The display name of the Web Storage database"
+msgstr "O nome en pantala da base de datos Web Storage"
+
+#: ../webkit/webkitwebdatabase.cpp:215
+msgid "Expected Size"
+msgstr "Tamaño agardado"
+
+#: ../webkit/webkitwebdatabase.cpp:216
+msgid "The expected size of the Web Database database"
+msgstr "O tamaño agardado da base de datos Web Database"
+
+#: ../webkit/webkitwebdatabase.cpp:228
+msgid "Size"
+msgstr "Tamaño"
+
+#: ../webkit/webkitwebdatabase.cpp:229
+msgid "The current size of the Web Database database"
+msgstr "O tamaño actual da base de datos Web Database"
+
+#: ../webkit/webkitwebdatabase.cpp:241
+#| msgid "Suggested Filename"
+msgid "Filename"
+msgstr "Nome do ficheiro"
+
+#: ../webkit/webkitwebdatabase.cpp:242
+msgid "The absolute filename of the Web Storage database"
+msgstr "O nome de ficheiro absoluto da base de datos Web Storage"
+
+#: ../webkit/webkitwebframe.cpp:310
msgid "The name of the frame"
msgstr "O nome do marco"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:305
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146
-#: WebKit/gtk/webkit/webkitwebview.cpp:2318
+#: ../webkit/webkitwebframe.cpp:316 ../webkit/webkitwebhistoryitem.cpp:144
+#: ../webkit/webkitwebview.cpp:2983
msgid "Title"
msgstr "Título"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:306
+#: ../webkit/webkitwebframe.cpp:317
msgid "The document title of the frame"
msgstr "O título do documento do marco"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:312
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178
-#: WebKit/gtk/webkit/webkitwebview.cpp:2332
-msgid "URI"
-msgstr "URI"
-
-#: WebKit/gtk/webkit/webkitwebframe.cpp:313
+#: ../webkit/webkitwebframe.cpp:324
msgid "The current URI of the contents displayed by the frame"
msgstr "O URI actual dos contidos mostrados no marco"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:344
+#: ../webkit/webkitwebframe.cpp:355
msgid "Horizontal Scrollbar Policy"
msgstr "Normativa da barra de desprazamento horizontal"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:345
-#| msgid "Determines the current progress of the download"
+#: ../webkit/webkitwebframe.cpp:356
msgid ""
"Determines the current policy for the horizontal scrollbar of the frame."
msgstr ""
"Determina a normativa actual para a barra de desprazamento horizontal para o "
"marco."
-#: WebKit/gtk/webkit/webkitwebframe.cpp:362
+#: ../webkit/webkitwebframe.cpp:373
msgid "Vertical Scrollbar Policy"
msgstr "Normativa da barra de desprazamento vertical"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:363
-#| msgid "Determines the current progress of the download"
+#: ../webkit/webkitwebframe.cpp:374
msgid "Determines the current policy for the vertical scrollbar of the frame."
msgstr ""
"Determina a normativa actual para a barra de desprazamento vertical para o "
"marco."
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147
+#: ../webkit/webkitwebhistoryitem.cpp:145
msgid "The title of the history item"
msgstr "O título do elemento do historial"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162
+#: ../webkit/webkitwebhistoryitem.cpp:160
msgid "Alternate Title"
msgstr "Título alternativo"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163
+#: ../webkit/webkitwebhistoryitem.cpp:161
msgid "The alternate title of the history item"
msgstr "O título alternativo do elemento do historial"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179
+#: ../webkit/webkitwebhistoryitem.cpp:177
msgid "The URI of the history item"
msgstr "O URI do elemento do historial"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173
+#: ../webkit/webkitwebhistoryitem.cpp:192
+#: ../webkit/webkitwebnavigationaction.cpp:171
msgid "Original URI"
msgstr "URI orixinal"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195
+#: ../webkit/webkitwebhistoryitem.cpp:193
msgid "The original URI of the history item"
msgstr "O URI orixinal do elemento do historial"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210
+#: ../webkit/webkitwebhistoryitem.cpp:208
msgid "Last visited Time"
msgstr "Tempo da última visita"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211
+#: ../webkit/webkitwebhistoryitem.cpp:209
msgid "The time at which the history item was last visited"
msgstr "O tempo no cal o elemento do historial foi visitado a última vez"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:268
+#: ../webkit/webkitwebinspector.cpp:270
msgid "Web View"
msgstr "Visualización web"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:269
+#: ../webkit/webkitwebinspector.cpp:271
msgid "The Web View that renders the Web Inspector itself"
msgstr "A visualización web que renderiza o propio Inspector web"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:282
+#: ../webkit/webkitwebinspector.cpp:284
msgid "Inspected URI"
msgstr "URI inspeccionada"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:283
+#: ../webkit/webkitwebinspector.cpp:285
msgid "The URI that is currently being inspected"
msgstr "O URI que está sendo inspeccionada actualmente"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:299
+#: ../webkit/webkitwebinspector.cpp:301
msgid "Enable JavaScript profiling"
msgstr "Activar o perfilado de JavaScript"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:300
+#: ../webkit/webkitwebinspector.cpp:302
msgid "Profile the executed JavaScript."
msgstr "Perfilar o JavaScript executado."
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:315
-#| msgid "Enable JavaScript profiling"
+#: ../webkit/webkitwebinspector.cpp:317
msgid "Enable Timeline profiling"
msgstr "Activar o perfilado da Liña de tempo"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:316
+#: ../webkit/webkitwebinspector.cpp:318
msgid "Profile the WebCore instrumentation."
msgstr "Perfilar a instrumentación de WebCore."
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158
+#: ../webkit/webkitwebnavigationaction.cpp:156
msgid "Reason"
msgstr "Razón"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159
+#: ../webkit/webkitwebnavigationaction.cpp:157
msgid "The reason why this navigation is occurring"
msgstr "A razón pola que esta navegación está ocorrendo"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174
+#: ../webkit/webkitwebnavigationaction.cpp:172
msgid "The URI that was requested as the target for the navigation"
msgstr "O URI que foi solicitado como destino para a navegación"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188
+#: ../webkit/webkitwebnavigationaction.cpp:186
msgid "Button"
msgstr "Botón"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189
+#: ../webkit/webkitwebnavigationaction.cpp:187
msgid "The button used to click"
msgstr "O botón empregado para premer"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204
+#: ../webkit/webkitwebnavigationaction.cpp:202
msgid "Modifier state"
msgstr "Estado dos modificadores"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205
+#: ../webkit/webkitwebnavigationaction.cpp:203
msgid "A bitmask representing the state of the modifier keys"
msgstr "A máscara de bits representa o estado das teclas modificadoras"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220
-#| msgid "The name of the frame"
+#: ../webkit/webkitwebnavigationaction.cpp:218
msgid "Target frame"
msgstr "Marco de destino"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221
-#| msgid "The URI that was requested as the target for the navigation"
+#: ../webkit/webkitwebnavigationaction.cpp:219
msgid "The target frame for the navigation"
msgstr "O marco de destino para a navegación"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:237
+#: ../webkit/webkitwebresource.cpp:127
+#| msgid "The title of the history item"
+msgid "The uri of the resource"
+msgstr "O uri do recurso"
+
+#: ../webkit/webkitwebresource.cpp:141
+msgid "MIME Type"
+msgstr "Tipo MIME"
+
+#: ../webkit/webkitwebresource.cpp:142
+#| msgid "The title of the history item"
+msgid "The MIME type of the resource"
+msgstr "O tipo MIME do recurso"
+
+#: ../webkit/webkitwebresource.cpp:156 ../webkit/webkitwebview.cpp:3132
+msgid "Encoding"
+msgstr "Codificación"
+
+#: ../webkit/webkitwebresource.cpp:157
+#| msgid "The default encoding of the web view"
+msgid "The text encoding name of the resource"
+msgstr "O nome da codificación de texto do recurso"
+
+#: ../webkit/webkitwebresource.cpp:172
+msgid "Frame Name"
+msgstr "Nome do marco"
+
+#: ../webkit/webkitwebresource.cpp:173
+#| msgid "The name of the frame"
+msgid "The frame name of the resource"
+msgstr "O nome do marco do recurso"
+
+#: ../webkit/webkitwebsettings.cpp:252
msgid "Default Encoding"
msgstr "Codificación predefinida"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:238
+#: ../webkit/webkitwebsettings.cpp:253
msgid "The default encoding used to display text."
msgstr "A codificación predefinida empregada para mostrar o texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:246
+#: ../webkit/webkitwebsettings.cpp:261
msgid "Cursive Font Family"
msgstr "Familia de tipo de fonte cursiva"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:247
+#: ../webkit/webkitwebsettings.cpp:262
msgid "The default Cursive font family used to display text."
msgstr "A familia de tipo de fonte cursiva empregado para mostrar texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:255
+#: ../webkit/webkitwebsettings.cpp:270
msgid "Default Font Family"
msgstr "Familia de tipo de fonte predefinida"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:256
+#: ../webkit/webkitwebsettings.cpp:271
msgid "The default font family used to display text."
msgstr "A familia de fonte predefinida para mostrar texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:264
+#: ../webkit/webkitwebsettings.cpp:279
msgid "Fantasy Font Family"
msgstr "Familia de tipo de fonte Fantasy"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:265
+#: ../webkit/webkitwebsettings.cpp:280
msgid "The default Fantasy font family used to display text."
msgstr "A familia de tipo de fonte Fantasy empregado para mostrar texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:273
+#: ../webkit/webkitwebsettings.cpp:288
msgid "Monospace Font Family"
msgstr "Familia de tipo de fonte Monospace"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:274
+#: ../webkit/webkitwebsettings.cpp:289
msgid "The default font family used to display monospace text."
msgstr "A familia de tipo de fonte predefinido empregado para mostrar texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:282
+#: ../webkit/webkitwebsettings.cpp:297
msgid "Sans Serif Font Family"
msgstr "Familia de tipo de fonte Sans Serif"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:283
+#: ../webkit/webkitwebsettings.cpp:298
msgid "The default Sans Serif font family used to display text."
msgstr "A familia de tipo de fonte Sans Serif empregado para mostrar texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:291
+#: ../webkit/webkitwebsettings.cpp:306
msgid "Serif Font Family"
msgstr "Familia de tipo de fonte Serif"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:292
+#: ../webkit/webkitwebsettings.cpp:307
msgid "The default Serif font family used to display text."
msgstr "A familia de tipo de fonte Serif empregado para mostrar texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:300
+#: ../webkit/webkitwebsettings.cpp:315
msgid "Default Font Size"
msgstr "Tamaño do tipo de fonte predefinido"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:301
+#: ../webkit/webkitwebsettings.cpp:316
msgid "The default font size used to display text."
msgstr "O tamaño do tipo de fonte predefinido para mostrar o texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:309
+#: ../webkit/webkitwebsettings.cpp:324
msgid "Default Monospace Font Size"
msgstr "Tamaño predefinido do tipo de fonte monoespaciado"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:310
+#: ../webkit/webkitwebsettings.cpp:325
msgid "The default font size used to display monospace text."
msgstr ""
"O tamaño predefinido de tipo de fonte para mostrar o texto monoespaciado"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:318
+#: ../webkit/webkitwebsettings.cpp:333
msgid "Minimum Font Size"
msgstr "Tamaño mínimo para o tipo de fonte"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:319
+#: ../webkit/webkitwebsettings.cpp:334
msgid "The minimum font size used to display text."
msgstr "Tamaño mínimo do tipo de fonte empregado para mostrar o texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:327
+#: ../webkit/webkitwebsettings.cpp:342
msgid "Minimum Logical Font Size"
msgstr "O tamaño lóxico de fonte mínimo"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:328
+#: ../webkit/webkitwebsettings.cpp:343
msgid "The minimum logical font size used to display text."
msgstr "O tamaño lóxico de fonte mínimo a empregar para mostrar texto."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:347
+#: ../webkit/webkitwebsettings.cpp:362
msgid "Enforce 96 DPI"
msgstr "Forzar 96 DPI."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:348
+#: ../webkit/webkitwebsettings.cpp:363
msgid "Enforce a resolution of 96 DPI"
msgstr "Forzar unha resolución de 96 DPI"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:356
+#: ../webkit/webkitwebsettings.cpp:371
msgid "Auto Load Images"
msgstr "Cargar imaxes automáticamente"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:357
+#: ../webkit/webkitwebsettings.cpp:372
msgid "Load images automatically."
msgstr "Carga imaxes automaticamente."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:365
+#: ../webkit/webkitwebsettings.cpp:380
msgid "Auto Shrink Images"
msgstr "Recortar imaxes automaticamente"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:366
+#: ../webkit/webkitwebsettings.cpp:381
msgid "Automatically shrink standalone images to fit."
msgstr "Recorta de forma automática as imaxes para que se axusten."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:374
+#: ../webkit/webkitwebsettings.cpp:389
msgid "Print Backgrounds"
msgstr "Imprimir fondos"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:375
+#: ../webkit/webkitwebsettings.cpp:390
msgid "Whether background images should be printed."
msgstr "Indica se se deben imprimir as imaxes de fondo."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:383
+#: ../webkit/webkitwebsettings.cpp:398
msgid "Enable Scripts"
msgstr "Activar scripts"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:384
+#: ../webkit/webkitwebsettings.cpp:399
msgid "Enable embedded scripting languages."
msgstr "Activa as linguaxes de scripting incrustadas."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:392
+#: ../webkit/webkitwebsettings.cpp:407
msgid "Enable Plugins"
msgstr "Activar complementos"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:393
+#: ../webkit/webkitwebsettings.cpp:408
msgid "Enable embedded plugin objects."
msgstr "Activar os obxectos de complementos incrustados."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:401
+#: ../webkit/webkitwebsettings.cpp:416
msgid "Resizable Text Areas"
msgstr "Áreas de texto retamañábeis"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:402
+#: ../webkit/webkitwebsettings.cpp:417
msgid "Whether text areas are resizable."
msgstr "Indica se as áreas de texto son retamañábeis."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:409
+#: ../webkit/webkitwebsettings.cpp:424
msgid "User Stylesheet URI"
msgstr "URI da folla de estilos do usuario"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:410
+#: ../webkit/webkitwebsettings.cpp:425
msgid "The URI of a stylesheet that is applied to every page."
msgstr "O URI dunha folla de estilos que se aplica en cada páxina."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:425
+#: ../webkit/webkitwebsettings.cpp:440
msgid "Zoom Stepping Value"
msgstr "Valor de salto do zoom"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:426
+#: ../webkit/webkitwebsettings.cpp:441
msgid "The value by which the zoom level is changed when zooming in or out."
msgstr ""
"O valor polo cal o nivel de zoom se cambiará ao incrementar o zoom ou "
"reducilo."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:444
+#: ../webkit/webkitwebsettings.cpp:459
msgid "Enable Developer Extras"
msgstr "Activar extras do desenvolvedor"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:445
+#: ../webkit/webkitwebsettings.cpp:460
msgid "Enables special extensions that help developers"
msgstr "Activa as extensións especiais que axudan aos desenvolvedores"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:465
+#: ../webkit/webkitwebsettings.cpp:480
msgid "Enable Private Browsing"
msgstr "Activar a navegación privada"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:466
+#: ../webkit/webkitwebsettings.cpp:481
msgid "Enables private browsing mode"
msgstr "Activa o modo privado de navegación"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:481
+#: ../webkit/webkitwebsettings.cpp:496
msgid "Enable Spell Checking"
msgstr "Activar a corrección ortográfica"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:482
-#| msgid "Check Spelling While _Typing"
+#: ../webkit/webkitwebsettings.cpp:497
msgid "Enables spell checking while typing"
msgstr "Comprobar ortografía ao escribir"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:505
+#: ../webkit/webkitwebsettings.cpp:520
msgid "Languages to use for spell checking"
msgstr "Idiomas a usar na corrección ortográfica"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:506
+#: ../webkit/webkitwebsettings.cpp:521
msgid "Comma separated list of languages to use for spell checking"
msgstr ""
"Lista de separada por comas das linguaxes a usar na comprobación ortográfica"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:520
-#| msgid "Enable Private Browsing"
+#: ../webkit/webkitwebsettings.cpp:535
msgid "Enable Caret Browsing"
msgstr "Activar a navegación cos cursores"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:521
-msgid "Whether to enable accessibility enhanced keyboard navigation"
+#: ../webkit/webkitwebsettings.cpp:536
+#| msgid "Whether to enable accessibility enhanced keyboard navigation"
+msgid "Whether to enable accesibility enhanced keyboard navigation"
msgstr ""
"Indica se activar a navegación mellorada por teclado para a accesibilidade"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:536
+#: ../webkit/webkitwebsettings.cpp:551
msgid "Enable HTML5 Database"
msgstr "Activar a base de datos de HTML5"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:537
+#: ../webkit/webkitwebsettings.cpp:552
msgid "Whether to enable HTML5 database support"
msgstr "Indica se activar a compatibilidade de HTML5"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:552
+#: ../webkit/webkitwebsettings.cpp:567
msgid "Enable HTML5 Local Storage"
msgstr "Activar o almacenamento local de HTML5"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:553
+#: ../webkit/webkitwebsettings.cpp:568
msgid "Whether to enable HTML5 Local Storage support"
-msgstr "Indica se activar a compatibilidade de almacenamento local de HTML5"
+msgstr "Indica se se activa a compatibilidade de almacenamento local de HTML5"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:567
-#| msgid "Enable Scripts"
+#: ../webkit/webkitwebsettings.cpp:582
msgid "Enable XSS Auditor"
msgstr "Activar o auditor de XSS"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:568
-msgid "Whether to enable teh XSS auditor"
-msgstr "Indica se activar o auditor de XSS"
+#: ../webkit/webkitwebsettings.cpp:583
+#| msgid "Whether to enable teh XSS auditor"
+msgid "Whether to enable the XSS auditor"
+msgstr "Indica se se activa o auditor de XSS"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:586
+#: ../webkit/webkitwebsettings.cpp:601
+msgid "Enable Spatial Navigation"
+msgstr "Activar navegación espacial"
+
+#: ../webkit/webkitwebsettings.cpp:602
+#| msgid "Whether to enable teh XSS auditor"
+msgid "Whether to enable Spatial Navigation"
+msgstr "Indica se se activa a Navegación Espacial"
+
+#: ../webkit/webkitwebsettings.cpp:620
+#| msgid "Enable Private Browsing"
+msgid "Enable Frame Flattening"
+msgstr ""
+
+#: ../webkit/webkitwebsettings.cpp:621
+#| msgid "Whether to enable DOM paste"
+msgid "Whether to enable Frame Flattening"
+msgstr ""
+
+#: ../webkit/webkitwebsettings.cpp:638
msgid "User Agent"
msgstr "Axente de usuario"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:587
+#: ../webkit/webkitwebsettings.cpp:639
msgid "The User-Agent string used by WebKitGtk"
msgstr "A cadea User-Agent usada polo WebKitGtk"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:602
+#: ../webkit/webkitwebsettings.cpp:654
msgid "JavaScript can open windows automatically"
msgstr "JavaScript pode abrir xanelas automáticamente"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:603
+#: ../webkit/webkitwebsettings.cpp:655
msgid "Whether JavaScript can open windows automatically"
msgstr "Indica se JavaScript pode abrir xanelas automaticamente"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:618
+#: ../webkit/webkitwebsettings.cpp:669
+msgid "JavaScript can access Clipboard"
+msgstr "Javascript pode acceder ao portapapeis"
+
+#: ../webkit/webkitwebsettings.cpp:670
+#| msgid "Whether JavaScript can open windows automatically"
+msgid "Whether JavaScript can access Clipboard"
+msgstr "Indica se JavaScript pode acceder ao portapapeis"
+
+#: ../webkit/webkitwebsettings.cpp:686
msgid "Enable offline web application cache"
msgstr "Activar a caché de aplicativo web fóra de liña"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:619
+#: ../webkit/webkitwebsettings.cpp:687
msgid "Whether to enable offline web application cache"
msgstr "Indica"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:646
+#: ../webkit/webkitwebsettings.cpp:715
msgid "Editing behavior"
msgstr "Comportamento de edición"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:647
+#: ../webkit/webkitwebsettings.cpp:716
msgid "The behavior mode to use in editing mode"
msgstr "O modo de comportamento no modo de edición"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:663
+#: ../webkit/webkitwebsettings.cpp:732
msgid "Enable universal access from file URIs"
msgstr "Activar o acceso universal para os URIs de ficheiro"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:664
+#: ../webkit/webkitwebsettings.cpp:733
msgid "Whether to allow universal access from file URIs"
msgstr "Indica se permitir o acceso universal desde os URI de ficheiro"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:679
-#| msgid "Enable Scripts"
+#: ../webkit/webkitwebsettings.cpp:748
msgid "Enable DOM paste"
msgstr "Activar o pegado de DOM"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:680
+#: ../webkit/webkitwebsettings.cpp:749
msgid "Whether to enable DOM paste"
msgstr "Indica se activar o pegado de DOM"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:698
+#: ../webkit/webkitwebsettings.cpp:767
msgid "Tab key cycles through elements"
msgstr "A tecla de tabulación móvese ciclicamente a través dos elementos"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:699
+#: ../webkit/webkitwebsettings.cpp:768
msgid "Whether the tab key cycles through elements on the page."
msgstr ""
"Indica se a tecla de tabulación móvese ciclicamente a través dos elementos "
"nunha da páxina."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:719
+#: ../webkit/webkitwebsettings.cpp:788
msgid "Enable Default Context Menu"
msgstr "Activar o menú contextual predefinido"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:720
+#: ../webkit/webkitwebsettings.cpp:789
msgid ""
"Enables the handling of right-clicks for the creation of the default context "
"menu"
@@ -620,496 +887,579 @@ msgstr ""
"Activa a xestión dos clic dereitos para a creación do menú contextual "
"predefinido"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:740
+#: ../webkit/webkitwebsettings.cpp:809
msgid "Enable Site Specific Quirks"
msgstr "Activar as solucións específicas dun sitio"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:741
+#: ../webkit/webkitwebsettings.cpp:810
msgid "Enables the site-specific compatibility workarounds"
msgstr "Activa os arranxos de compatibilidade específicos dun sitio"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:763
+#: ../webkit/webkitwebsettings.cpp:832
msgid "Enable page cache"
msgstr "Activar a caché de páxina"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:764
-#| msgid "Whether background images should be printed."
+#: ../webkit/webkitwebsettings.cpp:833
msgid "Whether the page cache should be used"
msgstr "Indica se se debería usar a caché de páxina"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:784
+#: ../webkit/webkitwebsettings.cpp:853
msgid "Auto Resize Window"
msgstr "Autoredimentsionar a xanela"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:785
+#: ../webkit/webkitwebsettings.cpp:854
msgid "Automatically resize the toplevel window when a page requests it"
msgstr ""
"Redimensionar automaticamente a xanela de nivel superior cando a páxina o "
"solicite"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:817
-#| msgid "Enable JavaScript profiling"
+#: ../webkit/webkitwebsettings.cpp:886
msgid "Enable Java Applet"
msgstr "Activar os Applet de Java"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:818
+#: ../webkit/webkitwebsettings.cpp:887
msgid "Whether Java Applet support through <applet> should be enabled"
msgstr ""
"Indica se se debería activar a compatibilidade dos Applet de Java a través "
"de <applet>"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2319
+#: ../webkit/webkitwebsettings.cpp:901
+#| msgid "Enable Timeline profiling"
+msgid "Enable Hyperlink Auditing"
+msgstr "Activar a auditoría de hiperligazóns"
+
+#: ../webkit/webkitwebsettings.cpp:902
+#| msgid "Whether the page cache should be used"
+msgid "Whether <a ping> should be able to send pings"
+msgstr ""
+
+#: ../webkit/webkitwebsettings.cpp:910
+#| msgid "fullscreen"
+msgid "Enable Fullscreen"
+msgstr "Activar pantalla completa"
+
+#: ../webkit/webkitwebsettings.cpp:911
+#| msgid "Whether the page cache should be used"
+msgid "Whether the Mozilla style API should be enabled."
+msgstr "Indica se se debería activar o estilo de API de Mozilla."
+
+#: ../webkit/webkitwebview.cpp:2984
msgid "Returns the @web_view's document title"
msgstr "Devolve o título do documento do @web_view"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2333
+#: ../webkit/webkitwebview.cpp:2998
msgid "Returns the current URI of the contents displayed by the @web_view"
msgstr "Devolve o URI actual dos contidos mostrados polo @web_view"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2346
+#: ../webkit/webkitwebview.cpp:3011
msgid "Copy target list"
msgstr "Copiar lista de destinos"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2347
+#: ../webkit/webkitwebview.cpp:3012
msgid "The list of targets this web view supports for clipboard copying"
msgstr ""
"A lista de destinos para os cales esta visualización web ten compatibilidade "
"para copiar no portarretallos"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2360
+#: ../webkit/webkitwebview.cpp:3025
msgid "Paste target list"
msgstr "Pegar lista de destinos"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2361
+#: ../webkit/webkitwebview.cpp:3026
msgid "The list of targets this web view supports for clipboard pasting"
msgstr ""
"A lista de destinos para os que esta visualización web ten compatibilidade "
"para pegar no portarretallos"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2367
+#: ../webkit/webkitwebview.cpp:3032
msgid "Settings"
msgstr "Configuracións"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2368
+#: ../webkit/webkitwebview.cpp:3033
msgid "An associated WebKitWebSettings instance"
msgstr "Unha instancia de WebKitWebSettings asociada"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2381
+#: ../webkit/webkitwebview.cpp:3046
msgid "Web Inspector"
msgstr "Inspector web"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2382
+#: ../webkit/webkitwebview.cpp:3047
msgid "The associated WebKitWebInspector instance"
msgstr "A instancia de WebKitWebInspector asociada"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2402
+#: ../webkit/webkitwebview.cpp:3060
+msgid "Viewport Attributes"
+msgstr "Atributos do punto de vista"
+
+#: ../webkit/webkitwebview.cpp:3061
+#| msgid "The associated WebKitWebInspector instance"
+msgid "The associated WebKitViewportAttributes instance"
+msgstr "A instancia de WebKitViewportAttributes asociada"
+
+#: ../webkit/webkitwebview.cpp:3081
msgid "Editable"
msgstr "Editábel"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2403
+#: ../webkit/webkitwebview.cpp:3082
msgid "Whether content can be modified by the user"
msgstr "Indica se o contido pode ser modificado polo usuario"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2409
+#: ../webkit/webkitwebview.cpp:3088
msgid "Transparent"
msgstr "Transparente"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2410
+#: ../webkit/webkitwebview.cpp:3089
msgid "Whether content has a transparent background"
msgstr "Indica se o contido pode ter un fondo transparente"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2423
+#: ../webkit/webkitwebview.cpp:3102
msgid "Zoom level"
msgstr "Nivel de zoom"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2424
+#: ../webkit/webkitwebview.cpp:3103
msgid "The level of zoom of the content"
msgstr "O nivel de zoom do contido"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2439
+#: ../webkit/webkitwebview.cpp:3118
msgid "Full content zoom"
msgstr "Zoom de contido completo"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2440
+#: ../webkit/webkitwebview.cpp:3119
msgid "Whether the full content is scaled when zooming"
msgstr "Indica se o contido completo é escalado ao facer zoom"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2453
-msgid "Encoding"
-msgstr "Codificación"
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2454
+#: ../webkit/webkitwebview.cpp:3133
msgid "The default encoding of the web view"
msgstr "A codificación predefinida para a visualización web"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2467
+#: ../webkit/webkitwebview.cpp:3146
msgid "Custom Encoding"
msgstr "Codificación personalizada"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2468
+#: ../webkit/webkitwebview.cpp:3147
msgid "The custom encoding of the web view"
msgstr "A codificación personalizada para a visualización web"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2520
+#: ../webkit/webkitwebview.cpp:3199
msgid "Icon URI"
msgstr "URI da icona"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2521
+#: ../webkit/webkitwebview.cpp:3200
msgid "The URI for the favicon for the #WebKitWebView."
msgstr "O URI do favicon para o #WebKitWebView."
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:56
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:61
msgid "Submit"
msgstr "Enviar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:66
msgid "Reset"
msgstr "Restabelecer"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:71
msgid "This is a searchable index. Enter search keywords: "
msgstr "Este é un índice buscábel. Insira as palabras chave de búsqueda:"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:76
msgid "Choose File"
msgstr "Seleccionar ficheiro"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:81
msgid "(None)"
msgstr "(ningún)"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:86
msgid "Open Link in New _Window"
msgstr "Abrir a ligazón nunha nova _xanela"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:91
msgid "_Download Linked File"
msgstr "_Descargar o ficheiro ligado"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:96
msgid "Copy Link Loc_ation"
msgstr "Copiar a loc_alización da ligazón"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:101
msgid "Open _Image in New Window"
msgstr "Abrir _imaxe nunha nova xanela"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:106
msgid "Sa_ve Image As"
msgstr "Gar_dar imaxe como"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:111
msgid "Cop_y Image"
msgstr "Co_piar imaxe"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:116
+#| msgid "Open _Image in New Window"
+msgid "Open _Video in New Window"
+msgstr "Abrir _vídeo nunha nova xanela"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:121
+#| msgid "Open Link in New _Window"
+msgid "Open _Audio in New Window"
+msgstr "Abrir _son nunha nova xanela"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:126
+#| msgid "Copy Link Loc_ation"
+msgid "Cop_y Video Link Location"
+msgstr "Cop_iar a localización da ligazón do vídeo"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:131
+#| msgid "Copy Link Loc_ation"
+msgid "Cop_y Audio Link Location"
+msgstr "Copiar a loc_alización da ligazón do audio"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:136
+msgid "_Toggle Media Controls"
+msgstr "_Trocar controles do multimedia"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:141
+msgid "Toggle Media _Loop Playback"
+msgstr "Trocar a reprodución en búc_le do multimedia"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:146
+msgid "Switch Video to _Fullscreen"
+msgstr "Trocar vídeo a _pantalla completa"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:151
+#| msgid "play"
+msgid "_Play"
+msgstr "_Reproducir"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:156
+#| msgid "pause"
+msgid "_Pause"
+msgstr "_Pausar"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:161
+#| msgid "mute"
+msgid "_Mute"
+msgstr "_Silenciar"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
msgid "Open _Frame in New Window"
msgstr "Abrir _marco nunha nova xanela"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:217
msgid "_Reload"
msgstr "_Recargar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:234
msgid "No Guesses Found"
-msgstr ""
+msgstr "Non se atoparon convidados"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:239
msgid "_Ignore Spelling"
msgstr "_Ignorar corrección ortográfica"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:244
msgid "_Learn Spelling"
msgstr "Apren_er corrección ortográfica"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:249
msgid "_Search the Web"
msgstr "_Buscar na web"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:254
msgid "_Look Up in Dictionary"
msgstr "_Buscar no dicionario"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:259
msgid "_Open Link"
msgstr "_Abrir ligazón"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:264
msgid "Ignore _Grammar"
msgstr "Ignorar _gramática"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:269
msgid "Spelling and _Grammar"
msgstr "Corrección ortográfica e _gramatical"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:274
msgid "_Show Spelling and Grammar"
msgstr "_Mostrar corrección ortográfica e gramatical"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:274
msgid "_Hide Spelling and Grammar"
msgstr "_Agochar corrección ortográfica e gramatical"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:279
msgid "_Check Document Now"
msgstr "_Comprobar o documento agora"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:284
msgid "Check Spelling While _Typing"
msgstr "Comprobar ortografía ao _escribir"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:289
msgid "Check _Grammar With Spelling"
msgstr "Comprobar _gramática ao escribir"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:294
msgid "_Font"
msgstr "_Tipo de fonte"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:317
msgid "_Outline"
msgstr "_Contorno"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:322
msgid "Inspect _Element"
msgstr "Inspeccionar _elemento"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:327
msgid "No recent searches"
msgstr "Non hai buscas recentes"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:332
msgid "Recent searches"
msgstr "Buscas recentes"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:337
msgid "_Clear recent searches"
msgstr "_Limpar as buscas recentes"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
msgid "term"
msgstr "termo"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
msgid "definition"
msgstr "definición"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:352
msgid "press"
msgstr "premer"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:357
msgid "select"
msgstr "seleccionar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:362
msgid "activate"
msgstr "activado"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:367
msgid "uncheck"
msgstr "desmarcar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:372
msgid "check"
msgstr "marcar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
msgid "jump"
msgstr "saltar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:392
+msgid "Missing Plug-in"
+msgstr "Falta o engadido"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:398
+msgid "Plug-in Failure"
+msgstr "Fallo do engadido"
+
+#. 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:404
msgid " files"
msgstr " ficheiros"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
msgid "Unknown"
msgstr "Descoñecido"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:414
+#, c-format
+msgctxt "Title string for images"
+msgid "%s (%dx%d pixels)"
+msgstr "%s (%dx%d píxeles)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
msgid "Loading..."
msgstr "Cargando..."
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:431
msgid "Live Broadcast"
msgstr "Retransmisión en vivo"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:437
msgid "audio element controller"
msgstr "controlador do elemento de son"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:439
msgid "video element controller"
msgstr "controlador de elemento de vídeo"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:441
msgid "mute"
msgstr "enmudecer"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:443
msgid "unmute"
msgstr "desenmudecer"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:445
msgid "play"
msgstr "reproducir"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:447
msgid "pause"
msgstr "pausar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:449
msgid "movie time"
msgstr "tempo do filme"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:451
msgid "timeline slider thumb"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:453
msgid "back 30 seconds"
msgstr "abrás 30 segundos"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:455
msgid "return to realtime"
msgstr "voltar ao tempo real"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:457
msgid "elapsed time"
msgstr "tempo transcorrido"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:459
msgid "remaining time"
msgstr "tempo restante"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399
-#| msgid "Status"
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
msgid "status"
msgstr "estado"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:463
msgid "fullscreen"
msgstr "pantalla completa"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:465
msgid "fast forward"
msgstr "avance rápido"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:467
msgid "fast reverse"
msgstr "retroceso rápido"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:469
msgid "show closed captions"
msgstr "mostrar os subtítulos pechados"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:471
msgid "hide closed captions"
msgstr "ocultar os subtítulos pechados"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:480
msgid "audio element playback controls and status display"
msgstr "controis e xanela de estado de reprodución dos elementos de son"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:482
msgid "video element playback controls and status display"
msgstr "controis e xanela de estado de reprodución dos elementos de vídeo"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:484
msgid "mute audio tracks"
msgstr "enmudecer as pistas de son"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:486
msgid "unmute audio tracks"
msgstr "desenmudecer as pistas de son"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:488
msgid "begin playback"
msgstr "comezar a reprodución"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:490
msgid "pause playback"
msgstr "pausar a reprodución"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:492
msgid "movie time scrubber"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:494
msgid "movie time scrubber thumb"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:496
msgid "seek movie back 30 seconds"
msgstr "buscar cara atrás no filme 30 segundos"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:498
msgid "return streaming movie to real time"
msgstr "devolver a reprodución en vivo do filme ao tempo real"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:500
msgid "current movie time in seconds"
msgstr "tempo actual do filme en segundos"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
msgid "number of seconds of movie remaining"
msgstr "números de segundos que faltan do filme"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:504
msgid "current movie status"
msgstr "estado do filme actual"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:506
msgid "seek quickly back"
msgstr "buscar cara atrás rápidamente"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:508
msgid "seek quickly forward"
msgstr "buscar cara adiante rápidamente"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:510
msgid "Play movie in fullscreen mode"
msgstr "Reproducir o filme en pantalla completa"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
msgid "start displaying closed captions"
msgstr "comezar a mostrar os subtítulos pechados"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:514
msgid "stop displaying closed captions"
msgstr "parar de mostrar os subtítulos pechados"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
-#| msgid "definition"
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:523
msgid "indefinite time"
msgstr "tempo non definido"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:553
msgid "value missing"
msgstr "falta o valor"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:589
msgid "type mismatch"
msgstr "tipo non coincidente"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:612
msgid "pattern mismatch"
msgstr "patron non coincidente"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:617
msgid "too long"
msgstr "demasiado longo"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:622
msgid "range underflow"
-msgstr ""
+msgstr "Desbordamento por embaixo do rango"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:627
msgid "range overflow"
-msgstr ""
+msgstr "Desbordamento por enriba do rango"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:632
msgid "step mismatch"
msgstr "paso non coincidente"
diff --git a/Source/WebKit/gtk/po/id.po b/Source/WebKit/gtk/po/id.po
index fa3f646e5..199312e04 100644
--- a/Source/WebKit/gtk/po/id.po
+++ b/Source/WebKit/gtk/po/id.po
@@ -6,9 +6,9 @@
msgid ""
msgstr ""
"Project-Id-Version: webkit HEAD\n"
-"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n"
-"POT-Creation-Date: 2010-02-25 15:53-0300\n"
-"PO-Revision-Date: 2010-08-23 16:07+0700\n"
+"Report-Msgid-Bugs-To: http://bugs.webkit.org\n"
+"POT-Creation-Date: 2010-09-22 03:26+0000\n"
+"PO-Revision-Date: 2010-09-24 14:25+0700\n"
"Last-Translator: Andika Triwidada <andika@gmail.com>\n"
"Language-Team: GNOME Indonesian Translation Team <gnome@i15n.org>\n"
"MIME-Version: 1.0\n"
@@ -17,1066 +17,1369 @@ msgstr ""
"X-Poedit-Language: Indonesian\n"
"X-Poedit-Country: Indonesia\n"
-#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535
+#: ../WebCoreSupport/ChromeClientGtk.cpp:569
msgid "Upload File"
msgstr "Unggah Berkas"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:61
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:194
msgid "Input _Methods"
msgstr "_Metoda Masukan"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:78
msgid "LRM _Left-to-right mark"
msgstr "LRM _Left-to-right mark"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:79
msgid "RLM _Right-to-left mark"
msgstr "RLM _Right-to-left mark"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:80
msgid "LRE Left-to-right _embedding"
msgstr "LRE Left-to-right _embedding"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:81
msgid "RLE Right-to-left e_mbedding"
msgstr "RLE Right-to-left e_mbedding"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:82
msgid "LRO Left-to-right _override"
msgstr "LRO Left-to-right _override"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:83
msgid "RLO Right-to-left o_verride"
msgstr "RLO Right-to-left o_verride"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:84
msgid "PDF _Pop directional formatting"
msgstr "PDF _Pop directional formatting"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:85
msgid "ZWS _Zero width space"
msgstr "ZWS _Zero width space"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:86
msgid "ZWJ Zero width _joiner"
msgstr "ZWJ Zero width _joiner"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:87
msgid "ZWNJ Zero width _non-joiner"
msgstr "ZWNJ Zero width _non-joiner"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:109
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:189
msgid "_Insert Unicode Control Character"
msgstr "S_isipkan karakter Kontrol Unicode"
-#: WebKit/gtk/webkit/webkitdownload.cpp:266
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1140
+msgid "Load request cancelled"
+msgstr "Permintaan memuat dibatalkan"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1146
+msgid "Not allowed to use restricted network port"
+msgstr "Tak diijinkan memakai port jaringan yang dibatasi"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1152
+msgid "URL cannot be shown"
+msgstr "URL tak bisa ditampilkan"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1158
+msgid "Frame load was interrupted"
+msgstr "Pemuatan rangka terputus"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1164
+msgid "Content with the specified MIME type cannot be shown"
+msgstr "Isi dengan jenis MIME yang dinyatakan tidak dapat ditampilkan"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1170
+msgid "File does not exist"
+msgstr "Berkas tak ada"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1176
+msgid "Plugin will handle load"
+msgstr "Plugin akan menangani beban"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:386
+msgid "Play"
+msgstr "Putar"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:388
+msgid "Pause"
+msgstr "Jeda"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:534
+msgid "Play / Pause"
+msgstr "Putar / Jeda"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:534
+msgid "Play or pause the media"
+msgstr "Putar atau tahan media"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:542
+msgid "Time:"
+msgstr "Waktu:"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:566
+msgid "Exit Fullscreen"
+msgstr "Keluar Mode Layar Penuh"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:566
+msgid "Exit from fullscreen mode"
+msgstr "Keluar dari mode layar penuh"
+
+#: ../webkit/webkitdownload.cpp:272
msgid "Network Request"
msgstr "Request Jaringan"
-#: WebKit/gtk/webkit/webkitdownload.cpp:267
+#: ../webkit/webkitdownload.cpp:273
msgid "The network request for the URI that should be downloaded"
msgstr "Request jaringan bagi URI yang mesti diunduh"
-#: WebKit/gtk/webkit/webkitdownload.cpp:281
+#: ../webkit/webkitdownload.cpp:287
msgid "Network Response"
msgstr "Respon Jaringan"
-#: WebKit/gtk/webkit/webkitdownload.cpp:282
+#: ../webkit/webkitdownload.cpp:288
msgid "The network response for the URI that should be downloaded"
msgstr "Respon jaringan bagi URI yang mesti diunduh"
-#: WebKit/gtk/webkit/webkitdownload.cpp:296
+#: ../webkit/webkitdownload.cpp:302
msgid "Destination URI"
msgstr "URI tujuan"
-#: WebKit/gtk/webkit/webkitdownload.cpp:297
+#: ../webkit/webkitdownload.cpp:303
msgid "The destination URI where to save the file"
msgstr "URI tujuan tempat menyimpan berkas"
-#: WebKit/gtk/webkit/webkitdownload.cpp:311
+#: ../webkit/webkitdownload.cpp:317
msgid "Suggested Filename"
msgstr "Nama Berkas Yang Disarankan"
-#: WebKit/gtk/webkit/webkitdownload.cpp:312
+#: ../webkit/webkitdownload.cpp:318
msgid "The filename suggested as default when saving"
msgstr "Nama berkas yang disarankan sebagai bawaan ketika menyimpan"
-#: WebKit/gtk/webkit/webkitdownload.cpp:329
+#: ../webkit/webkitdownload.cpp:335
msgid "Progress"
msgstr "Kemajuan"
-#: WebKit/gtk/webkit/webkitdownload.cpp:330
+#: ../webkit/webkitdownload.cpp:336
msgid "Determines the current progress of the download"
msgstr "Menyatakan tingkat kemajuan pengunduhan"
-#: WebKit/gtk/webkit/webkitdownload.cpp:343
+#: ../webkit/webkitdownload.cpp:349
msgid "Status"
msgstr "Status"
-#: WebKit/gtk/webkit/webkitdownload.cpp:344
+#: ../webkit/webkitdownload.cpp:350
msgid "Determines the current status of the download"
msgstr "Menyatakan status pengunduhan kini"
-#: WebKit/gtk/webkit/webkitdownload.cpp:359
+#: ../webkit/webkitdownload.cpp:365
msgid "Current Size"
msgstr "Ukuran Kini"
-#: WebKit/gtk/webkit/webkitdownload.cpp:360
+#: ../webkit/webkitdownload.cpp:366
msgid "The length of the data already downloaded"
msgstr "Panjang data yang telah diunduh"
-#: WebKit/gtk/webkit/webkitdownload.cpp:374
+#: ../webkit/webkitdownload.cpp:380
msgid "Total Size"
msgstr "Ukuran Total"
-#: WebKit/gtk/webkit/webkitdownload.cpp:375
+#: ../webkit/webkitdownload.cpp:381
msgid "The total size of the file"
msgstr "Ukuran total berkas"
-#: WebKit/gtk/webkit/webkitdownload.cpp:526
+#: ../webkit/webkitdownload.cpp:533
msgid "User cancelled the download"
msgstr "Pengguna membatalkan pengunduhan"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248
+#: ../webkit/webkithittestresult.cpp:148
+msgid "Context"
+msgstr "Konteks"
+
+#: ../webkit/webkithittestresult.cpp:149
+msgid "Flags indicating the kind of target that received the event."
+msgstr "Flag yang mengindikasikan jenis target yang menerima kejadian."
+
+#: ../webkit/webkithittestresult.cpp:163
+msgid "Link URI"
+msgstr "URI Taut"
+
+#: ../webkit/webkithittestresult.cpp:164
+msgid "The URI to which the target that received the event points, if any."
+msgstr ""
+"URI tautan yang menjadi bagian dari target yang menerima kejadian, bila ada."
+
+#: ../webkit/webkithittestresult.cpp:177
+msgid "Image URI"
+msgstr "URI Gambar"
+
+#: ../webkit/webkithittestresult.cpp:178
+msgid ""
+"The URI of the image that is part of the target that received the event, if "
+"any."
+msgstr ""
+"URI gambar yang menjadi bagian dari target yang menerima kejadian, bila ada."
+
+#: ../webkit/webkithittestresult.cpp:191
+msgid "Media URI"
+msgstr "URI Media"
+
+#: ../webkit/webkithittestresult.cpp:192
+msgid ""
+"The URI of the media that is part of the target that received the event, if "
+"any."
+msgstr ""
+"URI media yang menjadi bagian dari target yang menerima kejadian, bila ada."
+
+#: ../webkit/webkithittestresult.cpp:213
+msgid "Inner node"
+msgstr "Node dalam"
+
+#: ../webkit/webkithittestresult.cpp:214
+msgid "The inner DOM node associated with the hit test result."
+msgstr "Node DOM dalam yang terkait dengan hasil uji hit."
+
+#: ../webkit/webkitnetworkrequest.cpp:136
+#: ../webkit/webkitnetworkresponse.cpp:134 ../webkit/webkitwebframe.cpp:315
+#: ../webkit/webkitwebhistoryitem.cpp:178 ../webkit/webkitwebresource.cpp:126
+#: ../webkit/webkitwebview.cpp:2603
+msgid "URI"
+msgstr "URI"
+
+#: ../webkit/webkitnetworkrequest.cpp:137
+msgid "The URI to which the request will be made."
+msgstr "URI kemana permintaan akan dibuat."
+
+#: ../webkit/webkitnetworkrequest.cpp:150
+#: ../webkit/webkitnetworkresponse.cpp:148
+msgid "Message"
+msgstr "Pesan"
+
+#: ../webkit/webkitnetworkrequest.cpp:151
+msgid "The SoupMessage that backs the request."
+msgstr "SoupMessage yang mendukung permintaan."
+
+#: ../webkit/webkitnetworkresponse.cpp:135
+msgid "The URI to which the response will be made."
+msgstr "URI kemana respon akan dibuat."
+
+#: ../webkit/webkitnetworkresponse.cpp:149
+msgid "The SoupMessage that backs the response."
+msgstr "SoupMessage yang mendukung respon."
+
+#: ../webkit/webkitsecurityorigin.cpp:151
+msgid "Protocol"
+msgstr "Protokol"
+
+#: ../webkit/webkitsecurityorigin.cpp:152
+msgid "The protocol of the security origin"
+msgstr "Protokol dari asal keamanan"
+
+#: ../webkit/webkitsecurityorigin.cpp:165
+msgid "Host"
+msgstr "Host"
+
+#: ../webkit/webkitsecurityorigin.cpp:166
+msgid "The host of the security origin"
+msgstr "Host dari asal keamanan"
+
+#: ../webkit/webkitsecurityorigin.cpp:179
+msgid "Port"
+msgstr "Port"
+
+#: ../webkit/webkitsecurityorigin.cpp:180
+msgid "The port of the security origin"
+msgstr "Port dari asal keamanan"
+
+#: ../webkit/webkitsecurityorigin.cpp:193
+msgid "Web Database Usage"
+msgstr "Penggunaan Basis Data Web"
+
+#: ../webkit/webkitsecurityorigin.cpp:194
+msgid "The cumulative size of all web databases in the security origin"
+msgstr "Ukuran kumulatif dari semua basis data web dalam asal keamanan"
+
+#: ../webkit/webkitsecurityorigin.cpp:206
+msgid "Web Database Quota"
+msgstr "Kuota Basis Data Web"
+
+#: ../webkit/webkitsecurityorigin.cpp:207
+msgid "The web database quota of the security origin in bytes"
+msgstr "Kuota basis data web dari asal keamanan dalam byte"
+
+#: ../webkit/webkitsoupauthdialog.c:251
#, c-format
msgid "A username and password are being requested by the site %s"
msgstr "Suatu nama pengguna dan kata sandi sedang diminta oleh situs %s"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278
+#: ../webkit/webkitsoupauthdialog.c:281
msgid "Server message:"
msgstr "Pesan server:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291
+#: ../webkit/webkitsoupauthdialog.c:294
msgid "Username:"
msgstr "Nama Pengguna:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293
+#: ../webkit/webkitsoupauthdialog.c:296
msgid "Password:"
msgstr "Kata Sandi:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302
+#: ../webkit/webkitsoupauthdialog.c:305
msgid "_Remember password"
msgstr "Ingat _sandi"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:298
+#: ../webkit/webkitwebdatabase.cpp:176
+msgid "Security Origin"
+msgstr "Asal Keamanan"
+
+#: ../webkit/webkitwebdatabase.cpp:177
+msgid "The security origin of the database"
+msgstr "Asal keamanan dari basis data"
+
+#: ../webkit/webkitwebdatabase.cpp:190 ../webkit/webkitwebframe.cpp:301
msgid "Name"
msgstr "Nama"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:299
+#: ../webkit/webkitwebdatabase.cpp:191
+msgid "The name of the Web Database database"
+msgstr "Nama dari basis data Basis Data Web"
+
+#: ../webkit/webkitwebdatabase.cpp:204
+msgid "Display Name"
+msgstr "Nama Tampilan"
+
+#: ../webkit/webkitwebdatabase.cpp:205
+msgid "The display name of the Web Storage database"
+msgstr "Nama tampilan dari basis data Penyimpanan Web"
+
+#: ../webkit/webkitwebdatabase.cpp:218
+msgid "Expected Size"
+msgstr "Ukuran Diharapkan"
+
+#: ../webkit/webkitwebdatabase.cpp:219
+msgid "The expected size of the Web Database database"
+msgstr "Ukuran yang diharapkan dari basis data Basis Data Web"
+
+#: ../webkit/webkitwebdatabase.cpp:231
+msgid "Size"
+msgstr "Ukuran"
+
+#: ../webkit/webkitwebdatabase.cpp:232
+msgid "The current size of the Web Database database"
+msgstr "Ukuran kini dari basis data Basis Data Web"
+
+#: ../webkit/webkitwebdatabase.cpp:244
+msgid "Filename"
+msgstr "Nama berkas"
+
+#: ../webkit/webkitwebdatabase.cpp:245
+msgid "The absolute filename of the Web Storage database"
+msgstr "Nama berkas absolut dari basis data Penyimpanan Web"
+
+#: ../webkit/webkitwebframe.cpp:302
msgid "The name of the frame"
msgstr "Nama rangka"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:305
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146
-#: WebKit/gtk/webkit/webkitwebview.cpp:2318
+#: ../webkit/webkitwebframe.cpp:308 ../webkit/webkitwebhistoryitem.cpp:146
+#: ../webkit/webkitwebview.cpp:2589
msgid "Title"
msgstr "Judul"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:306
+#: ../webkit/webkitwebframe.cpp:309
msgid "The document title of the frame"
msgstr "Judul dokumen dari rangka"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:312
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178
-#: WebKit/gtk/webkit/webkitwebview.cpp:2332
-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 "URI kini dari isi yang ditampilkan oleh rangka"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:344
+#: ../webkit/webkitwebframe.cpp:347
msgid "Horizontal Scrollbar Policy"
msgstr "Kebijakan Penggulungan Horisontal"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:345
+#: ../webkit/webkitwebframe.cpp:348
msgid ""
"Determines the current policy for the horizontal scrollbar of the frame."
msgstr ""
"Menentukan kebijakan kini bagi bilah penggulung horisontal dari bingkai. "
-#: WebKit/gtk/webkit/webkitwebframe.cpp:362
+#: ../webkit/webkitwebframe.cpp:365
msgid "Vertical Scrollbar Policy"
msgstr "Kebijakan Penggulungan Vertikal"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:363
+#: ../webkit/webkitwebframe.cpp:366
msgid "Determines the current policy for the vertical scrollbar of the frame."
msgstr ""
"Menentukan kebijakan kini bagi bilah penggulung horisontal dari bingkai."
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147
+#: ../webkit/webkitwebhistoryitem.cpp:147
msgid "The title of the history item"
msgstr "Judul butir riwayat"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162
+#: ../webkit/webkitwebhistoryitem.cpp:162
msgid "Alternate Title"
msgstr "Judul Alternatif"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163
+#: ../webkit/webkitwebhistoryitem.cpp:163
msgid "The alternate title of the history item"
msgstr "Judul alternatif dari butir riwayat"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179
+#: ../webkit/webkitwebhistoryitem.cpp:179
msgid "The URI of the history item"
msgstr "URI dari butir riwayat"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173
+#: ../webkit/webkitwebhistoryitem.cpp:194
+#: ../webkit/webkitwebnavigationaction.cpp:173
msgid "Original URI"
msgstr "URI Asli"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195
+#: ../webkit/webkitwebhistoryitem.cpp:195
msgid "The original URI of the history item"
msgstr "URI asli dari butir riwayat"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210
+#: ../webkit/webkitwebhistoryitem.cpp:210
msgid "Last visited Time"
msgstr "Waktu kunjungan terakhir"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211
+#: ../webkit/webkitwebhistoryitem.cpp:211
msgid "The time at which the history item was last visited"
msgstr "Waktu saat butir riwayat terakhir kali dikunjungi"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:268
+#: ../webkit/webkitwebinspector.cpp:269
msgid "Web View"
msgstr "Tilikan Web"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:269
+#: ../webkit/webkitwebinspector.cpp:270
msgid "The Web View that renders the Web Inspector itself"
msgstr "Tilikan Web yang merender Pemeriksa Web itu sendiri"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:282
+#: ../webkit/webkitwebinspector.cpp:283
msgid "Inspected URI"
msgstr "URI yang diperiksa"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:283
+#: ../webkit/webkitwebinspector.cpp:284
msgid "The URI that is currently being inspected"
msgstr "URI yang kini sedang diperiksa"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:299
+#: ../webkit/webkitwebinspector.cpp:300
msgid "Enable JavaScript profiling"
msgstr "Aktifkan pemrofilan JavaScript"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:300
+#: ../webkit/webkitwebinspector.cpp:301
msgid "Profile the executed JavaScript."
msgstr "Profilkan JavaScript yang dieksekusi."
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:315
+#: ../webkit/webkitwebinspector.cpp:316
msgid "Enable Timeline profiling"
msgstr "Aktifkan pemrofilan Timeline"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:316
+#: ../webkit/webkitwebinspector.cpp:317
msgid "Profile the WebCore instrumentation."
msgstr "Profilkan instrumentasi WebCore."
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158
+#: ../webkit/webkitwebnavigationaction.cpp:158
msgid "Reason"
msgstr "Alasan"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159
+#: ../webkit/webkitwebnavigationaction.cpp:159
msgid "The reason why this navigation is occurring"
msgstr "Alasan kenapa navigasi ini terjadi"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174
+#: ../webkit/webkitwebnavigationaction.cpp:174
msgid "The URI that was requested as the target for the navigation"
msgstr "URI yang diminta sebagai target navigasi"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188
+#: ../webkit/webkitwebnavigationaction.cpp:188
msgid "Button"
msgstr "Tombol"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189
+#: ../webkit/webkitwebnavigationaction.cpp:189
msgid "The button used to click"
msgstr "Tombol yang dipakai untuk mengklik"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204
+#: ../webkit/webkitwebnavigationaction.cpp:204
msgid "Modifier state"
msgstr "Keadaan perubah"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205
+#: ../webkit/webkitwebnavigationaction.cpp:205
msgid "A bitmask representing the state of the modifier keys"
msgstr "Suatu bitmask yang mewakili keadaan dari kunci pengubah"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220
+#: ../webkit/webkitwebnavigationaction.cpp:220
msgid "Target frame"
msgstr "Bingkai target"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221
+#: ../webkit/webkitwebnavigationaction.cpp:221
msgid "The target frame for the navigation"
msgstr "Bingkai target bagi navigasi"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:237
+#: ../webkit/webkitwebresource.cpp:127
+msgid "The uri of the resource"
+msgstr "URI dari sumber daya"
+
+#: ../webkit/webkitwebresource.cpp:141
+msgid "MIME Type"
+msgstr "Jenis MIME"
+
+#: ../webkit/webkitwebresource.cpp:142
+msgid "The MIME type of the resource"
+msgstr "Jenis MIME dari sumber daya"
+
+#: ../webkit/webkitwebresource.cpp:156 ../webkit/webkitwebview.cpp:2724
+msgid "Encoding"
+msgstr "Pengkodean"
+
+#: ../webkit/webkitwebresource.cpp:157
+msgid "The text encoding name of the resource"
+msgstr "Nama pengkodean teks dari sumber daya"
+
+#: ../webkit/webkitwebresource.cpp:172
+msgid "Frame Name"
+msgstr "Nama Rangka"
+
+#: ../webkit/webkitwebresource.cpp:173
+msgid "The frame name of the resource"
+msgstr "Nama rangka dari sumber daya"
+
+#: ../webkit/webkitwebsettings.cpp:247
msgid "Default Encoding"
msgstr "Pengkodean Bawaan"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:238
+#: ../webkit/webkitwebsettings.cpp:248
msgid "The default encoding used to display text."
msgstr "Pengkodean bawaan yang dipakai untuk menampilkan teks."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:246
+#: ../webkit/webkitwebsettings.cpp:256
msgid "Cursive Font Family"
msgstr "Keluarga Fonta Cursive"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:247
+#: ../webkit/webkitwebsettings.cpp:257
msgid "The default Cursive font family used to display text."
msgstr "Keluarga fonta Cursive bawaan yang dipakai untuk menampilkan teks."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:255
+#: ../webkit/webkitwebsettings.cpp:265
msgid "Default Font Family"
msgstr "Keluarga Fonta Bawaan"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:256
+#: ../webkit/webkitwebsettings.cpp:266
msgid "The default font family used to display text."
msgstr "Keluarga fonta bawaan yang dipakai untuk menampilkan teks."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:264
+#: ../webkit/webkitwebsettings.cpp:274
msgid "Fantasy Font Family"
msgstr "Keluarga Fonta Fantasy"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:265
+#: ../webkit/webkitwebsettings.cpp:275
msgid "The default Fantasy font family used to display text."
msgstr "Keluarga fonta Fantasy bawaan yang dipakai untuk menampilkan teks."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:273
+#: ../webkit/webkitwebsettings.cpp:283
msgid "Monospace Font Family"
msgstr "Keluarga Fonta Monospace"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:274
+#: ../webkit/webkitwebsettings.cpp:284
msgid "The default font family used to display monospace text."
msgstr ""
"Keluarga fonta bawaan yang dipakai untuk menampilkan teks lebar-seragam."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:282
+#: ../webkit/webkitwebsettings.cpp:292
msgid "Sans Serif Font Family"
msgstr "Keluarga Fonta Sans Serif"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:283
+#: ../webkit/webkitwebsettings.cpp:293
msgid "The default Sans Serif font family used to display text."
msgstr "Keluarga fonta Sans Serif bawaan yang dipakai untuk menampilkan teks."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:291
+#: ../webkit/webkitwebsettings.cpp:301
msgid "Serif Font Family"
msgstr "Keluarga Fonta Serif"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:292
+#: ../webkit/webkitwebsettings.cpp:302
msgid "The default Serif font family used to display text."
msgstr "Keluarga fonta Serif bawaan yang dipakai untuk menampilkan teks."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:300
+#: ../webkit/webkitwebsettings.cpp:310
msgid "Default Font Size"
msgstr "Ukuran Fonta Bawaan"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:301
+#: ../webkit/webkitwebsettings.cpp:311
msgid "The default font size used to display text."
msgstr "Ukuran fonta bawaan yang dipakai untuk menampilkan teks."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:309
+#: ../webkit/webkitwebsettings.cpp:319
msgid "Default Monospace Font Size"
msgstr "Ukuran Fonta Lebar-Seragam Bawaan"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:310
+#: ../webkit/webkitwebsettings.cpp:320
msgid "The default font size used to display monospace text."
msgstr "Ukuran fonta bawaan yang dipakai untuk menampilkan teks lebar-seragam."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:318
+#: ../webkit/webkitwebsettings.cpp:328
msgid "Minimum Font Size"
msgstr "Ukuran Fonta Minimum"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:319
+#: ../webkit/webkitwebsettings.cpp:329
msgid "The minimum font size used to display text."
msgstr "Ukuran fonta minimum yang dipakai untuk menampilkan teks."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:327
+#: ../webkit/webkitwebsettings.cpp:337
msgid "Minimum Logical Font Size"
msgstr "Ukuran Fonta Lojik Minimum"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:328
+#: ../webkit/webkitwebsettings.cpp:338
msgid "The minimum logical font size used to display text."
msgstr "Ukuran fonta lojik minimum yang dipakai untuk menampilkan teks."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:347
+#: ../webkit/webkitwebsettings.cpp:357
msgid "Enforce 96 DPI"
msgstr "Paksakan 96 DPI"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:348
+#: ../webkit/webkitwebsettings.cpp:358
msgid "Enforce a resolution of 96 DPI"
msgstr "Paksakan resolusi 96 DPI"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:356
+#: ../webkit/webkitwebsettings.cpp:366
msgid "Auto Load Images"
msgstr "Muat Otomatis Gambar"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:357
+#: ../webkit/webkitwebsettings.cpp:367
msgid "Load images automatically."
msgstr "Muat gambar secara otomatis."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:365
+#: ../webkit/webkitwebsettings.cpp:375
msgid "Auto Shrink Images"
msgstr "Perkecil Gambar Otomatis"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:366
+#: ../webkit/webkitwebsettings.cpp:376
msgid "Automatically shrink standalone images to fit."
msgstr "Otomatis memperkecil gambar agar pas."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:374
+#: ../webkit/webkitwebsettings.cpp:384
msgid "Print Backgrounds"
msgstr "Cetak Latar"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:375
+#: ../webkit/webkitwebsettings.cpp:385
msgid "Whether background images should be printed."
msgstr "Apakah gambar latar mesti dicetak."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:383
+#: ../webkit/webkitwebsettings.cpp:393
msgid "Enable Scripts"
msgstr "Aktifkan Skrip"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:384
+#: ../webkit/webkitwebsettings.cpp:394
msgid "Enable embedded scripting languages."
msgstr "Aktifkan bahasa skrip tertempel."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:392
+#: ../webkit/webkitwebsettings.cpp:402
msgid "Enable Plugins"
msgstr "Aktifkan Pengaya"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:393
+#: ../webkit/webkitwebsettings.cpp:403
msgid "Enable embedded plugin objects."
msgstr "Aktifkan objek pengaya tertempel."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:401
+#: ../webkit/webkitwebsettings.cpp:411
msgid "Resizable Text Areas"
msgstr "Wilayah Teks Yang Dapat Diubah Ukurannya"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:402
+#: ../webkit/webkitwebsettings.cpp:412
msgid "Whether text areas are resizable."
msgstr "Apakah wilayah teks dapat diubah ukurannya."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:409
+#: ../webkit/webkitwebsettings.cpp:419
msgid "User Stylesheet URI"
msgstr "URI Stylesheet Pengguna"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:410
+#: ../webkit/webkitwebsettings.cpp:420
msgid "The URI of a stylesheet that is applied to every page."
msgstr "URI dari stylesheet yang diterapkan pada setiap halaman."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:425
+#: ../webkit/webkitwebsettings.cpp:435
msgid "Zoom Stepping Value"
msgstr "Nilai Langkah Zum"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:426
+#: ../webkit/webkitwebsettings.cpp:436
msgid "The value by which the zoom level is changed when zooming in or out."
msgstr "Nilai perubahan aras zum ketika memperbesar atau memperkecil."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:444
+#: ../webkit/webkitwebsettings.cpp:454
msgid "Enable Developer Extras"
msgstr "Aktifkan Tambahan Bagi Pengembang"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:445
+#: ../webkit/webkitwebsettings.cpp:455
msgid "Enables special extensions that help developers"
msgstr "Aktifkan perluasan khusus untuk membantu para pengembang"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:465
+#: ../webkit/webkitwebsettings.cpp:475
msgid "Enable Private Browsing"
msgstr "Aktifkan Penjelajahan Privat"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:466
+#: ../webkit/webkitwebsettings.cpp:476
msgid "Enables private browsing mode"
msgstr "Aktifkan mode penjelajahan privat"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:481
+#: ../webkit/webkitwebsettings.cpp:491
msgid "Enable Spell Checking"
msgstr "Aktifkan Pemeriksaan Ejaan"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:482
+#: ../webkit/webkitwebsettings.cpp:492
msgid "Enables spell checking while typing"
msgstr "Aktifkan pemeriksaan ejaan ketika mengetik"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:505
+#: ../webkit/webkitwebsettings.cpp:515
msgid "Languages to use for spell checking"
msgstr "Bahasa yang dipakai untuk memeriksa ejaan"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:506
+#: ../webkit/webkitwebsettings.cpp:516
msgid "Comma separated list of languages to use for spell checking"
msgstr "Daftar bahasa, dipisah dengan koma, yang dipakai untuk memeriksa ejaan"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:520
+#: ../webkit/webkitwebsettings.cpp:530
msgid "Enable Caret Browsing"
msgstr "Aktifkan Perambanan Caret"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:521
-msgid "Whether to enable accesibility enhanced keyboard navigation"
+#: ../webkit/webkitwebsettings.cpp:531
+msgid "Whether to enable accessibility enhanced keyboard navigation"
msgstr "Apakah mengaktifkan navigasi papan tik bagi aksesabilitas"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:536
+#: ../webkit/webkitwebsettings.cpp:546
msgid "Enable HTML5 Database"
msgstr "Aktifkan Basis Data HTML5"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:537
+#: ../webkit/webkitwebsettings.cpp:547
msgid "Whether to enable HTML5 database support"
msgstr "Apakah mengaktifkan dukungan basis data HTML5"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:552
+#: ../webkit/webkitwebsettings.cpp:562
msgid "Enable HTML5 Local Storage"
msgstr "Aktifkan Penyimpanan Lokal HTML5"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:553
+#: ../webkit/webkitwebsettings.cpp:563
msgid "Whether to enable HTML5 Local Storage support"
msgstr "Apakah mengaktifkan dukungan Penyimpanan Lokal HTML5"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:567
+#: ../webkit/webkitwebsettings.cpp:577
msgid "Enable XSS Auditor"
msgstr "Aktifkan Auditor XSS"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:568
-msgid "Whether to enable teh XSS auditor"
+#: ../webkit/webkitwebsettings.cpp:578
+msgid "Whether to enable the XSS auditor"
msgstr "Apakah auditor XSS diaktifkan"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:586
+#: ../webkit/webkitwebsettings.cpp:596
+msgid "Enable Spatial Navigation"
+msgstr "Aktifkan Navigasi Spasial"
+
+#: ../webkit/webkitwebsettings.cpp:597
+msgid "Whether to enable Spatial Navigation"
+msgstr "Apakah mengaktifkan Navigasi Spasial"
+
+#: ../webkit/webkitwebsettings.cpp:614
msgid "User Agent"
msgstr "User Agent"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:587
+#: ../webkit/webkitwebsettings.cpp:615
msgid "The User-Agent string used by WebKitGtk"
msgstr "String User-Agent yang dipakai oleh WebKitGtk"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:602
+#: ../webkit/webkitwebsettings.cpp:630
msgid "JavaScript can open windows automatically"
msgstr "JavaScript dapat otomatis membuka jendela"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:603
+#: ../webkit/webkitwebsettings.cpp:631
msgid "Whether JavaScript can open windows automatically"
msgstr "Apakah JavaScript dapat otomatis membuka jendela"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:618
+#: ../webkit/webkitwebsettings.cpp:645
+msgid "JavaScript can access Clipboard"
+msgstr "JavaScript dapat mengakses Papan Klip"
+
+#: ../webkit/webkitwebsettings.cpp:646
+msgid "Whether JavaScript can access Clipboard"
+msgstr "Apakah JavaScript dapat mengakses Papan Klip"
+
+#: ../webkit/webkitwebsettings.cpp:662
msgid "Enable offline web application cache"
msgstr "Aktifkan singgahan aplikasi web luring"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:619
+#: ../webkit/webkitwebsettings.cpp:663
msgid "Whether to enable offline web application cache"
msgstr "Apakah mengaktifkan singgahan aplikasi web luring"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:646
+#: ../webkit/webkitwebsettings.cpp:690
msgid "Editing behavior"
msgstr "Perilaku penyuntingan"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:647
+#: ../webkit/webkitwebsettings.cpp:691
msgid "The behavior mode to use in editing mode"
msgstr "Mode perilaku yang dipakai pada mode penyuntingan"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:663
+#: ../webkit/webkitwebsettings.cpp:707
msgid "Enable universal access from file URIs"
msgstr "Aktifkan akses universal dari URI berkas"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:664
+#: ../webkit/webkitwebsettings.cpp:708
msgid "Whether to allow universal access from file URIs"
msgstr "Apakah mengaktifkan akses universal dari URI berkas"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:679
+#: ../webkit/webkitwebsettings.cpp:723
msgid "Enable DOM paste"
msgstr "Aktifkan tempel DOM"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:680
+#: ../webkit/webkitwebsettings.cpp:724
msgid "Whether to enable DOM paste"
msgstr "Apakah mengaktifkan penempelan DOM"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:698
+#: ../webkit/webkitwebsettings.cpp:742
msgid "Tab key cycles through elements"
msgstr "Kunci tab menggilir antar elemen"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:699
+#: ../webkit/webkitwebsettings.cpp:743
msgid "Whether the tab key cycles through elements on the page."
msgstr "Apakah kunci tab menggilir antar elemen pada halaman itu."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:719
+#: ../webkit/webkitwebsettings.cpp:763
msgid "Enable Default Context Menu"
msgstr "Aktifkan Menu Konteks Bawaan"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:720
+#: ../webkit/webkitwebsettings.cpp:764
msgid ""
"Enables the handling of right-clicks for the creation of the default context "
"menu"
msgstr "Mengaktifkan penanganan klik kanan untuk pembuatan menu konteks bawaan"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:740
+#: ../webkit/webkitwebsettings.cpp:784
msgid "Enable Site Specific Quirks"
msgstr "Aktifkan Perilaku Khusus Situs"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:741
+#: ../webkit/webkitwebsettings.cpp:785
msgid "Enables the site-specific compatibility workarounds"
msgstr "Aktifkan pengakalan kompatibilitas spesifik situs"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:763
+#: ../webkit/webkitwebsettings.cpp:807
msgid "Enable page cache"
msgstr "Aktifkan singgahan halaman"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:764
+#: ../webkit/webkitwebsettings.cpp:808
msgid "Whether the page cache should be used"
msgstr "Apakah mengaktifkan singgahan halaman"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:784
+#: ../webkit/webkitwebsettings.cpp:828
msgid "Auto Resize Window"
msgstr "Otomatis Ubah Ukuran Jendela"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:785
+#: ../webkit/webkitwebsettings.cpp:829
msgid "Automatically resize the toplevel window when a page requests it"
msgstr ""
"Otomatis ubah ukuran jendela aras puncak ketika suatu halaman memintanya"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:817
+#: ../webkit/webkitwebsettings.cpp:861
msgid "Enable Java Applet"
msgstr "Aktifkan Aplet Java"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:818
+#: ../webkit/webkitwebsettings.cpp:862
msgid "Whether Java Applet support through <applet> should be enabled"
msgstr "Apakah dukungan Aplet Java melalui <applet> mesti diaktifkan"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2319
+#: ../webkit/webkitwebview.cpp:2590
msgid "Returns the @web_view's document title"
msgstr "Mengembalikan judul dokumen @web_view"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2333
+#: ../webkit/webkitwebview.cpp:2604
msgid "Returns the current URI of the contents displayed by the @web_view"
msgstr "Mengembalikan URI kini dari isi yang ditampilkan oleh @web_view"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2346
+#: ../webkit/webkitwebview.cpp:2617
msgid "Copy target list"
msgstr "Daftar target salin"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2347
+#: ../webkit/webkitwebview.cpp:2618
msgid "The list of targets this web view supports for clipboard copying"
msgstr "Daftar target yang didukung tilikan web ini bagi penyalinan clipboard"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2360
+#: ../webkit/webkitwebview.cpp:2631
msgid "Paste target list"
msgstr "Daftar target tempel"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2361
+#: ../webkit/webkitwebview.cpp:2632
msgid "The list of targets this web view supports for clipboard pasting"
msgstr "Daftar target yang didukung tilikan web ini bagi penempelan clipboard"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2367
+#: ../webkit/webkitwebview.cpp:2638
msgid "Settings"
msgstr "Tatanan"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2368
+#: ../webkit/webkitwebview.cpp:2639
msgid "An associated WebKitWebSettings instance"
msgstr "Instansi WebKitWebSettings yang terkait"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2381
+#: ../webkit/webkitwebview.cpp:2652
msgid "Web Inspector"
msgstr "Pemeriksa Web"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2382
+#: ../webkit/webkitwebview.cpp:2653
msgid "The associated WebKitWebInspector instance"
msgstr "Instansi WebKitWebInspector yang terkait"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2402
+#: ../webkit/webkitwebview.cpp:2673
msgid "Editable"
msgstr "Dapat diedit"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2403
+#: ../webkit/webkitwebview.cpp:2674
msgid "Whether content can be modified by the user"
msgstr "Apakah isi dapat diubah oleh pengguna"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2409
+#: ../webkit/webkitwebview.cpp:2680
msgid "Transparent"
msgstr "Transparan"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2410
+#: ../webkit/webkitwebview.cpp:2681
msgid "Whether content has a transparent background"
msgstr "Apakah isi memiliki latar transparan"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2423
+#: ../webkit/webkitwebview.cpp:2694
msgid "Zoom level"
msgstr "Tingkat zum"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2424
+#: ../webkit/webkitwebview.cpp:2695
msgid "The level of zoom of the content"
msgstr "Aras zum dari isi"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2439
+#: ../webkit/webkitwebview.cpp:2710
msgid "Full content zoom"
msgstr "Zum seluruh isi"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2440
+#: ../webkit/webkitwebview.cpp:2711
msgid "Whether the full content is scaled when zooming"
msgstr "Apakah seluruh isi diskalakan ketika dizum"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2453
-msgid "Encoding"
-msgstr "Pengkodean"
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2454
+#: ../webkit/webkitwebview.cpp:2725
msgid "The default encoding of the web view"
msgstr "Pengkodean bawaan dari tilikan web"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2467
+#: ../webkit/webkitwebview.cpp:2738
msgid "Custom Encoding"
msgstr "Pengkodean Gubahan"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2468
+#: ../webkit/webkitwebview.cpp:2739
msgid "The custom encoding of the web view"
msgstr "Pengkodean gubahan dari tilikan web"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2520
+#: ../webkit/webkitwebview.cpp:2791
msgid "Icon URI"
msgstr "URI Ikon"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2521
+#: ../webkit/webkitwebview.cpp:2792
msgid "The URI for the favicon for the #WebKitWebView."
msgstr "URI bagi favicon bagi #WebKitWebView."
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:56
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:61
msgid "Submit"
msgstr "Kirim"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:66
msgid "Reset"
msgstr "Reset"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:71
msgid "This is a searchable index. Enter search keywords: "
msgstr "Ini adalah indeks yang dapat dicari. Masukkan kata kunci pencarian:"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:76
msgid "Choose File"
msgstr "Pilih Berkas"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:81
msgid "(None)"
msgstr "(Tidak ada)"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:86
msgid "Open Link in New _Window"
msgstr "Buka Taut di _Jendela Baru"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:91
msgid "_Download Linked File"
msgstr "Un_duh Berkas Tertaut"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:96
msgid "Copy Link Loc_ation"
msgstr "Salin Lokasi T_aut"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:101
msgid "Open _Image in New Window"
msgstr "Buka Gambar d_i Jendela Baru"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:106
msgid "Sa_ve Image As"
msgstr "Sim_pan Gambar Sebagai"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:111
msgid "Cop_y Image"
msgstr "Sal_in Gambar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:116
+msgid "Open _Video in New Window"
+msgstr "Buka _Video pada Jendela Baru"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:121
+msgid "Open _Audio in New Window"
+msgstr "Buka Suar_a pada Jendela Baru"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:126
+msgid "Cop_y Video Link Location"
+msgstr "Salin Lokasi T_aut Video"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:131
+msgid "Cop_y Audio Link Location"
+msgstr "Salin Lokasi T_aut Suara"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:136
+msgid "_Toggle Media Controls"
+msgstr "Jungki_tkan Kendali Media"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:141
+msgid "Toggle Media _Loop Playback"
+msgstr "Jungkitkan Pengu_langan Memutar Media"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:146
+msgid "Switch Video to _Fullscreen"
+msgstr "Tukar Video ke Mode Layar _Penuh"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:151
+msgid "_Play"
+msgstr "_Putar"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:156
+msgid "_Pause"
+msgstr "_Jeda"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:161
+msgid "_Mute"
+msgstr "_Senyap"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
msgid "Open _Frame in New Window"
msgstr "Buka _Frame di Jendela Baru"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:217
msgid "_Reload"
msgstr "_Muat Ulang"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:234
msgid "No Guesses Found"
msgstr "Tebakan Tak Ditemukan"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:239
msgid "_Ignore Spelling"
msgstr "Aba_ikan Ejaan"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:244
msgid "_Learn Spelling"
msgstr "Pe_lajari Ejaan"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:249
msgid "_Search the Web"
msgstr "_Cari Web"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:254
msgid "_Look Up in Dictionary"
msgstr "_Lihat Di Kamus"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:259
msgid "_Open Link"
msgstr "_Buka Taut"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:264
msgid "Ignore _Grammar"
msgstr "Abaikan Tata _Bahasa"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:269
msgid "Spelling and _Grammar"
msgstr "Ejaan dan Tata _Bahasa"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:274
msgid "_Show Spelling and Grammar"
msgstr "Tampilkan Ejaan dan Tata Baha_sa"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:274
msgid "_Hide Spelling and Grammar"
msgstr "Sembunyikan Ejaan dan Tata Ba_hasa"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:279
msgid "_Check Document Now"
msgstr "Periksa Do_kumen Sekarang"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:284
msgid "Check Spelling While _Typing"
msgstr "Periksa Ejaan Ketika Menge_tik"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:289
msgid "Check _Grammar With Spelling"
msgstr "Periksa Tata _Bahasa Bersama Dengan Ejaan"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:294
msgid "_Font"
msgstr "_Fonta"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:317
msgid "_Outline"
msgstr "_Outline"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:322
msgid "Inspect _Element"
msgstr "Periksa _Elemen"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:327
msgid "No recent searches"
msgstr "Tak ada pencarian terkini"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:332
msgid "Recent searches"
msgstr "Pencarian terkini"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:337
msgid "_Clear recent searches"
msgstr "_Bersihkan pencarian terkini"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
msgid "term"
msgstr "istilah"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
msgid "definition"
msgstr "definisi"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:352
msgid "press"
msgstr "tekan"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:357
msgid "select"
msgstr "pilih"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:362
msgid "activate"
msgstr "aktifkan"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:367
msgid "uncheck"
msgstr "hapus contreng"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:372
msgid "check"
msgstr "contreng"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
msgid "jump"
msgstr "lompat"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:392
+msgid "Missing Plug-in"
+msgstr "Kehilangan Plug-in"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:398
+msgid "Plug-in Failure"
+msgstr "Kegagalan 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:404
msgid " files"
msgstr " berkas"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
msgid "Unknown"
msgstr "Tidak dikenal"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:414
+#, c-format
+msgctxt "Title string for images"
+msgid "%s (%dx%d pixels)"
+msgstr "%s (%dx%d piksel)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
msgid "Loading..."
msgstr "Sedang memuat..."
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:431
msgid "Live Broadcast"
msgstr "Siaran Langsung"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:437
msgid "audio element controller"
msgstr "pengendali elemen audio"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:439
msgid "video element controller"
msgstr "pengendali elemen video"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:441
msgid "mute"
msgstr "senyap"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:443
msgid "unmute"
msgstr "usai senyap"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:445
msgid "play"
msgstr "putar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:447
msgid "pause"
msgstr "jeda"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:449
msgid "movie time"
msgstr "waktu film"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:451
msgid "timeline slider thumb"
msgstr "jempol penggeser waktu"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:453
msgid "back 30 seconds"
msgstr "mundur 30 detik"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:455
msgid "return to realtime"
msgstr "kembali ke waktu nyata"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:457
msgid "elapsed time"
msgstr "waktu berjalan"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:459
msgid "remaining time"
msgstr "sisa waktu"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
msgid "status"
msgstr "status"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:463
msgid "fullscreen"
msgstr "layar penuh"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:465
msgid "fast forward"
msgstr "maju cepat"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:467
msgid "fast reverse"
msgstr "mundur cepat"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:469
msgid "show closed captions"
msgstr "tampilkan takarir gambar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:471
msgid "hide closed captions"
msgstr "sembunyikan takarir gambar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:480
msgid "audio element playback controls and status display"
msgstr "tampilan status dan kendali main ulang elemen suara"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:482
msgid "video element playback controls and status display"
msgstr "tampilan status dan kendali main ulang elemen video"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:484
msgid "mute audio tracks"
msgstr "bisukan trek suara"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:486
msgid "unmute audio tracks"
msgstr "bunyikan trek suara"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:488
msgid "begin playback"
msgstr "mulai memutar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:490
msgid "pause playback"
msgstr "jeda memutar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:492
msgid "movie time scrubber"
msgstr "pembersih waktu film"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:494
msgid "movie time scrubber thumb"
msgstr "jempol pembersih waktu film"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:496
msgid "seek movie back 30 seconds"
msgstr "seem film mundur 30 detik"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:498
msgid "return streaming movie to real time"
msgstr "kembalikan film mengalir ke waktu nyata"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:500
msgid "current movie time in seconds"
msgstr "waktu film kini dalam detik"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
msgid "number of seconds of movie remaining"
msgstr "cacah detik sisa film"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:504
msgid "current movie status"
msgstr "status film kini"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:506
msgid "seek quickly back"
msgstr "seek mundur cepat"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:508
msgid "seek quickly forward"
msgstr "seek maju cepat"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:510
msgid "Play movie in fullscreen mode"
msgstr "Mainkan film pada mode layar penuh"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
msgid "start displaying closed captions"
msgstr "mulai tampilkan takarir gambar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:514
msgid "stop displaying closed captions"
msgstr "tak tampilkan lagi takarir gambar"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:523
msgid "indefinite time"
msgstr "waktu tak tentu"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:553
msgid "value missing"
msgstr "nilai hilang"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:559
msgid "type mismatch"
msgstr "jenis tak cocok"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:564
msgid "pattern mismatch"
msgstr "pola tak cocok"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:569
msgid "too long"
msgstr "terlalu panjang"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:574
msgid "range underflow"
msgstr "limpah bawah rentang"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:579
msgid "range overflow"
msgstr "limpah atas rentang"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:584
msgid "step mismatch"
msgstr "langkah tak cocok"
diff --git a/Source/WebKit/gtk/po/mr.po b/Source/WebKit/gtk/po/mr.po
new file mode 100644
index 000000000..2552ef0e5
--- /dev/null
+++ b/Source/WebKit/gtk/po/mr.po
@@ -0,0 +1,1417 @@
+# translation of webkit.HEAD.mr.po to Marathi
+# Marathi translations for PACKAGE package.
+# This file is put in the public domain.
+#
+# Sandeep Shedmake <sshedmak@redhat.com>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: webkit.HEAD.mr\n"
+"Report-Msgid-Bugs-To: http://bugs.webkit.org\n"
+"POT-Creation-Date: 2010-12-27 15:26+0000\n"
+"PO-Revision-Date: 2012-03-22 16:38+0530\n"
+"Last-Translator: Sandeep Shedmake <sshedmak@redhat.com>\n"
+"Language-Team: Marathi <kde-i18n-doc@kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: mr\n"
+"X-Generator: Lokalize 1.2\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: ../WebCoreSupport/ChromeClientGtk.cpp:589
+msgid "Upload File"
+msgstr "फाइल अपलोड करा"
+
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:63
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:194
+msgid "Input _Methods"
+msgstr "इंपुट पद्धती (_M)"
+
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:80
+msgid "LRM _Left-to-right mark"
+msgstr "LRM डावे-ते-उजवे चिन्ह (_L)"
+
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:81
+msgid "RLM _Right-to-left mark"
+msgstr "RLM उजवे-ते-डावे चिन्ह (_R)"
+
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:82
+msgid "LRE Left-to-right _embedding"
+msgstr "LRE डावे-ते-उजवे एम्बेडिंग (_e)"
+
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:83
+msgid "RLE Right-to-left e_mbedding"
+msgstr "RLE उजवे-ते-डावे एम्बेडिंग (_m)"
+
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:84
+msgid "LRO Left-to-right _override"
+msgstr "LRO डावे-ते-उजवे ओव्हरराइड (_o)"
+
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:85
+msgid "RLO Right-to-left o_verride"
+msgstr "RLO उजवे-ते-डावे ओव्हरराइड (_v)"
+
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:86
+msgid "PDF _Pop directional formatting"
+msgstr "PDF पॉप डाइरेक्शनल रूपण (_P)"
+
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:87
+msgid "ZWS _Zero width space"
+msgstr "ZWS झिरो विड्थ् स्पेस् (_Z)"
+
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:88
+msgid "ZWJ Zero width _joiner"
+msgstr "ZWJ झिरो विड्थ् जाइनर (_j)"
+
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:89
+msgid "ZWNJ Zero width _non-joiner"
+msgstr "ZWNJ झिरो विड्थ् नॉन जॉइनर (_n)"
+
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:111
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:189
+msgid "_Insert Unicode Control Character"
+msgstr "युनिकोड कंट्रोल कॅरेक्टर द्या (_I)"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1180
+msgid "Load request cancelled"
+msgstr "लोड विनंती रद्द केली"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1186
+msgid "Not allowed to use restricted network port"
+msgstr "प्रतिबंधित नेटवर्क पोर्टच्या वापरकरीता परवानगी नाही"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1192
+msgid "URL cannot be shown"
+msgstr "URL दाखवणे अशक्य"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1198
+msgid "Frame load was interrupted"
+msgstr "फ्रेम लोडमध्ये व्यत्यय आढळले"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1204
+msgid "Content with the specified MIME type cannot be shown"
+msgstr "ठराविक MIME प्रकारसह कंटेंट दाखवणे अशक्य"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1210
+msgid "File does not exist"
+msgstr "फाइल अस्तित्वात नाही"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1216
+msgid "Plugin will handle load"
+msgstr "प्लगइन लोड हाताळेल"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:385
+msgid "Play"
+msgstr "चालवा"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:387
+msgid "Pause"
+msgstr "थांबा"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:533
+msgid "Play / Pause"
+msgstr "चालवा किंवा थांबवा"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:533
+msgid "Play or pause the media"
+msgstr "मिडीयाला चालवा किंवा थांबवा"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:541
+msgid "Time:"
+msgstr "वेळ:"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:565
+msgid "Exit Fullscreen"
+msgstr "पडदाभरपासून बाहेर पडा"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:565
+msgid "Exit from fullscreen mode"
+msgstr "पडदाभर मोडपासून बाहेर पडा"
+
+#: ../webkit/webkitdownload.cpp:273
+msgid "Network Request"
+msgstr "नेवटवर्क विनंती"
+
+#: ../webkit/webkitdownload.cpp:274
+msgid "The network request for the URI that should be downloaded"
+msgstr "डाऊनलोड करण्याजोगी URI करीता नेटवर्क विनंती"
+
+#: ../webkit/webkitdownload.cpp:288
+msgid "Network Response"
+msgstr "नेटवर्क प्रतिसाद"
+
+#: ../webkit/webkitdownload.cpp:289
+msgid "The network response for the URI that should be downloaded"
+msgstr "डाऊनलोड करण्याजोगी URI करीता नेटवर्क प्रतिसाद"
+
+#: ../webkit/webkitdownload.cpp:303
+msgid "Destination URI"
+msgstr "लक्ष्य URI"
+
+#: ../webkit/webkitdownload.cpp:304
+msgid "The destination URI where to save the file"
+msgstr "फाइल साठवण्याकरीता लक्ष्य URI"
+
+#: ../webkit/webkitdownload.cpp:318
+msgid "Suggested Filename"
+msgstr "सूचवलेले फाइलचेनाव"
+
+#: ../webkit/webkitdownload.cpp:319
+msgid "The filename suggested as default when saving"
+msgstr "साठवतेवेळी पूर्वनिर्धारित सूचवलेले फाइलचे नाव"
+
+#: ../webkit/webkitdownload.cpp:336
+msgid "Progress"
+msgstr "प्रगती"
+
+#: ../webkit/webkitdownload.cpp:337
+msgid "Determines the current progress of the download"
+msgstr "डाऊनलोडची सध्याची प्रगती ओळखतो"
+
+#: ../webkit/webkitdownload.cpp:350
+msgid "Status"
+msgstr "स्थिती"
+
+#: ../webkit/webkitdownload.cpp:351
+msgid "Determines the current status of the download"
+msgstr "डाऊनलोडची सध्याची स्थिती ओळखतो"
+
+#: ../webkit/webkitdownload.cpp:366
+msgid "Current Size"
+msgstr "सध्याचे आकार"
+
+#: ../webkit/webkitdownload.cpp:367
+msgid "The length of the data already downloaded"
+msgstr "आधिपासूनच डाऊनलोड केलेल्या डाटाची लांबी"
+
+#: ../webkit/webkitdownload.cpp:381
+msgid "Total Size"
+msgstr "एकूण आकार"
+
+#: ../webkit/webkitdownload.cpp:382
+msgid "The total size of the file"
+msgstr "फाइलचे एकूण आकार"
+
+#: ../webkit/webkitdownload.cpp:534
+msgid "User cancelled the download"
+msgstr "वापरकर्त्याने डाऊनलोड रद्द केले"
+
+#: ../webkit/webkithittestresult.cpp:156
+msgid "Context"
+msgstr "संदर्भ"
+
+#: ../webkit/webkithittestresult.cpp:157
+msgid "Flags indicating the kind of target that received the event."
+msgstr "लक्ष्यचे प्रकार निर्देशीत करणारे फ्लॅग ज्यास इव्हेंट प्राप्त झाले."
+
+#: ../webkit/webkithittestresult.cpp:171
+msgid "Link URI"
+msgstr "दुवा URI"
+
+#: ../webkit/webkithittestresult.cpp:172
+msgid "The URI to which the target that received the event points, if any."
+msgstr "लक्ष्यकरीता प्राप्त इव्हेंट पॉईंटस्, असल्यास करीताचे URI."
+
+#: ../webkit/webkithittestresult.cpp:185
+msgid "Image URI"
+msgstr "प्रतिमा URI"
+
+#: ../webkit/webkithittestresult.cpp:186
+msgid ""
+"The URI of the image that is part of the target that received the event, if "
+"any."
+msgstr ""
+"लक्ष्याचे भाग असलेल्या प्रतिमाचे URI ज्यास इव्हेंट प्राप्त झाले, असल्यास."
+
+#: ../webkit/webkithittestresult.cpp:199
+msgid "Media URI"
+msgstr "मीडिया URI"
+
+#: ../webkit/webkithittestresult.cpp:200
+msgid ""
+"The URI of the media that is part of the target that received the event, if "
+"any."
+msgstr ""
+"लक्ष्याचे भाग असलेल्या मिडीयाचे URI ज्यास इव्हेंट प्राप्त झाले, असल्यास."
+
+#: ../webkit/webkithittestresult.cpp:221
+msgid "Inner node"
+msgstr "आंतरिक नोड"
+
+#: ../webkit/webkithittestresult.cpp:222
+msgid "The inner DOM node associated with the hit test result."
+msgstr "हिट चाचणी परिणामसह संबंधित आंतरिक DOM नोड."
+
+#: ../webkit/webkitnetworkrequest.cpp:134
+#: ../webkit/webkitnetworkresponse.cpp:134 ../webkit/webkitwebframe.cpp:323
+#: ../webkit/webkitwebhistoryitem.cpp:176 ../webkit/webkitwebresource.cpp:126
+#: ../webkit/webkitwebview.cpp:2997
+msgid "URI"
+msgstr "URI"
+
+#: ../webkit/webkitnetworkrequest.cpp:135
+msgid "The URI to which the request will be made."
+msgstr "URI ज्याकरीता विनंती केली जाईल."
+
+#: ../webkit/webkitnetworkrequest.cpp:148
+#: ../webkit/webkitnetworkresponse.cpp:148
+msgid "Message"
+msgstr "संदेश"
+
+#: ../webkit/webkitnetworkrequest.cpp:149
+msgid "The SoupMessage that backs the request."
+msgstr "SoupMessage जे विनंतीला पाठिंबा पुरवते."
+
+#: ../webkit/webkitnetworkresponse.cpp:135
+msgid "The URI to which the response will be made."
+msgstr "प्रतिसाद सादर करण्याजोगी URI."
+
+#: ../webkit/webkitnetworkresponse.cpp:149
+msgid "The SoupMessage that backs the response."
+msgstr "SoupMessage जे विनंतीला पाठिंबा पुरवते."
+
+#: ../webkit/webkitsecurityorigin.cpp:150
+msgid "Protocol"
+msgstr "प्रोटोकॉल"
+
+#: ../webkit/webkitsecurityorigin.cpp:151
+msgid "The protocol of the security origin"
+msgstr "सुरक्षात्मक उगमचे प्रोटोकॉल"
+
+#: ../webkit/webkitsecurityorigin.cpp:164
+msgid "Host"
+msgstr "यजमान"
+
+#: ../webkit/webkitsecurityorigin.cpp:165
+msgid "The host of the security origin"
+msgstr "सुरक्षात्मक उगमचे यजमान"
+
+#: ../webkit/webkitsecurityorigin.cpp:178
+msgid "Port"
+msgstr "पोर्ट"
+
+#: ../webkit/webkitsecurityorigin.cpp:179
+msgid "The port of the security origin"
+msgstr "सुरक्षात्मक उगमचे पोर्ट"
+
+#: ../webkit/webkitsecurityorigin.cpp:192
+msgid "Web Database Usage"
+msgstr "वेब डाटाबेसचा वापर"
+
+#: ../webkit/webkitsecurityorigin.cpp:193
+msgid "The cumulative size of all web databases in the security origin"
+msgstr "सुरक्षात्मक उगममधील सर्व वेब डाटाबेसचे कुमुलेटिव्ह आकार"
+
+#: ../webkit/webkitsecurityorigin.cpp:205
+msgid "Web Database Quota"
+msgstr "वेब डाटाबेस कोटा"
+
+#: ../webkit/webkitsecurityorigin.cpp:206
+msgid "The web database quota of the security origin in bytes"
+msgstr "सुरक्षात्मक उगमचे वेब डाटाबेस कोटाचे बाइट्स्मधील आकार"
+
+#: ../webkit/webkitsoupauthdialog.c:264
+#, c-format
+msgid "A username and password are being requested by the site %s"
+msgstr "वापरकर्तानाव व पासवर्ड स्थळ %s तर्फे विनंती केले जात आहे"
+
+#: ../webkit/webkitsoupauthdialog.c:294
+msgid "Server message:"
+msgstr "सर्व्हर संदेश:"
+
+#: ../webkit/webkitsoupauthdialog.c:307
+msgid "Username:"
+msgstr "वापरकर्तानाव:"
+
+#: ../webkit/webkitsoupauthdialog.c:309
+msgid "Password:"
+msgstr "पासवर्ड:"
+
+#: ../webkit/webkitsoupauthdialog.c:318
+msgid "_Remember password"
+msgstr "पासवर्ड लक्षात ठेवा (_R)"
+
+#: ../webkit/webkitwebdatabase.cpp:173
+msgid "Security Origin"
+msgstr "सुरक्षात्मक उगम"
+
+#: ../webkit/webkitwebdatabase.cpp:174
+msgid "The security origin of the database"
+msgstr "डाटाबेसचे सुरक्षात्मक उगम"
+
+#: ../webkit/webkitwebdatabase.cpp:187 ../webkit/webkitwebframe.cpp:309
+msgid "Name"
+msgstr "नाव"
+
+#: ../webkit/webkitwebdatabase.cpp:188
+msgid "The name of the Web Database database"
+msgstr "वेब डाटाबेस डाटाबेसचे नाव"
+
+#: ../webkit/webkitwebdatabase.cpp:201
+msgid "Display Name"
+msgstr "डिस्पले नाव"
+
+#: ../webkit/webkitwebdatabase.cpp:202
+msgid "The display name of the Web Storage database"
+msgstr "वेब स्टोरेज डाटाबेसचे डिस्पले नाव"
+
+#: ../webkit/webkitwebdatabase.cpp:215
+msgid "Expected Size"
+msgstr "अपेक्षित आकार"
+
+#: ../webkit/webkitwebdatabase.cpp:216
+msgid "The expected size of the Web Database database"
+msgstr "वेब डाटाबेस डाटाबेसचे अपेक्षीत आकार"
+
+#: ../webkit/webkitwebdatabase.cpp:228
+msgid "Size"
+msgstr "आकार"
+
+#: ../webkit/webkitwebdatabase.cpp:229
+msgid "The current size of the Web Database database"
+msgstr "वेब डाटाबेस डाटाबेसचे सध्याचे आकार"
+
+#: ../webkit/webkitwebdatabase.cpp:241
+msgid "Filename"
+msgstr "फाइलनाव"
+
+#: ../webkit/webkitwebdatabase.cpp:242
+msgid "The absolute filename of the Web Storage database"
+msgstr "वेब स्टोरेज डाटाबेसचे ॲब्सोल्युट फाइलनाव"
+
+#: ../webkit/webkitwebframe.cpp:310
+msgid "The name of the frame"
+msgstr "फ्रेमचे नाव"
+
+#: ../webkit/webkitwebframe.cpp:316 ../webkit/webkitwebhistoryitem.cpp:144
+#: ../webkit/webkitwebview.cpp:2983
+msgid "Title"
+msgstr "शीर्षक"
+
+#: ../webkit/webkitwebframe.cpp:317
+msgid "The document title of the frame"
+msgstr "फ्रेमचे दस्तऐवज शीर्षक"
+
+#: ../webkit/webkitwebframe.cpp:324
+msgid "The current URI of the contents displayed by the frame"
+msgstr "फ्रेमतर्फे दाखवण्याजोगी कंटेंटस्चे सध्याचे URI"
+
+#: ../webkit/webkitwebframe.cpp:355
+msgid "Horizontal Scrollbar Policy"
+msgstr "आडवे स्क्रोपट्टी करार"
+
+#: ../webkit/webkitwebframe.cpp:356
+msgid ""
+"Determines the current policy for the horizontal scrollbar of the frame."
+msgstr "फ्रेमच्या आडव्या स्क्रोलपट्टीकरीता सध्याचे करार ओळखतो."
+
+#: ../webkit/webkitwebframe.cpp:373
+msgid "Vertical Scrollbar Policy"
+msgstr "उभे स्क्रोपट्टी करार"
+
+#: ../webkit/webkitwebframe.cpp:374
+msgid "Determines the current policy for the vertical scrollbar of the frame."
+msgstr "फ्रेमच्या उभ्या स्क्रोलपट्टीकरीता सध्याचे करार ओळखतो."
+
+#: ../webkit/webkitwebhistoryitem.cpp:145
+msgid "The title of the history item"
+msgstr "इतिहास घटकाचे शीर्षक"
+
+#: ../webkit/webkitwebhistoryitem.cpp:160
+msgid "Alternate Title"
+msgstr "वैकल्पिक शीर्षक"
+
+#: ../webkit/webkitwebhistoryitem.cpp:161
+msgid "The alternate title of the history item"
+msgstr "इतिहास घटकाचे वैकल्पिक शीर्षक"
+
+#: ../webkit/webkitwebhistoryitem.cpp:177
+msgid "The URI of the history item"
+msgstr "इतिहास घटकाचे URI"
+
+#: ../webkit/webkitwebhistoryitem.cpp:192
+#: ../webkit/webkitwebnavigationaction.cpp:171
+msgid "Original URI"
+msgstr "मूळ URI"
+
+#: ../webkit/webkitwebhistoryitem.cpp:193
+msgid "The original URI of the history item"
+msgstr "इतिहास घटकाचे मूळ URI"
+
+#: ../webkit/webkitwebhistoryitem.cpp:208
+msgid "Last visited Time"
+msgstr "शेवटच्यावेळी भेट दिलेली वेळ"
+
+#: ../webkit/webkitwebhistoryitem.cpp:209
+msgid "The time at which the history item was last visited"
+msgstr "शेवटच्यावेळी इतिहास घटाकाला भेट दिल्याची वेळ"
+
+#: ../webkit/webkitwebinspector.cpp:270
+msgid "Web View"
+msgstr "वेब दृष्य"
+
+#: ../webkit/webkitwebinspector.cpp:271
+msgid "The Web View that renders the Web Inspector itself"
+msgstr "वेब इंस्पेक्टर दाखवणारे वेब दृष्य"
+
+#: ../webkit/webkitwebinspector.cpp:284
+msgid "Inspected URI"
+msgstr "तपासलेले URI"
+
+#: ../webkit/webkitwebinspector.cpp:285
+msgid "The URI that is currently being inspected"
+msgstr "सद्या तपासले जाणारे URI"
+
+#: ../webkit/webkitwebinspector.cpp:301
+msgid "Enable JavaScript profiling"
+msgstr "जावास्क्रिप्ट प्रोफाइलिंग सुरु करा"
+
+#: ../webkit/webkitwebinspector.cpp:302
+msgid "Profile the executed JavaScript."
+msgstr "चालवलेल्या जावास्क्रिप्टची संक्षिप्त माहिती."
+
+#: ../webkit/webkitwebinspector.cpp:317
+msgid "Enable Timeline profiling"
+msgstr "टाइमलाइन प्रोफाइलिंग सुरू करा"
+
+#: ../webkit/webkitwebinspector.cpp:318
+msgid "Profile the WebCore instrumentation."
+msgstr "वेबकोर इंस्ट्रुमेंटेशनची संक्षिप्त माहिती द्या."
+
+#: ../webkit/webkitwebnavigationaction.cpp:156
+msgid "Reason"
+msgstr "कारण"
+
+#: ../webkit/webkitwebnavigationaction.cpp:157
+msgid "The reason why this navigation is occurring"
+msgstr "हे संचारन होण्याचे कारण द्या"
+
+#: ../webkit/webkitwebnavigationaction.cpp:172
+msgid "The URI that was requested as the target for the navigation"
+msgstr "संचारनकरीता निवडलेले लक्ष्य ज्यास URI म्हणून विनंती केले"
+
+#: ../webkit/webkitwebnavigationaction.cpp:186
+msgid "Button"
+msgstr "बटन"
+
+#: ../webkit/webkitwebnavigationaction.cpp:187
+msgid "The button used to click"
+msgstr "क्लिक करण्यासाठीचे बटन"
+
+#: ../webkit/webkitwebnavigationaction.cpp:202
+msgid "Modifier state"
+msgstr "मॉडिफायर स्तर"
+
+#: ../webkit/webkitwebnavigationaction.cpp:203
+msgid "A bitmask representing the state of the modifier keys"
+msgstr "मॉडिफायर किज्चे स्तर प्रस्तुत करणारे बिटमास्क"
+
+#: ../webkit/webkitwebnavigationaction.cpp:218
+msgid "Target frame"
+msgstr "टार्गेट फ्रेम"
+
+#: ../webkit/webkitwebnavigationaction.cpp:219
+msgid "The target frame for the navigation"
+msgstr "संचारनकरीता लक्ष्य फ्रेम"
+
+#: ../webkit/webkitwebresource.cpp:127
+msgid "The uri of the resource"
+msgstr "स्रोतचे uri"
+
+#: ../webkit/webkitwebresource.cpp:141
+msgid "MIME Type"
+msgstr "MIME प्रकार"
+
+#: ../webkit/webkitwebresource.cpp:142
+msgid "The MIME type of the resource"
+msgstr "स्रोतचे MIME प्रकार"
+
+#: ../webkit/webkitwebresource.cpp:156 ../webkit/webkitwebview.cpp:3132
+msgid "Encoding"
+msgstr "एंकोडिंग"
+
+#: ../webkit/webkitwebresource.cpp:157
+msgid "The text encoding name of the resource"
+msgstr "स्रोतचे मजकूर एंकोडिंग नाव"
+
+#: ../webkit/webkitwebresource.cpp:172
+msgid "Frame Name"
+msgstr "फ्रेमचे नाव"
+
+#: ../webkit/webkitwebresource.cpp:173
+msgid "The frame name of the resource"
+msgstr "स्रोतचे फ्रेम नाव"
+
+#: ../webkit/webkitwebsettings.cpp:252
+msgid "Default Encoding"
+msgstr "पूर्वनिर्धारित एंकोडिंग"
+
+#: ../webkit/webkitwebsettings.cpp:253
+msgid "The default encoding used to display text."
+msgstr "मजकूर दाखवण्यासाठी वापरलेले पूर्वनिर्धारित एंकोडिंग."
+
+#: ../webkit/webkitwebsettings.cpp:261
+msgid "Cursive Font Family"
+msgstr "कर्सिव्ह फाँट फॅमिलि"
+
+#: ../webkit/webkitwebsettings.cpp:262
+msgid "The default Cursive font family used to display text."
+msgstr "मजकूर दाखवण्यासाठी वापरण्याजोगी पूर्वनिर्धारित कर्सिव्ह फाँट फॅमिलि."
+
+#: ../webkit/webkitwebsettings.cpp:270
+msgid "Default Font Family"
+msgstr "पूर्वनिर्धारित फाँट फॅमिलि"
+
+#: ../webkit/webkitwebsettings.cpp:271
+msgid "The default font family used to display text."
+msgstr "मजकूर दाखवण्यासाठी वापरण्याजोगी पूर्वनिर्धारित फाँट फॅमिलि."
+
+#: ../webkit/webkitwebsettings.cpp:279
+msgid "Fantasy Font Family"
+msgstr "फँटसि फाँट फॅमिलि"
+
+#: ../webkit/webkitwebsettings.cpp:280
+msgid "The default Fantasy font family used to display text."
+msgstr "मजकूर दाखवण्यासाठी वापरण्याजोगी पूर्वनिर्धारित फँटसि फाँट फॅमिलि."
+
+#: ../webkit/webkitwebsettings.cpp:288
+msgid "Monospace Font Family"
+msgstr "मोनोस्पेस् फाँट फॅमिलि"
+
+#: ../webkit/webkitwebsettings.cpp:289
+msgid "The default font family used to display monospace text."
+msgstr "मोनोस्पेस् मजकूर दाखवण्यासाठी पूर्वनिर्धारित फाँट फॅमिलि."
+
+#: ../webkit/webkitwebsettings.cpp:297
+msgid "Sans Serif Font Family"
+msgstr "सँस् सेरिफ फाँट फॅमिलि"
+
+#: ../webkit/webkitwebsettings.cpp:298
+msgid "The default Sans Serif font family used to display text."
+msgstr "मजकूर दाखवण्यासाठी वापरण्याजोगी पूर्वनिर्धारित सँस सेरिफ फाँट फॅमिलि."
+
+#: ../webkit/webkitwebsettings.cpp:306
+msgid "Serif Font Family"
+msgstr "सेरिफ फाँट फॅमिलि"
+
+#: ../webkit/webkitwebsettings.cpp:307
+msgid "The default Serif font family used to display text."
+msgstr "मजकूर दाखवण्यासाठी वापरण्याजोगी पूर्वनिर्धारित सेरिफ फाँट फॅमिलि."
+
+#: ../webkit/webkitwebsettings.cpp:315
+msgid "Default Font Size"
+msgstr "पूर्वनिर्धारित फाँट आकार"
+
+#: ../webkit/webkitwebsettings.cpp:316
+msgid "The default font size used to display text."
+msgstr "मजकूर दाखवण्यासाठी वापरण्याजोगी पूर्वनिर्धारित फाँट आकार."
+
+#: ../webkit/webkitwebsettings.cpp:324
+msgid "Default Monospace Font Size"
+msgstr "पूर्वनिर्धारित मोनोस्पेस् फाँट आकार"
+
+#: ../webkit/webkitwebsettings.cpp:325
+msgid "The default font size used to display monospace text."
+msgstr "मोनोस्पेस् मजकूर दाखवण्यासाठी पूर्वनिर्धारित फाँट आकार."
+
+#: ../webkit/webkitwebsettings.cpp:333
+msgid "Minimum Font Size"
+msgstr "किमान फाँट आकार"
+
+#: ../webkit/webkitwebsettings.cpp:334
+msgid "The minimum font size used to display text."
+msgstr "मजकूर दाखवण्यासाठी वापरण्याजोगी किमान फाँट आकार."
+
+#: ../webkit/webkitwebsettings.cpp:342
+msgid "Minimum Logical Font Size"
+msgstr "किमान लॉजिकल फाँट आकार"
+
+#: ../webkit/webkitwebsettings.cpp:343
+msgid "The minimum logical font size used to display text."
+msgstr "मजकूर दाखवण्यासाठी वापरण्याजोगी किमान लॉजिकल फाँट आकार."
+
+#: ../webkit/webkitwebsettings.cpp:362
+msgid "Enforce 96 DPI"
+msgstr "96 DPI जबरनपणे लागू करा"
+
+#: ../webkit/webkitwebsettings.cpp:363
+msgid "Enforce a resolution of 96 DPI"
+msgstr "96 DPI चे रेजोल्युशन जबरनपणे लागू करा"
+
+#: ../webkit/webkitwebsettings.cpp:371
+msgid "Auto Load Images"
+msgstr "प्रतिमा स्वयं लोड करा"
+
+#: ../webkit/webkitwebsettings.cpp:372
+msgid "Load images automatically."
+msgstr "प्रतिमा स्वयं लोड करा."
+
+#: ../webkit/webkitwebsettings.cpp:380
+msgid "Auto Shrink Images"
+msgstr "प्रतिमा स्वयं लहान करा"
+
+#: ../webkit/webkitwebsettings.cpp:381
+msgid "Automatically shrink standalone images to fit."
+msgstr "घट बसवण्याकरीता स्टँडअलोन प्रतिमांना स्वयं लहान करा."
+
+#: ../webkit/webkitwebsettings.cpp:389
+msgid "Print Backgrounds"
+msgstr "पार्श्वभूमीची छपाई करा"
+
+#: ../webkit/webkitwebsettings.cpp:390
+msgid "Whether background images should be printed."
+msgstr "पार्श्वभूमी प्रतिमांची छपाई करायची."
+
+#: ../webkit/webkitwebsettings.cpp:398
+msgid "Enable Scripts"
+msgstr "स्क्रिप्टस् सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:399
+msgid "Enable embedded scripting languages."
+msgstr "एम्बेडेड स्क्रिप्टिंग भाषा सुरू करा."
+
+#: ../webkit/webkitwebsettings.cpp:407
+msgid "Enable Plugins"
+msgstr "प्लगईन्स् सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:408
+msgid "Enable embedded plugin objects."
+msgstr "एम्बेडेड् प्लगइन ऑब्जेक्टस् सुरू करा."
+
+#: ../webkit/webkitwebsettings.cpp:416
+msgid "Resizable Text Areas"
+msgstr "पुनःआकार मजकूर क्षेत्र"
+
+#: ../webkit/webkitwebsettings.cpp:417
+msgid "Whether text areas are resizable."
+msgstr "मजकूर क्षेत्र पुनःआकारजोगी आहेत."
+
+#: ../webkit/webkitwebsettings.cpp:424
+msgid "User Stylesheet URI"
+msgstr "वापरकर्ता स्टाइनशीट URI"
+
+#: ../webkit/webkitwebsettings.cpp:425
+msgid "The URI of a stylesheet that is applied to every page."
+msgstr "स्टाइलशीटचे URI जे प्रत्येक पृष्ठकरीता लागू होते."
+
+#: ../webkit/webkitwebsettings.cpp:440
+msgid "Zoom Stepping Value"
+msgstr "स्टेपिंग मूल्य वाढवा"
+
+#: ../webkit/webkitwebsettings.cpp:441
+msgid "The value by which the zoom level is changed when zooming in or out."
+msgstr ""
+"झूम शक्य किंवा अशक्य करतेवेळी झूम लेव्हल ज्या स्तराने बदलले जाते ते मूल्य."
+
+#: ../webkit/webkitwebsettings.cpp:459
+msgid "Enable Developer Extras"
+msgstr "डेव्हलपर एक्सट्राज सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:460
+msgid "Enables special extensions that help developers"
+msgstr "डेव्हलपर्सला मदत पुरवणारे विशेष एक्सटेंशन्स् सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:480
+msgid "Enable Private Browsing"
+msgstr "प्राइव्हेट ब्राऊजिंग सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:481
+msgid "Enables private browsing mode"
+msgstr "प्राइव्हेट ब्राऊजिंग मोड सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:496
+msgid "Enable Spell Checking"
+msgstr "शुध्दलेखन तपासणी सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:497
+msgid "Enables spell checking while typing"
+msgstr "टाइप करतेवेळी शुध्दलेखन तपासणी सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:520
+msgid "Languages to use for spell checking"
+msgstr "शुध्दलेखन तपासणीकरीता वापरण्याजोगी भाषा"
+
+#: ../webkit/webkitwebsettings.cpp:521
+msgid "Comma separated list of languages to use for spell checking"
+msgstr "शुध्दलेखनच्या वापरकरीता वापरण्याजोगी स्वल्पिविराम विभाजीत सूची"
+
+#: ../webkit/webkitwebsettings.cpp:535
+msgid "Enable Caret Browsing"
+msgstr "कॅरेट ब्राऊजिंग सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:536
+msgid "Whether to enable accesibility enhanced keyboard navigation"
+msgstr "ॲक्सेसिबिलिटि सुधारित कळफलक संचारन सुरू करायचे"
+
+#: ../webkit/webkitwebsettings.cpp:551
+msgid "Enable HTML5 Database"
+msgstr "HTML5 डाटाबेस सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:552
+msgid "Whether to enable HTML5 database support"
+msgstr "HTML5 डाटाबेस समर्थन सुरू करायचे"
+
+#: ../webkit/webkitwebsettings.cpp:567
+msgid "Enable HTML5 Local Storage"
+msgstr "HTML5 स्थानीय स्टोरेज सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:568
+msgid "Whether to enable HTML5 Local Storage support"
+msgstr "HTML5 स्थानीय स्टोरेज समर्थन सुरू करायचे"
+
+#: ../webkit/webkitwebsettings.cpp:582
+msgid "Enable XSS Auditor"
+msgstr "XSS ऑडिटर सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:583
+msgid "Whether to enable the XSS auditor"
+msgstr "XSS ऑडिटर सुरू करायचे"
+
+#: ../webkit/webkitwebsettings.cpp:601
+msgid "Enable Spatial Navigation"
+msgstr "स्पेस्शल संचारन सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:602
+msgid "Whether to enable Spatial Navigation"
+msgstr "स्पेस्शल संचारन सुरू करायचे"
+
+#: ../webkit/webkitwebsettings.cpp:620
+msgid "Enable Frame Flattening"
+msgstr "फ्रेम फ्लॅटनिंग सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:621
+msgid "Whether to enable Frame Flattening"
+msgstr "फ्रेम फ्लॅटनिंग सुरू करायचे"
+
+#: ../webkit/webkitwebsettings.cpp:638
+msgid "User Agent"
+msgstr "युजर एजंट"
+
+#: ../webkit/webkitwebsettings.cpp:639
+msgid "The User-Agent string used by WebKitGtk"
+msgstr "WebKitGtk तर्फे वापरण्याजोगी युजर एजंट स्ट्रिंग"
+
+#: ../webkit/webkitwebsettings.cpp:654
+msgid "JavaScript can open windows automatically"
+msgstr "जावास्क्रिप्ट पटल स्वयंपणे उघडू शकतो"
+
+#: ../webkit/webkitwebsettings.cpp:655
+msgid "Whether JavaScript can open windows automatically"
+msgstr "जावास्क्रिप्ट पटल स्वयंपणे उघडू शकतो का"
+
+#: ../webkit/webkitwebsettings.cpp:669
+msgid "JavaScript can access Clipboard"
+msgstr "जावास्क्रिप्ट क्लिपबोर्डकरीता प्रवेश प्राप्त करू शकतो"
+
+#: ../webkit/webkitwebsettings.cpp:670
+msgid "Whether JavaScript can access Clipboard"
+msgstr "जावास्क्रिप्ट क्लिपबोर्डकरीता प्रवेश प्राप्त करू शकतो"
+
+#: ../webkit/webkitwebsettings.cpp:686
+msgid "Enable offline web application cache"
+msgstr "Enable offline web application cache"
+
+#: ../webkit/webkitwebsettings.cpp:687
+msgid "Whether to enable offline web application cache"
+msgstr "ऑफलाइन वेब ॲप्लिकेशन कॅशे सुरू करायचे"
+
+#: ../webkit/webkitwebsettings.cpp:715
+msgid "Editing behavior"
+msgstr "वर्तन संपादित करायचे"
+
+#: ../webkit/webkitwebsettings.cpp:716
+msgid "The behavior mode to use in editing mode"
+msgstr "संपादन मोडमध्ये वापरण्याजोगी वर्तन मोड"
+
+#: ../webkit/webkitwebsettings.cpp:732
+msgid "Enable universal access from file URIs"
+msgstr "फाइल URI पासून युनिवर्सल प्रवेश सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:733
+msgid "Whether to allow universal access from file URIs"
+msgstr "फाइल URI पासून युनिवर्सल प्रवेशकरीता परवानगी द्यायची"
+
+#: ../webkit/webkitwebsettings.cpp:748
+msgid "Enable DOM paste"
+msgstr "DOM पेस्ट सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:749
+msgid "Whether to enable DOM paste"
+msgstr "DOM पेस्ट सुरू करायचे"
+
+#: ../webkit/webkitwebsettings.cpp:767
+msgid "Tab key cycles through elements"
+msgstr "टॅब कि इलिमेंटस् चाळते"
+
+#: ../webkit/webkitwebsettings.cpp:768
+msgid "Whether the tab key cycles through elements on the page."
+msgstr "टॅब कि पृष्ठावरील एलिमेंटस् चाळते."
+
+#: ../webkit/webkitwebsettings.cpp:788
+msgid "Enable Default Context Menu"
+msgstr "पूर्वनिर्धारित संदर्भ मेन्यु सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:789
+msgid ""
+"Enables the handling of right-clicks for the creation of the default context "
+"menu"
+msgstr ""
+"पूर्वनिर्धारित संदर्भ मेन्युच्या निर्माणकरीता उजव्या-क्लिकची हाताळणी सुरू करतो"
+
+#: ../webkit/webkitwebsettings.cpp:809
+msgid "Enable Site Specific Quirks"
+msgstr "स्थळ निर्देशीत क्वर्क्स् सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:810
+msgid "Enables the site-specific compatibility workarounds"
+msgstr "स्थळ-निर्देशीत सहत्वता पर्याय सुरू करतो"
+
+#: ../webkit/webkitwebsettings.cpp:832
+msgid "Enable page cache"
+msgstr "पृष्ठ कॅशे सुरू करतो"
+
+#: ../webkit/webkitwebsettings.cpp:833
+msgid "Whether the page cache should be used"
+msgstr "पृष्ठ कॅशेचा वापर करायचे"
+
+#: ../webkit/webkitwebsettings.cpp:853
+msgid "Auto Resize Window"
+msgstr "स्वयं पुनःआकार पटल"
+
+#: ../webkit/webkitwebsettings.cpp:854
+msgid "Automatically resize the toplevel window when a page requests it"
+msgstr "पृष्ठ विनंती करतेवेळी स्वयंरित्या उच्चस्तरिय पटलला पुनःआकार द्या"
+
+#: ../webkit/webkitwebsettings.cpp:886
+msgid "Enable Java Applet"
+msgstr "जावा ॲप्लेट सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:887
+msgid "Whether Java Applet support through <applet> should be enabled"
+msgstr "<applet> तर्फे जावा ॲप्लेट समर्थन सुरू करायचे"
+
+#: ../webkit/webkitwebsettings.cpp:901
+msgid "Enable Hyperlink Auditing"
+msgstr "हायपरलिंक ऑडिटिंग सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:902
+msgid "Whether <a ping> should be able to send pings"
+msgstr "<a ping> ने पिंग पाठवायचे"
+
+#: ../webkit/webkitwebsettings.cpp:910
+msgid "Enable Fullscreen"
+msgstr "पडदाभर सुरू करा"
+
+#: ../webkit/webkitwebsettings.cpp:911
+msgid "Whether the Mozilla style API should be enabled."
+msgstr "मोझीला शैलीचे API सुरू करायचे."
+
+#: ../webkit/webkitwebview.cpp:2984
+msgid "Returns the @web_view's document title"
+msgstr "@web_viewचे दस्तऐवज शीर्षक पुरवते"
+
+#: ../webkit/webkitwebview.cpp:2998
+msgid "Returns the current URI of the contents displayed by the @web_view"
+msgstr "@web_view तर्फे दाखवलेल्या अंतर्भुत माहितीचे सद्याचे URI पुरवतो"
+
+#: ../webkit/webkitwebview.cpp:3011
+msgid "Copy target list"
+msgstr "लक्ष्य सूचीचे प्रत बनवा"
+
+#: ../webkit/webkitwebview.cpp:3012
+msgid "The list of targets this web view supports for clipboard copying"
+msgstr "क्लिपबोर्ड कॉपिइंगकरीता वेब दृष्यतर्फे समर्थीत लक्ष्यांची सूची"
+
+#: ../webkit/webkitwebview.cpp:3025
+msgid "Paste target list"
+msgstr "लक्ष्य सूची चिकटवा"
+
+#: ../webkit/webkitwebview.cpp:3026
+msgid "The list of targets this web view supports for clipboard pasting"
+msgstr "क्लिपबोर्ड चिकटवण्याकरीता या वेब दृष्यतर्फे समर्थीत लक्ष्यांची सूची"
+
+#: ../webkit/webkitwebview.cpp:3032
+msgid "Settings"
+msgstr "सेटिंग्स्"
+
+#: ../webkit/webkitwebview.cpp:3033
+msgid "An associated WebKitWebSettings instance"
+msgstr "संबंधित WebKitWebSettings बाब"
+
+#: ../webkit/webkitwebview.cpp:3046
+msgid "Web Inspector"
+msgstr "वेब इंस्पेक्टर"
+
+#: ../webkit/webkitwebview.cpp:3047
+msgid "The associated WebKitWebInspector instance"
+msgstr "संबंधित WebKitWebInspector बाब"
+
+#: ../webkit/webkitwebview.cpp:3060
+msgid "Viewport Attributes"
+msgstr "व्युपोर्ट गुणधर्मे"
+
+#: ../webkit/webkitwebview.cpp:3061
+msgid "The associated WebKitViewportAttributes instance"
+msgstr "संबंधित WebKitViewportAttributes instance"
+
+#: ../webkit/webkitwebview.cpp:3081
+msgid "Editable"
+msgstr "संपादनजोगी"
+
+#: ../webkit/webkitwebview.cpp:3082
+msgid "Whether content can be modified by the user"
+msgstr "वापरकर्तातर्फे कंटेंट संपादनजोगी आहे का"
+
+#: ../webkit/webkitwebview.cpp:3088
+msgid "Transparent"
+msgstr "पारदर्शक"
+
+#: ../webkit/webkitwebview.cpp:3089
+msgid "Whether content has a transparent background"
+msgstr "अंतर्भुत माहितीची पारदर्शक पार्श्वभूमी आहे का"
+
+#: ../webkit/webkitwebview.cpp:3102
+msgid "Zoom level"
+msgstr "झूम स्तर"
+
+#: ../webkit/webkitwebview.cpp:3103
+msgid "The level of zoom of the content"
+msgstr "अंतर्भुत माहितीचे झूम स्तर"
+
+#: ../webkit/webkitwebview.cpp:3118
+msgid "Full content zoom"
+msgstr "संपूर्ण कंटेंट झूम"
+
+#: ../webkit/webkitwebview.cpp:3119
+msgid "Whether the full content is scaled when zooming"
+msgstr "झूम करतेवेळी पूर्ण कंटेंट स्केल करायचे"
+
+#: ../webkit/webkitwebview.cpp:3133
+msgid "The default encoding of the web view"
+msgstr "वेब दृष्याचे पूर्वनिर्धारित एंकोडिंग"
+
+#: ../webkit/webkitwebview.cpp:3146
+msgid "Custom Encoding"
+msgstr "पसंतीचे एंकोडिंग"
+
+#: ../webkit/webkitwebview.cpp:3147
+msgid "The custom encoding of the web view"
+msgstr "वेब दृष्याचे पसंतीचे एंकोडिंग"
+
+#: ../webkit/webkitwebview.cpp:3199
+msgid "Icon URI"
+msgstr "चिन्ह URI"
+
+#: ../webkit/webkitwebview.cpp:3200
+msgid "The URI for the favicon for the #WebKitWebView."
+msgstr "#WebKitWebView करीता चिन्हाचे URI."
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:56
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:61
+msgid "Submit"
+msgstr "सादर करा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:66
+msgid "Reset"
+msgstr "पूर्ववत् करा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:71
+msgid "This is a searchable index. Enter search keywords: "
+msgstr "हे शोधण्याजोगी इंडेक्स आहे. शोध मुख्यशब्दे द्या: "
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:76
+msgid "Choose File"
+msgstr "फाइल पसंत करा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:81
+msgid "(None)"
+msgstr "(काहिच नाही)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:86
+msgid "Open Link in New _Window"
+msgstr "नवीन पटलात दुवा उघडा (_W)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:91
+msgid "_Download Linked File"
+msgstr "लिंक केलेली फाइल डाऊनलोड करा (_D)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:96
+msgid "Copy Link Loc_ation"
+msgstr "दुवाच्या ठिकाणाचे प्रत बनवा (_a)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:101
+msgid "Open _Image in New Window"
+msgstr "प्रतिमाला नविन पटलात उघडा (_I)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:106
+msgid "Sa_ve Image As"
+msgstr "प्रतिमाला असे साठवा (_v)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:111
+msgid "Cop_y Image"
+msgstr "प्रतिमाचे प्रत बनवा (_y)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:116
+msgid "Open _Video in New Window"
+msgstr "नविन पटलात व्हिडीओ उघडा (_V)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:121
+msgid "Open _Audio in New Window"
+msgstr "नवीन पटलात ऑडिओ उघडा (_A)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:126
+msgid "Cop_y Video Link Location"
+msgstr "व्हिडीओ दुवा ठिकाणाचे प्रत बनवा (_y)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:131
+msgid "Cop_y Audio Link Location"
+msgstr "ऑडीओ दुवा ठिकाणाचे प्रत बनवा (_y)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:136
+msgid "_Toggle Media Controls"
+msgstr "मिडीया कंट्रोल्स् बदलवा (_T)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:141
+msgid "Toggle Media _Loop Playback"
+msgstr "मिडीया लूप प्लेबॅक बदला (_L)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:146
+msgid "Switch Video to _Fullscreen"
+msgstr "व्हिडीओ पडदाभर वापरा (_F)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:151
+msgid "_Play"
+msgstr "चालवा (_P)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:156
+msgid "_Pause"
+msgstr "थांबवा (_P)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:161
+msgid "_Mute"
+msgstr "मंद करा (_M)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
+msgid "Open _Frame in New Window"
+msgstr "फ्रेमला नविन पटलात उघडा (_F)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:217
+msgid "_Reload"
+msgstr "पुनःलोड करा (_R)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:234
+msgid "No Guesses Found"
+msgstr "अनुमान आढळले नाही"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:239
+msgid "_Ignore Spelling"
+msgstr "वर्णलेखनकडे दुर्लक्ष करा (_I)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:244
+msgid "_Learn Spelling"
+msgstr "शुध्दलेखन शिका (_L)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:249
+msgid "_Search the Web"
+msgstr "वेब शोधा (_S)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:254
+msgid "_Look Up in Dictionary"
+msgstr "शब्दकोषात पहा (_L)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:259
+msgid "_Open Link"
+msgstr "दुवा उघडा (_O)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:264
+msgid "Ignore _Grammar"
+msgstr "व्याकरणकडे दुर्लक्ष करा (_G)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:269
+msgid "Spelling and _Grammar"
+msgstr "शुध्दलेखन व व्याकरण (_G)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:274
+msgid "_Show Spelling and Grammar"
+msgstr "शुध्दलेखन व व्याकरण दाखवा (_S)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:274
+msgid "_Hide Spelling and Grammar"
+msgstr "शुध्दलेखन व व्याकरण लपवा (_H)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:279
+msgid "_Check Document Now"
+msgstr "आत्ता दस्तऐवज तपासा (_C)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:284
+msgid "Check Spelling While _Typing"
+msgstr "टाइपिंग करतेवेळी शुध्दलेखन तपासा (_T)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:289
+msgid "Check _Grammar With Spelling"
+msgstr "शुध्दलेखनसह व्याकरण तपासा (_G)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:294
+msgid "_Font"
+msgstr "फाँट (_F)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:317
+msgid "_Outline"
+msgstr "रूपरेषा (_O)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:322
+msgid "Inspect _Element"
+msgstr "एलिमेंटची चौकशी करा (_E)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:327
+msgid "No recent searches"
+msgstr "नविन शोध आढळले नाही"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:332
+msgid "Recent searches"
+msgstr "नविन शोध"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:337
+msgid "_Clear recent searches"
+msgstr "नविन शोध नष्ट करा (_C)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
+msgid "term"
+msgstr "संज्ञा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
+msgid "definition"
+msgstr "वर्णन"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:352
+msgid "press"
+msgstr "दाबा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:357
+msgid "select"
+msgstr "निवडा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:362
+msgid "activate"
+msgstr "सुरू करा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:367
+msgid "uncheck"
+msgstr "निवड अशक्य करा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:372
+msgid "check"
+msgstr "तपासणी करा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
+msgid "jump"
+msgstr "येथे जा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:392
+msgid "Missing Plug-in"
+msgstr "प्लगइन आढळले नाही"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:398
+msgid "Plug-in Failure"
+msgstr "प्लगइन अपयश"
+
+#. 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:404
+msgid " files"
+msgstr " फाइल्स्"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
+msgid "Unknown"
+msgstr "अपरिचीत"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:414
+#, c-format
+msgctxt "Title string for images"
+msgid "%s (%dx%d pixels)"
+msgstr "%s (%dx%d पिक्सेल्स्)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
+msgid "Loading..."
+msgstr "लोड करत आहे..."
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:431
+msgid "Live Broadcast"
+msgstr "लाइव्ह ब्रॉडकास्ट"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:437
+msgid "audio element controller"
+msgstr "ऑडिओ एलिमेंट कंट्रोलर"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:439
+msgid "video element controller"
+msgstr "व्हिडीओ एलिमेंट कंट्रोलर"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:441
+msgid "mute"
+msgstr "मंद करा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:443
+msgid "unmute"
+msgstr "मंद अशक्य करा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:445
+msgid "play"
+msgstr "चालवा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:447
+msgid "pause"
+msgstr "थांबा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:449
+msgid "movie time"
+msgstr "चित्रपट वेळ"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:451
+msgid "timeline slider thumb"
+msgstr "टाइमलाइन स्लाइडर थंब"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:453
+msgid "back 30 seconds"
+msgstr "मागे 30 सेकंद"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:455
+msgid "return to realtime"
+msgstr "रिअलटाइमकडे जा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:457
+msgid "elapsed time"
+msgstr "गेलेला वेळ"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:459
+msgid "remaining time"
+msgstr "उर्वरित वेळ"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
+msgid "status"
+msgstr "स्थिती"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:463
+msgid "fullscreen"
+msgstr "पडदाभर"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:465
+msgid "fast forward"
+msgstr "फास्ट फॉरवर्ड"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:467
+msgid "fast reverse"
+msgstr "फास्ट रिव्हर्स्"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:469
+msgid "show closed captions"
+msgstr "क्लोस्ड कॅपशन्स् दाखवा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:471
+msgid "hide closed captions"
+msgstr "क्लोस्ड् कॅप्शन्स् लपवा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:480
+msgid "audio element playback controls and status display"
+msgstr "ऑडिओ एलिमेंट प्लेबॅक कंट्रोल्स् व स्थिती डिस्पले"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:482
+msgid "video element playback controls and status display"
+msgstr "व्हिडीओ एलिमेंट प्लेबॅक कंट्रोल्स् व स्थिती डिस्पले"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:484
+msgid "mute audio tracks"
+msgstr "ऑडिओ ट्रॅक्स् मंद करा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:486
+msgid "unmute audio tracks"
+msgstr "ऑडिओ ट्रॅक्स् मंद अशक्य करा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:488
+msgid "begin playback"
+msgstr "प्लेबॅक सुरू करा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:490
+msgid "pause playback"
+msgstr "प्लेबॅक थांबवा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:492
+msgid "movie time scrubber"
+msgstr "चित्रपट वेळ स्क्रुबर"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:494
+msgid "movie time scrubber thumb"
+msgstr "चित्रपट वेळ स्क्रुबर थंब"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:496
+msgid "seek movie back 30 seconds"
+msgstr "सीक मुव्हि मागे 30 सेकंद"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:498
+msgid "return streaming movie to real time"
+msgstr "स्ट्रिमिंग मुव्हि ते रिअल टाइम पुरवा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:500
+msgid "current movie time in seconds"
+msgstr "सध्याचे सेकंदातील मुव्हि वेळ"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
+msgid "number of seconds of movie remaining"
+msgstr "उर्वरित चित्रपटकरीता सेकंदातील वेळ"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:504
+msgid "current movie status"
+msgstr "चित्रपटची सध्याची स्थिती"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:506
+msgid "seek quickly back"
+msgstr "पटकन मागे सीक करा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:508
+msgid "seek quickly forward"
+msgstr "पटकन पुढे सीक करा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:510
+msgid "Play movie in fullscreen mode"
+msgstr "चित्रपटला पडदाभर मोडमध्ये चालवा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
+msgid "start displaying closed captions"
+msgstr "बंद कॅपशन्स् दाखवायला सुरू करा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:514
+msgid "stop displaying closed captions"
+msgstr "बंद कॅपशन्स् दाखवणे बंद करा"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:523
+msgid "indefinite time"
+msgstr "अमर्यादीत वेळ"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:553
+msgid "value missing"
+msgstr "मूल्य आढळले नाही"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:589
+msgid "type mismatch"
+msgstr "टाइप जुळले नाही"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:612
+msgid "pattern mismatch"
+msgstr "पॅटर्न जुळले नाही"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:617
+msgid "too long"
+msgstr "खूपच लांब"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:622
+msgid "range underflow"
+msgstr "रेंज अंडरफ्लो"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:627
+msgid "range overflow"
+msgstr "रेंज ओव्हरफ्लो"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:632
+msgid "step mismatch"
+msgstr "स्टेप जुळले नाही"
+
+
diff --git a/Source/WebKit/gtk/po/nb.po b/Source/WebKit/gtk/po/nb.po
index 196e37169..233d2e56a 100644
--- a/Source/WebKit/gtk/po/nb.po
+++ b/Source/WebKit/gtk/po/nb.po
@@ -1,1104 +1,1271 @@
# Norwegian bokmål translation of Epiphany
# Copyright (C) 2000-2003, 2005 Free Software Foundation, Inc.
# Ola Sverre Bauge <osb@plover.net>, 2000.
-# Kjartan Maraas <kmaraas@gnome.org>, 2000-2010.
+# Kjartan Maraas <kmaraas@gnome.org>, 2000-2011.
# Roy-Magne Mo <rmo@sunnmore.net>, 2001.
# Terance Edward Sola <terance@lyse.net>, 2005.
# Øivind Hoel <ohoel@cvs.gnome.org>, 2006.
msgid ""
msgstr ""
-"Project-Id-Version: epiphany 2.29.x\n"
+"Project-Id-Version: webkitgtk 1.7.x\n"
"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n"
-"POT-Creation-Date: 2010-02-25 15:53-0300\n"
-"PO-Revision-Date: 2010-04-05 14:36+0200\n"
+"POT-Creation-Date: 2011-11-24 22:02+0100\n"
+"PO-Revision-Date: 2011-12-06 08:21+0100\n"
"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
"Language-Team: Norwegian Bokmal <i18n-nb@lister.ping.uio.no>\n"
+"Language: nb\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535
+#: Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:766
msgid "Upload File"
-msgstr ""
+msgstr "Last opp fil"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143
+#: Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:62
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:214
msgid "Input _Methods"
-msgstr ""
+msgstr "Inndata_metoder"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78
+#: Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79
msgid "LRM _Left-to-right mark"
msgstr ""
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79
+#: Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80
msgid "RLM _Right-to-left mark"
msgstr ""
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80
+#: Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81
msgid "LRE Left-to-right _embedding"
msgstr ""
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81
+#: Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82
msgid "RLE Right-to-left e_mbedding"
msgstr ""
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82
+#: Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83
msgid "LRO Left-to-right _override"
msgstr ""
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83
+#: Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84
msgid "RLO Right-to-left o_verride"
msgstr ""
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84
+#: Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85
msgid "PDF _Pop directional formatting"
msgstr ""
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85
+#: Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86
msgid "ZWS _Zero width space"
msgstr ""
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86
+#: Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87
msgid "ZWJ Zero width _joiner"
msgstr ""
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87
+#: Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:88
msgid "ZWNJ Zero width _non-joiner"
msgstr ""
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138
+#: Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:110
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:209
msgid "_Insert Unicode Control Character"
msgstr ""
-#: WebKit/gtk/webkit/webkitdownload.cpp:266
+#: Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp:389
+msgid "Play"
+msgstr "spill av"
+
+#: Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp:391
+msgid "Pause"
+msgstr "pause"
+
+#: Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp:541
+msgid "Play / Pause"
+msgstr "Spill av / pause"
+
+#: Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp:541
+msgid "Play or pause the media"
+msgstr "Spill av eller sett medie på pause"
+
+#: Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp:549
+msgid "Time:"
+msgstr "Tid:"
+
+#: Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp:576
+msgid "Exit Fullscreen"
+msgstr "Avslutt fullskjerm"
+
+#: Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp:576
+msgid "Exit from fullscreen mode"
+msgstr "Forlat fullskjermmodus"
+
+#: Source/WebKit/gtk/webkit/webkitdownload.cpp:275
msgid "Network Request"
-msgstr ""
+msgstr "Nettverksforespørsel"
-#: WebKit/gtk/webkit/webkitdownload.cpp:267
+#: Source/WebKit/gtk/webkit/webkitdownload.cpp:276
msgid "The network request for the URI that should be downloaded"
msgstr ""
-#: WebKit/gtk/webkit/webkitdownload.cpp:281
+#: Source/WebKit/gtk/webkit/webkitdownload.cpp:290
msgid "Network Response"
-msgstr ""
+msgstr "Nettverkssvar"
-#: WebKit/gtk/webkit/webkitdownload.cpp:282
+#: Source/WebKit/gtk/webkit/webkitdownload.cpp:291
msgid "The network response for the URI that should be downloaded"
msgstr ""
-#: WebKit/gtk/webkit/webkitdownload.cpp:296
+#: Source/WebKit/gtk/webkit/webkitdownload.cpp:305
msgid "Destination URI"
-msgstr ""
+msgstr "Mål-URI"
-#: WebKit/gtk/webkit/webkitdownload.cpp:297
+#: Source/WebKit/gtk/webkit/webkitdownload.cpp:306
msgid "The destination URI where to save the file"
msgstr ""
-#: WebKit/gtk/webkit/webkitdownload.cpp:311
+#: Source/WebKit/gtk/webkit/webkitdownload.cpp:320
msgid "Suggested Filename"
-msgstr ""
+msgstr "Foreslått filnavn"
-#: WebKit/gtk/webkit/webkitdownload.cpp:312
+#: Source/WebKit/gtk/webkit/webkitdownload.cpp:321
msgid "The filename suggested as default when saving"
-msgstr ""
+msgstr "Filnavn som foreslås som forvalg ved lagring"
# (ugh)
-#: WebKit/gtk/webkit/webkitdownload.cpp:329
+#: Source/WebKit/gtk/webkit/webkitdownload.cpp:338
msgid "Progress"
msgstr "Fremdrift"
-#: WebKit/gtk/webkit/webkitdownload.cpp:330
+#: Source/WebKit/gtk/webkit/webkitdownload.cpp:339
msgid "Determines the current progress of the download"
msgstr ""
-#: WebKit/gtk/webkit/webkitdownload.cpp:343
+#: Source/WebKit/gtk/webkit/webkitdownload.cpp:352
msgid "Status"
msgstr "Status"
-#: WebKit/gtk/webkit/webkitdownload.cpp:344
+#: Source/WebKit/gtk/webkit/webkitdownload.cpp:353
msgid "Determines the current status of the download"
-msgstr ""
+msgstr "Bestemmer aktiv status for nedlastingen"
-#: WebKit/gtk/webkit/webkitdownload.cpp:359
+#: Source/WebKit/gtk/webkit/webkitdownload.cpp:368
msgid "Current Size"
-msgstr ""
+msgstr "Nåværende størrelse"
-#: WebKit/gtk/webkit/webkitdownload.cpp:360
+#: Source/WebKit/gtk/webkit/webkitdownload.cpp:369
msgid "The length of the data already downloaded"
msgstr ""
-#: WebKit/gtk/webkit/webkitdownload.cpp:374
+#: Source/WebKit/gtk/webkit/webkitdownload.cpp:383
msgid "Total Size"
msgstr "Total størrelse"
-#: WebKit/gtk/webkit/webkitdownload.cpp:375
+#: Source/WebKit/gtk/webkit/webkitdownload.cpp:384
msgid "The total size of the file"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:526
-msgid "User cancelled the download"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248
-#, c-format
-msgid "A username and password are being requested by the site %s"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278
-msgid "Server message:"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291
-msgid "Username:"
-msgstr "Brukernavn:"
-
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293
-msgid "Password:"
-msgstr "Passord:"
-
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302
-msgid "_Remember password"
-msgstr "Husk passo_rd"
+msgstr "Total størrelse på filen"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:298
+#: Source/WebKit/gtk/webkit/webkitwebframe.cpp:316
msgid "Name"
msgstr "Navn"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:299
+#: Source/WebKit/gtk/webkit/webkitwebframe.cpp:317
msgid "The name of the frame"
-msgstr ""
+msgstr "Navn på rammen"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:305
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146
-#: WebKit/gtk/webkit/webkitwebview.cpp:2318
+#: Source/WebKit/gtk/webkit/webkitwebframe.cpp:323
+#: Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp:144
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2765
msgid "Title"
msgstr "Tittel"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:306
+#: Source/WebKit/gtk/webkit/webkitwebframe.cpp:324
msgid "The document title of the frame"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebframe.cpp:312
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178
-#: WebKit/gtk/webkit/webkitwebview.cpp:2332
+#: Source/WebKit/gtk/webkit/webkitwebframe.cpp:330
+#: Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp:176
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2779
msgid "URI"
msgstr "URI"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:313
+#: Source/WebKit/gtk/webkit/webkitwebframe.cpp:331
msgid "The current URI of the contents displayed by the frame"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebframe.cpp:344
+#: Source/WebKit/gtk/webkit/webkitwebframe.cpp:362
msgid "Horizontal Scrollbar Policy"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebframe.cpp:345
+#: Source/WebKit/gtk/webkit/webkitwebframe.cpp:363
msgid ""
"Determines the current policy for the horizontal scrollbar of the frame."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebframe.cpp:362
+#: Source/WebKit/gtk/webkit/webkitwebframe.cpp:380
msgid "Vertical Scrollbar Policy"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebframe.cpp:363
+#: Source/WebKit/gtk/webkit/webkitwebframe.cpp:381
msgid "Determines the current policy for the vertical scrollbar of the frame."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147
+#: Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp:145
#, fuzzy
msgid "The title of the history item"
msgstr "Sideinformasjon som vises i historikkvisning"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162
+#: Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp:160
msgid "Alternate Title"
-msgstr ""
+msgstr "Alternativ tittel"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163
+#: Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp:161
#, fuzzy
msgid "The alternate title of the history item"
msgstr "Sideinformasjon som vises i historikkvisning"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179
+#: Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp:177
#, fuzzy
msgid "The URI of the history item"
msgstr "Åpne historikkvinduet"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173
+#: Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp:192
+#: Source/WebKit/gtk/webkit/webkitwebnavigationaction.cpp:162
msgid "Original URI"
-msgstr ""
+msgstr "Opprinnelig URI"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195
+#: Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp:193
#, fuzzy
msgid "The original URI of the history item"
msgstr "Sideinformasjon som vises i historikkvisning"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210
+#: Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp:208
#, fuzzy
msgid "Last visited Time"
msgstr "Oftest besøkt"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211
+#: Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp:209
msgid "The time at which the history item was last visited"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:268
-#, fuzzy
+#: Source/WebKit/gtk/webkit/webkitwebinspector.cpp:273
msgid "Web View"
-msgstr "_Vis"
+msgstr "Nettvisning"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:269
+#: Source/WebKit/gtk/webkit/webkitwebinspector.cpp:274
msgid "The Web View that renders the Web Inspector itself"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:282
+#: Source/WebKit/gtk/webkit/webkitwebinspector.cpp:287
msgid "Inspected URI"
-msgstr ""
+msgstr "Inspisert URI"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:283
+#: Source/WebKit/gtk/webkit/webkitwebinspector.cpp:288
msgid "The URI that is currently being inspected"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:299
+#: Source/WebKit/gtk/webkit/webkitwebinspector.cpp:304
msgid "Enable JavaScript profiling"
msgstr "Aktiver profilering av JavaScript"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:300
+#: Source/WebKit/gtk/webkit/webkitwebinspector.cpp:305
msgid "Profile the executed JavaScript."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:315
+#: Source/WebKit/gtk/webkit/webkitwebinspector.cpp:320
#, fuzzy
msgid "Enable Timeline profiling"
msgstr "Aktiver myk rulling"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:316
+#: Source/WebKit/gtk/webkit/webkitwebinspector.cpp:321
msgid "Profile the WebCore instrumentation."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158
+#: Source/WebKit/gtk/webkit/webkitwebnavigationaction.cpp:147
msgid "Reason"
msgstr "Årsak"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159
+#: Source/WebKit/gtk/webkit/webkitwebnavigationaction.cpp:148
msgid "The reason why this navigation is occurring"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174
+#: Source/WebKit/gtk/webkit/webkitwebnavigationaction.cpp:163
msgid "The URI that was requested as the target for the navigation"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188
+#: Source/WebKit/gtk/webkit/webkitwebnavigationaction.cpp:177
msgid "Button"
msgstr "Knapp"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189
+#: Source/WebKit/gtk/webkit/webkitwebnavigationaction.cpp:178
msgid "The button used to click"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204
+#: Source/WebKit/gtk/webkit/webkitwebnavigationaction.cpp:193
msgid "Modifier state"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205
+#: Source/WebKit/gtk/webkit/webkitwebnavigationaction.cpp:194
msgid "A bitmask representing the state of the modifier keys"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220
+#: Source/WebKit/gtk/webkit/webkitwebnavigationaction.cpp:209
msgid "Target frame"
-msgstr ""
+msgstr "Målramme"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221
+#: Source/WebKit/gtk/webkit/webkitwebnavigationaction.cpp:210
msgid "The target frame for the navigation"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:237
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:220
msgid "Default Encoding"
msgstr "Forvalgt koding"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:238
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:221
msgid "The default encoding used to display text."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:246
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:229
msgid "Cursive Font Family"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:247
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:230
msgid "The default Cursive font family used to display text."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:255
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:238
msgid "Default Font Family"
msgstr "Forvalgt skriftfamilie"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:256
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:239
msgid "The default font family used to display text."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:264
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:247
msgid "Fantasy Font Family"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:265
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:248
msgid "The default Fantasy font family used to display text."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:273
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:256
msgid "Monospace Font Family"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:274
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:257
msgid "The default font family used to display monospace text."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:282
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:265
msgid "Sans Serif Font Family"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:283
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:266
msgid "The default Sans Serif font family used to display text."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:291
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:274
msgid "Serif Font Family"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:292
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:275
msgid "The default Serif font family used to display text."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:300
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:283
msgid "Default Font Size"
msgstr "Forvalgt skriftstørrelse"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:301
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:284
msgid "The default font size used to display text."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:309
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:292
msgid "Default Monospace Font Size"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:310
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:293
msgid "The default font size used to display monospace text."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:318
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:301
msgid "Minimum Font Size"
msgstr "Minste skriftstørrelse"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:319
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:302
msgid "The minimum font size used to display text."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:327
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:310
#, fuzzy
msgid "Minimum Logical Font Size"
msgstr "Minste skriftstørrelse"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:328
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:311
msgid "The minimum logical font size used to display text."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:347
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:330
msgid "Enforce 96 DPI"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:348
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:331
msgid "Enforce a resolution of 96 DPI"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:356
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:339
msgid "Auto Load Images"
-msgstr ""
+msgstr "Last bilder automatisk"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:357
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:340
msgid "Load images automatically."
-msgstr ""
+msgstr "Last bilder automatisk."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:365
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:348
msgid "Auto Shrink Images"
-msgstr ""
+msgstr "Krymp bilder automatisk"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:366
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:349
msgid "Automatically shrink standalone images to fit."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:374
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:357
msgid "Print Backgrounds"
msgstr "Skriv ut bakgrunn"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:375
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:358
#, fuzzy
msgid "Whether background images should be printed."
msgstr "Om bakgrunnsbilder skal skrives ut"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:383
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:366
msgid "Enable Scripts"
msgstr "Slå på JavaScript"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:384
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:367
msgid "Enable embedded scripting languages."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:392
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:375
msgid "Enable Plugins"
msgstr "Aktiver tillegg"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:393
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:376
msgid "Enable embedded plugin objects."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:401
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:384
msgid "Resizable Text Areas"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:402
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:385
msgid "Whether text areas are resizable."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:409
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:392
#, fuzzy
msgid "User Stylesheet URI"
msgstr "Bruk egendefinert _stilark"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:410
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:393
msgid "The URI of a stylesheet that is applied to every page."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:425
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:408
msgid "Zoom Stepping Value"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:426
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:409
msgid "The value by which the zoom level is changed when zooming in or out."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:444
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:427
msgid "Enable Developer Extras"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:445
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:428
msgid "Enables special extensions that help developers"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:465
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:448
msgid "Enable Private Browsing"
msgstr "Slå på privat nettlesing"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:466
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:449
msgid "Enables private browsing mode"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:481
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:464
msgid "Enable Spell Checking"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:482
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:465
msgid "Enables spell checking while typing"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:505
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:488
msgid "Languages to use for spell checking"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:506
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:489
msgid "Comma separated list of languages to use for spell checking"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:520
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:503
#, fuzzy
msgid "Enable Caret Browsing"
msgstr "Aktiver myk rulling"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:521
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:504
+#, fuzzy
msgid "Whether to enable accessibility enhanced keyboard navigation"
-msgstr ""
+msgstr "Om bakgrunnen skal skrives ut"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:536
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:519
msgid "Enable HTML5 Database"
-msgstr ""
+msgstr "Slå på HTML5-database"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:537
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:520
msgid "Whether to enable HTML5 database support"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:552
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:535
msgid "Enable HTML5 Local Storage"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:553
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:536
msgid "Whether to enable HTML5 Local Storage support"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:567
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:551
+msgid "Local Storage Database Path"
+msgstr ""
+
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:552
+msgid "The path to where HTML5 Local Storage databases are stored."
+msgstr ""
+
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:566
msgid "Enable XSS Auditor"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:568
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:567
+#, fuzzy
+msgid "Whether to enable the XSS auditor"
+msgstr "Om bakgrunnen skal skrives ut"
+
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:585
+msgid "Enable Spatial Navigation"
+msgstr ""
+
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:586
+#, fuzzy
+msgid "Whether to enable Spatial Navigation"
+msgstr "Om bakgrunnen skal skrives ut"
+
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:604
+msgid "Enable Frame Flattening"
+msgstr ""
+
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:605
#, fuzzy
-msgid "Whether to enable teh XSS auditor"
+msgid "Whether to enable Frame Flattening"
msgstr "Om bakgrunnen skal skrives ut"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:586
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:622
msgid "User Agent"
msgstr "Brukeragent"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:587
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:623
msgid "The User-Agent string used by WebKitGtk"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:602
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:638
msgid "JavaScript can open windows automatically"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:603
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:639
msgid "Whether JavaScript can open windows automatically"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:618
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:653
+msgid "JavaScript can access Clipboard"
+msgstr ""
+
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:654
+msgid "Whether JavaScript can access Clipboard"
+msgstr ""
+
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:670
msgid "Enable offline web application cache"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:619
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:671
msgid "Whether to enable offline web application cache"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:646
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:696
msgid "Editing behavior"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:647
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:697
msgid "The behavior mode to use in editing mode"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:663
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:713
msgid "Enable universal access from file URIs"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:664
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:714
msgid "Whether to allow universal access from file URIs"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:679
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:729
msgid "Enable DOM paste"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:680
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:730
msgid "Whether to enable DOM paste"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:698
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:748
msgid "Tab key cycles through elements"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:699
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:749
msgid "Whether the tab key cycles through elements on the page."
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:719
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:769
msgid "Enable Default Context Menu"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:720
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:770
msgid ""
"Enables the handling of right-clicks for the creation of the default context "
"menu"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:740
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:790
msgid "Enable Site Specific Quirks"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:741
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:791
msgid "Enables the site-specific compatibility workarounds"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:763
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:813
msgid "Enable page cache"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:764
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:814
msgid "Whether the page cache should be used"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:784
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:834
msgid "Auto Resize Window"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:785
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:835
msgid "Automatically resize the toplevel window when a page requests it"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:817
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:867
msgid "Enable Java Applet"
msgstr "Slå på Java-applet"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:818
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:868
msgid "Whether Java Applet support through <applet> should be enabled"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebview.cpp:2319
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:882
+#, fuzzy
+msgid "Enable Hyperlink Auditing"
+msgstr "Aktiver myk rulling"
+
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:883
+msgid "Whether <a ping> should be able to send pings"
+msgstr ""
+
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:891
+msgid "Enable Fullscreen"
+msgstr "Slå på fullskjerm"
+
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:892
+msgid "Whether the Mozilla style API should be enabled."
+msgstr ""
+
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:907
+msgid "Enable WebGL"
+msgstr "Slå på WebGL"
+
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:908
+#, fuzzy
+msgid "Whether WebGL content should be rendered"
+msgstr "Om bakgrunnsbilder skal skrives ut"
+
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:923
+msgid "WebKit prefetches domain names"
+msgstr ""
+
+#: Source/WebKit/gtk/webkit/webkitwebsettings.cpp:924
+msgid "Whether WebKit prefetches domain names"
+msgstr ""
+
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2766
msgid "Returns the @web_view's document title"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebview.cpp:2333
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2780
msgid "Returns the current URI of the contents displayed by the @web_view"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebview.cpp:2346
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2793
msgid "Copy target list"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebview.cpp:2347
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2794
msgid "The list of targets this web view supports for clipboard copying"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebview.cpp:2360
-#, fuzzy
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2807
msgid "Paste target list"
-msgstr "Lim inn utklippstavlen"
+msgstr "Lim inn mållisten"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2361
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2808
msgid "The list of targets this web view supports for clipboard pasting"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebview.cpp:2367
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2814
msgid "Settings"
msgstr "Innstillinger"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2368
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2815
msgid "An associated WebKitWebSettings instance"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebview.cpp:2381
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2828
msgid "Web Inspector"
msgstr "Inspeksjon av nettsider"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2382
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2829
msgid "The associated WebKitWebInspector instance"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebview.cpp:2402
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2842
+msgid "Viewport Attributes"
+msgstr ""
+
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2843
+msgid "The associated WebKitViewportAttributes instance"
+msgstr ""
+
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2863
msgid "Editable"
msgstr "Redigerbar"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2403
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2864
#, fuzzy
msgid "Whether content can be modified by the user"
msgstr "Bruk koding som spesifisert av dokumentet"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2409
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2870
msgid "Transparent"
msgstr "Gjennomsiktig"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2410
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2871
#, fuzzy
msgid "Whether content has a transparent background"
msgstr "Om bakgrunnen skal skrives ut"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2423
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2884
msgid "Zoom level"
msgstr "Zoom-nivå"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2424
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2885
msgid "The level of zoom of the content"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebview.cpp:2439
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2900
msgid "Full content zoom"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebview.cpp:2440
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2901
msgid "Whether the full content is scaled when zooming"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebview.cpp:2453
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2914
msgid "Encoding"
msgstr "Koding"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2454
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2915
msgid "The default encoding of the web view"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebview.cpp:2467
-#, fuzzy
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2928
msgid "Custom Encoding"
-msgstr "Tekstkoding"
+msgstr "Egendefinert koding"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2468
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2929
msgid "The custom encoding of the web view"
msgstr ""
-#: WebKit/gtk/webkit/webkitwebview.cpp:2520
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2981
msgid "Icon URI"
-msgstr ""
+msgstr "URI til ikon"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2521
+#: Source/WebKit/gtk/webkit/webkitwebview.cpp:2982
msgid "The URI for the favicon for the #WebKitWebView."
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60
+#: Source/WebCore/platform/gtk/ErrorsGtk.cpp:33
+msgid "Load request cancelled"
+msgstr ""
+
+#: Source/WebCore/platform/gtk/ErrorsGtk.cpp:39
+msgid "Not allowed to use restricted network port"
+msgstr ""
+
+#: Source/WebCore/platform/gtk/ErrorsGtk.cpp:45
+msgid "URL cannot be shown"
+msgstr ""
+
+#: Source/WebCore/platform/gtk/ErrorsGtk.cpp:51
+msgid "Frame load was interrupted"
+msgstr ""
+
+#: Source/WebCore/platform/gtk/ErrorsGtk.cpp:57
+msgid "Content with the specified MIME type cannot be shown"
+msgstr ""
+
+#: Source/WebCore/platform/gtk/ErrorsGtk.cpp:63
+msgid "File does not exist"
+msgstr ""
+
+#: Source/WebCore/platform/gtk/ErrorsGtk.cpp:69
+msgid "Plugin will handle load"
+msgstr ""
+
+#: Source/WebCore/platform/gtk/ErrorsGtk.cpp:81
+msgid "User cancelled the download"
+msgstr "Bruker avbrøt nedlastingen"
+
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:56
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:61
msgid "Submit"
msgstr "Send inn"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:66
msgid "Reset"
msgstr "Nullstill"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:71
+msgid "Details"
+msgstr ""
+
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:76
msgid "This is a searchable index. Enter search keywords: "
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:81
msgid "Choose File"
msgstr "Velg fil"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:86
+#, fuzzy
+msgid "Choose Files"
+msgstr "Velg fil"
+
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:91
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:96
msgid "(None)"
msgstr "(Ingen)"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:101
msgid "Open Link in New _Window"
msgstr "Åpne lenke i nytt _vindu"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:106
#, fuzzy
msgid "_Download Linked File"
msgstr "Last ne_d lenke"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:111
msgid "Copy Link Loc_ation"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:116
msgid "Open _Image in New Window"
msgstr "Åpne b_ilde i nytt vindu"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:121
msgid "Sa_ve Image As"
msgstr "La_gre bilde som"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:126
msgid "Cop_y Image"
msgstr "Kop_ier bilde"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:131
#, fuzzy
+msgid "Copy Image _Address"
+msgstr "Kop_ier bilde"
+
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:136
+msgid "Open _Video in New Window"
+msgstr "Åpne _video i nytt vindu"
+
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:141
+msgid "Open _Audio in New Window"
+msgstr "Åpne _lyd i nytt vindu"
+
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:146
+msgid "Cop_y Video Link Location"
+msgstr ""
+
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:151
+msgid "Cop_y Audio Link Location"
+msgstr ""
+
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:156
+msgid "_Toggle Media Controls"
+msgstr ""
+
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:161
+msgid "Toggle Media _Loop Playback"
+msgstr ""
+
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
+msgid "Switch Video to _Fullscreen"
+msgstr ""
+
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:171
+msgid "_Play"
+msgstr "S_pill av"
+
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:176
+msgid "_Pause"
+msgstr "_Pause"
+
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:181
+msgid "_Mute"
+msgstr "De_mp"
+
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:186
msgid "Open _Frame in New Window"
-msgstr "Åpne i nytt _vindu"
+msgstr "Åpne _ramme i nytt vindu"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:237
msgid "_Reload"
msgstr "_Last om"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:254
msgid "No Guesses Found"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:259
msgid "_Ignore Spelling"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:264
msgid "_Learn Spelling"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:269
msgid "_Search the Web"
msgstr "_Søk på nettet"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:274
msgid "_Look Up in Dictionary"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:279
msgid "_Open Link"
msgstr "_Åpne lenke"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:284
msgid "Ignore _Grammar"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:289
msgid "Spelling and _Grammar"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:294
msgid "_Show Spelling and Grammar"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:294
msgid "_Hide Spelling and Grammar"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:299
msgid "_Check Document Now"
msgstr "_Sjekk dokumentet nå"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:304
msgid "Check Spelling While _Typing"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:309
msgid "Check _Grammar With Spelling"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:314
msgid "_Font"
msgstr "Skri_ft"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:337
msgid "_Outline"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
msgid "Inspect _Element"
msgstr "Inspiser _element"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
msgid "No recent searches"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:352
msgid "Recent searches"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:357
msgid "_Clear recent searches"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:362
#, fuzzy
msgid "term"
msgstr "Andre"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:367
msgid "definition"
msgstr "definisjon"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301
-#, fuzzy
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:372
msgid "press"
-msgstr "Adresse"
+msgstr "trykk"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
msgid "select"
msgstr "velg"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:382
msgid "activate"
msgstr "slå på"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:387
msgid "uncheck"
-msgstr ""
+msgstr "fjern avkryssing"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:392
msgid "check"
msgstr "sjekk"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:397
msgid "jump"
msgstr "hopp"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:412
+msgid "Missing Plug-in"
+msgstr "Mangler tillegg"
+
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:418
+msgid "Plug-in Failure"
+msgstr ""
+
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:424
msgid " files"
msgstr " filer"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:429
msgid "Unknown"
msgstr "Ukjent"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:446
msgid "Loading..."
msgstr "Laster..."
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:451
msgid "Live Broadcast"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:457
msgid "audio element controller"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:459
msgid "video element controller"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
msgid "mute"
msgstr "demp"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:463
msgid "unmute"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:465
msgid "play"
msgstr "spill av"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:467
msgid "pause"
msgstr "pause"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:469
msgid "movie time"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:471
msgid "timeline slider thumb"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:473
msgid "back 30 seconds"
msgstr "tilbake 30 sekunder"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:475
msgid "return to realtime"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:477
msgid "elapsed time"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:479
msgid "remaining time"
msgstr "gjenstående tid"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:481
msgid "status"
msgstr "status"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:483
msgid "fullscreen"
msgstr "fullskjerm"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403
-#, fuzzy
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:485
msgid "fast forward"
-msgstr "_Fremover"
+msgstr "spol fremover"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405
-#, fuzzy
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:487
msgid "fast reverse"
-msgstr "Tidligere utviklere:"
+msgstr "spol tilbake"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:489
msgid "show closed captions"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:491
msgid "hide closed captions"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:500
msgid "audio element playback controls and status display"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
msgid "video element playback controls and status display"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:504
msgid "mute audio tracks"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:506
msgid "unmute audio tracks"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:508
msgid "begin playback"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:510
msgid "pause playback"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
msgid "movie time scrubber"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:514
msgid "movie time scrubber thumb"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:516
msgid "seek movie back 30 seconds"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:518
msgid "return streaming movie to real time"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:520
msgid "current movie time in seconds"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:522
msgid "number of seconds of movie remaining"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:524
msgid "current movie status"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:526
msgid "seek quickly back"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:528
msgid "seek quickly forward"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448
-#, fuzzy
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:530
msgid "Play movie in fullscreen mode"
-msgstr "Lås i fullskjermmodus"
+msgstr "Spill av film i fullskjermmodus"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:532
msgid "start displaying closed captions"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:534
msgid "stop displaying closed captions"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:543
msgid "indefinite time"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:573
msgid "value missing"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:609
msgid "type mismatch"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:632
msgid "pattern mismatch"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:637
msgid "too long"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:642
msgid "range underflow"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:647
msgid "range overflow"
msgstr ""
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522
+#: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp:652
msgid "step mismatch"
msgstr ""
-
diff --git a/Source/WebKit/gtk/po/sl.po b/Source/WebKit/gtk/po/sl.po
index 9e6d6bf84..30a1fc554 100644
--- a/Source/WebKit/gtk/po/sl.po
+++ b/Source/WebKit/gtk/po/sl.po
@@ -1,17 +1,19 @@
-# Slovenian translation of webkit.
+# Slovenian translations for webkit.
# Copyright (C) 2002-2007 Free Software Foundation, Inc.
# This file is distributed under the same license as the webkit package.
#
-# Matej Urbančič <mateju@svn.gnome.org>, 2010.
+# Matej Urbančič <mateju@svn.gnome.org>, 2010 - 2012.
+# Martin Srebotnjak <miles@filmsi.net>, 2011 - 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: webkit HEAD\n"
-"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n"
-"POT-Creation-Date: 2010-02-25 15:53-0300\n"
-"PO-Revision-Date: 2010-03-14 21:30+0100\n"
+"Report-Msgid-Bugs-To: http://bugs.webkit.org\n"
+"POT-Creation-Date: 2010-12-27 15:26+0000\n"
+"PO-Revision-Date: 2012-03-03 22:18+0100\n"
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -20,1074 +22,1393 @@ msgstr ""
"X-Poedit-Language: Slovenian\n"
"X-Poedit-SourceCharset: utf-8\n"
-#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535
+#: ../WebCoreSupport/ChromeClientGtk.cpp:589
msgid "Upload File"
msgstr "Naloži datoteko"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:63
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:194
msgid "Input _Methods"
msgstr "_Načini vnosa"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:80
msgid "LRM _Left-to-right mark"
msgstr "LRM oznaka _Leva-proti-desni"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:81
msgid "RLM _Right-to-left mark"
msgstr "RLM oznaka _Desna-proti-levi"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:82
msgid "LRE Left-to-right _embedding"
msgstr "LRE _Leva-proti-desni _vgradnja"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:83
msgid "RLE Right-to-left e_mbedding"
msgstr "RLE Desna-proti-levi v_gradnja"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:84
msgid "LRO Left-to-right _override"
msgstr "LRO Leva-proti-desni _prepis"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:85
msgid "RLO Right-to-left o_verride"
msgstr "RLO Desna-proti-levi p_repis"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:86
msgid "PDF _Pop directional formatting"
msgstr "PDF _Odprto usmerjeno oblikovanje"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:87
msgid "ZWS _Zero width space"
msgstr "ZWS Presledek _nične dolžine"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:88
msgid "ZWJ Zero width _joiner"
msgstr "ZWJ _združevalnik nične širine"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:89
msgid "ZWNJ Zero width _non-joiner"
msgstr "ZWNJ _razdruževalnik nične širine"
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138
+#: ../WebCoreSupport/ContextMenuClientGtk.cpp:111
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:189
msgid "_Insert Unicode Control Character"
msgstr "_Vstavi nadzorni znak Unicode"
-#: WebKit/gtk/webkit/webkitdownload.cpp:266
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1180
+msgid "Load request cancelled"
+msgstr "Zahteva po nalaganju preklicana"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1186
+msgid "Not allowed to use restricted network port"
+msgstr "Vrat z omejenim dostopom ni dovoljeno uporabljati"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1192
+msgid "URL cannot be shown"
+msgstr "Naslova URL ni mogoče prikazati"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1198
+msgid "Frame load was interrupted"
+msgstr "Nalaganje okvirja je bilo prekinjeno"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1204
+msgid "Content with the specified MIME type cannot be shown"
+msgstr "Vsebina navedene vrste MIME ni mogoče prikazati"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1210
+msgid "File does not exist"
+msgstr "Datoteka ne obstaja"
+
+#: ../WebCoreSupport/FrameLoaderClientGtk.cpp:1216
+msgid "Plugin will handle load"
+msgstr "Vstavek bo prenesel obremenitev"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:385
+msgid "Play"
+msgstr "Predvajaj"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:387
+msgid "Pause"
+msgstr "Premor"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:533
+msgid "Play / Pause"
+msgstr "Predvajaj / premor"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:533
+msgid "Play or pause the media"
+msgstr "Predvajaj ali ustavi predvajanje"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:541
+msgid "Time:"
+msgstr "Čas:"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:565
+msgid "Exit Fullscreen"
+msgstr "Izklopi celozaslonski način"
+
+#: ../WebCoreSupport/FullscreenVideoController.cpp:565
+msgid "Exit from fullscreen mode"
+msgstr "Izhod iz celozaslonskega načina"
+
+#: ../webkit/webkitdownload.cpp:273
msgid "Network Request"
msgstr "Omrežna zahteva"
-#: WebKit/gtk/webkit/webkitdownload.cpp:267
+#: ../webkit/webkitdownload.cpp:274
msgid "The network request for the URI that should be downloaded"
msgstr "Zahteva omrežja za naslov URI, ki naj bo prejet"
-#: WebKit/gtk/webkit/webkitdownload.cpp:281
+#: ../webkit/webkitdownload.cpp:288
msgid "Network Response"
msgstr "Omrežni odziv"
-#: WebKit/gtk/webkit/webkitdownload.cpp:282
+#: ../webkit/webkitdownload.cpp:289
msgid "The network response for the URI that should be downloaded"
msgstr "Odgovor omrežja za naslov URI, ki naj bo prejet"
-#: WebKit/gtk/webkit/webkitdownload.cpp:296
+#: ../webkit/webkitdownload.cpp:303
msgid "Destination URI"
msgstr "Ciljni URI"
-#: WebKit/gtk/webkit/webkitdownload.cpp:297
+#: ../webkit/webkitdownload.cpp:304
msgid "The destination URI where to save the file"
msgstr "Ciljni naslov URI kamor bo shranjena datoteka"
-#: WebKit/gtk/webkit/webkitdownload.cpp:311
+#: ../webkit/webkitdownload.cpp:318
msgid "Suggested Filename"
msgstr "Predlog imena datoteke"
-#: WebKit/gtk/webkit/webkitdownload.cpp:312
+#: ../webkit/webkitdownload.cpp:319
msgid "The filename suggested as default when saving"
msgstr "Privzeto uporabljeno ime datoteke med shranjevanjem"
-#: WebKit/gtk/webkit/webkitdownload.cpp:329
+#: ../webkit/webkitdownload.cpp:336
msgid "Progress"
msgstr "Napredek"
-#: WebKit/gtk/webkit/webkitdownload.cpp:330
+#: ../webkit/webkitdownload.cpp:337
msgid "Determines the current progress of the download"
msgstr "Zazna trenutni napredek prejemanja"
-#: WebKit/gtk/webkit/webkitdownload.cpp:343
+#: ../webkit/webkitdownload.cpp:350
msgid "Status"
msgstr "Stanje"
-#: WebKit/gtk/webkit/webkitdownload.cpp:344
+#: ../webkit/webkitdownload.cpp:351
msgid "Determines the current status of the download"
msgstr "Zazna trenutno stanje prejemanja"
-#: WebKit/gtk/webkit/webkitdownload.cpp:359
+#: ../webkit/webkitdownload.cpp:366
msgid "Current Size"
msgstr "Trenutna velikost"
-#: WebKit/gtk/webkit/webkitdownload.cpp:360
+#: ../webkit/webkitdownload.cpp:367
msgid "The length of the data already downloaded"
msgstr "Količina že prejetih podatkov"
-#: WebKit/gtk/webkit/webkitdownload.cpp:374
+#: ../webkit/webkitdownload.cpp:381
msgid "Total Size"
msgstr "Skupna velikost"
-#: WebKit/gtk/webkit/webkitdownload.cpp:375
+#: ../webkit/webkitdownload.cpp:382
msgid "The total size of the file"
msgstr "Velikost datoteke"
-#: WebKit/gtk/webkit/webkitdownload.cpp:526
+#: ../webkit/webkitdownload.cpp:534
msgid "User cancelled the download"
msgstr "Uporabnik je preklical prejemanje"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248
+#: ../webkit/webkithittestresult.cpp:156
+msgid "Context"
+msgstr "Vsebina"
+
+#: ../webkit/webkithittestresult.cpp:157
+msgid "Flags indicating the kind of target that received the event."
+msgstr "Zastavice, ki nakazujejo vrsto cilja, ki je prejel dogodek."
+
+#: ../webkit/webkithittestresult.cpp:171
+msgid "Link URI"
+msgstr "URI povezave"
+
+#: ../webkit/webkithittestresult.cpp:172
+msgid "The URI to which the target that received the event points, if any."
+msgstr "URI, na katerega kaže cilj, ki je prejel dogodek, če obstaja."
+
+#: ../webkit/webkithittestresult.cpp:185
+msgid "Image URI"
+msgstr "URI slike"
+
+#: ../webkit/webkithittestresult.cpp:186
+msgid "The URI of the image that is part of the target that received the event, if any."
+msgstr "Naslov URI slike, ki je del cilja, ki je prejel dogodek, če obstaja."
+
+#: ../webkit/webkithittestresult.cpp:199
+msgid "Media URI"
+msgstr "Naslov URI predstavne vsebine"
+
+#: ../webkit/webkithittestresult.cpp:200
+msgid "The URI of the media that is part of the target that received the event, if any."
+msgstr "Naslov URI predstavne datoteke, ki je del cilja, ki je prejel dogodek, če obstaja."
+
+#: ../webkit/webkithittestresult.cpp:221
+msgid "Inner node"
+msgstr "Notranje vozlišče"
+
+#: ../webkit/webkithittestresult.cpp:222
+msgid "The inner DOM node associated with the hit test result."
+msgstr "Notranje vozlišče DOM, povezano z rezultatom preizkusa zadetkov."
+
+#: ../webkit/webkitnetworkrequest.cpp:134
+#: ../webkit/webkitnetworkresponse.cpp:134
+#: ../webkit/webkitwebframe.cpp:323
+#: ../webkit/webkitwebhistoryitem.cpp:176
+#: ../webkit/webkitwebresource.cpp:126
+#: ../webkit/webkitwebview.cpp:2997
+msgid "URI"
+msgstr "Naslov URI"
+
+#: ../webkit/webkitnetworkrequest.cpp:135
+msgid "The URI to which the request will be made."
+msgstr "Naslov URI, kateremu bo podana zahteva."
+
+#: ../webkit/webkitnetworkrequest.cpp:148
+#: ../webkit/webkitnetworkresponse.cpp:148
+msgid "Message"
+msgstr "Sporočilo"
+
+#: ../webkit/webkitnetworkrequest.cpp:149
+msgid "The SoupMessage that backs the request."
+msgstr "Sporočilo SoupMessage, ki podpira zahtevo."
+
+#: ../webkit/webkitnetworkresponse.cpp:135
+msgid "The URI to which the response will be made."
+msgstr "Naslov URI, kateremu bo podan odgovor."
+
+#: ../webkit/webkitnetworkresponse.cpp:149
+msgid "The SoupMessage that backs the response."
+msgstr "Sporočilo SoupMessage, ki podpira odziv."
+
+#: ../webkit/webkitsecurityorigin.cpp:150
+msgid "Protocol"
+msgstr "Protokol"
+
+#: ../webkit/webkitsecurityorigin.cpp:151
+msgid "The protocol of the security origin"
+msgstr "Protokol varnostnega izvora"
+
+#: ../webkit/webkitsecurityorigin.cpp:164
+msgid "Host"
+msgstr "Gostitelj"
+
+#: ../webkit/webkitsecurityorigin.cpp:165
+msgid "The host of the security origin"
+msgstr "Gostitelj varnostnega izvora"
+
+#: ../webkit/webkitsecurityorigin.cpp:178
+msgid "Port"
+msgstr "Vrata"
+
+#: ../webkit/webkitsecurityorigin.cpp:179
+msgid "The port of the security origin"
+msgstr "Vrata varnostnega izvora"
+
+#: ../webkit/webkitsecurityorigin.cpp:192
+msgid "Web Database Usage"
+msgstr "Uporaba spletne zbirke podatkov"
+
+#: ../webkit/webkitsecurityorigin.cpp:193
+msgid "The cumulative size of all web databases in the security origin"
+msgstr "Skupna velikost vseh spletnih zbirk podatkov v varnostnem izvoru"
+
+#: ../webkit/webkitsecurityorigin.cpp:205
+msgid "Web Database Quota"
+msgstr "Omejitev velikosti spletne zbirke podatkov"
+
+#: ../webkit/webkitsecurityorigin.cpp:206
+msgid "The web database quota of the security origin in bytes"
+msgstr "Omejitev velikosti podatkovne zbirke varnostnega izvora v bajtih."
+
+#: ../webkit/webkitsoupauthdialog.c:264
#, c-format
msgid "A username and password are being requested by the site %s"
msgstr "Za obisk strani %s sta zahtevana uporabniško ime in geslo."
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278
+#: ../webkit/webkitsoupauthdialog.c:294
msgid "Server message:"
msgstr "Sporočilo strežnika:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291
+#: ../webkit/webkitsoupauthdialog.c:307
msgid "Username:"
msgstr "Uporabniško ime:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293
+#: ../webkit/webkitsoupauthdialog.c:309
msgid "Password:"
msgstr "Geslo:"
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302
+#: ../webkit/webkitsoupauthdialog.c:318
msgid "_Remember password"
msgstr "Za_pomni si geslo"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:298
+#: ../webkit/webkitwebdatabase.cpp:173
+msgid "Security Origin"
+msgstr "Varnostni izvor"
+
+#: ../webkit/webkitwebdatabase.cpp:174
+msgid "The security origin of the database"
+msgstr "Varnostni izvor zbirke podatkov"
+
+#: ../webkit/webkitwebdatabase.cpp:187
+#: ../webkit/webkitwebframe.cpp:309
msgid "Name"
msgstr "Ime"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:299
+#: ../webkit/webkitwebdatabase.cpp:188
+msgid "The name of the Web Database database"
+msgstr "Ime zbirke podatkov Web Database"
+
+#: ../webkit/webkitwebdatabase.cpp:201
+msgid "Display Name"
+msgstr "Pojavno ime"
+
+#: ../webkit/webkitwebdatabase.cpp:202
+msgid "The display name of the Web Storage database"
+msgstr "Pojavno ime zbirke podatkov Web Storage"
+
+#: ../webkit/webkitwebdatabase.cpp:215
+msgid "Expected Size"
+msgstr "Pričakovana velikost"
+
+#: ../webkit/webkitwebdatabase.cpp:216
+msgid "The expected size of the Web Database database"
+msgstr "Pričakovana velikost zbirke podatkov Web Database"
+
+#: ../webkit/webkitwebdatabase.cpp:228
+msgid "Size"
+msgstr "Velikost"
+
+#: ../webkit/webkitwebdatabase.cpp:229
+msgid "The current size of the Web Database database"
+msgstr "Trenutna velikost zbirke podatkov Web Database"
+
+#: ../webkit/webkitwebdatabase.cpp:241
+msgid "Filename"
+msgstr "Ime datoteke"
+
+#: ../webkit/webkitwebdatabase.cpp:242
+msgid "The absolute filename of the Web Storage database"
+msgstr "Absolutno ime datoteke zbirke podatkov Web Storage"
+
+#: ../webkit/webkitwebframe.cpp:310
msgid "The name of the frame"
msgstr "Ime okvirja"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:305
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146
-#: WebKit/gtk/webkit/webkitwebview.cpp:2318
+#: ../webkit/webkitwebframe.cpp:316
+#: ../webkit/webkitwebhistoryitem.cpp:144
+#: ../webkit/webkitwebview.cpp:2983
msgid "Title"
msgstr "Naslov"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:306
+#: ../webkit/webkitwebframe.cpp:317
msgid "The document title of the frame"
msgstr "Naslov dokumenta okvirja"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:312
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178
-#: WebKit/gtk/webkit/webkitwebview.cpp:2332
-msgid "URI"
-msgstr "URI"
-
-#: WebKit/gtk/webkit/webkitwebframe.cpp:313
+#: ../webkit/webkitwebframe.cpp:324
msgid "The current URI of the contents displayed by the frame"
-msgstr ""
+msgstr "Trenutni naslov URI prikazane vsebine okvirja"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:344
+#: ../webkit/webkitwebframe.cpp:355
msgid "Horizontal Scrollbar Policy"
msgstr "Obnašanje vodoravnega drsnika"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:345
+#: ../webkit/webkitwebframe.cpp:356
msgid "Determines the current policy for the horizontal scrollbar of the frame."
msgstr "Določa trenutno obnašanje vodoravnega drsnika okvirja"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:362
+#: ../webkit/webkitwebframe.cpp:373
msgid "Vertical Scrollbar Policy"
msgstr "Obnašanje navpičnega drsnika"
-#: WebKit/gtk/webkit/webkitwebframe.cpp:363
+#: ../webkit/webkitwebframe.cpp:374
msgid "Determines the current policy for the vertical scrollbar of the frame."
msgstr "Določa trenutno obnašanje navpičnega drsnika okvirja"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147
+#: ../webkit/webkitwebhistoryitem.cpp:145
msgid "The title of the history item"
msgstr "Naslov predmeta zgodovine"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162
+#: ../webkit/webkitwebhistoryitem.cpp:160
msgid "Alternate Title"
msgstr "Drugotni naslov"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163
+#: ../webkit/webkitwebhistoryitem.cpp:161
msgid "The alternate title of the history item"
msgstr "Drugotni naslov predmeta zgodovine"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179
+#: ../webkit/webkitwebhistoryitem.cpp:177
msgid "The URI of the history item"
msgstr "Naslov URI predmeta zgodovine"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173
+#: ../webkit/webkitwebhistoryitem.cpp:192
+#: ../webkit/webkitwebnavigationaction.cpp:171
msgid "Original URI"
msgstr "Osnovni URI"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195
+#: ../webkit/webkitwebhistoryitem.cpp:193
msgid "The original URI of the history item"
msgstr "Osnovni naslov URI predmeta zgodovine"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210
+#: ../webkit/webkitwebhistoryitem.cpp:208
msgid "Last visited Time"
msgstr "Čas zadnjega obiska"
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211
+#: ../webkit/webkitwebhistoryitem.cpp:209
msgid "The time at which the history item was last visited"
msgstr "Čas ob katerem je bil predmet zgodovine zadnjič obiskan"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:268
+#: ../webkit/webkitwebinspector.cpp:270
msgid "Web View"
msgstr "Spletni pogled"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:269
+#: ../webkit/webkitwebinspector.cpp:271
msgid "The Web View that renders the Web Inspector itself"
-msgstr ""
+msgstr "Spletni pogled, ki upodobi samega spletnega nadzornika"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:282
-#, fuzzy
+#: ../webkit/webkitwebinspector.cpp:284
msgid "Inspected URI"
-msgstr "Osnovni URI"
+msgstr "Preučeni naslov URI"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:283
+#: ../webkit/webkitwebinspector.cpp:285
msgid "The URI that is currently being inspected"
-msgstr ""
+msgstr "Naslov URI, ki se trenutno proučuje"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:299
+#: ../webkit/webkitwebinspector.cpp:301
msgid "Enable JavaScript profiling"
msgstr "Omogoči profiliranje JavaScript"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:300
+#: ../webkit/webkitwebinspector.cpp:302
msgid "Profile the executed JavaScript."
msgstr "Profiliraj izveden JavaScript"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:315
+#: ../webkit/webkitwebinspector.cpp:317
msgid "Enable Timeline profiling"
msgstr "Omogoči profiliranje časovnice"
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:316
-#, fuzzy
+#: ../webkit/webkitwebinspector.cpp:318
msgid "Profile the WebCore instrumentation."
-msgstr "Ime profila vstavkov"
+msgstr "Profiliranje orodij WebCore"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158
+#: ../webkit/webkitwebnavigationaction.cpp:156
msgid "Reason"
msgstr "Vzrok"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159
+#: ../webkit/webkitwebnavigationaction.cpp:157
msgid "The reason why this navigation is occurring"
msgstr "Vzrok, zakaj se krmarjenje pojavlja"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174
-#, fuzzy
+#: ../webkit/webkitwebnavigationaction.cpp:172
msgid "The URI that was requested as the target for the navigation"
-msgstr "Naslov URI zahtevan za ciljno mesto"
+msgstr "Zahtevani naslov URI za ciljno mesto krmarjenja"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188
+#: ../webkit/webkitwebnavigationaction.cpp:186
msgid "Button"
msgstr "Gumb"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189
+#: ../webkit/webkitwebnavigationaction.cpp:187
msgid "The button used to click"
msgstr "Gumb uporabljen za klik"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204
+#: ../webkit/webkitwebnavigationaction.cpp:202
msgid "Modifier state"
msgstr "Stanje spremenilnika"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205
+#: ../webkit/webkitwebnavigationaction.cpp:203
msgid "A bitmask representing the state of the modifier keys"
-msgstr ""
+msgstr "Bitna maska, ki predstavlja stanje spremenilnih tipk"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220
+#: ../webkit/webkitwebnavigationaction.cpp:218
msgid "Target frame"
msgstr "Ciljni okvir"
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221
-#, fuzzy
+#: ../webkit/webkitwebnavigationaction.cpp:219
msgid "The target frame for the navigation"
-msgstr "Osnovni URL ciljnega okvirja"
+msgstr "Ciljni okvir krmarjenja"
+
+#: ../webkit/webkitwebresource.cpp:127
+msgid "The uri of the resource"
+msgstr "Naslov URI vira"
+
+#: ../webkit/webkitwebresource.cpp:141
+msgid "MIME Type"
+msgstr "Vrsta MIME"
+
+#: ../webkit/webkitwebresource.cpp:142
+msgid "The MIME type of the resource"
+msgstr "Vrsta MIME predmeta"
+
+#: ../webkit/webkitwebresource.cpp:156
+#: ../webkit/webkitwebview.cpp:3132
+msgid "Encoding"
+msgstr "Nabor znakov"
+
+#: ../webkit/webkitwebresource.cpp:157
+msgid "The text encoding name of the resource"
+msgstr "Ime kodnega nabora za vir"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:237
+#: ../webkit/webkitwebresource.cpp:172
+msgid "Frame Name"
+msgstr "Ime okvira"
+
+#: ../webkit/webkitwebresource.cpp:173
+msgid "The frame name of the resource"
+msgstr "Ime okvirja vira"
+
+#: ../webkit/webkitwebsettings.cpp:252
msgid "Default Encoding"
msgstr "Privzet nabor znakov"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:238
+#: ../webkit/webkitwebsettings.cpp:253
msgid "The default encoding used to display text."
msgstr "Pisava nabor znakov za prikazovanje besedila."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:246
+#: ../webkit/webkitwebsettings.cpp:261
msgid "Cursive Font Family"
msgstr "Družina pisave Cursive"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:247
+#: ../webkit/webkitwebsettings.cpp:262
msgid "The default Cursive font family used to display text."
msgstr "Privzeta družina pisave Cursive za prikaz besedila."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:255
+#: ../webkit/webkitwebsettings.cpp:270
msgid "Default Font Family"
msgstr "Privzeta družina pisave"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:256
+#: ../webkit/webkitwebsettings.cpp:271
msgid "The default font family used to display text."
msgstr "Privzeta družina pisave za prikaz besedila"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:264
+#: ../webkit/webkitwebsettings.cpp:279
msgid "Fantasy Font Family"
msgstr "Družina pisave Fantasy"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:265
+#: ../webkit/webkitwebsettings.cpp:280
msgid "The default Fantasy font family used to display text."
msgstr "Privzeta družina pisave Fantasy za prikaz besedila."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:273
+#: ../webkit/webkitwebsettings.cpp:288
msgid "Monospace Font Family"
msgstr "Družina pisave Monospace"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:274
+#: ../webkit/webkitwebsettings.cpp:289
msgid "The default font family used to display monospace text."
msgstr "Privzeta družina pisave za prikaz monospace besedila."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:282
+#: ../webkit/webkitwebsettings.cpp:297
msgid "Sans Serif Font Family"
msgstr "Družina pisave Sans Serif"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:283
+#: ../webkit/webkitwebsettings.cpp:298
msgid "The default Sans Serif font family used to display text."
msgstr "Privzeta družina pisave San Serif za prikaz besedila."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:291
+#: ../webkit/webkitwebsettings.cpp:306
msgid "Serif Font Family"
msgstr "Družina pisave Serif"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:292
+#: ../webkit/webkitwebsettings.cpp:307
msgid "The default Serif font family used to display text."
msgstr "Privzeta družina pisave Serif za prikaz besedila."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:300
+#: ../webkit/webkitwebsettings.cpp:315
msgid "Default Font Size"
msgstr "Privzeta velikost pisave"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:301
+#: ../webkit/webkitwebsettings.cpp:316
msgid "The default font size used to display text."
msgstr "Privzeta velikost pisave za prikaz besedila."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:309
+#: ../webkit/webkitwebsettings.cpp:324
msgid "Default Monospace Font Size"
msgstr "Privzeta velikost pisave Monospace"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:310
+#: ../webkit/webkitwebsettings.cpp:325
msgid "The default font size used to display monospace text."
msgstr "Privzeta velikost pisave za prikaz monospace besedila."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:318
+#: ../webkit/webkitwebsettings.cpp:333
msgid "Minimum Font Size"
msgstr "Najmanjša velikost pisave"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:319
+#: ../webkit/webkitwebsettings.cpp:334
msgid "The minimum font size used to display text."
msgstr "Najmanjša velikost pisave uporabljena za prikazovanje besedila."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:327
+#: ../webkit/webkitwebsettings.cpp:342
msgid "Minimum Logical Font Size"
msgstr "Najmanjša logična velikost pisave"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:328
+#: ../webkit/webkitwebsettings.cpp:343
msgid "The minimum logical font size used to display text."
msgstr "Najmanjša logična velikost pisave za prikazovanje besedila."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:347
+#: ../webkit/webkitwebsettings.cpp:362
msgid "Enforce 96 DPI"
msgstr "Vsili 96 DPI"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:348
+#: ../webkit/webkitwebsettings.cpp:363
msgid "Enforce a resolution of 96 DPI"
msgstr "Vsili ločljivost 96 DPI"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:356
+#: ../webkit/webkitwebsettings.cpp:371
msgid "Auto Load Images"
msgstr "Samodejno naloži slike"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:357
+#: ../webkit/webkitwebsettings.cpp:372
msgid "Load images automatically."
msgstr "Samodejno nalaganje slik."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:365
+#: ../webkit/webkitwebsettings.cpp:380
msgid "Auto Shrink Images"
msgstr "Samodejno skrči velikost okna"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:366
+#: ../webkit/webkitwebsettings.cpp:381
msgid "Automatically shrink standalone images to fit."
msgstr "Samodejno skrči samostojne slike na širino okna."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:374
+#: ../webkit/webkitwebsettings.cpp:389
msgid "Print Backgrounds"
msgstr "Natisni _ozadja"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:375
+#: ../webkit/webkitwebsettings.cpp:390
msgid "Whether background images should be printed."
msgstr "Ali naj bo mogoče slike ozadja natisniti"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:383
+#: ../webkit/webkitwebsettings.cpp:398
msgid "Enable Scripts"
msgstr "Omogoči skripte"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:384
+#: ../webkit/webkitwebsettings.cpp:399
msgid "Enable embedded scripting languages."
msgstr "Omogoči izvajanje skript skriptnih jezikov"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:392
+#: ../webkit/webkitwebsettings.cpp:407
msgid "Enable Plugins"
msgstr "Omogoči vstavke"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:393
+#: ../webkit/webkitwebsettings.cpp:408
msgid "Enable embedded plugin objects."
msgstr "Omogoči predmete vstavkov"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:401
+#: ../webkit/webkitwebsettings.cpp:416
msgid "Resizable Text Areas"
msgstr "Prilagodljiva besedilna območja"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:402
+#: ../webkit/webkitwebsettings.cpp:417
msgid "Whether text areas are resizable."
msgstr "Ali je mogoče besedilna polja prilagajati po velikosti."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:409
+#: ../webkit/webkitwebsettings.cpp:424
msgid "User Stylesheet URI"
msgstr "Naslov URI uporabniške slogovne predloge"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:410
+#: ../webkit/webkitwebsettings.cpp:425
msgid "The URI of a stylesheet that is applied to every page."
-msgstr ""
+msgstr "Naslov URI slogovne predloge, ki velja za vse strani."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:425
+#: ../webkit/webkitwebsettings.cpp:440
msgid "Zoom Stepping Value"
msgstr "Vrednost koraka približevanja"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:426
+#: ../webkit/webkitwebsettings.cpp:441
msgid "The value by which the zoom level is changed when zooming in or out."
msgstr "Vrednost, ki določa raven približevanja med približevanjem ali oddaljevanjem slike."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:444
+#: ../webkit/webkitwebsettings.cpp:459
msgid "Enable Developer Extras"
msgstr "Omogoči dodatna razvojna orodja"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:445
+#: ../webkit/webkitwebsettings.cpp:460
msgid "Enables special extensions that help developers"
-msgstr ""
+msgstr "Omogoči posebne razširitve, ki so v pomoč razvijalcem"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:465
+#: ../webkit/webkitwebsettings.cpp:480
msgid "Enable Private Browsing"
msgstr "Omogoči zasebno brskanje"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:466
+#: ../webkit/webkitwebsettings.cpp:481
msgid "Enables private browsing mode"
msgstr "Omogoči način varnega zasebnega brskanja"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:481
+#: ../webkit/webkitwebsettings.cpp:496
msgid "Enable Spell Checking"
msgstr "Omogoči črkovanje"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:482
+#: ../webkit/webkitwebsettings.cpp:497
msgid "Enables spell checking while typing"
msgstr "Omogoči preverjanje črkovanja med tipkanjem"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:505
+#: ../webkit/webkitwebsettings.cpp:520
msgid "Languages to use for spell checking"
msgstr "Izbor jezika za preverjanje črkovanja"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:506
+#: ../webkit/webkitwebsettings.cpp:521
msgid "Comma separated list of languages to use for spell checking"
msgstr "Z vejico ločen seznam jezikov za črkovanje"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:520
+#: ../webkit/webkitwebsettings.cpp:535
msgid "Enable Caret Browsing"
msgstr "Omogoči brskanje s kazalko"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:521
-msgid "Whether to enable accessibility enhanced keyboard navigation"
-msgstr ""
+#: ../webkit/webkitwebsettings.cpp:536
+msgid "Whether to enable accesibility enhanced keyboard navigation"
+msgstr "Ali naj bo omogočeno krmarjenje s tipkovnico z nadgradnjo za dostopnost"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:536
+#: ../webkit/webkitwebsettings.cpp:551
msgid "Enable HTML5 Database"
msgstr "Omogoči HTML5 podatkovno zbirko"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:537
+#: ../webkit/webkitwebsettings.cpp:552
msgid "Whether to enable HTML5 database support"
msgstr "Ali naj se omogoči podpora HTML podatkovne zbirke"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:552
+#: ../webkit/webkitwebsettings.cpp:567
msgid "Enable HTML5 Local Storage"
-msgstr "Omogoči hTML5 krajevno shranjevanje"
+msgstr "Omogoči HTML5 krajevno shranjevanje"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:553
+#: ../webkit/webkitwebsettings.cpp:568
msgid "Whether to enable HTML5 Local Storage support"
msgstr "Ali naj se omogoči podpora HTML krajevnega shranjevanja"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:567
+#: ../webkit/webkitwebsettings.cpp:582
msgid "Enable XSS Auditor"
-msgstr "Omogoči XSS Auditor"
+msgstr "Omogoči nadzornika XSS"
+
+#: ../webkit/webkitwebsettings.cpp:583
+msgid "Whether to enable the XSS auditor"
+msgstr "Ali naj bo omogočen nadzornik XSS"
+
+#: ../webkit/webkitwebsettings.cpp:601
+msgid "Enable Spatial Navigation"
+msgstr "Omogoči prostorsko krmarjenje"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:568
-msgid "Whether to enable teh XSS auditor"
-msgstr "Ali naj se omogoči XSS auditor"
+#: ../webkit/webkitwebsettings.cpp:602
+msgid "Whether to enable Spatial Navigation"
+msgstr "Ali naj bo prostorsko krmarjenje omogočeno"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:586
+#: ../webkit/webkitwebsettings.cpp:620
+msgid "Enable Frame Flattening"
+msgstr "Omogoči ploščenje okvirja"
+
+#: ../webkit/webkitwebsettings.cpp:621
+msgid "Whether to enable Frame Flattening"
+msgstr "Ali naj se omogoči ploščenje okvirja"
+
+#: ../webkit/webkitwebsettings.cpp:638
msgid "User Agent"
msgstr "Uporabniški agent"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:587
+#: ../webkit/webkitwebsettings.cpp:639
msgid "The User-Agent string used by WebKitGtk"
msgstr "Niz uporabniškega agenta, ki ga uporablja WebKitGtk"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:602
+#: ../webkit/webkitwebsettings.cpp:654
msgid "JavaScript can open windows automatically"
msgstr "JavaScript program lahko samodejno odpre okno"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:603
+#: ../webkit/webkitwebsettings.cpp:655
msgid "Whether JavaScript can open windows automatically"
msgstr "Ali je mogoče z JavaScript programom samodejno odpreti okno"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:618
+#: ../webkit/webkitwebsettings.cpp:669
+msgid "JavaScript can access Clipboard"
+msgstr "JavaScript lahko dostopa do odložišča"
+
+#: ../webkit/webkitwebsettings.cpp:670
+msgid "Whether JavaScript can access Clipboard"
+msgstr "Ali je mogoče s kodo JavaScript dostopati do odložišča"
+
+#: ../webkit/webkitwebsettings.cpp:686
msgid "Enable offline web application cache"
msgstr "Omogoči predpomnilnik za brskanje vsebine brez povezave"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:619
+#: ../webkit/webkitwebsettings.cpp:687
msgid "Whether to enable offline web application cache"
msgstr "Ali naj bo omogočen predpomnilnik programa za brskanje brez povezave"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:646
+#: ../webkit/webkitwebsettings.cpp:715
msgid "Editing behavior"
msgstr "Obnašanje urejanja"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:647
+#: ../webkit/webkitwebsettings.cpp:716
msgid "The behavior mode to use in editing mode"
msgstr "Način obnašanja uporabljen v načinu urejanja"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:663
+#: ../webkit/webkitwebsettings.cpp:732
msgid "Enable universal access from file URIs"
-msgstr ""
+msgstr "Omogoči splošni dostop z naslovi URI datoteke"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:664
+#: ../webkit/webkitwebsettings.cpp:733
msgid "Whether to allow universal access from file URIs"
msgstr "Ali je dovoljen splošen dostop preko naslova URI datoteke"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:679
+#: ../webkit/webkitwebsettings.cpp:748
msgid "Enable DOM paste"
msgstr "Omogoči DOM prilepljenje"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:680
+#: ../webkit/webkitwebsettings.cpp:749
msgid "Whether to enable DOM paste"
msgstr "Ali naj bo omogočeno DOM prilepljenje"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:698
+#: ../webkit/webkitwebsettings.cpp:767
msgid "Tab key cycles through elements"
msgstr "Tipka tab kroži med predmeti"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:699
+#: ../webkit/webkitwebsettings.cpp:768
msgid "Whether the tab key cycles through elements on the page."
msgstr "Ali tipka tab kroži med predmeti na strani."
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:719
+#: ../webkit/webkitwebsettings.cpp:788
msgid "Enable Default Context Menu"
msgstr "Omogoči privzeti vsebinski meni"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:720
+#: ../webkit/webkitwebsettings.cpp:789
msgid "Enables the handling of right-clicks for the creation of the default context menu"
-msgstr ""
+msgstr "Omogoča obravnavo desnih klikov za ustvarjanje privzetega vsebinskega menija"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:740
-#, fuzzy
+#: ../webkit/webkitwebsettings.cpp:809
msgid "Enable Site Specific Quirks"
-msgstr "Poganjanje posebnega ukaza za spletišče"
+msgstr "Omogoči posebnosti spletišča"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:741
+#: ../webkit/webkitwebsettings.cpp:810
msgid "Enables the site-specific compatibility workarounds"
-msgstr ""
+msgstr "Omogoča posebne združljivostne rešitve za spletišče"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:763
+#: ../webkit/webkitwebsettings.cpp:832
msgid "Enable page cache"
msgstr "Omogoči predpomnilnik strani"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:764
+#: ../webkit/webkitwebsettings.cpp:833
msgid "Whether the page cache should be used"
msgstr "Ali naj bo uporabljen predpomnilnik strani"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:784
+#: ../webkit/webkitwebsettings.cpp:853
msgid "Auto Resize Window"
msgstr "Samodejno prilagodi velikost okna"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:785
+#: ../webkit/webkitwebsettings.cpp:854
msgid "Automatically resize the toplevel window when a page requests it"
msgstr "Samodejno prilagodi velikost vrhnjega okna, kadar to zahteva stran"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:817
+#: ../webkit/webkitwebsettings.cpp:886
msgid "Enable Java Applet"
msgstr "Omogoči Java aplet"
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:818
+#: ../webkit/webkitwebsettings.cpp:887
msgid "Whether Java Applet support through <applet> should be enabled"
msgstr "Ali je omogočena podpora za Java aplete preko oznake <applet>"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2319
+#: ../webkit/webkitwebsettings.cpp:901
+msgid "Enable Hyperlink Auditing"
+msgstr "Omogoči nadzor hiperpovezav"
+
+#: ../webkit/webkitwebsettings.cpp:902
+msgid "Whether <a ping> should be able to send pings"
+msgstr "Ali lahko <a ping> pošilja ukaze ping"
+
+#: ../webkit/webkitwebsettings.cpp:910
+msgid "Enable Fullscreen"
+msgstr "Omogoči celozaslonski način"
+
+#: ../webkit/webkitwebsettings.cpp:911
+msgid "Whether the Mozilla style API should be enabled."
+msgstr "Ali naj bo omogočen API, podoben Mozilli."
+
+#: ../webkit/webkitwebview.cpp:2984
msgid "Returns the @web_view's document title"
msgstr "Vrne @web_pogled naslov dokumenta"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2333
+#: ../webkit/webkitwebview.cpp:2998
msgid "Returns the current URI of the contents displayed by the @web_view"
msgstr "Vrne trenutni naslov URI vsebine prikazane preko @web_pogleda"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2346
+#: ../webkit/webkitwebview.cpp:3011
msgid "Copy target list"
msgstr "Kopiraj seznam ciljev"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2347
-#, fuzzy
+#: ../webkit/webkitwebview.cpp:3012
msgid "The list of targets this web view supports for clipboard copying"
-msgstr "Seznam ciljev katerih medpomnilnik podpira možnost kopiraj v odložišče in DND vire."
+msgstr "Seznam ciljev, ki jih ta spletni pogled podpira za kopiranje v odložišče"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2360
+#: ../webkit/webkitwebview.cpp:3025
msgid "Paste target list"
msgstr "Prilepi seznam ciljev"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2361
-#, fuzzy
+#: ../webkit/webkitwebview.cpp:3026
msgid "The list of targets this web view supports for clipboard pasting"
-msgstr "Seznam ciljev katerih medpomnilnik podpira možnost prilepi v odložišče in DND cilje."
+msgstr "Seznam ciljev, ki jih ta spletni pogled podpira za lepljenje iz odložišča"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2367
+#: ../webkit/webkitwebview.cpp:3032
msgid "Settings"
msgstr "Nastavitve"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2368
+#: ../webkit/webkitwebview.cpp:3033
msgid "An associated WebKitWebSettings instance"
msgstr "Povezan primerek WebKitWebSettings"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2381
+#: ../webkit/webkitwebview.cpp:3046
msgid "Web Inspector"
msgstr "Spletni nadzornik"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2382
+#: ../webkit/webkitwebview.cpp:3047
msgid "The associated WebKitWebInspector instance"
msgstr "Povezan primerek WebKitWebInspector"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2402
+#: ../webkit/webkitwebview.cpp:3060
+msgid "Viewport Attributes"
+msgstr "Atributi vidnega polja"
+
+#: ../webkit/webkitwebview.cpp:3061
+msgid "The associated WebKitViewportAttributes instance"
+msgstr "Povezan primerek WebKitViewportAttributes"
+
+#: ../webkit/webkitwebview.cpp:3081
msgid "Editable"
msgstr "Uredljivo"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2403
+#: ../webkit/webkitwebview.cpp:3082
msgid "Whether content can be modified by the user"
msgstr "Ali lahko uporabnik spremeni vsebino"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2409
+#: ../webkit/webkitwebview.cpp:3088
msgid "Transparent"
msgstr "Prozorno"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2410
+#: ../webkit/webkitwebview.cpp:3089
msgid "Whether content has a transparent background"
msgstr "Ali ima vsebina prozorno ozadje"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2423
+#: ../webkit/webkitwebview.cpp:3102
msgid "Zoom level"
msgstr "Raven približanja"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2424
+#: ../webkit/webkitwebview.cpp:3103
msgid "The level of zoom of the content"
msgstr "Raven približanja vsebine"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2439
+#: ../webkit/webkitwebview.cpp:3118
msgid "Full content zoom"
msgstr "Polno približanje vsebine"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2440
+#: ../webkit/webkitwebview.cpp:3119
msgid "Whether the full content is scaled when zooming"
msgstr "Ali naj bo celotna vsebina prilagojena velikosti ob približevanju"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2453
-msgid "Encoding"
-msgstr "Nabor znakov"
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2454
+#: ../webkit/webkitwebview.cpp:3133
msgid "The default encoding of the web view"
msgstr "Privzeti nabor znakov spletnega pogleda"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2467
+#: ../webkit/webkitwebview.cpp:3146
msgid "Custom Encoding"
msgstr "Nabor znakov po meri"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2468
+#: ../webkit/webkitwebview.cpp:3147
msgid "The custom encoding of the web view"
msgstr "Nabor znakov spletnega pogleda po meri"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2520
+#: ../webkit/webkitwebview.cpp:3199
msgid "Icon URI"
msgstr "Ikona URI"
-#: WebKit/gtk/webkit/webkitwebview.cpp:2521
-#, fuzzy
+#: ../webkit/webkitwebview.cpp:3200
msgid "The URI for the favicon for the #WebKitWebView."
-msgstr "Zaznamek za URI '%s' že obstaja"
+msgstr "URI za favicon za #WebKitWebView."
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:56
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:61
msgid "Submit"
msgstr "Pošlji"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:66
msgid "Reset"
msgstr "Ponovno nastavi"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:71
msgid "This is a searchable index. Enter search keywords: "
msgstr "Po kazalu je mogoče iskati. Vnesite ključne besede:"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:76
msgid "Choose File"
msgstr "Izbor datoteke"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:81
msgid "(None)"
msgstr "(Brez)"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:86
msgid "Open Link in New _Window"
msgstr "Odpri povezavo v _novem oknu"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:91
msgid "_Download Linked File"
msgstr "_Prejmi povezano datoteko"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:96
msgid "Copy Link Loc_ation"
msgstr "Kopiraj mesto _povezave"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:101
msgid "Open _Image in New Window"
msgstr "Odpri _sliko v novem oknu"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:106
msgid "Sa_ve Image As"
msgstr "S_hrani sliko kot"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:111
msgid "Cop_y Image"
msgstr "_Kopiraj sliko"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:116
+msgid "Open _Video in New Window"
+msgstr "Odpri _sliko v novem oknu"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:121
+msgid "Open _Audio in New Window"
+msgstr "Odpri _zvok v novem oknu"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:126
+msgid "Cop_y Video Link Location"
+msgstr "Kopiraj mesto slikovne _povezave"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:131
+msgid "Cop_y Audio Link Location"
+msgstr "Kopiraj mesto zvočne _povezave"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:136
+msgid "_Toggle Media Controls"
+msgstr "_Preklopi predstavne tipke"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:141
+msgid "Toggle Media _Loop Playback"
+msgstr "Preklopi predvajanje v _zanki"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:146
+msgid "Switch Video to _Fullscreen"
+msgstr "Preklopi sliko na _cel zaslon"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:151
+msgid "_Play"
+msgstr "_Predvajaj"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:156
+msgid "_Pause"
+msgstr "_Premor"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:161
+msgid "_Mute"
+msgstr "_Nemo"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
msgid "Open _Frame in New Window"
msgstr "Odpri okvir v _novem oknu"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:217
msgid "_Reload"
msgstr "_Ponovno naloži"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183
-#, fuzzy
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:234
msgid "No Guesses Found"
-msgstr "Ni najdenih predmetov"
+msgstr "Ni najdenih ugibanj"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:239
msgid "_Ignore Spelling"
msgstr "_Prezri črkovanje"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:244
msgid "_Learn Spelling"
msgstr "_Zapomni si črkovanje"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:249
msgid "_Search the Web"
msgstr "_Preišči splet"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:254
msgid "_Look Up in Dictionary"
msgstr "_Poišči besede v slovarju"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:259
msgid "_Open Link"
msgstr "_Odpri povezavo"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:264
msgid "Ignore _Grammar"
msgstr "Prezri _slovnico"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:269
msgid "Spelling and _Grammar"
msgstr "Črkovanje in _slovnica"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:274
msgid "_Show Spelling and Grammar"
msgstr "_Pokaži črkovanje in slovnico"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:274
msgid "_Hide Spelling and Grammar"
msgstr "_Skrij črkovanje in slovnico"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:279
msgid "_Check Document Now"
msgstr "_Takoj preveri dokument"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:284
msgid "Check Spelling While _Typing"
msgstr "Preveri _črkovanja med tipkanjem"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:289
msgid "Check _Grammar With Spelling"
msgstr "Preveri _slovnico med tipkanjem"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:294
msgid "_Font"
msgstr "_Pisava"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:317
msgid "_Outline"
msgstr "_Oris"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271
-#, fuzzy
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:322
msgid "Inspect _Element"
msgstr "Preuči _predmet"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:327
msgid "No recent searches"
msgstr "Ni nedavnih nizov iskanja"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:332
msgid "Recent searches"
msgstr "_Nedavno iskanje"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:337
msgid "_Clear recent searches"
msgstr "_Počisti nedavno iskanje"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
msgid "term"
msgstr "pojem"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
msgid "definition"
msgstr "določilo"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:352
msgid "press"
msgstr "pritisni"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:357
msgid "select"
msgstr "izberi"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:362
msgid "activate"
msgstr "omogoči"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:367
msgid "uncheck"
msgstr "odstrani izbor"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:372
msgid "check"
msgstr "preveri"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
msgid "jump"
msgstr "skoči"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:392
+msgid "Missing Plug-in"
+msgstr "Manjkajoči vstavek"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:398
+msgid "Plug-in Failure"
+msgstr "Napaka vstavka"
+
+#. 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:404
msgid " files"
msgstr "datoteke"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
msgid "Unknown"
msgstr "Neznano"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:414
+#, c-format
+msgctxt "Title string for images"
+msgid "%s (%dx%d pixels)"
+msgstr "%s (%dx%d slik. točk)"
+
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
msgid "Loading..."
msgstr "Nalaganje ..."
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:431
msgid "Live Broadcast"
msgstr "Oddajanje v živo"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:437
msgid "audio element controller"
msgstr "nadzornik zvočnega predmeta"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:439
msgid "video element controller"
msgstr "nadzornik slikovnega predmeta"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:441
msgid "mute"
msgstr "nemo"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:443
msgid "unmute"
msgstr "povrni glasnost"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:445
msgid "play"
msgstr "predvajaj"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:447
msgid "pause"
msgstr "premor"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:449
msgid "movie time"
msgstr "čas filma"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:451
msgid "timeline slider thumb"
msgstr "sličica časovnega drsnika"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:453
msgid "back 30 seconds"
msgstr "nazaj 30 sekund"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:455
msgid "return to realtime"
msgstr "vrni se na pravi čas"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:457
msgid "elapsed time"
msgstr "pretečeni čas"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:459
msgid "remaining time"
msgstr "preostali čas"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
msgid "status"
msgstr "stanje"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:463
msgid "fullscreen"
msgstr "celozaslonski način"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:465
msgid "fast forward"
msgstr "hitro naprej"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:467
msgid "fast reverse"
msgstr "hitro nazaj"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:469
msgid "show closed captions"
msgstr "pokaži zaprte naslove"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:471
msgid "hide closed captions"
msgstr "skrij zaprte naslove"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:480
msgid "audio element playback controls and status display"
msgstr "prikaz stanja in nadzora predvajanja zvočnih predmetov"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:482
msgid "video element playback controls and status display"
msgstr "prikaz stanja in nadzora predvajanja slikovnih predmetov"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:484
msgid "mute audio tracks"
msgstr "neme zvočne sledi"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:486
msgid "unmute audio tracks"
msgstr "povrnjena glasnost zvočnih sledi"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:488
msgid "begin playback"
msgstr "začetek predvajanja"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:490
msgid "pause playback"
msgstr "premor predvajanja"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:492
msgid "movie time scrubber"
msgstr "časovni drsnik posnetka"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:494
msgid "movie time scrubber thumb"
msgstr "sličica časovnega drsnika posnetka"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:496
msgid "seek movie back 30 seconds"
msgstr "preskoči posnetek 30 sekund nazaj"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:498
msgid "return streaming movie to real time"
msgstr "vrni pretok predvajanja na pravi čas"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:500
msgid "current movie time in seconds"
msgstr "trenuten čas predvajanja v sekundah"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
msgid "number of seconds of movie remaining"
-msgstr "preostali čas filmaštevilo sekund preden se časomer ustavi"
+msgstr "število sekund preostanka filma"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:504
msgid "current movie status"
msgstr "trenutno stanje filma"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:506
msgid "seek quickly back"
msgstr "hitro išči nazaj"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:508
msgid "seek quickly forward"
msgstr "hitro išči naprej"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:510
msgid "Play movie in fullscreen mode"
msgstr "Predvajanje filma v celozaslonskem načinu"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
msgid "start displaying closed captions"
msgstr "začni prikazovanje zaprtih naslovov"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:514
msgid "stop displaying closed captions"
msgstr "zaustavi prikazovanje zaprtih naslovov"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:523
msgid "indefinite time"
msgstr "nedoločen čas"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:553
msgid "value missing"
msgstr "manjka vrednost"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:589
msgid "type mismatch"
msgstr "vrsta ne ustreza"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:612
msgid "pattern mismatch"
msgstr "vzorec ne ustreza"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:617
msgid "too long"
msgstr "predolgo"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:622
msgid "range underflow"
msgstr "pod območjem omejitve"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:627
msgid "range overflow"
msgstr "prekoračitev območja"
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522
+#: ../../../WebCore/platform/gtk/LocalizedStringsGtk.cpp:632
msgid "step mismatch"
msgstr "korak ne ustreza"
-#, fuzzy
-#~ msgid "_Searchable Index"
-#~ msgstr "Povrni določila"
-
diff --git a/Source/WebKit/gtk/resources/error.html b/Source/WebKit/gtk/resources/error.html
index 27d4a57c1..229be2c42 100644
--- a/Source/WebKit/gtk/resources/error.html
+++ b/Source/WebKit/gtk/resources/error.html
@@ -21,12 +21,12 @@ body {
}
#errorTitleText {
- font-size: 120%;
+ font-size: 120%%;
font-weight: bold;
}
#errorMessageText {
- font-size: 80%;
+ font-size: 80%%;
}
</style>
diff --git a/Source/WebKit/gtk/tests/testcontextmenu.c b/Source/WebKit/gtk/tests/testcontextmenu.c
new file mode 100644
index 000000000..fe664307a
--- /dev/null
+++ b/Source/WebKit/gtk/tests/testcontextmenu.c
@@ -0,0 +1,324 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 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 <webkit/webkit.h>
+
+#if GTK_CHECK_VERSION(2, 14, 0)
+
+typedef struct {
+ char *data;
+ guint flag;
+} TestInfo;
+
+static GMainLoop *loop;
+
+typedef struct {
+ WebKitWebView *webView;
+ TestInfo *info;
+} ContextMenuFixture;
+
+static TestInfo *testInfoNew(const char *data, guint flag)
+{
+ TestInfo *info = g_slice_new(TestInfo);
+ info->data = g_strdup(data);
+ info->flag = flag;
+
+ return info;
+}
+
+static void testInfoDestroy(TestInfo *info)
+{
+ g_free(info->data);
+ g_slice_free(TestInfo, info);
+}
+
+static void contextMenuFixtureSetup(ContextMenuFixture *fixture, gconstpointer data)
+{
+ fixture->webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+ loop = g_main_loop_new(NULL, TRUE);
+ fixture->info = (TestInfo *)data;
+}
+
+static void contextMenuFixtureTeardown(ContextMenuFixture *fixture, gconstpointer data)
+{
+ g_object_unref(fixture->webView);
+ g_main_loop_unref(loop);
+ testInfoDestroy(fixture->info);
+}
+
+static GList *checkAction(GList *iter, WebKitContextMenuAction action)
+{
+ GtkMenuItem *item = (GtkMenuItem *)iter->data;
+
+ g_assert(GTK_IS_MENU_ITEM(item));
+ g_assert(webkit_context_menu_item_get_action(item) == action);
+
+ return iter->next;
+}
+
+static GList *checkActionWithSubmenu(GList *iter, WebKitContextMenuAction action)
+{
+ GtkMenuItem *item = (GtkMenuItem *)iter->data;
+
+ g_assert(GTK_IS_MENU_ITEM(item));
+ g_assert(webkit_context_menu_item_get_action(item) == action);
+ g_assert(GTK_IS_MENU(gtk_menu_item_get_submenu(item)));
+
+ return iter->next;
+}
+
+static GList *checkSeparator(GList *iter)
+{
+ GtkMenuItem *item = (GtkMenuItem *)iter->data;
+
+ g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item));
+
+ return iter->next;
+}
+
+static gboolean contextMenuCallback(WebKitWebView *webView, GtkWidget *defaultMenu, WebKitHitTestResult *hitTestResult, gboolean keyboardMode, gpointer userData)
+{
+ TestInfo *info = (TestInfo *)userData;
+ guint context;
+ GList *items;
+ GList *iter;
+
+ /* Check signal parameters */
+ g_assert(WEBKIT_IS_WEB_VIEW(webView));
+ g_assert(GTK_IS_MENU(defaultMenu));
+ g_assert(WEBKIT_IS_HIT_TEST_RESULT(hitTestResult));
+ g_assert(!keyboardMode);
+
+ g_object_get(hitTestResult, "context", &context, NULL);
+ g_assert(context & info->flag);
+
+ items = gtk_container_get_children(GTK_CONTAINER(defaultMenu));
+ switch (info->flag) {
+ case WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT:
+ iter = items;
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_BACK);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_STOP);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_RELOAD);
+ g_assert(!iter);
+
+ break;
+ case WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE:
+ iter = items;
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_IMAGE_IN_NEW_WINDOW);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_IMAGE_TO_DISK);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_URL_TO_CLIPBOARD);
+ g_assert(!iter);
+
+ break;
+ case WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE:
+ iter = items;
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_CUT);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_PASTE);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_DELETE);
+ iter = checkSeparator(iter);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_SELECT_ALL);
+ iter = checkSeparator(iter);
+ iter = checkActionWithSubmenu(iter, WEBKIT_CONTEXT_MENU_ACTION_INPUT_METHODS);
+ iter = checkActionWithSubmenu(iter, WEBKIT_CONTEXT_MENU_ACTION_UNICODE);
+ g_assert(!iter);
+
+ break;
+ case WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK:
+ iter = items;
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK_IN_NEW_WINDOW);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_LINK_TO_DISK);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_LINK_TO_CLIPBOARD);
+ g_assert(!iter);
+
+ break;
+ default:
+ g_assert_not_reached();
+ }
+
+ g_list_free(items);
+ g_main_loop_quit(loop);
+
+ return TRUE;
+}
+
+static void pushEvent(WebKitWebView *webView)
+{
+ GdkEvent *event = gdk_event_new(GDK_BUTTON_PRESS);
+#if GTK_CHECK_VERSION(3, 0, 0)
+ GdkDeviceManager *deviceManager;
+#endif
+
+ event->any.window = g_object_ref(gtk_widget_get_window(GTK_WIDGET(webView)));
+ event->any.send_event = FALSE;
+ event->button.time = GDK_CURRENT_TIME;
+ event->button.button = 3;
+ event->button.x = event->button.y = 5;
+ event->button.x_root = event->button.x;
+ event->button.y_root = event->button.y;
+#if GTK_CHECK_VERSION(3, 0, 0)
+ deviceManager = gdk_display_get_device_manager(gdk_display_get_default());
+ event->button.device = gdk_device_manager_get_client_pointer(deviceManager);
+#endif
+
+ gdk_event_put(event);
+ gdk_event_free(event);
+}
+
+static void loadStatusCallback(WebKitWebView *webView, GParamSpec *spec, gpointer data)
+{
+ WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
+ TestInfo *info = (TestInfo *)data;
+
+ g_assert(status != WEBKIT_LOAD_FAILED);
+
+ if (status != WEBKIT_LOAD_FINISHED)
+ return;
+
+ g_signal_connect(webView, "context-menu", G_CALLBACK(contextMenuCallback), info);
+ pushEvent(webView);
+}
+
+static gboolean mapEventCallback(GtkWidget *widget, GdkEvent *event, gpointer data)
+{
+ gtk_widget_grab_focus(widget);
+ ContextMenuFixture *fixture = (ContextMenuFixture *)data;
+ webkit_web_view_load_string(fixture->webView,
+ fixture->info->data,
+ "text/html",
+ "utf-8",
+ "file://");
+ g_signal_connect(fixture->webView, "notify::load-status", G_CALLBACK(loadStatusCallback), fixture->info);
+ return FALSE;
+}
+
+static void testContextMenu(ContextMenuFixture *fixture, gconstpointer data)
+{
+ GtkAllocation allocation = { 0, 0, 50, 50 };
+ GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP);
+
+ gtk_window_resize(GTK_WINDOW(window), 50, 50);
+ gtk_window_move(GTK_WINDOW(window), 0, 0);
+ gtk_widget_size_allocate(GTK_WIDGET(fixture->webView), &allocation);
+ gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(fixture->webView));
+ g_signal_connect(window, "map-event", G_CALLBACK(mapEventCallback), fixture);
+ gtk_widget_show_all(window);
+
+ g_main_loop_run(loop);
+}
+
+static gboolean contextMenuCustomItemCallback(WebKitWebView *webView, GtkWidget *defaultMenu, WebKitHitTestResult *hitTestResult, gboolean keyboardMode, gpointer userData)
+{
+ TestInfo *info = (TestInfo *)userData;
+ guint context;
+ GList *items;
+ GList *iter;
+ GtkWidget *menuItem;
+ GtkAction *action;
+
+ /* Check signal parameters */
+ g_assert(WEBKIT_IS_WEB_VIEW(webView));
+ g_assert(GTK_IS_MENU(defaultMenu));
+ g_assert(WEBKIT_IS_HIT_TEST_RESULT(hitTestResult));
+ g_assert(!keyboardMode);
+
+ g_object_get(hitTestResult, "context", &context, NULL);
+ g_assert(context & info->flag);
+
+ action = gtk_action_new("TestAction", "Custom Action", "Custom Action Tooltip", NULL);
+ menuItem = gtk_action_create_menu_item(action);
+ g_object_unref(action);
+
+ gtk_menu_shell_append(GTK_MENU_SHELL(defaultMenu), menuItem);
+ gtk_widget_show(menuItem);
+
+ items = gtk_container_get_children(GTK_CONTAINER(defaultMenu));
+ iter = items;
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_BACK);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_STOP);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_RELOAD);
+ iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION);
+ g_assert(!iter);
+
+ g_list_free(items);
+ g_main_loop_quit(loop);
+
+ return TRUE;
+}
+
+static void testContextMenuCustomItem(ContextMenuFixture *fixture, gconstpointer data)
+{
+ GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP);
+ gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(fixture->webView));
+ gtk_widget_show_all(window);
+ gtk_widget_grab_focus(GTK_WIDGET(fixture->webView));
+
+ webkit_web_view_load_string(fixture->webView,
+ fixture->info->data,
+ "text/html",
+ "utf-8",
+ "file://");
+ g_signal_connect(fixture->webView, "context-menu", G_CALLBACK(contextMenuCustomItemCallback), fixture->info);
+ pushEvent(fixture->webView);
+}
+
+int main(int argc, char **argv)
+{
+ gtk_test_init(&argc, &argv, NULL);
+
+ g_test_bug_base("https://bugs.webkit.org/");
+
+ g_test_add("/webkit/testcontextmenu/document", ContextMenuFixture,
+ testInfoNew("<html><body><h1>WebKitGTK+!</h1></body></html>",
+ WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT),
+ contextMenuFixtureSetup, testContextMenu, contextMenuFixtureTeardown);
+ /* We hardcode all elements to be at 0,0 so that we know where to generate the button events */
+ g_test_add("/webkit/testcontextmenu/image", ContextMenuFixture,
+ testInfoNew("<html><body><img style='position:absolute; left:0; top:0' src='0xdeadbeef' width=50 height=50></img></body></html>",
+ WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE),
+ contextMenuFixtureSetup, testContextMenu, contextMenuFixtureTeardown);
+ g_test_add("/webkit/testcontextmenu/editable", ContextMenuFixture,
+ testInfoNew("<html><body><input style='position:absolute; left:0; top:0' size='35'></input>></body></html>",
+ WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE),
+ contextMenuFixtureSetup, testContextMenu, contextMenuFixtureTeardown);
+ g_test_add("/webkit/testcontextmenu/link", ContextMenuFixture,
+ testInfoNew("<html><body><a style='position:absolute; left:0; top:0' href='http://www.example.com'>HELLO WORLD</a></body></html>",
+ WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK),
+ contextMenuFixtureSetup, testContextMenu, contextMenuFixtureTeardown);
+ g_test_add("/webkit/testcontextmenu/customitem", ContextMenuFixture,
+ testInfoNew("<html><body><h1>WebKitGTK+!</h1></body></html>",
+ WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT),
+ contextMenuFixtureSetup, testContextMenuCustomItem, contextMenuFixtureTeardown);
+
+ return g_test_run();
+}
+
+#else
+
+int main(int argc, char **argv)
+{
+ g_critical("You will need at least GTK+ 2.14.0 to run the unit tests.");
+ return 0;
+}
+
+#endif
diff --git a/Source/WebKit/gtk/tests/testfavicondatabase.c b/Source/WebKit/gtk/tests/testfavicondatabase.c
new file mode 100644
index 000000000..058c185f1
--- /dev/null
+++ b/Source/WebKit/gtk/tests/testfavicondatabase.c
@@ -0,0 +1,284 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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 "test_utils.h"
+#include <glib/gstdio.h>
+#include <gtk/gtk.h>
+#include <string.h>
+#include <webkit/webkit.h>
+
+const int gIconSize = 16;
+
+#if GTK_CHECK_VERSION(2, 14, 0)
+GMainLoop *loop;
+char *baseURI;
+
+static void
+serverCallback(SoupServer *server, SoupMessage *message, const char *path, GHashTable *query, SoupClientContext *context, void *data)
+{
+ if (message->method != SOUP_METHOD_GET) {
+ soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
+ return;
+ }
+
+ soup_message_set_status(message, SOUP_STATUS_OK);
+
+ char *contents;
+ gsize length;
+ if (g_str_equal(path, "/favicon.ico")) {
+ GError *error = NULL;
+
+ g_file_get_contents("blank.ico", &contents, &length, &error);
+ g_assert(!error);
+ } else {
+ contents = g_strdup("<html><body>test</body></html>");
+ length = strlen(contents);
+ }
+
+ soup_message_body_append(message->response_body, SOUP_MEMORY_TAKE, contents, length);
+ soup_message_body_complete(message->response_body);
+}
+
+static void deleteDatabaseFileIfExists(const char *databasePath)
+{
+ if (!g_file_test(databasePath, G_FILE_TEST_IS_DIR))
+ return;
+
+ char *databaseFilename = g_build_filename(databasePath, "WebpageIcons.db", NULL);
+ if (g_unlink(databaseFilename) == -1) {
+ g_free(databaseFilename);
+ return;
+ }
+
+ g_free(databaseFilename);
+ g_rmdir(databasePath);
+}
+
+static void testWebKitFaviconDatabaseSetPath()
+{
+ char *databasePath = g_build_filename(g_get_tmp_dir(), "webkit-testfavicondatabase", NULL);
+ deleteDatabaseFileIfExists(databasePath);
+
+ WebKitFaviconDatabase *database = webkit_get_favicon_database();
+ webkit_favicon_database_set_path(database, databasePath);
+
+ g_assert_cmpstr(databasePath, ==, webkit_favicon_database_get_path(database));
+
+ g_free(databasePath);
+}
+
+// See the comment in main() function that goes with this same guard.
+#ifdef NDEBUG
+
+static void faviconDatabaseGetValidFaviconCallback(GObject *sourceObject, GAsyncResult *result, void *userData)
+{
+ gboolean *beenHere = (gboolean*)userData;
+ GError *error = NULL;
+ GdkPixbuf *icon = webkit_favicon_database_get_favicon_pixbuf_finish(WEBKIT_FAVICON_DATABASE(sourceObject), result, &error);
+ g_assert(icon);
+ g_object_unref(icon);
+
+ *beenHere = TRUE;
+
+ g_main_loop_quit(loop);
+}
+
+static void faviconDatabaseGetInvalidFaviconCallback(GObject *sourceObject, GAsyncResult *result, void *userData)
+{
+ gboolean *beenHere = (gboolean*)userData;
+ GError *error = NULL;
+ GdkPixbuf *icon = webkit_favicon_database_get_favicon_pixbuf_finish(WEBKIT_FAVICON_DATABASE(sourceObject), result, &error);
+ g_assert(!icon);
+
+ *beenHere = TRUE;
+
+ g_main_loop_quit(loop);
+}
+
+static void faviconDatabaseGetFaviconCancelledCallback(GObject *sourceObject, GAsyncResult *result, void *userData)
+{
+ gboolean *beenHere = (gboolean*)userData;
+ GError *error = NULL;
+ GdkPixbuf *icon = webkit_favicon_database_get_favicon_pixbuf_finish(WEBKIT_FAVICON_DATABASE(sourceObject), result, &error);
+ g_assert(!icon);
+ g_assert(error && g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED));
+
+ *beenHere = TRUE;
+
+ g_main_loop_quit(loop);
+}
+
+static inline void quitMainLoopIfLoadCompleted(gboolean *iconOrPageLoaded)
+{
+ if (*iconOrPageLoaded)
+ g_main_loop_quit(loop);
+ else
+ *iconOrPageLoaded = TRUE;
+}
+
+static void idleQuitLoopCallback(WebKitWebView *webView, GParamSpec *paramSpec, gboolean *iconOrPageLoaded)
+{
+ WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
+
+ if (status == WEBKIT_LOAD_FINISHED || status == WEBKIT_LOAD_FAILED)
+ quitMainLoopIfLoadCompleted(iconOrPageLoaded);
+}
+
+static void webkitWebViewIconLoaded(WebKitFaviconDatabase *database, const char *frameURI, gboolean *iconOrPageLoaded)
+{
+ quitMainLoopIfLoadCompleted(iconOrPageLoaded);
+}
+
+static void loadURI(const char *uri)
+{
+ WebKitWebView *view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+ gboolean iconOrPageLoaded = FALSE;
+
+ webkit_web_view_load_uri(view, uri);
+
+ g_signal_connect(view, "notify::load-status", G_CALLBACK(idleQuitLoopCallback), &iconOrPageLoaded);
+ g_signal_connect(view, "icon-loaded", G_CALLBACK(webkitWebViewIconLoaded), &iconOrPageLoaded);
+
+ g_main_loop_run(loop);
+
+ g_signal_handlers_disconnect_matched(view, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, &iconOrPageLoaded);
+}
+
+static gboolean faviconDatabaseGetValidFaviconIdle(void *userData)
+{
+ webkit_favicon_database_get_favicon_pixbuf(webkit_get_favicon_database(), baseURI,
+ gIconSize, gIconSize, NULL,
+ faviconDatabaseGetValidFaviconCallback, userData);
+ return FALSE;
+}
+
+static gboolean faviconDatabaseGetInvalidFaviconIdle(void *userData)
+{
+ webkit_favicon_database_get_favicon_pixbuf(webkit_get_favicon_database(), "http://www.webkitgtk.org/",
+ gIconSize, gIconSize, NULL,
+ faviconDatabaseGetInvalidFaviconCallback, userData);
+ return FALSE;
+}
+
+static gboolean faviconDatabaseGetFaviconCancelledIdle(void *userData)
+{
+ GCancellable *cancellable = g_cancellable_new();
+ webkit_favicon_database_get_favicon_pixbuf(webkit_get_favicon_database(), baseURI,
+ gIconSize, gIconSize, cancellable,
+ faviconDatabaseGetFaviconCancelledCallback, userData);
+ g_cancellable_cancel(cancellable);
+ g_object_unref(cancellable);
+ return FALSE;
+}
+
+static void testWebKitFaviconDatabaseGetFavicon()
+{
+ gboolean beenToIconCallback;
+
+ loop = g_main_loop_new(NULL, TRUE);
+
+ /* Load uri to make sure favicon is added to database. */
+ loadURI(baseURI);
+
+ beenToIconCallback = FALSE;
+ g_idle_add((GSourceFunc)faviconDatabaseGetValidFaviconIdle, &beenToIconCallback);
+ g_main_loop_run(loop);
+ g_assert(beenToIconCallback);
+
+ beenToIconCallback = FALSE;
+ g_idle_add((GSourceFunc)faviconDatabaseGetInvalidFaviconIdle, &beenToIconCallback);
+ g_main_loop_run(loop);
+ g_assert(beenToIconCallback);
+
+ beenToIconCallback = FALSE;
+ g_idle_add((GSourceFunc)faviconDatabaseGetFaviconCancelledIdle, &beenToIconCallback);
+ g_main_loop_run(loop);
+ g_assert(beenToIconCallback);
+}
+
+static void testWebKitFaviconDatabaseGetFaviconURI()
+{
+ char *iconURI = webkit_favicon_database_get_favicon_uri(webkit_get_favicon_database(), baseURI);
+ char *expectedURI = g_strdup_printf("%sfavicon.ico", baseURI);
+ g_assert_cmpstr(iconURI, ==, expectedURI);
+ g_free(expectedURI);
+ g_free(iconURI);
+}
+
+#endif
+
+static void testWebKitFaviconDatabaseRemoveAll(void)
+{
+ WebKitFaviconDatabase *database = webkit_get_favicon_database();
+ webkit_favicon_database_clear(database);
+ char *iconURI = webkit_favicon_database_get_favicon_uri(database, baseURI);
+ g_assert(!iconURI);
+ g_free(iconURI);
+}
+
+static void testWebKitFaviconDatabaseCloseDatabase(void)
+{
+ WebKitFaviconDatabase *database = webkit_get_favicon_database();
+ char *databasePath = g_strdup(webkit_favicon_database_get_path(database));
+ webkit_favicon_database_set_path(database, 0);
+ deleteDatabaseFileIfExists(databasePath);
+ g_free(databasePath);
+}
+
+int main(int argc, char **argv)
+{
+ gtk_test_init(&argc, &argv, NULL);
+
+ /* This hopefully makes the test independent of the path it's called from. */
+ testutils_relative_chdir("Source/WebKit/gtk/tests/resources/test.html", argv[0]);
+
+ SoupServer *server = soup_server_new(SOUP_SERVER_PORT, 0, NULL);
+ soup_server_run_async(server);
+
+ soup_server_add_handler(server, NULL, serverCallback, NULL, NULL);
+
+ SoupURI *soupURI = soup_uri_new("http://127.0.0.1/");
+ soup_uri_set_port(soupURI, soup_server_get_port(server));
+
+ baseURI = soup_uri_to_string(soupURI, FALSE);
+ soup_uri_free(soupURI);
+
+ g_test_bug_base("https://bugs.webkit.org/");
+ g_test_add_func("/webkit/favicondatabase/set-path", testWebKitFaviconDatabaseSetPath);
+
+ // These two tests will trigger an ASSERTION on debug builds due
+ // to http://webkit.org/b/67582. Remove the guards once the bug is fixed.
+#ifdef NDEBUG
+ g_test_add_func("/webkit/favicondatabase/get-favicon", testWebKitFaviconDatabaseGetFavicon);
+ g_test_add_func("/webkit/favicondatabase/get-favicon-uri", testWebKitFaviconDatabaseGetFaviconURI);
+#endif
+
+ g_test_add_func("/webkit/favicondatabase/remove-all", testWebKitFaviconDatabaseRemoveAll);
+ g_test_add_func("/webkit/favicondatabase/close-db", testWebKitFaviconDatabaseCloseDatabase);
+
+ return g_test_run();
+}
+#else
+int main(int argc, char **argv)
+{
+ g_critical("You will need gtk-2.14.0 to run the unit tests. Doing nothing now.");
+ return 0;
+}
+
+#endif
diff --git a/Source/WebKit/gtk/tests/testhittestresult.c b/Source/WebKit/gtk/tests/testhittestresult.c
index 3f3f2ea07..acccc3f61 100644
--- a/Source/WebKit/gtk/tests/testhittestresult.c
+++ b/Source/WebKit/gtk/tests/testhittestresult.c
@@ -83,6 +83,7 @@ load_status_cb(WebKitWebView* webView,
guint context;
GdkEvent* event = gdk_event_new(GDK_BUTTON_PRESS);
WebKitDOMNode* node;
+ gint x, y;
/* Close enough to 0,0 */
event->button.x = 5;
@@ -98,6 +99,11 @@ load_status_cb(WebKitWebView* webView,
g_object_get(result, "inner-node", &node, NULL);
g_assert(node);
g_assert(WEBKIT_DOM_IS_NODE(node));
+
+ g_object_get(result, "x", &x, "y", &y, NULL);
+ g_assert_cmpint(x, ==, 5);
+ g_assert_cmpint(y, ==, 5);
+
/* We can only test these node types at the moment. In the
* input case there seems to be an extra layer with a DIV on
* top of the input, which gets assigned to the inner-node.
diff --git a/Source/WebKit/gtk/webkit/webkit.h b/Source/WebKit/gtk/webkit/webkit.h
index 71451b153..c7e95e8ed 100644
--- a/Source/WebKit/gtk/webkit/webkit.h
+++ b/Source/WebKit/gtk/webkit/webkit.h
@@ -27,6 +27,7 @@
#include <webkit/webkitdom.h>
#include <webkit/webkitdownload.h>
#include <webkit/webkitenumtypes.h>
+#include <webkit/webkitfavicondatabase.h>
#include <webkit/webkitgeolocationpolicydecision.h>
#include <webkit/webkitglobals.h>
#include <webkit/webkithittestresult.h>
diff --git a/Source/WebKit/gtk/webkit/webkitdefines.h b/Source/WebKit/gtk/webkit/webkitdefines.h
index 673bbdfe6..89099b9b9 100644
--- a/Source/WebKit/gtk/webkit/webkitdefines.h
+++ b/Source/WebKit/gtk/webkit/webkitdefines.h
@@ -107,6 +107,9 @@ typedef struct _WebKitWebPluginClass WebKitWebPluginClass;
typedef struct _WebKitSpellChecker WebKitSpellChecker; /* dummy typedef */
typedef struct _WebKitSpellCheckerInterface WebKitSpellCheckerInterface;
+typedef struct _WebKitFaviconDatabase WebKitFaviconDatabase;
+typedef struct _WebKitFaviconDatabaseClass WebKitFaviconDatabaseClass;
+
G_END_DECLS
#endif
diff --git a/Source/WebKit/gtk/webkit/webkitdownload.cpp b/Source/WebKit/gtk/webkit/webkitdownload.cpp
index 75cbcbb58..871db2c62 100644
--- a/Source/WebKit/gtk/webkit/webkitdownload.cpp
+++ b/Source/WebKit/gtk/webkit/webkitdownload.cpp
@@ -22,8 +22,6 @@
#include "webkitdownload.h"
#include "ErrorsGtk.h"
-#include "GRefPtr.h"
-#include "Noncopyable.h"
#include "NotImplemented.h"
#include "ResourceHandleClient.h"
#include "ResourceHandleInternal.h"
@@ -39,6 +37,8 @@
#include "webkitnetworkresponseprivate.h"
#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
+#include <wtf/Noncopyable.h>
+#include <wtf/gobject/GRefPtr.h>
#include <wtf/text/CString.h>
#ifdef ERROR
@@ -561,7 +561,7 @@ void webkit_download_cancel(WebKitDownload* download)
* Convenience method to retrieve the URI from the
* #WebKitNetworkRequest which is being downloaded.
*
- * Returns: the uri
+ * Returns: the URI
*
* Since: 1.1.2
*/
diff --git a/Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp b/Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp
new file mode 100644
index 000000000..a1fd37a1e
--- /dev/null
+++ b/Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp
@@ -0,0 +1,645 @@
+/*
+ * Copyright (C) 2011 Christian Dywan <christian@lanedo.com>
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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 "webkitfavicondatabase.h"
+
+#include "DatabaseDetails.h"
+#include "DatabaseTracker.h"
+#include "FileSystem.h"
+#include "IconDatabase.h"
+#include "IconDatabaseClient.h"
+#include "Image.h"
+#include "IntSize.h"
+#include "webkitfavicondatabaseprivate.h"
+#include "webkitglobals.h"
+#include "webkitglobalsprivate.h"
+#include "webkitmarshal.h"
+#include "webkitsecurityoriginprivate.h"
+#include "webkitwebframe.h"
+#include <glib/gi18n-lib.h>
+#include <wtf/MainThread.h>
+#include <wtf/gobject/GOwnPtr.h>
+#include <wtf/gobject/GRefPtr.h>
+#include <wtf/text/CString.h>
+
+/**
+ * SECTION:webkitfavicondatabase
+ * @short_description: A WebKit favicon database
+ * @Title: WebKitFaviconDatabase
+ *
+ * #WebKitFaviconDatabase provides access to the icons associated with
+ * web sites.
+ *
+ * WebKit will automatically look for available icons in link elements
+ * on opened pages as well as an existing favicon.ico and load the
+ * images found into a memory cache if possible. That cache is frozen
+ * to an on-disk database for persistence.
+ *
+ * The database is disabled by default. In order for icons to be
+ * stored and accessed, you will need to set an icon database path
+ * using webkit_favicon_database_set_path(). Disable the database
+ * again passing %NULL to the previous call.
+ *
+ * If WebKitWebSettings::enable-private-browsing is %TRUE new icons
+ * won't be added to the on-disk database and no existing icons will
+ * be deleted from it. Nevertheless, WebKit will still store them in
+ * the in-memory cache during the current execution.
+ *
+ * Since: 1.8
+ */
+
+using namespace WebKit;
+using namespace WebCore;
+
+class PendingIconRequest;
+
+static void webkitFaviconDatabaseProcessPendingIconsForURI(WebKitFaviconDatabase*, const String& pageURI);
+static void webkitFaviconDatabaseImportFinished(WebKitFaviconDatabase*);
+static void webkitFaviconDatabaseGetIconPixbufCancelled(GCancellable*, PendingIconRequest*);
+static void webkitFaviconDatabaseClose(WebKitFaviconDatabase* database);
+
+class IconDatabaseClientGtk : public IconDatabaseClient {
+public:
+ // IconDatabaseClient interface
+ virtual bool performImport() { return true; }
+ virtual void didRemoveAllIcons() { };
+
+ // Called when an icon is requested while the initial import is
+ // going on.
+ virtual void didImportIconURLForPageURL(const String& URL) { };
+
+ // Called whenever a retained icon is read from database.
+ virtual void didImportIconDataForPageURL(const String& URL)
+ {
+ WebKitFaviconDatabase* database = webkit_get_favicon_database();
+ // We need to emit this here because webkitFaviconDatabaseDispatchDidReceiveIcon()
+ // is only called for icons that have just being downloaded, and this is called
+ // when icon data is imported from the database.
+ g_signal_emit_by_name(database, "icon-loaded", URL.utf8().data());
+
+ webkitFaviconDatabaseProcessPendingIconsForURI(database, URL);
+ }
+
+ virtual void didChangeIconForPageURL(const String& URL)
+ {
+ // Called when the the favicon for a particular URL changes.
+ // It does not mean that the new icon data is available yet.
+ }
+
+ virtual void didFinishURLImport()
+ {
+ webkitFaviconDatabaseImportFinished(webkit_get_favicon_database());
+
+ // Now that everything is imported enable pruning of old
+ // icons. No icon will be removed during the import process
+ // because we disable cleanups before opening the database.
+ IconDatabase::allowDatabaseCleanup();
+ }
+};
+
+class PendingIconRequest {
+public:
+ PendingIconRequest(const String& pageURL, GSimpleAsyncResult* result, GCancellable* cancellable, IntSize iconSize)
+ : m_pageURL(pageURL)
+ , m_asyncResult(result)
+ , m_cancellable(cancellable)
+ , m_cancelledId(0)
+ , m_iconSize(iconSize)
+ {
+ if (cancellable) {
+ m_cancelledId = g_cancellable_connect(cancellable, G_CALLBACK(webkitFaviconDatabaseGetIconPixbufCancelled), this, 0);
+ g_object_set_data_full(G_OBJECT(result), "cancellable", g_object_ref(cancellable), static_cast<GDestroyNotify>(g_object_unref));
+ }
+ }
+
+ ~PendingIconRequest()
+ {
+ if (m_cancelledId > 0)
+ g_cancellable_disconnect(m_cancellable.get(), m_cancelledId);
+ }
+
+ const String& pageURL() { return m_pageURL; }
+ GSimpleAsyncResult* asyncResult() { return m_asyncResult.get(); }
+ const IntSize& iconSize() { return m_iconSize; }
+
+ void asyncResultCancel()
+ {
+ ASSERT(m_asyncResult);
+ g_simple_async_result_set_error(m_asyncResult.get(), G_IO_ERROR, G_IO_ERROR_CANCELLED, "%s", _("Operation was cancelled"));
+ g_simple_async_result_complete(m_asyncResult.get());
+ }
+
+ void asyncResultCompleteInIdle(GdkPixbuf* icon)
+ {
+ ASSERT(m_asyncResult);
+ g_simple_async_result_set_op_res_gpointer(m_asyncResult.get(), icon, 0);
+ g_simple_async_result_complete_in_idle(m_asyncResult.get());
+ }
+
+ void asyncResultComplete(GdkPixbuf* icon)
+ {
+ ASSERT(m_asyncResult);
+ g_simple_async_result_set_op_res_gpointer(m_asyncResult.get(), icon, 0);
+ g_simple_async_result_complete(m_asyncResult.get());
+ }
+
+private:
+ String m_pageURL;
+ GRefPtr<GSimpleAsyncResult> m_asyncResult;
+ GRefPtr<GCancellable> m_cancellable;
+ gulong m_cancelledId;
+ IntSize m_iconSize;
+};
+
+
+enum {
+ PROP_0,
+
+ PROP_PATH,
+};
+
+enum {
+ ICON_LOADED,
+
+ LAST_SIGNAL
+};
+
+static guint webkit_favicon_database_signals[LAST_SIGNAL] = { 0, };
+
+G_DEFINE_TYPE(WebKitFaviconDatabase, webkit_favicon_database, G_TYPE_OBJECT)
+
+typedef Vector<OwnPtr<PendingIconRequest> > PendingIconRequestVector;
+typedef HashMap<String, PendingIconRequestVector*> PendingIconRequestMap;
+
+struct _WebKitFaviconDatabasePrivate {
+ GOwnPtr<gchar> path;
+ IconDatabaseClientGtk iconDatabaseClient;
+ PendingIconRequestMap pendingIconRequests;
+ bool importFinished;
+};
+
+static void webkit_favicon_database_finalize(GObject* object)
+{
+ WebKitFaviconDatabase* database = WEBKIT_FAVICON_DATABASE(object);
+
+ webkitFaviconDatabaseClose(database);
+ database->priv->~WebKitFaviconDatabasePrivate();
+
+ G_OBJECT_CLASS(webkit_favicon_database_parent_class)->finalize(object);
+}
+
+static void webkit_favicon_database_set_property(GObject* object, guint propId, const GValue* value, GParamSpec* pspec)
+{
+ WebKitFaviconDatabase* database = WEBKIT_FAVICON_DATABASE(object);
+
+ switch (propId) {
+ case PROP_PATH:
+ webkit_favicon_database_set_path(database, g_value_get_string(value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, pspec);
+ break;
+ }
+}
+
+static void webkit_favicon_database_get_property(GObject* object, guint propId, GValue* value, GParamSpec* pspec)
+{
+ WebKitFaviconDatabase* database = WEBKIT_FAVICON_DATABASE(object);
+
+ switch (propId) {
+ case PROP_PATH:
+ g_value_set_string(value, webkit_favicon_database_get_path(database));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, pspec);
+ break;
+ }
+}
+
+static void webkit_favicon_database_class_init(WebKitFaviconDatabaseClass* klass)
+{
+ webkitInit();
+
+ GObjectClass* gobjectClass = G_OBJECT_CLASS(klass);
+ gobjectClass->finalize = webkit_favicon_database_finalize;
+ gobjectClass->set_property = webkit_favicon_database_set_property;
+ gobjectClass->get_property = webkit_favicon_database_get_property;
+
+ /**
+ * WebKitFaviconDatabase:path:
+ *
+ * The absolute path of the icon database folder.
+ *
+ * Since: 1.8
+ */
+ g_object_class_install_property(gobjectClass, PROP_PATH,
+ g_param_spec_string("path",
+ _("Path"),
+ _("The absolute path of the icon database folder"),
+ NULL,
+ WEBKIT_PARAM_READWRITE));
+
+
+ /**
+ * WebKitFaviconDatabase::icon-loaded:
+ * @database: the object on which the signal is emitted
+ * @frame_uri: the URI of the main frame of a Web page containing
+ * the icon
+ *
+ * This signal is fired if an icon is loaded on any
+ * #WebKitWebView. If you are only interested in a particular
+ * #WebKitWebView see #WebKitWebView::icon-loaded.
+ *
+ * Note that this signal carries the URI of the frame that loads
+ * the icon, while #WebKitWebView::icon-loaded provides the URI
+ * of the favicon.
+ *
+ * Since: 1.8
+ */
+ webkit_favicon_database_signals[ICON_LOADED] = g_signal_new("icon-loaded",
+ G_TYPE_FROM_CLASS(klass),
+ (GSignalFlags)G_SIGNAL_RUN_LAST,
+ 0, 0, 0,
+ webkit_marshal_VOID__STRING,
+ G_TYPE_NONE, 1,
+ G_TYPE_STRING);
+
+ g_type_class_add_private(klass, sizeof(WebKitFaviconDatabasePrivate));
+}
+
+static void webkit_favicon_database_init(WebKitFaviconDatabase* database)
+{
+ database->priv = G_TYPE_INSTANCE_GET_PRIVATE(database, WEBKIT_TYPE_FAVICON_DATABASE, WebKitFaviconDatabasePrivate);
+ new (database->priv) WebKitFaviconDatabasePrivate();
+}
+
+// Called from FrameLoaderClient::dispatchDidReceiveIcon()
+void webkitFaviconDatabaseDispatchDidReceiveIcon(WebKitFaviconDatabase* database, const char* frameURI)
+{
+ g_signal_emit(database, webkit_favicon_database_signals[ICON_LOADED], 0, frameURI);
+
+ // Retain the new icon.
+ iconDatabase().retainIconForPageURL(String::fromUTF8(frameURI));
+}
+
+/**
+ * webkit_favicon_database_get_path:
+ * @database: a #WebKitFaviconDatabase
+ *
+ * Determines the absolute path to the database folder on disk.
+ *
+ * Returns: the absolute path of the database folder, or %NULL
+ *
+ * Since: 1.8
+ */
+const gchar* webkit_favicon_database_get_path(WebKitFaviconDatabase* database)
+{
+ g_return_val_if_fail(WEBKIT_IS_FAVICON_DATABASE(database), 0);
+
+ return database->priv->path.get();
+}
+
+static void webkitFaviconDatabaseClose(WebKitFaviconDatabase* database)
+{
+ if (iconDatabase().isEnabled()) {
+ iconDatabase().setEnabled(false);
+ iconDatabase().close();
+ }
+}
+
+/**
+ * webkit_favicon_database_set_path:
+ * @database: a #WebKitFaviconDatabase
+ * @path: (allow-none): an absolute path to the icon database folder
+ * or %NULL to disable the database
+ *
+ * Specifies the absolute path to the database folder on disk. The
+ * icon database will only be enabled after a call to this method.
+ *
+ * Passing %NULL or "" as path disables the icon database.
+ *
+ * Since: 1.8
+ */
+void webkit_favicon_database_set_path(WebKitFaviconDatabase* database, const gchar* path)
+{
+ g_return_if_fail(WEBKIT_IS_FAVICON_DATABASE(database));
+
+ // Always try to close because the deprecated icondatabase is opened by default.
+ webkitFaviconDatabaseClose(database);
+
+ database->priv->importFinished = false;
+ if (!path || !path[0]) {
+ database->priv->path.set(0);
+ iconDatabase().setEnabled(false);
+ return;
+ }
+
+ iconDatabase().setClient(&database->priv->iconDatabaseClient);
+ IconDatabase::delayDatabaseCleanup();
+ iconDatabase().setEnabled(true);
+ if (!iconDatabase().open(filenameToString(path), IconDatabase::defaultDatabaseFilename())) {
+ IconDatabase::allowDatabaseCleanup();
+ return;
+ }
+
+ database->priv->path.set(g_strdup(path));
+}
+
+/**
+ * webkit_favicon_database_get_favicon_uri:
+ * @database: a #WebKitFaviconDatabase
+ * @page_uri: URI of the page containing the icon
+ *
+ * Obtains the URI for the favicon for the given page URI.
+ * See also webkit_web_view_get_icon_uri().
+ *
+ * Returns: a newly allocated URI for the favicon, or %NULL
+ *
+ * Since: 1.8
+ */
+gchar* webkit_favicon_database_get_favicon_uri(WebKitFaviconDatabase* database, const gchar* pageURI)
+{
+ g_return_val_if_fail(WEBKIT_IS_FAVICON_DATABASE(database), 0);
+ g_return_val_if_fail(pageURI, 0);
+ ASSERT(isMainThread());
+
+ String iconURI = iconDatabase().synchronousIconURLForPageURL(String::fromUTF8(pageURI));
+ if (iconURI.isEmpty())
+ return 0;
+
+ return g_strdup(iconURI.utf8().data());
+}
+
+static GdkPixbuf* getIconPixbufSynchronously(WebKitFaviconDatabase* database, const String& pageURL, const IntSize& iconSize)
+{
+ ASSERT(isMainThread());
+
+ // The exact size we pass is irrelevant to the iconDatabase code.
+ // We must pass something greater than 0x0 to get a pixbuf.
+ Image* icon = iconDatabase().synchronousIconForPageURL(pageURL, !iconSize.isZero() ? iconSize : IntSize(1, 1));
+ if (!icon)
+ return 0;
+
+ GRefPtr<GdkPixbuf> pixbuf = adoptGRef(icon->getGdkPixbuf());
+ if (!pixbuf)
+ return 0;
+
+ // A size of (0, 0) means the maximum available size.
+ if (!iconSize.isZero() && (icon->width() != iconSize.width() || icon->height() != iconSize.height()))
+ pixbuf = gdk_pixbuf_scale_simple(pixbuf.get(), iconSize.width(), iconSize.height(), GDK_INTERP_BILINEAR);
+ return pixbuf.leakRef();
+}
+
+/**
+ * webkit_favicon_database_try_get_favicon_pixbuf:
+ * @database: a #WebKitFaviconDatabase
+ * @page_uri: URI of the page containing the icon
+ * @width: the desired width for the icon
+ * @height: the desired height for the icon
+ *
+ * Obtains a #GdkPixbuf of the favicon for the given page URI, or
+ * %NULL if there is no icon for the given page or it hasn't been
+ * loaded from disk yet. Use webkit_favicon_database_get_favicon_uri()
+ * if you need to distinguish these cases. To make sure this method
+ * will return a valid icon when the given URI has one, you should
+ * connect to #WebKitFaviconDatabase::icon-loaded and use this function
+ * in the callback.
+ *
+ * If @width and @height ar both 0 then this method will return the
+ * maximum available size for the icon. Note that if you specify a
+ * different size the icon will be scaled each time you call this
+ * function.
+ *
+ * Returns: (transfer full): a new reference to a #GdkPixbuf, or %NULL
+ * if the given URI doesn't have an icon or it hasn't been loaded yet.
+ *
+ * Since: 1.8
+ */
+GdkPixbuf* webkit_favicon_database_try_get_favicon_pixbuf(WebKitFaviconDatabase* database, const gchar* pageURI, guint width, guint height)
+{
+ g_return_val_if_fail(WEBKIT_IS_FAVICON_DATABASE(database), 0);
+ g_return_val_if_fail(pageURI, 0);
+ g_return_val_if_fail((width && height) || (!width && !height), 0);
+
+ return getIconPixbufSynchronously(database, String::fromUTF8(pageURI), IntSize(width, height));
+}
+
+static PendingIconRequestVector* webkitFaviconDatabaseGetOrCreateRequests(WebKitFaviconDatabase* database, const String& pageURL)
+{
+ PendingIconRequestVector* icons = database->priv->pendingIconRequests.get(pageURL);
+ if (!icons) {
+ icons = new PendingIconRequestVector;
+ database->priv->pendingIconRequests.set(pageURL, icons);
+ }
+
+ return icons;
+}
+
+static void webkitfavicondatabaseDeleteRequests(WebKitFaviconDatabase* database, PendingIconRequestVector* requests, const String& pageURL)
+{
+ database->priv->pendingIconRequests.remove(pageURL);
+ delete requests;
+}
+
+static void getIconPixbufCancelled(void* userData)
+{
+ PendingIconRequest* request = static_cast<PendingIconRequest*>(userData);
+ request->asyncResultCancel();
+
+ const String& pageURL = request->pageURL();
+ WebKitFaviconDatabase* database = webkit_get_favicon_database();
+ PendingIconRequestVector* icons = database->priv->pendingIconRequests.get(pageURL);
+ if (!icons)
+ return;
+
+ size_t itemIndex = icons->find(request);
+ if (itemIndex != notFound)
+ icons->remove(itemIndex);
+ if (icons->isEmpty())
+ webkitfavicondatabaseDeleteRequests(database, icons, pageURL);
+}
+
+static void webkitFaviconDatabaseGetIconPixbufCancelled(GCancellable* cancellable, PendingIconRequest* request)
+{
+ // Handle cancelled in a in idle since it might be called from any thread.
+ callOnMainThread(getIconPixbufCancelled, request);
+}
+
+/**
+ * webkit_favicon_database_get_favicon_pixbuf:
+ * @database: a #WebKitFaviconDatabase
+ * @page_uri: URI of the page containing the icon
+ * @width: the desired width for the icon
+ * @height: the desired height for the icon
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is
+ * satisfied or %NULL if you don't care about the result.
+ * @user_data: The data to pass to @callback.
+ *
+ * Asynchronously obtains a #GdkPixbuf of the favicon for the given
+ * page URI. The advantage of this method over
+ * webkit_favicon_database_try_get_favicon_pixbuf() is that it always returns the
+ * cached icon if it's in the database asynchronously waiting for the
+ * icon to be read from the database.
+ *
+ * This is an asynchronous method. When the operation is finished, callback will
+ * be invoked. You can then call webkit_favicon_database_get_favicon_pixbuf_finish()
+ * to get the result of the operation.
+ * See also webkit_favicon_database_try_get_favicon_pixbuf().
+ *
+ * If @width and @height are both 0 then this method will return the
+ * maximum available size for the icon. Note that if you specify a
+ * different size the icon will be scaled each time you call this
+ * function.
+ *
+ * Since: 1.8
+ */
+void webkit_favicon_database_get_favicon_pixbuf(WebKitFaviconDatabase* database, const gchar* pageURI, guint width, guint height, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer userData)
+{
+ g_return_if_fail(WEBKIT_IS_FAVICON_DATABASE(database));
+ g_return_if_fail(pageURI);
+ g_return_if_fail((width && height) || (!width && !height));
+
+ GRefPtr<GSimpleAsyncResult> result = adoptGRef(g_simple_async_result_new(G_OBJECT(database), callback, userData,
+ reinterpret_cast<gpointer>(webkit_favicon_database_get_favicon_pixbuf)));
+
+ // If we don't have an icon for the given URI or the database is not opened then return ASAP. We have to check that
+ // because if the database is not opened it will skip (and not notify about) every single icon load request
+ if ((database->priv->importFinished && iconDatabase().synchronousIconURLForPageURL(String::fromUTF8(pageURI)).isEmpty())
+ || !iconDatabase().isOpen()) {
+ g_simple_async_result_set_op_res_gpointer(result.get(), 0, 0);
+ g_simple_async_result_complete_in_idle(result.get());
+ return;
+ }
+
+ String pageURL = String::fromUTF8(pageURI);
+ PendingIconRequest* request = new PendingIconRequest(pageURL, result.get(), cancellable, IntSize(width, height));
+
+ // Register icon request before asking for the icon to avoid race conditions.
+ PendingIconRequestVector* icons = webkitFaviconDatabaseGetOrCreateRequests(database, pageURL);
+ ASSERT(icons);
+ icons->append(adoptPtr(request));
+
+ // We ask for the icon directly. If we don't get the icon data now,
+ // we'll be notified later (even if the database is still importing icons).
+ GdkPixbuf* pixbuf = getIconPixbufSynchronously(database, pageURL, IntSize(width, height));
+ if (!pixbuf)
+ return;
+
+ request->asyncResultCompleteInIdle(pixbuf);
+
+ // Remove the request we have just created as it isn't pending
+ // anymore because we already have the pixbuf.
+ ASSERT(icons->last().get() == request);
+ icons->removeLast();
+ if (icons->isEmpty())
+ webkitfavicondatabaseDeleteRequests(database, icons, pageURL);
+}
+
+/**
+ * webkit_favicon_database_get_favicon_pixbuf_finish:
+ * @database: a #WebKitFaviconDatabase
+ * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to webkit_favicon_database_get_favicon_pixbuf()
+ * @error: (allow-none): Return location for error or %NULL.
+ *
+ * Finishes an operation started with webkit_favicon_database_get_favicon_pixbuf().
+ *
+ * Returns: (transfer full): a new reference to a #GdkPixbuf, or %NULL.
+ *
+ * Since: 1.8
+ */
+GdkPixbuf* webkit_favicon_database_get_favicon_pixbuf_finish(WebKitFaviconDatabase* database, GAsyncResult* result, GError** error)
+{
+ GSimpleAsyncResult* simpleResult = G_SIMPLE_ASYNC_RESULT(result);
+ g_return_val_if_fail(g_simple_async_result_get_source_tag(simpleResult) == webkit_favicon_database_get_favicon_pixbuf, 0);
+
+ if (g_simple_async_result_propagate_error(simpleResult, error))
+ return 0;
+
+ GCancellable* cancellable = static_cast<GCancellable*>(g_object_get_data(G_OBJECT(simpleResult), "cancellable"));
+ if (cancellable && g_cancellable_is_cancelled(cancellable)) {
+ g_set_error_literal(error, G_IO_ERROR, G_IO_ERROR_CANCELLED, _("Operation was cancelled"));
+ return 0;
+ }
+
+ GdkPixbuf* icon = static_cast<GdkPixbuf*>(g_simple_async_result_get_op_res_gpointer(simpleResult));
+ if (!icon)
+ return 0;
+
+ return static_cast<GdkPixbuf*>(icon);
+}
+
+static void webkitFaviconDatabaseProcessPendingIconsForURI(WebKitFaviconDatabase* database, const String& pageURL)
+{
+ PendingIconRequestVector* icons = database->priv->pendingIconRequests.get(pageURL);
+ if (!icons)
+ return;
+
+ for (size_t i = 0; i < icons->size(); ++i) {
+ PendingIconRequest* request = icons->at(i).get();
+ if (request->asyncResult())
+ request->asyncResultComplete(getIconPixbufSynchronously(database, pageURL, request->iconSize()));
+ }
+ webkitfavicondatabaseDeleteRequests(database, icons, pageURL);
+}
+
+static void webkitFaviconDatabaseImportFinished(WebKitFaviconDatabase* database)
+{
+ ASSERT(isMainThread());
+ database->priv->importFinished = true;
+
+ // Import is complete, process pending requests for pages that are not in the database,
+ // since didImportIconDataForPageURL() will never be called for them.
+ Vector<String> toDeleteURLs;
+ PendingIconRequestMap::const_iterator end = database->priv->pendingIconRequests.end();
+ for (PendingIconRequestMap::const_iterator iter = database->priv->pendingIconRequests.begin(); iter != end; ++iter) {
+ String iconURL = iconDatabase().synchronousIconURLForPageURL(iter->first);
+ if (!iconURL.isEmpty())
+ continue;
+
+ PendingIconRequestVector* icons = iter->second;
+ for (size_t i = 0; i < icons->size(); ++i) {
+ PendingIconRequest* request = icons->at(i).get();
+ if (request->asyncResult())
+ request->asyncResultComplete(0);
+ }
+
+ toDeleteURLs.append(iter->first);
+ }
+
+ for (size_t i = 0; i < toDeleteURLs.size(); ++i)
+ webkitfavicondatabaseDeleteRequests(database, database->priv->pendingIconRequests.get(toDeleteURLs[i]), toDeleteURLs[i]);
+}
+
+/**
+ * webkit_favicon_database_clear:
+ * @database: a #WebKitFaviconDatabase
+ *
+ * Clears all icons from the database.
+ *
+ * Since: 1.8
+ */
+void webkit_favicon_database_clear(WebKitFaviconDatabase* database)
+{
+ g_return_if_fail(WEBKIT_IS_FAVICON_DATABASE(database));
+
+ iconDatabase().removeAllIcons();
+}
diff --git a/Source/WebKit/gtk/webkit/webkitfavicondatabase.h b/Source/WebKit/gtk/webkit/webkitfavicondatabase.h
new file mode 100644
index 000000000..95d6b8442
--- /dev/null
+++ b/Source/WebKit/gtk/webkit/webkitfavicondatabase.h
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2011 Christian Dywan <christian@lanedo.com>
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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 webkitfavicondatabase_h
+#define webkitfavicondatabase_h
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib-object.h>
+#include <webkit/webkitdefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_FAVICON_DATABASE (webkit_favicon_database_get_type())
+#define WEBKIT_FAVICON_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_FAVICON_DATABASE, WebKitFaviconDatabase))
+#define WEBKIT_FAVICON_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_FAVICON_DATABASE, WebKitFaviconDatabaseClass))
+#define WEBKIT_IS_FAVICON_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_FAVICON_DATABASE))
+#define WEBKIT_IS_FAVICON_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_FAVICON_DATABASE))
+#define WEBKIT_FAVICON_DATABASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_FAVICON_DATABASE, WebKitFaviconDatabaseClass))
+
+typedef struct _WebKitFaviconDatabasePrivate WebKitFaviconDatabasePrivate;
+
+struct _WebKitFaviconDatabase {
+ GObject parent_instance;
+
+ /*< private >*/
+ WebKitFaviconDatabasePrivate* priv;
+};
+
+struct _WebKitFaviconDatabaseClass {
+ GObjectClass parent_class;
+
+ /* Padding for future expansion */
+ void (*_webkit_reserved1) (void);
+ void (*_webkit_reserved2) (void);
+ void (*_webkit_reserved3) (void);
+ void (*_webkit_reserved4) (void);
+};
+
+WEBKIT_API GType
+webkit_favicon_database_get_type (void);
+
+WEBKIT_API const gchar*
+webkit_favicon_database_get_path (WebKitFaviconDatabase* database);
+
+WEBKIT_API void
+webkit_favicon_database_set_path (WebKitFaviconDatabase* database,
+ const gchar* path);
+
+WEBKIT_API gchar*
+webkit_favicon_database_get_favicon_uri (WebKitFaviconDatabase* database,
+ const gchar* page_uri);
+
+WEBKIT_API GdkPixbuf*
+webkit_favicon_database_try_get_favicon_pixbuf (WebKitFaviconDatabase* database,
+ const gchar* page_uri,
+ guint width,
+ guint height);
+
+WEBKIT_API void
+webkit_favicon_database_get_favicon_pixbuf (WebKitFaviconDatabase* database,
+ const gchar* page_uri,
+ guint width,
+ guint height,
+ GCancellable* cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+WEBKIT_API GdkPixbuf*
+webkit_favicon_database_get_favicon_pixbuf_finish (WebKitFaviconDatabase* database,
+ GAsyncResult* result,
+ GError** error);
+
+WEBKIT_API void
+webkit_favicon_database_clear (WebKitFaviconDatabase* database);
+
+G_END_DECLS
+
+#endif /* webkitfavicondatabase_h */
diff --git a/Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h b/Source/WebKit/gtk/webkit/webkitfavicondatabaseprivate.h
index 8b8441e0f..b7679a0f0 100644
--- a/Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h
+++ b/Source/WebKit/gtk/webkit/webkitfavicondatabaseprivate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Igalia S.L.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -15,33 +15,11 @@
* 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 DeviceOrientationClientQt_h
-#define DeviceOrientationClientQt_h
-
-#include "DeviceOrientation.h"
-#include "DeviceOrientationClient.h"
-
-namespace WebCore {
-
-class DeviceOrientationProviderQt;
-
-class DeviceOrientationClientQt : public DeviceOrientationClient {
-public:
- DeviceOrientationClientQt();
- virtual ~DeviceOrientationClientQt();
-
- virtual void setController(DeviceOrientationController*);
- virtual void startUpdating();
- virtual void stopUpdating();
- virtual DeviceOrientation* lastOrientation() const;
- virtual void deviceOrientationControllerDestroyed();
-private:
- DeviceOrientationProviderQt* m_provider;
-};
+#ifndef webkitfavicondatabaseprivate_h
+#define webkitfavicondatabaseprivate_h
-} // namespace WebCore
+void webkitFaviconDatabaseDispatchDidReceiveIcon(WebKitFaviconDatabase*, const char* frameURI);
-#endif // DeviceOrientationClientQt_h
+#endif // webkitfavicondatabaseprivate_h
diff --git a/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp b/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp
index 2523c9b73..930b68792 100644
--- a/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp
+++ b/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp
@@ -22,8 +22,7 @@
#include "Geolocation.h"
#include "webkitgeolocationpolicydecisionprivate.h"
-
-using namespace WebCore;
+#include "webkitglobalsprivate.h"
/**
* SECTION:webkitgeolocationpolicydecision
@@ -39,7 +38,9 @@ G_DEFINE_TYPE(WebKitGeolocationPolicyDecision, webkit_geolocation_policy_decisio
struct _WebKitGeolocationPolicyDecisionPrivate {
WebKitWebFrame* frame;
- Geolocation* geolocation;
+#if ENABLE(GEOLOCATION)
+ WebCore::Geolocation* geolocation;
+#endif
};
static void webkit_geolocation_policy_decision_class_init(WebKitGeolocationPolicyDecisionClass* decisionClass)
@@ -52,7 +53,8 @@ static void webkit_geolocation_policy_decision_init(WebKitGeolocationPolicyDecis
decision->priv = G_TYPE_INSTANCE_GET_PRIVATE(decision, WEBKIT_TYPE_GEOLOCATION_POLICY_DECISION, WebKitGeolocationPolicyDecisionPrivate);
}
-WebKitGeolocationPolicyDecision* webkit_geolocation_policy_decision_new(WebKitWebFrame* frame, Geolocation* geolocation)
+#if ENABLE(GEOLOCATION)
+WebKitGeolocationPolicyDecision* webkit_geolocation_policy_decision_new(WebKitWebFrame* frame, WebCore::Geolocation* geolocation)
{
g_return_val_if_fail(frame, NULL);
WebKitGeolocationPolicyDecision* decision = WEBKIT_GEOLOCATION_POLICY_DECISION(g_object_new(WEBKIT_TYPE_GEOLOCATION_POLICY_DECISION, NULL));
@@ -62,6 +64,7 @@ WebKitGeolocationPolicyDecision* webkit_geolocation_policy_decision_new(WebKitWe
priv->geolocation = geolocation;
return decision;
}
+#endif
/**
* webkit_geolocation_policy_allow
@@ -73,10 +76,14 @@ WebKitGeolocationPolicyDecision* webkit_geolocation_policy_decision_new(WebKitWe
*/
void webkit_geolocation_policy_allow(WebKitGeolocationPolicyDecision* decision)
{
+#if ENABLE(GEOLOCATION)
g_return_if_fail(WEBKIT_IS_GEOLOCATION_POLICY_DECISION(decision));
WebKitGeolocationPolicyDecisionPrivate* priv = decision->priv;
priv->geolocation->setIsAllowed(TRUE);
+#else
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Geolocation")
+#endif
}
/**
@@ -89,9 +96,13 @@ void webkit_geolocation_policy_allow(WebKitGeolocationPolicyDecision* decision)
*/
void webkit_geolocation_policy_deny(WebKitGeolocationPolicyDecision* decision)
{
+#if ENABLE(GEOLOCATION)
g_return_if_fail(WEBKIT_IS_GEOLOCATION_POLICY_DECISION(decision));
WebKitGeolocationPolicyDecisionPrivate* priv = decision->priv;
priv->geolocation->setIsAllowed(FALSE);
+#else
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Geolocation")
+#endif
}
diff --git a/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecisionprivate.h b/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecisionprivate.h
index d250044e4..177154cd2 100644
--- a/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecisionprivate.h
+++ b/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecisionprivate.h
@@ -25,10 +25,14 @@
#include "webkitgeolocationpolicydecision.h"
+#if ENABLE(GEOLOCATION)
+
extern "C" {
WebKitGeolocationPolicyDecision* webkit_geolocation_policy_decision_new(WebKitWebFrame*, WebCore::Geolocation*);
}
+#endif // ENABLE(GEOLOCATION)
+
#endif
diff --git a/Source/WebKit/gtk/webkit/webkitglobals.cpp b/Source/WebKit/gtk/webkit/webkitglobals.cpp
index bc5d72604..78a4949fb 100644
--- a/Source/WebKit/gtk/webkit/webkitglobals.cpp
+++ b/Source/WebKit/gtk/webkit/webkitglobals.cpp
@@ -23,16 +23,16 @@
#include "ApplicationCacheStorage.h"
#include "Chrome.h"
+#include "ContextMenuItem.h"
#include "FrameNetworkingContextGtk.h"
#include "GtkUtilities.h"
-#include "GOwnPtr.h"
-#include "GRefPtr.h"
#include "IconDatabase.h"
#include "Logging.h"
#include "MemoryCache.h"
#include "Page.h"
#include "PageCache.h"
#include "PageGroup.h"
+#include "PlatformStrategiesGtk.h"
#include "TextEncodingRegistry.h"
#include "Pasteboard.h"
#include "PasteboardHelperGtk.h"
@@ -41,6 +41,7 @@
#include "ResourceHandleInternal.h"
#include "ResourceResponse.h"
#include "webkitapplicationcache.h"
+#include "webkitfavicondatabase.h"
#include "webkitglobalsprivate.h"
#include "webkiticondatabase.h"
#include "webkitsoupauthdialog.h"
@@ -52,6 +53,8 @@
#include <runtime/InitializeThreading.h>
#include <stdlib.h>
#include <wtf/MainThread.h>
+#include <wtf/gobject/GOwnPtr.h>
+#include <wtf/gobject/GRefPtr.h>
#if USE(CLUTTER)
#include <clutter-gtk/clutter-gtk.h>
@@ -237,6 +240,8 @@ static GtkWidget* currentToplevelCallback(WebKitSoupAuthDialog* feature, SoupMes
* Return value: (transfer none): the current #WebKitIconDatabase
*
* Since: 1.3.13
+ *
+ * Deprecated: 1.8: Use webkit_get_favicon_database() instead
*/
WebKitIconDatabase* webkit_get_icon_database()
{
@@ -249,11 +254,35 @@ WebKitIconDatabase* webkit_get_icon_database()
return database;
}
+/**
+ * webkit_get_favicon_database:
+ *
+ * Returns the #WebKitFaviconDatabase providing access to website
+ * icons.
+ *
+ * Return value: (transfer none): the current #WebKitFaviconDatabase
+ *
+ * Since: 1.8
+ */
+WebKitFaviconDatabase* webkit_get_favicon_database()
+{
+ webkitInit();
+
+ static WebKitFaviconDatabase* database = 0;
+ if (!database)
+ database = WEBKIT_FAVICON_DATABASE(g_object_new(WEBKIT_TYPE_FAVICON_DATABASE, NULL));
+
+ return database;
+}
+
static GRefPtr<WebKitSpellChecker> textChecker = 0;
static void webkitExit()
{
g_object_unref(webkit_get_default_session());
+#if ENABLE(ICONDATABASE)
+ g_object_unref(webkit_get_favicon_database());
+#endif
textChecker = 0;
}
@@ -299,6 +328,169 @@ void webkit_set_text_checker(GObject* checker)
textChecker = checker ? WEBKIT_SPELL_CHECKER(checker) : 0;
}
+/**
+ * webkit_context_menu_item_get_action:
+ * @item: a #GtkMenuItem of the default context menu
+ *
+ * Returns the #WebKitContextMenuAction of the given @item. This function
+ * can be used to determine the items present in the default context menu.
+ * In order to inspect the default context menu, you should connect to
+ * #WebKitWebView::context-menu signal.
+ *
+ * <example>
+ * <title>Inspecting the default context menu</title>
+ * <programlisting>
+ * static gboolean context_menu_cb (WebKitWebView *webView,
+ * GtkWidget *default_menu,
+ * WebKitHitTestResult *hit_test_result,
+ * gboolean triggered_with_keyboard,
+ * gpointer user_data)
+ * {
+ * GList *items = gtk_container_get_children (GTK_CONTAINER (default_menu));
+ * GList *l;
+ * GtkAction *action;
+ * GtkWidget *sub_menu;
+ *
+ * for (l = items; l; l = g_list_next (l)) {
+ * GtkMenuItem *item = (GtkMenuItem *)l->data;
+ *
+ * if (GTK_IS_SEPARATOR_MENU_ITEM (item)) {
+ * /&ast; It's separator, do nothing &ast;/
+ * continue;
+ * }
+ *
+ * switch (webkit_context_menu_item_get_action (item)) {
+ * case WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION:
+ * /&ast; No action for this item &ast;/
+ * break;
+ * /&ast; Don't allow to ope links from context menu &ast;/
+ * case WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK:
+ * case WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK_IN_NEW_WINDOW:
+ * action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (item));
+ * gtk_action_set_sensitive (action, FALSE);
+ * break;
+ * default:
+ * break;
+ * }
+ *
+ * sub_menu = gtk_menu_item_get_submenu (item);
+ * if (sub_menu) {
+ * GtkWidget *menu_item;
+ *
+ * /&ast; Add custom action to submenu &ast;/
+ * action = gtk_action_new ("CustomItemName", "Custom Action", NULL, NULL);
+ * g_signal_connect (action, "activate", G_CALLBACK (custom_menu_item_activated), NULL);
+ *
+ * menu_item = gtk_action_create_menu_item (action);
+ * g_object_unref (action);
+ * gtk_menu_shell_append (GTK_MENU_SHELL (sub_menu), menu_item);
+ * gtk_widget_show (menu_item);
+ * }
+ * }
+ *
+ * g_list_free(items);
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * Note that you can get the #GtkAction of any item in the default context menu with
+ * gtk_activatable_get_related_action().
+ *
+ * Returns: the #WebKitContextMenuAction of the given @item
+ *
+ * Since: 1.10
+ */
+WebKitContextMenuAction webkit_context_menu_item_get_action(GtkMenuItem* item)
+{
+#if ENABLE(CONTEXT_MENUS)
+ g_return_val_if_fail(GTK_IS_MENU_ITEM(item), WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION);
+
+ ContextMenuItem menuItem(item);
+ switch (menuItem.action()) {
+ case ContextMenuItemTagNoAction:
+ return WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION;
+ case ContextMenuItemTagOpenLink:
+ return WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK;
+ case ContextMenuItemTagOpenLinkInNewWindow:
+ return WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK_IN_NEW_WINDOW;
+ case ContextMenuItemTagDownloadLinkToDisk:
+ return WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_LINK_TO_DISK;
+ case ContextMenuItemTagCopyLinkToClipboard:
+ return WEBKIT_CONTEXT_MENU_ACTION_COPY_LINK_TO_CLIPBOARD;
+ case ContextMenuItemTagOpenImageInNewWindow:
+ return WEBKIT_CONTEXT_MENU_ACTION_OPEN_IMAGE_IN_NEW_WINDOW;
+ case ContextMenuItemTagDownloadImageToDisk:
+ return WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_IMAGE_TO_DISK;
+ case ContextMenuItemTagCopyImageToClipboard:
+ return WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD;
+ case ContextMenuItemTagCopyImageUrlToClipboard:
+ return WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_URL_TO_CLIPBOARD;
+ case ContextMenuItemTagOpenFrameInNewWindow:
+ return WEBKIT_CONTEXT_MENU_ACTION_OPEN_FRAME_IN_NEW_WINDOW;
+ case ContextMenuItemTagGoBack:
+ return WEBKIT_CONTEXT_MENU_ACTION_GO_BACK;
+ case ContextMenuItemTagGoForward:
+ return WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD;
+ case ContextMenuItemTagStop:
+ return WEBKIT_CONTEXT_MENU_ACTION_STOP;
+ case ContextMenuItemTagReload:
+ return WEBKIT_CONTEXT_MENU_ACTION_RELOAD;
+ case ContextMenuItemTagCopy:
+ return WEBKIT_CONTEXT_MENU_ACTION_COPY;
+ case ContextMenuItemTagCut:
+ return WEBKIT_CONTEXT_MENU_ACTION_CUT;
+ case ContextMenuItemTagPaste:
+ return WEBKIT_CONTEXT_MENU_ACTION_PASTE;
+ case ContextMenuItemTagDelete:
+ return WEBKIT_CONTEXT_MENU_ACTION_DELETE;
+ case ContextMenuItemTagSelectAll:
+ return WEBKIT_CONTEXT_MENU_ACTION_SELECT_ALL;
+ case ContextMenuItemTagInputMethods:
+ return WEBKIT_CONTEXT_MENU_ACTION_INPUT_METHODS;
+ case ContextMenuItemTagUnicode:
+ return WEBKIT_CONTEXT_MENU_ACTION_UNICODE;
+ case ContextMenuItemTagSpellingGuess:
+ return WEBKIT_CONTEXT_MENU_ACTION_SPELLING_GUESS;
+ case ContextMenuItemTagIgnoreSpelling:
+ return WEBKIT_CONTEXT_MENU_ACTION_IGNORE_SPELLING;
+ case ContextMenuItemTagLearnSpelling:
+ return WEBKIT_CONTEXT_MENU_ACTION_LEARN_SPELLING;
+ case ContextMenuItemTagIgnoreGrammar:
+ return WEBKIT_CONTEXT_MENU_ACTION_IGNORE_GRAMMAR;
+ case ContextMenuItemTagFontMenu:
+ return WEBKIT_CONTEXT_MENU_ACTION_FONT_MENU;
+ case ContextMenuItemTagBold:
+ return WEBKIT_CONTEXT_MENU_ACTION_BOLD;
+ case ContextMenuItemTagItalic:
+ return WEBKIT_CONTEXT_MENU_ACTION_ITALIC;
+ case ContextMenuItemTagUnderline:
+ return WEBKIT_CONTEXT_MENU_ACTION_UNDERLINE;
+ case ContextMenuItemTagOutline:
+ return WEBKIT_CONTEXT_MENU_ACTION_OUTLINE;
+ case ContextMenuItemTagInspectElement:
+ return WEBKIT_CONTEXT_MENU_ACTION_INSPECT_ELEMENT;
+ case ContextMenuItemTagOpenMediaInNewWindow:
+ return WEBKIT_CONTEXT_MENU_ACTION_OPEN_MEDIA_IN_NEW_WINDOW;
+ case ContextMenuItemTagCopyMediaLinkToClipboard:
+ return WEBKIT_CONTEXT_MENU_ACTION_COPY_MEDIA_LINK_TO_CLIPBOARD;
+ case ContextMenuItemTagToggleMediaControls:
+ return WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_CONTROLS;
+ case ContextMenuItemTagToggleMediaLoop:
+ return WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_LOOP;
+ case ContextMenuItemTagEnterVideoFullscreen:
+ return WEBKIT_CONTEXT_MENU_ACTION_ENTER_VIDEO_FULLSCREEN;
+ case ContextMenuItemTagMediaPlayPause:
+ return WEBKIT_CONTEXT_MENU_ACTION_MEDIA_PLAY_PAUSE;
+ case ContextMenuItemTagMediaMute:
+ return WEBKIT_CONTEXT_MENU_ACTION_MEDIA_MUTE;
+ default:
+ g_assert_not_reached();
+ }
+#else
+ return WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION;
+#endif
+}
+
void webkitInit()
{
static bool isInitialized = false;
@@ -313,6 +505,7 @@ void webkitInit()
WTF::initializeMainThread();
WebCore::initializeLoggingChannelsIfNecessary();
+ PlatformStrategiesGtk::initialize();
// We make sure the text codecs have been initialized, because
// that may only be done by the main thread.
diff --git a/Source/WebKit/gtk/webkit/webkitglobals.h b/Source/WebKit/gtk/webkit/webkitglobals.h
index 96dc83850..0bfc083c5 100644
--- a/Source/WebKit/gtk/webkit/webkitglobals.h
+++ b/Source/WebKit/gtk/webkit/webkitglobals.h
@@ -25,6 +25,7 @@
#include "webkitdefines.h"
#include <glib.h>
+#include <gtk/gtk.h>
#include <libsoup/soup.h>
G_BEGIN_DECLS
@@ -53,14 +54,107 @@ typedef enum {
WEBKIT_CACHE_MODEL_DOCUMENT_BROWSER,
} WebKitCacheModel;
+/**
+ * WebKitContextMenuAction:
+ * @WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION: No action, used by separator menu items.
+ * @WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK: Open current link.
+ * @WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK_IN_NEW_WINDOW: Open current link in a new window.
+ * @WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_LINK_TO_DISK: Download link destination.
+ * @WEBKIT_CONTEXT_MENU_ACTION_COPY_LINK_TO_CLIPBOARD: Copy link location to the clipboard.
+ * @WEBKIT_CONTEXT_MENU_ACTION_OPEN_IMAGE_IN_NEW_WINDOW: Open current image in a new window.
+ * @WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_IMAGE_TO_DISK: Download current image.
+ * @WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD: Copy current image to the clipboard.
+ * @WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_URL_TO_CLIPBOARD: Copy curent image location to the clipboard.
+ * @WEBKIT_CONTEXT_MENU_ACTION_OPEN_FRAME_IN_NEW_WINDOW: Open current frame in a new window.
+ * @WEBKIT_CONTEXT_MENU_ACTION_GO_BACK: Load the previous history item.
+ * @WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD: Load the next history item.
+ * @WEBKIT_CONTEXT_MENU_ACTION_STOP: Stop any ongoing loading operation.
+ * @WEBKIT_CONTEXT_MENU_ACTION_RELOAD: Reload the conents of current view.
+ * @WEBKIT_CONTEXT_MENU_ACTION_COPY: Copy current selection the clipboard.
+ * @WEBKIT_CONTEXT_MENU_ACTION_CUT: Cut current selection to the clipboard.
+ * @WEBKIT_CONTEXT_MENU_ACTION_PASTE: Paste clipboard contents.
+ * @WEBKIT_CONTEXT_MENU_ACTION_DELETE: Delete current selection.
+ * @WEBKIT_CONTEXT_MENU_ACTION_SELECT_ALL: Select all text.
+ * @WEBKIT_CONTEXT_MENU_ACTION_INPUT_METHODS: Input methods menu.
+ * @WEBKIT_CONTEXT_MENU_ACTION_UNICODE: Unicode menu.
+ * @WEBKIT_CONTEXT_MENU_ACTION_SPELLING_GUESS: Guess spelling.
+ * @WEBKIT_CONTEXT_MENU_ACTION_NO_GUESSES_FOUND: No guesses found.
+ * @WEBKIT_CONTEXT_MENU_ACTION_IGNORE_SPELLING: Ignore spelling.
+ * @WEBKIT_CONTEXT_MENU_ACTION_LEARN_SPELLING: Learn spelling.
+ * @WEBKIT_CONTEXT_MENU_ACTION_IGNORE_GRAMMAR: Ignore grammar.
+ * @WEBKIT_CONTEXT_MENU_ACTION_FONT_MENU: Font menu.
+ * @WEBKIT_CONTEXT_MENU_ACTION_BOLD: Bold.
+ * @WEBKIT_CONTEXT_MENU_ACTION_ITALIC: Italic.
+ * @WEBKIT_CONTEXT_MENU_ACTION_UNDERLINE: Underline.
+ * @WEBKIT_CONTEXT_MENU_ACTION_OUTLINE: Outline.
+ * @WEBKIT_CONTEXT_MENU_ACTION_INSPECT_ELEMENT: Open current element in the inspector.
+ * @WEBKIT_CONTEXT_MENU_ACTION_OPEN_MEDIA_IN_NEW_WINDOW: Open current media element in a new window.
+ * @WEBKIT_CONTEXT_MENU_ACTION_COPY_MEDIA_LINK_TO_CLIPBOARD: Copy media link location in to the clipboard.
+ * @WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_CONTROLS: Enable or disable media controls.
+ * @WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_LOOP: Enable or disable media loop.
+ * @WEBKIT_CONTEXT_MENU_ACTION_ENTER_VIDEO_FULLSCREEN: Show current video element in fullscreen mode.
+ * @WEBKIT_CONTEXT_MENU_ACTION_MEDIA_PLAY_PAUSE: Play or pause current media element.
+ * @WEBKIT_CONTEXT_MENU_ACTION_MEDIA_MUTE: Mute current media element.
+ *
+ * Enum values used to denote actions of items in the default context menu.
+ *
+ * Since: 1.10
+ */
+typedef enum {
+ WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION = 0,
+ WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK,
+ WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK_IN_NEW_WINDOW,
+ WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_LINK_TO_DISK,
+ WEBKIT_CONTEXT_MENU_ACTION_COPY_LINK_TO_CLIPBOARD,
+ WEBKIT_CONTEXT_MENU_ACTION_OPEN_IMAGE_IN_NEW_WINDOW,
+ WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_IMAGE_TO_DISK,
+ WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD,
+ WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_URL_TO_CLIPBOARD,
+ WEBKIT_CONTEXT_MENU_ACTION_OPEN_FRAME_IN_NEW_WINDOW,
+ WEBKIT_CONTEXT_MENU_ACTION_GO_BACK,
+ WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD,
+ WEBKIT_CONTEXT_MENU_ACTION_STOP,
+ WEBKIT_CONTEXT_MENU_ACTION_RELOAD,
+ WEBKIT_CONTEXT_MENU_ACTION_COPY,
+ WEBKIT_CONTEXT_MENU_ACTION_CUT,
+ WEBKIT_CONTEXT_MENU_ACTION_PASTE,
+ WEBKIT_CONTEXT_MENU_ACTION_DELETE,
+ WEBKIT_CONTEXT_MENU_ACTION_SELECT_ALL,
+ WEBKIT_CONTEXT_MENU_ACTION_INPUT_METHODS,
+ WEBKIT_CONTEXT_MENU_ACTION_UNICODE,
+ WEBKIT_CONTEXT_MENU_ACTION_SPELLING_GUESS,
+ WEBKIT_CONTEXT_MENU_ACTION_NO_GUESSES_FOUND,
+ WEBKIT_CONTEXT_MENU_ACTION_IGNORE_SPELLING,
+ WEBKIT_CONTEXT_MENU_ACTION_LEARN_SPELLING,
+ WEBKIT_CONTEXT_MENU_ACTION_IGNORE_GRAMMAR,
+ WEBKIT_CONTEXT_MENU_ACTION_FONT_MENU,
+ WEBKIT_CONTEXT_MENU_ACTION_BOLD,
+ WEBKIT_CONTEXT_MENU_ACTION_ITALIC,
+ WEBKIT_CONTEXT_MENU_ACTION_UNDERLINE,
+ WEBKIT_CONTEXT_MENU_ACTION_OUTLINE,
+ WEBKIT_CONTEXT_MENU_ACTION_INSPECT_ELEMENT,
+ WEBKIT_CONTEXT_MENU_ACTION_OPEN_MEDIA_IN_NEW_WINDOW,
+ WEBKIT_CONTEXT_MENU_ACTION_COPY_MEDIA_LINK_TO_CLIPBOARD,
+ WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_CONTROLS,
+ WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_LOOP,
+ WEBKIT_CONTEXT_MENU_ACTION_ENTER_VIDEO_FULLSCREEN,
+ WEBKIT_CONTEXT_MENU_ACTION_MEDIA_PLAY_PAUSE,
+ WEBKIT_CONTEXT_MENU_ACTION_MEDIA_MUTE
+} WebKitContextMenuAction;
+
WEBKIT_API SoupSession*
webkit_get_default_session (void);
WEBKIT_API WebKitWebPluginDatabase *
webkit_get_web_plugin_database (void);
+#if !defined(WEBKIT_DISABLE_DEPRECATED)
WEBKIT_API WebKitIconDatabase *
webkit_get_icon_database (void);
+#endif
+
+WEBKIT_API WebKitFaviconDatabase *
+webkit_get_favicon_database (void);
WEBKIT_API void
webkit_set_cache_model (WebKitCacheModel cache_model);
@@ -74,6 +168,9 @@ webkit_get_text_checker (void);
WEBKIT_API void
webkit_set_text_checker (GObject* checker);
+WEBKIT_API WebKitContextMenuAction
+webkit_context_menu_item_get_action (GtkMenuItem* item);
+
G_END_DECLS
#endif
diff --git a/Source/WebKit/gtk/webkit/webkitglobalsprivate.h b/Source/WebKit/gtk/webkit/webkitglobalsprivate.h
index a2227b58f..80cc402ce 100644
--- a/Source/WebKit/gtk/webkit/webkitglobalsprivate.h
+++ b/Source/WebKit/gtk/webkit/webkitglobalsprivate.h
@@ -28,6 +28,8 @@
#define WEBKIT_PARAM_READABLE ((GParamFlags)(G_PARAM_READABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB))
#define WEBKIT_PARAM_READWRITE ((GParamFlags)(G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB))
+#define WEBKIT_WARN_FEATURE_NOT_PRESENT(Feature) g_warning("WebKitGTK+ was not compiled with support for " Feature);
+
extern "C" {
void webkitInit();
diff --git a/Source/WebKit/gtk/webkit/webkithittestresult.cpp b/Source/WebKit/gtk/webkit/webkithittestresult.cpp
index cb7ac4b8d..3b6a77a67 100644
--- a/Source/WebKit/gtk/webkit/webkithittestresult.cpp
+++ b/Source/WebKit/gtk/webkit/webkithittestresult.cpp
@@ -21,8 +21,8 @@
#include "config.h"
#include "webkithittestresult.h"
-#include "GOwnPtr.h"
-#include "GRefPtr.h"
+#include "Frame.h"
+#include "FrameView.h"
#include "HitTestResult.h"
#include "KURL.h"
#include "WebKitDOMBinding.h"
@@ -31,6 +31,8 @@
#include "webkitglobals.h"
#include "webkitglobalsprivate.h"
#include <glib/gi18n-lib.h>
+#include <wtf/gobject/GOwnPtr.h>
+#include <wtf/gobject/GRefPtr.h>
#include <wtf/text/CString.h>
/**
@@ -49,6 +51,7 @@ struct _WebKitHitTestResultPrivate {
char* imageURI;
char* mediaURI;
GRefPtr<WebKitDOMNode> innerNode;
+ WebCore::IntPoint position;
};
enum {
@@ -58,7 +61,9 @@ enum {
PROP_LINK_URI,
PROP_IMAGE_URI,
PROP_MEDIA_URI,
- PROP_INNER_NODE
+ PROP_INNER_NODE,
+ PROP_X,
+ PROP_Y
};
static void webkit_hit_test_result_finalize(GObject* object)
@@ -101,6 +106,12 @@ static void webkit_hit_test_result_get_property(GObject* object, guint propertyI
case PROP_INNER_NODE:
g_value_set_object(value, priv->innerNode.get());
break;
+ case PROP_X:
+ g_value_set_int(value, priv->position.x());
+ break;
+ case PROP_Y:
+ g_value_set_int(value, priv->position.y());
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyID, pspec);
}
@@ -130,6 +141,12 @@ static void webkit_hit_test_result_set_property(GObject* object, guint propertyI
case PROP_INNER_NODE:
priv->innerNode = static_cast<WebKitDOMNode*>(g_value_get_object(value));
break;
+ case PROP_X:
+ priv->position.setX(g_value_get_int(value));
+ break;
+ case PROP_Y:
+ priv->position.setY(g_value_get_int(value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyID, pspec);
}
@@ -225,6 +242,34 @@ static void webkit_hit_test_result_class_init(WebKitHitTestResultClass* webHitTe
WEBKIT_TYPE_DOM_NODE,
static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));
+ /**
+ * WebKitHitTestResult:x:
+ *
+ * The x coordintate of the event relative to the view's window.
+ *
+ * Since: 1.10
+ */
+ g_object_class_install_property(objectClass, PROP_X,
+ g_param_spec_int("x",
+ _("X coordinate"),
+ _("The x coordintate of the event relative to the view's window."),
+ G_MININT, G_MAXINT, 0,
+ static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));
+
+ /**
+ * WebKitHitTestResult:y:
+ *
+ * The x coordintate of the event relative to the view's window.
+ *
+ * Since: 1.10
+ */
+ g_object_class_install_property(objectClass, PROP_Y,
+ g_param_spec_int("y",
+ _("Y coordinate"),
+ _("The y coordintate of the event relative to the view's window."),
+ G_MININT, G_MAXINT, 0,
+ static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));
+
g_type_class_add_private(webHitTestResultClass, sizeof(WebKitHitTestResultPrivate));
}
@@ -243,6 +288,8 @@ WebKitHitTestResult* kit(const WebCore::HitTestResult& result)
GOwnPtr<char> imageURI(0);
GOwnPtr<char> mediaURI(0);
WebKitDOMNode* node = 0;
+ WebCore::Frame* targetFrame;
+ WebCore::IntPoint point;
if (!result.absoluteLinkURL().isEmpty()) {
context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK;
@@ -268,12 +315,21 @@ WebKitHitTestResult* kit(const WebCore::HitTestResult& result)
if (result.innerNonSharedNode())
node = kit(result.innerNonSharedNode());
+ targetFrame = result.targetFrame();
+ if (targetFrame && targetFrame->view()) {
+ // Convert document coords to widget coords.
+ point = targetFrame->view()->contentsToWindow(result.roundedPoint());
+ } else
+ point = result.roundedPoint();
+
return WEBKIT_HIT_TEST_RESULT(g_object_new(WEBKIT_TYPE_HIT_TEST_RESULT,
"link-uri", linkURI.get(),
"image-uri", imageURI.get(),
"media-uri", mediaURI.get(),
"context", context,
"inner-node", node,
+ "x", point.x(),
+ "y", point.y(),
NULL));
}
diff --git a/Source/WebKit/gtk/webkit/webkiticondatabase.cpp b/Source/WebKit/gtk/webkit/webkiticondatabase.cpp
index 383b0817e..e3269f9b1 100644
--- a/Source/WebKit/gtk/webkit/webkiticondatabase.cpp
+++ b/Source/WebKit/gtk/webkit/webkiticondatabase.cpp
@@ -59,6 +59,8 @@
* be deleted from it.
*
* Since: 1.3.13
+ *
+ * Deprecated: 1.8: Use WebKitFaviconDatabase instead.
*/
using namespace WebKit;
@@ -140,6 +142,8 @@ static void webkit_icon_database_class_init(WebKitIconDatabaseClass* klass)
* The absolute path of the icon database folder.
*
* Since: 1.3.13
+ *
+ * Deprecated: 1.8: Use WebKitFaviconDatabase::path instead.
*/
g_object_class_install_property(gobjectClass, PROP_PATH,
g_param_spec_string("path",
@@ -160,6 +164,8 @@ static void webkit_icon_database_class_init(WebKitIconDatabaseClass* klass)
* the main frame of a particular #WebKitWebView.
*
* Since: 1.3.13
+ *
+ * Deprecated: 1.8: Use WebKitFaviconDatabase::icon-loaded instead.
*/
webkit_icon_database_signals[ICON_LOADED] = g_signal_new("icon-loaded",
G_TYPE_FROM_CLASS(klass),
@@ -191,6 +197,8 @@ static void webkit_icon_database_init(WebKitIconDatabase* database)
* Returns: the absolute path of the database folder, or %NULL
*
* Since: 1.3.13
+ *
+ * Deprecated: 1.8: Use webkit_favicon_database_get_path() instead.
**/
const gchar* webkit_icon_database_get_path(WebKitIconDatabase* database)
{
@@ -217,6 +225,8 @@ static void closeIconDatabaseOnExit()
* Passing %NULL or "" disables the icon database.
*
* Since: 1.3.13
+ *
+ * Deprecated: 1.8: Use webkit_favicon_database_set_path() instead.
**/
void webkit_icon_database_set_path(WebKitIconDatabase* database, const gchar* path)
{
@@ -254,6 +264,8 @@ void webkit_icon_database_set_path(WebKitIconDatabase* database, const gchar* pa
* Returns: a newly allocated URI for the favicon, or %NULL
*
* Since: 1.3.13
+ *
+ * Deprecated: 1.8: Use webkit_favicon_database_get_favicon_uri() instead.
**/
gchar* webkit_icon_database_get_icon_uri(WebKitIconDatabase* database, const gchar* pageURI)
{
@@ -282,6 +294,8 @@ gchar* webkit_icon_database_get_icon_uri(WebKitIconDatabase* database, const gch
* Returns: (transfer full): a new reference to a #GdkPixbuf, or %NULL
*
* Since: 1.3.13
+ *
+ * Deprecated: 1.8: Use webkit_favicon_database_try_get_favicon_pixbuf() instead.
**/
GdkPixbuf* webkit_icon_database_get_icon_pixbuf(WebKitIconDatabase* database, const gchar* pageURI)
{
@@ -307,6 +321,8 @@ GdkPixbuf* webkit_icon_database_get_icon_pixbuf(WebKitIconDatabase* database, co
* Clears all icons from the database.
*
* Since: 1.3.13
+ *
+ * Deprecated: 1.8: Use webkit_favicon_database_clear() instead.
**/
void webkit_icon_database_clear(WebKitIconDatabase* database)
{
diff --git a/Source/WebKit/gtk/webkit/webkiticondatabase.h b/Source/WebKit/gtk/webkit/webkiticondatabase.h
index 5ead603ab..f8168d549 100644
--- a/Source/WebKit/gtk/webkit/webkiticondatabase.h
+++ b/Source/WebKit/gtk/webkit/webkiticondatabase.h
@@ -55,6 +55,7 @@ struct _WebKitIconDatabaseClass {
WEBKIT_API GType
webkit_icon_database_get_type (void);
+#if !defined(WEBKIT_DISABLE_DEPRECATED)
WEBKIT_API const gchar*
webkit_icon_database_get_path (WebKitIconDatabase* database);
@@ -72,6 +73,7 @@ webkit_icon_database_get_icon_pixbuf (WebKitIconDatabase* database,
WEBKIT_API void
webkit_icon_database_clear (WebKitIconDatabase* database);
+#endif
G_END_DECLS
diff --git a/Source/WebKit/gtk/webkit/webkitnetworkrequest.cpp b/Source/WebKit/gtk/webkit/webkitnetworkrequest.cpp
index 00b09e3f7..4996dd981 100644
--- a/Source/WebKit/gtk/webkit/webkitnetworkrequest.cpp
+++ b/Source/WebKit/gtk/webkit/webkitnetworkrequest.cpp
@@ -21,10 +21,10 @@
#include "config.h"
#include "webkitnetworkrequest.h"
-#include "GRefPtr.h"
#include "ResourceRequest.h"
#include "webkitglobalsprivate.h"
#include <glib/gi18n-lib.h>
+#include <wtf/gobject/GRefPtr.h>
#include <wtf/text/CString.h>
/**
@@ -210,7 +210,7 @@ void webkit_network_request_set_uri(WebKitNetworkRequest* request, const gchar*
* webkit_network_request_get_uri:
* @request: a #WebKitNetworkRequest
*
- * Returns: the uri of the #WebKitNetworkRequest
+ * Returns: the URI of the #WebKitNetworkRequest
*
* Since: 1.0.0
*/
diff --git a/Source/WebKit/gtk/webkit/webkitnetworkresponse.cpp b/Source/WebKit/gtk/webkit/webkitnetworkresponse.cpp
index e9bc151d9..d106d1e53 100644
--- a/Source/WebKit/gtk/webkit/webkitnetworkresponse.cpp
+++ b/Source/WebKit/gtk/webkit/webkitnetworkresponse.cpp
@@ -22,10 +22,10 @@
#include "config.h"
#include "webkitnetworkresponse.h"
-#include "GRefPtr.h"
#include "ResourceResponse.h"
#include "webkitglobalsprivate.h"
#include <glib/gi18n-lib.h>
+#include <wtf/gobject/GRefPtr.h>
#include <wtf/text/CString.h>
/**
@@ -212,7 +212,7 @@ void webkit_network_response_set_uri(WebKitNetworkResponse* response, const gcha
* webkit_network_response_get_uri:
* @response: a #WebKitNetworkResponse
*
- * Returns: the uri of the #WebKitNetworkResponse
+ * Returns: the URI of the #WebKitNetworkResponse
*
* Since: 1.1.14
*/
diff --git a/Source/WebKit/gtk/webkit/webkitspellcheckerenchant.cpp b/Source/WebKit/gtk/webkit/webkitspellcheckerenchant.cpp
index e68f21578..f51a12f23 100644
--- a/Source/WebKit/gtk/webkit/webkitspellcheckerenchant.cpp
+++ b/Source/WebKit/gtk/webkit/webkitspellcheckerenchant.cpp
@@ -21,10 +21,10 @@
#if ENABLE(SPELLCHECK)
-#include "GOwnPtr.h"
#include "webkitspellchecker.h"
#include <enchant.h>
#include <gtk/gtk.h>
+#include <wtf/gobject/GOwnPtr.h>
#include <wtf/text/CString.h>
/**
diff --git a/Source/WebKit/gtk/webkit/webkitwebdatasourceprivate.h b/Source/WebKit/gtk/webkit/webkitwebdatasourceprivate.h
index 5c18493b8..8e253fa76 100644
--- a/Source/WebKit/gtk/webkit/webkitwebdatasourceprivate.h
+++ b/Source/WebKit/gtk/webkit/webkitwebdatasourceprivate.h
@@ -23,8 +23,8 @@
#ifndef webkitwebdatasourceprivate_h
#define webkitwebdatasourceprivate_h
-#include "RefPtr.h"
#include "webkitwebdatasource.h"
+#include <wtf/RefPtr.h>
namespace WebKit {
diff --git a/Source/WebKit/gtk/webkit/webkitwebframe.cpp b/Source/WebKit/gtk/webkit/webkitwebframe.cpp
index 39bdbb3aa..77292213e 100644
--- a/Source/WebKit/gtk/webkit/webkitwebframe.cpp
+++ b/Source/WebKit/gtk/webkit/webkitwebframe.cpp
@@ -51,7 +51,6 @@
#include "RenderListItem.h"
#include "RenderTreeAsText.h"
#include "RenderView.h"
-#include "ReplaceSelectionCommand.h"
#include "ScriptController.h"
#include "SubstituteData.h"
#include "TextIterator.h"
@@ -113,6 +112,7 @@ enum {
RESOURCE_LOAD_FINISHED,
RESOURCE_CONTENT_LENGTH_RECEIVED,
RESOURCE_LOAD_FAILED,
+ INSECURE_CONTENT_RUN,
LAST_SIGNAL
};
@@ -432,6 +432,28 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
WEBKIT_TYPE_WEB_RESOURCE,
G_TYPE_POINTER);
+ /**
+ * WebKitWebFrame::insecure-content-run:
+ * @web_frame: the #WebKitWebFrame the response was received for.
+ * @security_origin: the #WebKitSecurityOrigin.
+ * @url: the url of the insecure content.
+ *
+ * Invoked when insecure content is run from a secure page. This happens
+ * when a page loaded via HTTPS loads a stylesheet, script, image or
+ * iframe from an unencrypted HTTP URL.
+ *
+ * Since: 1.10.0
+ */
+ webkit_web_frame_signals[INSECURE_CONTENT_RUN] = g_signal_new("insecure-content-run",
+ G_TYPE_FROM_CLASS(frameClass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ 0, 0,
+ webkit_marshal_VOID__OBJECT_STRING,
+ G_TYPE_NONE, 2,
+ WEBKIT_TYPE_SECURITY_ORIGIN,
+ G_TYPE_STRING);
+
/*
* implementations of virtual methods
*/
diff --git a/Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp b/Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp
index dbb3ccf2f..62d30dc9b 100644
--- a/Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp
+++ b/Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp
@@ -286,7 +286,7 @@ WebKitWebHistoryItem* webkit_web_history_item_new()
/**
* webkit_web_history_item_new_with_data:
- * @uri: the uri of the page
+ * @uri: the URI of the page
* @title: the title of the page
*
* Creates a new #WebKitWebHistoryItem with the given URI and title
diff --git a/Source/WebKit/gtk/webkit/webkitwebresource.cpp b/Source/WebKit/gtk/webkit/webkitwebresource.cpp
index 4bd198077..68d0ffb6e 100644
--- a/Source/WebKit/gtk/webkit/webkitwebresource.cpp
+++ b/Source/WebKit/gtk/webkit/webkitwebresource.cpp
@@ -154,7 +154,7 @@ static void webkit_web_resource_class_init(WebKitWebResourceClass* webResourceCl
G_SIGNAL_RUN_LAST,
0,
0, 0,
- g_cclosure_marshal_VOID__OBJECT,
+ g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1,
G_TYPE_POINTER);
@@ -207,7 +207,7 @@ static void webkit_web_resource_class_init(WebKitWebResourceClass* webResourceCl
g_param_spec_string(
"uri",
_("URI"),
- _("The uri of the resource"),
+ _("The URI of the resource"),
NULL,
(GParamFlags)(WEBKIT_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY)));
/**
@@ -329,7 +329,7 @@ void webkit_web_resource_init_with_core_resource(WebKitWebResource* webResource,
* webkit_web_resource_new:
* @data: the data to initialize the #WebKitWebResource
* @size: the length of @data
- * @uri: the uri of the #WebKitWebResource
+ * @uri: the URI of the #WebKitWebResource
* @mime_type: the MIME type of the #WebKitWebResource
* @encoding: the text encoding name of the #WebKitWebResource
* @frame_name: the frame name of the #WebKitWebResource
diff --git a/Source/WebKit/gtk/webkit/webkitwebsettings.cpp b/Source/WebKit/gtk/webkit/webkitwebsettings.cpp
index 2531258b3..1a3a27eb4 100644
--- a/Source/WebKit/gtk/webkit/webkitwebsettings.cpp
+++ b/Source/WebKit/gtk/webkit/webkitwebsettings.cpp
@@ -28,13 +28,13 @@
#include "EditingBehavior.h"
#include "FileSystem.h"
-#include "GOwnPtr.h"
#include "KURL.h"
#include "PluginDatabase.h"
#include "webkitenumtypes.h"
#include "webkitglobalsprivate.h"
#include "webkitversion.h"
#include "webkitwebsettingsprivate.h"
+#include <wtf/gobject/GOwnPtr.h>
#include <wtf/text/CString.h>
#include <wtf/text/StringConcatenate.h>
#include <glib/gi18n-lib.h>
@@ -754,6 +754,8 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass)
* right-clicks that are handled by the page itself.
*
* Since: 1.1.18
+ *
+ * Deprecated: 1.10: Use #WebKitWebView::context-menu signal instead.
*/
g_object_class_install_property(gobject_class,
PROP_ENABLE_DEFAULT_CONTEXT_MENU,
diff --git a/Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h b/Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h
index 240d79fad..45f822371 100644
--- a/Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h
+++ b/Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h
@@ -23,8 +23,8 @@
#ifndef webkitwebsettingsprivate_h
#define webkitwebsettingsprivate_h
-#include "CString.h"
#include "webkitwebsettings.h"
+#include <wtf/text/CString.h>
extern "C" {
diff --git a/Source/WebKit/gtk/webkit/webkitwebview.cpp b/Source/WebKit/gtk/webkit/webkitwebview.cpp
index 880f24438..80e2fc3a3 100644
--- a/Source/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/Source/WebKit/gtk/webkit/webkitwebview.cpp
@@ -11,6 +11,7 @@
* Copyright (C) 2009 Movial Creative Technologies Inc.
* Copyright (C) 2009 Bobby Powers
* Copyright (C) 2010 Joone Hur <joone@kldp.org>
+ * Copyright (C) 2012 Igalia S.L.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -58,16 +59,16 @@
#include "FrameLoaderClient.h"
#include "FrameLoaderTypes.h"
#include "FrameView.h"
+#include "GOwnPtrGtk.h"
#include "GeolocationClientGtk.h"
#include "GeolocationClientMock.h"
-#include "GOwnPtrGtk.h"
+#include "GeolocationController.h"
#include "GraphicsContext.h"
#include "GtkUtilities.h"
#include "GtkVersioning.h"
#include "HTMLNames.h"
#include "HitTestRequest.h"
#include "HitTestResult.h"
-#include "IconDatabase.h"
#include "InspectorClientGtk.h"
#include "MemoryCache.h"
#include "MouseEventWithHitTestResults.h"
@@ -86,6 +87,7 @@
#include "webkitdownload.h"
#include "webkitdownloadprivate.h"
#include "webkitenumtypes.h"
+#include "webkitfavicondatabase.h"
#include "webkitgeolocationpolicydecision.h"
#include "webkitglobalsprivate.h"
#include "webkithittestresultprivate.h"
@@ -117,6 +119,10 @@
#include "DeviceOrientationClientGtk.h"
#endif
+#if ENABLE(MEDIA_STREAM)
+#include "UserMediaClientGtk.h"
+#endif
+
/**
* SECTION:webkitwebview
* @short_description: The central class of the WebKitGTK+ API
@@ -214,6 +220,7 @@ enum {
RESOURCE_LOAD_FAILED,
ENTERING_FULLSCREEN,
LEAVING_FULLSCREEN,
+ CONTEXT_MENU,
LAST_SIGNAL
};
@@ -266,8 +273,7 @@ G_DEFINE_TYPE_WITH_CODE(WebKitWebView, webkit_web_view, GTK_TYPE_CONTAINER,
static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GParamSpec* pspec, WebKitWebView* webView);
static void webkit_web_view_set_window_features(WebKitWebView* webView, WebKitWebWindowFeatures* webWindowFeatures);
-static GtkIMContext* webkit_web_view_get_im_context(WebKitWebView*);
-
+#if ENABLE(CONTEXT_MENUS)
static void PopupMenuPositionFunc(GtkMenu* menu, gint *x, gint *y, gboolean *pushIn, gpointer userData)
{
WebKitWebView* view = WEBKIT_WEB_VIEW(userData);
@@ -291,6 +297,7 @@ static void PopupMenuPositionFunc(GtkMenu* menu, gint *x, gint *y, gboolean *pus
*pushIn = FALSE;
}
+#endif
static Node* getFocusedNode(Frame* frame)
{
@@ -299,6 +306,7 @@ static Node* getFocusedNode(Frame* frame)
return 0;
}
+#if ENABLE(CONTEXT_MENUS)
static void contextMenuItemActivated(GtkMenuItem* item, ContextMenuController* controller)
{
ContextMenuItem contextItem(item);
@@ -318,23 +326,36 @@ static void contextMenuConnectActivate(GtkMenuItem* item, ContextMenuController*
g_signal_connect(item, "activate", G_CALLBACK(contextMenuItemActivated), controller);
}
-static gboolean webkit_web_view_forward_context_menu_event(WebKitWebView* webView, const PlatformMouseEvent& event)
+static MouseEventWithHitTestResults prepareMouseEventForFrame(Frame* frame, const PlatformMouseEvent& event)
+{
+ HitTestRequest request(HitTestRequest::Active);
+ IntPoint point = frame->view()->windowToContents(event.position());
+ return frame->document()->prepareMouseEvent(request, point, event);
+}
+
+// Check enable-default-context-menu setting for compatibility.
+static bool defaultContextMenuEnabled(WebKitWebView* webView)
+{
+ gboolean enableDefaultContextMenu;
+ g_object_get(webkit_web_view_get_settings(webView), "enable-default-context-menu", &enableDefaultContextMenu, NULL);
+ return enableDefaultContextMenu;
+}
+
+static gboolean webkit_web_view_forward_context_menu_event(WebKitWebView* webView, const PlatformMouseEvent& event, bool triggeredWithKeyboard)
{
Page* page = core(webView);
page->contextMenuController()->clearContextMenu();
Frame* focusedFrame;
Frame* mainFrame = page->mainFrame();
gboolean mousePressEventResult = FALSE;
+ GRefPtr<WebKitHitTestResult> hitTestResult;
if (!mainFrame->view())
return FALSE;
mainFrame->view()->setCursor(pointerCursor());
if (page->frameCount()) {
- HitTestRequest request(HitTestRequest::Active);
- IntPoint point = mainFrame->view()->windowToContents(event.position());
- MouseEventWithHitTestResults mev = mainFrame->document()->prepareMouseEvent(request, point, event);
-
+ MouseEventWithHitTestResults mev = prepareMouseEventForFrame(mainFrame, event);
Frame* targetFrame = EventHandler::subframeForHitTestResult(mev);
if (!targetFrame)
targetFrame = mainFrame;
@@ -344,13 +365,14 @@ static gboolean webkit_web_view_forward_context_menu_event(WebKitWebView* webVie
page->focusController()->setFocusedFrame(targetFrame);
focusedFrame = targetFrame;
}
+ if (focusedFrame == mainFrame)
+ hitTestResult = adoptGRef(kit(mev.hitTestResult()));
} else
focusedFrame = mainFrame;
if (focusedFrame->view() && focusedFrame->eventHandler()->handleMousePressEvent(event))
mousePressEventResult = TRUE;
-
bool handledEvent = focusedFrame->eventHandler()->sendContextMenuEvent(event);
if (!handledEvent)
return FALSE;
@@ -363,37 +385,42 @@ static gboolean webkit_web_view_forward_context_menu_event(WebKitWebView* webVie
if (!coreMenu)
return mousePressEventResult;
- // If we reach here, it's because WebCore is going to show the
- // default context menu. We check our setting to figure out
- // whether we want it or not.
- WebKitWebSettings* settings = webkit_web_view_get_settings(webView);
- gboolean enableDefaultContextMenu;
- g_object_get(settings, "enable-default-context-menu", &enableDefaultContextMenu, NULL);
-
- if (!enableDefaultContextMenu)
- return FALSE;
-
- GtkMenu* menu = GTK_MENU(coreMenu->platformDescription());
- if (!menu)
- return FALSE;
+ GtkMenu* defaultMenu = coreMenu->platformDescription();
+ ASSERT(defaultMenu);
// We connect the "activate" signal here rather than in ContextMenuGtk to avoid
// a layering violation. ContextMenuGtk should not know about the ContextMenuController.
- gtk_container_foreach(GTK_CONTAINER(menu), (GtkCallback)contextMenuConnectActivate, controller);
+ gtk_container_foreach(GTK_CONTAINER(defaultMenu), reinterpret_cast<GtkCallback>(contextMenuConnectActivate), controller);
+
+ if (!hitTestResult) {
+ MouseEventWithHitTestResults mev = prepareMouseEventForFrame(focusedFrame, event);
+ hitTestResult = adoptGRef(kit(mev.hitTestResult()));
+ }
+
+ gboolean handled;
+ g_signal_emit(webView, webkit_web_view_signals[CONTEXT_MENU], 0, defaultMenu, hitTestResult.get(), triggeredWithKeyboard, &handled);
+ if (handled)
+ return TRUE;
+
+ // Return now if default context menu is disabled by enable-default-context-menu setting.
+ // Check enable-default-context-menu setting for compatibility.
+ if (!defaultContextMenuEnabled(webView))
+ return FALSE;
- g_signal_emit(webView, webkit_web_view_signals[POPULATE_POPUP], 0, menu);
+ // Emit populate-popup signal for compatibility.
+ g_signal_emit(webView, webkit_web_view_signals[POPULATE_POPUP], 0, defaultMenu);
// If the context menu is now empty, don't show it.
- GOwnPtr<GList> items(gtk_container_get_children(GTK_CONTAINER(menu)));
+ GOwnPtr<GList> items(gtk_container_get_children(GTK_CONTAINER(defaultMenu)));
if (!items)
return FALSE;
WebKitWebViewPrivate* priv = webView->priv;
- priv->currentMenu = menu;
+ priv->currentMenu = defaultMenu;
priv->lastPopupXPosition = event.globalPosition().x();
priv->lastPopupYPosition = event.globalPosition().y();
- gtk_menu_popup(menu, 0, 0, &PopupMenuPositionFunc, webView, event.button() + 1, gtk_get_current_event_time());
+ gtk_menu_popup(defaultMenu, 0, 0, &PopupMenuPositionFunc, webView, event.button() + 1, gtk_get_current_event_time());
return TRUE;
}
@@ -404,7 +431,7 @@ static IntPoint getLocationForKeyboardGeneratedContextMenu(Frame* frame)
if (!selection->selection().isNonOrphanedCaretOrRange()
|| (selection->selection().isCaret() && !selection->selection().isContentEditable())) {
if (Node* focusedNode = getFocusedNode(frame))
- return focusedNode->getRect().location();
+ return focusedNode->getPixelSnappedRect().location();
// There was no selection and no focused node, so just put the context
// menu into the corner of the view, offset slightly.
@@ -434,8 +461,9 @@ static gboolean webkit_web_view_popup_menu_handler(GtkWidget* widget)
IntPoint globalPoint(convertWidgetPointToScreenPoint(widget, location));
PlatformMouseEvent event(location, globalPoint, RightButton, PlatformEvent::MousePressed, 0, false, false, false, false, gtk_get_current_event_time());
- return webkit_web_view_forward_context_menu_event(WEBKIT_WEB_VIEW(widget), event);
+ return webkit_web_view_forward_context_menu_event(WEBKIT_WEB_VIEW(widget), event, true);
}
+#endif // ENABLE(CONTEXT_MENUS)
static void setHorizontalAdjustment(WebKitWebView* webView, GtkAdjustment* adjustment)
{
@@ -551,7 +579,7 @@ static void webkit_web_view_get_property(GObject* object, guint prop_id, GValue*
g_value_set_string(value, webkit_web_view_get_icon_uri(webView));
break;
case PROP_IM_CONTEXT:
- g_value_set_object(value, webkit_web_view_get_im_context(webView));
+ g_value_set_object(value, webView->priv->imFilter.context());
break;
case PROP_VIEW_MODE:
g_value_set_enum(value, webkit_web_view_get_view_mode(webView));
@@ -680,42 +708,15 @@ static gboolean webkit_web_view_draw(GtkWidget* widget, cairo_t* cr)
static gboolean webkit_web_view_key_press_event(GtkWidget* widget, GdkEventKey* event)
{
- WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
-
- Frame* frame = core(webView)->focusController()->focusedOrMainFrame();
- PlatformKeyboardEvent keyboardEvent(event);
-
- if (!frame->view())
- return FALSE;
-
- if (frame->eventHandler()->keyEvent(keyboardEvent))
+ if (WEBKIT_WEB_VIEW(widget)->priv->imFilter.filterKeyEvent(event))
return TRUE;
-
- /* Chain up to our parent class for binding activation */
return GTK_WIDGET_CLASS(webkit_web_view_parent_class)->key_press_event(widget, event);
}
static gboolean webkit_web_view_key_release_event(GtkWidget* widget, GdkEventKey* event)
{
- WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
-
- // GTK+ IM contexts often require us to filter key release events, which
- // WebCore does not do by default, so we filter the event here. We only block
- // the event if we don't have a pending composition, because that means we
- // are using a context like 'simple' which marks every keystroke as filtered.
- WebKit::EditorClient* client = static_cast<WebKit::EditorClient*>(core(webView)->editorClient());
- if (gtk_im_context_filter_keypress(webView->priv->imContext.get(), event) && !client->hasPendingComposition())
- return TRUE;
-
- Frame* frame = core(webView)->focusController()->focusedOrMainFrame();
- if (!frame->view())
- return FALSE;
-
- PlatformKeyboardEvent keyboardEvent(event);
- if (frame->eventHandler()->keyEvent(keyboardEvent))
+ if (WEBKIT_WEB_VIEW(widget)->priv->imFilter.filterKeyEvent(event))
return TRUE;
-
- /* Chain up to our parent class for binding activation */
return GTK_WIDGET_CLASS(webkit_web_view_parent_class)->key_release_event(widget, event);
}
@@ -734,16 +735,17 @@ static gboolean webkit_web_view_button_press_event(GtkWidget* widget, GdkEventBu
int count = priv->clickCounter.clickCountForGdkButtonEvent(widget, event);
platformEvent.setClickCount(count);
+#if ENABLE(CONTEXT_MENUS)
if (event->button == 3)
- return webkit_web_view_forward_context_menu_event(webView, PlatformMouseEvent(event));
+ return webkit_web_view_forward_context_menu_event(webView, PlatformMouseEvent(event), false);
+#endif
Frame* frame = core(webView)->mainFrame();
if (!frame->view())
return FALSE;
+ priv->imFilter.notifyMouseButtonPress();
gboolean result = frame->eventHandler()->handleMousePressEvent(platformEvent);
- // Handle the IM context when a mouse press fires
- static_cast<WebKit::EditorClient*>(core(webView)->editorClient())->handleInputMethodMousePress();
#if PLATFORM(X11)
/* Copy selection to the X11 selection clipboard */
@@ -767,15 +769,6 @@ static gboolean webkit_web_view_button_release_event(GtkWidget* widget, GdkEvent
{
WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
- Frame* focusedFrame = core(webView)->focusController()->focusedFrame();
-
- if (focusedFrame && focusedFrame->editor()->canEdit()) {
-#ifdef MAEMO_CHANGES
- WebKitWebViewPrivate* priv = webView->priv;
- hildon_gtk_im_context_filter_event(priv->imContext.get(), (GdkEvent*)event);
-#endif
- }
-
Frame* mainFrame = core(webView)->mainFrame();
if (mainFrame->view())
mainFrame->eventHandler()->handleMouseReleaseEvent(PlatformMouseEvent(event));
@@ -941,20 +934,20 @@ static gboolean webkit_web_view_focus_in_event(GtkWidget* widget, GdkEventFocus*
// TODO: Improve focus handling as suggested in
// http://bugs.webkit.org/show_bug.cgi?id=16910
GtkWidget* toplevel = gtk_widget_get_toplevel(widget);
- if (widgetIsOnscreenToplevelWindow(toplevel) && gtk_window_has_toplevel_focus(GTK_WINDOW(toplevel))) {
- WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
- FocusController* focusController = core(webView)->focusController();
+ if (!widgetIsOnscreenToplevelWindow(toplevel) || !gtk_window_has_toplevel_focus(GTK_WINDOW(toplevel)))
+ return GTK_WIDGET_CLASS(webkit_web_view_parent_class)->focus_in_event(widget, event);
- focusController->setActive(true);
+ WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
+ FocusController* focusController = core(webView)->focusController();
- if (focusController->focusedFrame())
- focusController->setFocused(true);
- else
- focusController->setFocusedFrame(core(webView)->mainFrame());
+ focusController->setActive(true);
+ if (focusController->focusedFrame())
+ focusController->setFocused(true);
+ else
+ focusController->setFocusedFrame(core(webView)->mainFrame());
- if (focusController->focusedFrame()->editor()->canEdit())
- gtk_im_context_focus_in(webView->priv->imContext.get());
- }
+ if (focusController->focusedFrame()->editor()->canEdit())
+ webView->priv->imFilter.notifyFocusedIn();
return GTK_WIDGET_CLASS(webkit_web_view_parent_class)->focus_in_event(widget, event);
}
@@ -964,15 +957,12 @@ static gboolean webkit_web_view_focus_out_event(GtkWidget* widget, GdkEventFocus
// We may hit this code while destroying the widget, and we might
// no longer have a page, then.
- Page* page = core(webView);
- if (page) {
+ if (Page* page = core(webView)) {
page->focusController()->setActive(false);
page->focusController()->setFocused(false);
}
- if (webView->priv->imContext)
- gtk_im_context_focus_out(webView->priv->imContext.get());
-
+ webView->priv->imFilter.notifyFocusedOut();
return GTK_WIDGET_CLASS(webkit_web_view_parent_class)->focus_out_event(widget, event);
}
@@ -1035,8 +1025,6 @@ static void webkit_web_view_realize(GtkWidget* widget)
#else
gtk_style_context_set_background(gtk_widget_get_style_context(widget), window);
#endif
-
- gtk_im_context_set_client_window(priv->imContext.get(), window);
}
#ifdef GTK_API_VERSION_2
@@ -1581,7 +1569,7 @@ static gboolean webkit_web_view_query_tooltip(GtkWidget *widget, gint x, gint y,
String title = static_cast<Element*>(titleNode)->title();
if (!title.isEmpty()) {
if (FrameView* view = coreFrame->view()) {
- GdkRectangle area = view->contentsToWindow(node->getRect());
+ GdkRectangle area = view->contentsToWindow(node->getPixelSnappedRect());
gtk_tooltip_set_tip_area(tooltip, &area);
}
gtk_tooltip_set_text(tooltip, title.utf8().data());
@@ -1618,12 +1606,6 @@ static gboolean webkit_web_view_show_help(GtkWidget* widget, GtkWidgetHelpType h
}
#endif
-static GtkIMContext* webkit_web_view_get_im_context(WebKitWebView* webView)
-{
- g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0);
- return GTK_IM_CONTEXT(webView->priv->imContext.get());
-}
-
static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
{
GtkBindingSet* binding_set;
@@ -2012,11 +1994,11 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
0,
g_signal_accumulator_true_handled,
NULL,
- webkit_marshal_BOOLEAN__OBJECT_STRING_POINTER,
+ webkit_marshal_BOOLEAN__OBJECT_STRING_BOXED,
G_TYPE_BOOLEAN, 3,
WEBKIT_TYPE_WEB_FRAME,
G_TYPE_STRING,
- G_TYPE_POINTER);
+ G_TYPE_ERROR);
/**
* WebKitWebView::load-finished:
@@ -2100,6 +2082,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* When a context menu is about to be displayed this signal is emitted.
*
* Add menu items to #menu to extend the context menu.
+ *
+ * Deprecated: 1.10: Use #WebKitWebView::context-menu signal instead.
*/
webkit_web_view_signals[POPULATE_POPUP] = g_signal_new("populate-popup",
G_TYPE_FROM_CLASS(webViewClass),
@@ -2814,11 +2798,46 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
G_SIGNAL_RUN_LAST,
0,
0, 0,
- webkit_marshal_VOID__OBJECT_OBJECT_POINTER,
+ webkit_marshal_VOID__OBJECT_OBJECT_BOXED,
G_TYPE_NONE, 3,
WEBKIT_TYPE_WEB_FRAME,
WEBKIT_TYPE_WEB_RESOURCE,
- G_TYPE_POINTER);
+ G_TYPE_ERROR);
+
+ /**
+ * WebKitWebView::context-menu:
+ * @web_view: the object which received the signal
+ * @default_menu: the default context menu
+ * @hit_test_result: a #WebKitHitTestResult with the context of the current position.
+ * @triggered_with_keyboard: %TRUE if the context menu was triggered using the keyboard
+ *
+ * Emmited when a context menu is about to be displayed to give the application
+ * a chance to create and handle its own context menu. If you only want to add custom
+ * options to the default context menu you can simply modify the given @default_menu.
+ *
+ * When @triggered_with_keyboard is %TRUE the coordinates of the given @hit_test_result should be
+ * used to position the popup menu. When the context menu has been triggered by a
+ * mouse event you could either use the @hit_test_result coordinates or pass %NULL
+ * to the #GtkMenuPositionFunc parameter of gtk_menu_popup() function.
+ * Note that coordinates of @hit_test_result are relative to @web_view window.
+ *
+ * If your application will create and display its own popup menu, %TRUE should be returned.
+ * Note that when the context menu is handled by the application, the #WebKitWebSettings:enable-default-context-menu
+ * setting will be ignored and the #WebKitWebView::populate-popup signal won't be emitted.
+ * If you don't want any context menu to be shown, you can simply connect to this signal
+ * and return %TRUE without doing anything else.
+ *
+ * Since: 1.10
+ */
+ webkit_web_view_signals[CONTEXT_MENU] = g_signal_new("context-menu",
+ G_TYPE_FROM_CLASS(webViewClass),
+ G_SIGNAL_RUN_LAST,
+ 0, 0, 0,
+ webkit_marshal_BOOLEAN__OBJECT_OBJECT_BOOLEAN,
+ G_TYPE_BOOLEAN, 3,
+ GTK_TYPE_WIDGET,
+ WEBKIT_TYPE_HIT_TEST_RESULT,
+ G_TYPE_BOOLEAN);
/*
* implementations of virtual methods
@@ -2870,7 +2889,11 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
widgetClass->get_preferred_width = webkit_web_view_get_preferred_width;
widgetClass->get_preferred_height = webkit_web_view_get_preferred_height;
#endif
+#if ENABLE(CONTEXT_MENUS)
widgetClass->popup_menu = webkit_web_view_popup_menu_handler;
+#else
+ widgetClass->popup_menu = NULL;
+#endif
widgetClass->grab_focus = webkit_web_view_grab_focus;
widgetClass->focus_in_event = webkit_web_view_focus_in_event;
widgetClass->focus_out_event = webkit_web_view_focus_out_event;
@@ -3347,6 +3370,9 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
coreSettings->setEnableScrollAnimator(settingsPrivate->enableSmoothScrolling);
#endif
+ // Use mock scrollbars if in DumpRenderTree mode (i.e. testing layout tests).
+ coreSettings->setMockScrollbarsEnabled(DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled());
+
if (Page* page = core(webView))
page->setTabKeyCyclesThroughElements(settingsPrivate->tabKeyCyclesThroughElements);
@@ -3497,34 +3523,42 @@ static void webkit_web_view_init(WebKitWebView* webView)
// members, which ensures they are initialized properly.
new (priv) WebKitWebViewPrivate();
- priv->imContext = adoptGRef(gtk_im_multicontext_new());
+ priv->imFilter.setWebView(webView);
Page::PageClients pageClients;
pageClients.chromeClient = new WebKit::ChromeClient(webView);
+#if ENABLE(CONTEXT_MENUS)
pageClients.contextMenuClient = new WebKit::ContextMenuClient(webView);
+#endif
pageClients.editorClient = new WebKit::EditorClient(webView);
pageClients.dragClient = new WebKit::DragClient(webView);
pageClients.inspectorClient = new WebKit::InspectorClient(webView);
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- if (DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled())
- pageClients.geolocationClient = new GeolocationClientMock;
- else
- pageClients.geolocationClient = new WebKit::GeolocationClient(webView);
-#endif
-
priv->corePage = new Page(pageClients);
+#if ENABLE(GEOLOCATION)
+ if (DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled()) {
+ GeolocationClientMock* mock = new GeolocationClientMock;
+ WebCore::provideGeolocationTo(priv->corePage, mock);
+ mock->setController(GeolocationController::from(priv->corePage));
+ } else
+ WebCore::provideGeolocationTo(priv->corePage, new WebKit::GeolocationClient(webView));
+#endif
#if ENABLE(DEVICE_ORIENTATION)
WebCore::provideDeviceMotionTo(priv->corePage, new DeviceMotionClientGtk);
WebCore::provideDeviceOrientationTo(priv->corePage, new DeviceOrientationClientGtk);
#endif
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- if (DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled())
- static_cast<GeolocationClientMock*>(pageClients.geolocationClient)->setController(priv->corePage->geolocationController());
+#if ENABLE(MEDIA_STREAM)
+ WebCore::provideUserMediaTo(priv->corePage, new UserMediaClientGtk);
#endif
+ if (DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled()) {
+ // Set some testing-specific settings
+ priv->corePage->settings()->setInteractiveFormValidationEnabled(true);
+ priv->corePage->settings()->setValidationMessageTimerMagnification(-1);
+ }
+
// Pages within a same session need to be linked together otherwise some functionalities such
// as visited link coloration (across pages) and changing popup window location will not work.
// To keep the default behavior simple (and because no PageGroup API exist in WebKitGTK at the
@@ -3541,7 +3575,6 @@ static void webkit_web_view_init(WebKitWebView* webView)
priv->viewportAttributes->priv->webView = webView;
gtk_widget_set_can_focus(GTK_WIDGET(webView), TRUE);
- gtk_widget_set_double_buffered(GTK_WIDGET(webView), FALSE);
priv->mainFrame = WEBKIT_WEB_FRAME(webkit_web_frame_new(webView));
priv->lastPopupXPosition = priv->lastPopupYPosition = -1;
@@ -5061,6 +5094,8 @@ const gchar* webkit_web_view_get_icon_uri(WebKitWebView* webView)
* Returns: (transfer full): a new reference to a #GdkPixbuf, or %NULL
*
* Since: 1.3.13
+ *
+ * Deprecated: 1.8: Use webkit_web_view_try_get_favicon_pixbuf() instead.
*/
GdkPixbuf* webkit_web_view_get_icon_pixbuf(WebKitWebView* webView)
{
@@ -5071,7 +5106,36 @@ GdkPixbuf* webkit_web_view_get_icon_pixbuf(WebKitWebView* webView)
return webkit_icon_database_get_icon_pixbuf(database, pageURI);
}
+/**
+ * webkit_web_view_try_get_favicon_pixbuf:
+ * @web_view: the #WebKitWebView object
+ * @width: the desired width for the icon
+ * @height: the desired height for the icon
+ *
+ * Obtains a #GdkPixbuf of the favicon for the given
+ * #WebKitWebView. This will return %NULL is there is no icon for the
+ * current #WebKitWebView or if the icon is in the database but not
+ * available at the moment of this call. Use
+ * webkit_web_view_get_icon_uri() if you need to distinguish these
+ * cases. Usually you want to connect to WebKitWebView::icon-loaded
+ * and call this method in the callback.
+ *
+ * See also webkit_favicon_database_try_get_favicon_pixbuf(). Contrary
+ * to this function the icon database one returns the URL of the page
+ * containing the icon.
+ *
+ * Returns: (transfer full): a new reference to a #GdkPixbuf, or %NULL
+ *
+ * Since: 1.8
+ */
+GdkPixbuf* webkit_web_view_try_get_favicon_pixbuf(WebKitWebView* webView, guint width, guint height)
+{
+ g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0);
+ const gchar* pageURI = webkit_web_view_get_uri(webView);
+ WebKitFaviconDatabase* database = webkit_get_favicon_database();
+ return webkit_favicon_database_try_get_favicon_pixbuf(database, pageURI, width, height);
+}
/**
* webkit_web_view_get_dom_document:
@@ -5139,6 +5203,31 @@ void webViewExitFullscreen(WebKitWebView* webView)
#endif
}
+#if ENABLE(ICONDATABASE)
+void webkitWebViewIconLoaded(WebKitFaviconDatabase* database, const char* frameURI, WebKitWebView* webView)
+{
+ // Since we definitely have an icon the WebView doesn't need to
+ // listen for notifications any longer.
+ webkitWebViewRegisterForIconNotification(webView, false);
+
+ // webkit_web_view_get_icon_uri() properly updates the "icon-uri" property.
+ g_object_notify(G_OBJECT(webView), "icon-uri");
+ g_signal_emit(webView, webkit_web_view_signals[ICON_LOADED], 0, webkit_web_view_get_icon_uri(webView));
+}
+
+void webkitWebViewRegisterForIconNotification(WebKitWebView* webView, bool shouldRegister)
+{
+ WebKitFaviconDatabase* database = webkit_get_favicon_database();
+ if (shouldRegister) {
+ if (!g_signal_handler_is_connected(database, webView->priv->iconLoadedHandler))
+ webView->priv->iconLoadedHandler = g_signal_connect(database, "icon-loaded",
+ G_CALLBACK(webkitWebViewIconLoaded), webView);
+ } else
+ if (g_signal_handler_is_connected(database, webView->priv->iconLoadedHandler))
+ g_signal_handler_disconnect(database, webView->priv->iconLoadedHandler);
+}
+#endif
+
namespace WebKit {
WebCore::Page* core(WebKitWebView* webView)
diff --git a/Source/WebKit/gtk/webkit/webkitwebview.h b/Source/WebKit/gtk/webkit/webkitwebview.h
index 2a15b53c6..dc578d5fa 100644
--- a/Source/WebKit/gtk/webkit/webkitwebview.h
+++ b/Source/WebKit/gtk/webkit/webkitwebview.h
@@ -430,8 +430,15 @@ webkit_web_view_get_hit_test_result (WebKitWebView *web_view,
WEBKIT_API const gchar *
webkit_web_view_get_icon_uri (WebKitWebView *web_view);
+#if !defined(WEBKIT_DISABLE_DEPRECATED)
WEBKIT_API GdkPixbuf *
webkit_web_view_get_icon_pixbuf (WebKitWebView *web_view);
+#endif
+
+WEBKIT_API GdkPixbuf *
+webkit_web_view_try_get_favicon_pixbuf (WebKitWebView *web_view,
+ guint width,
+ guint height);
WEBKIT_API WebKitDOMDocument *
webkit_web_view_get_dom_document (WebKitWebView *web_view);
diff --git a/Source/WebKit/gtk/webkit/webkitwebviewprivate.h b/Source/WebKit/gtk/webkit/webkitwebviewprivate.h
index 2967da92f..0bc5a56fa 100644
--- a/Source/WebKit/gtk/webkit/webkitwebviewprivate.h
+++ b/Source/WebKit/gtk/webkit/webkitwebviewprivate.h
@@ -27,11 +27,12 @@
#include "FullscreenVideoController.h"
#include "GtkClickCounter.h"
#include "GtkDragAndDropHelper.h"
-#include "GOwnPtr.h"
#include "Page.h"
#include "ResourceHandle.h"
+#include "WebViewInputMethodFilter.h"
#include "WidgetBackingStore.h"
#include <webkit/webkitwebview.h>
+#include <wtf/gobject/GOwnPtr.h>
namespace WebKit {
WebCore::Page* core(WebKitWebView*);
@@ -59,7 +60,7 @@ struct _WebKitWebViewPrivate {
gint lastPopupYPosition;
HashSet<GtkWidget*> children;
- GRefPtr<GtkIMContext> imContext;
+ WebKit::WebViewInputMethodFilter imFilter;
gboolean transparent;
bool needsResizeOnMap;
@@ -99,6 +100,10 @@ struct _WebKitWebViewPrivate {
#if USE(ACCELERATED_COMPOSITING)
OwnPtr<WebKit::AcceleratedCompositingContext> acceleratedCompositingContext;
#endif
+
+#if ENABLE(ICONDATABASE)
+ gulong iconLoadedHandler;
+#endif
};
void webkit_web_view_notify_ready(WebKitWebView*);
@@ -118,6 +123,11 @@ GtkMenu* webkit_web_view_get_context_menu(WebKitWebView*);
void webViewEnterFullscreen(WebKitWebView* webView, WebCore::Node*);
void webViewExitFullscreen(WebKitWebView* webView);
+
+#if ENABLE(ICONDATABASE)
+void webkitWebViewRegisterForIconNotification(WebKitWebView*, bool shouldRegister);
+void webkitWebViewIconLoaded(WebKitFaviconDatabase*, const char* frameURI, WebKitWebView*);
+#endif
}
#endif
diff --git a/Source/WebKit/gtk/webkitmarshal.list b/Source/WebKit/gtk/webkitmarshal.list
index b7890825d..b7428905c 100644
--- a/Source/WebKit/gtk/webkitmarshal.list
+++ b/Source/WebKit/gtk/webkitmarshal.list
@@ -2,11 +2,13 @@ BOOLEAN:ENUM,INT
BOOLEAN:INT,INT,STRING
BOOLEAN:OBJECT
BOOLEAN:OBJECT,OBJECT
+BOOLEAN:OBJECT,OBJECT,BOOLEAN
BOOLEAN:OBJECT,OBJECT,ENUM
BOOLEAN:OBJECT,OBJECT,ENUM,BOOLEAN
BOOLEAN:OBJECT,OBJECT,OBJECT,OBJECT
BOOLEAN:OBJECT,OBJECT,STRING,OBJECT
BOOLEAN:OBJECT,STRING
+BOOLEAN:OBJECT,STRING,BOXED
BOOLEAN:OBJECT,STRING,POINTER
BOOLEAN:OBJECT,STRING,STRING,STRING
BOOLEAN:STRING,INT,STRING
@@ -20,6 +22,7 @@ VOID:OBJECT,OBJECT
VOID:OBJECT,OBJECT,INT
VOID:OBJECT,OBJECT,OBJECT
VOID:OBJECT,OBJECT,POINTER
+VOID:OBJECT,OBJECT,BOXED
VOID:OBJECT,OBJECT,OBJECT,OBJECT
VOID:OBJECT,POINTER,POINTER
VOID:OBJECT,INT
diff --git a/Source/WebKit/mac/ChangeLog b/Source/WebKit/mac/ChangeLog
index cdef8f903..e103b9942 100644
--- a/Source/WebKit/mac/ChangeLog
+++ b/Source/WebKit/mac/ChangeLog
@@ -1,3 +1,1184 @@
+2012-05-05 Dean Jackson <dino@apple.com>
+
+ Add new Setting/Preference to disable requestAnimationFrame
+ https://bugs.webkit.org/show_bug.cgi?id=85693
+
+ Reviewed by Simon Fraser.
+
+ Exposes a new WebPreference: WebKitRequestAnimationFrameEnabled.
+ The default value is true. The majority of applications will leave
+ it this way.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences requestAnimationFrameEnabled]):
+ (-[WebPreferences setRequestAnimationFrameEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
+2012-05-04 Jer Noble <jer.noble@apple.com>
+
+ REGRESSION (r116127-r116165): 6 tests failing on Lion Debug (Tests)
+ https://bugs.webkit.org/show_bug.cgi?id=85674
+
+ Reviewed by Oliver Hunt.
+
+ Null check the results of core([frame DOMDocument]).
+
+ * WebView/WebView.mm:
+ (-[WebView _didStartProvisionalLoadForFrame:]):
+
+2012-05-02 Jer Noble <jer.noble@apple.com>
+
+ Taking a visibility:hidden element full screen causes full screen window to disappear.
+ https://bugs.webkit.org/show_bug.cgi?id=85432
+
+ Reviewed by Maciej Stachowiak.
+
+ When given an initial or final frame with a zero width or height, return a rect representing
+ the entire screen, rather than a rect with a zero or infinite size. Doing otherwise will
+ confuse the window server when it's instructed to scale the full screen window to that size.
+
+ * WebView/WebFullScreenController.mm:
+ (windowFrameFromApparentFrames):
+
+2012-05-04 Jer Noble <jer.noble@apple.com>
+
+ Full screen will exit during a provisional load of a non-ancestor iframe.
+ https://bugs.webkit.org/show_bug.cgi?id=85230
+
+ Reviewed by Maciej Stachowiak .
+
+ Only exit full screen mode if the frame being loaded contains the full
+ screen element.
+
+ * WebView/WebView.mm:
+ (-[WebView _didStartProvisionalLoadForFrame:]): Give the UIDelegate a first crack at handling the
+ request to close the full screen window when a provisional load occurs.
+
+2012-05-04 Jer Noble <jer.noble@apple.com>
+
+ Move WebKitFullScreenListener into its own file.
+ https://bugs.webkit.org/show_bug.cgi?id=85640
+
+ Reviewed by Maciej Stachowiak.
+
+ Move WebKitFullScreenListener into its own file, so it can be used by multiple classes.
+
+ * WebCoreSupport/WebKitFullScreenListener.h: Added.
+ * WebCoreSupport/WebKitFullScreenListener.mm: Added.
+ (-[WebKitFullScreenListener webkitWillEnterFullScreen]):
+ (-[WebKitFullScreenListener webkitDidEnterFullScreen]):
+ (-[WebKitFullScreenListener webkitWillExitFullScreen]):
+ (-[WebKitFullScreenListener webkitDidExitFullScreen]):
+ * WebCoreSupport/WebChromeClient.mm:
+
+2012-05-04 Brady Eidson <beidson@apple.com>
+
+ <rdar://problem/11312853> and https://bugs.webkit.org/show_bug.cgi?id=85635
+ Exception in [WebFrame loadRequest:] breaks some WebKit apps
+
+ Reviewed by Alexey Proskuryakov.
+
+ Some API clients pass in nil requests or requests with nil URLs.
+ In r112571 we started rewriting these URLs resulting in an exception.
+ Since we've supported nil requests until now, we should not try to rewrite these URLs.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame loadRequest:]): Don't try to rewrite invalid URLs if they are also null.
+
+2012-05-04 Nate Chapin <japhet@chromium.org>
+
+ Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+ https://bugs.webkit.org/show_bug.cgi?id=85533
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): Calling commitData when finishing is no longer necessary,
+ as WebCore will take care of simulating the receipt of data and ensuring the requisite work gets done in the blank document case.
+
+2012-05-03 Anders Carlsson <andersca@apple.com>
+
+ useWebKitWebInspector should be more robust against missing files
+ https://bugs.webkit.org/show_bug.cgi?id=85563
+ <rdar://problem/11373948>
+
+ Reviewed by Dan Bernstein.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (useWebKitWebInspector):
+
+2012-05-03 Tobias Netzel <tobias.netzel@googlemail.com>
+
+ Bugs in WebFullScreenController
+ https://bugs.webkit.org/show_bug.cgi?id=85388
+
+ Reviewed by Alexey Proskuryakov.
+
+ Leopard specific fixes:
+ NSWindow doesn't respond to isOnActiveSpace so find out first.
+ Values passed to SetSystemUIMode were swapped.
+
+ * WebView/WebFullScreenController.mm:
+ (-[WebFullScreenController exitFullScreen]):
+ (-[WebFullScreenController _updateMenuAndDockForFullScreen]):
+
+2012-05-02 Jon Lee <jonlee@apple.com>
+
+ Migrate permission functions to Notification from NotificationCenter
+ https://bugs.webkit.org/show_bug.cgi?id=80485
+ <rdar://problem/10965458>
+
+ Reviewed by Jian Li.
+
+ * WebCoreSupport/WebNotificationClient.h: *
+ WebCoreSupport/WebNotificationClient.mm: Add a separate callback
+ variable depending on the notifications API enabled.
+ (WebNotificationClient::requestPermission): Add
+ NotificationPermissionCallback version of the same
+ function. And refactor common code into private function.
+ (-[WebNotificationPolicyListener initWithCallback:]): Refactor to
+ take the NotificationPermissionCallback as a parameter.
+ (-[WebNotificationPolicyListener initWithVoidCallback:]): Add new
+ init method to handle legacy API.
+ (-[WebNotificationPolicyListener allow]): Invoke the callback for
+ both variables. If only one of the APIs is enabled, we are
+ guaranteed that the relevant callback variable exists. If both
+ APIs are supported, it is possible that _voidCallback will be nil
+ if the callback is NotificationPermissionCallback, so we need the
+ extra pointer check.
+ (-[WebNotificationPolicyListener deny]): Ditto.
+
+2012-05-02 Eric Seidel <eric@webkit.org>
+
+ Sort ENABLE_ defines in FeatureDefines.xcconfig files to make them easier to compare with one another (and easier to autogenerate)
+ https://bugs.webkit.org/show_bug.cgi?id=85433
+
+ Reviewed by Adam Barth.
+
+ I have a script which can autogenerate these xcconfig files as well as the
+ vsprops files (and soon the Chromium, cmake, gnumake and qmake) feature lists
+ from a central feature list file.
+ In preparation for posting such a tool, I'm re-sorting these xcconfig files to be
+ alphabetically ordered (currently they're close, but not quite).
+ There is also at least one inconsistency between these files (CSS_LEGACY_PREFIXES) which
+ I will fix in a second pass. I will also sort the FEATURE_DEFINES = line in a follow-up patch.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2012-04-18 Jon Honeycutt <jhoneycutt@apple.com>
+
+ FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
+ information about the form being submitted
+ https://bugs.webkit.org/show_bug.cgi?id=84297
+
+ Reviewed by Andy Estes.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ Updated method declaration.
+
+2012-05-01 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Make Page::setDefersLoading() have a call count so that each time
+ loading is deferred, it must be balanced with a call to resume.
+ https://bugs.webkit.org/show_bug.cgi?id=84522
+
+ Reviewed by Andy Estes.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ Declare a new key for this preference.
+
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ Initialize new preference to NO.
+ (-[WebPreferences setWantsBalancedSetDefersLoadingBehavior:]):
+ Setter.
+ (-[WebPreferences wantsBalancedSetDefersLoadingBehavior]):
+ Getter.
+
+ * WebView/WebPreferencesPrivate.h:
+ Declare setter and getter.
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+ Set the setting from the WebPreferences object's value.
+
+2012-05-01 Jeffrey Pfau <jpfau@apple.com>
+
+ <rdar://problem/10422318> Support for web content filter delegate for filtering https content
+ https://bugs.webkit.org/show_bug.cgi?id=85300
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface):
+
+2012-05-01 Ryosuke Niwa <rniwa@webkit.org>
+
+ *Command.h files shouldn't be exported to WebKit layer
+ https://bugs.webkit.org/show_bug.cgi?id=74778
+
+ Reviewed by Eric Seidel.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
+
+2012-04-28 Geoffrey Garen <ggaren@apple.com>
+
+ Clarified JSGlobalData (JavaScript VM) lifetime
+ https://bugs.webkit.org/show_bug.cgi?id=85142
+
+ Reviewed by Anders Carlsson.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+ (WebKit::NetscapePluginInstanceProxy::invokeDefault):
+ (WebKit::NetscapePluginInstanceProxy::construct):
+
+2012-04-27 Gavin Peters <gavinp@chromium.org>
+
+ Add new ENABLE_LINK_PRERENDER define to control the Prerendering API
+ https://bugs.webkit.org/show_bug.cgi?id=84871
+
+ Reviewed by Adam Barth.
+
+ Prerendering is currently covered by the ENABLE_LINK_PREFETCH macro, but the new Prerendering
+ API separates it from prefetching. Having separate include guards lets ports enable prefetching,
+ a relatively easy change, without needing to build the infrastructure for prerendering, which
+ is considerably more complicated.
+
+2012-04-26 Jon Lee <jonlee@apple.com>
+
+ [WK2] AlternativeTextClient leaks when the page is destroyed
+ https://bugs.webkit.org/show_bug.cgi?id=84307
+ <rdar://problem/11328431>
+
+ Reviewed by Enrica Casucci.
+
+ * WebCoreSupport/WebAlternativeTextClient.h: Implement pageDestroyed(), as in EditorClient.
+ (WebAlternativeTextClient):
+ * WebCoreSupport/WebAlternativeTextClient.mm:
+ (WebAlternativeTextClient::pageDestroyed): Deletes itself.
+
+2012-04-26 Jer Noble <jer.noble@apple.com>
+
+ Full Screen mode does not preserve CALayer ordering after exiting.
+ https://bugs.webkit.org/show_bug.cgi?id=83931
+
+ Reviewed by Eric Carlson.
+
+ Further corrections to r114567. When swapping view for otherView, give the correct
+ relative view to -[NSView addSubview:positioned:relativeTo:].
+
+ * WebView/WebFullScreenController.mm:
+ (-[WebFullScreenController _swapView:with:]):
+
+2012-04-25 Jer Noble <jer.noble@apple.com>
+
+ Placeholder view is immediately removed from hosting window upon entering full screen.
+ https://bugs.webkit.org/show_bug.cgi?id=84916
+
+ Reviewed by Darin Adler.
+
+ Correct a mistake added in r114567. When swapping view for otherView, add otherView and
+ remove view (rather than adding otherView and removing otherView).
+
+ * WebView/WebFullScreenController.mm:
+ (-[WebFullScreenController _swapView:with:]):
+
+2012-04-25 Beth Dakin <bdakin@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=84913
+ WebKit 1: Initialize deviceScaleFactor on creation of the WebView
+ -and corresponding-
+ <rdar://problem/11322716>
+
+ Reviewed by Darin Adler.
+
+ Before this patch, we weren't setting the deviceScaleFactor until
+ viewDidMoveToWindow which is quite late for background tabs. setHostWindow will
+ happen early on though. For applications that don't use host windows, also set it
+ from _initWithFrame.
+ * WebView/WebView.mm:
+ (-[WebView _initWithFrame:frameName:groupName:usesDocumentViews:]):
+ (-[WebView setHostWindow:]):
+ (-[WebView _deviceScaleFactor]):
+
+2012-04-24 Alexis Menard <alexis.menard@openbossa.org>
+
+ Replace occurences of style selector from variables and methods names by style resolver.
+ https://bugs.webkit.org/show_bug.cgi?id=84765
+
+ Reviewed by Andreas Kling.
+
+ Rename methods and variables to follow the new name StyleResolver. It requires to update the
+ local variables, methods parameters, and function names to match the new name and to remove
+ the concept of "selector" to avoid clashing with the CSS concept. The next and last patch
+ will be to rename CSSStyleSelector file and update the includes.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView reapplyStyles]):
+ (-[WebHTMLView _setPrinting:minimumPageLogicalWidth:logicalHeight:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustViewSize:paginateScreenContent:]):
+
+2012-04-23 Andy Estes <aestes@apple.com>
+
+ Incremental rendering should be unsuppressed after the load event or a configurable timeout, whichever occurs first.
+ https://bugs.webkit.org/show_bug.cgi?id=84583
+
+ Add a private WebPreference for setting the incremental rendering suppression timeout.
+
+ Reviewed by Anders Carlsson.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences setIncrementalRenderingSuppressionTimeoutInSeconds:]):
+ (-[WebPreferences incrementalRenderingSuppressionTimeoutInSeconds]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
+2012-04-23 Julien Chaffraix <jchaffraix@webkit.org>
+
+ Cut dependency on RenderLayer::scrollRectToVisible outside rendering
+ https://bugs.webkit.org/show_bug.cgi?id=84607
+
+ Reviewed by Simon Fraser.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _scrollDOMRangeToVisible:]):
+ Updated to use RenderObject::scrollRectToVisible and not depend on RenderLayer.
+
+2012-04-22 Jon Lee <jonlee@apple.com>
+
+ Remove notifications support on Mac Lion.
+ https://bugs.webkit.org/show_bug.cgi?id=84554
+ <rdar://problem/11297128>
+
+ Reviewed by Sam Weinig.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2012-04-20 Jon Lee <jonlee@apple.com>
+
+ Add Notification constructor
+ https://bugs.webkit.org/show_bug.cgi?id=80477
+ <rdar://problem/10912431>
+
+ Reviewed by Jian Li.
+
+ * WebCoreSupport/WebNotificationClient.mm:
+ (WebNotificationClient::clearNotifications): When clearing notifications, finalize
+ them so that they can be cleaned up by the GC.
+
+2012-04-20 Timothy Hatcher <timothy@apple.com>
+
+ Make the Web Inspector be the first responder when opening docked.
+
+ <rdar://problem/11294217>
+
+ Reviewed by Brian Weinstein.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController showWindow:]): Call makeFirstResponder: on
+ the window and pass the Inspector's WebView.
+
+2012-04-18 Hironori Bono <hbono@chromium.org>
+
+ Split SpellChecker::didCheck() to SpellChecker::didCheckSucceeded() and SpellChecker::didCheckCanceled()
+ https://bugs.webkit.org/show_bug.cgi?id=83748
+
+ Reviewed by Ryosuke Niwa.
+
+ This change replaces a call for SpellChecker::didCheck() with one for
+ SpellChecker::didCheckSucceeded() because didCheck has been split into
+ didCheckSucceeded(0 and didCheckCanceled().
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (-[WebEditorSpellCheckResponder perform]): Replaced didCheck with didCheckSucceeded.
+
+2012-04-18 Jer Noble <jer.noble@apple.com>
+
+ Full Screen mode does not preserve CALayer ordering after exiting.
+ https://bugs.webkit.org/show_bug.cgi?id=83931
+
+ Reviewed by Eric Carlson.
+
+ When swapping the placeholder and web views, use -[NSView addSubview:positioned:relativeTo:]
+ instead of -[NSView replaceSubview:with:], as the latter does not preserve the relative order
+ of the view's backing CALayers.
+
+ * WebView/WebFullScreenController.mm:
+ (-[WebFullScreenController _swapView:with:]):
+
+2012-04-18 Alexey Proskuryakov <ap@apple.com>
+
+ [WK2] Sandbox violations prevent attaching files to gmail messages
+ https://bugs.webkit.org/show_bug.cgi?id=84263
+ <rdar://problem/11248260>
+
+ Reviewed by Oliver Hunt.
+
+ * WebCoreSupport/WebDragClient.mm: (WebDragClient::willPerformDragDestinationAction):
+ DragDestinationActionUpload no longer exists, so we don't need a special case for it.
+
+2012-04-17 Jer Noble <jer.noble@apple.com>
+
+ Exiting full screen video brings the wrong Safari window to the foreground
+ https://bugs.webkit.org/show_bug.cgi?id=83936
+
+ Reviewed by Adele Peterson.
+
+ Tell the original webView's window to makeKeyAndOrderFront once the exit
+ animation completes.
+
+ * WebView/WebFullScreenController.mm:
+ (-[WebFullScreenController finishedExitFullScreenAnimation:]):
+
+2012-04-16 Anders Carlsson <andersca@apple.com>
+
+ Use a MIG call when creating a plug-in property list file
+ https://bugs.webkit.org/show_bug.cgi?id=84084
+ <rdar://problem/11197341>
+
+ Reviewed by Sam Weinig.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::createPropertyListFile):
+ Get a plug-in host and call _WKPHCreatePluginMIMETypesPreferences instead.
+
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ Add PHCreatePluginMIMETypesPreferences.
+
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage createPropertyListFile]):
+ NetscapePluginHostManager::createPropertyListFile is no longer a static member function.
+
+2012-04-12 Andy Estes <aestes@apple.com>
+
+ REGRESSION (r102262): iAd Producer relies on CSSStyleDeclaration property setters respecting '!important'
+ https://bugs.webkit.org/show_bug.cgi?id=83832
+
+ Reviewed by Alexey Proskuryakov.
+
+ * Misc/WebKitVersionChecks.h: Indicate that 535.13.0 was the first
+ version of WebKit.framework to ignore '!important' in
+ CSSStyleDeclaration property setters.
+ * WebView/WebView.mm:
+ (shouldRespectPriorityInCSSAttributeSetters):
+ (-[WebView _commonInitializationWithFrameName:groupName:]): Enable a
+ quirk to restore pre-r102262 behavior if the application is iAd Producer
+ and was linked against a version of WebKit.framework that had the old behavior.
+
+2012-04-12 Andy Estes <aestes@apple.com>
+
+ Remove unused WebKit1 SPI for suppressing incremental rendering.
+ https://bugs.webkit.org/show_bug.cgi?id=83801
+
+ Reviewed by Simon Fraser.
+
+ This SPI is unused and has been replaced by API ([setS|s]uppressesIncrementalRendering).
+
+ * WebView/WebPreferences.mm:
+ * WebView/WebPreferencesPrivate.h:
+
+2012-04-08 Dan Bernstein <mitz@apple.com>
+
+ [mac] REGRESSION (r113467): Some canvas tests are failing in WebKit1 when run after compositing/tiled-layers-hidpi.html
+ https://bugs.webkit.org/show_bug.cgi?id=83453
+
+ Reviewed by Sam Weinig.
+
+ * WebView/WebView.mm:
+ (-[WebView _setCustomBackingScaleFactor:]): When the scale factor parameter was 0, meaning
+ no custom scale factor, this method was setting the Page scale factor to 0, and that value
+ was used by canvas. Changed it to correctly set the Page scale factor back to the device
+ scale factor.
+
+2012-04-06 Alexey Proskuryakov <ap@apple.com>
+
+ [Mac] Adopt a different method of telling AppKit when inline input isn't supported
+ https://bugs.webkit.org/show_bug.cgi?id=83408
+ <rdar://problem/9205734>
+
+ Reviewed by Adele Peterson.
+
+ * Plugins/Hosted/WebTextInputWindowController.m:
+ (-[WebTextInputView validAttributesForMarkedText]):
+ (-[WebTextInputPanel init]):
+ (-[WebTextInputPanel _interpretKeyEvent:string:]): Added a comment about old approach.
+
+2012-04-06 Enrica Casucci <enrica@apple.com>
+
+ Provide Obj-C private API to simplify markup.
+ https://bugs.webkit.org/show_bug.cgi?id=83334
+ <rdar://problem/11033861>
+
+ Reviewed by Sam Weinig.
+
+ * WebView/WebView.mm:
+ (-[WebView _simplifyMarkup:endNode:]): Added.
+ * WebView/WebViewPrivate.h:
+
+2012-04-06 Tim Horton <timothy_horton@apple.com>
+
+ Add autodetection of image orientation from EXIF information
+ https://bugs.webkit.org/show_bug.cgi?id=19688
+ <rdar://problem/4126979> and <rdar://problem/11091578>
+
+ Original patch by David Carson and Eric Seidel.
+
+ Reviewed by Simon Fraser.
+
+ Add a preference, ShouldRespectImageOrientation, which will cause WebCore to respect EXIF orientation in all images.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences setShouldRespectImageOrientation:]):
+ (-[WebPreferences shouldRespectImageOrientation]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
+2012-04-06 Dan Bernstein <mitz@apple.com>
+
+ <rdar://problem/10912476> HiDPI: Have canvas use a hidpi backing store, but downsample upon access
+
+ Reviewed by Sam Weinig.
+
+ * Configurations/FeatureDefines.xcconfig: Added ENABLE_HIGH_DPI_CANVAS.
+
+2012-04-05 Jia Pu <jpu@apple.com>
+
+ Move correction panel related functions from EditorClient into separated AlternativeTextClient class.
+ https://bugs.webkit.org/show_bug.cgi?id=82970
+
+ Reviewed by Enrica Casucci.
+
+ Move correction panel related functions from WebEditorClient to the new WebAlternativeTextClient.
+ See WebCore/ChangeLog for details.
+
+ * WebCoreSupport/CorrectionPanel.h:
+ * WebCoreSupport/CorrectionPanel.mm:
+ * WebCoreSupport/WebAlternativeTextClient.h: Added.
+ (WebAlternativeTextClient):
+ * WebCoreSupport/WebAlternativeTextClient.mm: Added.
+ (WebAlternativeTextClient::WebAlternativeTextClient):
+ (WebAlternativeTextClient::~WebAlternativeTextClient):
+ (WebAlternativeTextClient::showCorrectionAlternative):
+ (WebAlternativeTextClient::dismissAlternative):
+ (WebAlternativeTextClient::dismissAlternativeSoon):
+ (WebAlternativeTextClient::recordAutocorrectionResponse):
+ * WebCoreSupport/WebEditorClient.h:
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::~WebEditorClient):
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+
+2012-03-15 Jer Noble <jer.noble@apple.com>
+
+ Full Screen mode should cancel before navigation.
+ https://bugs.webkit.org/show_bug.cgi?id=81295
+
+ Reviewed by Anders Carlsson.
+
+ When a provisional load is started, if the page is currently in full screen mode, instruct
+ the full screen controller to close the full screen window immediately.
+
+ * WebView/WebFullScreenController.h:
+ * WebView/WebFullScreenController.mm:
+ (-[WebFullScreenController isFullScreen]): Added.
+ * WebView/WebView.mm:
+ (-[WebView _didStartProvisionalLoadForFrame:]): Close the full screen window controller, if
+ present and in full screen mode.
+
+2012-04-03 Keishi Hattori <keishi@webkit.org>
+
+ Disable ENABLE_DATALIST for now
+ https://bugs.webkit.org/show_bug.cgi?id=82871
+
+ Reviewed by Kent Tamura.
+
+ * Configurations/FeatureDefines.xcconfig: Disabled ENABLE_DATALIST.
+
+2012-04-03 Anders Carlsson <andersca@apple.com>
+
+ Add audit token to PHCheckInWithPluginHost
+ https://bugs.webkit.org/show_bug.cgi?id=83102
+
+ Reviewed by Sam Weinig.
+
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
+2012-04-02 Jia Pu <jpu@apple.com>
+
+ Rename SpellingCorrectionController to AlternativeTextController.
+ https://bugs.webkit.org/show_bug.cgi?id=82942
+
+ Reviewed by Enrica Casucci.
+
+ These changes are simply adopting new class names.
+
+ * WebCoreSupport/CorrectionPanel.h:
+ (CorrectionPanel):
+ * WebCoreSupport/CorrectionPanel.mm:
+ (correctionIndicatorType):
+ (CorrectionPanel::CorrectionPanel):
+ (CorrectionPanel::~CorrectionPanel):
+ (CorrectionPanel::show):
+ (CorrectionPanel::dismiss):
+ (CorrectionPanel::dismissInternal):
+ (CorrectionPanel::handleAcceptedReplacement):
+ * WebCoreSupport/WebEditorClient.h:
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::~WebEditorClient):
+ (WebEditorClient::showCorrectionPanel):
+ (WebEditorClient::dismissCorrectionPanel):
+ (WebEditorClient::dismissCorrectionPanelSoon):
+ * WebView/WebView.mm:
+ (-[WebView handleCorrectionPanelResult:]):
+
+2012-04-03 Jer Noble <jer.noble@apple.com>
+
+ ESC key in full screen does not result in webkitFullScreenChange event.
+ https://bugs.webkit.org/show_bug.cgi?id=82755
+ <rdar://problem/11093513>
+
+ Reviewed by Eric Carlson.
+
+ Instead of exiting full screen directly, ask the document to initiate exiting full screen. This ensures
+ that the entire full screen element stack is cleared and that webkitFullScreenChange events are sent
+ out correctly.
+
+ * WebView/WebFullScreenController.mm:
+ (-[WebFullScreenController cancelOperation:]):
+ (-[WebFullScreenController requestExitFullScreen]):
+
+2012-04-01 Jon Lee <jonlee@apple.com>
+
+ Rename notification properties and functions
+ https://bugs.webkit.org/show_bug.cgi?id=80482
+ <rdar://problem/10912432>
+
+ Reviewed by Kentaro Hara.
+
+ * WebView/WebNotification.h: Rename replaceID to tag.
+ * WebView/WebNotification.mm:
+ (-[WebNotification tag]):
+
+2012-03-31 Timothy Hatcher <timothy@apple.com>
+
+ Prevent opening external URLs in the Web Inspector's WebView.
+
+ All URLs not handled by the Inspector's JavaScript are now opened in the inspected WebView.
+
+ https://webkit.org/b/82812
+ rdar://problem/9488558
+
+ Reviewed by Joseph Pecoraro.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController init]): Factored the URL code out of here into inspectorPagePath.
+ (-[WebInspectorWindowController inspectorPagePath]): Added.
+ (-[WebInspectorWindowController webView:decidePolicyForNavigationAction:request:frame:decisionListener:]): Added.
+ Only allow non-main frame and the inspector page. All other URLs will be opened in the inspected page.
+
+2012-03-30 Emil A Eklund <eae@chromium.org>
+
+ Change WebKit/WebKit2 platform code to use pixel snapped values
+ https://bugs.webkit.org/show_bug.cgi?id=82549
+
+ Change WebKit and WebKit2 platform code to use rounded locations and
+ pixel snapped rects and sizes. This largely avoids having to expose the
+ fractional layout types to the platform code.
+
+ Reviewed by Eric Seidel.
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMNode _renderRect:]):
+
+2012-03-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ GEOLOCATION should be implemented as Page Supplement
+ https://bugs.webkit.org/show_bug.cgi?id=82228
+
+ Reviewed by Adam Barth.
+
+ Geolocation is now a Supplement in Page so the interface
+ has changed for setting up the page's geolocation client
+ initially and accessing the controller later.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+ (-[WebView _geolocationDidChangePosition:]):
+ (-[WebView _geolocationDidFailWithError:]):
+
+2012-03-30 Keishi Hattori <keishi@webkit.org>
+
+ Change ENABLE_INPUT_COLOR to ENABLE_INPUT_TYPE_COLOR and enable it for chromium
+ https://bugs.webkit.org/show_bug.cgi?id=80972
+
+ Reviewed by Kent Tamura.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2012-03-28 Alexey Proskuryakov <ap@apple.com>
+
+ [Mac] REGRESSION: Removing translation of local paths in KURL constructor broke some applications
+ https://bugs.webkit.org/show_bug.cgi?id=82548
+ <rdar://problem/11125355>
+ <rdar://problem/11142152>
+
+ Reviewed by Brady Eidson.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame loadRequest:]): Fixed this bug.
+ (-[WebFrame loadHTMLString:baseURL:]): Also added translation to another API, so that I don't
+ have to come back again.
+ (-[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]): Ditto.
+
+ * WebView/WebView.mm: (-[WebView setMainFrameURL:]): Changed another place where clients used
+ to pass file paths instead of URLs.
+
+2012-03-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r112553.
+ http://trac.webkit.org/changeset/112553
+ https://bugs.webkit.org/show_bug.cgi?id=82638
+
+ It made all tests crash on Qt WK2 (Requested by Ossy_away on
+ #webkit).
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+ (-[WebView _geolocationDidChangePosition:]):
+ (-[WebView _geolocationDidFailWithError:]):
+
+2012-03-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ HashMap<>::add should return a more descriptive object
+ https://bugs.webkit.org/show_bug.cgi?id=71063
+
+ Reviewed by Ryosuke Niwa.
+
+ Update code to use AddResult instead of a pair.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::hostForPlugin):
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::methodsNamed):
+ (WebKit::ProxyInstance::fieldNamed):
+ * WebCoreSupport/WebNotificationClient.mm:
+ (WebNotificationClient::show):
+
+2012-03-29 Mark Pilgrim <pilgrim@chromium.org>
+
+ GEOLOCATION should be implemented as Page Supplement
+ https://bugs.webkit.org/show_bug.cgi?id=82228
+
+ Reviewed by Adam Barth.
+
+ Geolocation is now a Supplement in Page so the interface
+ has changed for setting up the page's geolocation client
+ initially and accessing the controller later.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+ (-[WebView _geolocationDidChangePosition:]):
+ (-[WebView _geolocationDidFailWithError:]):
+
+2012-03-28 Nate Chapin <japhet@chromium.org>
+
+ Remove dispatchDidLoadMainResource callback, since no
+ port implements it.
+ https://bugs.webkit.org/show_bug.cgi?id=82539
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ * WebKit.order:
+
+2012-03-28 Joseph Pecoraro <pecoraro@apple.com>
+
+ <http://webkit.org/b/82419> Web Inspector: Create -[DOMNode inspect] from IDL
+
+ Reviewed by Timothy Hatcher.
+
+ * MigrateHeaders.make: Copy DOMNodePrivate.h to PrivateHeaders.
+
+2012-03-27 Timothy Hatcher <timothy@apple.com>
+
+ Make WebKit properly load a staged framework when soft linking.
+
+ https://webkit.org/b/82371
+ rdar://problem/11125989
+
+ Reviewed by Dan Bernstein.
+
+ * WebCoreSupport/WebInspectorClient.mm: Use SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL to properly
+ load the WebInspector framework.
+
+2012-03-26 Adam Barth <abarth@webkit.org>
+
+ FrameLoader::shouldAllowNavigation uses Frame for context rather than Document
+ https://bugs.webkit.org/show_bug.cgi?id=81020
+
+ Reviewed by Eric Seidel.
+
+ Update call site to new function name.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchWillSubmitForm):
+
+2012-03-23 Alexey Proskuryakov <ap@apple.com>
+
+ [Mac] No need for platform-specific ENABLE_BLOB values
+ https://bugs.webkit.org/show_bug.cgi?id=82102
+
+ Reviewed by David Kilzer.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2012-03-23 Dean Jackson <dino@apple.com>
+
+ Disable CSS_SHADERS in Apple builds
+ https://bugs.webkit.org/show_bug.cgi?id=81996
+
+ Reviewed by Simon Fraser.
+
+ Remove ENABLE_CSS_SHADERS from FeatureDefines. It's now in Platform.h.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2012-03-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert hasGrammarMarker to use Internals interface
+ https://bugs.webkit.org/show_bug.cgi?id=82004
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove hasGrammarMarker support, since it can support in the cross-port way
+ through the Internals interface.
+
+ * WebKit.order:
+ * WebView/WebFrame.mm:
+ * WebView/WebFramePrivate.h:
+
+2012-03-22 Benjamin Poulain <bpoulain@apple.com>
+
+ Build fix for WebHistory is busted after changing time zone
+ https://bugs.webkit.org/show_bug.cgi?id=81849
+
+ Unreviewed build fix.
+
+ When generating warning for undefined message signature, rebuildHistoryByDayIfNeeded
+ fail to compile due to addItemToDateCaches: being undefined.
+
+ Move the definition to the right place in the file to use the private method.
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate rebuildHistoryByDayIfNeeded:]):
+
+2012-03-22 Benjamin Poulain <bpoulain@apple.com>
+
+ WebHistory is busted after changing time zone
+ https://bugs.webkit.org/show_bug.cgi?id=81849
+
+ Reviewed by Brady Eidson.
+
+ The date used for choosing the bucket of a new entry is computed
+ with the system TimeZone.
+
+ When the Time Zone change, or the daylight saving time change, all the dates
+ in _entriesByDate are offset from the new entries.
+
+ This patch solves the issue by re-distributing the WebHistoryItems if the time zone
+ changes.
+ The clients of WebHistory are notified of this change through the regular Notifications.
+
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate rebuildHistoryByDayIfNeeded:]):
+ (-[WebHistoryPrivate init]):
+ (-[WebHistory timeZoneChanged:]):
+ (-[WebHistory init]):
+ (-[WebHistory dealloc]):
+ (-[WebHistory finalize]):
+
+2012-03-21 Tim Horton <timothy_horton@apple.com>
+
+ Make use of CG rounded-rect primitives
+ https://bugs.webkit.org/show_bug.cgi?id=79932
+ <rdar://problem/9274953>
+
+ Reviewed by Simon Fraser.
+
+ Portions of patch by Nikolas Zimmermann and Mustafizur Rahaman.
+
+ Add wkCGPathAddRoundedRect.
+
+ * WebCoreSupport/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface):
+
+2012-03-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert hasSpellingMarker to use Internals interface.
+ https://bugs.webkit.org/show_bug.cgi?id=81300
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove hasSpellingMarker support, since it can support in the cross-port way
+ through the Internals interface.
+
+ * WebKit.order:
+ * WebView/WebFrame.mm:
+ * WebView/WebFramePrivate.h:
+
+2012-03-19 Adam Barth <abarth@webkit.org>
+
+ Remove support for "magic" iframe
+ https://bugs.webkit.org/show_bug.cgi?id=81590
+
+ Reviewed by Eric Seidel.
+
+ Remove FrameLoaderClient methods that no longer exist.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+
+2012-03-19 Enrica Casucci <enrica@apple.com>
+
+ WebKit2: create sandbox extensions for files that are dropped in an input control.
+ https://bugs.webkit.org/show_bug.cgi?id=81153
+ <rdar://problem/11031207>
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/WebDragClient.mm:
+ (WebDragClient::willPerformDragDestinationAction): Avoid calling the delegate with the new drag action.
+ We want to avoid any unwanted side effects for the WebKit clients.
+
+2012-03-19 Emil A Eklund <eae@chromium.org>
+
+ [mac/chromium] Change platform code to use pixelSnappedRect methods
+ https://bugs.webkit.org/show_bug.cgi?id=81016
+
+ Reviewed by Eric Seidel.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView actualVisibleRectInWindow]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _getVisibleRect:]):
+ (-[WebFrame _computePageRectsWithPrintScaleFactor:pageSize:]):
+ * WebView/WebView.mm:
+ (-[WebView _dashboardRegions]):
+ (-[WebView trackedRepaintRects]):
+
+2012-03-16 Brady Eidson <beidson@apple.com>
+
+ <rdar://problem/11027997> and https://bugs.webkit.org/show_bug.cgi?id=81412
+ REGRESSION (r107435) Copy a link and paste to Mail: Nothing is pasted
+
+ Reviewed by Geoff Garen.
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::setInsertionPasteboard):
+ * WebCoreSupport/WebPlatformStrategies.h:
+ (WebPlatformStrategies):
+ * WebCoreSupport/WebPlatformStrategies.mm:
+ (WebPlatformStrategies::url):
+
+2012-03-08 Jer Noble <jer.noble@apple.com>
+
+ Support W3C Full Screen API proposal
+ https://bugs.webkit.org/show_bug.cgi?id=80660
+
+ Reviewed by Alexey Proskuryakov.
+
+ Allow full screen elements to access the keyboard.
+
+ * WebView/WebView.mm:
+ (-[WebView _supportsFullScreenForElement:WebCore::withKeyboard:]):
+
+2012-03-07 Jon Lee <jonlee@apple.com>
+
+ Move NotificationContents into Notification
+ https://bugs.webkit.org/show_bug.cgi?id=80487
+ <rdar://problem/10965519>
+
+ Reviewed by Jian Li.
+
+ * WebView/WebNotification.mm: Refactor to use accessor methods on Notification.
+ (-[WebNotification title]):
+ (-[WebNotification body]):
+
+2012-03-15 David Hyatt <hyatt@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=81258
+
+ Add a preference for enabling the new multi-column layout code that will be based on regions.
+
+ Reviewed by Beth Dakin.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences setRegionBasedColumnsEnabled:]):
+ (-[WebPreferences regionBasedColumnsEnabled]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
+2012-03-15 Brady Eidson <beidson@apple.com>
+
+ <rdar://problem/11036900> and https://bugs.webkit.org/show_bug.cgi?id=81079
+ REGRESSION(r107844): Clipboard API only remembers most recent data set on clipboard
+
+ Reviewed by Sam Weinig.
+
+ Add the non-destructive "addTypes" to supplement the destructive "setTypes"
+ * WebCoreSupport/WebPlatformStrategies.h:
+ * WebCoreSupport/WebPlatformStrategies.mm:
+ (WebPlatformStrategies::addTypes):
+
+2012-03-14 Anders Carlsson <andersca@apple.com>
+
+ java/java-and-plugins.html test failing
+ https://bugs.webkit.org/show_bug.cgi?id=81188
+ <rdar://problem/11048657>
+
+ Reviewed by Sam Weinig.
+
+ When we're marshaling JSObjects that wrap plug-in objects, make sure to check that the
+ current plug-in instance is the same as the plug-in instance the object came from and don't
+ pass the unwrapped object ID if that is the case.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::getObjectID):
+ (WebKit::NetscapePluginInstanceProxy::addValueToArray):
+ (WebKit::NetscapePluginInstanceProxy::marshalValues):
+ * Plugins/Hosted/ProxyInstance.h:
+ (ProxyInstance):
+ (WebKit::ProxyInstance::instanceProxy):
+
+2012-03-14 Michael Saboff <msaboff@apple.com>
+
+ REGRESSION(r110383): ASSERTION failures in JSCell::finishCreation causing multiple tests to "crash" on the Lion Intel Debug Bots
+ https://bugs.webkit.org/show_bug.cgi?id=80993
+
+ Reviewed by Mark Rowe.
+
+ Moved $(BUILT_PRODUCTS_DIR)/usr/local/include to the front of HEADER_SEARCH_PATH
+ to fix builds given the wtf move.
+
+ * Configurations/WebKit.xcconfig:
+
+2012-03-13 Jon Lee <jonlee@apple.com>
+
+ Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
+ https://bugs.webkit.org/show_bug.cgi?id=80922
+ <rdar://problem/11035082>
+
+ Reviewed by Jian Li.
+
+ You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
+ LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
+ new API. Therefore, APIs that are common between the two will have:
+ #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+
+ This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
+ the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
+
+ Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+ * WebCoreSupport/WebNotificationClient.h:
+ * WebCoreSupport/WebNotificationClient.mm:
+ (WebNotificationClient::show):
+ (WebNotificationClient::cancel):
+ (WebNotificationClient::clearNotifications):
+ (WebNotificationClient::notificationObjectDestroyed):
+ (WebNotificationClient::notificationControllerDestroyed):
+ (WebNotificationClient::requestPermission):
+ (WebNotificationClient::checkPermission):
+ * WebView/WebNotification.mm:
+ (-[WebNotification title]):
+ (-[WebNotification body]):
+ (-[WebNotification replaceID]):
+ (-[WebNotification origin]):
+ (-[WebNotification notificationID]):
+ (-[WebNotification dispatchShowEvent]):
+ (-[WebNotification dispatchCloseEvent]):
+ (-[WebNotification dispatchClickEvent]):
+ (-[WebNotification dispatchErrorEvent]):
+ * WebView/WebNotificationInternal.h:
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+
+2012-03-13 Adam Barth <abarth@webkit.org> && Benjamin Poulain <bpoulain@apple.com>
+
+ Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
+ https://bugs.webkit.org/show_bug.cgi?id=78853
+
+ Reviewed by Adam Barth.
+
+ * Configurations/FeatureDefines.xcconfig:
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient):
+ * WebCoreSupport/WebGeolocationClient.mm:
+ (WebGeolocationClient::lastPosition):
+ * WebView/WebGeolocationPosition.mm:
+ (-[WebGeolocationPositionInternal initWithCoreGeolocationPosition:]):
+ (core):
+ (-[WebGeolocationPosition initWithTimestamp:latitude:longitude:accuracy:]):
+ * WebView/WebGeolocationPositionInternal.h:
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+ (-[WebView _geolocationDidChangePosition:]):
+ (-[WebView _geolocationDidFailWithError:]):
+
+2012-03-12 Antonio Gomes <agomes@rim.com>
+
+ Convert nodesFromRect tests to use Internals interface
+ https://bugs.webkit.org/show_bug.cgi?id=80886
+
+ Reviewed by Ryosuke Niwa.
+
+ Removed mac specific support for nodesFromRect for testing purposes only,
+ since it can work in a cross-port way through the Internals interface.
+
+ * WebKit.order:
+ * WebView/WebView.mm:
+ * WebView/WebViewPrivate.h:
+
+2012-03-13 Anders Carlsson <andersca@apple.com>
+
+ Remove a nonexistent WebUIDelegate method from WebUIDelegatePrivate.h
+ https://bugs.webkit.org/show_bug.cgi?id=81014
+
+ Reviewed by Sam Weinig.
+
+ Remove a plug-in halter related WebUIDelegate method.
+
+ * WebView/WebUIDelegatePrivate.h:
+
+2012-03-13 Shinya Kawanaka <shinyak@chromium.org>
+
+ REGRESSION: Spellcheck tests hit assertions on Mac.
+ https://bugs.webkit.org/show_bug.cgi?id=80883
+
+ Reviewed by Ryosuke Niwa.
+
+ The bug was caused by the closure object created in requestCheckingOfString accessing
+ request's member variables even though the request object is not an NSObject or allocated
+ in stack. This resulted in the closure not being able to access those variables when invoked.
+
+ Fixed the bug by making local copies of those member variables.
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::requestCheckingOfString):
+
2012-03-11 Timothy Hatcher <timothy@apple.com>
Update how the Web Inspector resources are loaded.
diff --git a/Source/WebKit/mac/Configurations/Base.xcconfig b/Source/WebKit/mac/Configurations/Base.xcconfig
index b62984744..e5c0d263b 100644
--- a/Source/WebKit/mac/Configurations/Base.xcconfig
+++ b/Source/WebKit/mac/Configurations/Base.xcconfig
@@ -27,7 +27,7 @@ COMPILER_SPECIFIC_WARNING_CFLAGS = $(COMPILER_SPECIFIC_WARNING_CFLAGS_$(TARGET_G
COMPILER_SPECIFIC_WARNING_CFLAGS_LLVM_COMPILER = -Wglobal-constructors -Wexit-time-destructors;
CLANG_WARN_CXX0X_EXTENSIONS = NO;
-DEBUG_INFORMATION_FORMAT = dwarf;
+DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DEBUGGING_SYMBOLS = default;
GCC_DYNAMIC_NO_PIC = NO;
diff --git a/Source/WebKit/mac/Configurations/DebugRelease.xcconfig b/Source/WebKit/mac/Configurations/DebugRelease.xcconfig
index f2e048581..eb9259b6d 100644
--- a/Source/WebKit/mac/Configurations/DebugRelease.xcconfig
+++ b/Source/WebKit/mac/Configurations/DebugRelease.xcconfig
@@ -46,6 +46,7 @@ MACOSX_DEPLOYMENT_TARGET_macosx_1080 = 10.8;
MACOSX_DEPLOYMENT_TARGET_macosx_1090 = 10.9;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
+DEBUG_INFORMATION_FORMAT = dwarf;
SECTORDER_FLAGS = ;
diff --git a/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig b/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
index 58a02f521..2dc145f36 100644
--- a/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
+++ b/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
@@ -31,24 +31,32 @@
// Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature.
-ENABLE_BLOB = $(ENABLE_BLOB_$(REAL_PLATFORM_NAME));
-ENABLE_BLOB_macosx = ENABLE_BLOB;
-
-ENABLE_CLIENT_BASED_GEOLOCATION = $(ENABLE_CLIENT_BASED_GEOLOCATION_$(REAL_PLATFORM_NAME));
-ENABLE_CLIENT_BASED_GEOLOCATION_macosx = ENABLE_CLIENT_BASED_GEOLOCATION;
-
+ENABLE_3D_RENDERING = ENABLE_3D_RENDERING;
+ENABLE_ACCELERATED_2D_CANVAS = ;
+ENABLE_ANIMATION_API = ;
+ENABLE_BLOB = ENABLE_BLOB;
+ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
+ENABLE_CSS_FILTERS = ENABLE_CSS_FILTERS;
+ENABLE_CSS_GRID_LAYOUT = ENABLE_CSS_GRID_LAYOUT;
ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(REAL_PLATFORM_NAME));
ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
-
-ENABLE_DATALIST = $(ENABLE_DATALIST_$(REAL_PLATFORM_NAME));
-ENABLE_DATALIST_macosx = ENABLE_DATALIST;
-
+ENABLE_DATALIST = ;
+ENABLE_DATA_TRANSFER_ITEMS = ;
+ENABLE_DETAILS = ENABLE_DETAILS;
+ENABLE_DEVICE_ORIENTATION = ;
+ENABLE_DIRECTORY_UPLOAD = ;
+ENABLE_FILE_SYSTEM = ;
ENABLE_FILTERS = $(ENABLE_FILTERS_$(REAL_PLATFORM_NAME));
ENABLE_FILTERS_macosx = ENABLE_FILTERS;
-
+ENABLE_FULLSCREEN_API = ENABLE_FULLSCREEN_API;
+ENABLE_GAMEPAD = ;
+ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
+ENABLE_HIGH_DPI_CANVAS = ENABLE_HIGH_DPI_CANVAS;
ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(REAL_PLATFORM_NAME));
ENABLE_ICONDATABASE_macosx = ENABLE_ICONDATABASE;
-
+ENABLE_INDEXED_DATABASE = ;
+ENABLE_INPUT_SPEECH = ;
+ENABLE_INPUT_TYPE_COLOR = ;
ENABLE_INPUT_TYPE_DATE = $(ENABLE_INPUT_TYPE_DATE_$(REAL_PLATFORM_NAME));
ENABLE_INPUT_TYPE_DATE_iphoneos = ENABLE_INPUT_TYPE_DATE;
ENABLE_INPUT_TYPE_DATE_iphonesimulator = ENABLE_INPUT_TYPE_DATE;
@@ -67,31 +75,14 @@ ENABLE_INPUT_TYPE_TIME_iphonesimulator = ENABLE_INPUT_TYPE_TIME;
ENABLE_INPUT_TYPE_WEEK = $(ENABLE_INPUT_TYPE_WEEK_$(REAL_PLATFORM_NAME));
ENABLE_INPUT_TYPE_WEEK_iphoneos = ENABLE_INPUT_TYPE_WEEK;
ENABLE_INPUT_TYPE_WEEK_iphonesimulator = ENABLE_INPUT_TYPE_WEEK;
-
-ENABLE_SVG_DOM_OBJC_BINDINGS = $(ENABLE_SVG_DOM_OBJC_BINDINGS_$(REAL_PLATFORM_NAME));
-ENABLE_SVG_DOM_OBJC_BINDINGS_macosx = ENABLE_SVG_DOM_OBJC_BINDINGS;
-
-ENABLE_3D_RENDERING = ENABLE_3D_RENDERING;
-ENABLE_ACCELERATED_2D_CANVAS = ;
-ENABLE_ANIMATION_API = ;
-ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
-ENABLE_CSS_FILTERS = ENABLE_CSS_FILTERS;
-ENABLE_CSS_GRID_LAYOUT = ENABLE_CSS_GRID_LAYOUT;
-ENABLE_CSS_SHADERS = ENABLE_CSS_SHADERS;
-ENABLE_DATA_TRANSFER_ITEMS = ;
-ENABLE_DETAILS = ENABLE_DETAILS;
-ENABLE_DEVICE_ORIENTATION = ;
-ENABLE_DIRECTORY_UPLOAD = ;
-ENABLE_FILE_SYSTEM = ;
-ENABLE_FULLSCREEN_API = ENABLE_FULLSCREEN_API;
-ENABLE_GAMEPAD = ;
-ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
-ENABLE_INDEXED_DATABASE = ;
-ENABLE_INPUT_COLOR = ;
-ENABLE_INPUT_SPEECH = ;
ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER;
-ENABLE_LEGACY_NOTIFICATIONS = ENABLE_LEGACY_NOTIFICATIONS;
+ENABLE_LEGACY_NOTIFICATIONS = $(ENABLE_LEGACY_NOTIFICATIONS_$(REAL_PLATFORM_NAME));
+ENABLE_LEGACY_NOTIFICATIONS_macosx = $(ENABLE_LEGACY_NOTIFICATIONS_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+ENABLE_LEGACY_NOTIFICATIONS_macosx_1070 = ;
+ENABLE_LEGACY_NOTIFICATIONS_macosx_1080 = ENABLE_LEGACY_NOTIFICATIONS;
+ENABLE_LEGACY_NOTIFICATIONS_macosx_1090 = ENABLE_LEGACY_NOTIFICATIONS;
ENABLE_LINK_PREFETCH = ;
+ENABLE_LINK_PRERENDER = ;
ENABLE_MATHML = ENABLE_MATHML;
ENABLE_MEDIA_SOURCE = ;
ENABLE_MEDIA_STATISTICS = ;
@@ -99,13 +90,11 @@ ENABLE_METER_TAG = ENABLE_METER_TAG;
ENABLE_MHTML = ;
ENABLE_MICRODATA = ;
ENABLE_MUTATION_OBSERVERS = ENABLE_MUTATION_OBSERVERS;
-
ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(REAL_PLATFORM_NAME));
ENABLE_NOTIFICATIONS_macosx = $(ENABLE_NOTIFICATIONS_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-ENABLE_NOTIFICATIONS_macosx_1070 = ENABLE_NOTIFICATIONS;
+ENABLE_NOTIFICATIONS_macosx_1070 = ;
ENABLE_NOTIFICATIONS_macosx_1080 = ENABLE_NOTIFICATIONS;
ENABLE_NOTIFICATIONS_macosx_1090 = ENABLE_NOTIFICATIONS;
-
ENABLE_PAGE_VISIBILITY_API = ;
ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
ENABLE_QUOTA = ;
@@ -117,14 +106,14 @@ ENABLE_SHARED_WORKERS = ENABLE_SHARED_WORKERS;
ENABLE_SQL_DATABASE = ENABLE_SQL_DATABASE;
ENABLE_STYLE_SCOPED = ;
ENABLE_SVG = ENABLE_SVG;
+ENABLE_SVG_DOM_OBJC_BINDINGS = $(ENABLE_SVG_DOM_OBJC_BINDINGS_$(REAL_PLATFORM_NAME));
+ENABLE_SVG_DOM_OBJC_BINDINGS_macosx = ENABLE_SVG_DOM_OBJC_BINDINGS;
ENABLE_SVG_FONTS = ENABLE_SVG_FONTS;
ENABLE_TEXT_NOTIFICATIONS_ONLY = ENABLE_TEXT_NOTIFICATIONS_ONLY;
ENABLE_TOUCH_ICON_LOADING = ;
ENABLE_VIDEO = ENABLE_VIDEO;
-
ENABLE_VIDEO_TRACK = $(ENABLE_VIDEO_TRACK_$(REAL_PLATFORM_NAME));
ENABLE_VIDEO_TRACK_macosx = ENABLE_VIDEO_TRACK;
-
ENABLE_WEBGL = ENABLE_WEBGL;
ENABLE_WEB_AUDIO = ENABLE_WEB_AUDIO;
ENABLE_WEB_SOCKETS = ENABLE_WEB_SOCKETS;
@@ -132,4 +121,4 @@ ENABLE_WEB_TIMING = ;
ENABLE_WORKERS = ENABLE_WORKERS;
ENABLE_XSLT = ENABLE_XSLT;
-FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_SHADERS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_COLOR) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_TAG) $(ENABLE_MICRODATA) $(ENABLE_MUTATION_OBSERVERS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_QUOTA) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SVG) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_TEXT_NOTIFICATIONS_ONLY) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_SHADERS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LINK_PREFETCH) $(ENABLE_LINK_PRERENDER) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_TAG) $(ENABLE_MICRODATA) $(ENABLE_MUTATION_OBSERVERS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_QUOTA) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SVG) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_TEXT_NOTIFICATIONS_ONLY) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XSLT);
diff --git a/Source/WebKit/mac/Configurations/Version.xcconfig b/Source/WebKit/mac/Configurations/Version.xcconfig
index be7e0399c..011c8bc6a 100644
--- a/Source/WebKit/mac/Configurations/Version.xcconfig
+++ b/Source/WebKit/mac/Configurations/Version.xcconfig
@@ -22,7 +22,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MAJOR_VERSION = 536;
-MINOR_VERSION = 3;
+MINOR_VERSION = 11;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/Source/WebKit/mac/Configurations/WebKit.xcconfig b/Source/WebKit/mac/Configurations/WebKit.xcconfig
index 41ab11f37..a3b4eae1e 100644
--- a/Source/WebKit/mac/Configurations/WebKit.xcconfig
+++ b/Source/WebKit/mac/Configurations/WebKit.xcconfig
@@ -50,7 +50,7 @@ STAGED_FRAMEWORKS_SEARCH_PATH_YES = $(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/StagedFram
GCC_PREFIX_HEADER = mac/WebKitPrefix.h;
GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(FEATURE_DEFINES) FRAMEWORK_NAME=WebKit WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST $(GCC_PREPROCESSOR_DEFINITIONS);
-HEADER_SEARCH_PATHS = $(WEBCORE_PRIVATE_HEADERS_DIR)/ForwardingHeaders $(WEBCORE_PRIVATE_HEADERS_DIR)/icu $(WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH) "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit" $(HEADER_SEARCH_PATHS);
+HEADER_SEARCH_PATHS = $(WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH) $(WEBCORE_PRIVATE_HEADERS_DIR)/ForwardingHeaders $(WEBCORE_PRIVATE_HEADERS_DIR)/icu "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit" $(HEADER_SEARCH_PATHS);
INFOPLIST_FILE = mac/Info.plist;
INSTALL_PATH = $(INSTALL_PATH_$(REAL_PLATFORM_NAME));
INSTALL_PATH_iphoneos = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
diff --git a/Source/WebKit/mac/DOM/WebDOMOperations.mm b/Source/WebKit/mac/DOM/WebDOMOperations.mm
index d3b254500..e6e6d3a2c 100644
--- a/Source/WebKit/mac/DOM/WebDOMOperations.mm
+++ b/Source/WebKit/mac/DOM/WebDOMOperations.mm
@@ -131,7 +131,7 @@ bool WebFrameFilter::shouldIncludeSubframe(Frame* frame) const
- (NSRect)_renderRect:(bool *)isReplaced
{
- return NSRect(core(self)->renderRect(isReplaced));
+ return NSRect(core(self)->pixelSnappedRenderRect(isReplaced));
}
@end
diff --git a/Source/WebKit/mac/History/WebHistory.mm b/Source/WebKit/mac/History/WebHistory.mm
index 11b3fede3..6964fc949 100644
--- a/Source/WebKit/mac/History/WebHistory.mm
+++ b/Source/WebKit/mac/History/WebHistory.mm
@@ -68,6 +68,10 @@ private:
Vector<int> m_dateKeys;
};
+@interface WebHistory ()
+- (void)_sendNotification:(NSString *)name entries:(NSArray *)entries;
+@end
+
@interface WebHistoryPrivate : NSObject {
@private
NSMutableDictionary *_entriesByURL;
@@ -86,6 +90,7 @@ private:
- (BOOL)removeItem:(WebHistoryItem *)entry;
- (BOOL)removeItems:(NSArray *)entries;
- (BOOL)removeAllItems;
+- (void)rebuildHistoryByDayIfNeeded:(WebHistory *)webHistory;
- (NSArray *)orderedLastVisitedDays;
- (NSArray *)orderedItemsLastVisitedOnDay:(NSCalendarDate *)calendarDate;
@@ -343,6 +348,32 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date)
return YES;
}
+- (void)rebuildHistoryByDayIfNeeded:(WebHistory *)webHistory
+{
+ // We clear all the values to present a consistent state when sending the notifications.
+ // We keep a reference to the entries for rebuilding the history after the notification.
+ Vector <RetainPtr<NSMutableArray> > entryArrays;
+ copyValuesToVector(*_entriesByDate, entryArrays);
+ _entriesByDate->clear();
+
+ NSMutableDictionary *entriesByURL = _entriesByURL;
+ _entriesByURL = nil;
+
+ [_orderedLastVisitedDays release];
+ _orderedLastVisitedDays = nil;
+
+ NSArray *allEntries = [entriesByURL allValues];
+ [webHistory _sendNotification:WebHistoryAllItemsRemovedNotification entries:allEntries];
+
+ // Next, we rebuild the history, restore the states, and notify the clients.
+ _entriesByURL = entriesByURL;
+ for (size_t dayIndex = 0; dayIndex < entryArrays.size(); ++dayIndex) {
+ for (WebHistoryItem *entry in (entryArrays[dayIndex]).get())
+ [self addItemToDateCaches:entry];
+ }
+ [webHistory _sendNotification:WebHistoryItemsAddedNotification entries:allEntries];
+}
+
- (BOOL)removeItem:(WebHistoryItem *)entry
{
NSString *URLString = [entry URLString];
@@ -662,21 +693,41 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date)
PageGroup::removeAllVisitedLinks();
}
+- (void)timeZoneChanged:(NSNotification *)notification
+{
+ [_historyPrivate rebuildHistoryByDayIfNeeded:self];
+}
+
- (id)init
{
self = [super init];
if (!self)
return nil;
_historyPrivate = [[WebHistoryPrivate alloc] init];
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(timeZoneChanged:)
+ name:NSSystemTimeZoneDidChangeNotification
+ object:nil];
return self;
}
- (void)dealloc
{
+ [[NSNotificationCenter defaultCenter] removeObserver:self
+ name:NSSystemTimeZoneDidChangeNotification
+ object:nil];
[_historyPrivate release];
[super dealloc];
}
+- (void)finalize
+{
+ [[NSNotificationCenter defaultCenter] removeObserver:self
+ name:NSSystemTimeZoneDidChangeNotification
+ object:nil];
+ [super finalize];
+}
+
// MARK: MODIFYING CONTENTS
- (void)_sendNotification:(NSString *)name entries:(NSArray *)entries
diff --git a/Source/WebKit/mac/MigrateHeaders.make b/Source/WebKit/mac/MigrateHeaders.make
index 0f8554202..fd6a1f523 100644
--- a/Source/WebKit/mac/MigrateHeaders.make
+++ b/Source/WebKit/mac/MigrateHeaders.make
@@ -152,6 +152,7 @@ all : \
$(PUBLIC_HEADERS_DIR)/DOMNamedNodeMap.h \
$(PUBLIC_HEADERS_DIR)/DOMNode.h \
$(INTERNAL_HEADERS_DIR)/DOMNodeInternal.h \
+ $(PRIVATE_HEADERS_DIR)/DOMNodePrivate.h \
$(PUBLIC_HEADERS_DIR)/DOMNodeFilter.h \
$(PUBLIC_HEADERS_DIR)/DOMNodeIterator.h \
$(PUBLIC_HEADERS_DIR)/DOMNodeList.h \
diff --git a/Source/WebKit/mac/Misc/WebKitVersionChecks.h b/Source/WebKit/mac/Misc/WebKitVersionChecks.h
index 9d5966514..a77242470 100644
--- a/Source/WebKit/mac/Misc/WebKitVersionChecks.h
+++ b/Source/WebKit/mac/Misc/WebKitVersionChecks.h
@@ -56,6 +56,7 @@
#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
#define WEBKIT_FIRST_VERSION_WITH_GET_MATCHED_CSS_RULES_RESTRICTIONS 0x02160B00 // 534.11.0
+#define WEBKIT_FIRST_VERSION_WITH_CSS_ATTRIBUTE_SETTERS_IGNORING_PRIORITY 0x02170D00 // 535.13.0
#ifdef __cplusplus
extern "C" {
diff --git a/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h b/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
index 4e5945638..64e37e162 100644
--- a/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
+++ b/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
@@ -48,7 +48,7 @@ public:
void pluginHostDied(NetscapePluginHostProxy*);
- static void createPropertyListFile(const WTF::String& pluginPath, cpu_type_t pluginArchitecture);
+ void createPropertyListFile(const String& pluginPath, cpu_type_t pluginArchitecture, const String& bundleIdentifier);
void didCreateWindow();
diff --git a/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm b/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
index ce40f4802..e49d50f4b 100644
--- a/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
+++ b/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
@@ -69,15 +69,15 @@ NetscapePluginHostManager::~NetscapePluginHostManager()
NetscapePluginHostProxy* NetscapePluginHostManager::hostForPlugin(const WTF::String& pluginPath, cpu_type_t pluginArchitecture, const String& bundleIdentifier)
{
- pair<PluginHostMap::iterator, bool> result = m_pluginHosts.add(pluginPath, 0);
+ PluginHostMap::AddResult result = m_pluginHosts.add(pluginPath, 0);
// The package was already in the map, just return it.
- if (!result.second)
- return result.first->second;
+ if (!result.isNewEntry)
+ return result.iterator->second;
mach_port_t clientPort;
if (mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &clientPort) != KERN_SUCCESS) {
- m_pluginHosts.remove(result.first);
+ m_pluginHosts.remove(result.iterator);
return 0;
}
@@ -85,7 +85,7 @@ NetscapePluginHostProxy* NetscapePluginHostManager::hostForPlugin(const WTF::Str
ProcessSerialNumber pluginHostPSN;
if (!spawnPluginHost(pluginPath, pluginArchitecture, clientPort, pluginHostPort, pluginHostPSN)) {
mach_port_destroy(mach_task_self(), clientPort);
- m_pluginHosts.remove(result.first);
+ m_pluginHosts.remove(result.iterator);
return 0;
}
@@ -95,7 +95,7 @@ NetscapePluginHostProxy* NetscapePluginHostManager::hostForPlugin(const WTF::Str
NetscapePluginHostProxy* hostProxy = new NetscapePluginHostProxy(clientPort, pluginHostPort, pluginHostPSN, shouldCacheMissingPropertiesAndMethods);
- result.first->second = hostProxy;
+ result.iterator->second = hostProxy;
return hostProxy;
}
@@ -272,31 +272,13 @@ PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePl
return instance.release();
}
-void NetscapePluginHostManager::createPropertyListFile(const String& pluginPath, cpu_type_t pluginArchitecture)
-{
- NSString *pluginHostAppPath = [[NSBundle bundleWithIdentifier:@"com.apple.WebKit"] pathForAuxiliaryExecutable:pluginHostAppName];
- NSString *pluginHostAppExecutablePath = [[NSBundle bundleWithPath:pluginHostAppPath] executablePath];
- NSString *bundlePath = pluginPath;
+void NetscapePluginHostManager::createPropertyListFile(const String& pluginPath, cpu_type_t pluginArchitecture, const String& bundleIdentifier)
+{
+ NetscapePluginHostProxy* hostProxy = hostForPlugin(pluginPath, pluginArchitecture, bundleIdentifier);
+ if (!hostProxy)
+ return;
- pid_t pid;
- posix_spawnattr_t attr;
- posix_spawnattr_init(&attr);
-
- // Set the architecture.
- size_t ocount = 0;
- int cpuTypes[] = { pluginArchitecture };
- posix_spawnattr_setbinpref_np(&attr, 1, cpuTypes, &ocount);
-
- // Spawn the plug-in host and tell it to call the registration function.
- const char* args[] = { [pluginHostAppExecutablePath fileSystemRepresentation], "-createPluginMIMETypesPreferences", [bundlePath fileSystemRepresentation], 0 };
-
- int result = posix_spawn(&pid, args[0], 0, &attr, const_cast<char* const*>(args), 0);
- posix_spawnattr_destroy(&attr);
-
- if (!result && pid > 0) {
- // Wait for the process to finish.
- while (waitpid(pid, 0, 0) == -1) { }
- }
+ _WKPHCreatePluginMIMETypesPreferences(hostProxy->port());
}
void NetscapePluginHostManager::didCreateWindow()
diff --git a/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
index 609ccf0cc..40f24c3c0 100644
--- a/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
+++ b/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
@@ -914,10 +914,7 @@ bool NetscapePluginInstanceProxy::invoke(uint32_t objectID, const Identifier& me
MarkedArgumentBuffer argList;
demarshalValues(exec, argumentsData, argumentsLength, argList);
- RefPtr<JSGlobalData> globalData = pluginWorld()->globalData();
- globalData->timeoutChecker.start();
JSValue value = call(exec, function, callType, callData, object->methodTable()->toThisObject(object, exec), argList);
- globalData->timeoutChecker.stop();
marshalValue(exec, value, resultData, resultLength);
exec->clearException();
@@ -949,10 +946,7 @@ bool NetscapePluginInstanceProxy::invokeDefault(uint32_t objectID, data_t argume
MarkedArgumentBuffer argList;
demarshalValues(exec, argumentsData, argumentsLength, argList);
- RefPtr<JSGlobalData> globalData = pluginWorld()->globalData();
- globalData->timeoutChecker.start();
JSValue value = call(exec, object, callType, callData, object->methodTable()->toThisObject(object, exec), argList);
- globalData->timeoutChecker.stop();
marshalValue(exec, value, resultData, resultLength);
exec->clearException();
@@ -985,10 +979,7 @@ bool NetscapePluginInstanceProxy::construct(uint32_t objectID, data_t argumentsD
MarkedArgumentBuffer argList;
demarshalValues(exec, argumentsData, argumentsLength, argList);
- RefPtr<JSGlobalData> globalData = pluginWorld()->globalData();
- globalData->timeoutChecker.start();
JSValue value = JSC::construct(exec, object, constructType, constructData, argList);
- globalData->timeoutChecker.stop();
marshalValue(exec, value, resultData, resultLength);
exec->clearException();
@@ -1252,6 +1243,23 @@ bool NetscapePluginInstanceProxy::enumerate(uint32_t objectID, data_t& resultDat
return true;
}
+static bool getObjectID(NetscapePluginInstanceProxy* pluginInstanceProxy, JSObject* object, uint64_t& objectID)
+{
+ if (object->classInfo() != &ProxyRuntimeObject::s_info)
+ return false;
+
+ ProxyRuntimeObject* runtimeObject = static_cast<ProxyRuntimeObject*>(object);
+ ProxyInstance* instance = runtimeObject->getInternalProxyInstance();
+ if (!instance)
+ return false;
+
+ if (instance->instanceProxy() != pluginInstanceProxy)
+ return false;
+
+ objectID = instance->objectID();
+ return true;
+}
+
void NetscapePluginInstanceProxy::addValueToArray(NSMutableArray *array, ExecState* exec, JSValue value)
{
JSLock lock(SilenceAssertionsOnly);
@@ -1269,12 +1277,10 @@ void NetscapePluginInstanceProxy::addValueToArray(NSMutableArray *array, ExecSta
[array addObject:[NSNumber numberWithInt:NullValueType]];
else if (value.isObject()) {
JSObject* object = asObject(value);
- if (object->classInfo() == &ProxyRuntimeObject::s_info) {
- ProxyRuntimeObject* runtimeObject = static_cast<ProxyRuntimeObject*>(object);
- if (ProxyInstance* instance = runtimeObject->getInternalProxyInstance()) {
- [array addObject:[NSNumber numberWithInt:NPObjectValueType]];
- [array addObject:[NSNumber numberWithInt:instance->objectID()]];
- }
+ uint64_t objectID;
+ if (getObjectID(this, object, objectID)) {
+ [array addObject:[NSNumber numberWithInt:NPObjectValueType]];
+ [array addObject:[NSNumber numberWithInt:objectID]];
} else {
[array addObject:[NSNumber numberWithInt:JSObjectValueType]];
[array addObject:[NSNumber numberWithInt:m_localObjects.idForObject(exec->globalData(), object)]];
diff --git a/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.h b/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.h
index 65f3a513c..b999fa9e1 100644
--- a/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.h
+++ b/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.h
@@ -52,6 +52,9 @@ public:
JSC::JSValue fieldValue(JSC::ExecState*, const JSC::Bindings::Field*) const;
void setFieldValue(JSC::ExecState*, const JSC::Bindings::Field*, JSC::JSValue) const;
+
+ NetscapePluginInstanceProxy* instanceProxy() { return m_instanceProxy; }
+
void invalidate();
uint32_t objectID() const { return m_objectID; }
diff --git a/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm b/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
index a39669ca5..09443dc16 100644
--- a/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
+++ b/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
@@ -376,13 +376,13 @@ MethodList ProxyInstance::methodsNamed(const Identifier& identifier)
return MethodList();
// Add a new entry to the map unless an entry was added while we were in waitForReply.
- pair<MethodMap::iterator, bool> mapAddResult = m_methods.add(identifier.impl(), 0);
- if (mapAddResult.second && reply->m_result)
- mapAddResult.first->second = new ProxyMethod(methodName);
+ MethodMap::AddResult mapAddResult = m_methods.add(identifier.impl(), 0);
+ if (mapAddResult.isNewEntry && reply->m_result)
+ mapAddResult.iterator->second = new ProxyMethod(methodName);
MethodList methodList;
- if (mapAddResult.first->second)
- methodList.append(mapAddResult.first->second);
+ if (mapAddResult.iterator->second)
+ methodList.append(mapAddResult.iterator->second);
return methodList;
}
@@ -412,10 +412,10 @@ Field* ProxyInstance::fieldNamed(const Identifier& identifier)
return 0;
// Add a new entry to the map unless an entry was added while we were in waitForReply.
- pair<FieldMap::iterator, bool> mapAddResult = m_fields.add(identifier.impl(), 0);
- if (mapAddResult.second && reply->m_result)
- mapAddResult.first->second = new ProxyField(propertyName);
- return mapAddResult.first->second;
+ FieldMap::AddResult mapAddResult = m_fields.add(identifier.impl(), 0);
+ if (mapAddResult.isNewEntry && reply->m_result)
+ mapAddResult.iterator->second = new ProxyField(propertyName);
+ return mapAddResult.iterator->second;
}
JSC::JSValue ProxyInstance::fieldValue(ExecState* exec, const Field* field) const
diff --git a/Source/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs b/Source/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs
index fa808acd5..ecf01b373 100644
--- a/Source/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs
+++ b/Source/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs
@@ -31,6 +31,7 @@ serverprefix WK;
userprefix _WK;
routine PHCheckInWithPluginHost(pluginHostPort :mach_port_t;
+ ServerAuditToken token :audit_token_t;
options :plist_bytes_t;
clientPort :mach_port_make_send_t;
clientPSNHigh :uint32_t;
@@ -245,3 +246,5 @@ simpleroutine PHPluginInstanceSnapshot(pluginHostPort :mach_port_t;
requestID :uint32_t;
width :uint32_t;
height :uint32_t);
+
+routine PHCreatePluginMIMETypesPreferences(pluginHostPort :mach_port_t);
diff --git a/Source/WebKit/mac/Plugins/Hosted/WebTextInputWindowController.m b/Source/WebKit/mac/Plugins/Hosted/WebTextInputWindowController.m
index 8b59d34c3..dc9f4a7fc 100644
--- a/Source/WebKit/mac/Plugins/Hosted/WebTextInputWindowController.m
+++ b/Source/WebKit/mac/Plugins/Hosted/WebTextInputWindowController.m
@@ -29,6 +29,23 @@
#import <WebKitSystemInterface.h>
+@interface WebTextInputView : NSTextView {
+}
+@end
+
+@implementation WebTextInputView
+
+- (NSArray *)validAttributesForMarkedText
+{
+ // Let TSM know that a bottom input window would be created for marked text.
+ NSArray *regularAttributes = [super validAttributesForMarkedText];
+ NSMutableArray *floatingWindowAttributes = [NSMutableArray arrayWithArray:regularAttributes];
+ [floatingWindowAttributes addObject:@"__NSUsesFloatingInputWindow"];
+ return floatingWindowAttributes;
+}
+
+@end
+
@interface WebTextInputPanel : NSPanel {
NSTextView *_inputTextView;
}
@@ -63,7 +80,7 @@
[self setFrame:frame display:NO];
- _inputTextView = [[NSTextView alloc] initWithFrame:[self.contentView frame]];
+ _inputTextView = [[WebTextInputView alloc] initWithFrame:[self.contentView frame]];
_inputTextView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable | NSViewMaxXMargin | NSViewMinXMargin | NSViewMaxYMargin | NSViewMinYMargin;
NSScrollView* scrollView = [[NSScrollView alloc] initWithFrame:[self.contentView frame]];
@@ -94,6 +111,7 @@
*string = nil;
// Let TSM know that a bottom input window would be created for marked text.
+ // FIXME: Can be removed once we can rely on __NSUsesFloatingInputWindow (or a better API) being available everywhere.
EventRef carbonEvent = (EventRef)[event eventRef];
if (carbonEvent) {
Boolean ignorePAH = true;
diff --git a/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index 66486fea3..85d7aba42 100644
--- a/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -875,7 +875,7 @@ using namespace WebCore;
if (!frameView)
return NSZeroRect;
- IntRect widgetRect = renderer->absoluteClippedOverflowRect();
+ IntRect widgetRect = renderer->pixelSnappedAbsoluteClippedOverflowRect();
widgetRect = frameView->contentsToWindow(widgetRect);
return intersection(toRenderWidget(renderer)->windowClipRect(), widgetRect);
}
diff --git a/Source/WebKit/mac/Plugins/WebNetscapePluginPackage.mm b/Source/WebKit/mac/Plugins/WebNetscapePluginPackage.mm
index 5bcff249f..533b53975 100644
--- a/Source/WebKit/mac/Plugins/WebNetscapePluginPackage.mm
+++ b/Source/WebKit/mac/Plugins/WebNetscapePluginPackage.mm
@@ -321,7 +321,7 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
- (void)createPropertyListFile
{
- NetscapePluginHostManager::createPropertyListFile(path, pluginHostArchitecture);
+ NetscapePluginHostManager::shared().createPropertyListFile(path, pluginHostArchitecture, [self bundleIdentifier]);
}
#endif
diff --git a/Source/WebKit/mac/WebCoreSupport/CorrectionPanel.h b/Source/WebKit/mac/WebCoreSupport/CorrectionPanel.h
index 187a0a8ce..cf6c2e448 100644
--- a/Source/WebKit/mac/WebCoreSupport/CorrectionPanel.h
+++ b/Source/WebKit/mac/WebCoreSupport/CorrectionPanel.h
@@ -26,11 +26,12 @@
#ifndef CorrectionPanel_h
#define CorrectionPanel_h
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
#import <AppKit/NSSpellChecker.h>
-#import <WebCore/SpellingCorrectionController.h>
+#import <WebCore/AlternativeTextClient.h>
#import <wtf/RetainPtr.h>
+#if USE(AUTOCORRECTION_PANEL)
+
@class WebView;
class CorrectionPanel {
@@ -38,21 +39,21 @@ class CorrectionPanel {
public:
CorrectionPanel();
~CorrectionPanel();
- void show(WebView*, WebCore::CorrectionPanelInfo::PanelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
- String dismiss(WebCore::ReasonForDismissingCorrectionPanel);
+ void show(WebView*, WebCore::AlternativeTextType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
+ String dismiss(WebCore::ReasonForDismissingAlternativeText);
static void recordAutocorrectionResponse(WebView*, NSCorrectionResponse, const String& replacedString, const String& replacementString);
private:
bool isShowing() const { return m_view; }
- String dismissInternal(WebCore::ReasonForDismissingCorrectionPanel, bool dismissingExternally);
+ String dismissInternal(WebCore::ReasonForDismissingAlternativeText, bool dismissingExternally);
void handleAcceptedReplacement(NSString* acceptedReplacement, NSString* replaced, NSString* proposedReplacement, NSCorrectionIndicatorType);
bool m_wasDismissedExternally;
- WebCore::ReasonForDismissingCorrectionPanel m_reasonForDismissing;
+ WebCore::ReasonForDismissingAlternativeText m_reasonForDismissing;
RetainPtr<WebView> m_view;
RetainPtr<NSString> m_resultForDismissal;
};
-#endif // !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#endif // USE(AUTOCORRECTION_PANEL)
#endif // CorrectionPanel_h
diff --git a/Source/WebKit/mac/WebCoreSupport/CorrectionPanel.mm b/Source/WebKit/mac/WebCoreSupport/CorrectionPanel.mm
index e5c7e2ef6..6583cee66 100644
--- a/Source/WebKit/mac/WebCoreSupport/CorrectionPanel.mm
+++ b/Source/WebKit/mac/WebCoreSupport/CorrectionPanel.mm
@@ -27,17 +27,17 @@
#import "WebViewInternal.h"
#import "WebViewPrivate.h"
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if USE(AUTOCORRECTION_PANEL)
using namespace WebCore;
-static inline NSCorrectionIndicatorType correctionIndicatorType(CorrectionPanelInfo::PanelType panelType)
+static inline NSCorrectionIndicatorType correctionIndicatorType(AlternativeTextType alternativeTextType)
{
- switch (panelType) {
- case CorrectionPanelInfo::PanelTypeCorrection:
+ switch (alternativeTextType) {
+ case AlternativeTextTypeCorrection:
return NSCorrectionIndicatorTypeDefault;
- case CorrectionPanelInfo::PanelTypeReversion:
+ case AlternativeTextTypeReversion:
return NSCorrectionIndicatorTypeReversion;
- case CorrectionPanelInfo::PanelTypeSpellingSuggestions:
+ case AlternativeTextTypeSpellingSuggestions:
return NSCorrectionIndicatorTypeGuesses;
}
ASSERT_NOT_REACHED();
@@ -46,18 +46,18 @@ static inline NSCorrectionIndicatorType correctionIndicatorType(CorrectionPanelI
CorrectionPanel::CorrectionPanel()
: m_wasDismissedExternally(false)
- , m_reasonForDismissing(ReasonForDismissingCorrectionPanelIgnored)
+ , m_reasonForDismissing(ReasonForDismissingAlternativeTextIgnored)
{
}
CorrectionPanel::~CorrectionPanel()
{
- dismissInternal(ReasonForDismissingCorrectionPanelIgnored, false);
+ dismissInternal(ReasonForDismissingAlternativeTextIgnored, false);
}
-void CorrectionPanel::show(WebView* view, CorrectionPanelInfo::PanelType type, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
+void CorrectionPanel::show(WebView* view, AlternativeTextType type, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
{
- dismissInternal(ReasonForDismissingCorrectionPanelIgnored, false);
+ dismissInternal(ReasonForDismissingAlternativeTextIgnored, false);
if (!view)
return;
@@ -80,12 +80,12 @@ void CorrectionPanel::show(WebView* view, CorrectionPanelInfo::PanelType type, c
}];
}
-String CorrectionPanel::dismiss(ReasonForDismissingCorrectionPanel reason)
+String CorrectionPanel::dismiss(ReasonForDismissingAlternativeText reason)
{
return dismissInternal(reason, true);
}
-String CorrectionPanel::dismissInternal(ReasonForDismissingCorrectionPanel reason, bool dismissingExternally)
+String CorrectionPanel::dismissInternal(ReasonForDismissingAlternativeText reason, bool dismissingExternally)
{
if (!isShowing())
return String();
@@ -115,7 +115,7 @@ void CorrectionPanel::handleAcceptedReplacement(NSString* acceptedReplacement, N
if (acceptedReplacement)
[spellChecker recordResponse:NSCorrectionResponseAccepted toCorrection:acceptedReplacement forWord:replaced language:nil inSpellDocumentWithTag:documentTag];
else {
- if (!m_wasDismissedExternally || m_reasonForDismissing == ReasonForDismissingCorrectionPanelCancelled)
+ if (!m_wasDismissedExternally || m_reasonForDismissing == ReasonForDismissingAlternativeTextCancelled)
[spellChecker recordResponse:NSCorrectionResponseRejected toCorrection:proposedReplacement forWord:replaced language:nil inSpellDocumentWithTag:documentTag];
else
[spellChecker recordResponse:NSCorrectionResponseIgnored toCorrection:proposedReplacement forWord:replaced language:nil inSpellDocumentWithTag:documentTag];
@@ -137,5 +137,5 @@ void CorrectionPanel::handleAcceptedReplacement(NSString* acceptedReplacement, N
m_resultForDismissal.adoptNS([acceptedReplacement copy]);
}
-#endif // !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#endif //USE(AUTOCORRECTION_PANEL)
diff --git a/Source/WebKit/mac/WebCoreSupport/WebAlternativeTextClient.h b/Source/WebKit/mac/WebCoreSupport/WebAlternativeTextClient.h
new file mode 100644
index 000000000..5e66acaf7
--- /dev/null
+++ b/Source/WebKit/mac/WebCoreSupport/WebAlternativeTextClient.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#ifndef WebAlternativeTextClient_h
+#define WebAlternativeTextClient_h
+
+#import "CorrectionPanel.h"
+#import <WebCore/AlternativeTextClient.h>
+
+@class WebView;
+
+class WebAlternativeTextClient : public WebCore::AlternativeTextClient {
+public:
+ WebAlternativeTextClient(WebView *);
+ virtual ~WebAlternativeTextClient();
+ virtual void pageDestroyed() OVERRIDE;
+ virtual void showCorrectionAlternative(WebCore::AlternativeTextType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings) OVERRIDE;
+ virtual void dismissAlternative(WebCore::ReasonForDismissingAlternativeText) OVERRIDE;
+ virtual String dismissAlternativeSoon(WebCore::ReasonForDismissingAlternativeText) OVERRIDE;
+ virtual void recordAutocorrectionResponse(WebCore::AutocorrectionResponseType, const String& replacedString, const String& replacementString) OVERRIDE;
+private:
+ WebView* m_webView;
+#if USE(AUTOCORRECTION_PANEL)
+ CorrectionPanel m_correctionPanel;
+#endif
+};
+
+#endif // WebAlternativeTextClient_h
diff --git a/Source/WebKit/mac/WebCoreSupport/WebAlternativeTextClient.mm b/Source/WebKit/mac/WebCoreSupport/WebAlternativeTextClient.mm
new file mode 100644
index 000000000..f1a70fc54
--- /dev/null
+++ b/Source/WebKit/mac/WebCoreSupport/WebAlternativeTextClient.mm
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "WebAlternativeTextClient.h"
+
+using namespace WebCore;
+
+WebAlternativeTextClient::WebAlternativeTextClient(WebView* webView)
+: m_webView(webView)
+{
+}
+
+WebAlternativeTextClient::~WebAlternativeTextClient()
+{
+#if USE(AUTOCORRECTION_PANEL)
+ dismissAlternative(ReasonForDismissingAlternativeTextIgnored);
+#endif
+}
+
+void WebAlternativeTextClient::pageDestroyed()
+{
+ delete this;
+}
+
+void WebAlternativeTextClient::showCorrectionAlternative(AlternativeTextType type, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
+{
+#if USE(AUTOCORRECTION_PANEL)
+ m_correctionPanel.show(m_webView, type, boundingBoxOfReplacedString, replacedString, replacementString, alternativeReplacementStrings);
+#endif
+}
+
+void WebAlternativeTextClient::dismissAlternative(ReasonForDismissingAlternativeText reason)
+{
+#if USE(AUTOCORRECTION_PANEL)
+ m_correctionPanel.dismiss(reason);
+#endif
+}
+
+String WebAlternativeTextClient::dismissAlternativeSoon(ReasonForDismissingAlternativeText reason)
+{
+#if USE(AUTOCORRECTION_PANEL)
+ return m_correctionPanel.dismiss(reason);
+#else
+return String();
+#endif
+}
+
+void WebAlternativeTextClient::recordAutocorrectionResponse(AutocorrectionResponseType responseType, const String& replacedString, const String& replacementString)
+{
+#if USE(AUTOCORRECTION_PANEL)
+ NSCorrectionResponse response = responseType == AutocorrectionReverted ? NSCorrectionResponseReverted : NSCorrectionResponseEdited;
+CorrectionPanel::recordAutocorrectionResponse(m_webView, response, replacedString, replacementString);
+#endif
+}
diff --git a/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h b/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
index 46d1201d5..0576aff83 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
+++ b/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
@@ -173,11 +173,6 @@ public:
virtual void fullScreenRendererChanged(WebCore::RenderBox*) OVERRIDE;
#endif
- // FIXME: Remove once all ports are using client-based geolocation. https://bugs.webkit.org/show_bug.cgi?id=40373
- // For client-based geolocation, these two methods have moved to WebGeolocationClient. https://bugs.webkit.org/show_bug.cgi?id=50061
- virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*) OVERRIDE { }
- virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*) OVERRIDE { }
-
virtual bool selectItemWritingDirectionIsNatural() OVERRIDE;
virtual bool selectItemAlignmentFollowsMenuWritingDirection() OVERRIDE;
virtual bool hasOpenedPopup() const OVERRIDE;
diff --git a/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index fc3a1f2b4..98f5c5d1b 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -38,6 +38,7 @@
#import "WebFrameView.h"
#import "WebHTMLViewInternal.h"
#import "WebHistoryInternal.h"
+#import "WebKitFullScreenListener.h"
#import "WebKitPrefix.h"
#import "WebKitSystemInterface.h"
#import "WebNSURLRequestExtras.h"
@@ -128,18 +129,6 @@ NSString *WebConsoleMessageDebugMessageLevel = @"DebugMessageLevel";
using namespace WebCore;
-#if ENABLE(FULLSCREEN_API)
-
-@interface WebKitFullScreenListener : NSObject <WebKitFullScreenListener>
-{
- RefPtr<Element> _element;
-}
-
-- (id)initWithElement:(Element*)element;
-@end
-
-#endif
-
WebChromeClient::WebChromeClient(WebView *webView)
: m_webView(webView)
{
@@ -956,41 +945,4 @@ void WebChromeClient::fullScreenRendererChanged(RenderBox* renderer)
CallUIDelegate(m_webView, selector, (id)renderer);
}
-@implementation WebKitFullScreenListener
-
-- (id)initWithElement:(Element*)element
-{
- if (!(self = [super init]))
- return nil;
-
- _element = element;
- return self;
-}
-
-- (void)webkitWillEnterFullScreen
-{
- if (_element)
- _element->document()->webkitWillEnterFullScreenForElement(_element.get());
-}
-
-- (void)webkitDidEnterFullScreen
-{
- if (_element)
- _element->document()->webkitDidEnterFullScreenForElement(_element.get());
-}
-
-- (void)webkitWillExitFullScreen
-{
- if (_element)
- _element->document()->webkitWillExitFullScreenForElement(_element.get());
-}
-
-- (void)webkitDidExitFullScreen
-{
- if (_element)
- _element->document()->webkitDidExitFullScreenForElement(_element.get());
-}
-
-@end
-
#endif
diff --git a/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h b/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h
index 06fca8d0e..c91a219e1 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h
+++ b/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h
@@ -27,7 +27,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import "CorrectionPanel.h"
#import <WebCore/EditorClient.h>
#import <WebCore/TextCheckerClient.h>
#import <wtf/Forward.h>
@@ -136,12 +135,6 @@ public:
virtual void willSetInputMethodState() OVERRIDE;
virtual void setInputMethodState(bool enabled) OVERRIDE;
virtual void requestCheckingOfString(WebCore::SpellChecker*, const WebCore::TextCheckingRequest&) OVERRIDE;
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
- virtual void showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings) OVERRIDE;
- virtual void dismissCorrectionPanel(WebCore::ReasonForDismissingCorrectionPanel) OVERRIDE;
- virtual String dismissCorrectionPanelSoon(WebCore::ReasonForDismissingCorrectionPanel) OVERRIDE;
- virtual void recordAutocorrectionResponse(AutocorrectionResponseType, const String& replacedString, const String& replacementString) OVERRIDE;
-#endif
private:
void registerUndoOrRedoStep(PassRefPtr<WebCore::UndoStep>, bool isRedo);
WebEditorClient();
@@ -149,8 +142,4 @@ private:
WebView *m_webView;
RetainPtr<WebEditorUndoTarget> m_undoTarget;
bool m_haveUndoRedoOperations;
-
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
- CorrectionPanel m_correctionPanel;
-#endif
};
diff --git a/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm b/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm
index 4ffef315d..5ea3c55ea 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm
+++ b/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm
@@ -189,9 +189,6 @@ WebEditorClient::WebEditorClient(WebView *webView)
WebEditorClient::~WebEditorClient()
{
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
- dismissCorrectionPanel(ReasonForDismissingCorrectionPanelIgnored);
-#endif
}
bool WebEditorClient::isContinuousSpellCheckingEnabled()
@@ -375,7 +372,8 @@ DocumentFragment* WebEditorClient::documentFragmentFromAttributedString(NSAttrib
void WebEditorClient::setInsertionPasteboard(const String& pasteboardName)
{
- [m_webView _setInsertionPasteboard:[NSPasteboard pasteboardWithName:pasteboardName]];
+ NSPasteboard *pasteboard = pasteboardName.isEmpty() ? nil : [NSPasteboard pasteboardWithName:pasteboardName];
+ [m_webView _setInsertionPasteboard:pasteboard];
}
@@ -865,29 +863,6 @@ void WebEditorClient::updateSpellingUIWithGrammarString(const String& badGrammar
[[NSSpellChecker sharedSpellChecker] updateSpellingPanelWithGrammarString:badGrammarPhrase detail:grammarDetailDict];
}
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
-void WebEditorClient::showCorrectionPanel(CorrectionPanelInfo::PanelType panelType, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
-{
- m_correctionPanel.show(m_webView, panelType, boundingBoxOfReplacedString, replacedString, replacementString, alternativeReplacementStrings);
-}
-
-void WebEditorClient::dismissCorrectionPanel(ReasonForDismissingCorrectionPanel reasonForDismissing)
-{
- m_correctionPanel.dismiss(reasonForDismissing);
-}
-
-String WebEditorClient::dismissCorrectionPanelSoon(ReasonForDismissingCorrectionPanel reasonForDismissing)
-{
- return m_correctionPanel.dismiss(reasonForDismissing);
-}
-
-void WebEditorClient::recordAutocorrectionResponse(EditorClient::AutocorrectionResponseType responseType, const String& replacedString, const String& replacementString)
-{
- NSCorrectionResponse response = responseType == EditorClient::AutocorrectionReverted ? NSCorrectionResponseReverted : NSCorrectionResponseEdited;
- CorrectionPanel::recordAutocorrectionResponse(m_webView, response, replacedString, replacementString);
-}
-#endif
-
void WebEditorClient::updateSpellingUIWithMisspelledWord(const String& misspelledWord)
{
[[NSSpellChecker sharedSpellChecker] updateSpellingPanelWithMisspelledWord:misspelledWord];
@@ -966,7 +941,7 @@ void WebEditorClient::setInputMethodState(bool)
- (void)perform
{
- _sender->didCheck(_sequence, core(_results.get(), _types));
+ _sender->didCheckSucceeded(_sequence, core(_results.get(), _types));
}
@end
@@ -977,10 +952,12 @@ void WebEditorClient::requestCheckingOfString(WebCore::SpellChecker* sender, con
#ifndef BUILDING_ON_LEOPARD
NSRange range = NSMakeRange(0, request.text().length());
NSRunLoop* currentLoop = [NSRunLoop currentRunLoop];
+ int sequence = request.sequence();
+ TextCheckingTypeMask types = request.mask();
[[NSSpellChecker sharedSpellChecker] requestCheckingOfString:request.text() range:range types:NSTextCheckingAllSystemTypes options:0 inSpellDocumentWithTag:0
completionHandler:^(NSInteger, NSArray* results, NSOrthography*, NSInteger) {
[currentLoop performSelector:@selector(perform)
- target:[[[WebEditorSpellCheckResponder alloc] initWithSender:sender sequence:request.sequence() types:request.mask() results:results] autorelease]
+ target:[[[WebEditorSpellCheckResponder alloc] initWithSender:sender sequence:sequence types:types results:results] autorelease]
argument:nil order:0 modes:[NSArray arrayWithObject:NSDefaultRunLoopMode]];
}];
#endif
diff --git a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
index 11aeabdeb..3c1a40590 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
+++ b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
@@ -124,10 +124,9 @@ private:
virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&) OVERRIDE;
- virtual void dispatchWillSendSubmitEvent(WebCore::HTMLFormElement*) OVERRIDE { }
+ virtual void dispatchWillSendSubmitEvent(PassRefPtr<WebCore::FormState>) OVERRIDE { }
virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction, PassRefPtr<WebCore::FormState>) OVERRIDE;
- virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*) OVERRIDE;
virtual void revertToProvisionalState(WebCore::DocumentLoader*) OVERRIDE;
virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&) OVERRIDE;
virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int length) OVERRIDE;
@@ -198,8 +197,6 @@ 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) OVERRIDE;
- virtual void didTransferChildFrameToNewDocument(WebCore::Page* oldPage) OVERRIDE;
- virtual void transferLoadingResourceFromPage(WebCore::ResourceLoader*, const WebCore::ResourceRequest&, 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) OVERRIDE;
virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget) OVERRIDE;
diff --git a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index 8ff420c6a..b8ac274e9 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -766,15 +766,11 @@ void WebFrameLoaderClient::dispatchWillSubmitForm(FramePolicyFunction function,
for (size_t i = 0; i < size; ++i)
[dictionary setObject:textFieldValues[i].second forKey:textFieldValues[i].first];
- CallFormDelegate(getWebView(m_webFrame.get()), @selector(frame:sourceFrame:willSubmitForm:withValues:submissionListener:), m_webFrame.get(), kit(formState->sourceFrame()), kit(formState->form()), dictionary, setUpPolicyListener(function).get());
+ CallFormDelegate(getWebView(m_webFrame.get()), @selector(frame:sourceFrame:willSubmitForm:withValues:submissionListener:), m_webFrame.get(), kit(formState->sourceDocument()->frame()), kit(formState->form()), dictionary, setUpPolicyListener(function).get());
[dictionary release];
}
-void WebFrameLoaderClient::dispatchDidLoadMainResource(DocumentLoader* loader)
-{
-}
-
void WebFrameLoaderClient::revertToProvisionalState(DocumentLoader* loader)
{
[dataSource(loader) _revertToProvisionalState];
@@ -1386,22 +1382,6 @@ PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const Strin
return 0;
}
-void WebFrameLoaderClient::didTransferChildFrameToNewDocument(Page* oldPage)
-{
-}
-
-void WebFrameLoaderClient::transferLoadingResourceFromPage(ResourceLoader* loader, const ResourceRequest& originalRequest, Page* oldPage)
-{
- ASSERT(oldPage != core(m_webFrame.get())->page());
-
- unsigned long identifier = loader->identifier();
- ASSERT(![getWebView(m_webFrame.get()) _objectForIdentifier:identifier]);
-
- assignIdentifierToInitialRequest(identifier, loader->documentLoader(), originalRequest);
-
- [kit(oldPage) _removeObjectForIdentifier:identifier];
-}
-
ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
diff --git a/Source/WebKit/mac/WebCoreSupport/WebGeolocationClient.mm b/Source/WebKit/mac/WebCoreSupport/WebGeolocationClient.mm
index 541f40ccd..ed0f9e801 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebGeolocationClient.mm
+++ b/Source/WebKit/mac/WebCoreSupport/WebGeolocationClient.mm
@@ -25,6 +25,8 @@
#import "WebGeolocationClient.h"
+#if ENABLE(GEOLOCATION)
+
#import "WebDelegateImplementationCaching.h"
#import "WebFrameInternal.h"
#import "WebGeolocationPositionInternal.h"
@@ -88,11 +90,7 @@ void WebGeolocationClient::requestPermission(Geolocation* geolocation)
GeolocationPosition* WebGeolocationClient::lastPosition()
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
return core([[m_webView _geolocationProvider] lastPosition]);
-#else
- return 0;
-#endif
}
@implementation WebGeolocationPolicyListener
@@ -117,3 +115,4 @@ GeolocationPosition* WebGeolocationClient::lastPosition()
@end
+#endif // ENABLE(GEOLOCATION)
diff --git a/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm b/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
index b288f9f97..edee884c9 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
+++ b/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
@@ -38,6 +38,7 @@
#import "WebLocalizableStringsInternal.h"
#import "WebNodeHighlighter.h"
#import "WebUIDelegate.h"
+#import "WebPolicyDelegate.h"
#import "WebViewInternal.h"
#import <WebCore/InspectorController.h>
#import <WebCore/Page.h>
@@ -46,7 +47,7 @@
#import <WebKitSystemInterface.h>
#import <wtf/PassOwnPtr.h>
-SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(WebInspector)
+SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL(WebInspector, PrivateFrameworks)
using namespace WebCore;
@@ -62,6 +63,7 @@ using namespace WebCore;
BOOL _destroyingInspectorView;
}
- (id)initWithInspectedWebView:(WebView *)webView;
+- (NSString *)inspectorPagePath;
- (WebView *)webView;
- (void)attach;
- (void)detach;
@@ -168,8 +170,13 @@ static bool useWebKitWebInspector()
// Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
WebInspectorLibrary();
- return [[NSUserDefaults standardUserDefaults] boolForKey:@"UseWebKitWebInspector"] ||
- ![[NSBundle bundleWithIdentifier:@"com.apple.WebInspector"] pathForResource:@"Main" ofType:@"html"];
+ if (![[NSBundle bundleWithIdentifier:@"com.apple.WebInspector"] pathForResource:@"Main" ofType:@"html"])
+ return true;
+
+ if (![[NSBundle bundleWithIdentifier:@"com.apple.WebCore"] pathForResource:@"inspector" ofType:@"html" inDirectory:@"inspector"])
+ return false;
+
+ return [[NSUserDefaults standardUserDefaults] boolForKey:@"UseWebKitWebInspector"];
}
String WebInspectorFrontendClient::localizedStringsURL()
@@ -268,18 +275,11 @@ void WebInspectorFrontendClient::updateWindowTitle() const
[_webView setDrawsBackground:NO];
[_webView setProhibitsMainFrameScrolling:YES];
[_webView setUIDelegate:self];
+ [_webView setPolicyDelegate:self];
[preferences release];
- NSString *path;
- if (useWebKitWebInspector())
- path = [[NSBundle bundleWithIdentifier:@"com.apple.WebCore"] pathForResource:@"inspector" ofType:@"html" inDirectory:@"inspector"];
- else
- path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspector"] pathForResource:@"Main" ofType:@"html"];
-
- ASSERT([path length]);
-
- NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL fileURLWithPath:path]];
+ NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL fileURLWithPath:[self inspectorPagePath]]];
[[_webView mainFrame] loadRequest:request];
[request release];
@@ -304,6 +304,20 @@ void WebInspectorFrontendClient::updateWindowTitle() const
// MARK: -
+- (NSString *)inspectorPagePath
+{
+ NSString *path;
+ if (useWebKitWebInspector())
+ path = [[NSBundle bundleWithIdentifier:@"com.apple.WebCore"] pathForResource:@"inspector" ofType:@"html" inDirectory:@"inspector"];
+ else
+ path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspector"] pathForResource:@"Main" ofType:@"html"];
+
+ ASSERT([path length]);
+ return path;
+}
+
+// MARK: -
+
- (WebView *)webView
{
return _webView;
@@ -396,6 +410,7 @@ void WebInspectorFrontendClient::updateWindowTitle() const
[_webView removeFromSuperview];
[_inspectedWebView.get() addSubview:_webView positioned:NSWindowBelow relativeTo:(NSView *)frameView];
+ [[_inspectedWebView.get() window] makeFirstResponder:_webView];
[_webView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable | NSViewMaxYMargin)];
[frameView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable | NSViewMinYMargin)];
@@ -507,6 +522,30 @@ void WebInspectorFrontendClient::updateWindowTitle() const
}
// MARK: -
+// MARK: Policy delegate
+
+- (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener
+{
+ // Allow non-main frames to navigate anywhere.
+ if (frame != [webView mainFrame]) {
+ [listener use];
+ return;
+ }
+
+ // Allow loading of the main inspector file.
+ if ([[request URL] isFileURL] && [[[request URL] path] isEqualToString:[self inspectorPagePath]]) {
+ [listener use];
+ return;
+ }
+
+ // Prevent everything else from loading in the inspector's page.
+ [listener ignore];
+
+ // And instead load it in the inspected page.
+ [[_inspectedWebView.get() mainFrame] loadRequest:request];
+}
+
+// MARK: -
// These methods can be used by UI elements such as menu items and toolbar buttons when the inspector is the key window.
// This method is really only implemented to keep any UI elements enabled.
diff --git a/Source/WebKit/mac/WebCoreSupport/WebKitFullScreenListener.h b/Source/WebKit/mac/WebCoreSupport/WebKitFullScreenListener.h
new file mode 100644
index 000000000..b990ab4e2
--- /dev/null
+++ b/Source/WebKit/mac/WebCoreSupport/WebKitFullScreenListener.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebKitFullScreenListener_h
+#define WebKitFullScreenListener_h
+
+#import "WebUIDelegatePrivate.h"
+#import <wtf/RefPtr.h>
+
+#if ENABLE(FULLSCREEN_API)
+
+namespace WebCore {
+class Element;
+}
+
+@interface WebKitFullScreenListener : NSObject <WebKitFullScreenListener> {
+ RefPtr<WebCore::Element> _element;
+}
+
+- (id)initWithElement:(WebCore::Element*)element;
+@end
+
+#endif
+
+#endif // WebFullScreenListener_h
diff --git a/Source/WebKit/mac/WebCoreSupport/WebKitFullScreenListener.mm b/Source/WebKit/mac/WebCoreSupport/WebKitFullScreenListener.mm
new file mode 100644
index 000000000..b0d28eb56
--- /dev/null
+++ b/Source/WebKit/mac/WebCoreSupport/WebKitFullScreenListener.mm
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebKitFullScreenListener.h"
+
+#import <WebCore/Element.h>
+
+#if ENABLE(FULLSCREEN_API)
+
+using namespace WebCore;
+
+@implementation WebKitFullScreenListener
+
+- (id)initWithElement:(Element*)element
+{
+ if (!(self = [super init]))
+ return nil;
+
+ _element = element;
+ return self;
+}
+
+- (void)webkitWillEnterFullScreen
+{
+ if (_element)
+ _element->document()->webkitWillEnterFullScreenForElement(_element.get());
+}
+
+- (void)webkitDidEnterFullScreen
+{
+ if (_element)
+ _element->document()->webkitDidEnterFullScreenForElement(_element.get());
+}
+
+- (void)webkitWillExitFullScreen
+{
+ if (_element)
+ _element->document()->webkitWillExitFullScreenForElement(_element.get());
+}
+
+- (void)webkitDidExitFullScreen
+{
+ if (_element)
+ _element->document()->webkitDidExitFullScreenForElement(_element.get());
+}
+
+@end
+#endif
diff --git a/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.h b/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.h
index d68d92275..94535d361 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.h
+++ b/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.h
@@ -25,7 +25,7 @@
#import <WebCore/NotificationClient.h>
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#import <WebCore/Notification.h>
#import <wtf/HashMap.h>
#import <wtf/RefPtr.h>
@@ -34,11 +34,13 @@
namespace WebCore {
class Notification;
+class NotificationPermissionCallback;
class ScriptExecutionContext;
class VoidCallback;
}
@class WebNotification;
+@class WebNotificationPolicyListener;
@class WebView;
class WebNotificationClient : public WebCore::NotificationClient {
@@ -52,12 +54,21 @@ private:
virtual void clearNotifications(WebCore::ScriptExecutionContext*) OVERRIDE;
virtual void notificationObjectDestroyed(WebCore::Notification*) OVERRIDE;
virtual void notificationControllerDestroyed() OVERRIDE;
+#if ENABLE(LEGACY_NOTIFICATIONS)
virtual void requestPermission(WebCore::ScriptExecutionContext*, PassRefPtr<WebCore::VoidCallback>) OVERRIDE;
+#endif
+#if ENABLE(NOTIFICATIONS)
+ virtual void requestPermission(WebCore::ScriptExecutionContext*, PassRefPtr<WebCore::NotificationPermissionCallback>) OVERRIDE;
+#endif
virtual void cancelRequestsForPermission(WebCore::ScriptExecutionContext*) OVERRIDE { }
virtual WebCore::NotificationClient::Permission checkPermission(WebCore::ScriptExecutionContext*) OVERRIDE;
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+ void requestPermission(WebCore::ScriptExecutionContext*, WebNotificationPolicyListener *);
+#endif
+
WebView *m_webView;
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
HashMap<RefPtr<WebCore::Notification>, RetainPtr<WebNotification> > m_notificationMap;
typedef HashMap<RefPtr<WebCore::ScriptExecutionContext>, Vector<RetainPtr<WebNotification> > > NotificationContextMap;
diff --git a/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.mm b/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.mm
index 3fdf0bc7f..e2a05c6a8 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.mm
+++ b/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.mm
@@ -25,7 +25,7 @@
#import "WebNotificationClient.h"
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#import "WebDelegateImplementationCaching.h"
#import "WebNotificationInternal.h"
#import "WebPreferencesPrivate.h"
@@ -37,18 +37,36 @@
#import <WebCore/ScriptExecutionContext.h>
#endif
+#if ENABLE(NOTIFICATIONS)
+#import <WebCore/NotificationPermissionCallback.h>
+#endif
+#if ENABLE(LEGACY_NOTIFICATIONS)
+#import <WebCore/VoidCallback.h>
+#endif
+
using namespace WebCore;
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
@interface WebNotificationPolicyListener : NSObject <WebAllowDenyPolicyListener>
{
- RefPtr<VoidCallback> _callback;
+#if ENABLE(NOTIFICATIONS)
+ RefPtr<NotificationPermissionCallback> _callback;
+#endif
+#if ENABLE(LEGACY_NOTIFICATIONS)
+ RefPtr<VoidCallback> _voidCallback;
+#endif
}
-- (id)initWithCallback:(PassRefPtr<VoidCallback>)callback;
+#if ENABLE(NOTIFICATIONS)
+- (id)initWithCallback:(PassRefPtr<NotificationPermissionCallback>)callback;
+#endif
+#if ENABLE(LEGACY_NOTIFICATIONS)
+- (id)initWithVoidCallback:(PassRefPtr<VoidCallback>)callback;
+#endif
+
@end
#endif
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
static uint64_t generateNotificationID()
{
static uint64_t uniqueNotificationID = 1;
@@ -63,7 +81,7 @@ WebNotificationClient::WebNotificationClient(WebView *webView)
bool WebNotificationClient::show(Notification* notification)
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
if (![m_webView _notificationProvider])
return false;
@@ -71,7 +89,7 @@ bool WebNotificationClient::show(Notification* notification)
RetainPtr<WebNotification> webNotification = adoptNS([[WebNotification alloc] initWithCoreNotification:notification notificationID:notificationID]);
m_notificationMap.set(notification, webNotification);
- NotificationContextMap::iterator it = m_notificationContextMap.add(notification->scriptExecutionContext(), Vector<RetainPtr<WebNotification> >()).first;
+ NotificationContextMap::iterator it = m_notificationContextMap.add(notification->scriptExecutionContext(), Vector<RetainPtr<WebNotification> >()).iterator;
it->second.append(webNotification);
[[m_webView _notificationProvider] showNotification:webNotification.get() fromWebView:m_webView];
@@ -84,7 +102,7 @@ bool WebNotificationClient::show(Notification* notification)
void WebNotificationClient::cancel(Notification* notification)
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
WebNotification *webNotification = m_notificationMap.get(notification).get();
if (!webNotification)
return;
@@ -97,7 +115,7 @@ void WebNotificationClient::cancel(Notification* notification)
void WebNotificationClient::clearNotifications(ScriptExecutionContext* context)
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationContextMap::iterator it = m_notificationContextMap.find(context);
if (it == m_notificationContextMap.end())
return;
@@ -108,6 +126,7 @@ void WebNotificationClient::clearNotifications(ScriptExecutionContext* context)
for (size_t i = 0; i < count; ++i) {
WebNotification *webNotification = webNotifications[i].get();
[nsIDs addObject:[NSNumber numberWithUnsignedLongLong:[webNotification notificationID]]];
+ core(webNotification)->finalize();
m_notificationMap.remove(core(webNotification));
}
@@ -120,7 +139,7 @@ void WebNotificationClient::clearNotifications(ScriptExecutionContext* context)
void WebNotificationClient::notificationObjectDestroyed(Notification* notification)
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
RetainPtr<WebNotification> webNotification = m_notificationMap.take(notification);
if (!webNotification)
return;
@@ -141,39 +160,52 @@ void WebNotificationClient::notificationObjectDestroyed(Notification* notificati
void WebNotificationClient::notificationControllerDestroyed()
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
[m_webView _notificationControllerDestroyed];
#endif
delete this;
}
-void WebNotificationClient::requestPermission(ScriptExecutionContext* context, PassRefPtr<VoidCallback> callback)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+void WebNotificationClient::requestPermission(ScriptExecutionContext* context, WebNotificationPolicyListener *listener)
{
-#if ENABLE(NOTIFICATIONS)
- BEGIN_BLOCK_OBJC_EXCEPTIONS;
-
SEL selector = @selector(webView:decidePolicyForNotificationRequestFromOrigin:listener:);
if (![[m_webView UIDelegate] respondsToSelector:selector])
return;
WebSecurityOrigin *webOrigin = [[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:context->securityOrigin()];
- WebNotificationPolicyListener* listener = [[WebNotificationPolicyListener alloc] initWithCallback:callback];
CallUIDelegate(m_webView, selector, webOrigin, listener);
[webOrigin release];
+}
+#endif
+
+#if ENABLE(LEGACY_NOTIFICATIONS)
+void WebNotificationClient::requestPermission(ScriptExecutionContext* context, PassRefPtr<VoidCallback> callback)
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+ WebNotificationPolicyListener *listener = [[WebNotificationPolicyListener alloc] initWithVoidCallback:callback];
+ requestPermission(context, listener);
[listener release];
-
END_BLOCK_OBJC_EXCEPTIONS;
-#else
- UNUSED_PARAM(context);
- UNUSED_PARAM(callback);
+}
#endif
+
+#if ENABLE(NOTIFICATIONS)
+void WebNotificationClient::requestPermission(ScriptExecutionContext* context, PassRefPtr<NotificationPermissionCallback> callback)
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+ WebNotificationPolicyListener *listener = [[WebNotificationPolicyListener alloc] initWithCallback:callback];
+ requestPermission(context, listener);
+ [listener release];
+ END_BLOCK_OBJC_EXCEPTIONS;
}
+#endif
NotificationClient::Permission WebNotificationClient::checkPermission(ScriptExecutionContext* context)
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
if (!context || !context->isDocument())
return NotificationClient::PermissionDenied;
if (![[m_webView preferences] notificationsEnabled])
@@ -197,9 +229,11 @@ NotificationClient::Permission WebNotificationClient::checkPermission(ScriptExec
#endif
}
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
@implementation WebNotificationPolicyListener
-- (id)initWithCallback:(PassRefPtr<VoidCallback>)callback
+
+#if ENABLE(NOTIFICATIONS)
+- (id)initWithCallback:(PassRefPtr<NotificationPermissionCallback>)callback
{
if (!(self = [super init]))
return nil;
@@ -208,15 +242,44 @@ NotificationClient::Permission WebNotificationClient::checkPermission(ScriptExec
_callback = callback;
return self;
}
+#endif
+
+#if ENABLE(LEGACY_NOTIFICATIONS)
+- (id)initWithVoidCallback:(PassRefPtr<VoidCallback>)callback
+{
+ if (!(self = [super init]))
+ return nil;
+
+ ASSERT(callback);
+ _voidCallback = callback;
+ return self;
+}
+#endif
- (void)allow
{
- _callback->handleEvent();
+#if ENABLE(LEGACY_NOTIFICATIONS)
+ if (_voidCallback) {
+ _voidCallback->handleEvent();
+ return;
+ }
+#endif
+#if ENABLE(NOTIFICATIONS)
+ _callback->handleEvent(Notification::permissionString(NotificationClient::PermissionAllowed));
+#endif
}
- (void)deny
{
- _callback->handleEvent();
+#if ENABLE(LEGACY_NOTIFICATIONS)
+ if (_voidCallback) {
+ _voidCallback->handleEvent();
+ return;
+ }
+#endif
+#if ENABLE(NOTIFICATIONS)
+ _callback->handleEvent(Notification::permissionString(NotificationClient::PermissionDenied));
+#endif
}
@end
diff --git a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h b/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h
index 4fde2b3b0..22fabfd90 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h
+++ b/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h
@@ -64,8 +64,10 @@ private:
virtual int changeCount(const String& pasteboardName) OVERRIDE;
virtual String uniqueName() OVERRIDE;
virtual WebCore::Color color(const String& pasteboardName) OVERRIDE;
-
+ virtual WebCore::KURL url(const String& pasteboardName) OVERRIDE;
+
virtual void copy(const String& fromPasteboard, const String& toPasteboard) OVERRIDE;
+ virtual void addTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) OVERRIDE;
virtual void setTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) OVERRIDE;
virtual void setBufferForType(PassRefPtr<WebCore::SharedBuffer>, const String& pasteboardType, const String& pasteboardName) OVERRIDE;
virtual void setPathnamesForType(const Vector<String>&, const String& pasteboardType, const String& pasteboardName) OVERRIDE;
diff --git a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm b/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
index fc3035048..6f6567ab0 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
+++ b/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
@@ -138,6 +138,16 @@ Color WebPlatformStrategies::color(const String& pasteboardName)
return PlatformPasteboard(pasteboardName).color();
}
+KURL WebPlatformStrategies::url(const String& pasteboardName)
+{
+ return PlatformPasteboard(pasteboardName).url();
+}
+
+void WebPlatformStrategies::addTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName)
+{
+ PlatformPasteboard(pasteboardName).addTypes(pasteboardTypes);
+}
+
void WebPlatformStrategies::setTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName)
{
PlatformPasteboard(pasteboardName).setTypes(pasteboardTypes);
diff --git a/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm b/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
index 86a44d675..06a3ea37c 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
+++ b/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
@@ -180,5 +180,17 @@ void InitWebCoreSystemInterface(void)
INIT(ExecutableWasLinkedOnOrBeforeLion);
#endif
+#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ INIT(CGPathAddRoundedRect);
+#endif
+
+#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+ INIT(FilterIsManagedSession);
+ INIT(FilterCreateInstance);
+ INIT(FilterRelease);
+ INIT(FilterWasBlocked);
+ INIT(FilterAddData);
+ INIT(FilterDataComplete);
+#endif
didInit = true;
}
diff --git a/Source/WebKit/mac/WebKit.order b/Source/WebKit/mac/WebKit.order
index acd1a3755..514881484 100644
--- a/Source/WebKit/mac/WebKit.order
+++ b/Source/WebKit/mac/WebKit.order
@@ -769,7 +769,6 @@ __Z21CallFrameLoadDelegatePFP11objc_objectS0_P13objc_selectorzEP7WebViewS2_S0_S0
__ZN20WebFrameLoaderClient29dispatchDidFinishDocumentLoadEv
-[WebFrame(WebPrivate) _pendingFrameUnloadEventCount]
__ZN20WebFrameLoaderClient29dispatchDidHandleOnloadEventsEv
-__ZN20WebFrameLoaderClient27dispatchDidLoadMainResourceEPN7WebCore14DocumentLoaderE
__ZN20WebFrameLoaderClient21dispatchDidFinishLoadEv
-[WebView(WebPrivate) _didFinishLoadForFrame:]
-[WebView(WebPrivate) _didChangeBackForwardKeys]
@@ -1691,8 +1690,6 @@ __ZThn8_N15WebEditorClient17getGuessesForWordERKN3WTF6StringES3_RNS0_6VectorIS1_
__ZN15WebEditorClient17getGuessesForWordERKN3WTF6StringES3_RNS0_6VectorIS1_Lm0EEE
__ZN3WTF6VectorINS_6StringELm0EE14shrinkCapacityEm
__ZN15WebEditorClient34updateSpellingUIWithMisspelledWordERKN3WTF6StringE
--[WebFrame(WebPrivate) hasSpellingMarker:length:]
--[WebFrame(WebPrivate) hasGrammarMarker:length:]
__ZThn8_N15WebEditorClient23requestCheckingOfStringEPN7WebCore12SpellCheckerEijRKN3WTF6StringE
__ZN15WebEditorClient23requestCheckingOfStringEPN7WebCore12SpellCheckerEijRKN3WTF6StringE
___copy_helper_block_1
@@ -1815,7 +1812,6 @@ __ZN15WebChromeClient4showEv
__ZN15WebChromeClient15closeWindowSoonEv
-[WebView(WebIBActions) stopLoading:]
-[WebView(WebPrivate) _closeWindow]
--[WebView(WebViewPrivateNodesFromRect) _nodesFromRect:forDocument:x:y:top:right:bottom:left:ignoreClipping:]
__ZN20WebFrameLoaderClient38dispatchDecidePolicyForNewWindowActionEMN7WebCore13PolicyCheckerEFvNS0_12PolicyActionEERKNS0_16NavigationActionERKNS0_15ResourceRequestEN3WTF10PassRefPtrINS0_9FormStateEEERKNSB_6StringE
-[WebDefaultPolicyDelegate webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener:]
__ZN20WebFrameLoaderClient18dispatchCreatePageERKN7WebCore16NavigationActionE
diff --git a/Source/WebKit/mac/WebView/WebFrame.mm b/Source/WebKit/mac/WebView/WebFrame.mm
index e085bc17f..02f4a3c68 100644
--- a/Source/WebKit/mac/WebView/WebFrame.mm
+++ b/Source/WebKit/mac/WebView/WebFrame.mm
@@ -80,17 +80,14 @@
#import <WebCore/PlatformEventFactoryMac.h>
#import <WebCore/PluginData.h>
#import <WebCore/PrintContext.h>
-#import <WebCore/RenderLayer.h>
#import <WebCore/RenderPart.h>
#import <WebCore/RenderView.h>
-#import <WebCore/ReplaceSelectionCommand.h>
#import <WebCore/RuntimeApplicationChecks.h>
#import <WebCore/ScriptValue.h>
#import <WebCore/SecurityOrigin.h>
#import <WebCore/SmartReplace.h>
#import <WebCore/TextIterator.h>
#import <WebCore/ThreadCheck.h>
-#import <WebCore/TypingCommand.h>
#import <WebCore/htmlediting.h>
#import <WebCore/markup.h>
#import <WebCore/visible_units.h>
@@ -583,7 +580,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
if (RenderPart* ownerRenderer = _private->coreFrame->ownerRenderer()) {
if (ownerRenderer->needsLayout())
return NO;
- *rect = ownerRenderer->absoluteClippedOverflowRect();
+ *rect = ownerRenderer->pixelSnappedAbsoluteClippedOverflowRect();
return YES;
}
@@ -632,11 +629,8 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
NSRect rangeRect = [self _firstRectForDOMRange:range];
Node *startNode = core([range startContainer]);
- if (startNode && startNode->renderer()) {
- RenderLayer *layer = startNode->renderer()->enclosingLayer();
- if (layer)
- layer->scrollRectToVisible(enclosingIntRect(rangeRect), ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded);
- }
+ if (startNode && startNode->renderer())
+ startNode->renderer()->scrollRectToVisible(enclosingIntRect(rangeRect), ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded);
}
- (BOOL)_needsLayout
@@ -770,9 +764,8 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
{
if (_private->coreFrame->selection()->isNone())
return;
-
- TypingCommand::insertParagraphSeparatorInQuotedContent(_private->coreFrame->document());
- _private->coreFrame->selection()->revealSelection(ScrollAlignment::alignToEdgeIfNeeded);
+
+ _private->coreFrame->editor()->insertParagraphSeparatorInQuotedContent();
}
- (VisiblePosition)_visiblePositionForPoint:(NSPoint)point
@@ -1223,22 +1216,6 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return coreFrame->layerTreeAsText();
}
-- (BOOL)hasSpellingMarker:(int)from length:(int)length
-{
- Frame* coreFrame = core(self);
- if (!coreFrame)
- return NO;
- return coreFrame->editor()->selectionStartHasMarkerFor(DocumentMarker::Spelling, from, length);
-}
-
-- (BOOL)hasGrammarMarker:(int)from length:(int)length
-{
- Frame* coreFrame = core(self);
- if (!coreFrame)
- return NO;
- return coreFrame->editor()->selectionStartHasMarkerFor(DocumentMarker::Grammar, from, length);
-}
-
- (id)accessibilityRoot
{
#if HAVE(ACCESSIBILITY)
@@ -1293,9 +1270,9 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
if (!root)
return [NSArray array];
- const IntRect& documentRect = root->documentRect();
- float printWidth = root->style()->isHorizontalWritingMode() ? documentRect.width() / printScaleFactor : pageSize.width;
- float printHeight = root->style()->isHorizontalWritingMode() ? pageSize.height : documentRect.height() / printScaleFactor;
+ const LayoutRect& documentRect = root->documentRect();
+ float printWidth = root->style()->isHorizontalWritingMode() ? static_cast<float>(documentRect.width()) / printScaleFactor : pageSize.width;
+ float printHeight = root->style()->isHorizontalWritingMode() ? pageSize.height : static_cast<float>(documentRect.height()) / printScaleFactor;
PrintContext printContext(_private->coreFrame);
printContext.computePageRectsWithPageSize(FloatSize(printWidth, printHeight), true);
@@ -1416,7 +1393,18 @@ static bool needsMicrosoftMessengerDOMDocumentWorkaround()
Frame* coreFrame = _private->coreFrame;
if (!coreFrame)
return;
- coreFrame->loader()->load(request, false);
+
+ ResourceRequest resourceRequest(request);
+
+ // Some users of WebKit API incorrectly use "file path as URL" style requests which are invalid.
+ // By re-writing those URLs here we technically break the -[WebDataSource initialRequest] API
+ // but that is necessary to implement this quirk only at the API boundary.
+ // Note that other users of WebKit API use nil requests or requests with nil URLs, so we
+ // only implement this workaround when the request had a non-nil URL.
+ if (!resourceRequest.url().isValid() && [request URL])
+ resourceRequest.setURL([NSURL fileURLWithPath:[[request URL] absoluteString]]);
+
+ coreFrame->loader()->load(resourceRequest, false);
}
static NSURL *createUniqueWebDataURL()
@@ -1470,14 +1458,14 @@ static NSURL *createUniqueWebDataURL()
{
WebCoreThreadViolationCheckRoundTwo();
- [self _loadHTMLString:string baseURL:baseURL unreachableURL:nil];
+ [self _loadHTMLString:string baseURL:[baseURL _webkit_URLFromURLOrPath] unreachableURL:nil];
}
- (void)loadAlternateHTMLString:(NSString *)string baseURL:(NSURL *)baseURL forUnreachableURL:(NSURL *)unreachableURL
{
WebCoreThreadViolationCheckRoundTwo();
- [self _loadHTMLString:string baseURL:baseURL unreachableURL:unreachableURL];
+ [self _loadHTMLString:string baseURL:[baseURL _webkit_URLFromURLOrPath] unreachableURL:[unreachableURL _webkit_URLFromURLOrPath]];
}
- (void)loadArchive:(WebArchive *)archive
diff --git a/Source/WebKit/mac/WebView/WebFramePrivate.h b/Source/WebKit/mac/WebView/WebFramePrivate.h
index 899ceeddf..cb521c3ea 100644
--- a/Source/WebKit/mac/WebView/WebFramePrivate.h
+++ b/Source/WebKit/mac/WebView/WebFramePrivate.h
@@ -136,11 +136,6 @@ typedef enum {
- (NSString*)_layerTreeAsText;
-// Returns whether there is a spelling marker in the specified range of the focused node.
-- (BOOL)hasSpellingMarker:(int)location length:(int)length;
-
-- (BOOL)hasGrammarMarker:(int)from length:(int)length;
-
// The top of the accessibility tree.
- (id)accessibilityRoot;
diff --git a/Source/WebKit/mac/WebView/WebFullScreenController.h b/Source/WebKit/mac/WebView/WebFullScreenController.h
index ea03af4ba..4701f448a 100644
--- a/Source/WebKit/mac/WebView/WebFullScreenController.h
+++ b/Source/WebKit/mac/WebView/WebFullScreenController.h
@@ -59,6 +59,8 @@ namespace WebCore {
- (WebView*)webView;
- (void)setWebView:(WebView*)webView;
+- (BOOL)isFullScreen;
+
- (void)setElement:(PassRefPtr<WebCore::Element>)element;
- (WebCore::Element*)element;
diff --git a/Source/WebKit/mac/WebView/WebFullScreenController.mm b/Source/WebKit/mac/WebView/WebFullScreenController.mm
index eda499cd9..acd698ab4 100644
--- a/Source/WebKit/mac/WebView/WebFullScreenController.mm
+++ b/Source/WebKit/mac/WebView/WebFullScreenController.mm
@@ -150,12 +150,17 @@ static IntRect screenRectOfContents(Element* element)
_element = element;
}
+- (BOOL)isFullScreen
+{
+ return _isFullScreen;
+}
+
#pragma mark -
#pragma mark NSWindowController overrides
- (void)cancelOperation:(id)sender
{
- [self performSelector:@selector(exitFullScreen) withObject:nil afterDelay:0];
+ [self performSelector:@selector(requestExitFullScreen) withObject:nil afterDelay:0];
}
#pragma mark -
@@ -290,6 +295,13 @@ static IntRect screenRectOfContents(Element* element)
[_scaleAnimation.get() stopAnimation];
}
+- (void)requestExitFullScreen
+{
+ if (!_element)
+ return;
+ _element->document()->webkitCancelFullScreen();
+}
+
- (void)exitFullScreen
{
if (!_isFullScreen)
@@ -319,7 +331,7 @@ static IntRect screenRectOfContents(Element* element)
#endif
// If the user has moved the fullScreen window into a new space, temporarily change
// the collectionBehavior of the webView's window so that it is pulled into the active space:
- if (![webWindow isOnActiveSpace]) {
+ if (!([webWindow respondsToSelector:@selector(isOnActiveSpace)] ? [webWindow isOnActiveSpace] : YES)) {
NSWindowCollectionBehavior behavior = [webWindow collectionBehavior];
[webWindow setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces];
[webWindow orderWindow:NSWindowBelow relativeTo:[[self window] windowNumber]];
@@ -365,7 +377,9 @@ static IntRect screenRectOfContents(Element* element)
[_backgroundWindow.get() orderOut:self];
[_backgroundWindow.get() setFrame:NSZeroRect display:YES];
-
+
+ [[_webView window] makeKeyAndOrderFront:self];
+
NSEnableScreenUpdates();
}
@@ -422,7 +436,7 @@ static IntRect screenRectOfContents(Element* element)
[NSApp setPresentationOptions:options];
else
#endif
- SetSystemUIMode(_isFullScreen ? kUIModeNormal : kUIModeAllHidden, 0);
+ SetSystemUIMode(_isFullScreen ? kUIModeAllHidden : kUIModeNormal, 0);
}
#pragma mark -
@@ -440,7 +454,8 @@ static IntRect screenRectOfContents(Element* element)
[otherView setFrame:[view frame]];
[otherView setAutoresizingMask:[view autoresizingMask]];
[otherView removeFromSuperview];
- [[view superview] replaceSubview:view with:otherView];
+ [[view superview] addSubview:otherView positioned:NSWindowAbove relativeTo:view];
+ [view removeFromSuperview];
[CATransaction commit];
}
@@ -456,6 +471,9 @@ static RetainPtr<NSWindow> createBackgroundFullscreenWindow(NSRect frame)
static NSRect windowFrameFromApparentFrames(NSRect screenFrame, NSRect initialFrame, NSRect finalFrame)
{
NSRect initialWindowFrame;
+ if (!NSWidth(initialFrame) || !NSWidth(finalFrame) || !NSHeight(initialFrame) || !NSHeight(finalFrame))
+ return screenFrame;
+
CGFloat xScale = NSWidth(screenFrame) / NSWidth(finalFrame);
CGFloat yScale = NSHeight(screenFrame) / NSHeight(finalFrame);
CGFloat xTrans = NSMinX(screenFrame) - NSMinX(finalFrame);
diff --git a/Source/WebKit/mac/WebView/WebGeolocationPosition.mm b/Source/WebKit/mac/WebView/WebGeolocationPosition.mm
index c92b7f136..6467caa2e 100644
--- a/Source/WebKit/mac/WebView/WebGeolocationPosition.mm
+++ b/Source/WebKit/mac/WebView/WebGeolocationPosition.mm
@@ -29,26 +29,21 @@
#import <wtf/PassRefPtr.h>
#import <wtf/RefPtr.h>
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
#import <WebCore/GeolocationPosition.h>
using namespace WebCore;
-#endif
@interface WebGeolocationPositionInternal : NSObject
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
{
@public
RefPtr<GeolocationPosition> _position;
}
- (id)initWithCoreGeolocationPosition:(PassRefPtr<GeolocationPosition>)coreGeolocationPosition;
-#endif
@end
@implementation WebGeolocationPositionInternal
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- (id)initWithCoreGeolocationPosition:(PassRefPtr<GeolocationPosition>)coreGeolocationPosition
{
self = [super init];
@@ -57,29 +52,22 @@ using namespace WebCore;
_position = coreGeolocationPosition;
return self;
}
-#endif
@end
@implementation WebGeolocationPosition
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
GeolocationPosition* core(WebGeolocationPosition *position)
{
return position ? position->_internal->_position.get() : 0;
}
-#endif
- (id)initWithTimestamp:(double)timestamp latitude:(double)latitude longitude:(double)longitude accuracy:(double)accuracy
{
self = [super init];
if (!self)
return nil;
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
_internal = [[WebGeolocationPositionInternal alloc] initWithCoreGeolocationPosition:GeolocationPosition::create(timestamp, latitude, longitude, accuracy)];
-#else
- _internal = [[WebGeolocationPositionInternal alloc] init];
-#endif
return self;
}
diff --git a/Source/WebKit/mac/WebView/WebGeolocationPositionInternal.h b/Source/WebKit/mac/WebView/WebGeolocationPositionInternal.h
index 27f8a39c9..f54e66b81 100644
--- a/Source/WebKit/mac/WebView/WebGeolocationPositionInternal.h
+++ b/Source/WebKit/mac/WebView/WebGeolocationPositionInternal.h
@@ -25,12 +25,9 @@
#import "WebGeolocationPosition.h"
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
-
namespace WebCore {
class GeolocationPosition;
}
WebCore::GeolocationPosition* core(WebGeolocationPosition *);
-#endif
diff --git a/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm b/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm
index 680880dac..e5fe23620 100644
--- a/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm
+++ b/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm
@@ -214,14 +214,6 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
if (!webFrame)
return;
-
- if (![self _isDisplayingWebArchive]) {
- // Telling the frame we received some data and passing nil as the data is our
- // way to get work done that is normally done when the first bit of data is
- // received, even for the case of a document with no data (like about:blank).
- [webFrame _commitData:nil];
- }
-
WebView *webView = [webFrame webView];
if ([webView mainFrame] == webFrame && [webView isEditable])
core(webFrame)->editor()->applyEditingStyleToBodyElement();
diff --git a/Source/WebKit/mac/WebView/WebHTMLView.mm b/Source/WebKit/mac/WebView/WebHTMLView.mm
index a9b291e49..42dd10492 100644
--- a/Source/WebKit/mac/WebView/WebHTMLView.mm
+++ b/Source/WebKit/mac/WebView/WebHTMLView.mm
@@ -3018,7 +3018,7 @@ WEBCORE_COMMAND(yankAndSelect)
#endif
if (Frame* coreFrame = core([self _frame]))
- coreFrame->document()->styleSelectorChanged(RecalcStyleImmediately);
+ coreFrame->document()->styleResolverChanged(RecalcStyleImmediately);
#ifdef LOG_TIMES
double thisTime = CFAbsoluteTimeGetCurrent() - start;
@@ -3923,7 +3923,7 @@ static PassRefPtr<KeyboardEvent> currentKeyboardEvent(Frame* coreFrame)
document->setPaginatedForScreen(_private->paginateScreenContent);
document->setPrinting(_private->printing);
- document->styleSelectorChanged(RecalcStyleImmediately);
+ document->styleResolverChanged(RecalcStyleImmediately);
}
}
diff --git a/Source/WebKit/mac/WebView/WebNotification.h b/Source/WebKit/mac/WebView/WebNotification.h
index 8ecc10686..fb9c50e5d 100644
--- a/Source/WebKit/mac/WebView/WebNotification.h
+++ b/Source/WebKit/mac/WebView/WebNotification.h
@@ -36,7 +36,7 @@
- (NSString *)title;
- (NSString *)body;
-- (NSString *)replaceID;
+- (NSString *)tag;
- (WebSecurityOrigin *)origin;
- (uint64_t)notificationID;
diff --git a/Source/WebKit/mac/WebView/WebNotification.mm b/Source/WebKit/mac/WebView/WebNotification.mm
index 557332cba..6a123f6ee 100644
--- a/Source/WebKit/mac/WebView/WebNotification.mm
+++ b/Source/WebKit/mac/WebView/WebNotification.mm
@@ -30,7 +30,7 @@
#import "WebNotificationInternal.h"
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#import "WebSecurityOriginInternal.h"
#import <WebCore/Notification.h>
#import <WebCore/ScriptExecutionContext.h>
@@ -44,7 +44,7 @@ OBJC_CLASS WebNotificationInternal;
@interface WebNotificationPrivate : NSObject
{
@public
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
RefPtr<Notification> _internal;
uint64_t _notificationID;
#endif
@@ -54,7 +54,7 @@ OBJC_CLASS WebNotificationInternal;
@implementation WebNotificationPrivate
@end
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
@implementation WebNotification (WebNotificationInternal)
Notification* core(WebNotification *notification)
{
@@ -83,9 +83,9 @@ Notification* core(WebNotification *notification)
- (NSString *)title
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
- return core(self)->contents().title;
+ return core(self)->title();
#else
return nil;
#endif
@@ -93,19 +93,19 @@ Notification* core(WebNotification *notification)
- (NSString *)body
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
- return core(self)->contents().body;
+ return core(self)->body();
#else
return nil;
#endif
}
-- (NSString *)replaceID
+- (NSString *)tag
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
- return core(self)->replaceId();
+ return core(self)->tag();
#else
return nil;
#endif
@@ -113,7 +113,7 @@ Notification* core(WebNotification *notification)
- (WebSecurityOrigin *)origin
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
return [[[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:core(self)->scriptExecutionContext()->securityOrigin()] autorelease];
#else
@@ -123,7 +123,7 @@ Notification* core(WebNotification *notification)
- (uint64_t)notificationID
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
return _private->_notificationID;
#else
@@ -133,7 +133,7 @@ Notification* core(WebNotification *notification)
- (void)dispatchShowEvent
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
core(self)->dispatchShowEvent();
#endif
@@ -141,7 +141,7 @@ Notification* core(WebNotification *notification)
- (void)dispatchCloseEvent
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
core(self)->dispatchCloseEvent();
#endif
@@ -149,7 +149,7 @@ Notification* core(WebNotification *notification)
- (void)dispatchClickEvent
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
core(self)->dispatchClickEvent();
#endif
@@ -157,7 +157,7 @@ Notification* core(WebNotification *notification)
- (void)dispatchErrorEvent
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
core(self)->dispatchErrorEvent();
#endif
diff --git a/Source/WebKit/mac/WebView/WebNotificationInternal.h b/Source/WebKit/mac/WebView/WebNotificationInternal.h
index b624069d9..3f6f5626c 100644
--- a/Source/WebKit/mac/WebView/WebNotificationInternal.h
+++ b/Source/WebKit/mac/WebView/WebNotificationInternal.h
@@ -28,7 +28,7 @@
#import "WebNotification.h"
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
namespace WebCore {
class Notification;
diff --git a/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index 261a30e56..3f9bf337a 100644
--- a/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -119,6 +119,9 @@
#define WebKitShouldDisplayTextDescriptionsPreferenceKey @"WebKitShouldDisplayTextDescriptions"
#define WebKitNotificationsEnabledKey @"WebKitNotificationsEnabled"
#define WebKitSuppressesIncrementalRenderingKey @"WebKitSuppressesIncrementalRendering"
+#define WebKitRegionBasedColumnsEnabledKey @"WebKitRegionBasedColumnsEnabled"
+#define WebKitShouldRespectImageOrientationKey @"WebKitShouldRespectImageOrientation"
+#define WebKitRequestAnimationFrameEnabledPreferenceKey @"WebKitRequestAnimationFrameEnabled"
// These are private both because callers should be using the cover methods and because the
// cover methods themselves are private.
@@ -134,6 +137,8 @@
#define WebKitEditingBehaviorPreferenceKey @"WebKitEditingBehavior"
#define WebKitUsePreHTML5ParserQuirksKey @"WebKitUsePreHTML5ParserQuirks"
#define WebKitBackspaceKeyNavigationEnabledKey @"WebKitBackspaceKeyNavigationEnabled"
+#define WebKitIncrementalRenderingSuppressionTimeoutInSecondsKey @"WebKitIncrementalRenderingSuppressionTimeoutInSeconds"
+#define WebKitWantsBalancedSetDefersLoadingBehaviorKey @"WebKitWantsBalancedSetDefersLoadingBehavior"
// CoreGraphics deferred updates are disabled if WebKitEnableCoalescedUpdatesPreferenceKey is set
// to NO, or has no value. For compatibility with Mac OS X 10.4.6, deferred updates are OFF by
diff --git a/Source/WebKit/mac/WebView/WebPreferences.mm b/Source/WebKit/mac/WebView/WebPreferences.mm
index ed23910a9..46dc9b35e 100644
--- a/Source/WebKit/mac/WebView/WebPreferences.mm
+++ b/Source/WebKit/mac/WebView/WebPreferences.mm
@@ -390,16 +390,21 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:YES], WebKitMediaPlaybackAllowsInlinePreferenceKey,
[NSNumber numberWithBool:NO], WebKitWebAudioEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitSuppressesIncrementalRenderingKey,
+ [NSNumber numberWithBool:NO], WebKitRegionBasedColumnsEnabledKey,
[NSNumber numberWithBool:YES], WebKitBackspaceKeyNavigationEnabledKey,
[NSNumber numberWithBool:NO], WebKitShouldDisplaySubtitlesPreferenceKey,
[NSNumber numberWithBool:NO], WebKitShouldDisplayCaptionsPreferenceKey,
[NSNumber numberWithBool:NO], WebKitShouldDisplayTextDescriptionsPreferenceKey,
[NSNumber numberWithBool:YES], WebKitNotificationsEnabledKey,
+ [NSNumber numberWithBool:NO], WebKitShouldRespectImageOrientationKey,
+ [NSNumber numberWithBool:YES], WebKitRequestAnimationFrameEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitWantsBalancedSetDefersLoadingBehaviorKey,
[NSNumber numberWithLongLong:ApplicationCacheStorage::noQuota()], WebKitApplicationCacheTotalQuota,
[NSNumber numberWithLongLong:ApplicationCacheStorage::noQuota()], WebKitApplicationCacheDefaultOriginQuota,
nil];
+
// This value shouldn't ever change, which is assumed in the initialization of WebKitPDFDisplayModePreferenceKey above
ASSERT(kPDFDisplaySinglePageContinuous == 1);
[[NSUserDefaults standardUserDefaults] registerDefaults:dict];
@@ -1604,24 +1609,24 @@ static NSString *classIBCreatorID = nil;
}
-- (void)setSuppressIncrementalRendering:(BOOL)flag
+- (void)setBackspaceKeyNavigationEnabled:(BOOL)flag
{
- [self _setBoolValue:flag forKey:WebKitSuppressesIncrementalRenderingKey];
+ [self _setBoolValue:flag forKey:WebKitBackspaceKeyNavigationEnabledKey];
}
-- (BOOL)suppressIncrementalRendering
+- (BOOL)backspaceKeyNavigationEnabled
{
- return [self _boolValueForKey:WebKitSuppressesIncrementalRenderingKey];
+ return [self _boolValueForKey:WebKitBackspaceKeyNavigationEnabledKey];
}
-- (void)setBackspaceKeyNavigationEnabled:(BOOL)flag
+- (void)setWantsBalancedSetDefersLoadingBehavior:(BOOL)flag
{
- [self _setBoolValue:flag forKey:WebKitBackspaceKeyNavigationEnabledKey];
+ [self _setBoolValue:flag forKey:WebKitWantsBalancedSetDefersLoadingBehaviorKey];
}
-- (BOOL)backspaceKeyNavigationEnabled
+- (BOOL)wantsBalancedSetDefersLoadingBehavior
{
- return [self _boolValueForKey:WebKitBackspaceKeyNavigationEnabledKey];
+ return [self _boolValueForKey:WebKitWantsBalancedSetDefersLoadingBehaviorKey];
}
- (void)setShouldDisplaySubtitles:(BOOL)flag
@@ -1664,6 +1669,46 @@ static NSString *classIBCreatorID = nil;
return [self _boolValueForKey:WebKitNotificationsEnabledKey];
}
+- (void)setRegionBasedColumnsEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitRegionBasedColumnsEnabledKey];
+}
+
+- (BOOL)regionBasedColumnsEnabled
+{
+ return [self _boolValueForKey:WebKitRegionBasedColumnsEnabledKey];
+}
+
+- (void)setShouldRespectImageOrientation:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitShouldRespectImageOrientationKey];
+}
+
+- (BOOL)shouldRespectImageOrientation
+{
+ return [self _boolValueForKey:WebKitShouldRespectImageOrientationKey];
+}
+
+- (BOOL)requestAnimationFrameEnabled
+{
+ return [self _boolValueForKey:WebKitRequestAnimationFrameEnabledPreferenceKey];
+}
+
+- (void)setRequestAnimationFrameEnabled:(BOOL)enabled
+{
+ [self _setBoolValue:enabled forKey:WebKitRequestAnimationFrameEnabledPreferenceKey];
+}
+
+- (void)setIncrementalRenderingSuppressionTimeoutInSeconds:(NSTimeInterval)timeout
+{
+ [self _setFloatValue:timeout forKey:WebKitIncrementalRenderingSuppressionTimeoutInSecondsKey];
+}
+
+- (NSTimeInterval)incrementalRenderingSuppressionTimeoutInSeconds
+{
+ return [self _floatValueForKey:WebKitIncrementalRenderingSuppressionTimeoutInSecondsKey];
+}
+
@end
@implementation WebPreferences (WebInternal)
diff --git a/Source/WebKit/mac/WebView/WebPreferencesPrivate.h b/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
index 29a8be125..1549a8479 100644
--- a/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -274,13 +274,15 @@ extern NSString *WebPreferencesChangedInternalNotification;
- (void)setHixie76WebSocketProtocolEnabled:(BOOL)flag;
- (BOOL)isHixie76WebSocketProtocolEnabled;
-// Deprecated. You should use [setS|s]uppressesIncrementalRendering in WebPreferences.h instead.
-- (void)setSuppressIncrementalRendering:(BOOL)flag;
-- (BOOL)suppressIncrementalRendering;
+- (void)setRegionBasedColumnsEnabled:(BOOL)flag;
+- (BOOL)regionBasedColumnsEnabled;
- (void)setBackspaceKeyNavigationEnabled:(BOOL)flag;
- (BOOL)backspaceKeyNavigationEnabled;
+- (void)setWantsBalancedSetDefersLoadingBehavior:(BOOL)flag;
+- (BOOL)wantsBalancedSetDefersLoadingBehavior;
+
- (void)setShouldDisplaySubtitles:(BOOL)flag;
- (BOOL)shouldDisplaySubtitles;
@@ -293,4 +295,13 @@ extern NSString *WebPreferencesChangedInternalNotification;
- (void)setNotificationsEnabled:(BOOL)flag;
- (BOOL)notificationsEnabled;
+- (void)setShouldRespectImageOrientation:(BOOL)flag;
+- (BOOL)shouldRespectImageOrientation;
+
+- (BOOL)requestAnimationFrameEnabled;
+- (void)setRequestAnimationFrameEnabled:(BOOL)enabled;
+
+- (void)setIncrementalRenderingSuppressionTimeoutInSeconds:(NSTimeInterval)timeout;
+- (NSTimeInterval)incrementalRenderingSuppressionTimeoutInSeconds;
+
@end
diff --git a/Source/WebKit/mac/WebView/WebUIDelegatePrivate.h b/Source/WebKit/mac/WebView/WebUIDelegatePrivate.h
index 9f1801961..991323173 100644
--- a/Source/WebKit/mac/WebView/WebUIDelegatePrivate.h
+++ b/Source/WebKit/mac/WebView/WebUIDelegatePrivate.h
@@ -187,7 +187,6 @@ extern NSString *WebConsoleMessageDebugMessageLevel;
- (void)webView:(WebView *)sender willPopupMenu:(NSMenu *)menu;
- (void)webView:(WebView *)sender contextMenuItemSelected:(NSMenuItem *)item forElement:(NSDictionary *)element;
- (void)webView:(WebView *)sender saveFrameView:(WebFrameView *)frameView showingPanel:(BOOL)showingPanel;
-- (BOOL)webView:(WebView *)sender shouldHaltPlugin:(DOMNode *)pluginNode isWindowed:(BOOL)isWindowed pluginName:(NSString *)pluginName;
- (BOOL)webView:(WebView *)sender didPressMissingPluginButton:(DOMElement *)element;
/*!
@method webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:
diff --git a/Source/WebKit/mac/WebView/WebView.mm b/Source/WebKit/mac/WebView/WebView.mm
index 9cfe8b348..ccf55413a 100644
--- a/Source/WebKit/mac/WebView/WebView.mm
+++ b/Source/WebKit/mac/WebView/WebView.mm
@@ -32,8 +32,10 @@
#import "WebViewData.h"
#import "DOMCSSStyleDeclarationInternal.h"
+#import "DOMDocumentInternal.h"
#import "DOMNodeInternal.h"
#import "DOMRangeInternal.h"
+#import "WebAlternativeTextClient.h"
#import "WebApplicationCache.h"
#import "WebBackForwardListInternal.h"
#import "WebBaseNetscapePluginView.h"
@@ -70,6 +72,7 @@
#import "WebInspector.h"
#import "WebInspectorClient.h"
#import "WebKitErrors.h"
+#import "WebKitFullScreenListener.h"
#import "WebKitLogging.h"
#import "WebKitNSStringExtras.h"
#import "WebKitStatisticsPrivate.h"
@@ -129,6 +132,8 @@
#import <WebCore/FrameTree.h>
#import <WebCore/FrameView.h>
#import <WebCore/GCController.h>
+#import <WebCore/GeolocationController.h>
+#import <WebCore/GeolocationError.h>
#import <WebCore/HTMLMediaElement.h>
#import <WebCore/HTMLNames.h>
#import <WebCore/HistoryItem.h>
@@ -188,11 +193,6 @@
#import <WebKit/WebDashboardRegion.h>
#endif
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
-#import <WebCore/GeolocationController.h>
-#import <WebCore/GeolocationError.h>
-#endif
-
#if ENABLE(GLIB_SUPPORT)
#import <glib.h>
#endif
@@ -689,6 +689,13 @@ static NSString *leakOutlookQuirksUserScriptContents()
outlookQuirksScriptContents, KURL(), nullptr, nullptr, InjectAtDocumentEnd, InjectInAllFrames);
}
+static bool shouldRespectPriorityInCSSAttributeSetters()
+{
+ static bool isIAdProducerNeedingAttributeSetterQuirk = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_CSS_ATTRIBUTE_SETTERS_IGNORING_PRIORITY)
+ && [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.iAdProducer"];
+ return isIAdProducerNeedingAttributeSetterQuirk;
+}
+
- (void)_commonInitializationWithFrameName:(NSString *)frameName groupName:(NSString *)groupName
{
WebCoreThreadViolationCheckRoundTwo();
@@ -729,6 +736,8 @@ static NSString *leakOutlookQuirksUserScriptContents()
// Initialize our platform strategies.
WebPlatformStrategies::initialize();
Settings::setDefaultMinDOMTimerInterval(0.004);
+
+ Settings::setShouldRespectPriorityInCSSAttributeSetters(shouldRespectPriorityInCSSAttributeSetters());
didOneTimeInitialization = true;
}
@@ -739,11 +748,12 @@ static NSString *leakOutlookQuirksUserScriptContents()
pageClients.editorClient = new WebEditorClient(self);
pageClients.dragClient = new WebDragClient(self);
pageClients.inspectorClient = new WebInspectorClient(self);
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- pageClients.geolocationClient = new WebGeolocationClient(self);
-#endif
+ pageClients.alternativeTextClient = new WebAlternativeTextClient(self);
_private->page = new Page(pageClients);
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(GEOLOCATION)
+ WebCore::provideGeolocationTo(_private->page, new WebGeolocationClient(self));
+#endif
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
WebCore::provideNotification(_private->page, new WebNotificationClient(self));
#endif
#if ENABLE(DEVICE_ORIENTATION)
@@ -838,6 +848,7 @@ static NSString *leakOutlookQuirksUserScriptContents()
_private = [[WebViewPrivate alloc] init];
[self _commonInitializationWithFrameName:frameName groupName:groupName];
[self setMaintainsBackForwardList: YES];
+ _private->page->setDeviceScaleFactor([self _deviceScaleFactor]);
return self;
}
@@ -1508,7 +1519,9 @@ static bool needsSelfRetainWhileLoadingQuirk()
settings->setMediaPlaybackRequiresUserGesture([preferences mediaPlaybackRequiresUserGesture]);
settings->setMediaPlaybackAllowsInline([preferences mediaPlaybackAllowsInline]);
settings->setSuppressesIncrementalRendering([preferences suppressesIncrementalRendering]);
+ settings->setRegionBasedColumnsEnabled([preferences regionBasedColumnsEnabled]);
settings->setBackspaceKeyNavigationEnabled([preferences backspaceKeyNavigationEnabled]);
+ settings->setWantsBalancedSetDefersLoadingBehavior([preferences wantsBalancedSetDefersLoadingBehavior]);
settings->setMockScrollbarsEnabled([preferences mockScrollbarsEnabled]);
#if ENABLE(VIDEO_TRACK)
@@ -1517,7 +1530,13 @@ static bool needsSelfRetainWhileLoadingQuirk()
settings->setShouldDisplayTextDescriptions([preferences shouldDisplayTextDescriptions]);
#endif
+ settings->setShouldRespectImageOrientation([preferences shouldRespectImageOrientation]);
settings->setNeedsIsLoadingInAPISenseQuirk([self _needsIsLoadingInAPISenseQuirk]);
+ settings->setRequestAnimationFrameEnabled([preferences requestAnimationFrameEnabled]);
+
+ NSTimeInterval timeout = [preferences incrementalRenderingSuppressionTimeoutInSeconds];
+ if (timeout > 0)
+ settings->setIncrementalRenderingSuppressionTimeoutInSeconds(timeout);
// Application Cache Preferences are stored on the global cache storage manager, not in Settings.
[WebApplicationCache setDefaultOriginQuota:[preferences applicationCacheDefaultOriginQuota]];
@@ -1833,6 +1852,20 @@ static inline IMP getMethod(id o, SEL s)
}
[NSApp setWindowsNeedUpdate:YES];
+
+#if ENABLE(FULLSCREEN_API)
+ Document* document = core([frame DOMDocument]);
+ if (Element* element = document ? document->webkitCurrentFullScreenElement() : 0) {
+ SEL selector = @selector(webView:closeFullScreenWithListener:);
+ if (_private->UIDelegate && [_private->UIDelegate respondsToSelector:selector]) {
+ WebKitFullScreenListener *listener = [[WebKitFullScreenListener alloc] initWithElement:element];
+ CallUIDelegate(self, selector, listener);
+ [listener release];
+ } else if (_private->newFullscreenController && [_private->newFullscreenController isFullScreen]) {
+ [_private->newFullscreenController close];
+ }
+ }
+#endif
}
- (void)_didCommitLoadForFrame:(WebFrame *)frame
@@ -2036,7 +2069,7 @@ static inline IMP getMethod(id o, SEL s)
[regionValues release];
}
- WebDashboardRegion *webRegion = [[WebDashboardRegion alloc] initWithRect:region.bounds clip:region.clip type:type];
+ WebDashboardRegion *webRegion = [[WebDashboardRegion alloc] initWithRect:pixelSnappedIntRect(region.bounds) clip:pixelSnappedIntRect(region.clip) type:type];
[regionValues addObject:webRegion];
[webRegion release];
}
@@ -2497,7 +2530,7 @@ static inline IMP getMethod(id o, SEL s)
NSMutableArray* rectsArray = [[NSMutableArray alloc] initWithCapacity:repaintRects.size()];
for (unsigned i = 0; i < repaintRects.size(); ++i)
- [rectsArray addObject:[NSValue valueWithRect:repaintRects[i]]];
+ [rectsArray addObject:[NSValue valueWithRect:pixelSnappedIntRect(repaintRects[i])]];
return [rectsArray autorelease];
}
@@ -2882,7 +2915,7 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
_private->customDeviceScaleFactor = customScaleFactor;
if (oldScaleFactor != [self _deviceScaleFactor])
- _private->page->setDeviceScaleFactor(customScaleFactor);
+ _private->page->setDeviceScaleFactor([self _deviceScaleFactor]);
}
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(NSUInteger)limit
@@ -3945,6 +3978,7 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl
_private->hostWindow = [hostWindow retain];
for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame))
[[[kit(frame) frameView] documentView] viewDidMoveToHostWindow];
+ _private->page->setDeviceScaleFactor([self _deviceScaleFactor]);
}
- (NSWindow *)hostWindow
@@ -4234,7 +4268,13 @@ static WebFrame *incrementFrame(WebFrame *frame, WebFindOptions options = 0)
- (void)setMainFrameURL:(NSString *)URLString
{
- [[self mainFrame] loadRequest: [NSURLRequest requestWithURL: [NSURL _web_URLWithDataAsString: URLString]]];
+ NSURL *url;
+ if ([URLString hasPrefix:@"/"])
+ url = [NSURL fileURLWithPath:URLString];
+ else
+ url = [NSURL _web_URLWithDataAsString:URLString];
+
+ [[self mainFrame] loadRequest:[NSURLRequest requestWithURL:url]];
}
- (NSString *)mainFrameURL
@@ -5484,7 +5524,7 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
WebFrame *webFrame = [self _selectedOrMainFrame];
Frame* coreFrame = core(webFrame);
if (coreFrame)
- coreFrame->editor()->handleCorrectionPanelResult(result);
+ coreFrame->editor()->handleAlternativeTextUIResult(result);
}
#endif
@@ -5611,6 +5651,17 @@ FOR_EACH_RESPONDER_SELECTOR(FORWARD)
return coreFrame->selection()->isAll(CanCrossEditingBoundary);
}
+- (void)_simplifyMarkup:(DOMNode *)startNode endNode:(DOMNode *)endNode
+{
+ Frame* coreFrame = core([self mainFrame]);
+ if (!coreFrame || !startNode)
+ return;
+ Node* coreStartNode= core(startNode);
+ if (coreStartNode->document() != coreFrame->document())
+ return;
+ return coreFrame->editor()->simplifyMarkup(coreStartNode, core(endNode));
+}
+
@end
static WebFrameView *containingFrameView(NSView *view)
@@ -5628,13 +5679,18 @@ static WebFrameView *containingFrameView(NSView *view)
return _private->customDeviceScaleFactor;
NSWindow *window = [self window];
+ NSWindow *hostWindow = [self hostWindow];
#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
if (window)
return [window backingScaleFactor];
+ if (hostWindow)
+ return [hostWindow backingScaleFactor];
return [[NSScreen mainScreen] backingScaleFactor];
#else
if (window)
return [window userSpaceScaleFactor];
+ if (hostWindow)
+ return [hostWindow userSpaceScaleFactor];
return [[NSScreen mainScreen] userSpaceScaleFactor];
#endif
}
@@ -6286,14 +6342,9 @@ bool LayerFlushController::flushLayers()
#if ENABLE(FULLSCREEN_API)
- (BOOL)_supportsFullScreenForElement:(const WebCore::Element*)element withKeyboard:(BOOL)withKeyboard
{
- if (withKeyboard)
- return NO;
-
if (![[WebPreferences standardPreferences] fullScreenEnabled])
return NO;
- // FIXME: If the element is in an IFrame, we should ensure it has
- // an AllowsFullScreen=YES attribute before allowing fullscreen access.
return YES;
}
@@ -6387,20 +6438,20 @@ static void glibContextIterationCallback(CFRunLoopObserverRef, CFRunLoopActivity
- (void)_geolocationDidChangePosition:(WebGeolocationPosition *)position
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
if (_private && _private->page)
- _private->page->geolocationController()->positionChanged(core(position));
-#endif
+ WebCore::GeolocationController::from(_private->page)->positionChanged(core(position));
+#endif // ENABLE(GEOLOCATION)
}
- (void)_geolocationDidFailWithError:(NSError *)error
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
if (_private && _private->page) {
RefPtr<GeolocationError> geolocatioError = GeolocationError::create(GeolocationError::PositionUnavailable, [error localizedDescription]);
- _private->page->geolocationController()->errorOccurred(geolocatioError.get());
+ WebCore::GeolocationController::from(_private->page)->errorOccurred(geolocatioError.get());
}
-#endif
+#endif // ENABLE(GEOLOCATION)
}
@end
@@ -6461,25 +6512,6 @@ 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
-
void WebInstallMemoryPressureHandler(void)
{
memoryPressureHandler().install();
diff --git a/Source/WebKit/mac/WebView/WebViewPrivate.h b/Source/WebKit/mac/WebView/WebViewPrivate.h
index 1b61821d1..02f7bcc45 100644
--- a/Source/WebKit/mac/WebView/WebViewPrivate.h
+++ b/Source/WebKit/mac/WebView/WebViewPrivate.h
@@ -697,6 +697,8 @@ Could be worth adding to the API.
- (void)_replaceSelectionWithNode:(DOMNode *)node matchStyle:(BOOL)matchStyle;
- (BOOL)_selectionIsCaret;
- (BOOL)_selectionIsAll;
+- (void)_simplifyMarkup:(DOMNode *)startNode endNode:(DOMNode *)endNode;
+
@end
@interface WebView (WebViewDeviceOrientation)
@@ -747,10 +749,6 @@ 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 (WebViewFrameLoadDelegatePrivate)
- (void)webView:(WebView *)sender didFirstLayoutInFrame:(WebFrame *)frame;
diff --git a/Source/WebKit/qt/Api/qwebdatabase_p.h b/Source/WebKit/qt/Api/qwebdatabase_p.h
index ec03ea5e2..298470442 100644
--- a/Source/WebKit/qt/Api/qwebdatabase_p.h
+++ b/Source/WebKit/qt/Api/qwebdatabase_p.h
@@ -24,7 +24,7 @@
#include "PlatformString.h"
#include "SecurityOrigin.h"
-#include "RefPtr.h"
+#include <wtf/RefPtr.h>
class QWebDatabasePrivate : public QSharedData {
diff --git a/Source/WebKit/qt/Api/qwebelement.cpp b/Source/WebKit/qt/Api/qwebelement.cpp
index 3fc64c96f..fb9be7892 100644
--- a/Source/WebKit/qt/Api/qwebelement.cpp
+++ b/Source/WebKit/qt/Api/qwebelement.cpp
@@ -26,7 +26,6 @@
#include "CSSRule.h"
#include "CSSRuleList.h"
#include "CSSStyleRule.h"
-#include "CSSStyleSelector.h"
#include "Document.h"
#include "DocumentFragment.h"
#include "FrameView.h"
@@ -51,6 +50,7 @@
#include "RenderImage.h"
#include "ScriptState.h"
#include "StaticNodeList.h"
+#include "StyleResolver.h"
#include "qwebframe.h"
#include "qwebframe_p.h"
#if USE(JSC)
@@ -552,7 +552,7 @@ QRect QWebElement::geometry() const
{
if (!m_element)
return QRect();
- return m_element->getRect();
+ return m_element->getPixelSnappedRect();
}
/*!
@@ -839,7 +839,7 @@ QString QWebElement::styleProperty(const QString &name, StyleResolveStrategy str
if (!m_element || !m_element->isStyledElement())
return QString();
- int propID = cssPropertyID(name);
+ CSSPropertyID propID = cssPropertyID(name);
if (!propID)
return QString();
@@ -862,7 +862,7 @@ QString QWebElement::styleProperty(const QString &name, StyleResolveStrategy str
// declarations, as well as embedded and inline style declarations.
Document* doc = m_element->document();
- if (RefPtr<CSSRuleList> rules = doc->styleSelector()->styleRulesForElement(m_element, /*authorOnly*/ true)) {
+ if (RefPtr<CSSRuleList> rules = doc->styleResolver()->styleRulesForElement(m_element, /*authorOnly*/ true)) {
for (int i = rules->length(); i > 0; --i) {
CSSStyleRule* rule = static_cast<CSSStyleRule*>(rules->item(i - 1));
@@ -881,8 +881,6 @@ QString QWebElement::styleProperty(const QString &name, StyleResolveStrategy str
if (!m_element || !m_element->isStyledElement())
return QString();
- int propID = cssPropertyID(name);
-
RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(m_element, true);
if (!propID || !style)
return QString();
@@ -908,7 +906,7 @@ void QWebElement::setStyleProperty(const QString &name, const QString &value)
if (!m_element || !m_element->isStyledElement())
return;
- int propID = cssPropertyID(name);
+ CSSPropertyID propID = cssPropertyID(name);
static_cast<StyledElement*>(m_element)->setInlineStyleProperty(propID, value);
}
@@ -1495,7 +1493,7 @@ void QWebElement::render(QPainter* painter, const QRect& clip)
view->updateLayoutAndStyleIfNeededRecursive();
- IntRect rect = e->getRect();
+ IntRect rect = e->getPixelSnappedRect();
if (rect.size().isEmpty())
return;
diff --git a/Source/WebKit/qt/Api/qwebframe.cpp b/Source/WebKit/qt/Api/qwebframe.cpp
index dcf23061d..f09a8a80d 100644
--- a/Source/WebKit/qt/Api/qwebframe.cpp
+++ b/Source/WebKit/qt/Api/qwebframe.cpp
@@ -1509,7 +1509,7 @@ void QWebFrame::print(QPrinter *printer) const
int(qprinterRect.width() / zoomFactorX),
int(qprinterRect.height() / zoomFactorY));
- printContext.begin(pageRect.width());
+ printContext.begin(pageRect.width(), pageRect.height());
printContext.computePageRects(pageRect, /* headerHeight */ 0, /* footerHeight */ 0, /* userScaleFactor */ 1.0, pageHeight);
diff --git a/Source/WebKit/qt/Api/qwebkitplatformplugin.h b/Source/WebKit/qt/Api/qwebkitplatformplugin.h
index b28c05801..aa8ec7ea6 100644
--- a/Source/WebKit/qt/Api/qwebkitplatformplugin.h
+++ b/Source/WebKit/qt/Api/qwebkitplatformplugin.h
@@ -75,7 +75,7 @@ public:
virtual const QString title() const = 0;
virtual const QString message() const = 0;
- virtual const QByteArray iconData() const = 0;
+ virtual const QUrl iconUrl() const = 0;
virtual const QUrl openerPageUrl() const = 0;
};
@@ -180,7 +180,7 @@ public:
};
QT_BEGIN_NAMESPACE
-Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.8");
+Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.9");
QT_END_NAMESPACE
#endif // QWEBKITPLATFORMPLUGIN_H
diff --git a/Source/WebKit/qt/Api/qwebpage.cpp b/Source/WebKit/qt/Api/qwebpage.cpp
index 4928318d6..e85dfd282 100644
--- a/Source/WebKit/qt/Api/qwebpage.cpp
+++ b/Source/WebKit/qt/Api/qwebpage.cpp
@@ -45,9 +45,11 @@
#include "ContextMenu.h"
#include "ContextMenuClientQt.h"
#include "ContextMenuController.h"
+#if ENABLE(DEVICE_ORIENTATION)
#include "DeviceMotionClientQt.h"
#include "DeviceOrientationClientMock.h"
#include "DeviceOrientationClientQt.h"
+#endif
#include "DocumentLoader.h"
#include "DragClientQt.h"
#include "DragController.h"
@@ -64,16 +66,16 @@
#include "FrameLoaderClientQt.h"
#include "FrameTree.h"
#include "FrameView.h"
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
#include "GeolocationClientMock.h"
#include "GeolocationClientQt.h"
-#endif // CLIENT_BASED_GEOLOCATION
+#include "GeolocationController.h"
+#endif
#include "GeolocationPermissionClientQt.h"
#include "HTMLFormElement.h"
#include "HTMLFrameOwnerElement.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
-#include "HashMap.h"
#include "HitTestResult.h"
#include "Image.h"
#include "InitWebCoreQt.h"
@@ -100,7 +102,6 @@
#include "PluginPackage.h"
#include "ProgressTracker.h"
#include "QtPlatformPlugin.h"
-#include "RefPtr.h"
#include "RenderTextControl.h"
#include "RenderThemeQt.h"
#include "SchemeRegistry.h"
@@ -314,7 +315,7 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
, inspectorIsInternalOnly(false)
, m_lastDropAction(Qt::IgnoreAction)
{
-#if ENABLE(DEVICE_ORIENTATION) || ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION) || ENABLE(DEVICE_ORIENTATION)
bool useMock = QWebPagePrivate::drtRun;
#endif
@@ -326,13 +327,16 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
pageClients.editorClient = new EditorClientQt(q);
pageClients.dragClient = new DragClientQt(q);
pageClients.inspectorClient = new InspectorClientQt(q);
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- if (useMock)
- pageClients.geolocationClient = new GeolocationClientMock;
- else
- pageClients.geolocationClient = new GeolocationClientQt(q);
-#endif
page = new Page(pageClients);
+#if ENABLE(GEOLOCATION)
+ if (useMock) {
+ // In case running in DumpRenderTree mode set the controller to mock provider.
+ GeolocationClientMock* mock = new GeolocationClientMock;
+ WebCore::provideGeolocationTo(page, mock);
+ mock->setController(WebCore::GeolocationController::from(page));
+ } else
+ WebCore::provideGeolocationTo(page, new GeolocationClientQt(q));
+#endif
#if ENABLE(DEVICE_ORIENTATION)
if (useMock)
WebCore::provideDeviceOrientationTo(page, new DeviceOrientationClientMock);
@@ -340,7 +344,7 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
WebCore::provideDeviceOrientationTo(page, new DeviceOrientationClientQt);
WebCore::provideDeviceMotionTo(page, new DeviceMotionClientQt);
#endif
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
WebCore::provideNotification(page, NotificationPresenterClientQt::notificationPresenter());
#endif
@@ -351,19 +355,18 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
// as expected out of the box, we use a default group similar to what other ports are doing.
page->setGroupName("Default Group");
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- // In case running in DumpRenderTree mode set the controller to mock provider.
- if (QWebPagePrivate::drtRun)
- static_cast<GeolocationClientMock*>(pageClients.geolocationClient)->setController(page->geolocationController());
-#endif
settings = new QWebSettings(page->settings());
+#if ENABLE(WEB_SOCKETS)
+ page->settings()->setUseHixie76WebSocketProtocol(false);
+#endif
+
history.d = new QWebHistoryPrivate(static_cast<WebCore::BackForwardListImpl*>(page->backForwardList()));
memset(actions, 0, sizeof(actions));
PageGroup::setShouldTrackVisitedLinks(true);
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterClientQt::notificationPresenter()->addClient();
#endif
}
@@ -387,7 +390,7 @@ QWebPagePrivate::~QWebPagePrivate()
if (inspector)
inspector->setPage(0);
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterClientQt::notificationPresenter()->removeClient();
#endif
}
@@ -1346,7 +1349,7 @@ bool QWebPagePrivate::touchEvent(QTouchEvent* event)
event->setAccepted(true);
// Return whether the default action was cancelled in the JS event handler
- return frame->eventHandler()->handleTouchEvent(PlatformTouchEvent(event));
+ return frame->eventHandler()->handleTouchEvent(convertTouchEvent(event));
#else
event->ignore();
return false;
@@ -1391,7 +1394,7 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const
case Qt::ImFont: {
if (renderTextControl) {
RenderStyle* renderStyle = renderTextControl->style();
- return QVariant(QFont(renderStyle->font().font()));
+ return QVariant(QFont(renderStyle->font().syntheticFont()));
}
return QVariant(QFont());
}
@@ -1564,7 +1567,7 @@ IntPoint QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch(const IntPoi
int x = touchPoint.x();
int y = touchPoint.y();
- RefPtr<NodeList> intersectedNodes = document->nodesFromRect(x, y, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding, false);
+ RefPtr<NodeList> intersectedNodes = document->nodesFromRect(x, y, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding, false /*ignoreClipping*/, false /*allowShadowContent*/);
if (!intersectedNodes)
return IntPoint();
@@ -1584,7 +1587,7 @@ IntPoint QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch(const IntPoi
if (!currentElement || (!isClickableElement(currentElement, 0) && !isValidFrameOwner(currentElement)))
continue;
- IntRect currentElementBoundingRect = currentElement->getRect();
+ IntRect currentElementBoundingRect = currentElement->getPixelSnappedRect();
currentElementBoundingRect.intersect(touchRect);
if (currentElementBoundingRect.isEmpty())
@@ -1632,6 +1635,7 @@ IntPoint QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch(const IntPoi
\value FindWrapsAroundDocument Makes findText() restart from the beginning of the document if the end
was reached and the text was not found.
\value HighlightAllOccurrences Highlights all existing occurrences of a specific string.
+ (This value was introduced in 4.6.)
*/
/*!
@@ -2149,7 +2153,7 @@ void QWebPage::setFeaturePermission(QWebFrame* frame, Feature feature, Permissio
{
switch (feature) {
case Notifications:
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
if (policy == PermissionGrantedByUser)
NotificationPresenterClientQt::notificationPresenter()->allowNotificationForFrame(frame->d->frame);
#endif
@@ -2529,7 +2533,7 @@ QWebPage::ViewportAttributes QWebPage::viewportAttributesForSize(const QSize& av
WebCore::restrictScaleFactorToInitialScaleIfNotUserScalable(conf);
result.m_isValid = true;
- result.m_size = conf.layoutSize;
+ result.m_size = QSizeF(conf.layoutSize.width(), conf.layoutSize.height());
result.m_initialScaleFactor = conf.initialScale;
result.m_minimumScaleFactor = conf.minimumScale;
result.m_maximumScaleFactor = conf.maximumScale;
diff --git a/Source/WebKit/qt/Api/qwebpage.h b/Source/WebKit/qt/Api/qwebpage.h
index fd2fd4b3b..0bf35e247 100644
--- a/Source/WebKit/qt/Api/qwebpage.h
+++ b/Source/WebKit/qt/Api/qwebpage.h
@@ -232,7 +232,7 @@ public:
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 QSizeF size() const { return m_size; }
private:
QSharedDataPointer<QtViewportAttributesPrivate> d;
@@ -242,7 +242,7 @@ public:
qreal m_devicePixelRatio;
bool m_isUserScalable;
bool m_isValid;
- QSize m_size;
+ QSizeF m_size;
friend class WebCore::ChromeClientQt;
friend class QWebPage;
diff --git a/Source/WebKit/qt/Api/qwebscriptworld_p.h b/Source/WebKit/qt/Api/qwebscriptworld_p.h
index 7115eb2c5..8c18e23ed 100644
--- a/Source/WebKit/qt/Api/qwebscriptworld_p.h
+++ b/Source/WebKit/qt/Api/qwebscriptworld_p.h
@@ -20,7 +20,7 @@
#ifndef _QWEBSCRIPTWORLD_P_H_
#define _QWEBSCRIPTWORLD_P_H_
-#include "RefPtr.h"
+#include <wtf/RefPtr.h>
namespace WebCore {
class DOMWrapperWorld;
diff --git a/Source/WebKit/qt/Api/qwebsecurityorigin_p.h b/Source/WebKit/qt/Api/qwebsecurityorigin_p.h
index cdc93bd14..1b64c49f0 100644
--- a/Source/WebKit/qt/Api/qwebsecurityorigin_p.h
+++ b/Source/WebKit/qt/Api/qwebsecurityorigin_p.h
@@ -21,7 +21,7 @@
#define _WEBSECURITYORIGIN_P_H_
#include "SecurityOrigin.h"
-#include "RefPtr.h"
+#include <wtf/RefPtr.h>
class QWebSecurityOriginPrivate : public QSharedData {
public:
diff --git a/Source/WebKit/qt/Api/qwebsettings.cpp b/Source/WebKit/qt/Api/qwebsettings.cpp
index 0f55b0b89..ca264c8af 100644
--- a/Source/WebKit/qt/Api/qwebsettings.cpp
+++ b/Source/WebKit/qt/Api/qwebsettings.cpp
@@ -442,11 +442,13 @@ QWebSettings* QWebSettings::globalSettings()
web application cache feature is enabled or not. This is disabled by default.
\value LocalStorageEnabled Specifies whether support for the HTML 5
local storage feature is enabled or not. This is disabled by default.
+ (This value was introduced in 4.6.)
\value LocalStorageDatabaseEnabled \e{This enum value is deprecated.} Use
QWebSettings::LocalStorageEnabled instead.
\value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are
allowed to access remote urls. This is disabled by default. For more information
about security origins and local vs. remote content see QWebSecurityOrigin.
+ (This value was introduced in 4.6.)
\value LocalContentCanAccessFileUrls Specifies whether locally loaded documents are
allowed to access other local urls. This is enabled by default. For more information
about security origins and local vs. remote content see QWebSecurityOrigin.
diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog
index d9c4ee953..9bb4acc99 100644
--- a/Source/WebKit/qt/ChangeLog
+++ b/Source/WebKit/qt/ChangeLog
@@ -1,3 +1,755 @@
+2012-05-06 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert isPageBoxVisible to use Internals interface.
+ https://bugs.webkit.org/show_bug.cgi?id=85692
+
+ Reviewed by Darin Adler.
+
+ Remove isPageBoxVisible functions, because it is able to work in the
+ cross-port way through the Internals interface.
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
+2012-05-04 Nate Chapin <japhet@chromium.org>
+
+ Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+ https://bugs.webkit.org/show_bug.cgi?id=85533
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::FrameLoaderClientQt):
+ (WebCore):
+ (WebCore::FrameLoaderClientQt::finishedLoading):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+ (WebCore::FrameLoaderClientQt::makeRepresentation):
+ (WebCore::FrameLoaderClientQt::revertToProvisionalState):
+ (FrameLoaderClientQt):
+
+2012-05-03 Fady Samuel <fsamuel@chromium.org>
+
+ Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
+ https://bugs.webkit.org/show_bug.cgi?id=70609
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::viewportAttributesForSize):
+ * Api/qwebpage.h:
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::viewportAsText):
+
+2012-04-27 Jon Lee <jonlee@apple.com>
+
+ Migrate permission functions to Notification from NotificationCenter
+ https://bugs.webkit.org/show_bug.cgi?id=80485
+ <rdar://problem/10965458>
+
+ Reviewed by Jian Li.
+
+ * WebCoreSupport/NotificationPresenterClientQt.h:
+ (NotificationPresenterClientQt): Add stub implementation of requestPermission.
+ (WebCore::NotificationPresenterClientQt::requestPermission):
+
+2012-05-02 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r115907.
+ http://trac.webkit.org/changeset/115907
+ https://bugs.webkit.org/show_bug.cgi?id=85458
+
+ It broke all viewport tests on Qt and on GTK (Requested by
+ Ossy on #webkit).
+
+ * Api/qwebpage.cpp:
+ (QWebPage::viewportAttributesForSize):
+ * Api/qwebpage.h:
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::viewportAsText):
+
+2012-04-18 Jon Honeycutt <jhoneycutt@apple.com>
+
+ FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
+ information about the form being submitted
+ https://bugs.webkit.org/show_bug.cgi?id=84297
+
+ Reviewed by Andy Estes.
+
+ * WebCoreSupport/FrameLoaderClientQt.h:
+ (WebCore::FrameLoaderClientQt::dispatchWillSendSubmitEvent):
+ Updated method declaration.
+
+2012-05-02 Fady Samuel <fsamuel@chromium.org>
+
+ Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
+ https://bugs.webkit.org/show_bug.cgi?id=70609
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * Api/qwebpage.h:
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::viewportAsText):
+
+2012-05-02 Milian Wolff <milian.wolff@kdab.com>
+
+ [Qt] Pass page-height to PrintContext::begin to fix print layouting
+ https://bugs.webkit.org/show_bug.cgi?id=84864
+
+ Reviewed by Simon Hausmann.
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::print):
+
+2012-05-02 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ [Qt] Add initial QML documentation
+ https://bugs.webkit.org/show_bug.cgi?id=85370
+
+ Reviewed by Simon Hausmann.
+
+ * docs/qtwebkit.qdocconf: Add WebKit2 dirs.
+
+2012-05-02 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Buildfix after r115812 for !ENABLE(DEVICE_ORIENTATION) builds.
+ https://bugs.webkit.org/show_bug.cgi?id=64595
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * Api/qwebpage.cpp:
+
+2012-04-27 Allan Sandfeld Jensen <allan.jensen@nokia.com>
+
+ Move WebKit1 specific conversion of touch-events to WebKit1
+ https://bugs.webkit.org/show_bug.cgi?id=84951
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Fix compile when touch-events are disabled.
+
+ * WebCoreSupport/WebEventConversion.cpp:
+ (WebCore):
+ * WebCoreSupport/WebEventConversion.h:
+ (WebCore):
+
+2012-04-26 Allan Sandfeld Jensen <allan.jensen@nokia.com>
+
+ Move WebKit1 specific conversion of touch-events to WebKit1.
+ https://bugs.webkit.org/show_bug.cgi?id=84951
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::touchEvent):
+ * WebCoreSupport/WebEventConversion.cpp:
+ (WebKitPlatformTouchEvent):
+ (WebKitPlatformTouchPoint):
+ (WebCore::WebKitPlatformTouchEvent::WebKitPlatformTouchEvent):
+ (WebCore::WebKitPlatformTouchPoint::WebKitPlatformTouchPoint):
+ (WebCore::convertTouchEvent):
+ * WebCoreSupport/WebEventConversion.h:
+
+2012-04-25 Alexis Menard <alexis.menard@openbossa.org>
+
+ Rename CSSStyleSelector files to StyleResolver.
+ https://bugs.webkit.org/show_bug.cgi?id=84814
+
+ Reviewed by Antti Koivisto.
+
+ Rename CSSStyleSelector files to match the new class name StyleResolver.
+ Update the includes all over the code base to the new name.
+
+ * Api/qwebelement.cpp:
+ * WebCoreSupport/RenderThemeQStyle.cpp:
+
+2012-04-25 Milian Wolff <milian.wolff@kdab.com>
+
+ [Qt] add LayoutTestController::setPrinting support to Qt unit tests
+ https://bugs.webkit.org/show_bug.cgi?id=84246
+
+ Reviewed by Simon Hausmann.
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::paintPagesWithBoundaries):
+ * Api/qwebframe.h:
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::paintPagesWithBoundaries):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
+2012-04-24 Alexis Menard <alexis.menard@openbossa.org>
+
+ Replace occurences of style selector from variables and methods names by style resolver.
+ https://bugs.webkit.org/show_bug.cgi?id=84765
+
+ Reviewed by Andreas Kling.
+
+ Rename methods and variables to follow the new name StyleResolver. It requires to update the
+ local variables, methods parameters, and function names to match the new name and to remove
+ the concept of "selector" to avoid clashing with the CSS concept. The next and last patch
+ will be to rename CSSStyleSelector file and update the includes.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::styleProperty):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::setMediaType):
+ * WebCoreSupport/RenderThemeQStyle.cpp:
+ (WebCore::RenderThemeQStyle::adjustButtonStyle):
+ (WebCore::RenderThemeQStyle::adjustTextAreaStyle):
+ (WebCore::RenderThemeQStyle::adjustMenuListButtonStyle):
+ (WebCore::RenderThemeQStyle::adjustSliderThumbStyle):
+ (WebCore::RenderThemeQStyle::adjustSearchFieldDecorationStyle):
+ (WebCore::RenderThemeQStyle::adjustSearchFieldResultsDecorationStyle):
+
+2012-04-24 Alexis Menard <alexis.menard@openbossa.org>
+
+ Rename CSSStyleSelector class to StyleResolver.
+ https://bugs.webkit.org/show_bug.cgi?id=84734
+
+ Reviewed by Andreas Kling.
+
+ The name CSSStyleSelector is confusing as it conflicts a bit with
+ the CSS concept of selectors. One could think it's an encapsulation
+ of the CSS selectors but it's not, in fact this class is responsible
+ of finding the RenderStyle for a given element. This is the first patch
+ as I will later rename the files, and then rename the local variables.
+
+ * WebCoreSupport/RenderThemeQStyle.cpp:
+ (WebCore::RenderThemeQStyle::adjustButtonStyle):
+ (WebCore::RenderThemeQStyle::adjustTextAreaStyle):
+ (WebCore::RenderThemeQStyle::adjustMenuListButtonStyle):
+ (WebCore::RenderThemeQStyle::adjustSliderTrackStyle):
+ (WebCore::RenderThemeQStyle::adjustSliderThumbStyle):
+ (WebCore::RenderThemeQStyle::adjustSearchFieldDecorationStyle):
+ (WebCore::RenderThemeQStyle::adjustSearchFieldResultsDecorationStyle):
+ * WebCoreSupport/RenderThemeQStyle.h:
+ (RenderThemeQStyle):
+
+2012-04-24 Yael Aharon <yael.aharon@nokia.com>
+
+ [Qt] Move notification icon download out of WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=80700
+
+ Reviewed by Simon Hausmann.
+
+ Remove the code that handles the notification's icon and use the icon url instead.
+ The "display" event has to be asynchronous, so a timer was added to achieve that.
+ The platform plugin API and example were updated to reflect this change.
+ This change does not address the recent changes in web notifications spec.
+
+ * Api/qwebkitplatformplugin.h:
+ (QWebNotificationData):
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore::NotificationWrapper::NotificationWrapper):
+ (WebCore::NotificationWrapper::sendDisplayEvent):
+ (WebCore):
+ (WebCore::NotificationWrapper::iconUrl):
+ (WebCore::NotificationPresenterClientQt::show):
+ (WebCore::NotificationPresenterClientQt::displayNotification):
+ (WebCore::NotificationPresenterClientQt::sendDisplayEvent):
+ * WebCoreSupport/NotificationPresenterClientQt.h:
+ (NotificationWrapper):
+ (NotificationPresenterClientQt):
+ * examples/platformplugin/WebNotificationPresenter.cpp:
+ (WebNotificationWidget::showNotification):
+ * examples/platformplugin/qwebkitplatformplugin.h:
+ (QWebNotificationData):
+
+2012-04-18 Allan Sandfeld Jensen <allan.jensen@nokia.com>
+
+ Clean-up WheelEvent Conversion.
+ https://bugs.webkit.org/show_bug.cgi?id=84243
+
+ Reviewed by Simon Hausmann.
+
+ * WebCoreSupport/WebEventConversion.cpp:
+ (WebCore::WebKitPlatformWheelEvent::applyDelta):
+
+2012-04-13 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Build fix with QT_NO_BEARERMANAGEMENT
+
+ Reviewed by Jocelyn Turcotte.
+
+ * tests/benchmarks/loading/tst_loading.cpp:
+ (tst_Loading):
+ (tst_Loading::load):
+ * tests/benchmarks/painting/tst_painting.cpp:
+ (tst_Painting):
+ (tst_Painting::paint):
+
+2012-04-13 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Fix build on OS X
+
+ We were manually including the directories needed from WTF, instead of
+ using the WEBKIT qmake variable to add dependencies, which also adds
+ other tricks from WTF.pri, such as the right include paths for ICU.
+
+ Reviewed by Simon Hausmann.
+
+ * declarative/experimental/experimental.pri:
+ * declarative/public.pri:
+
+2012-04-12 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt] Fix WebKit1 build with V8
+ https://bugs.webkit.org/show_bug.cgi?id=83322
+
+ Reviewed by Adam Barth.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::didCreateScriptContext):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+ (FrameLoaderClientQt):
+ (WebCore::FrameLoaderClientQt::allowScriptExtension):
+ * WebCoreSupport/InitWebCoreQt.cpp:
+
+2012-03-05 Pierre Rossi <pierre.rossi@gmail.com>
+
+ [Qt] Use QRawFont when building with Qt 5
+ https://bugs.webkit.org/show_bug.cgi?id=78001
+
+ Since QFont is not used internally, we now need
+ to query for a QFont that should be a good
+ enough match.
+
+ Reviewed by Simon Hausmann.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::inputMethodQuery):
+ * WebCoreSupport/PopupMenuQt.cpp:
+ (WebCore::PopupMenuQt::show):
+ * WebCoreSupport/RenderThemeQStyle.cpp:
+ (WebCore::RenderThemeQStyle::computeSizeBasedOnStyle):
+
+2012-04-06 Levi Weintraub <leviw@chromium.org>
+
+ Correct LayoutUnit usgae in RenderThemeQt and RenderThemeQStyle
+ https://bugs.webkit.org/show_bug.cgi?id=83376
+
+ Reviewed by Eric Seidel.
+
+ Calculating the progress animation using the pixel-snapped RenderProgress size instead
+ of the internal sub-pixel version.
+
+ * WebCoreSupport/RenderThemeQStyle.cpp:
+ (WebCore::RenderThemeQStyle::animationDurationForProgressBar):
+
+2012-04-05 Patrick Gansterer <paroga@webkit.org>
+
+ [Qt] Correct <wtf/*.h> include paths.
+ https://bugs.webkit.org/show_bug.cgi?id=83270
+
+ Reviewed by Eric Seidel.
+
+ Modify the #include declerations so that the
+ wtf types are included using the full path.
+
+ * Api/qwebpage.cpp:
+ * WebCoreSupport/ContextMenuClientQt.h:
+ * WebCoreSupport/EditorClientQt.h:
+ * WebCoreSupport/FrameLoaderClientQt.h:
+ * WebCoreSupport/InspectorServerQt.cpp:
+
+2012-04-05 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Fix includes after QtDeclarative -> QtQML renaming
+ https://bugs.webkit.org/show_bug.cgi?id=82195
+
+ Relanding r112651, because Qt5 is updated everywhere.
+
+ * declarative/experimental/plugin.cpp:
+ * declarative/plugin.cpp:
+ (WebKitQmlPlugin::initializeEngine):
+
+2012-04-04 Andras Becsi <andras.becsi@nokia.com>
+
+ [Qt][WK2] Make the WebView a subclass of Flickable
+ https://bugs.webkit.org/show_bug.cgi?id=83033
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add needed dependency to quick-private for projects that include the WebView header.
+
+ * declarative/experimental/experimental.pri:
+ * declarative/public.pri:
+
+2012-04-03 Alexis Menard <alexis.menard@openbossa.org>
+
+ [Part 2] We should use CSSPropertyID rather than integers when manipulating CSS property ids.
+ https://bugs.webkit.org/show_bug.cgi?id=82977
+
+ Reviewed by Andreas Kling.
+
+ Update the code to use CSSPropertyID rather than an integer.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::setStyleProperty):
+
+2012-04-02 Alexis Menard <alexis.menard@openbossa.org>
+
+ We should use CSSPropertyID rather than integers when manipulating CSS property ids.
+ https://bugs.webkit.org/show_bug.cgi?id=82941
+
+ Reviewed by Andreas Kling.
+
+ CSSPropertyID enum holds all the CSS property ids but many parts of WebKit treat the ids
+ as integers. While it's not incorrect it is nicer to use the enum as a parameter of
+ functions manipulating property ids, as we ensure that the value passed will be an
+ existing value. It will also feel more correct after this patch that CSSProperty::id()
+ return a value of the enum rather than an integer. As this modification is quite big this
+ is the first part only so it will be easier to review.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::styleProperty): Adapt to the API change and also remove an unecessary name->id
+ conversion.
+
+2012-04-02 Casper van Donderen <casper.vandonderen@nokia.com>
+
+ Qt: Doc: Fix typo which marks document to be printed in console font.
+ https://bugs.webkit.org/show_bug.cgi?id=82893
+
+ Reviewed by Simon Hausmann.
+
+ The qtwebkit-bridge.qdoc file contained a typo where a \c {} was
+ missing its closing curly bracket, this marked the rest of the page as
+ text to be printed using the code/console font.
+ * docs/qtwebkit-bridge.qdoc:
+
+2012-04-02 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r112651.
+ http://trac.webkit.org/changeset/112651
+ https://bugs.webkit.org/show_bug.cgi?id=82887
+
+ It doesn't work with older Qt5 (Requested by Ossy on #webkit).
+
+ * declarative/experimental/plugin.cpp:
+ * declarative/plugin.cpp:
+ (WebKitQmlPlugin::initializeEngine):
+
+2012-04-01 Jon Lee <jonlee@apple.com>
+
+ Rename notification properties and functions
+ https://bugs.webkit.org/show_bug.cgi?id=80482
+ <rdar://problem/10912432>
+
+ Reviewed by Kentaro Hara.
+
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore::NotificationPresenterClientQt::show): Refactor to call tag().
+ (WebCore::NotificationPresenterClientQt::removeReplacedNotificationFromQueue): Refactor to call tag().
+
+2012-03-30 Emil A Eklund <eae@chromium.org>
+
+ Change WebKit/WebKit2 platform code to use pixel snapped values
+ https://bugs.webkit.org/show_bug.cgi?id=82549
+
+ Reviewed by Eric Seidel.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::geometry):
+ Replace getRect with getPixelSnappedRect to avoid having to expose
+ subpixel types to the platform layer.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch):
+ Use pixel snapped element rect when comparing with the touch rect as the
+ touch rect use screen cordinates which are represented with pixel
+ accuracy.
+
+ * WebCoreSupport/ChromeClientQt.h:
+ (WebCore::ChromeClientQt::scrollRectIntoView):
+ Change scrollRectIntoView to take a LayoutRect to match base class
+ interface.
+
+2012-03-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ GEOLOCATION should be implemented as Page Supplement
+ https://bugs.webkit.org/show_bug.cgi?id=82228
+
+ Reviewed by Adam Barth.
+
+ Geolocation is now a Supplement in Page so the interface
+ has changed for setting up the page's geolocation client
+ initially and accessing the controller later.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::resetGeolocationMock):
+ (DumpRenderTreeSupportQt::setMockGeolocationPermission):
+ (DumpRenderTreeSupportQt::setMockGeolocationPosition):
+ (DumpRenderTreeSupportQt::setMockGeolocationError):
+ (DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests):
+ * WebCoreSupport/GeolocationClientQt.cpp:
+ (WebCore::GeolocationClientQt::positionUpdated):
+ (WebCore::GeolocationClientQt::startUpdating):
+
+2012-03-29 Ádám Kallai <kadam@inf.u-szeged.hu>
+
+ [Qt] Build fix by renameing QtDeclarative to QtQml in header calls.
+ https://bugs.webkit.org/show_bug.cgi?id=82195
+
+ Reviewed by Simon Hausmann.
+
+ * declarative/experimental/plugin.cpp:
+ * declarative/plugin.cpp:
+ (WebKitQmlPlugin::initializeEngine):
+
+2012-03-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r112553.
+ http://trac.webkit.org/changeset/112553
+ https://bugs.webkit.org/show_bug.cgi?id=82638
+
+ It made all tests crash on Qt WK2 (Requested by Ossy_away on
+ #webkit).
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::resetGeolocationMock):
+ (DumpRenderTreeSupportQt::setMockGeolocationPermission):
+ (DumpRenderTreeSupportQt::setMockGeolocationPosition):
+ (DumpRenderTreeSupportQt::setMockGeolocationError):
+ (DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests):
+ * WebCoreSupport/GeolocationClientQt.cpp:
+ (WebCore::GeolocationClientQt::positionUpdated):
+ (WebCore::GeolocationClientQt::startUpdating):
+
+2012-03-29 Mark Pilgrim <pilgrim@chromium.org>
+
+ GEOLOCATION should be implemented as Page Supplement
+ https://bugs.webkit.org/show_bug.cgi?id=82228
+
+ Reviewed by Adam Barth.
+
+ Geolocation is now a Supplement in Page so the interface
+ has changed for setting up the page's geolocation client
+ initially and accessing the controller later.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::resetGeolocationMock):
+ (DumpRenderTreeSupportQt::setMockGeolocationPermission):
+ (DumpRenderTreeSupportQt::setMockGeolocationPosition):
+ (DumpRenderTreeSupportQt::setMockGeolocationError):
+ (DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests):
+ * WebCoreSupport/GeolocationClientQt.cpp:
+ (WebCore::GeolocationClientQt::positionUpdated):
+ (WebCore::GeolocationClientQt::startUpdating):
+
+2012-03-28 Nate Chapin <japhet@chromium.org>
+
+ Remove dispatchDidLoadMainResource callback, since no
+ port implements it.
+ https://bugs.webkit.org/show_bug.cgi?id=82539
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+ (FrameLoaderClientQt):
+
+2012-03-20 Eric Seidel <eric@webkit.org>
+
+ Move wtf/Platform.h from JavaScriptCore to Source/WTF/wtf
+ https://bugs.webkit.org/show_bug.cgi?id=80911
+
+ Reviewed by Adam Barth.
+
+ Fix WTF header include paths since although
+ Source/WTF is included, no longer are all the
+ subdirectories (thus "RefPtr.h" can't work).
+
+ * Api/qwebdatabase_p.h:
+ * Api/qwebscriptworld_p.h:
+ * Api/qwebsecurityorigin_p.h:
+ * WebCoreSupport/InspectorClientQt.h:
+ * WebCoreSupport/QtFallbackWebPopup.h:
+ * WebCoreSupport/QtWebComboBox.h:
+ * declarative/experimental/experimental.pri:
+ * declarative/public.pri:
+ * tests/MIMESniffing/MIMESniffing.pro:
+
+2012-03-19 Adam Barth <abarth@webkit.org>
+
+ Remove support for "magic" iframe
+ https://bugs.webkit.org/show_bug.cgi?id=81590
+
+ Reviewed by Eric Seidel.
+
+ Remove FrameLoaderClient methods that no longer exist.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+ (FrameLoaderClientQt):
+
+2012-03-19 Emil A Eklund <eae@chromium.org>
+
+ [mac/qt/chromium] Change platform code to use pixelSnappedRect methods
+ https://bugs.webkit.org/show_bug.cgi?id=81016
+
+ Reviewed by Eric Seidel.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::geometry):
+ (QWebElement::render):
+
+2012-03-16 Teemu Katajisto <teemu.katajisto@digia.com>
+
+ [Qt] QtWebKit documentation missing a few since 4.6 information
+ https://bugs.webkit.org/show_bug.cgi?id=81328
+
+ Reviewed by Simon Hausmann.
+
+ * Api/qwebpage.cpp:
+ * Api/qwebsettings.cpp:
+
+2012-03-15 Yuta Kitamura <yutak@chromium.org>
+
+ [Qt] Change default WebSocket protocol to the latest one
+ https://bugs.webkit.org/show_bug.cgi?id=73630
+
+ Reviewed by Simon Hausmann.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ Use RFC6455 WebSocket protocol by default.
+
+2012-03-07 Jon Lee <jonlee@apple.com>
+
+ Move NotificationContents into Notification
+ https://bugs.webkit.org/show_bug.cgi?id=80487
+ <rdar://problem/10965519>
+
+ Reviewed by Jian Li.
+
+ Refactor to use accessor methods on Notification.
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore::NotificationWrapper::title):
+ (WebCore::NotificationWrapper::message):
+ (WebCore::NotificationPresenterClientQt::displayNotification):
+ (WebCore::NotificationPresenterClientQt::cancel):
+ (WebCore::NotificationPresenterClientQt::notificationClicked):
+ (WebCore::NotificationPresenterClientQt::dumpReplacedIdText):
+ (WebCore::NotificationPresenterClientQt::dumpShowText):
+
+2012-03-13 Jon Lee <jonlee@apple.com>
+
+ Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
+ https://bugs.webkit.org/show_bug.cgi?id=80922
+ <rdar://problem/11035082>
+
+ Reviewed by Jian Li.
+
+ You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
+ LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
+ new API. Therefore, APIs that are common between the two will have:
+ #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+
+ This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
+ the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
+
+ Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ (QWebPagePrivate::~QWebPagePrivate):
+ (QWebPage::setFeaturePermission):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::dumpNotification):
+ (DumpRenderTreeSupportQt::simulateDesktopNotificationClick):
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore):
+ (WebCore::NotificationWrapper::NotificationWrapper):
+ (WebCore::NotificationWrapper::close):
+ (WebCore::NotificationWrapper::title):
+ (WebCore::NotificationWrapper::message):
+ (WebCore::NotificationWrapper::iconData):
+ (WebCore::NotificationWrapper::openerPageUrl):
+ (WebCore::NotificationWrapper::notificationClicked):
+ (WebCore::NotificationWrapper::notificationClosed):
+ * WebCoreSupport/NotificationPresenterClientQt.h:
+ (WebCore):
+
+2012-03-14 Csaba Osztrogonác <ossy@webkit.org>
+
+ Last buildfix for Qt after r110595. :)
+
+ Reviewed by Benjamin Poulain.
+
+ * Api/qwebpage.cpp:
+ * WebCoreSupport/GeolocationClientQt.h:
+
+2012-03-13 Benjamin Poulain <bpoulain@apple.com>
+
+ Attempt to fix QtMinimal bot after r110595
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+
+2012-03-13 Benjamin Poulain <bpoulain@apple.com>
+
+ Another attempt at fixing QtMinimal bot after r110595
+
+ Blind fix, unreviewed.
+
+ * WebCoreSupport/GeolocationClientQt.h:
+
+2012-03-13 Benjamin Poulain <bpoulain@apple.com>
+
+ Attempt to fix QtMinimal bot after r110595
+
+ Blind fix, unreviewed.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::resetGeolocationMock):
+ (DumpRenderTreeSupportQt::setMockGeolocationPermission):
+ (DumpRenderTreeSupportQt::setMockGeolocationPosition):
+ (DumpRenderTreeSupportQt::setMockGeolocationError):
+ (DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests):
+ * WebCoreSupport/GeolocationPermissionClientQt.h:
+
+2012-03-13 Adam Barth <abarth@webkit.org> && Benjamin Poulain <bpoulain@apple.com>
+
+ Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
+ https://bugs.webkit.org/show_bug.cgi?id=78853
+
+ Reviewed by Adam Barth.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ * WebCoreSupport/ChromeClientQt.h:
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (toGeolocationClientMock):
+ (DumpRenderTreeSupportQt::resetGeolocationMock):
+ (DumpRenderTreeSupportQt::setMockGeolocationPermission):
+ (DumpRenderTreeSupportQt::setMockGeolocationPosition):
+ (DumpRenderTreeSupportQt::setMockGeolocationError):
+ (DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests):
+ * WebCoreSupport/GeolocationClientQt.h:
+ (WebCore):
+
+2012-03-12 Antonio Gomes <agomes@rim.com>
+
+ Convert nodesFromRect tests to use Internals interface
+ https://bugs.webkit.org/show_bug.cgi?id=80886
+
+ Reviewed by Ryosuke Niwa.
+
+ Removed DRTSupportQt::nodesFromRect support, since
+ it can work in the cross-port way through the
+ Internals interface.
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
2012-03-09 Jon Lee <jonlee@apple.com>
Rename NotificationPresenter to NotificationClient
diff --git a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
index 386b986d4..6c26018bc 100644
--- a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -171,10 +171,7 @@ public:
virtual void setCursor(const Cursor&);
virtual void setCursorHiddenUntilMouseMoves(bool) { }
- virtual void scrollRectIntoView(const IntRect&) const { }
-
- virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*) { }
- virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { }
+ virtual void scrollRectIntoView(const LayoutRect) const { }
virtual bool selectItemWritingDirectionIsNatural();
virtual bool selectItemAlignmentFollowsMenuWritingDirection();
diff --git a/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h b/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h
index 1b4475f35..0420f8d4a 100644
--- a/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h
@@ -28,7 +28,7 @@
#include "ContextMenuClient.h"
-#include <RefCounted.h>
+#include <wtf/RefCounted.h>
namespace WebCore {
class ContextMenu;
diff --git a/Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp b/Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp
deleted file mode 100644
index 655703d77..000000000
--- a/Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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 "DeviceMotionProviderQt.h"
-
-#include "DeviceMotionController.h"
-#include "DeviceOrientationProviderQt.h"
-
-namespace WebCore {
-
-DeviceMotionProviderQt::DeviceMotionProviderQt()
- : m_motion(DeviceMotionData::create())
- , m_deviceOrientation(new DeviceOrientationProviderQt)
- , m_controller(0)
-{
- m_acceleration.addFilter(this);
-}
-
-DeviceMotionProviderQt::~DeviceMotionProviderQt()
-{
- delete m_deviceOrientation;
-}
-
-void DeviceMotionProviderQt::setController(DeviceMotionController* controller)
-{
- ASSERT(controller);
- ASSERT(!m_controller);
- m_controller = controller;
-}
-
-void DeviceMotionProviderQt::start()
-{
- m_acceleration.start();
- m_deviceOrientation->start();
-}
-
-void DeviceMotionProviderQt::stop()
-{
- m_acceleration.stop();
- m_deviceOrientation->stop();
-}
-
-bool DeviceMotionProviderQt::filter(QAccelerometerReading* reading)
-{
- if (!m_controller) {
- // We are the only filter. No need to propagate from here.
- return false;
- }
-
- RefPtr<DeviceMotionData::Acceleration> accel = DeviceMotionData::Acceleration::create(
- /* x available */ true, reading->x(),
- /* y available */ true, reading->y(),
- /* z available */ true, reading->z());
-
- RefPtr<DeviceMotionData::RotationRate> rotation = DeviceMotionData::RotationRate::create(
- m_deviceOrientation->hasAlpha(), m_deviceOrientation->lastOrientation()->alpha(),
- /* beta available */ true, m_deviceOrientation->lastOrientation()->beta(),
- /* gamma available */ true, m_deviceOrientation->lastOrientation()->gamma());
-
- m_motion = DeviceMotionData::create(accel,
- accel, /* FIXME: Needs to provide acceleration include gravity. */
- rotation,
- false, 0 /* The interval is treated internally by Qt mobility */);
-
- m_controller->didChangeDeviceMotion(m_motion.get());
-
- // We are the only filter. No need to propagate from here.
- return false;
-}
-
-} // namespace WebCore
diff --git a/Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h b/Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h
deleted file mode 100644
index 466490f2c..000000000
--- a/Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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 DeviceMotionProviderQt_h
-#define DeviceMotionProviderQt_h
-
-#include "DeviceMotionData.h"
-
-#include <wtf/RefPtr.h>
-#include <QAccelerometerFilter>
-
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
-using QTM_NAMESPACE::QAccelerometer;
-using QTM_NAMESPACE::QAccelerometerFilter;
-using QTM_NAMESPACE::QAccelerometerReading;
-#endif
-
-namespace WebCore {
-
-class DeviceMotionController;
-class DeviceOrientationProviderQt;
-
-class DeviceMotionProviderQt : public QAccelerometerFilter {
-public:
- DeviceMotionProviderQt();
- ~DeviceMotionProviderQt();
-
- void setController(DeviceMotionController*);
-
- bool filter(QAccelerometerReading*);
-
- void start();
- void stop();
- DeviceMotionData* currentDeviceMotion() const { return m_motion.get(); }
-
-private:
- RefPtr<DeviceMotionData> m_motion;
- QAccelerometer m_acceleration;
- DeviceOrientationProviderQt* m_deviceOrientation;
- DeviceMotionController* m_controller;
-};
-
-} // namespace WebCore
-
-#endif // DeviceMotionProviderQt_h
diff --git a/Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp
deleted file mode 100644
index ee7942210..000000000
--- a/Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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 "DeviceOrientationClientQt.h"
-#include "DeviceOrientationProviderQt.h"
-
-namespace WebCore {
-
-DeviceOrientationClientQt::DeviceOrientationClientQt()
- : m_provider(new DeviceOrientationProviderQt)
-{
-}
-
-DeviceOrientationClientQt::~DeviceOrientationClientQt()
-{
- delete m_provider;
-}
-
-void DeviceOrientationClientQt::setController(DeviceOrientationController* controller)
-{
- m_provider->setController(controller);
-}
-
-void DeviceOrientationClientQt::startUpdating()
-{
- m_provider->start();
-}
-
-void DeviceOrientationClientQt::stopUpdating()
-{
- m_provider->stop();
-}
-
-DeviceOrientation* DeviceOrientationClientQt::lastOrientation() const
-{
- return m_provider->lastOrientation();
-}
-
-void DeviceOrientationClientQt::deviceOrientationControllerDestroyed()
-{
- delete this;
-}
-
-} // namespace WebCore
diff --git a/Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp b/Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp
deleted file mode 100644
index de46d244c..000000000
--- a/Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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 "DeviceOrientationProviderQt.h"
-
-namespace WebCore {
-
-DeviceOrientationProviderQt::DeviceOrientationProviderQt()
- : m_controller(0)
-{
- m_sensor.addFilter(this);
- m_lastOrientation = DeviceOrientation::create();
-}
-
-void DeviceOrientationProviderQt::setController(DeviceOrientationController* controller)
-{
- if (!controller)
- stop();
-
- m_controller = controller;
-}
-
-void DeviceOrientationProviderQt::start()
-{
- m_sensor.start();
-}
-
-void DeviceOrientationProviderQt::stop()
-{
- m_sensor.stop();
-}
-
-bool DeviceOrientationProviderQt::filter(QRotationReading* reading)
-{
- if (m_controller) {
- // Provide device orientation data according W3C spec:
- // http://dev.w3.org/geo/api/spec-source-orientation.html
- // Qt mobility provide these data via QRotationSensor using the
- // QRotationReading class:
- // - the rotation around z axis (alpha) is given as z in QRotationReading;
- // - the rotation around x axis (beta) is given as x in QRotationReading;
- // - the rotation around y axis (gamma) is given as y in QRotationReading;
- // See: http://doc.qt.nokia.com/qtmobility-1.0/qrotationreading.html
- // The Z (alpha) rotation angle is checked via hasAlpha() private method,
- // depending if the device is able do detect the alpha rotation. X (beta) and
- // Y (gamma) axis are availble in this context.
- m_lastOrientation = DeviceOrientation::create(hasAlpha(), reading->z(),
- /* x available */ true, reading->x(),
- /* y available */ true, reading->y());
- m_controller->didChangeDeviceOrientation(m_lastOrientation.get());
- }
-
- // We are the only filter, so no need to propagate.
- return false;
-}
-
-}
diff --git a/Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h b/Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h
deleted file mode 100644
index d07f0a9b0..000000000
--- a/Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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 DeviceOrientationProviderQt_h
-#define DeviceOrientationProviderQt_h
-
-#include "DeviceOrientation.h"
-#include "DeviceOrientationController.h"
-#include <wtf/RefPtr.h>
-
-#include <QRotationFilter>
-
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
-using QTM_NAMESPACE::QRotationFilter;
-using QTM_NAMESPACE::QRotationReading;
-using QTM_NAMESPACE::QRotationSensor;
-#endif
-
-namespace WebCore {
-
-class DeviceOrientationProviderQt : public QRotationFilter {
-public:
- DeviceOrientationProviderQt();
-
- void setController(DeviceOrientationController*);
-
- bool filter(QRotationReading*);
-
- void start();
- void stop();
- bool isActive() const { return m_sensor.isActive(); }
- DeviceOrientation* lastOrientation() const { return m_lastOrientation.get(); }
- bool hasAlpha() const { return m_sensor.property("hasZ").toBool(); }
-
-private:
- RefPtr<DeviceOrientation> m_lastOrientation;
- DeviceOrientationController* m_controller;
- QRotationSensor m_sensor;
-};
-
-}
-
-#endif // DeviceOrientationProviderQt_h
diff --git a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 457b49e26..f55e25667 100644
--- a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -100,12 +100,13 @@
#include <QAction>
#include <QMenu>
+#include <QPainter>
using namespace WebCore;
QMap<int, QWebScriptWorld*> m_worldMap;
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
GeolocationClientMock* toGeolocationClientMock(GeolocationClient* client)
{
ASSERT(QWebPagePrivate::drtRun);
@@ -530,7 +531,7 @@ void DumpRenderTreeSupportQt::setMediaType(QWebFrame* frame, const QString& type
WebCore::Frame* coreFrame = QWebFramePrivate::core(frame);
WebCore::FrameView* view = coreFrame->view();
view->setMediaType(type);
- coreFrame->document()->styleSelectorChanged(RecalcStyleImmediately);
+ coreFrame->document()->styleResolverChanged(RecalcStyleImmediately);
view->layout();
}
@@ -790,7 +791,7 @@ void DumpRenderTreeSupportQt::dumpSetAcceptsEditing(bool b)
void DumpRenderTreeSupportQt::dumpNotification(bool b)
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterClientQt::dumpNotification = b;
#endif
}
@@ -810,8 +811,8 @@ QString DumpRenderTreeSupportQt::viewportAsText(QWebPage* page, int deviceDPI, c
QString res;
res = res.sprintf("viewport size %dx%d scale %f with limits [%f, %f] and userScalable %f\n",
- conf.layoutSize.width(),
- conf.layoutSize.height(),
+ static_cast<int>(conf.layoutSize.width()),
+ static_cast<int>(conf.layoutSize.height()),
conf.initialScale,
conf.minimumScale,
conf.maximumScale,
@@ -838,34 +839,34 @@ void DumpRenderTreeSupportQt::setMockDeviceOrientation(QWebPage* page, bool canP
void DumpRenderTreeSupportQt::resetGeolocationMock(QWebPage* page)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
Page* corePage = QWebPagePrivate::core(page);
- GeolocationClientMock* mockClient = toGeolocationClientMock(corePage->geolocationController()->client());
+ GeolocationClientMock* mockClient = toGeolocationClientMock(GeolocationController::from(corePage)->client());
mockClient->reset();
#endif
}
void DumpRenderTreeSupportQt::setMockGeolocationPermission(QWebPage* page, bool allowed)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
Page* corePage = QWebPagePrivate::core(page);
- GeolocationClientMock* mockClient = toGeolocationClientMock(corePage->geolocationController()->client());
+ GeolocationClientMock* mockClient = toGeolocationClientMock(GeolocationController::from(corePage)->client());
mockClient->setPermission(allowed);
#endif
}
void DumpRenderTreeSupportQt::setMockGeolocationPosition(QWebPage* page, double latitude, double longitude, double accuracy)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
Page* corePage = QWebPagePrivate::core(page);
- GeolocationClientMock* mockClient = toGeolocationClientMock(corePage->geolocationController()->client());
+ GeolocationClientMock* mockClient = toGeolocationClientMock(GeolocationController::from(corePage)->client());
mockClient->setPosition(GeolocationPosition::create(currentTime(), latitude, longitude, accuracy));
#endif
}
void DumpRenderTreeSupportQt::setMockGeolocationError(QWebPage* page, int errorCode, const QString& message)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
Page* corePage = QWebPagePrivate::core(page);
GeolocationError::ErrorCode code = GeolocationError::PositionUnavailable;
@@ -878,16 +879,16 @@ void DumpRenderTreeSupportQt::setMockGeolocationError(QWebPage* page, int errorC
break;
}
- GeolocationClientMock* mockClient = static_cast<GeolocationClientMock*>(corePage->geolocationController()->client());
+ GeolocationClientMock* mockClient = static_cast<GeolocationClientMock*>(GeolocationController::from(corePage)->client());
mockClient->setError(GeolocationError::create(code, message));
#endif
}
int DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests(QWebPage* page)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
Page* corePage = QWebPagePrivate::core(page);
- GeolocationClientMock* mockClient = toGeolocationClientMock(corePage->geolocationController()->client());
+ GeolocationClientMock* mockClient = toGeolocationClientMock(GeolocationController::from(corePage)->client());
return mockClient->numberOfPendingPermissionRequests();
#else
return -1;
@@ -961,12 +962,6 @@ void DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld(QWebFrame* frame, in
#endif
}
-bool DumpRenderTreeSupportQt::isPageBoxVisible(QWebFrame* frame, int pageIndex)
-{
- WebCore::Frame* coreFrame = QWebFramePrivate::core(frame);
- return coreFrame->document()->isPageBoxVisible(pageIndex);
-}
-
QString DumpRenderTreeSupportQt::pageSizeAndMarginsInPixels(QWebFrame* frame, int pageIndex, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft)
{
WebCore::Frame* coreFrame = QWebFramePrivate::core(frame);
@@ -987,32 +982,11 @@ void DumpRenderTreeSupportQt::addUserStyleSheet(QWebPage* page, const QString& s
void DumpRenderTreeSupportQt::simulateDesktopNotificationClick(const QString& title)
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterClientQt::notificationPresenter()->notificationClicked(title);
#endif
}
-QVariantList DumpRenderTreeSupportQt::nodesFromRect(const QWebElement& document, int x, int y, unsigned top, unsigned right, unsigned bottom, unsigned left, bool ignoreClipping)
-{
- QVariantList res;
- WebCore::Element* webElement = document.m_element;
- if (!webElement)
- return res;
-
- Document* doc = webElement->document();
- if (!doc)
- return res;
- RefPtr<NodeList> nodes = doc->nodesFromRect(x, y, top, right, bottom, left, ignoreClipping);
- for (unsigned i = 0; i < nodes->length(); i++) {
- // QWebElement will be null if the Node is not an HTML Element
- if (nodes->item(i)->isHTMLElement())
- res << QVariant::fromValue(QWebElement(nodes->item(i)));
- else
- res << QVariant::fromValue(QDRTNode(nodes->item(i)));
- }
- return res;
-}
-
void DumpRenderTreeSupportQt::setDefersLoading(QWebPage* page, bool flag)
{
Page* corePage = QWebPagePrivate::core(page);
@@ -1234,6 +1208,49 @@ void DumpRenderTreeSupportQt::setHixie76WebSocketProtocolEnabled(QWebPage* page,
#endif
}
+QImage DumpRenderTreeSupportQt::paintPagesWithBoundaries(QWebFrame* qframe)
+{
+ Frame* frame = QWebFramePrivate::core(qframe);
+ PrintContext printContext(frame);
+
+ QRect rect = frame->view()->frameRect();
+
+ IntRect pageRect(0, 0, rect.width(), rect.height());
+
+ printContext.begin(pageRect.width(), pageRect.height());
+ float pageHeight = 0;
+ printContext.computePageRects(pageRect, /* headerHeight */ 0, /* footerHeight */ 0, /* userScaleFactor */ 1.0, pageHeight);
+
+ QPainter painter;
+ int pageCount = printContext.pageCount();
+ // pages * pageHeight and 1px line between each page
+ int totalHeight = pageCount * (pageRect.height() + 1) - 1;
+ QImage image(pageRect.width(), totalHeight, QImage::Format_ARGB32);
+ image.fill(Qt::white);
+ painter.begin(&image);
+
+ GraphicsContext ctx(&painter);
+ for (int i = 0; i < printContext.pageCount(); ++i) {
+ printContext.spoolPage(ctx, i, pageRect.width());
+ // translate to next page coordinates
+ ctx.translate(0, pageRect.height() + 1);
+
+ // if there is a next page, draw a blue line between these two
+ if (i + 1 < printContext.pageCount()) {
+ ctx.save();
+ ctx.setStrokeColor(Color(0, 0, 255), ColorSpaceDeviceRGB);
+ ctx.setFillColor(Color(0, 0, 255), ColorSpaceDeviceRGB);
+ ctx.drawLine(IntPoint(0, -1), IntPoint(pageRect.width(), -1));
+ ctx.restore();
+ }
+ }
+
+ painter.end();
+ printContext.end();
+
+ return image;
+}
+
// Provide a backward compatibility with previously exported private symbols as of QtWebKit 4.6 release
void QWEBKIT_EXPORT qt_resumeActiveDOMObjects(QWebFrame* frame)
diff --git a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index d949e5154..eadc1af35 100644
--- a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -196,8 +196,6 @@ public:
static void setCustomPolicyDelegate(bool enabled, bool permissive);
- static bool isPageBoxVisible(QWebFrame* frame, int pageIndex);
-
static QString pageSizeAndMarginsInPixels(QWebFrame* frame, int pageIndex, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft);
static QString pageProperty(QWebFrame* frame, const QString& propertyName, int pageNumber);
static void addUserStyleSheet(QWebPage* page, const QString& sourceCode);
@@ -206,7 +204,6 @@ public:
static void scalePageBy(QWebFrame*, float scale, const QPoint& origin);
- static QVariantList nodesFromRect(const QWebElement& document, int x, int y, unsigned top, unsigned right, unsigned bottom, unsigned left, bool ignoreClipping);
static QString responseMimeType(QWebFrame*);
static void clearOpener(QWebFrame*);
static void addURLToRedirect(const QString& origin, const QString& destination);
@@ -235,6 +232,8 @@ public:
static bool defaultHixie76WebSocketProtocolEnabled();
static void setHixie76WebSocketProtocolEnabled(QWebPage*, bool);
+
+ static QImage paintPagesWithBoundaries(QWebFrame*);
};
#endif
diff --git a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h
index 2830989e4..7437533cd 100644
--- a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h
@@ -31,9 +31,9 @@
#define EditorClientQt_h
#include "EditorClient.h"
-#include "RefCounted.h"
#include "TextCheckerClientQt.h"
#include <wtf/Forward.h>
+#include <wtf/RefCounted.h>
class QWebPage;
diff --git a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 8364219d6..85b609185 100644
--- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -212,7 +212,6 @@ FrameLoaderClientQt::FrameLoaderClientQt()
, m_webFrame(0)
, m_pluginView(0)
, m_hasSentResponseToPlugin(false)
- , m_hasRepresentation(false)
, m_isOriginatingLoad(false)
{
}
@@ -312,11 +311,6 @@ void FrameLoaderClientQt::dispatchDidBecomeFrameset(bool)
{
}
-void FrameLoaderClientQt::makeRepresentation(DocumentLoader*)
-{
- m_hasRepresentation = true;
-}
-
void FrameLoaderClientQt::forceLayout()
{
@@ -397,7 +391,7 @@ void FrameLoaderClientQt::dispatchDidChangeLocationWithinPage()
}
#if USE(V8)
-void FrameLoaderClientQt::didCreateScriptContext(v8::Handle<v8::Context>, int)
+void FrameLoaderClientQt::didCreateScriptContext(v8::Handle<v8::Context>, int, int)
{
}
void FrameLoaderClientQt::willReleaseScriptContext(v8::Handle<v8::Context>, int)
@@ -567,17 +561,6 @@ void FrameLoaderClientQt::dispatchWillSubmitForm(FramePolicyFunction function,
}
-void FrameLoaderClientQt::dispatchDidLoadMainResource(DocumentLoader*)
-{
-}
-
-
-void FrameLoaderClientQt::revertToProvisionalState(DocumentLoader*)
-{
- m_hasRepresentation = true;
-}
-
-
void FrameLoaderClientQt::postProgressStartedNotification()
{
if (m_webFrame && m_frame->page())
@@ -631,16 +614,10 @@ void FrameLoaderClientQt::didChangeTitle(DocumentLoader*)
}
-void FrameLoaderClientQt::finishedLoading(DocumentLoader* loader)
+void FrameLoaderClientQt::finishedLoading(DocumentLoader*)
{
- if (!m_pluginView) {
- // This is necessary to create an empty document. See bug 634004.
- // However, we only want to do this if makeRepresentation has been called,
- // to match the behavior on the Mac.
- if (m_hasRepresentation)
- loader->writer()->setEncoding("", false);
+ if (!m_pluginView)
return;
- }
if (m_pluginView->isPluginView())
m_pluginView->didFinishLoading();
m_pluginView = 0;
@@ -1366,28 +1343,6 @@ PassRefPtr<Frame> FrameLoaderClientQt::createFrame(const KURL& url, const String
return frameData.frame.release();
}
-void FrameLoaderClientQt::didTransferChildFrameToNewDocument(Page*)
-{
- ASSERT(m_frame->ownerElement());
-
- if (!m_webFrame)
- return;
-
- Frame* parentFrame = m_webFrame->d->frame->tree()->parent();
- ASSERT(parentFrame);
-
- if (QWebFrame* parent = QWebFramePrivate::kit(parentFrame)) {
- m_webFrame->d->setPage(parent->page());
-
- if (m_webFrame->parent() != qobject_cast<QObject*>(parent))
- m_webFrame->setParent(parent);
- }
-}
-
-void FrameLoaderClientQt::transferLoadingResourceFromPage(ResourceLoader*, const ResourceRequest&, Page*)
-{
-}
-
ObjectContentType FrameLoaderClientQt::objectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
{
// qDebug()<<" ++++++++++++++++ url is "<<url.string()<<", mime = "<<mimeTypeIn;
diff --git a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index 8c5b14dd1..d123b56c8 100644
--- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -35,14 +35,14 @@
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "KURL.h"
-#include <wtf/OwnPtr.h>
#include "WebCore/plugins/PluginView.h"
-#include "RefCounted.h"
#include "ResourceError.h"
#include "ResourceResponse.h"
#include <QUrl>
#include <qobject.h>
#include <wtf/Forward.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/RefCounted.h>
QT_BEGIN_NAMESPACE
class QNetworkReply;
@@ -83,7 +83,7 @@ public:
virtual bool hasWebView() const; // mainly for assertions
- virtual void makeRepresentation(DocumentLoader*);
+ virtual void makeRepresentation(DocumentLoader*) { }
virtual void forceLayout();
virtual void forceLayoutForNonHTML();
@@ -135,11 +135,10 @@ public:
virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&);
- virtual void dispatchWillSendSubmitEvent(HTMLFormElement*) { }
+ virtual void dispatchWillSendSubmitEvent(PassRefPtr<FormState>) { }
virtual void dispatchWillSubmitForm(FramePolicyFunction, PassRefPtr<FormState>);
- virtual void dispatchDidLoadMainResource(DocumentLoader*);
- virtual void revertToProvisionalState(DocumentLoader*);
+ virtual void revertToProvisionalState(DocumentLoader*) { }
virtual void setMainDocumentError(DocumentLoader*, const ResourceError&);
virtual void postProgressStartedNotification();
@@ -207,8 +206,6 @@ 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(WebCore::Page*);
- virtual void transferLoadingResourceFromPage(WebCore::ResourceLoader*, const WebCore::ResourceRequest&, 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);
@@ -223,7 +220,7 @@ public:
#if USE(V8)
// A frame's V8 context was created or destroyed.
- virtual void didCreateScriptContext(v8::Handle<v8::Context>, int);
+ virtual void didCreateScriptContext(v8::Handle<v8::Context>, int, int);
virtual void willReleaseScriptContext(v8::Handle<v8::Context>, int);
// A context untied to a frame was created (through evaluateInIsolatedWorld).
@@ -233,7 +230,7 @@ public:
// 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) { return false; }
+ virtual bool allowScriptExtension(const String& extensionName, int extensionGroup, int worldID) { return false; }
#endif
virtual void registerForIconNotification(bool);
@@ -275,11 +272,6 @@ private:
WebCore::PluginView* m_pluginView;
bool m_hasSentResponseToPlugin;
- // True if makeRepresentation was called. We don't actually have a concept
- // of a "representation", but we need to know when we're expected to have one.
- // See finishedLoading().
- bool m_hasRepresentation;
-
KURL m_lastRequestedUrl;
bool m_isOriginatingLoad;
};
diff --git a/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp
index cda5f350b..8551cf906 100644
--- a/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp
@@ -94,7 +94,7 @@ void GeolocationClientQt::positionUpdated(const QGeoPositionInfo& geoPosition)
providesHeading, heading, providesSpeed, speed);
WebCore::Page* page = QWebPagePrivate::core(m_page);
- page->geolocationController()->positionChanged(m_lastPosition.get());
+ GeolocationController::from(page)->positionChanged(m_lastPosition.get());
}
void GeolocationClientQt::startUpdating()
@@ -105,7 +105,7 @@ void GeolocationClientQt::startUpdating()
if (!m_location) {
WebCore::Page* page = QWebPagePrivate::core(m_page);
RefPtr<WebCore::GeolocationError> error = GeolocationError::create(GeolocationError::PositionUnavailable, failedToStartServiceErrorMessage);
- page->geolocationController()->errorOccurred(error.get());
+ GeolocationController::from(page)->errorOccurred(error.get());
return;
}
diff --git a/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.h b/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.h
index 9a2825d94..9d07a9155 100644
--- a/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.h
@@ -47,7 +47,7 @@ class QWebPage;
namespace WebCore {
-// This class provides an implementation of a GeolocationService for QtWebkit.
+// This class provides an implementation of a GeolocationClient for QtWebkit.
class GeolocationClientQt : public QObject, public GeolocationClient {
Q_OBJECT
diff --git a/Source/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h b/Source/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h
index abe9c766c..1b4540d87 100644
--- a/Source/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h
@@ -31,6 +31,8 @@
#ifndef GeolocationPermissionClientQt_h
#define GeolocationPermissionClientQt_h
+#if ENABLE(GEOLOCATION)
+
#include "Geolocation.h"
#include "qwebpage.h"
@@ -57,4 +59,6 @@ private:
}
+#endif // ENABLE(GEOLOCATION)
+
#endif
diff --git a/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp b/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp
index b09413345..452091c28 100644
--- a/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp
@@ -42,10 +42,9 @@
#endif
#include "qwebelement_p.h"
+#include <JavaScriptCore/runtime/InitializeThreading.h>
#include <QApplication>
#include <QStyle>
-
-#include <runtime/InitializeThreading.h>
#include <wtf/MainThread.h>
namespace WebKit {
diff --git a/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.h b/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.h
index c94d61a32..6c7d00f85 100644
--- a/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.h
@@ -32,10 +32,10 @@
#include "InspectorClient.h"
#include "InspectorFrontendClientLocal.h"
-#include "OwnPtr.h"
-#include "PassOwnPtr.h"
#include <QtCore/QString>
#include <wtf/Forward.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
class QWebPage;
class QWebView;
diff --git a/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp b/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp
index 26c52ff89..23f33baf2 100644
--- a/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp
@@ -22,7 +22,6 @@
#include "InspectorClientQt.h"
#include "InspectorController.h"
-#include "MD5.h"
#include "Page.h"
#include "qhttpheader_p.h"
#include "qwebpage.h"
@@ -35,6 +34,7 @@
#include <QUrl>
#include <QWidget>
#include <qendian.h>
+#include <wtf/MD5.h>
#include <wtf/text/CString.h>
namespace WebCore {
diff --git a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
index 00052184a..d693c4a95 100644
--- a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
@@ -48,7 +48,7 @@
namespace WebCore {
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
const double notificationTimeout = 10.0;
@@ -69,8 +69,9 @@ NotificationPresenterClientQt* NotificationPresenterClientQt::notificationPresen
NotificationWrapper::NotificationWrapper()
: m_closeTimer(this, &NotificationWrapper::close)
+ , m_displayEventTimer(this, &NotificationWrapper::sendDisplayEvent)
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#ifndef QT_NO_SYSTEMTRAYICON
m_notificationIcon = nullptr;
@@ -81,48 +82,52 @@ NotificationWrapper::NotificationWrapper()
void NotificationWrapper::close(Timer<NotificationWrapper>*)
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterClientQt::notificationPresenter()->cancel(this);
#endif
}
+void NotificationWrapper::sendDisplayEvent(Timer<NotificationWrapper>*)
+{
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+ NotificationPresenterClientQt::notificationPresenter()->sendDisplayEvent(this);
+#endif
+}
+
const QString NotificationWrapper::title() const
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
if (notification)
- return notification->contents().title;
+ return notification->title();
#endif
return QString();
}
const QString NotificationWrapper::message() const
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
if (notification)
- return notification->contents().body;
+ return notification->body();
#endif
return QString();
}
-const QByteArray NotificationWrapper::iconData() const
+const QUrl NotificationWrapper::iconUrl() const
{
- QByteArray iconData;
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
- if (notification) {
- if (notification->iconData())
- iconData = QByteArray::fromRawData(notification->iconData()->data(), notification->iconData()->size());
- }
+ if (notification)
+ return notification->iconURL();
#endif
- return iconData;
+ return QUrl();
}
const QUrl NotificationWrapper::openerPageUrl() const
{
QUrl url;
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
if (notification) {
if (notification->scriptExecutionContext())
@@ -134,19 +139,19 @@ const QUrl NotificationWrapper::openerPageUrl() const
void NotificationWrapper::notificationClicked()
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterClientQt::notificationPresenter()->notificationClicked(this);
#endif
}
void NotificationWrapper::notificationClosed()
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterClientQt::notificationPresenter()->cancel(this);
#endif
}
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterClientQt::NotificationPresenterClientQt() : m_clientCount(0)
{
@@ -175,19 +180,15 @@ bool NotificationPresenterClientQt::show(Notification* notification)
if (notification->scriptExecutionContext()->isWorkerContext())
return false;
notification->setPendingActivity(notification);
- if (!notification->replaceId().isEmpty())
+ if (!notification->tag().isEmpty())
removeReplacedNotificationFromQueue(notification);
if (dumpNotification)
dumpShowText(notification);
- QByteArray iconData;
- if (notification->iconData())
- iconData = QByteArray::fromRawData(notification->iconData()->data(), notification->iconData()->size());
- displayNotification(notification, iconData);
- notification->releaseIconData();
+ displayNotification(notification);
return true;
}
-void NotificationPresenterClientQt::displayNotification(Notification* notification, const QByteArray& bytes)
+void NotificationPresenterClientQt::displayNotification(Notification* notification)
{
NotificationWrapper* wrapper = new NotificationWrapper();
m_notifications.insert(notification, wrapper);
@@ -197,8 +198,8 @@ void NotificationPresenterClientQt::displayNotification(Notification* notificati
if (notification->isHTML())
message = notification->url().string();
else {
- title = notification->contents().title;
- message = notification->contents().body;
+ title = notification->title();
+ message = notification->body();
}
if (m_platformPlugin.plugin() && m_platformPlugin.plugin()->supportsExtension(QWebKitPlatformPlugin::Notifications))
@@ -208,16 +209,11 @@ void NotificationPresenterClientQt::displayNotification(Notification* notificati
#ifndef QT_NO_SYSTEMTRAYICON
if (!dumpNotification)
wrapper->m_closeTimer.startOneShot(notificationTimeout);
- QPixmap pixmap;
- if (bytes.length() && pixmap.loadFromData(bytes)) {
- QIcon icon(pixmap);
- wrapper->m_notificationIcon = adoptPtr(new QSystemTrayIcon(icon));
- } else
wrapper->m_notificationIcon = adoptPtr(new QSystemTrayIcon());
#endif
}
- sendEvent(notification, "display");
+ wrapper->m_displayEventTimer.startOneShot(0);
// Make sure the notification was not cancelled during handling the display event
if (m_notifications.find(notification) == m_notifications.end())
@@ -233,7 +229,7 @@ void NotificationPresenterClientQt::displayNotification(Notification* notificati
#ifndef QT_NO_SYSTEMTRAYICON
wrapper->connect(wrapper->m_notificationIcon.get(), SIGNAL(messageClicked()), wrapper, SLOT(notificationClicked()));
wrapper->m_notificationIcon->show();
- wrapper->m_notificationIcon->showMessage(notification->contents().title, notification->contents().body);
+ wrapper->m_notificationIcon->showMessage(notification->title(), notification->body());
#endif
}
@@ -243,7 +239,7 @@ void NotificationPresenterClientQt::cancel(Notification* notification)
if (notification->isHTML())
printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->url().string()).toUtf8().constData());
else
- printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->contents().title).toUtf8().constData());
+ printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->title()).toUtf8().constData());
}
NotificationsQueue::Iterator iter = m_notifications.find(notification);
@@ -283,7 +279,7 @@ void NotificationPresenterClientQt::notificationClicked(const QString& title)
if (notification->isHTML())
notificationTitle = notification->url().string();
else
- notificationTitle = notification->contents().title;
+ notificationTitle = notification->title();
if (notificationTitle == title)
break;
iter++;
@@ -384,6 +380,14 @@ void NotificationPresenterClientQt::allowNotificationForFrame(Frame* frame)
m_pendingPermissionRequests.remove(iter.key());
}
+void NotificationPresenterClientQt::sendDisplayEvent(NotificationWrapper* wrapper)
+{
+ Notification* notification = notificationForWrapper(wrapper);
+ if (notification)
+ sendEvent(notification, "display");
+}
+
+
void NotificationPresenterClientQt::sendEvent(Notification* notification, const AtomicString& eventName)
{
if (notification->scriptExecutionContext())
@@ -398,7 +402,7 @@ void NotificationPresenterClientQt::removeReplacedNotificationFromQueue(Notifica
while (iter != end) {
Notification* existingNotification = iter.key();
- if (existingNotification->replaceId() == notification->replaceId() && existingNotification->url().protocol() == notification->url().protocol() && existingNotification->url().host() == notification->url().host()) {
+ if (existingNotification->tag() == notification->tag() && existingNotification->url().protocol() == notification->url().protocol() && existingNotification->url().host() == notification->url().host()) {
oldNotification = iter.key();
break;
}
@@ -423,7 +427,7 @@ void NotificationPresenterClientQt::detachNotification(Notification* notificatio
void NotificationPresenterClientQt::dumpReplacedIdText(Notification* notification)
{
if (notification)
- printf("REPLACING NOTIFICATION %s\n", notification->isHTML() ? QString(notification->url().string()).toUtf8().constData() : QString(notification->contents().title).toUtf8().constData());
+ printf("REPLACING NOTIFICATION %s\n", notification->isHTML() ? QString(notification->url().string()).toUtf8().constData() : QString(notification->title()).toUtf8().constData());
}
void NotificationPresenterClientQt::dumpShowText(Notification* notification)
@@ -433,8 +437,8 @@ void NotificationPresenterClientQt::dumpShowText(Notification* notification)
else {
printf("DESKTOP NOTIFICATION:%s icon %s, title %s, text %s\n",
notification->dir() == "rtl" ? "(RTL)" : "",
- QString(notification->contents().icon.string()).toUtf8().constData(), QString(notification->contents().title).toUtf8().constData(),
- QString(notification->contents().body).toUtf8().constData());
+ QString(notification->iconURL().string()).toUtf8().constData(), QString(notification->title()).toUtf8().constData(),
+ QString(notification->body()).toUtf8().constData());
}
}
@@ -464,7 +468,7 @@ QWebFrame* NotificationPresenterClientQt::toFrame(ScriptExecutionContext* contex
return QWebFramePrivate::kit(document->frame());
}
-#endif // ENABLE(NOTIFICATIONS)
+#endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
}
#include "moc_NotificationPresenterClientQt.cpp"
diff --git a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h b/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h
index 12b06fe9b..5819b4d80 100644
--- a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h
@@ -59,9 +59,10 @@ public:
void close();
void close(Timer<NotificationWrapper>*);
+ void sendDisplayEvent(Timer<NotificationWrapper>*);
const QString title() const;
const QString message() const;
- const QByteArray iconData() const;
+ const QUrl iconUrl() const;
const QUrl openerPageUrl() const;
public Q_SLOTS:
@@ -75,9 +76,10 @@ public:
OwnPtr<QWebNotificationPresenter> m_presenter;
Timer<NotificationWrapper> m_closeTimer;
+ Timer<NotificationWrapper> m_displayEventTimer;
};
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
typedef QHash <Notification*, NotificationWrapper*> NotificationsQueue;
@@ -91,7 +93,12 @@ public:
virtual void cancel(Notification*);
virtual void notificationObjectDestroyed(Notification*);
virtual void notificationControllerDestroyed();
+#if ENABLE(LEGACY_NOTIFICATIONS)
virtual void requestPermission(ScriptExecutionContext*, PassRefPtr<VoidCallback>);
+#endif
+#if ENABLE(NOTIFICATIONS)
+ virtual void requestPermission(ScriptExecutionContext*, PassRefPtr<NotificationPermissionCallback>) { }
+#endif
virtual NotificationClient::Permission checkPermission(ScriptExecutionContext*);
virtual void cancelRequestsForPermission(ScriptExecutionContext*);
@@ -108,10 +115,11 @@ public:
Notification* notificationForWrapper(const NotificationWrapper*) const;
void notificationClicked(NotificationWrapper*);
void notificationClicked(const QString& title);
+ void sendDisplayEvent(NotificationWrapper*);
private:
void sendEvent(Notification*, const AtomicString& eventName);
- void displayNotification(Notification*, const QByteArray&);
+ void displayNotification(Notification*);
void removeReplacedNotificationFromQueue(Notification*);
void detachNotification(Notification*);
void dumpReplacedIdText(Notification*);
diff --git a/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp b/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp
index 7d65f5cbf..29e4624eb 100644
--- a/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp
@@ -103,7 +103,7 @@ void PopupMenuQt::show(const IntRect& rect, FrameView* view, int index)
QRect geometry(rect);
geometry.moveTopLeft(view->contentsToWindow(rect.location()));
m_popup->setGeometry(geometry);
- m_popup->setFont(m_popupClient->menuStyle().font().font());
+ m_popup->setFont(m_popupClient->menuStyle().font().syntheticFont());
m_selectData = adoptPtr(new SelectData(m_popupClient));
m_popup->show(*m_selectData.get());
diff --git a/Source/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h b/Source/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
index ea111fa5c..2980d4582 100644
--- a/Source/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
+++ b/Source/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
@@ -20,8 +20,8 @@
#ifndef QtFallbackWebPopup_h
#define QtFallbackWebPopup_h
-#include "Platform.h"
#include "qwebkitplatformplugin.h"
+#include <wtf/Platform.h>
#include <QComboBox>
diff --git a/Source/WebKit/qt/WebCoreSupport/QtWebComboBox.h b/Source/WebKit/qt/WebCoreSupport/QtWebComboBox.h
index bca2e5f38..426475766 100644
--- a/Source/WebKit/qt/WebCoreSupport/QtWebComboBox.h
+++ b/Source/WebKit/qt/WebCoreSupport/QtWebComboBox.h
@@ -21,7 +21,7 @@
#ifndef QtWebComboBox_h
#define QtWebComboBox_h
-#include "Platform.h"
+#include <wtf/Platform.h>
#include <QComboBox>
diff --git a/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp b/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp
index ac42fdd8b..b9d72edff 100644
--- a/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp
@@ -31,7 +31,6 @@
#include "RenderThemeQStyle.h"
#include "CSSFontSelector.h"
-#include "CSSStyleSelector.h"
#include "CSSValueKeywords.h"
#include "Chrome.h"
#include "ChromeClient.h"
@@ -54,6 +53,7 @@
#include "RenderSlider.h"
#include "ScrollbarThemeQStyle.h"
#include "SliderThumbElement.h"
+#include "StyleResolver.h"
#include "UserAgentStyleSheets.h"
#include <QApplication>
@@ -209,7 +209,7 @@ QRect RenderThemeQStyle::inflateButtonRect(const QRect& originalRect) const
void RenderThemeQStyle::computeSizeBasedOnStyle(RenderStyle* renderStyle) const
{
QSize size(0, 0);
- const QFontMetrics fm(renderStyle->font().font());
+ const QFontMetrics fm(renderStyle->font().syntheticFont());
QStyle* style = qStyle();
switch (renderStyle->appearance()) {
@@ -289,7 +289,7 @@ void RenderThemeQStyle::computeSizeBasedOnStyle(RenderStyle* renderStyle) const
-void RenderThemeQStyle::adjustButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element*) const
+void RenderThemeQStyle::adjustButtonStyle(StyleResolver* styleResolver, RenderStyle* style, Element*) const
{
// Ditch the border.
style->resetBorder();
@@ -317,7 +317,7 @@ void RenderThemeQStyle::adjustButtonStyle(CSSStyleSelector* selector, RenderStyl
fontFamily.setFamily(m_buttonFontFamily);
fontDescription.setFamily(fontFamily);
style->setFontDescription(fontDescription);
- style->font().update(selector->fontSelector());
+ style->font().update(styleResolver->fontSelector());
style->setLineHeight(RenderStyle::initialLineHeight());
setButtonSize(style);
setButtonPadding(style);
@@ -407,9 +407,9 @@ bool RenderThemeQStyle::paintTextField(RenderObject* o, const PaintInfo& i, cons
return false;
}
-void RenderThemeQStyle::adjustTextAreaStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const
+void RenderThemeQStyle::adjustTextAreaStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
{
- adjustTextFieldStyle(selector, style, element);
+ adjustTextFieldStyle(styleResolver, style, element);
}
bool RenderThemeQStyle::paintTextArea(RenderObject* o, const PaintInfo& i, const IntRect& r)
@@ -463,13 +463,13 @@ bool RenderThemeQStyle::paintMenuList(RenderObject* o, const PaintInfo& i, const
return false;
}
-void RenderThemeQStyle::adjustMenuListButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
+void RenderThemeQStyle::adjustMenuListButtonStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const
{
// WORKAROUND because html.css specifies -webkit-border-radius for <select> so we override it here
// see also http://bugs.webkit.org/show_bug.cgi?id=18399
style->resetBorderRadius();
- RenderThemeQt::adjustMenuListButtonStyle(selector, style, e);
+ RenderThemeQt::adjustMenuListButtonStyle(styleResolver, style, e);
}
bool RenderThemeQStyle::paintMenuListButton(RenderObject* o, const PaintInfo& i,
@@ -499,7 +499,7 @@ double RenderThemeQStyle::animationDurationForProgressBar(RenderProgress* render
return 0;
QStyleOptionProgressBarV2 option;
- option.rect.setSize(renderProgress->size());
+ option.rect.setSize(renderProgress->pixelSnappedSize());
// FIXME: Until http://bugreports.qt.nokia.com/browse/QTBUG-9171 is fixed,
// we simulate one square animating across the progress bar.
return (option.rect.width() / qStyle()->pixelMetric(QStyle::PM_ProgressBarChunkWidth, &option)) * animationRepeatIntervalForProgressBar(renderProgress);
@@ -594,7 +594,7 @@ bool RenderThemeQStyle::paintSliderTrack(RenderObject* o, const PaintInfo& pi,
return false;
}
-void RenderThemeQStyle::adjustSliderTrackStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
+void RenderThemeQStyle::adjustSliderTrackStyle(StyleResolver*, RenderStyle* style, Element*) const
{
style->setBoxShadow(nullptr);
}
@@ -627,9 +627,9 @@ bool RenderThemeQStyle::paintSliderThumb(RenderObject* o, const PaintInfo& pi,
return false;
}
-void RenderThemeQStyle::adjustSliderThumbStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const
+void RenderThemeQStyle::adjustSliderThumbStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
{
- RenderTheme::adjustSliderThumbStyle(selector, style, element);
+ RenderTheme::adjustSliderThumbStyle(styleResolver, style, element);
style->setBoxShadow(nullptr);
}
@@ -639,11 +639,10 @@ bool RenderThemeQStyle::paintSearchField(RenderObject* o, const PaintInfo& pi,
return paintTextField(o, pi, r);
}
-void RenderThemeQStyle::adjustSearchFieldDecorationStyle(CSSStyleSelector* selector, RenderStyle* style,
- Element* e) const
+void RenderThemeQStyle::adjustSearchFieldDecorationStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const
{
notImplemented();
- RenderTheme::adjustSearchFieldDecorationStyle(selector, style, e);
+ RenderTheme::adjustSearchFieldDecorationStyle(styleResolver, style, e);
}
bool RenderThemeQStyle::paintSearchFieldDecoration(RenderObject* o, const PaintInfo& pi,
@@ -653,11 +652,10 @@ bool RenderThemeQStyle::paintSearchFieldDecoration(RenderObject* o, const PaintI
return RenderTheme::paintSearchFieldDecoration(o, pi, r);
}
-void RenderThemeQStyle::adjustSearchFieldResultsDecorationStyle(CSSStyleSelector* selector, RenderStyle* style,
- Element* e) const
+void RenderThemeQStyle::adjustSearchFieldResultsDecorationStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const
{
notImplemented();
- RenderTheme::adjustSearchFieldResultsDecorationStyle(selector, style, e);
+ RenderTheme::adjustSearchFieldResultsDecorationStyle(styleResolver, style, e);
}
bool RenderThemeQStyle::paintSearchFieldResultsDecoration(RenderObject* o, const PaintInfo& pi,
diff --git a/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h b/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h
index a83e02f5a..023a7c721 100644
--- a/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h
+++ b/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h
@@ -51,18 +51,18 @@ public:
QStyle* qStyle() const;
protected:
- virtual void adjustButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual void adjustButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintButton(RenderObject*, const PaintInfo&, const IntRect&);
virtual bool paintTextField(RenderObject*, const PaintInfo&, const IntRect&);
virtual bool paintTextArea(RenderObject*, const PaintInfo&, const IntRect&);
- virtual void adjustTextAreaStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual void adjustTextAreaStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&);
virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntRect&);
- virtual void adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
#if ENABLE(PROGRESS_TAG)
// Returns the duration of the animation for the progress bar.
@@ -71,17 +71,17 @@ protected:
#endif
virtual bool paintSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
- virtual void adjustSliderTrackStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual void adjustSliderTrackStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
- virtual void adjustSliderThumbStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual void adjustSliderThumbStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchField(RenderObject*, const PaintInfo&, const IntRect&);
- virtual void adjustSearchFieldDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual void adjustSearchFieldDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldDecoration(RenderObject*, const PaintInfo&, const IntRect&);
- virtual void adjustSearchFieldResultsDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual void adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInfo&, const IntRect&);
#ifndef QT_NO_SPINBOX
diff --git a/Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp b/Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp
index be5f5298e..d45f8ce31 100644
--- a/Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp
@@ -23,9 +23,12 @@
#include "WebEventConversion.h"
#include "PlatformMouseEvent.h"
+#include "PlatformTouchEvent.h"
+#include "PlatformTouchPoint.h"
#include "PlatformWheelEvent.h"
#include <QApplication>
#include <QGraphicsSceneMouseEvent>
+#include <QTouchEvent>
#include <QWheelEvent>
#include <wtf/CurrentTime.h>
@@ -178,27 +181,21 @@ private:
void WebKitPlatformWheelEvent::applyDelta(int delta, Qt::Orientation orientation)
{
- // A delta that is not mod 120 indicates a device that is sending
- // fine-resolution scroll events, so use the delta as number of wheel ticks
- // and number of pixels to scroll.See also webkit.org/b/29601
- bool fullTick = !(delta % 120);
-
if (orientation == Qt::Horizontal) {
- m_deltaX = (fullTick) ? delta / 120.0f : delta;
+ m_deltaX = delta;
m_deltaY = 0;
} else {
m_deltaX = 0;
- m_deltaY = (fullTick) ? delta / 120.0f : delta;
+ m_deltaY = delta;
}
+ m_wheelTicksX = m_deltaX / 120.0f;
+ m_wheelTicksY = m_deltaY / 120.0f;
- m_wheelTicksX = m_deltaX;
- m_wheelTicksY = m_deltaY;
-
- // Use the same single scroll step as QTextEdit
- // (in QTextEditPrivate::init [h,v]bar->setSingleStep)
+ // Since we request the scroll delta by the pixel, convert the wheel delta to pixel delta using the standard scroll step.
+ // Use the same single scroll step as QTextEdit (in QTextEditPrivate::init [h,v]bar->setSingleStep)
static const float cDefaultQtScrollStep = 20.f;
- m_deltaX *= (fullTick) ? QApplication::wheelScrollLines() * cDefaultQtScrollStep : 1;
- m_deltaY *= (fullTick) ? QApplication::wheelScrollLines() * cDefaultQtScrollStep : 1;
+ m_deltaX = m_wheelTicksX * QApplication::wheelScrollLines() * cDefaultQtScrollStep;
+ m_deltaY = m_wheelTicksY * QApplication::wheelScrollLines() * cDefaultQtScrollStep;
}
WebKitPlatformWheelEvent::WebKitPlatformWheelEvent(QGraphicsSceneWheelEvent* e)
@@ -223,6 +220,89 @@ WebKitPlatformWheelEvent::WebKitPlatformWheelEvent(QWheelEvent* e)
applyDelta(e->delta(), e->orientation());
}
+#if ENABLE(TOUCH_EVENTS)
+class WebKitPlatformTouchEvent : public PlatformTouchEvent {
+public:
+ WebKitPlatformTouchEvent(QTouchEvent*);
+};
+
+class WebKitPlatformTouchPoint : public PlatformTouchPoint {
+public:
+ WebKitPlatformTouchPoint(const QTouchEvent::TouchPoint&, State);
+};
+
+WebKitPlatformTouchEvent::WebKitPlatformTouchEvent(QTouchEvent* event)
+{
+ switch (event->type()) {
+ case QEvent::TouchBegin:
+ m_type = PlatformEvent::TouchStart;
+ break;
+ case QEvent::TouchUpdate:
+ m_type = PlatformEvent::TouchMove;
+ break;
+ case QEvent::TouchEnd:
+ m_type = PlatformEvent::TouchEnd;
+ break;
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+ case QEvent::TouchCancel:
+ m_type = PlatformEvent::TouchCancel;
+ break;
+#endif
+ }
+
+ const QList<QTouchEvent::TouchPoint>& points = event->touchPoints();
+ for (int i = 0; i < points.count(); ++i) {
+ PlatformTouchPoint::State state = PlatformTouchPoint::TouchStateEnd;
+
+ switch (points.at(i).state()) {
+ case Qt::TouchPointReleased:
+ state = PlatformTouchPoint::TouchReleased;
+ break;
+ case Qt::TouchPointMoved:
+ state = PlatformTouchPoint::TouchMoved;
+ break;
+ case Qt::TouchPointPressed:
+ state = PlatformTouchPoint::TouchPressed;
+ break;
+ case Qt::TouchPointStationary:
+ state = PlatformTouchPoint::TouchStationary;
+ break;
+ }
+
+ // Qt does not have a Qt::TouchPointCancelled point state, so if we receive a touch cancel event,
+ // simply cancel all touch points here.
+ if (m_type == PlatformEvent::TouchCancel)
+ state = PlatformTouchPoint::TouchCancelled;
+
+ m_touchPoints.append(WebKitPlatformTouchPoint(points.at(i), state));
+ }
+
+ mouseEventModifiersFromQtKeyboardModifiers(event->modifiers(), m_modifiers);
+
+ m_timestamp = WTF::currentTime();
+}
+
+WebKitPlatformTouchPoint::WebKitPlatformTouchPoint(const QTouchEvent::TouchPoint& point, State state)
+{
+ // The QTouchEvent::TouchPoint API states that ids will be >= 0.
+ m_id = point.id();
+ m_state = state;
+ m_screenPos = point.screenPos().toPoint();
+ m_pos = point.pos().toPoint();
+ // Qt reports touch point size as rectangles, but we will pretend it is an oval.
+ QRect touchRect = point.rect().toAlignedRect();
+ if (touchRect.isValid()) {
+ m_radiusX = point.rect().width() / 2;
+ m_radiusY = point.rect().height() / 2;
+ } else {
+ // http://www.w3.org/TR/2011/WD-touch-events-20110505: 1 if no value is known.
+ m_radiusX = 1;
+ m_radiusY = 1;
+ }
+ m_force = point.pressure();
+ // FIXME: Support m_rotationAngle if QTouchEvent at some point supports it.
+}
+#endif
PlatformWheelEvent convertWheelEvent(QWheelEvent* event)
{
@@ -234,4 +314,11 @@ PlatformWheelEvent convertWheelEvent(QGraphicsSceneWheelEvent* event)
return WebKitPlatformWheelEvent(event);
}
+#if ENABLE(TOUCH_EVENTS)
+PlatformTouchEvent convertTouchEvent(QTouchEvent* event)
+{
+ return WebKitPlatformTouchEvent(event);
+}
+#endif
+
}
diff --git a/Source/WebKit/qt/WebCoreSupport/WebEventConversion.h b/Source/WebKit/qt/WebCoreSupport/WebEventConversion.h
index 25d02df22..09c63d17c 100644
--- a/Source/WebKit/qt/WebCoreSupport/WebEventConversion.h
+++ b/Source/WebKit/qt/WebCoreSupport/WebEventConversion.h
@@ -26,6 +26,7 @@ class QInputEvent;
class QGraphicsSceneMouseEvent;
class QWheelEvent;
class QGraphicsSceneWheelEvent;
+class QTouchEvent;
QT_END_NAMESPACE
namespace WebCore {
@@ -33,9 +34,14 @@ namespace WebCore {
class PlatformMouseEvent;
class PlatformWheelEvent;
+
PlatformMouseEvent convertMouseEvent(QInputEvent*, int clickCount);
PlatformMouseEvent convertMouseEvent(QGraphicsSceneMouseEvent*, int clickCount);
PlatformWheelEvent convertWheelEvent(QWheelEvent*);
PlatformWheelEvent convertWheelEvent(QGraphicsSceneWheelEvent*);
+#if ENABLE(TOUCH_EVENTS)
+class PlatformTouchEvent;
+PlatformTouchEvent convertTouchEvent(QTouchEvent*);
+#endif
}
diff --git a/Source/WebKit/qt/declarative/declarative.pro b/Source/WebKit/qt/declarative/declarative.pro
index 737928338..e7ed4496c 100644
--- a/Source/WebKit/qt/declarative/declarative.pro
+++ b/Source/WebKit/qt/declarative/declarative.pro
@@ -7,6 +7,8 @@
TEMPLATE = subdirs
CONFIG += ordered
+load(features)
+
public_api.file = public.pri
public_api.makefile = Makefile.declarative.public
SUBDIRS += public_api
diff --git a/Source/WebKit/qt/declarative/experimental/experimental.pri b/Source/WebKit/qt/declarative/experimental/experimental.pri
index 583726f62..20d54523c 100644
--- a/Source/WebKit/qt/declarative/experimental/experimental.pri
+++ b/Source/WebKit/qt/declarative/experimental/experimental.pri
@@ -24,7 +24,7 @@ contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
wince*:LIBS += $$QMAKE_LIBS_GUI
-QT += declarative widgets network quick webkit webkit-private
+QT += declarative widgets network quick quick-private webkit webkit-private
DESTDIR = $${ROOT_BUILD_DIR}/imports/$${TARGET.module_name}
@@ -35,15 +35,7 @@ SOURCES += plugin.cpp
DEFINES += HAVE_WEBKIT2
-# FIXME: Why are these needed, and why can't we use WEBKIT += ... ?
-INCLUDEPATH += \
- ../../../../WebKit2/Shared/qt \
- ../../../../JavaScriptCore \
- ../../../../JavaScriptCore/wtf \
- ../../../../JavaScriptCore/wtf/unicode \
- ../../../../JavaScriptCore/runtime \
- ../../../../WebKit2/Platform \
- ../../../../WebKit2/Platform/CoreIPC
+WEBKIT += wtf javascriptcore webkit2
target.path = $$[QT_INSTALL_IMPORTS]/$${TARGET.module_name}
diff --git a/Source/WebKit/qt/declarative/experimental/plugin.cpp b/Source/WebKit/qt/declarative/experimental/plugin.cpp
index 7d380e66a..d33a47955 100644
--- a/Source/WebKit/qt/declarative/experimental/plugin.cpp
+++ b/Source/WebKit/qt/declarative/experimental/plugin.cpp
@@ -30,8 +30,8 @@
#include "private/qwebpreferences_p.h"
#include "private/qwebviewportinfo_p.h"
-#include <QtDeclarative/qdeclarative.h>
-#include <QtDeclarative/qdeclarativeextensionplugin.h>
+#include <QtQml/qqml.h>
+#include <QtQml/qqmlextensionplugin.h>
QT_BEGIN_NAMESPACE
diff --git a/Source/WebKit/qt/declarative/plugin.cpp b/Source/WebKit/qt/declarative/plugin.cpp
index 968b1fe18..08532bf01 100644
--- a/Source/WebKit/qt/declarative/plugin.cpp
+++ b/Source/WebKit/qt/declarative/plugin.cpp
@@ -17,12 +17,19 @@
Boston, MA 02110-1301, USA.
*/
+#include "qglobal.h"
+
#if defined(HAVE_QQUICK1)
#include "qdeclarativewebview_p.h"
#endif
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+#include <QtQml/qqml.h>
+#include <QtQml/qqmlextensionplugin.h>
+#else
#include <QtDeclarative/qdeclarative.h>
#include <QtDeclarative/qdeclarativeextensionplugin.h>
+#endif
#if defined(HAVE_WEBKIT2)
#include "private/qquickwebpage_p.h"
@@ -31,8 +38,8 @@
#include "private/qwebloadrequest_p.h"
#include "private/qwebnavigationrequest_p.h"
-#include <QtDeclarative/qdeclarativeengine.h>
#include <QtNetwork/qnetworkreply.h>
+#include <QtQml/qqmlengine.h>
#endif
QT_BEGIN_NAMESPACE
@@ -41,7 +48,7 @@ class WebKitQmlPlugin : public QDeclarativeExtensionPlugin {
Q_OBJECT
public:
#if defined(HAVE_WEBKIT2)
- virtual void initializeEngine(QDeclarativeEngine* engine, const char* uri)
+ virtual void initializeEngine(QQmlEngine* engine, const char* uri)
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWebKit"));
engine->addImageProvider(QLatin1String("webicon"), new QWebIconImageProvider);
diff --git a/Source/WebKit/qt/declarative/public.pri b/Source/WebKit/qt/declarative/public.pri
index e389e38eb..04b17b724 100644
--- a/Source/WebKit/qt/declarative/public.pri
+++ b/Source/WebKit/qt/declarative/public.pri
@@ -27,7 +27,7 @@ contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
wince*:LIBS += $$QMAKE_LIBS_GUI
QT += declarative webkit webkit-private
-haveQt(5): QT += widgets quick
+haveQt(5): QT += widgets quick quick-private
contains(DEFINES, HAVE_QQUICK1=1) {
SOURCES += qdeclarativewebview.cpp
@@ -39,13 +39,6 @@ DESTDIR = $${ROOT_BUILD_DIR}/imports/$${TARGET.module_name}
CONFIG += rpath
RPATHDIR_RELATIVE_TO_DESTDIR = ../../lib
-# FIXME: Why are these needed, and why can't we use WEBKIT += ... ?
-INCLUDEPATH += \
- ../../../WebKit2/Shared/qt \
- ../../../JavaScriptCore \
- ../../../JavaScriptCore/runtime \
- ../../../JavaScriptCore/wtf
-
SOURCES += plugin.cpp
!no_webkit2: {
diff --git a/Source/WebKit/qt/docs/qtwebkit-bridge.qdoc b/Source/WebKit/qt/docs/qtwebkit-bridge.qdoc
index 807cdaec0..2975d157f 100644
--- a/Source/WebKit/qt/docs/qtwebkit-bridge.qdoc
+++ b/Source/WebKit/qt/docs/qtwebkit-bridge.qdoc
@@ -132,7 +132,7 @@
\snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 10
- The call to \c{connect() establishes a connection between the signal
+ The call to \c{connect()} establishes a connection between the signal
\c{somethingChanged} and the slot \c{function}. Whenever the object
\c{myObject} emits the signal \c{somethingChanged}, the slot \c{function}
of the object \c{thisObject} gets called automatically. Let's illustrate
diff --git a/Source/WebKit/qt/docs/qtwebkit.qdocconf b/Source/WebKit/qt/docs/qtwebkit.qdocconf
index 278d77ba8..1f51ea37e 100644
--- a/Source/WebKit/qt/docs/qtwebkit.qdocconf
+++ b/Source/WebKit/qt/docs/qtwebkit.qdocconf
@@ -3,8 +3,8 @@
project = qtwebkit
description = "Qt WebKit API Documentation"
-headerdirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/declarative
-sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs $SRCDIR/Source/JavaScriptCore/qt/api $SRCDIR/WebKit/qt/declarative
+headerdirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/declarative $SRCDIR/WebKit2/UIProcess/API/qt
+sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs $SRCDIR/Source/JavaScriptCore/qt/api $SRCDIR/WebKit/qt/declarative $SRCDIR/WebKit2/UIProcess/API/qt
outputdir = $OUTPUT_DIR/doc/html
outputformats = HTML
sources.fileextensions = "*.cpp *.doc *.qdoc *.h"
diff --git a/Source/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp b/Source/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp
index d991ab162..339bade03 100644
--- a/Source/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp
+++ b/Source/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp
@@ -39,13 +39,7 @@ void WebNotificationWidget::showNotification(const QWebNotificationData* data)
QGridLayout* layout = new QGridLayout(this);
layout->addWidget(new QLabel(data->title()), 0, 0, 1, 5);
int messagePosition = 0;
- QPixmap pixmap;
- if (data->iconData().length() && pixmap.loadFromData(data->iconData())) {
- QLabel* label = new QLabel;
- label->setPixmap(pixmap);
- layout->addWidget(label, 1, 0, 1, 1);
- messagePosition++;
- }
+
QLabel* messageLabel = new QLabel(data->message());
messageLabel->setMask(bitmap);
messageLabel->setWordWrap(true);
diff --git a/Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h b/Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
index b28c05801..aa8ec7ea6 100644
--- a/Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
+++ b/Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
@@ -75,7 +75,7 @@ public:
virtual const QString title() const = 0;
virtual const QString message() const = 0;
- virtual const QByteArray iconData() const = 0;
+ virtual const QUrl iconUrl() const = 0;
virtual const QUrl openerPageUrl() const = 0;
};
@@ -180,7 +180,7 @@ public:
};
QT_BEGIN_NAMESPACE
-Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.8");
+Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.9");
QT_END_NAMESPACE
#endif // QWEBKITPLATFORMPLUGIN_H
diff --git a/Source/WebKit/qt/tests/MIMESniffing/MIMESniffing.pro b/Source/WebKit/qt/tests/MIMESniffing/MIMESniffing.pro
index fe50f1b34..c856a6e7d 100644
--- a/Source/WebKit/qt/tests/MIMESniffing/MIMESniffing.pro
+++ b/Source/WebKit/qt/tests/MIMESniffing/MIMESniffing.pro
@@ -10,6 +10,7 @@ HEADERS += \
INCLUDEPATH += \
../../../../WebCore/platform/network \
../../../../JavaScriptCore \
- ../../../../JavaScriptCore/runtime
+ ../../../../JavaScriptCore/runtime \
+ ../../../../WTF
RESOURCES += resources.qrc
diff --git a/Source/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp b/Source/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp
index 1c3985b83..2ebf3775d 100644
--- a/Source/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp
+++ b/Source/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp
@@ -17,7 +17,9 @@
* Boston, MA 02110-1301, USA.
*/
+#ifndef QT_NO_BEARERMANAGEMENT
#include <QNetworkConfigurationManager>
+#endif
#include <QtTest/QtTest>
@@ -42,7 +44,9 @@ private Q_SLOTS:
void load();
private:
+#ifndef QT_NO_BEARERMANAGEMENT
QNetworkConfigurationManager m_manager;
+#endif
QWebView* m_view;
QWebPage* m_page;
};
@@ -74,8 +78,10 @@ void tst_Loading::load()
{
QFETCH(QUrl, url);
+#ifndef QT_NO_BEARERMANAGEMENT
if (!m_manager.isOnline())
W_QSKIP("This test requires an active network connection", SkipSingle);
+#endif
QBENCHMARK {
m_view->load(url);
diff --git a/Source/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp b/Source/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp
index 3f97b5aea..8abba4bad 100644
--- a/Source/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp
+++ b/Source/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp
@@ -17,7 +17,9 @@
* Boston, MA 02110-1301, USA.
*/
+#ifndef QT_NO_BEARERMANAGEMENT
#include <QNetworkConfigurationManager>
+#endif
#include <QtTest/QtTest>
@@ -44,7 +46,9 @@ private Q_SLOTS:
void textAreas();
private:
+#ifndef QT_NO_BEARERMANAGEMENT
QNetworkConfigurationManager m_manager;
+#endif
QWebView* m_view;
QWebPage* m_page;
};
@@ -74,8 +78,10 @@ void tst_Painting::paint()
{
QFETCH(QUrl, url);
+#ifndef QT_NO_BEARERMANAGEMENT
if (!m_manager.isOnline())
W_QSKIP("This test requires an active network connection", SkipSingle);
+#endif
m_view->load(url);
::waitForSignal(m_view, SIGNAL(loadFinished(bool)), 0);
diff --git a/Source/WebKit/win/AccessibleBase.cpp b/Source/WebKit/win/AccessibleBase.cpp
index d26086677..e733141f2 100644
--- a/Source/WebKit/win/AccessibleBase.cpp
+++ b/Source/WebKit/win/AccessibleBase.cpp
@@ -498,7 +498,7 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::accLocation(long* left, long* top, lon
if (!childObj->documentFrameView())
return E_FAIL;
- IntRect screenRect(childObj->documentFrameView()->contentsToScreen(childObj->elementRect()));
+ IntRect screenRect(childObj->documentFrameView()->contentsToScreen(childObj->pixelSnappedElementRect()));
*left = screenRect.x();
*top = screenRect.y();
*width = screenRect.width();
diff --git a/Source/WebKit/win/ChangeLog b/Source/WebKit/win/ChangeLog
index 795dca1af..56dea8721 100644
--- a/Source/WebKit/win/ChangeLog
+++ b/Source/WebKit/win/ChangeLog
@@ -1,3 +1,343 @@
+2012-05-05 Dean Jackson <dino@apple.com>
+
+ Add new Setting/Preference to disable requestAnimationFrame
+ https://bugs.webkit.org/show_bug.cgi?id=85693
+
+ Reviewed by Simon Fraser.
+
+ Exposes a new WebPreference: WebKitRequestAnimationFrameEnabled.
+ The default value is true. The majority of applications will leave
+ it this way.
+
+ * Interfaces/IWebPreferencesPrivate.idl:
+ * WebPreferenceKeysPrivate.h:
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings):
+ (WebPreferences::setRequestAnimationFrameEnabled):
+ (WebPreferences::requestAnimationFrameEnabled):
+ * WebPreferences.h:
+ (WebPreferences):
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged):
+
+2012-05-04 Nate Chapin <japhet@chromium.org>
+
+ Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+ https://bugs.webkit.org/show_bug.cgi?id=85533
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::finishedLoading):
+
+2012-04-27 Jon Lee <jonlee@apple.com>
+
+ Migrate permission functions to Notification from NotificationCenter
+ https://bugs.webkit.org/show_bug.cgi?id=80485
+ <rdar://problem/10965458>
+
+ Reviewed by Jian Li.
+
+ * WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
+ (WebDesktopNotificationsDelegate::requestPermission):
+ * WebCoreSupport/WebDesktopNotificationsDelegate.h:
+ (WebDesktopNotificationsDelegate): Add stub implementation of requestPermission.
+
+2012-04-23 Jon Honeycutt <jhoneycutt@apple.com>
+
+ FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
+ information about the form being submitted
+ https://bugs.webkit.org/show_bug.cgi?id=84297
+
+ Reviewed by Andy Estes.
+
+ * WebFrame.h:
+ Fix function stub for new parameter.
+
+2012-05-01 Ryosuke Niwa <rniwa@webkit.org>
+
+ *Command.h files shouldn't be exported to WebKit layer
+ https://bugs.webkit.org/show_bug.cgi?id=74778
+
+ Reviewed by Eric Seidel.
+
+ * WebView.cpp:
+
+2012-04-20 Emil A Eklund <eae@chromium.org>
+
+ [win] Update windows platform code to use pixel snapped values
+ https://bugs.webkit.org/show_bug.cgi?id=84283
+
+ Reviewed by Eric Seidel.
+
+ * AccessibleBase.cpp:
+ (AccessibleBase::accLocation):
+
+2012-04-18 Vivek Galatage <vivekgalatage@gmail.com>
+
+ Web Inspector: Disabling Inspector causes build failure on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=83557
+
+ Reviewed by Pavel Feldman.
+
+ The calls to inspector APIs are not put under ENABLE(INSPECTOR) guard.
+ This change brings all such API calls under the guard.
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ * WebInspector.cpp:
+ * WebNodeHighlight.cpp:
+ (WebNodeHighlight::WebNodeHighlight):
+ (WebNodeHighlight::update):
+ * WebNodeHighlight.h:
+ (WebNodeHighlight):
+ * WebView.cpp:
+ (WebView::WebView):
+ (WebView::close):
+ (WebView::initWithFrame):
+ (WebView::inspector):
+ * WebView.h:
+ (WebView):
+
+2012-04-11 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r113836.
+ http://trac.webkit.org/changeset/113836
+ https://bugs.webkit.org/show_bug.cgi?id=83705
+
+ Broke all the WebKit2 inspector tests (Requested by andersca
+ on #webkit).
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (registerWindowClass):
+ * WebInspector.cpp:
+ (WebInspector::setTimelineProfilingEnabled):
+ * WebNodeHighlight.cpp:
+ (WebNodeHighlight::WebNodeHighlight):
+ (WebNodeHighlight::update):
+ * WebNodeHighlight.h:
+ (WebNodeHighlight):
+ * WebView.cpp:
+ (WebView::WebView):
+ (WebView::close):
+ (WebView::initWithFrame):
+ (WebView::inspector):
+ * WebView.h:
+ (WebView):
+
+2012-04-11 Vivek Galatage <vivekgalatage@gmail.com>
+
+ Web Inspector: Disabling Inspector causes build failure on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=83557
+
+ Reviewed by Pavel Feldman.
+
+ The calls to inspector APIs are not put under ENABLE(INSPECTOR) guard.
+ This change brings all such API calls under the guard.
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ * WebInspector.cpp:
+ * WebNodeHighlight.cpp:
+ (WebNodeHighlight::WebNodeHighlight):
+ (WebNodeHighlight::update):
+ * WebNodeHighlight.h:
+ (WebNodeHighlight):
+ * WebView.cpp:
+ (WebView::WebView):
+ (WebView::close):
+ (WebView::initWithFrame):
+ (WebView::inspector):
+ * WebView.h:
+ (WebView):
+
+2012-03-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ GEOLOCATION should be implemented as Page Supplement
+ https://bugs.webkit.org/show_bug.cgi?id=82228
+
+ Reviewed by Adam Barth.
+
+ Geolocation is now a Supplement in Page so the interface
+ has changed for setting up the page's geolocation client
+ initially and accessing the controller later.
+
+ * WebView.cpp:
+ (WebView::initWithFrame):
+ (WebView::geolocationDidChangePosition):
+ (WebView::geolocationDidFailWithError):
+
+2012-03-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r112553.
+ http://trac.webkit.org/changeset/112553
+ https://bugs.webkit.org/show_bug.cgi?id=82638
+
+ It made all tests crash on Qt WK2 (Requested by Ossy_away on
+ #webkit).
+
+ * WebView.cpp:
+ (WebView::initWithFrame):
+ (WebView::geolocationDidChangePosition):
+ (WebView::geolocationDidFailWithError):
+
+2012-03-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ HashMap<>::add should return a more descriptive object
+ https://bugs.webkit.org/show_bug.cgi?id=71063
+
+ Reviewed by Ryosuke Niwa.
+
+ Update code to use AddResult instead of a pair.
+
+ * WebKitCOMAPI.cpp:
+ (classFactory):
+
+2012-03-29 Mark Pilgrim <pilgrim@chromium.org>
+
+ GEOLOCATION should be implemented as Page Supplement
+ https://bugs.webkit.org/show_bug.cgi?id=82228
+
+ Reviewed by Adam Barth.
+
+ Geolocation is now a Supplement in Page so the interface
+ has changed for setting up the page's geolocation client
+ initially and accessing the controller later.
+
+ * WebView.cpp:
+ (WebView::initWithFrame):
+ (WebView::geolocationDidChangePosition):
+ (WebView::geolocationDidFailWithError):
+
+2012-03-28 Nate Chapin <japhet@chromium.org>
+
+ Remove dispatchDidLoadMainResource callback, since no
+ port implements it.
+ https://bugs.webkit.org/show_bug.cgi?id=82539
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ (WebFrameLoaderClient):
+
+2012-03-26 Adam Barth <abarth@webkit.org>
+
+ FrameLoader::shouldAllowNavigation uses Frame for context rather than Document
+ https://bugs.webkit.org/show_bug.cgi?id=81020
+
+ Reviewed by Eric Seidel.
+
+ Update call site to new function name.
+
+ * WebFrame.cpp:
+ (WebFrame::dispatchWillSubmitForm):
+
+2012-03-22 Anders Carlsson <andersca@apple.com>
+
+ ASSERT(!needsLayout) in RenderView.cpp when visiting http://www.panic.com/blog/
+ https://bugs.webkit.org/show_bug.cgi?id=81953
+ <rdar://problem/11086998>
+
+ Reviewed by Sam Weinig.
+
+ Update for changes to WebCore.
+
+ * FullscreenVideoController.cpp:
+ (FullscreenVideoController::LayerClient::platformCALayerDidCreateTiles):
+
+2012-03-20 Steve Falkenburg <sfalken@apple.com>
+
+ Move WTF-related Windows project files out of JavaScriptCore
+ https://bugs.webkit.org/show_bug.cgi?id=80680
+
+ Reviewed by Jessie Berlin.
+
+ * WebKit.vcproj/WebKit.sln:
+
+2012-03-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert hasSpellingMarker to use Internals interface.
+ https://bugs.webkit.org/show_bug.cgi?id=81300
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove hasSpellingMarker interface support, since it can support in the cross-port
+ way through the Internals interface.
+
+ * Interfaces/IWebFramePrivate.idl:
+
+2012-03-19 Adam Barth <abarth@webkit.org>
+
+ Remove support for "magic" iframe
+ https://bugs.webkit.org/show_bug.cgi?id=81590
+
+ Reviewed by Eric Seidel.
+
+ Remove FrameLoaderClient methods that no longer exist.
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ (WebFrameLoaderClient):
+
+2012-03-19 Anders Carlsson <andersca@apple.com>
+
+ Fix Windows build.
+
+ * FullscreenVideoController.cpp:
+ (FullscreenVideoController::LayerClient::platformCALayerDeviceScaleFactor):
+
+2012-03-13 Jon Lee <jonlee@apple.com>
+
+ Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
+ https://bugs.webkit.org/show_bug.cgi?id=80922
+ <rdar://problem/11035082>
+
+ Reviewed by Jian Li.
+
+ You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
+ LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
+ new API. Therefore, APIs that are common between the two will have:
+ #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+
+ This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
+ the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
+
+ Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+ * WebCoreSupport/WebChromeClient.cpp:
+ (WebChromeClient::WebChromeClient):
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient):
+ * WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
+ * WebCoreSupport/WebDesktopNotificationsDelegate.h:
+
+2012-03-13 Adam Barth <abarth@webkit.org> && Benjamin Poulain <bpoulain@apple.com>
+
+ Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
+ https://bugs.webkit.org/show_bug.cgi?id=78853
+
+ Reviewed by Adam Barth.
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient):
+ * WebCoreSupport/WebGeolocationClient.cpp:
+ (WebGeolocationClient::lastPosition):
+ * WebGeolocationPosition.cpp:
+ (WebGeolocationPosition::initWithTimestamp):
+ (core):
+ * WebGeolocationPosition.h:
+ (WebGeolocationPosition):
+ (WebGeolocationPosition::impl):
+ * WebView.cpp:
+ (WebView::initWithFrame):
+ (WebView::geolocationDidChangePosition):
+ (WebView::geolocationDidFailWithError):
+
+2012-03-12 Jessie Berlin <jberlin@apple.com>
+
+ More Windows build fixing.
+
+ * MarshallingHelpers.cpp:
+ * WebDatabaseManager.cpp:
+
2012-03-09 Jon Lee <jonlee@apple.com>
Rename NotificationPresenter to NotificationClient
diff --git a/Source/WebKit/win/FullscreenVideoController.cpp b/Source/WebKit/win/FullscreenVideoController.cpp
index 29ffacd0e..203e229e3 100644
--- a/Source/WebKit/win/FullscreenVideoController.cpp
+++ b/Source/WebKit/win/FullscreenVideoController.cpp
@@ -195,7 +195,8 @@ private:
virtual bool platformCALayerContentsOpaque() const { return false; }
virtual bool platformCALayerDrawsContent() const { return false; }
virtual void platformCALayerLayerDidDisplay(PlatformLayer*) { }
- virtual void platformCALayerDidCreateTiles() { }
+ virtual void platformCALayerDidCreateTiles(const Vector<FloatRect>&) { }
+ virtual float platformCALayerDeviceScaleFactor() { return 1; }
FullscreenVideoController* m_parent;
};
diff --git a/Source/WebKit/win/Interfaces/IWebFramePrivate.idl b/Source/WebKit/win/Interfaces/IWebFramePrivate.idl
index 90ba4bdb9..cb7a46997 100644
--- a/Source/WebKit/win/Interfaces/IWebFramePrivate.idl
+++ b/Source/WebKit/win/Interfaces/IWebFramePrivate.idl
@@ -115,8 +115,6 @@ interface IWebFramePrivate : IUnknown
HRESULT loadPlainTextString([in] BSTR string, [in] BSTR url);
- HRESULT hasSpellingMarker([in] UINT from, [in] UINT length, [out, retval] BOOL* result);
-
HRESULT clearOpener();
HRESULT setTextDirection([in] BSTR direction);
diff --git a/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl b/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
index ad67a56b0..2f1fdeae5 100644
--- a/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
+++ b/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
@@ -142,4 +142,7 @@ interface IWebPreferencesPrivate : IUnknown
HRESULT setShouldInvertColors([in] BOOL);
HRESULT shouldInvertColors([out, retval] BOOL*);
+
+ HRESULT setRequestAnimationFrameEnabled([in] BOOL);
+ HRESULT requestAnimationFrameEnabled([out, retval] BOOL*);
}
diff --git a/Source/WebKit/win/MarshallingHelpers.cpp b/Source/WebKit/win/MarshallingHelpers.cpp
index b29804e98..c7719fdb2 100644
--- a/Source/WebKit/win/MarshallingHelpers.cpp
+++ b/Source/WebKit/win/MarshallingHelpers.cpp
@@ -26,11 +26,11 @@
#include "config.h"
#include "WebKitDLL.h"
#include "MarshallingHelpers.h"
-#include "MathExtras.h"
#include <WebCore/IntRect.h>
#include <WebCore/KURL.h>
#include <WebCore/PlatformString.h>
+#include <wtf/MathExtras.h>
using namespace WebCore;
diff --git a/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
index cca9ec0e7..4435b48d6 100644
--- a/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
+++ b/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
@@ -74,7 +74,7 @@ static const size_t maxFilePathsListSize = USHRT_MAX;
WebChromeClient::WebChromeClient(WebView* webView)
: m_webView(webView)
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
, m_notificationsDelegate(new WebDesktopNotificationsDelegate(webView))
#endif
{
diff --git a/Source/WebKit/win/WebCoreSupport/WebChromeClient.h b/Source/WebKit/win/WebCoreSupport/WebChromeClient.h
index 478f5d53b..f22d6f3ab 100644
--- a/Source/WebKit/win/WebCoreSupport/WebChromeClient.h
+++ b/Source/WebKit/win/WebCoreSupport/WebChromeClient.h
@@ -144,18 +144,13 @@ public:
virtual void scrollRectIntoView(const WebCore::IntRect&) const { }
- // FIXME: Remove once all ports are using client-based geolocation. https://bugs.webkit.org/show_bug.cgi?id=40373
- // For client-based geolocation, these two methods have been moved to WebGeolocationClient. https://bugs.webkit.org/show_bug.cgi?id=50061
- virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*) { }
- virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*) { }
-
#if ENABLE(VIDEO)
virtual bool supportsFullscreenForNode(const WebCore::Node*);
virtual void enterFullscreenForNode(WebCore::Node*);
virtual void exitFullscreenForNode(WebCore::Node*);
#endif
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
virtual WebCore::NotificationClient* notificationPresenter() const { return reinterpret_cast<WebCore::NotificationClient*>(m_notificationsDelegate.get()); }
#endif
@@ -180,7 +175,7 @@ private:
WebView* m_webView;
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
OwnPtr<WebDesktopNotificationsDelegate> m_notificationsDelegate;
#endif
};
diff --git a/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp b/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp
index 70ed482c3..a5646f255 100644
--- a/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp
+++ b/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp
@@ -36,7 +36,7 @@
#include <WebCore/Document.h>
#include <WebCore/KURL.h>
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
using namespace WebCore;
@@ -176,6 +176,10 @@ void WebDesktopNotificationsDelegate::requestPermission(SecurityOrigin* origin,
notificationDelegate()->requestNotificationPermission(org);
}
+void WebDesktopNotificationsDelegate::requestPermission(SecurityOrigin*, PassRefPtr<NotificationPermissionCallback>)
+{
+}
+
void WebDesktopNotificationsDelegate::cancelRequestsForPermission(ScriptExecutionContext* context)
{
}
@@ -211,4 +215,4 @@ COMPtr<IWebDesktopNotificationsDelegate> WebDesktopNotificationsDelegate::notifi
return delegate;
}
-#endif // ENABLE(NOTIFICATIONS)
+#endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
diff --git a/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h b/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h
index a1a1185c5..b6f9c218f 100644
--- a/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h
+++ b/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h
@@ -32,7 +32,7 @@
#include <WebCore/Notification.h>
#include <WebCore/NotificationClient.h>
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
interface IWebDesktopNotificationPresenter;
@@ -50,7 +50,12 @@ public:
virtual void cancel(WebCore::Notification* object);
virtual void notificationObjectDestroyed(WebCore::Notification* object);
virtual void notificationControllerDestroyed();
- virtual void requestPermission(WebCore::SecurityOrigin* origin, PassRefPtr<WebCore::VoidCallback> callback);
+#if ENABLE(LEGACY_NOTIFICATIONS)
+ virtual void requestPermission(WebCore::SecurityOrigin*, PassRefPtr<WebCore::VoidCallback>);
+#endif
+#if ENABLE(NOTIFICATIONS)
+ virtual void requestPermission(WebCore::SecurityOrigin*, PassRefPtr<WebCore::NotificationPermissionCallback>);
+#endif
virtual void cancelRequestsForPermission(WebCore::ScriptExecutionContext*);
virtual WebCore::NotificationClient::Permission checkPermission(const KURL&);
diff --git a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
index f2e81aca4..4f717c57b 100644
--- a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -460,10 +460,6 @@ void WebFrameLoaderClient::dispatchShow()
ui->webViewShow(webView);
}
-void WebFrameLoaderClient::dispatchDidLoadMainResource(DocumentLoader*)
-{
-}
-
void WebFrameLoaderClient::setMainDocumentError(DocumentLoader*, const ResourceError& error)
{
if (!m_manualLoader)
@@ -521,13 +517,8 @@ void WebFrameLoaderClient::committedLoad(DocumentLoader* loader, const char* dat
m_manualLoader->didReceiveData(data, length);
}
-void WebFrameLoaderClient::finishedLoading(DocumentLoader* loader)
+void WebFrameLoaderClient::finishedLoading(DocumentLoader*)
{
- // Telling the frame we received some data and passing 0 as the data is our
- // way to get work done that is normally done when the first bit of data is
- // received, even for the case of a document with no data (like about:blank)
- committedLoad(loader, 0, 0);
-
if (!m_manualLoader)
return;
@@ -762,33 +753,6 @@ PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const Strin
return result.release();
}
-void WebFrameLoaderClient::didTransferChildFrameToNewDocument(Page*)
-{
- Frame* coreFrame = core(m_webFrame);
- ASSERT(coreFrame);
- WebView* webView = kit(coreFrame->page());
- if (m_webFrame->webView() != webView)
- m_webFrame->setWebView(webView);
-}
-
-void WebFrameLoaderClient::transferLoadingResourceFromPage(ResourceLoader* loader, const ResourceRequest& request, Page* oldPage)
-{
- assignIdentifierToInitialRequest(loader->identifier(), loader->documentLoader(), request);
-
- WebView* oldWebView = kit(oldPage);
- if (!oldWebView)
- return;
-
- COMPtr<IWebResourceLoadDelegate> oldResourceLoadDelegate;
- if (FAILED(oldWebView->resourceLoadDelegate(&oldResourceLoadDelegate)))
- return;
-
- COMPtr<IWebResourceLoadDelegatePrivate2> oldResourceLoadDelegatePrivate2(Query, oldResourceLoadDelegate);
- if (!oldResourceLoadDelegatePrivate2)
- return;
- oldResourceLoadDelegatePrivate2->removeIdentifierForRequest(oldWebView, loader->identifier());
-}
-
PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& URL, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer)
{
Frame* coreFrame = core(m_webFrame);
diff --git a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h b/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
index e3e895382..d65f1658b 100644
--- a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
+++ b/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
@@ -80,7 +80,6 @@ public:
virtual WebCore::Frame* dispatchCreatePage(const WebCore::NavigationAction&);
virtual void dispatchShow();
- virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*);
virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&);
virtual void postProgressStartedNotification();
@@ -116,8 +115,6 @@ 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(WebCore::Page*);
- virtual void transferLoadingResourceFromPage(WebCore::ResourceLoader*, const WebCore::ResourceRequest&, 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/Source/WebKit/win/WebCoreSupport/WebGeolocationClient.cpp b/Source/WebKit/win/WebCoreSupport/WebGeolocationClient.cpp
index b1d83fbd9..41bcb48f8 100644
--- a/Source/WebKit/win/WebCoreSupport/WebGeolocationClient.cpp
+++ b/Source/WebKit/win/WebCoreSupport/WebGeolocationClient.cpp
@@ -66,7 +66,6 @@ void WebGeolocationClient::stopUpdating()
GeolocationPosition* WebGeolocationClient::lastPosition()
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
COMPtr<IWebGeolocationProvider> provider;
if (FAILED(m_webView->geolocationProvider(&provider)))
return 0;
@@ -74,9 +73,6 @@ GeolocationPosition* WebGeolocationClient::lastPosition()
if (FAILED(provider->lastPosition(&position)))
return 0;
return core(position.get());
-#else
- return 0;
-#endif
}
void WebGeolocationClient::requestPermission(Geolocation* geolocation)
diff --git a/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp b/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
index 03d3a5e39..0355282c6 100644
--- a/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
+++ b/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
@@ -29,6 +29,8 @@
#include "config.h"
#include "WebInspectorClient.h"
+#if ENABLE(INSPECTOR)
+
#include "WebInspectorDelegate.h"
#include "WebKit.h"
#include "WebMutableURLRequest.h"
@@ -546,3 +548,5 @@ static ATOM registerWindowClass()
return ::RegisterClassEx(&wcex);
}
+
+#endif // ENABLE(INSPECTOR)
diff --git a/Source/WebKit/win/WebDatabaseManager.cpp b/Source/WebKit/win/WebDatabaseManager.cpp
index cf9706c4a..6e687f193 100644
--- a/Source/WebKit/win/WebDatabaseManager.cpp
+++ b/Source/WebKit/win/WebDatabaseManager.cpp
@@ -38,12 +38,12 @@
#include "WebNotificationCenter.h"
#include "WebSecurityOrigin.h"
-#include <JavaScriptCore/MainThread.h>
#include <WebCore/BString.h>
#include <WebCore/COMPtr.h>
#include <WebCore/DatabaseTracker.h>
#include <WebCore/FileSystem.h>
#include <WebCore/SecurityOrigin.h>
+#include <wtf/MainThread.h>
using namespace WebCore;
diff --git a/Source/WebKit/win/WebFrame.cpp b/Source/WebKit/win/WebFrame.cpp
index 3564bd986..1a4b676a0 100644
--- a/Source/WebKit/win/WebFrame.cpp
+++ b/Source/WebKit/win/WebFrame.cpp
@@ -1556,6 +1556,10 @@ void WebFrame::cancelPolicyCheck()
d->m_policyFunction = 0;
}
+void WebFrame::dispatchWillSendSubmitEvent(PassRefPtr<WebCore::FormState>)
+{
+}
+
void WebFrame::dispatchWillSubmitForm(FramePolicyFunction function, PassRefPtr<FormState> formState)
{
Frame* coreFrame = core(this);
@@ -1578,7 +1582,7 @@ void WebFrame::dispatchWillSubmitForm(FramePolicyFunction function, PassRefPtr<F
COMPtr<IPropertyBag> formValuesPropertyBag(AdoptCOM, COMPropertyBag<String>::createInstance(formValuesMap));
- COMPtr<WebFrame> sourceFrame(kit(formState->sourceFrame()));
+ COMPtr<WebFrame> sourceFrame(kit(formState->sourceDocument()->frame()));
if (SUCCEEDED(formDelegate->willSubmitForm(this, sourceFrame.get(), formElement.get(), formValuesPropertyBag.get(), setUpPolicyListener(function).get())))
return;
diff --git a/Source/WebKit/win/WebFrame.h b/Source/WebKit/win/WebFrame.h
index c6286b0d0..c7ddfe860 100644
--- a/Source/WebKit/win/WebFrame.h
+++ b/Source/WebKit/win/WebFrame.h
@@ -305,7 +305,7 @@ public:
virtual void detachedFromParent2();
virtual void detachedFromParent3();
virtual void cancelPolicyCheck();
- virtual void dispatchWillSendSubmitEvent(WebCore::HTMLFormElement*) { }
+ virtual void dispatchWillSendSubmitEvent(PassRefPtr<WebCore::FormState>);
virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction, PassRefPtr<WebCore::FormState>);
virtual void revertToProvisionalState(WebCore::DocumentLoader*);
virtual void setMainFrameDocumentReady(bool);
diff --git a/Source/WebKit/win/WebGeolocationPosition.cpp b/Source/WebKit/win/WebGeolocationPosition.cpp
index 26554ddf8..fb2ac6fa4 100644
--- a/Source/WebKit/win/WebGeolocationPosition.cpp
+++ b/Source/WebKit/win/WebGeolocationPosition.cpp
@@ -27,11 +27,9 @@
#include "WebGeolocationPosition.h"
#include <WebCore/COMPtr.h>
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
#include <WebCore/GeolocationPosition.h>
using namespace WebCore;
-#endif
COMPtr<WebGeolocationPosition> WebGeolocationPosition::createInstance()
{
@@ -83,15 +81,10 @@ ULONG WebGeolocationPosition::Release()
HRESULT WebGeolocationPosition::initWithTimestamp(double timestamp, double latitude, double longitude, double accuracy)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
m_position = GeolocationPosition::create(timestamp, latitude, longitude, accuracy);
return S_OK;
-#else
- return E_FAIL;
-#endif
}
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
GeolocationPosition* core(IWebGeolocationPosition* position)
{
if (!position)
@@ -103,4 +96,3 @@ GeolocationPosition* core(IWebGeolocationPosition* position)
return webGeolocationPosition->impl();
}
-#endif
diff --git a/Source/WebKit/win/WebGeolocationPosition.h b/Source/WebKit/win/WebGeolocationPosition.h
index 81602706b..3e11dcfd1 100644
--- a/Source/WebKit/win/WebGeolocationPosition.h
+++ b/Source/WebKit/win/WebGeolocationPosition.h
@@ -48,19 +48,13 @@ public:
// IWebGeolocationPosition
virtual HRESULT STDMETHODCALLTYPE initWithTimestamp(double timestamp, double latitude, double longitude, double accuracy);
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
WebCore::GeolocationPosition* impl() const { return m_position.get(); }
-#endif
private:
ULONG m_refCount;
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
RefPtr<WebCore::GeolocationPosition> m_position;
-#endif
};
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
WebCore::GeolocationPosition* core(IWebGeolocationPosition*);
-#endif
#endif // WebGeolocationPosition_h
diff --git a/Source/WebKit/win/WebInspector.cpp b/Source/WebKit/win/WebInspector.cpp
index 17f6f0732..39c75277d 100644
--- a/Source/WebKit/win/WebInspector.cpp
+++ b/Source/WebKit/win/WebInspector.cpp
@@ -29,6 +29,8 @@
#include "config.h"
#include "WebInspector.h"
+#if ENABLE(INSPECTOR)
+
#include "WebInspectorClient.h"
#include "WebKitDLL.h"
#include "WebView.h"
@@ -276,3 +278,5 @@ HRESULT STDMETHODCALLTYPE WebInspector::setTimelineProfilingEnabled(BOOL enabled
frontendClient()->setTimelineProfilingEnabled(enabled);
return S_OK;
}
+
+#endif // ENABLE(INSPECTOR)
diff --git a/Source/WebKit/win/WebKit.vcproj/WebKit.sln b/Source/WebKit/win/WebKit.vcproj/WebKit.sln
index a41ab21ae..d9ff7968f 100644
--- a/Source/WebKit/win/WebKit.vcproj/WebKit.sln
+++ b/Source/WebKit/win/WebKit.vcproj/WebKit.sln
@@ -11,7 +11,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCore", "..\..\..\WebCore
{E498CA9D-3BD2-4D52-8E37-C8DC76526325} = {E498CA9D-3BD2-4D52-8E37-C8DC76526325}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTF", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\WTF\WTF.vcproj", "{AA8A5A85-592B-4357-BC60-E0E91E026AF6}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTF", "..\..\..\WTF\WTF.vcproj\WTF.vcproj", "{AA8A5A85-592B-4357-BC60-E0E91E026AF6}"
ProjectSection(ProjectDependencies) = postProject
{5AE5F5E4-782D-4F63-B4D7-3977B52B9950} = {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}
EndProjectSection
@@ -188,7 +188,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitTestRunnerLauncher",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WTF", "WTF", "{A671AE22-FBCE-4C41-A723-82939FCA3E92}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTFGenerated", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\WTF\WTFGenerated.vcproj", "{5AE5F5E4-782D-4F63-B4D7-3977B52B9950}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTFGenerated", "..\..\..\WTF\WTF.vcproj\WTFGenerated.vcproj", "{5AE5F5E4-782D-4F63-B4D7-3977B52B9950}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/Source/WebKit/win/WebKitCOMAPI.cpp b/Source/WebKit/win/WebKitCOMAPI.cpp
index c4450f749..9c9cc026b 100644
--- a/Source/WebKit/win/WebKitCOMAPI.cpp
+++ b/Source/WebKit/win/WebKitCOMAPI.cpp
@@ -51,10 +51,9 @@ static COMPtr<IClassFactory> classFactory(const CLSID& clsid)
typedef HashMap<CLSID, COMPtr<IClassFactory>, CLSIDHash, CLSIDHashTraits> FactoryMap;
static FactoryMap& factories = *new FactoryMap;
- pair<FactoryMap::iterator, bool> result = factories.add(clsid, 0);
- COMPtr<IClassFactory>& factory = result.first->second;
- bool added = result.second;
- if (added && FAILED(DllGetClassObject(clsid, __uuidof(factory), reinterpret_cast<void**>(&factory))))
+ FactoryMap::AddResult result = factories.add(clsid, 0);
+ COMPtr<IClassFactory>& factory = result.iterator->second;
+ if (result.isNewEntry && FAILED(DllGetClassObject(clsid, __uuidof(factory), reinterpret_cast<void**>(&factory))))
factory = 0;
return factory;
diff --git a/Source/WebKit/win/WebNodeHighlight.cpp b/Source/WebKit/win/WebNodeHighlight.cpp
index c35d0b6ab..182ae72e5 100644
--- a/Source/WebKit/win/WebNodeHighlight.cpp
+++ b/Source/WebKit/win/WebNodeHighlight.cpp
@@ -47,12 +47,17 @@ static ATOM registerOverlayClass();
static LPCTSTR kWebNodeHighlightPointerProp = TEXT("WebNodeHighlightPointer");
WebNodeHighlight::WebNodeHighlight(WebView* webView)
- : m_inspectedWebView(webView)
- , m_overlay(0)
+ :
+#if ENABLE(INSPECTOR)
+ m_inspectedWebView(webView),
+#endif // ENABLE(INSPECTOR)
+ m_overlay(0)
, m_observedWindow(0)
, m_showsWhileWebViewIsVisible(false)
{
+#if ENABLE(INSPECTOR)
m_inspectedWebView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&m_inspectedWebViewWindow));
+#endif // ENABLE(INSPECTOR)
}
WebNodeHighlight::~WebNodeHighlight()
@@ -158,8 +163,9 @@ void WebNodeHighlight::update()
::SelectObject(hdc, hbmp.get());
GraphicsContext context(hdc);
-
+#if ENABLE(INSPECTOR)
m_inspectedWebView->page()->inspectorController()->drawHighlight(context);
+#endif // ENABLE(INSPECTOR)
BLENDFUNCTION bf;
bf.BlendOp = AC_SRC_OVER;
diff --git a/Source/WebKit/win/WebNodeHighlight.h b/Source/WebKit/win/WebNodeHighlight.h
index 1d154f91d..da2faa663 100644
--- a/Source/WebKit/win/WebNodeHighlight.h
+++ b/Source/WebKit/win/WebNodeHighlight.h
@@ -59,7 +59,9 @@ private:
void onWebViewWindowPosChanged(WINDOWPOS*);
void onRootWindowPosChanged(WINDOWPOS*);
+#if ENABLE(INSPECTOR)
WebView* m_inspectedWebView;
+#endif // ENABLE(INSPECTOR)
HWND m_inspectedWebViewWindow;
HWND m_overlay;
HWND m_observedWindow;
diff --git a/Source/WebKit/win/WebPreferenceKeysPrivate.h b/Source/WebKit/win/WebPreferenceKeysPrivate.h
index 468944657..deed43636 100644
--- a/Source/WebKit/win/WebPreferenceKeysPrivate.h
+++ b/Source/WebKit/win/WebPreferenceKeysPrivate.h
@@ -162,3 +162,6 @@
#define WebKitMediaPlaybackAllowsInlinePreferenceKey "WebKitMediaPlaybackAllowsInline"
#define WebKitAVFoundationEnabledPreferenceKey "WebKitAVFoundationEnabled"
+
+#define WebKitRequestAnimationFrameEnabledPreferenceKey "WebKitRequestAnimationFrameEnabled"
+
diff --git a/Source/WebKit/win/WebPreferences.cpp b/Source/WebKit/win/WebPreferences.cpp
index 6f5ed8e7e..8cd8fbe4b 100644
--- a/Source/WebKit/win/WebPreferences.cpp
+++ b/Source/WebKit/win/WebPreferences.cpp
@@ -273,6 +273,8 @@ void WebPreferences::initializeDefaultSettings()
CFDictionaryAddValue(defaults, CFSTR(WebKitMediaPlaybackRequiresUserGesturePreferenceKey), kCFBooleanFalse);
CFDictionaryAddValue(defaults, CFSTR(WebKitMediaPlaybackAllowsInlinePreferenceKey), kCFBooleanTrue);
+ CFDictionaryAddValue(defaults, CFSTR(WebKitRequestAnimationFrameEnabledPreferenceKey), kCFBooleanTrue);
+
defaultSettings = defaults;
}
@@ -1736,3 +1738,16 @@ HRESULT WebPreferences::setShouldDisplayTextDescriptions(BOOL enabled)
return E_NOTIMPL;
#endif
}
+
+HRESULT WebPreferences::setRequestAnimationFrameEnabled(BOOL enabled)
+{
+ setBoolValue(CFSTR(WebKitRequestAnimationFrameEnabledPreferenceKey), enabled);
+ return S_OK;
+}
+
+HRESULT WebPreferences::requestAnimationFrameEnabled(BOOL* enabled)
+{
+ *enabled = boolValueForKey(CFSTR(WebKitRequestAnimationFrameEnabledPreferenceKey));
+ return S_OK;
+}
+
diff --git a/Source/WebKit/win/WebPreferences.h b/Source/WebKit/win/WebPreferences.h
index baf56ecd0..3afb7444c 100644
--- a/Source/WebKit/win/WebPreferences.h
+++ b/Source/WebKit/win/WebPreferences.h
@@ -471,6 +471,9 @@ public:
virtual HRESULT STDMETHODCALLTYPE shouldInvertColors(BOOL*);
virtual HRESULT STDMETHODCALLTYPE setShouldInvertColors(BOOL);
+ virtual HRESULT STDMETHODCALLTYPE requestAnimationFrameEnabled(BOOL*);
+ virtual HRESULT STDMETHODCALLTYPE setRequestAnimationFrameEnabled(BOOL);
+
// WebPreferences
// This method accesses a different preference key than developerExtrasEnabled.
diff --git a/Source/WebKit/win/WebView.cpp b/Source/WebKit/win/WebView.cpp
index 141d36c95..26e5835dd 100644
--- a/Source/WebKit/win/WebView.cpp
+++ b/Source/WebKit/win/WebView.cpp
@@ -92,6 +92,8 @@
#include <WebCore/FrameView.h>
#include <WebCore/FrameWin.h>
#include <WebCore/GDIObjectCounter.h>
+#include <WebCore/GeolocationController.h>
+#include <WebCore/GeolocationError.h>
#include <WebCore/GraphicsContext.h>
#include <WebCore/HTMLMediaElement.h>
#include <WebCore/HTMLNames.h>
@@ -134,16 +136,10 @@
#include <WebCore/Settings.h>
#include <WebCore/SimpleFontData.h>
#include <WebCore/SystemInfo.h>
-#include <WebCore/TypingCommand.h>
#include <WebCore/WindowMessageBroadcaster.h>
#include <WebCore/WindowsTouch.h>
#include <wtf/MainThread.h>
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
-#include <WebCore/GeolocationController.h>
-#include <WebCore/GeolocationError.h>
-#endif
-
#if USE(CG)
#include <CoreGraphics/CGContext.h>
#endif
@@ -340,7 +336,9 @@ WebView::WebView()
, m_viewWindow(0)
, m_mainFrame(0)
, m_page(0)
+#if ENABLE(INSPECTOR)
, m_inspectorClient(0)
+#endif // ENABLE(INSPECTOR)
, m_hasCustomDropTarget(false)
, m_useBackForwardList(true)
, m_userAgentOverridden(false)
@@ -713,9 +711,11 @@ HRESULT STDMETHODCALLTYPE WebView::close()
setUIDelegate(0);
setFormDelegate(0);
+#if ENABLE(INSPECTOR)
m_inspectorClient = 0;
if (m_webInspector)
m_webInspector->webViewClosed();
+#endif // ENABLE(INSPECTOR)
delete m_page;
m_page = 0;
@@ -2661,18 +2661,21 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame(
if (SUCCEEDED(m_preferences->shouldUseHighResolutionTimers(&useHighResolutionTimer)))
Settings::setShouldUseHighResolutionTimers(useHighResolutionTimer);
+#if ENABLE(INSPECTOR)
m_inspectorClient = new WebInspectorClient(this);
+#endif // ENABLE(INSPECTOR)
Page::PageClients pageClients;
pageClients.chromeClient = new WebChromeClient(this);
pageClients.contextMenuClient = new WebContextMenuClient(this);
pageClients.editorClient = new WebEditorClient(this);
pageClients.dragClient = new WebDragClient(this);
+#if ENABLE(INSPECTOR)
pageClients.inspectorClient = m_inspectorClient;
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- pageClients.geolocationClient = new WebGeolocationClient(this);
-#endif
+#endif // ENABLE(INSPECTOR)
+
m_page = new Page(pageClients);
+ provideGeolocationTo(m_page, new WebGeolocationClient(this));
BSTR localStoragePath;
if (SUCCEEDED(m_preferences->localStorageDatabasePath(&localStoragePath))) {
@@ -4944,6 +4947,11 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
return hr;
setShouldInvertColors(enabled);
+ hr = prefsPrivate->requestAnimationFrameEnabled(&enabled);
+ if (FAILED(hr))
+ return hr;
+ settings->setRequestAnimationFrameEnabled(enabled);
+
return S_OK;
}
@@ -5776,12 +5784,17 @@ bool WebView::onIMESetContext(WPARAM wparam, LPARAM)
HRESULT STDMETHODCALLTYPE WebView::inspector(IWebInspector** inspector)
{
+#if ENABLE(INSPECTOR)
if (!m_webInspector)
m_webInspector.adoptRef(WebInspector::createInstance(this, m_inspectorClient));
return m_webInspector.copyRefTo(inspector);
+#else // !ENABLE(INSPECTOR)
+ return S_OK;
+#endif // ENABLE(INSPECTOR)
}
+
HRESULT STDMETHODCALLTYPE WebView::windowAncestryDidChange()
{
HWND newParent;
@@ -6569,19 +6582,14 @@ HRESULT WebView::geolocationProvider(IWebGeolocationProvider** locationProvider)
HRESULT WebView::geolocationDidChangePosition(IWebGeolocationPosition* position)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
if (!m_page)
return E_FAIL;
- m_page->geolocationController()->positionChanged(core(position));
+ GeolocationController::from(m_page)->positionChanged(core(position));
return S_OK;
-#else
- return E_NOTIMPL;
-#endif
}
HRESULT WebView::geolocationDidFailWithError(IWebError* error)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
if (!m_page)
return E_FAIL;
if (!error)
@@ -6594,11 +6602,8 @@ HRESULT WebView::geolocationDidFailWithError(IWebError* error)
SysFreeString(descriptionBSTR);
RefPtr<GeolocationError> geolocationError = GeolocationError::create(GeolocationError::PositionUnavailable, descriptionString);
- m_page->geolocationController()->errorOccurred(geolocationError.get());
+ GeolocationController::from(m_page)->errorOccurred(geolocationError.get());
return S_OK;
-#else
- return E_NOTIMPL;
-#endif
}
HRESULT WebView::setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, BSTR scheme)
diff --git a/Source/WebKit/win/WebView.h b/Source/WebKit/win/WebView.h
index 30843d366..3a0f95aff 100644
--- a/Source/WebKit/win/WebView.h
+++ b/Source/WebKit/win/WebView.h
@@ -704,7 +704,7 @@ public:
virtual HRESULT STDMETHODCALLTYPE loadBackForwardListFromOtherView(
/* [in] */ IWebView *otherView);
-
+
virtual HRESULT STDMETHODCALLTYPE inspector(
/* [retval][out] */ IWebInspector**);
@@ -1047,7 +1047,9 @@ protected:
HWND m_viewWindow;
WebFrame* m_mainFrame;
WebCore::Page* m_page;
+#if ENABLE(INSPECTOR)
WebInspectorClient* m_inspectorClient;
+#endif // ENABLE(INSPECTOR)
RefPtr<RefCountedHBITMAP> m_backingStoreBitmap;
SIZE m_backingStoreSize;
@@ -1064,7 +1066,9 @@ protected:
COMPtr<IWebDownloadDelegate> m_downloadDelegate;
COMPtr<IWebHistoryDelegate> m_historyDelegate;
COMPtr<WebPreferences> m_preferences;
+#if ENABLE(INSPECTOR)
COMPtr<WebInspector> m_webInspector;
+#endif // ENABLE(INSPECTOR)
COMPtr<IWebGeolocationProvider> m_geolocationProvider;
bool m_userAgentOverridden;
diff --git a/Source/WebKit/wince/ChangeLog b/Source/WebKit/wince/ChangeLog
index 5ca6d91b7..dce1b2225 100644
--- a/Source/WebKit/wince/ChangeLog
+++ b/Source/WebKit/wince/ChangeLog
@@ -1,3 +1,96 @@
+2012-05-04 Nate Chapin <japhet@chromium.org>
+
+ Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+ https://bugs.webkit.org/show_bug.cgi?id=85533
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/FrameLoaderClientWinCE.cpp:
+ (WebKit::FrameLoaderClientWinCE::finishedLoading):
+
+2012-04-18 Jon Honeycutt <jhoneycutt@apple.com>
+
+ FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
+ information about the form being submitted
+ https://bugs.webkit.org/show_bug.cgi?id=84297
+
+ Reviewed by Andy Estes.
+
+ * WebCoreSupport/FrameLoaderClientWinCE.h:
+ (WebKit::FrameLoaderClientWinCE::dispatchWillSendSubmitEvent):
+ Updated method declaration.
+
+2012-03-30 Patrick Gansterer <paroga@webkit.org>
+
+ [WinCE] Correct <wtf/*.h> include paths.
+ https://bugs.webkit.org/show_bug.cgi?id=82713
+
+ Reviewed by Eric Seidel.
+
+ Modify the #include declarations for several WinCE-related files
+ so that the wtf types are included using the full path.
+
+ * WebView.cpp:
+ * WebView.h:
+
+2012-03-28 Nate Chapin <japhet@chromium.org>
+
+ Remove dispatchDidLoadMainResource callback, since no
+ port implements it.
+ https://bugs.webkit.org/show_bug.cgi?id=82539
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/FrameLoaderClientWinCE.cpp:
+ (WebKit):
+ * WebCoreSupport/FrameLoaderClientWinCE.h:
+ (FrameLoaderClientWinCE):
+
+2012-03-19 Adam Barth <abarth@webkit.org>
+
+ Remove support for "magic" iframe
+ https://bugs.webkit.org/show_bug.cgi?id=81590
+
+ Reviewed by Eric Seidel.
+
+ Remove FrameLoaderClient methods that no longer exist.
+
+ * WebCoreSupport/FrameLoaderClientWinCE.cpp:
+ (WebKit):
+ * WebCoreSupport/FrameLoaderClientWinCE.h:
+ (FrameLoaderClientWinCE):
+
+2012-03-13 Jon Lee <jonlee@apple.com>
+
+ Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
+ https://bugs.webkit.org/show_bug.cgi?id=80922
+ <rdar://problem/11035082>
+
+ Reviewed by Jian Li.
+
+ You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
+ LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
+ new API. Therefore, APIs that are common between the two will have:
+ #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+
+ This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
+ the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
+
+ Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+ * WebCoreSupport/ChromeClientWinCE.h:
+ (ChromeClientWinCE):
+
+2012-03-13 Adam Barth <abarth@webkit.org> && Benjamin Poulain <bpoulain@apple.com>
+
+ Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
+ https://bugs.webkit.org/show_bug.cgi?id=78853
+
+ Reviewed by Adam Barth.
+
+ * WebCoreSupport/ChromeClientWinCE.cpp:
+ * WebCoreSupport/ChromeClientWinCE.h:
+ (ChromeClientWinCE):
+
2012-03-09 Jon Lee <jonlee@apple.com>
Rename NotificationPresenter to NotificationClient
diff --git a/Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp b/Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
index 6a0e25a4d..ac0b26da7 100644
--- a/Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
+++ b/Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
@@ -369,16 +369,6 @@ void ChromeClientWinCE::formStateDidChange(const Node*)
notImplemented();
}
-void ChromeClientWinCE::requestGeolocationPermissionForFrame(Frame*, Geolocation*)
-{
- notImplemented();
-}
-
-void ChromeClientWinCE::cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*)
-{
- notImplemented();
-}
-
bool ChromeClientWinCE::selectItemWritingDirectionIsNatural()
{
return false;
diff --git a/Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h b/Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
index 41792026b..57c2f9388 100644
--- a/Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
+++ b/Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
@@ -131,15 +131,10 @@ public:
// for this origin.
virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t totalSpaceNeeded);
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
virtual WebCore::NotificationClient* notificationPresenter() const;
#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 loadIconForFiles(const Vector<WTF::String>&, WebCore::FileIconLoader*);
diff --git a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp b/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp
index 286f8b7f8..839f4b9b8 100644
--- a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp
+++ b/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp
@@ -172,14 +172,6 @@ PassRefPtr<Frame> FrameLoaderClientWinCE::createFrame(const KURL& url, const Str
return m_webView->createFrame(url, name, ownerElement, referrer, allowsScrolling, marginWidth, marginHeight);
}
-void FrameLoaderClientWinCE::didTransferChildFrameToNewDocument(Page*)
-{
-}
-
-void FrameLoaderClientWinCE::transferLoadingResourceFromPage(ResourceLoader*, const WebCore::ResourceRequest&, Page*)
-{
-}
-
void FrameLoaderClientWinCE::redirectDataToPlugin(Widget* pluginWidget)
{
ASSERT(!m_pluginView);
@@ -404,11 +396,6 @@ void FrameLoaderClientWinCE::cancelPolicyCheck()
notImplemented();
}
-void FrameLoaderClientWinCE::dispatchDidLoadMainResource(DocumentLoader*)
-{
- notImplemented();
-}
-
void FrameLoaderClientWinCE::revertToProvisionalState(DocumentLoader*)
{
notImplemented();
@@ -456,12 +443,10 @@ String FrameLoaderClientWinCE::generatedMIMETypeForURLScheme(const String&) cons
return String();
}
-void FrameLoaderClientWinCE::finishedLoading(DocumentLoader* documentLoader)
+void FrameLoaderClientWinCE::finishedLoading(DocumentLoader*)
{
- if (!m_pluginView) {
- documentLoader->writer()->setEncoding(m_response.textEncodingName(), false);
+ if (!m_pluginView)
return;
- }
m_pluginView->didFinishLoading();
m_pluginView = 0;
diff --git a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h b/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h
index 8c2559abb..54e23926d 100644
--- a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h
+++ b/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h
@@ -96,10 +96,9 @@ public:
virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&);
- virtual void dispatchWillSendSubmitEvent(WebCore::HTMLFormElement*) { }
+ virtual void dispatchWillSendSubmitEvent(WTF::PassRefPtr<WebCore::FormState>) { }
virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction, WTF::PassRefPtr<WebCore::FormState>);
- virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*);
virtual void revertToProvisionalState(WebCore::DocumentLoader*);
virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&);
@@ -109,8 +108,6 @@ 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(WebCore::Page*);
- virtual void transferLoadingResourceFromPage(WebCore::ResourceLoader*, const WebCore::ResourceRequest&, 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/Source/WebKit/wince/WebView.cpp b/Source/WebKit/wince/WebView.cpp
index dde378f02..032a32f22 100644
--- a/Source/WebKit/wince/WebView.cpp
+++ b/Source/WebKit/wince/WebView.cpp
@@ -39,7 +39,6 @@
#include "InitializeThreading.h"
#include "InspectorClientWinCE.h"
#include "IntSize.h"
-#include "MainThread.h"
#include "NotImplemented.h"
#include "Page.h"
#include "PlatformKeyboardEvent.h"
@@ -50,6 +49,7 @@
#include "Settings.h"
#include "SharedBuffer.h"
#include "WebCoreInstanceHandle.h"
+#include <wtf/MainThread.h>
using namespace WebCore;
diff --git a/Source/WebKit/wince/WebView.h b/Source/WebKit/wince/WebView.h
index c6e66849b..dc4006da5 100644
--- a/Source/WebKit/wince/WebView.h
+++ b/Source/WebKit/wince/WebView.h
@@ -26,8 +26,8 @@
#define WebView_h
#include "IntRect.h"
-#include "OwnPtr.h"
-#include "PassRefPtr.h"
+#include <wtf/OwnPtr.h>
+#include <wtf/PassRefPtr.h>
namespace WTF {
class String;
diff --git a/Source/WebKit/wx/ChangeLog b/Source/WebKit/wx/ChangeLog
index de5aef92c..e79b87c8b 100644
--- a/Source/WebKit/wx/ChangeLog
+++ b/Source/WebKit/wx/ChangeLog
@@ -1,3 +1,340 @@
+2012-05-04 Nate Chapin <japhet@chromium.org>
+
+ Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+ https://bugs.webkit.org/show_bug.cgi?id=85533
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebKitSupport/FrameLoaderClientWx.cpp:
+ (WebCore::FrameLoaderClientWx::finishedLoading):
+ (WebCore::FrameLoaderClientWx::setMainDocumentError):
+ (WebCore::FrameLoaderClientWx::dispatchDidReceiveResponse):
+ (WebCore::FrameLoaderClientWx::dispatchDidFailLoading):
+ * WebKitSupport/FrameLoaderClientWx.h:
+ (FrameLoaderClientWx):
+
+2012-04-18 Jon Honeycutt <jhoneycutt@apple.com>
+
+ FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
+ information about the form being submitted
+ https://bugs.webkit.org/show_bug.cgi?id=84297
+
+ Reviewed by Andy Estes.
+
+ * WebKitSupport/FrameLoaderClientWx.h:
+ (WebCore::FrameLoaderClientWx::dispatchWillSendSubmitEvent):
+ Updated method declaration.
+
+2012-03-30 Malcolm MacLeod <malcolm.macleod@tshwanedje.com>
+
+ [wx] Move wxWebKit API into WebKit namespace.
+ https://bugs.webkit.org/show_bug.cgi?id=82740
+
+ Reviewed by Kevin Ollivier.
+
+ * WebBrowserShell.cpp:
+ (WebKit):
+ (WebKit::PageSourceViewFrame::PageSourceViewFrame):
+ (WebKit::WebBrowserShell::WebBrowserShell):
+ (WebKit::WebBrowserShell::~WebBrowserShell):
+ (WebKit::WebBrowserShell::ShowDebugMenu):
+ (WebKit::WebBrowserShell::OnQuit):
+ (WebKit::WebBrowserShell::OnAbout):
+ (WebKit::WebBrowserShell::OnLoadFile):
+ (WebKit::WebBrowserShell::OnLoadEvent):
+ (WebKit::WebBrowserShell::OnBeforeLoad):
+ (WebKit::WebBrowserShell::OnAddressBarEnter):
+ (WebKit::WebBrowserShell::OnSearchCtrlEnter):
+ (WebKit::WebBrowserShell::OnCut):
+ (WebKit::WebBrowserShell::OnCopy):
+ (WebKit::WebBrowserShell::OnPaste):
+ (WebKit::WebBrowserShell::OnBack):
+ (WebKit::WebBrowserShell::OnForward):
+ (WebKit::WebBrowserShell::OnStop):
+ (WebKit::WebBrowserShell::OnReload):
+ (WebKit::WebBrowserShell::OnMakeTextLarger):
+ (WebKit::WebBrowserShell::OnMakeTextSmaller):
+ (WebKit::WebBrowserShell::OnGetSource):
+ (WebKit::WebBrowserShell::OnSetSource):
+ (WebKit::WebBrowserShell::OnBrowse):
+ (WebKit::WebBrowserShell::OnEdit):
+ (WebKit::WebBrowserShell::OnRunScript):
+ (WebKit::WebBrowserShell::OnEditCommand):
+ (WebKit::WebBrowserShell::OnGetEditCommandState):
+ (WebKit::WebBrowserShell::OnPrint):
+ * WebBrowserShell.h:
+ (WebKit):
+ * WebDOMSelection.cpp:
+ (WebKit):
+ (WebKit::WebKitSelection::WebKitSelection):
+ (WebKit::WebKitSelection::GetRootEditableElement):
+ (WebKit::WebKitSelection::GetAsRange):
+ * WebDOMSelection.h:
+ (WebKit):
+ * WebEdit.cpp:
+ (WebKit):
+ (WebKit::WebEditCommand::WebEditCommand):
+ (WebKit::WebEditCommand::~WebEditCommand):
+ (WebKit::WebEditCommand::SetNodeAttribute):
+ (WebKit::WebEditCommand::Apply):
+ * WebEdit.h:
+ (WebKit):
+ * WebFrame.cpp:
+ (WebKit):
+ (WebKit::kit):
+ (WebKit::WebFrame::WebFrame):
+ (WebKit::WebFrame::~WebFrame):
+ (WebKit::WebFrame::GetName):
+ (WebKit::WebFrame::GetFrame):
+ (WebKit::WebFrame::Stop):
+ (WebKit::WebFrame::Reload):
+ (WebKit::WebFrame::GetPageSource):
+ (WebKit::WebFrame::SetPageSource):
+ (WebKit::WebFrame::GetInnerText):
+ (WebKit::WebFrame::GetAsMarkup):
+ (WebKit::WebFrame::GetExternalRepresentation):
+ (WebKit::WebFrame::GetSelectionAsHTML):
+ (WebKit::WebFrame::GetSelectionAsText):
+ (WebKit::WebFrame::GetSelection):
+ (WebKit::WebFrame::RunScript):
+ (WebKit::WebFrame::ExecuteEditCommand):
+ (WebKit::WebFrame::GetEditCommandState):
+ (WebKit::WebFrame::GetEditCommandValue):
+ (WebKit::WebFrame::FindString):
+ (WebKit::WebFrame::LoadURL):
+ (WebKit::WebFrame::GetURL):
+ (WebKit::WebFrame::GoBack):
+ (WebKit::WebFrame::GoForward):
+ (WebKit::WebFrame::CanGoBack):
+ (WebKit::WebFrame::CanGoForward):
+ (WebKit::WebFrame::Undo):
+ (WebKit::WebFrame::Redo):
+ (WebKit::WebFrame::CanUndo):
+ (WebKit::WebFrame::CanRedo):
+ (WebKit::WebFrame::CanIncreaseTextSize):
+ (WebKit::WebFrame::IncreaseTextSize):
+ (WebKit::WebFrame::CanDecreaseTextSize):
+ (WebKit::WebFrame::DecreaseTextSize):
+ (WebKit::WebFrame::ResetTextSize):
+ (WebKit::WebFrame::MakeEditable):
+ (WebKit::WebFrame::IsEditable):
+ (WebKit::WebFrame::CanCopy):
+ (WebKit::WebFrame::Copy):
+ (WebKit::WebFrame::CanCut):
+ (WebKit::WebFrame::Cut):
+ (WebKit::WebFrame::CanPaste):
+ (WebKit::WebFrame::Paste):
+ (WebKit::WebFrame::Print):
+ (WebKit::WebFrame::HitTest):
+ (WebKit::WebFrame::ShouldClose):
+ (WebKit::WebFrame::GetCompatibilityMode):
+ (WebKit::WebFrame::GrantUniversalAccess):
+ * WebFrame.h:
+ (WebKit):
+ * WebKitSupport/ChromeClientWx.cpp:
+ (WebCore::wkFeaturesforWindowFeatures):
+ (WebCore::ChromeClientWx::ChromeClientWx):
+ (WebCore::ChromeClientWx::createWindow):
+ (WebCore::ChromeClientWx::addMessageToConsole):
+ (WebCore::ChromeClientWx::runJavaScriptAlert):
+ (WebCore::ChromeClientWx::runJavaScriptConfirm):
+ (WebCore::ChromeClientWx::runJavaScriptPrompt):
+ (WebCore::ChromeClientWx::print):
+ (WebCore::ChromeClientWx::exceededDatabaseQuota):
+ * WebKitSupport/ChromeClientWx.h:
+ (ChromeClientWx):
+ * WebKitSupport/EditorClientWx.cpp:
+ (WebCore::EditorClientWx::respondToChangedContents):
+ (WebCore::EditorClientWx::registerUndoStep):
+ (WebCore::EditorClientWx::registerRedoStep):
+ (WebCore::EditorClientWx::clearUndoRedoOperations):
+ (WebCore::EditorClientWx::canUndo):
+ (WebCore::EditorClientWx::canRedo):
+ (WebCore::EditorClientWx::undo):
+ (WebCore::EditorClientWx::redo):
+ (WebCore::EditorClientWx::respondToChangedSelection):
+ * WebKitSupport/EditorClientWx.h:
+ (EditorClientWx):
+ * WebKitSupport/FrameLoaderClientWx.cpp:
+ (WebCore::wxNavTypeFromWebNavType):
+ (WebCore::FrameLoaderClientWx::setFrame):
+ (WebCore::FrameLoaderClientWx::setWebView):
+ (WebCore::FrameLoaderClientWx::dispatchDidHandleOnloadEvents):
+ (WebCore::FrameLoaderClientWx::dispatchDidStartProvisionalLoad):
+ (WebCore::FrameLoaderClientWx::dispatchDidReceiveTitle):
+ (WebCore::FrameLoaderClientWx::dispatchDidCommitLoad):
+ (WebCore::FrameLoaderClientWx::dispatchDidFinishDocumentLoad):
+ (WebCore::FrameLoaderClientWx::postProgressFinishedNotification):
+ (WebCore::FrameLoaderClientWx::dispatchDidFailLoading):
+ (WebCore::FrameLoaderClientWx::dispatchDecidePolicyForNewWindowAction):
+ (WebCore::FrameLoaderClientWx::dispatchDecidePolicyForNavigationAction):
+ (WebCore::FrameLoaderClientWx::createFrame):
+ (WebCore::FrameLoaderClientWx::dispatchDidClearWindowObjectInWorld):
+ * WebKitSupport/FrameLoaderClientWx.h:
+ (WebKit):
+ (WebCore::FrameLoaderClientWx::webFrame):
+ (FrameLoaderClientWx):
+ (WebCore::FrameLoaderClientWx::webView):
+ * WebSettings.cpp:
+ (WebKit):
+ (WebKit::WebSettings::SetDefaultFixedFontSize):
+ (WebKit::WebSettings::GetDefaultFixedFontSize):
+ (WebKit::WebSettings::SetDefaultFontSize):
+ (WebKit::WebSettings::GetDefaultFontSize):
+ (WebKit::WebSettings::SetMinimumFontSize):
+ (WebKit::WebSettings::GetMinimumFontSize):
+ (WebKit::WebSettings::SetLoadsImagesAutomatically):
+ (WebKit::WebSettings::LoadsImagesAutomatically):
+ (WebKit::WebSettings::SetJavaScriptEnabled):
+ (WebKit::WebSettings::IsJavaScriptEnabled):
+ (WebKit::WebSettings::SetLocalStoragePath):
+ (WebKit::WebSettings::GetLocalStoragePath):
+ (WebKit::WebSettings::SetEditableLinkBehavior):
+ (WebKit::WebSettings::GetEditableLinkBehavior):
+ (WebKit::WebSettings::SetPluginsEnabled):
+ (WebKit::WebSettings::ArePluginsEnabled):
+ (WebKit::WebSettings::SetPrivateBrowsingEnabled):
+ (WebKit::WebSettings::PrivateBrowsingEnabled):
+ (WebKit::WebSettings::SetUsesPageCache):
+ (WebKit::WebSettings::UsesPageCache):
+ (WebKit::WebSettings::SetOfflineWebApplicationCacheEnabled):
+ (WebKit::WebSettings::OfflineWebApplicationCacheEnabled):
+ * WebSettings.h:
+ (WebKit):
+ * WebView.cpp:
+ (WebKit):
+ (WebKit::WebViewLoadEvent::WebViewLoadEvent):
+ (WebKit::WebViewBeforeLoadEvent::WebViewBeforeLoadEvent):
+ (WebKit::WebViewNewWindowEvent::WebViewNewWindowEvent):
+ (WebKit::WebViewRightClickEvent::WebViewRightClickEvent):
+ (WebKit::WebViewConsoleMessageEvent::WebViewConsoleMessageEvent):
+ (WebKit::WebViewAlertEvent::WebViewAlertEvent):
+ (WebKit::WebViewConfirmEvent::WebViewConfirmEvent):
+ (WebKit::WebViewPromptEvent::WebViewPromptEvent):
+ (WebKit::WebViewReceivedTitleEvent::WebViewReceivedTitleEvent):
+ (WebKit::WebViewWindowObjectClearedEvent::WebViewWindowObjectClearedEvent):
+ (WebKit::WebViewContentsChangedEvent::WebViewContentsChangedEvent):
+ (WebKit::WebViewSelectionChangedEvent::WebViewSelectionChangedEvent):
+ (WebKit::WebViewPrintFrameEvent::WebViewPrintFrameEvent):
+ (WebKit::WebViewDOMElementInfo::WebViewDOMElementInfo):
+ (WebKit::WebView::SetCachePolicy):
+ (WebKit::WebView::GetCachePolicy):
+ (WebKit::WebViewDOMElementInfo::~WebViewDOMElementInfo):
+ (WebKit::WebView::WebView):
+ (WebKit::WebView::Create):
+ (WebKit::WebView::~WebView):
+ (WebKit::WebView::OnTLWActivated):
+ (WebKit::WebView::Stop):
+ (WebKit::WebView::Reload):
+ (WebKit::WebView::GetPageSource):
+ (WebKit::WebView::SetPageSource):
+ (WebKit::WebView::GetInnerText):
+ (WebKit::WebView::GetAsMarkup):
+ (WebKit::WebView::GetExternalRepresentation):
+ (WebKit::WebView::GetSelection):
+ (WebKit::WebView::GetSelectionAsHTML):
+ (WebKit::WebView::GetSelectionAsText):
+ (WebKit::WebView::SetTransparent):
+ (WebKit::WebView::IsTransparent):
+ (WebKit::WebView::RunScript):
+ (WebKit::WebView::ExecuteEditCommand):
+ (WebKit::WebView::GetEditCommandState):
+ (WebKit::WebView::GetEditCommandValue):
+ (WebKit::WebView::LoadURL):
+ (WebKit::WebView::GetMainFrameURL):
+ (WebKit::WebView::GoBack):
+ (WebKit::WebView::GoForward):
+ (WebKit::WebView::CanGoBack):
+ (WebKit::WebView::CanGoForward):
+ (WebKit::WebView::CanIncreaseTextSize):
+ (WebKit::WebView::IncreaseTextSize):
+ (WebKit::WebView::CanDecreaseTextSize):
+ (WebKit::WebView::DecreaseTextSize):
+ (WebKit::WebView::ResetTextSize):
+ (WebKit::WebView::MakeEditable):
+ (WebKit::WebView::IsEditable):
+ (WebKit::WebView::OnPaint):
+ (WebKit::WebView::FindString):
+ (WebKit::WebView::OnSize):
+ (WebKit::WebView::OnMouseEvents):
+ (WebKit::WebView::OnContextMenuEvents):
+ (WebKit::WebView::OnMenuSelectEvents):
+ (WebKit::WebView::OnMouseCaptureLost):
+ (WebKit::WebView::CanCopy):
+ (WebKit::WebView::Copy):
+ (WebKit::WebView::CanCut):
+ (WebKit::WebView::Cut):
+ (WebKit::WebView::CanPaste):
+ (WebKit::WebView::Paste):
+ (WebKit::WebView::OnKeyEvents):
+ (WebKit::WebView::OnSetFocus):
+ (WebKit::WebView::OnKillFocus):
+ (WebKit::WebView::HitTest):
+ (WebKit::WebView::ShouldClose):
+ (WebKit::WebView::SetDatabaseDirectory):
+ (WebKit::WebView::GetDatabaseDirectory):
+ (WebKit::WebView::SetDatabasesEnabled):
+ (WebKit::WebView::AreDatabasesEnabled):
+ (WebKit::WebView::SetProxyInfo):
+ (WebKit::WebView::GetWebSettings):
+ (WebKit::WebView::GetCompatibilityMode):
+ (WebKit::WebView::GrantUniversalAccess):
+ * WebView.h:
+ (WebKit):
+ * bindings/python/webview.i:
+
+2012-03-28 Nate Chapin <japhet@chromium.org>
+
+ Remove dispatchDidLoadMainResource callback, since no
+ port implements it.
+ https://bugs.webkit.org/show_bug.cgi?id=82539
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebKitSupport/FrameLoaderClientWx.cpp:
+ (WebCore):
+ * WebKitSupport/FrameLoaderClientWx.h:
+ (FrameLoaderClientWx):
+
+2012-03-25 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Unreviewed build fix. Add header needed for Unix builds.
+
+ * WebKitSupport/FrameLoaderClientWx.cpp:
+
+2012-03-19 Adam Barth <abarth@webkit.org>
+
+ Remove support for "magic" iframe
+ https://bugs.webkit.org/show_bug.cgi?id=81590
+
+ Reviewed by Eric Seidel.
+
+ Remove FrameLoaderClient methods that no longer exist.
+
+ * WebKitSupport/FrameLoaderClientWx.cpp:
+ (WebCore):
+ * WebKitSupport/FrameLoaderClientWx.h:
+ (FrameLoaderClientWx):
+
+2012-03-15 Kevin Ollivier <kevino@theolliviers.com>
+
+ Move wx port to using export macros
+ https://bugs.webkit.org/show_bug.cgi?id=77279
+
+ Reviewed by Hajime Morita.
+
+ * wscript:
+
+2012-03-13 Adam Barth <abarth@webkit.org> && Benjamin Poulain <bpoulain@apple.com>
+
+ Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
+ https://bugs.webkit.org/show_bug.cgi?id=78853
+
+ Reviewed by Adam Barth.
+
+ * WebKitSupport/ChromeClientWx.cpp:
+ * WebKitSupport/ChromeClientWx.h:
+
2012-02-26 Hajime Morrita <morrita@chromium.org>
Move ChromeClient::showContextMenu() to ContextMenuClient
diff --git a/Source/WebKit/wx/WebBrowserShell.cpp b/Source/WebKit/wx/WebBrowserShell.cpp
index f7ac4bf00..01c97492e 100644
--- a/Source/WebKit/wx/WebBrowserShell.cpp
+++ b/Source/WebKit/wx/WebBrowserShell.cpp
@@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This class provides a default new window implementation for wxWebView clients
+ * This class provides a default new window implementation for WebView clients
* who don't want/need to roll their own browser frame UI.
*/
@@ -40,7 +40,9 @@
#include "WebView.h"
#include "WebViewPrivate.h"
-wxPageSourceViewFrame::wxPageSourceViewFrame(const wxString& source)
+namespace WebKit {
+
+PageSourceViewFrame::PageSourceViewFrame(const wxString& source)
: wxFrame(NULL, wxID_ANY, _("Page Source View"), wxDefaultPosition, wxSize(600, 500))
{
wxTextCtrl* control = new wxTextCtrl(this, -1, source, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
@@ -69,35 +71,35 @@ enum {
ID_GET_EDIT_COMMAND_STATE = wxID_HIGHEST + 20
};
-BEGIN_EVENT_TABLE(wxWebBrowserShell, wxFrame)
- EVT_MENU(wxID_CUT, wxWebBrowserShell::OnCut)
- EVT_MENU(wxID_COPY, wxWebBrowserShell::OnCopy)
- EVT_MENU(wxID_PASTE, wxWebBrowserShell::OnPaste)
- EVT_MENU(wxID_EXIT, wxWebBrowserShell::OnQuit)
- EVT_MENU(wxID_ABOUT, wxWebBrowserShell::OnAbout)
- EVT_MENU(ID_LOADFILE, wxWebBrowserShell::OnLoadFile)
- EVT_TEXT_ENTER(ID_TEXTCTRL, wxWebBrowserShell::OnAddressBarEnter)
- EVT_TEXT_ENTER(ID_SEARCHCTRL, wxWebBrowserShell::OnSearchCtrlEnter)
- EVT_WEBVIEW_LOAD(ID_WEBVIEW, wxWebBrowserShell::OnLoadEvent)
- EVT_WEBVIEW_BEFORE_LOAD(ID_WEBVIEW, wxWebBrowserShell::OnBeforeLoad)
- EVT_MENU(ID_BACK, wxWebBrowserShell::OnBack)
- EVT_MENU(ID_FORWARD, wxWebBrowserShell::OnForward)
- EVT_MENU(ID_STOP, wxWebBrowserShell::OnStop)
- EVT_MENU(ID_RELOAD, wxWebBrowserShell::OnReload)
- EVT_MENU(ID_MAKE_TEXT_LARGER, wxWebBrowserShell::OnMakeTextLarger)
- EVT_MENU(ID_MAKE_TEXT_SMALLER, wxWebBrowserShell::OnMakeTextSmaller)
- EVT_MENU(ID_GET_SOURCE, wxWebBrowserShell::OnGetSource)
- EVT_MENU(ID_SET_SOURCE, wxWebBrowserShell::OnSetSource)
- EVT_MENU(ID_BROWSE, wxWebBrowserShell::OnBrowse)
- EVT_MENU(ID_EDIT, wxWebBrowserShell::OnEdit)
- EVT_MENU(ID_RUN_SCRIPT, wxWebBrowserShell::OnRunScript)
- EVT_MENU(ID_EDIT_COMMAND, wxWebBrowserShell::OnEditCommand)
- EVT_MENU(ID_GET_EDIT_COMMAND_STATE, wxWebBrowserShell::OnGetEditCommandState)
- EVT_MENU(wxID_PRINT, wxWebBrowserShell::OnPrint)
+BEGIN_EVENT_TABLE(WebBrowserShell, wxFrame)
+ EVT_MENU(wxID_CUT, WebBrowserShell::OnCut)
+ EVT_MENU(wxID_COPY, WebBrowserShell::OnCopy)
+ EVT_MENU(wxID_PASTE, WebBrowserShell::OnPaste)
+ EVT_MENU(wxID_EXIT, WebBrowserShell::OnQuit)
+ EVT_MENU(wxID_ABOUT, WebBrowserShell::OnAbout)
+ EVT_MENU(ID_LOADFILE, WebBrowserShell::OnLoadFile)
+ EVT_TEXT_ENTER(ID_TEXTCTRL, WebBrowserShell::OnAddressBarEnter)
+ EVT_TEXT_ENTER(ID_SEARCHCTRL, WebBrowserShell::OnSearchCtrlEnter)
+ EVT_WEBVIEW_LOAD(ID_WEBVIEW, WebBrowserShell::OnLoadEvent)
+ EVT_WEBVIEW_BEFORE_LOAD(ID_WEBVIEW, WebBrowserShell::OnBeforeLoad)
+ EVT_MENU(ID_BACK, WebBrowserShell::OnBack)
+ EVT_MENU(ID_FORWARD, WebBrowserShell::OnForward)
+ EVT_MENU(ID_STOP, WebBrowserShell::OnStop)
+ EVT_MENU(ID_RELOAD, WebBrowserShell::OnReload)
+ EVT_MENU(ID_MAKE_TEXT_LARGER, WebBrowserShell::OnMakeTextLarger)
+ EVT_MENU(ID_MAKE_TEXT_SMALLER, WebBrowserShell::OnMakeTextSmaller)
+ EVT_MENU(ID_GET_SOURCE, WebBrowserShell::OnGetSource)
+ EVT_MENU(ID_SET_SOURCE, WebBrowserShell::OnSetSource)
+ EVT_MENU(ID_BROWSE, WebBrowserShell::OnBrowse)
+ EVT_MENU(ID_EDIT, WebBrowserShell::OnEdit)
+ EVT_MENU(ID_RUN_SCRIPT, WebBrowserShell::OnRunScript)
+ EVT_MENU(ID_EDIT_COMMAND, WebBrowserShell::OnEditCommand)
+ EVT_MENU(ID_GET_EDIT_COMMAND_STATE, WebBrowserShell::OnGetEditCommandState)
+ EVT_MENU(wxID_PRINT, WebBrowserShell::OnPrint)
END_EVENT_TABLE()
-wxWebBrowserShell::wxWebBrowserShell(const wxString& title, const wxString& url) :
+WebBrowserShell::WebBrowserShell(const wxString& title, const wxString& url) :
wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(600, 500)),
m_checkBeforeLoad(false)
{
@@ -166,21 +168,21 @@ wxWebBrowserShell::wxWebBrowserShell(const wxString& title, const wxString& url)
SetToolBar(toolbar);
- // Create the wxWebView Window
- webview = new wxWebView((wxWindow*)this, url, ID_WEBVIEW, wxDefaultPosition, wxSize(200, 200));
+ // Create the WebView Window
+ webview = new WebView((wxWindow*)this, url, ID_WEBVIEW, wxDefaultPosition, wxSize(200, 200));
webview->SetBackgroundColour(*wxWHITE);
// create a status bar just for fun (by default with 1 pane only)
CreateStatusBar(2);
}
-wxWebBrowserShell::~wxWebBrowserShell()
+WebBrowserShell::~WebBrowserShell()
{
if (m_debugMenu && GetMenuBar()->FindMenu(_("&Debug")) == wxNOT_FOUND)
delete m_debugMenu;
}
-void wxWebBrowserShell::ShowDebugMenu(bool show)
+void WebBrowserShell::ShowDebugMenu(bool show)
{
int debugMenu = GetMenuBar()->FindMenu(_("&Debug"));
if (show && debugMenu == wxNOT_FOUND) {
@@ -195,23 +197,23 @@ void wxWebBrowserShell::ShowDebugMenu(bool show)
// event handlers
-void wxWebBrowserShell::OnQuit(wxCommandEvent& WXUNUSED(event))
+void WebBrowserShell::OnQuit(wxCommandEvent& WXUNUSED(event))
{
// true is to force the frame to close
Close(true);
}
-void wxWebBrowserShell::OnAbout(wxCommandEvent& WXUNUSED(event))
+void WebBrowserShell::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxString msg;
- msg.Printf(_T("This is the About dialog of the wxWebKit sample.\n")
+ msg.Printf(_T("This is the About dialog of the WebKit sample.\n")
_T("Welcome to %s"), wxVERSION_STRING);
- wxMessageBox(msg, _T("About wxWebKit Sample"), wxOK | wxICON_INFORMATION, this);
+ wxMessageBox(msg, _T("About WebKit Sample"), wxOK | wxICON_INFORMATION, this);
}
-void wxWebBrowserShell::OnLoadFile(wxCommandEvent& WXUNUSED(event))
+void WebBrowserShell::OnLoadFile(wxCommandEvent& WXUNUSED(event))
{
wxFileDialog* dialog = new wxFileDialog(this, wxT("Choose a file"));
if (dialog->ShowModal() == wxID_OK) {
@@ -222,29 +224,26 @@ void wxWebBrowserShell::OnLoadFile(wxCommandEvent& WXUNUSED(event))
}
}
-void wxWebBrowserShell::OnLoadEvent(wxWebViewLoadEvent& event)
+void WebBrowserShell::OnLoadEvent(WebViewLoadEvent& event)
{
if (GetStatusBar() != NULL){
- if (event.GetState() == wxWEBVIEW_LOAD_NEGOTIATING) {
+ if (event.GetState() == WEBVIEW_LOAD_NEGOTIATING) {
GetStatusBar()->SetStatusText(_("Contacting ") + event.GetURL());
- }
- else if (event.GetState() == wxWEBVIEW_LOAD_TRANSFERRING) {
+ } else if (event.GetState() == WEBVIEW_LOAD_TRANSFERRING) {
GetStatusBar()->SetStatusText(_("Loading ") + event.GetURL());
if (event.GetFrame() == webview->GetMainFrame())
addressBar->SetValue(event.GetURL());
- }
- else if (event.GetState() == wxWEBVIEW_LOAD_ONLOAD_HANDLED) {
+ } else if (event.GetState() == WEBVIEW_LOAD_ONLOAD_HANDLED) {
GetStatusBar()->SetStatusText(_("Load complete."));
if (event.GetFrame() == webview->GetMainFrame())
SetTitle(webview->GetPageTitle());
- }
- else if (event.GetState() == wxWEBVIEW_LOAD_FAILED) {
+ } else if (event.GetState() == WEBVIEW_LOAD_FAILED) {
GetStatusBar()->SetStatusText(_("Failed to load ") + event.GetURL());
}
}
}
-void wxWebBrowserShell::OnBeforeLoad(wxWebViewBeforeLoadEvent& myEvent)
+void WebBrowserShell::OnBeforeLoad(WebViewBeforeLoadEvent& myEvent)
{
if (m_checkBeforeLoad) {
int reply = wxMessageBox(_("Would you like to continue loading ") + myEvent.GetURL() + wxT("?"), _("Continue Loading?"), wxYES_NO);
@@ -254,62 +253,62 @@ void wxWebBrowserShell::OnBeforeLoad(wxWebViewBeforeLoadEvent& myEvent)
}
}
-void wxWebBrowserShell::OnAddressBarEnter(wxCommandEvent& event)
+void WebBrowserShell::OnAddressBarEnter(wxCommandEvent& event)
{
if (webview)
webview->LoadURL(addressBar->GetValue());
}
-void wxWebBrowserShell::OnSearchCtrlEnter(wxCommandEvent& event)
+void WebBrowserShell::OnSearchCtrlEnter(wxCommandEvent& event)
{
if (webview) {
webview->LoadURL(wxString::Format(wxT("http://www.google.com/search?rls=en&q=%s&ie=UTF-8&oe=UTF-8"), searchCtrl->GetValue().wc_str()));
}
}
-void wxWebBrowserShell::OnCut(wxCommandEvent& event)
+void WebBrowserShell::OnCut(wxCommandEvent& event)
{
if (webview && webview->CanCut())
webview->Cut();
}
-void wxWebBrowserShell::OnCopy(wxCommandEvent& event)
+void WebBrowserShell::OnCopy(wxCommandEvent& event)
{
if (webview && webview->CanCopy())
webview->Copy();
}
-void wxWebBrowserShell::OnPaste(wxCommandEvent& event)
+void WebBrowserShell::OnPaste(wxCommandEvent& event)
{
if (webview && webview->CanPaste())
webview->Paste();
}
-void wxWebBrowserShell::OnBack(wxCommandEvent& event)
+void WebBrowserShell::OnBack(wxCommandEvent& event)
{
if (webview)
webview->GoBack();
}
-void wxWebBrowserShell::OnForward(wxCommandEvent& event)
+void WebBrowserShell::OnForward(wxCommandEvent& event)
{
if (webview)
webview->GoForward();
}
-void wxWebBrowserShell::OnStop(wxCommandEvent& myEvent)
+void WebBrowserShell::OnStop(wxCommandEvent& myEvent)
{
if (webview)
webview->Stop();
}
-void wxWebBrowserShell::OnReload(wxCommandEvent& myEvent)
+void WebBrowserShell::OnReload(wxCommandEvent& myEvent)
{
if (webview)
webview->Reload();
}
-void wxWebBrowserShell::OnMakeTextLarger(wxCommandEvent& myEvent)
+void WebBrowserShell::OnMakeTextLarger(wxCommandEvent& myEvent)
{
if (webview) {
if (webview->CanIncreaseTextSize())
@@ -317,7 +316,7 @@ void wxWebBrowserShell::OnMakeTextLarger(wxCommandEvent& myEvent)
}
}
-void wxWebBrowserShell::OnMakeTextSmaller(wxCommandEvent& myEvent)
+void WebBrowserShell::OnMakeTextSmaller(wxCommandEvent& myEvent)
{
if (webview) {
if (webview->CanDecreaseTextSize())
@@ -325,33 +324,33 @@ void wxWebBrowserShell::OnMakeTextSmaller(wxCommandEvent& myEvent)
}
}
-void wxWebBrowserShell::OnGetSource(wxCommandEvent& myEvent)
+void WebBrowserShell::OnGetSource(wxCommandEvent& myEvent)
{
if (webview) {
- wxPageSourceViewFrame* pageSourceFrame = new wxPageSourceViewFrame(webview->GetPageSource());
+ PageSourceViewFrame* pageSourceFrame = new PageSourceViewFrame(webview->GetPageSource());
pageSourceFrame->Show();
}
}
-void wxWebBrowserShell::OnSetSource(wxCommandEvent& event)
+void WebBrowserShell::OnSetSource(wxCommandEvent& event)
{
if (webview)
webview->SetPageSource(wxString(wxT("<p>Hello World!</p>")));
}
-void wxWebBrowserShell::OnBrowse(wxCommandEvent& event)
+void WebBrowserShell::OnBrowse(wxCommandEvent& event)
{
if (webview)
webview->MakeEditable(!event.IsChecked());
}
-void wxWebBrowserShell::OnEdit(wxCommandEvent& event)
+void WebBrowserShell::OnEdit(wxCommandEvent& event)
{
if (webview)
webview->MakeEditable(event.IsChecked());
}
-void wxWebBrowserShell::OnRunScript(wxCommandEvent& myEvent)
+void WebBrowserShell::OnRunScript(wxCommandEvent& myEvent)
{
if (webview) {
wxTextEntryDialog* dialog = new wxTextEntryDialog(this, _("Type in a JavaScript to exectute."));
@@ -362,7 +361,7 @@ void wxWebBrowserShell::OnRunScript(wxCommandEvent& myEvent)
}
}
-void wxWebBrowserShell::OnEditCommand(wxCommandEvent& myEvent)
+void WebBrowserShell::OnEditCommand(wxCommandEvent& myEvent)
{
if (webview) {
if (!webview->IsEditable()) {
@@ -380,7 +379,7 @@ void wxWebBrowserShell::OnEditCommand(wxCommandEvent& myEvent)
}
}
-void wxWebBrowserShell::OnGetEditCommandState(wxCommandEvent& myEvent)
+void WebBrowserShell::OnGetEditCommandState(wxCommandEvent& myEvent)
{
if (webview) {
if (!webview->IsEditable()) {
@@ -402,8 +401,10 @@ void wxWebBrowserShell::OnGetEditCommandState(wxCommandEvent& myEvent)
}
}
-void wxWebBrowserShell::OnPrint(wxCommandEvent& myEvent)
+void WebBrowserShell::OnPrint(wxCommandEvent& myEvent)
{
if (webview && webview->GetMainFrame())
webview->GetMainFrame()->Print();
}
+
+}
diff --git a/Source/WebKit/wx/WebBrowserShell.h b/Source/WebKit/wx/WebBrowserShell.h
index fc5212138..1a30446da 100644
--- a/Source/WebKit/wx/WebBrowserShell.h
+++ b/Source/WebKit/wx/WebBrowserShell.h
@@ -25,8 +25,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WXWEBBROWSERSHELL_H
-#define WXWEBBROWSERSHELL_H
+#ifndef WebBrowserShell_h
+#define WebBrowserShell_h
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
@@ -37,52 +37,54 @@
#include "WebView.h"
#include <wx/srchctrl.h>
-class WXDLLIMPEXP_WEBKIT wxWebBrowserShell : public wxFrame
+namespace WebKit {
+
+class WXDLLIMPEXP_WEBKIT WebBrowserShell : public wxFrame
{
public:
// ctor(s)
#if SWIG
- %pythonAppend wxWebBrowserShell "self._setOORInfo(self)"
+ %pythonAppend WebBrowserShell "self._setOORInfo(self)"
#endif
- wxWebBrowserShell(const wxString& title, const wxString& url = "about:blank");
+ WebBrowserShell(const wxString& title, const wxString& url = "about:blank");
#ifndef SWIG
- ~wxWebBrowserShell();
+ ~WebBrowserShell();
#endif
void ShowDebugMenu(bool show = true);
- wxWebView* webview;
+ WebView* webview;
protected:
// event handlers (these functions should _not_ be virtual)
- void OnCut(wxCommandEvent& event);
- void OnCopy(wxCommandEvent& event);
- void OnPaste(wxCommandEvent& event);
- void OnQuit(wxCommandEvent& event);
- void OnAbout(wxCommandEvent& event);
- void OnLoadFile(wxCommandEvent& event);
- void OnAddressBarEnter(wxCommandEvent& event);
- void OnSearchCtrlEnter(wxCommandEvent& event);
- void OnLoadEvent(wxWebViewLoadEvent& event);
- void OnBeforeLoad(wxWebViewBeforeLoadEvent& event);
- void OnBack(wxCommandEvent& event);
- void OnForward(wxCommandEvent& event);
- void OnStop(wxCommandEvent& event);
- void OnReload(wxCommandEvent& event);
- void OnBrowse(wxCommandEvent& event);
- void OnEdit(wxCommandEvent& event);
+ void OnCut(wxCommandEvent&);
+ void OnCopy(wxCommandEvent&);
+ void OnPaste(wxCommandEvent&);
+ void OnQuit(wxCommandEvent&);
+ void OnAbout(wxCommandEvent&);
+ void OnLoadFile(wxCommandEvent&);
+ void OnAddressBarEnter(wxCommandEvent&);
+ void OnSearchCtrlEnter(wxCommandEvent&);
+ void OnLoadEvent(WebViewLoadEvent& event);
+ void OnBeforeLoad(WebViewBeforeLoadEvent& event);
+ void OnBack(wxCommandEvent&);
+ void OnForward(wxCommandEvent&);
+ void OnStop(wxCommandEvent&);
+ void OnReload(wxCommandEvent&);
+ void OnBrowse(wxCommandEvent&);
+ void OnEdit(wxCommandEvent&);
void OnPrint(wxCommandEvent& myEvent);
- void OnMakeTextLarger(wxCommandEvent& event);
- void OnMakeTextSmaller(wxCommandEvent& event);
- void OnGetSource(wxCommandEvent& event);
+ void OnMakeTextLarger(wxCommandEvent&);
+ void OnMakeTextSmaller(wxCommandEvent&);
+ void OnGetSource(wxCommandEvent&);
// debug menu items
- void OnSetSource(wxCommandEvent& event);
- void OnRunScript(wxCommandEvent& myEvent);
- void OnEditCommand(wxCommandEvent& myEvent);
- void OnGetEditCommandState(wxCommandEvent& myEvent);
+ void OnSetSource(wxCommandEvent&);
+ void OnRunScript(wxCommandEvent&);
+ void OnEditCommand(wxCommandEvent&);
+ void OnGetEditCommandState(wxCommandEvent&);
private:
wxTextCtrl* addressBar;
@@ -96,10 +98,12 @@ private:
#endif
};
-class WXDLLIMPEXP_WEBKIT wxPageSourceViewFrame : public wxFrame
+class WXDLLIMPEXP_WEBKIT PageSourceViewFrame : public wxFrame
{
public:
- wxPageSourceViewFrame(const wxString& source);
+ PageSourceViewFrame(const wxString& source);
};
-#endif // ifndef WXWEBBROWSERSHELL_H
+}
+
+#endif // ifndef WebBrowserShell_h
diff --git a/Source/WebKit/wx/WebDOMSelection.cpp b/Source/WebKit/wx/WebDOMSelection.cpp
index a271e2ab3..a21af083e 100644
--- a/Source/WebKit/wx/WebDOMSelection.cpp
+++ b/Source/WebKit/wx/WebDOMSelection.cpp
@@ -40,14 +40,16 @@
#include "wx/wx.h"
#endif
-IMPLEMENT_DYNAMIC_CLASS(wxWebKitSelection, wxObject)
+namespace WebKit {
-wxWebKitSelection::wxWebKitSelection(const wxWebKitSelection& other)
+IMPLEMENT_DYNAMIC_CLASS(WebKitSelection, wxObject)
+
+WebKitSelection::WebKitSelection(const WebKitSelection& other)
{
m_selection = other.m_selection;
}
-WebDOMElement* wxWebKitSelection::GetRootEditableElement() const
+WebDOMElement* WebKitSelection::GetRootEditableElement() const
{
if (m_selection)
return new WebDOMElement(m_selection->rootEditableElement());
@@ -55,11 +57,11 @@ WebDOMElement* wxWebKitSelection::GetRootEditableElement() const
return 0;
}
-WebDOMRange* wxWebKitSelection::GetAsRange()
+WebDOMRange* WebKitSelection::GetAsRange()
{
if (m_selection) {
WTF::RefPtr<WebCore::Range> range = m_selection->toNormalizedRange();
- // keep it alive until it reaches wxWebKitDOMRange, which takes ownership
+ // keep it alive until it reaches WebKitDOMRange, which takes ownership
if (range) {
range->ref();
@@ -69,3 +71,5 @@ WebDOMRange* wxWebKitSelection::GetAsRange()
return 0;
}
+
+}
diff --git a/Source/WebKit/wx/WebDOMSelection.h b/Source/WebKit/wx/WebDOMSelection.h
index c285a2d3c..f46ad68ec 100644
--- a/Source/WebKit/wx/WebDOMSelection.h
+++ b/Source/WebKit/wx/WebDOMSelection.h
@@ -44,19 +44,21 @@ class FrameSelection;
}
-class WXDLLIMPEXP_WEBKIT wxWebKitSelection : public wxObject {
+namespace WebKit {
+
+class WXDLLIMPEXP_WEBKIT WebKitSelection : public wxObject {
#ifndef SWIG
-DECLARE_DYNAMIC_CLASS(wxWebKitDOMSelection)
+DECLARE_DYNAMIC_CLASS(WebKitDOMSelection)
#endif
public:
- wxWebKitSelection() {}
- wxWebKitSelection(WebCore::FrameSelection* selection)
+ WebKitSelection() { }
+ WebKitSelection(WebCore::FrameSelection* selection)
: m_selection(selection)
{ }
- wxWebKitSelection(const wxWebKitSelection&);
- ~wxWebKitSelection() { m_selection = 0; }
+ WebKitSelection(const WebKitSelection&);
+ ~WebKitSelection() { m_selection = 0; }
WebDOMElement* GetRootEditableElement() const;
WebDOMRange* GetAsRange();
@@ -66,4 +68,6 @@ private:
};
+}
+
#endif
diff --git a/Source/WebKit/wx/WebEdit.cpp b/Source/WebKit/wx/WebEdit.cpp
index 3b3f55855..64625827b 100644
--- a/Source/WebKit/wx/WebEdit.cpp
+++ b/Source/WebKit/wx/WebEdit.cpp
@@ -34,6 +34,8 @@ public:
}
+namespace WebKit {
+
class WebCoreEditCommandPrivate {
public:
WebCoreEditCommandPrivate()
@@ -51,7 +53,7 @@ public:
RefPtr<WebCore::WebCoreEditCommand> m_ptr;
};
-wxWebEditCommand::wxWebEditCommand(wxWebFrame* webframe)
+WebEditCommand::WebEditCommand(WebFrame* webframe)
{
if (webframe) {
WebCore::Frame* frame = webframe->GetFrame();
@@ -60,21 +62,23 @@ wxWebEditCommand::wxWebEditCommand(wxWebFrame* webframe)
}
}
-wxWebEditCommand::~wxWebEditCommand()
+WebEditCommand::~WebEditCommand()
{
// the impl. is ref-counted, so don't delete it as it may be in an undo/redo stack
delete m_impl;
m_impl = 0;
}
-void wxWebEditCommand::SetNodeAttribute(WebDOMElement* element, const wxString& name, const wxString& value)
+void WebEditCommand::SetNodeAttribute(WebDOMElement* element, const wxString& name, const wxString& value)
{
if (m_impl && m_impl->command())
m_impl->command()->setElementAttribute(element->impl(), WebCore::QualifiedName(WTF::nullAtom, WTF::String(name), WTF::nullAtom), WTF::String(value));
}
-void wxWebEditCommand::Apply()
+void WebEditCommand::Apply()
{
if (m_impl && m_impl->command())
m_impl->command()->apply();
}
+
+}
diff --git a/Source/WebKit/wx/WebEdit.h b/Source/WebKit/wx/WebEdit.h
index e4bba91b8..76f1aa241 100644
--- a/Source/WebKit/wx/WebEdit.h
+++ b/Source/WebKit/wx/WebEdit.h
@@ -35,23 +35,26 @@
#include "WebKitDefines.h"
+class WebDOMElement;
+
namespace WebCore {
class CompositeEditCommand;
class WebCoreEditCommand;
}
-class WebDOMElement;
+namespace WebKit {
+
class WebCoreEditCommandPrivate;
-class wxWebFrame;
+class WebFrame;
-class WXDLLIMPEXP_WEBKIT wxWebEditCommand
+class WXDLLIMPEXP_WEBKIT WebEditCommand
{
friend class WebCore::CompositeEditCommand;
friend class WebCore::WebCoreEditCommand;
public:
- wxWebEditCommand(wxWebFrame*);
- ~wxWebEditCommand();
+ WebEditCommand(WebFrame*);
+ ~WebEditCommand();
void SetNodeAttribute(WebDOMElement*, const wxString&, const wxString&);
void Apply();
@@ -60,4 +63,6 @@ private:
WebCoreEditCommandPrivate* m_impl;
};
+}
+
#endif
diff --git a/Source/WebKit/wx/WebFrame.cpp b/Source/WebKit/wx/WebFrame.cpp
index 2c9cb68e0..87f6dd245 100644
--- a/Source/WebKit/wx/WebFrame.cpp
+++ b/Source/WebKit/wx/WebFrame.cpp
@@ -86,6 +86,8 @@
#define MaximumTextSizeMultiplier 3.0f
#define TextSizeMultiplierRatio 1.2f
+namespace WebKit {
+
using namespace std;
// we need wxGraphicsContext and wxPrinterDC to work together,
@@ -207,7 +209,7 @@ private:
};
#endif
-wxWebFrame* kit(WebCore::Frame* frame)
+WebFrame* kit(WebCore::Frame* frame)
{
if (!frame)
return 0;
@@ -221,7 +223,7 @@ wxWebFrame* kit(WebCore::Frame* frame)
return 0;
}
-wxWebFrame::wxWebFrame(wxWebView* container, wxWebFrame* parent, WebViewFrameData* data) :
+WebFrame::WebFrame(WebView* container, WebFrame* parent, WebViewFrameData* data) :
m_textMagnifier(1.0),
m_isInitialized(false),
m_beingDestroyed(false)
@@ -258,20 +260,20 @@ wxWebFrame::wxWebFrame(wxWebView* container, wxWebFrame* parent, WebViewFrameDat
m_isInitialized = true;
}
-wxWebFrame::~wxWebFrame()
+WebFrame::~WebFrame()
{
if (m_impl)
delete m_impl;
}
-wxString wxWebFrame::GetName()
+wxString WebFrame::GetName()
{
if (m_impl && m_impl->frame && m_impl->frame->tree())
return m_impl->frame->tree()->name().string();
return wxEmptyString;
}
-WebCore::Frame* wxWebFrame::GetFrame()
+WebCore::Frame* WebFrame::GetFrame()
{
if (m_impl)
return m_impl->frame;
@@ -279,19 +281,19 @@ WebCore::Frame* wxWebFrame::GetFrame()
return 0;
}
-void wxWebFrame::Stop()
+void WebFrame::Stop()
{
if (m_impl->frame && m_impl->frame->loader())
m_impl->frame->loader()->stop();
}
-void wxWebFrame::Reload()
+void WebFrame::Reload()
{
if (m_impl->frame && m_impl->frame->loader())
m_impl->frame->loader()->reload();
}
-wxString wxWebFrame::GetPageSource()
+wxString WebFrame::GetPageSource()
{
if (m_impl->frame) {
if (m_impl->frame->view() && m_impl->frame->view()->layoutPending())
@@ -307,7 +309,7 @@ wxString wxWebFrame::GetPageSource()
return wxEmptyString;
}
-void wxWebFrame::SetPageSource(const wxString& source, const wxString& baseUrl, const wxString& mimetype)
+void WebFrame::SetPageSource(const wxString& source, const wxString& baseUrl, const wxString& mimetype)
{
if (m_impl->frame && m_impl->frame->loader()) {
WebCore::KURL url(WebCore::KURL(), baseUrl);
@@ -323,7 +325,7 @@ void wxWebFrame::SetPageSource(const wxString& source, const wxString& baseUrl,
}
}
-wxString wxWebFrame::GetInnerText()
+wxString WebFrame::GetInnerText()
{
if (m_impl->frame->view() && m_impl->frame->view()->layoutPending())
m_impl->frame->view()->layout();
@@ -332,7 +334,7 @@ wxString wxWebFrame::GetInnerText()
return documentElement->innerText();
}
-wxString wxWebFrame::GetAsMarkup()
+wxString WebFrame::GetAsMarkup()
{
if (!m_impl->frame || !m_impl->frame->document())
return wxEmptyString;
@@ -340,7 +342,7 @@ wxString wxWebFrame::GetAsMarkup()
return createMarkup(m_impl->frame->document());
}
-wxString wxWebFrame::GetExternalRepresentation()
+wxString WebFrame::GetExternalRepresentation()
{
if (m_impl->frame->view() && m_impl->frame->view()->layoutPending())
m_impl->frame->view()->layout();
@@ -348,7 +350,7 @@ wxString wxWebFrame::GetExternalRepresentation()
return externalRepresentation(m_impl->frame);
}
-wxString wxWebFrame::GetSelectionAsHTML()
+wxString WebFrame::GetSelectionAsHTML()
{
if (m_impl->frame)
return m_impl->frame->selection()->toNormalizedRange()->toHTML();
@@ -356,7 +358,7 @@ wxString wxWebFrame::GetSelectionAsHTML()
return wxEmptyString;
}
-wxString wxWebFrame::GetSelectionAsText()
+wxString WebFrame::GetSelectionAsText()
{
if (m_impl->frame)
return m_impl->frame->selection()->toNormalizedRange()->text();
@@ -364,15 +366,15 @@ wxString wxWebFrame::GetSelectionAsText()
return wxEmptyString;
}
-wxWebKitSelection wxWebFrame::GetSelection()
+WebKitSelection WebFrame::GetSelection()
{
if (m_impl->frame)
- return wxWebKitSelection(m_impl->frame->selection());
+ return WebKitSelection(m_impl->frame->selection());
return 0;
}
-wxString wxWebFrame::RunScript(const wxString& javascript)
+wxString WebFrame::RunScript(const wxString& javascript)
{
wxString returnValue = wxEmptyString;
if (m_impl->frame && m_impl->frame->loader()) {
@@ -394,13 +396,13 @@ wxString wxWebFrame::RunScript(const wxString& javascript)
return returnValue;
}
-bool wxWebFrame::ExecuteEditCommand(const wxString& command, const wxString& parameter)
+bool WebFrame::ExecuteEditCommand(const wxString& command, const wxString& parameter)
{
if (m_impl->frame && IsEditable())
return m_impl->frame->editor()->command(command).execute(parameter);
}
-EditState wxWebFrame::GetEditCommandState(const wxString& command) const
+EditState WebFrame::GetEditCommandState(const wxString& command) const
{
if (m_impl->frame && IsEditable()) {
WebCore::TriState state = m_impl->frame->editor()->command(command).state();
@@ -415,7 +417,7 @@ EditState wxWebFrame::GetEditCommandState(const wxString& command) const
return EditStateFalse;
}
-wxString wxWebFrame::GetEditCommandValue(const wxString& command) const
+wxString WebFrame::GetEditCommandValue(const wxString& command) const
{
if (m_impl->frame && IsEditable())
return m_impl->frame->editor()->command(command).value();
@@ -424,7 +426,7 @@ wxString wxWebFrame::GetEditCommandValue(const wxString& command) const
}
-bool wxWebFrame::FindString(const wxString& string, bool forward, bool caseSensitive, bool wrapSelection, bool startInSelection)
+bool WebFrame::FindString(const wxString& string, bool forward, bool caseSensitive, bool wrapSelection, bool startInSelection)
{
if (m_impl->frame)
return m_impl->frame->editor()->findString(string, forward, caseSensitive, wrapSelection, startInSelection);
@@ -432,7 +434,7 @@ bool wxWebFrame::FindString(const wxString& string, bool forward, bool caseSensi
return false;
}
-void wxWebFrame::LoadURL(const wxString& url)
+void WebFrame::LoadURL(const wxString& url)
{
if (m_impl->frame && m_impl->frame->loader()) {
WebCore::KURL kurl = WebCore::KURL(WebCore::KURL(), url, WebCore::UTF8Encoding());
@@ -454,7 +456,7 @@ void wxWebFrame::LoadURL(const wxString& url)
}
}
-wxString wxWebFrame::GetURL() const
+wxString WebFrame::GetURL() const
{
if (m_impl->frame && m_impl->frame->document())
return m_impl->frame->document()->url().string();
@@ -463,7 +465,7 @@ wxString wxWebFrame::GetURL() const
}
-bool wxWebFrame::GoBack()
+bool WebFrame::GoBack()
{
if (m_impl->frame && m_impl->frame->page())
return m_impl->frame->page()->goBack();
@@ -471,7 +473,7 @@ bool wxWebFrame::GoBack()
return false;
}
-bool wxWebFrame::GoForward()
+bool WebFrame::GoForward()
{
if (m_impl->frame && m_impl->frame->page())
return m_impl->frame->page()->goForward();
@@ -479,7 +481,7 @@ bool wxWebFrame::GoForward()
return false;
}
-bool wxWebFrame::CanGoBack()
+bool WebFrame::CanGoBack()
{
if (m_impl->frame && m_impl->frame->page())
return m_impl->frame->page()->canGoBackOrForward(-1);
@@ -487,7 +489,7 @@ bool wxWebFrame::CanGoBack()
return false;
}
-bool wxWebFrame::CanGoForward()
+bool WebFrame::CanGoForward()
{
if (m_impl->frame && m_impl->frame->page())
return m_impl->frame->page()->canGoBackOrForward(1);
@@ -495,19 +497,19 @@ bool wxWebFrame::CanGoForward()
return false;
}
-void wxWebFrame::Undo()
+void WebFrame::Undo()
{
if (m_impl->frame && m_impl->frame->editor() && CanUndo())
return m_impl->frame->editor()->undo();
}
-void wxWebFrame::Redo()
+void WebFrame::Redo()
{
if (m_impl->frame && m_impl->frame->editor() && CanRedo())
return m_impl->frame->editor()->redo();
}
-bool wxWebFrame::CanUndo()
+bool WebFrame::CanUndo()
{
if (m_impl->frame && m_impl->frame->editor())
return m_impl->frame->editor()->canUndo();
@@ -515,7 +517,7 @@ bool wxWebFrame::CanUndo()
return false;
}
-bool wxWebFrame::CanRedo()
+bool WebFrame::CanRedo()
{
if (m_impl->frame && m_impl->frame->editor())
return m_impl->frame->editor()->canRedo();
@@ -523,7 +525,7 @@ bool wxWebFrame::CanRedo()
return false;
}
-bool wxWebFrame::CanIncreaseTextSize() const
+bool WebFrame::CanIncreaseTextSize() const
{
if (m_impl->frame && m_impl->frame->view()) {
if (m_textMagnifier*TextSizeMultiplierRatio <= MaximumTextSizeMultiplier)
@@ -532,7 +534,7 @@ bool wxWebFrame::CanIncreaseTextSize() const
return false;
}
-void wxWebFrame::IncreaseTextSize()
+void WebFrame::IncreaseTextSize()
{
if (CanIncreaseTextSize()) {
m_textMagnifier = m_textMagnifier*TextSizeMultiplierRatio;
@@ -540,7 +542,7 @@ void wxWebFrame::IncreaseTextSize()
}
}
-bool wxWebFrame::CanDecreaseTextSize() const
+bool WebFrame::CanDecreaseTextSize() const
{
if (m_impl->frame && m_impl->frame->view()) {
if (m_textMagnifier/TextSizeMultiplierRatio >= MinimumTextSizeMultiplier)
@@ -549,7 +551,7 @@ bool wxWebFrame::CanDecreaseTextSize() const
return false;
}
-void wxWebFrame::DecreaseTextSize()
+void WebFrame::DecreaseTextSize()
{
if (CanDecreaseTextSize()) {
m_textMagnifier = m_textMagnifier/TextSizeMultiplierRatio;
@@ -557,27 +559,27 @@ void wxWebFrame::DecreaseTextSize()
}
}
-void wxWebFrame::ResetTextSize()
+void WebFrame::ResetTextSize()
{
m_textMagnifier = 1.0;
if (m_impl->frame)
m_impl->frame->setTextZoomFactor(m_textMagnifier);
}
-void wxWebFrame::MakeEditable(bool enable)
+void WebFrame::MakeEditable(bool enable)
{
if (enable != IsEditable() && m_impl->frame && m_impl->frame->page())
m_impl->frame->page()->setEditable(enable);
}
-bool wxWebFrame::IsEditable() const
+bool WebFrame::IsEditable() const
{
if (m_impl->frame && m_impl->frame->page())
return m_impl->frame->page()->isEditable();
return false;
}
-bool wxWebFrame::CanCopy()
+bool WebFrame::CanCopy()
{
if (m_impl->frame && m_impl->frame->view())
return (m_impl->frame->editor()->canCopy() || m_impl->frame->editor()->canDHTMLCopy());
@@ -585,13 +587,13 @@ bool wxWebFrame::CanCopy()
return false;
}
-void wxWebFrame::Copy()
+void WebFrame::Copy()
{
if (CanCopy())
m_impl->frame->editor()->copy();
}
-bool wxWebFrame::CanCut()
+bool WebFrame::CanCut()
{
if (m_impl->frame && m_impl->frame->view())
return (m_impl->frame->editor()->canCut() || m_impl->frame->editor()->canDHTMLCut());
@@ -599,13 +601,13 @@ bool wxWebFrame::CanCut()
return false;
}
-void wxWebFrame::Cut()
+void WebFrame::Cut()
{
if (CanCut())
m_impl->frame->editor()->cut();
}
-bool wxWebFrame::CanPaste()
+bool WebFrame::CanPaste()
{
if (m_impl->frame && m_impl->frame->view())
return (m_impl->frame->editor()->canPaste() || m_impl->frame->editor()->canDHTMLPaste());
@@ -613,14 +615,14 @@ bool wxWebFrame::CanPaste()
return false;
}
-void wxWebFrame::Paste()
+void WebFrame::Paste()
{
if (CanPaste())
m_impl->frame->editor()->paste();
}
-void wxWebFrame::Print(bool showDialog)
+void WebFrame::Print(bool showDialog)
{
#if wxCHECK_VERSION(2, 9, 1)
if (!m_impl->frame)
@@ -681,9 +683,9 @@ void wxWebFrame::Print(bool showDialog)
#endif
}
-wxWebViewDOMElementInfo wxWebFrame::HitTest(const wxPoint& pos) const
+WebViewDOMElementInfo WebFrame::HitTest(const wxPoint& pos) const
{
- wxWebViewDOMElementInfo domInfo;
+ WebViewDOMElementInfo domInfo;
if (m_impl->frame->view()) {
WebCore::HitTestResult result = m_impl->frame->eventHandler()->hitTestResultAtPoint(m_impl->frame->view()->windowToContents(pos), false);
@@ -698,7 +700,7 @@ wxWebViewDOMElementInfo wxWebFrame::HitTest(const wxPoint& pos) const
return domInfo;
}
-bool wxWebFrame::ShouldClose() const
+bool WebFrame::ShouldClose() const
{
if (m_impl->frame)
return m_impl->frame->loader()->shouldClose();
@@ -706,16 +708,18 @@ bool wxWebFrame::ShouldClose() const
return true;
}
-wxWebKitCompatibilityMode wxWebFrame::GetCompatibilityMode() const
+WebKitCompatibilityMode WebFrame::GetCompatibilityMode() const
{
if (m_impl->frame && m_impl->frame->document())
- return (wxWebKitCompatibilityMode)m_impl->frame->document()->compatibilityMode();
+ return (WebKitCompatibilityMode)m_impl->frame->document()->compatibilityMode();
return QuirksMode;
}
-void wxWebFrame::GrantUniversalAccess()
+void WebFrame::GrantUniversalAccess()
{
if (m_impl->frame && m_impl->frame->document())
m_impl->frame->document()->securityOrigin()->grantUniversalAccess();
}
+
+}
diff --git a/Source/WebKit/wx/WebFrame.h b/Source/WebKit/wx/WebFrame.h
index 50e34e751..d607fbeef 100644
--- a/Source/WebKit/wx/WebFrame.h
+++ b/Source/WebKit/wx/WebFrame.h
@@ -25,8 +25,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WXWEBFRAME_H
-#define WXWEBFRAME_H
+#ifndef WebFrame_h
+#define WebFrame_h
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
@@ -44,7 +44,6 @@ class Element;
class WebFramePrivate;
class WebViewFrameData;
-class wxWebView;
namespace WebCore {
class ChromeClientWx;
@@ -53,13 +52,17 @@ namespace WebCore {
class Frame;
}
-class WXDLLIMPEXP_WEBKIT wxWebViewDOMElementInfo
+namespace WebKit {
+
+class WebView;
+
+class WXDLLIMPEXP_WEBKIT WebViewDOMElementInfo
{
public:
- wxWebViewDOMElementInfo();
- wxWebViewDOMElementInfo(const wxWebViewDOMElementInfo& other);
+ WebViewDOMElementInfo();
+ WebViewDOMElementInfo(const WebViewDOMElementInfo& other);
- ~wxWebViewDOMElementInfo();
+ ~WebViewDOMElementInfo();
wxString GetTagName() const { return m_tagName; }
void SetTagName(const wxString& name) { m_tagName = name; }
@@ -93,22 +96,22 @@ private:
};
// based on enums in WebCore/dom/Document.h
-enum wxWebKitCompatibilityMode { QuirksMode, LimitedQuirksMode, NoQuirksMode };
+enum WebKitCompatibilityMode { QuirksMode, LimitedQuirksMode, NoQuirksMode };
-class WXDLLIMPEXP_WEBKIT wxWebFrame
+class WXDLLIMPEXP_WEBKIT WebFrame
{
public:
- // ChromeClientWx needs to get the Page* stored by the wxWebView
+ // ChromeClientWx needs to get the Page* stored by the WebView
// for the createWindow function.
friend class WebCore::ChromeClientWx;
friend class WebCore::FrameLoaderClientWx;
friend class WebCore::EditorClientWx;
- friend class wxWebView;
+ friend class WebView;
public:
- wxWebFrame(wxWebView* container, wxWebFrame* parent = NULL, WebViewFrameData* data = NULL);
+ WebFrame(WebView* container, WebFrame* parent = 0, WebViewFrameData* data = 0);
- ~wxWebFrame();
+ ~WebFrame();
void LoadURL(const wxString& url);
wxString GetURL() const;
@@ -144,7 +147,7 @@ public:
wxString GetAsMarkup();
wxString GetExternalRepresentation();
- wxWebKitSelection GetSelection();
+ WebKitSelection GetSelection();
wxString GetSelectionAsHTML();
wxString GetSelectionAsText();
@@ -167,11 +170,11 @@ public:
WebCore::Frame* GetFrame();
- wxWebViewDOMElementInfo HitTest(const wxPoint& post) const;
+ WebViewDOMElementInfo HitTest(const wxPoint& post) const;
bool ShouldClose() const;
- wxWebKitCompatibilityMode GetCompatibilityMode() const;
+ WebKitCompatibilityMode GetCompatibilityMode() const;
void GrantUniversalAccess();
@@ -184,7 +187,9 @@ private:
};
#ifndef SWIG
-wxWebFrame* kit(WebCore::Frame*);
+WebFrame* kit(WebCore::Frame*);
#endif
-#endif // ifndef WXWEBFRAME_H
+}
+
+#endif // ifndef WebFrame_h
diff --git a/Source/WebKit/wx/WebKitSupport/ChromeClientWx.cpp b/Source/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
index bc9872414..757bb0682 100644
--- a/Source/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
+++ b/Source/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
@@ -61,9 +61,9 @@
namespace WebCore {
-wxWebKitWindowFeatures wkFeaturesforWindowFeatures(const WindowFeatures& features)
+WebKitWindowFeatures wkFeaturesforWindowFeatures(const WindowFeatures& features)
{
- wxWebKitWindowFeatures wkFeatures;
+ WebKitWindowFeatures wkFeatures;
wkFeatures.menuBarVisible = features.menuBarVisible;
wkFeatures.statusBarVisible = features.statusBarVisible;
wkFeatures.toolBarVisible = features.toolBarVisible;
@@ -76,7 +76,7 @@ wxWebKitWindowFeatures wkFeaturesforWindowFeatures(const WindowFeatures& feature
return wkFeatures;
}
-ChromeClientWx::ChromeClientWx(wxWebView* webView)
+ChromeClientWx::ChromeClientWx(WebView* webView)
{
m_webView = webView;
}
@@ -139,13 +139,13 @@ void ChromeClientWx::focusedFrameChanged(Frame*)
Page* ChromeClientWx::createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures& features, const NavigationAction&)
{
Page* myPage = 0;
- wxWebViewNewWindowEvent wkEvent(m_webView);
+ WebViewNewWindowEvent wkEvent(m_webView);
- wxWebKitWindowFeatures wkFeatures = wkFeaturesforWindowFeatures(features);
+ WebKitWindowFeatures wkFeatures = wkFeaturesforWindowFeatures(features);
wkEvent.SetWindowFeatures(wkFeatures);
if (m_webView->GetEventHandler()->ProcessEvent(wkEvent)) {
- if (wxWebView* webView = wkEvent.GetWebView()) {
+ if (WebView* webView = wkEvent.GetWebView()) {
WebViewPrivate* impl = webView->m_impl;
if (impl)
myPage = impl->page;
@@ -234,11 +234,11 @@ void ChromeClientWx::addMessageToConsole(MessageSource source,
const String& sourceID)
{
if (m_webView) {
- wxWebViewConsoleMessageEvent wkEvent(m_webView);
+ WebViewConsoleMessageEvent wkEvent(m_webView);
wkEvent.SetMessage(message);
wkEvent.SetLineNumber(lineNumber);
wkEvent.SetSourceID(sourceID);
- wkEvent.SetLevel(static_cast<wxWebViewConsoleMessageLevel>(level));
+ wkEvent.SetLevel(static_cast<WebViewConsoleMessageLevel>(level));
m_webView->GetEventHandler()->ProcessEvent(wkEvent);
}
}
@@ -271,7 +271,7 @@ void ChromeClientWx::closeWindowSoon()
void ChromeClientWx::runJavaScriptAlert(Frame* frame, const String& string)
{
if (m_webView) {
- wxWebViewAlertEvent wkEvent(m_webView);
+ WebViewAlertEvent wkEvent(m_webView);
wkEvent.SetMessage(string);
if (!m_webView->GetEventHandler()->ProcessEvent(wkEvent))
wxMessageBox(string, wxT("JavaScript Alert"), wxOK);
@@ -282,7 +282,7 @@ bool ChromeClientWx::runJavaScriptConfirm(Frame* frame, const String& string)
{
bool result = false;
if (m_webView) {
- wxWebViewConfirmEvent wkEvent(m_webView);
+ WebViewConfirmEvent wkEvent(m_webView);
wkEvent.SetMessage(string);
if (m_webView->GetEventHandler()->ProcessEvent(wkEvent))
result = wkEvent.GetReturnCode() == wxID_YES;
@@ -298,7 +298,7 @@ bool ChromeClientWx::runJavaScriptConfirm(Frame* frame, const String& string)
bool ChromeClientWx::runJavaScriptPrompt(Frame* frame, const String& message, const String& defaultValue, String& result)
{
if (m_webView) {
- wxWebViewPromptEvent wkEvent(m_webView);
+ WebViewPromptEvent wkEvent(m_webView);
wkEvent.SetMessage(message);
wkEvent.SetResponse(defaultValue);
if (m_webView->GetEventHandler()->ProcessEvent(wkEvent)) {
@@ -411,9 +411,9 @@ void ChromeClientWx::setToolTip(const String& tip, TextDirection)
void ChromeClientWx::print(Frame* frame)
{
- wxWebFrame* webFrame = kit(frame);
+ WebFrame* webFrame = kit(frame);
if (webFrame) {
- wxWebViewPrintFrameEvent event(m_webView);
+ WebViewPrintFrameEvent event(m_webView);
event.SetWebFrame(webFrame);
if (!m_webView->GetEventHandler()->ProcessEvent(event))
webFrame->Print(true);
@@ -425,7 +425,7 @@ void ChromeClientWx::exceededDatabaseQuota(Frame*, const String&)
{
unsigned long long quota = 5 * 1024 * 1024;
- if (wxWebFrame* webFrame = m_webView->GetMainFrame())
+ if (WebFrame* webFrame = m_webView->GetMainFrame())
if (Frame* frame = webFrame->GetFrame())
if (Document* document = frame->document())
if (!DatabaseTracker::tracker().hasEntryForOrigin(document->securityOrigin()))
@@ -465,12 +465,6 @@ void ChromeClientWx::setCursor(const Cursor& cursor)
m_webView->SetCursor(*cursor.impl());
}
-void ChromeClientWx::requestGeolocationPermissionForFrame(Frame*, Geolocation*)
-{
- // See the comment in WebCore/page/ChromeClient.h
- notImplemented();
-}
-
bool ChromeClientWx::selectItemWritingDirectionIsNatural()
{
return false;
diff --git a/Source/WebKit/wx/WebKitSupport/ChromeClientWx.h b/Source/WebKit/wx/WebKitSupport/ChromeClientWx.h
index f95871ba6..c16948fbe 100644
--- a/Source/WebKit/wx/WebKitSupport/ChromeClientWx.h
+++ b/Source/WebKit/wx/WebKitSupport/ChromeClientWx.h
@@ -34,11 +34,13 @@
#include "IntRect.h"
#include "WebView.h"
+using namespace WebKit;
+
namespace WebCore {
class ChromeClientWx : public ChromeClient {
public:
- ChromeClientWx(wxWebView*);
+ ChromeClientWx(WebView*);
virtual ~ChromeClientWx();
virtual void chromeDestroyed();
@@ -136,9 +138,6 @@ public:
virtual void scrollRectIntoView(const IntRect&) const { }
- virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
- virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { }
-
virtual bool selectItemWritingDirectionIsNatural();
virtual bool selectItemAlignmentFollowsMenuWritingDirection();
virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;
@@ -151,7 +150,7 @@ public:
virtual bool hasOpenedPopup() const;
private:
- wxWebView* m_webView;
+ WebView* m_webView;
};
}
diff --git a/Source/WebKit/wx/WebKitSupport/EditorClientWx.cpp b/Source/WebKit/wx/WebKitSupport/EditorClientWx.cpp
index f2f9ca775..c23746828 100644
--- a/Source/WebKit/wx/WebKitSupport/EditorClientWx.cpp
+++ b/Source/WebKit/wx/WebKitSupport/EditorClientWx.cpp
@@ -47,6 +47,8 @@
#include <stdio.h>
+using namespace WebKit;
+
namespace WebCore {
static const unsigned CtrlKey = 1 << 0;
@@ -253,9 +255,9 @@ void EditorClientWx::respondToChangedContents()
Frame* frame = m_page->focusController()->focusedOrMainFrame();
if (frame) {
- wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
+ WebKit::WebView* webKitWin = dynamic_cast<WebKit::WebView*>(frame->view()->hostWindow()->platformPageClient());
if (webKitWin) {
- wxWebViewContentsChangedEvent wkEvent(webKitWin);
+ WebKit::WebViewContentsChangedEvent wkEvent(webKitWin);
webKitWin->GetEventHandler()->ProcessEvent(wkEvent);
}
}
@@ -281,7 +283,7 @@ void EditorClientWx::registerUndoStep(PassRefPtr<UndoStep> step)
Frame* frame = m_page->focusController()->focusedOrMainFrame();
if (frame) {
- wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
+ WebView* webKitWin = dynamic_cast<WebView*>(frame->view()->hostWindow()->platformPageClient());
if (webKitWin)
webKitWin->m_impl->undoStack.append(step);
}
@@ -292,7 +294,7 @@ void EditorClientWx::registerRedoStep(PassRefPtr<UndoStep> step)
Frame* frame = m_page->focusController()->focusedOrMainFrame();
if (frame) {
- wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
+ WebView* webKitWin = dynamic_cast<WebView*>(frame->view()->hostWindow()->platformPageClient());
if (webKitWin)
webKitWin->m_impl->redoStack.append(step);
}
@@ -303,7 +305,7 @@ void EditorClientWx::clearUndoRedoOperations()
Frame* frame = m_page->focusController()->focusedOrMainFrame();
if (frame) {
- wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
+ WebKit::WebView* webKitWin = dynamic_cast<WebKit::WebView*>(frame->view()->hostWindow()->platformPageClient());
if (webKitWin) {
webKitWin->m_impl->redoStack.clear();
webKitWin->m_impl->undoStack.clear();
@@ -326,7 +328,7 @@ bool EditorClientWx::canUndo() const
Frame* frame = m_page->focusController()->focusedOrMainFrame();
if (frame) {
- wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
+ WebKit::WebView* webKitWin = dynamic_cast<WebKit::WebView*>(frame->view()->hostWindow()->platformPageClient());
if (webKitWin) {
return webKitWin->m_impl->undoStack.size() != 0;
}
@@ -339,7 +341,7 @@ bool EditorClientWx::canRedo() const
Frame* frame = m_page->focusController()->focusedOrMainFrame();
if (frame) {
- wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
+ WebKit::WebView* webKitWin = dynamic_cast<WebKit::WebView*>(frame->view()->hostWindow()->platformPageClient());
if (webKitWin && webKitWin) {
return webKitWin->m_impl->redoStack.size() != 0;
}
@@ -352,7 +354,7 @@ void EditorClientWx::undo()
Frame* frame = m_page->focusController()->focusedOrMainFrame();
if (frame) {
- wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
+ WebKit::WebView* webKitWin = dynamic_cast<WebKit::WebView*>(frame->view()->hostWindow()->platformPageClient());
if (webKitWin) {
webKitWin->m_impl->undoStack.last()->unapply();
webKitWin->m_impl->undoStack.remove(--webKitWin->m_impl->undoStack.end());
@@ -365,7 +367,7 @@ void EditorClientWx::redo()
Frame* frame = m_page->focusController()->focusedOrMainFrame();
if (frame) {
- wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
+ WebKit::WebView* webKitWin = dynamic_cast<WebKit::WebView*>(frame->view()->hostWindow()->platformPageClient());
if (webKitWin) {
webKitWin->m_impl->redoStack.last()->reapply();
webKitWin->m_impl->redoStack.remove(--webKitWin->m_impl->redoStack.end());
@@ -488,9 +490,9 @@ void EditorClientWx::textDidChangeInTextArea(Element*)
void EditorClientWx::respondToChangedSelection(Frame* frame)
{
if (frame) {
- wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
+ WebKit::WebView* webKitWin = dynamic_cast<WebKit::WebView*>(frame->view()->hostWindow()->platformPageClient());
if (webKitWin) {
- wxWebViewSelectionChangedEvent wkEvent(webKitWin);
+ WebKit::WebViewSelectionChangedEvent wkEvent(webKitWin);
webKitWin->GetEventHandler()->ProcessEvent(wkEvent);
}
}
diff --git a/Source/WebKit/wx/WebKitSupport/EditorClientWx.h b/Source/WebKit/wx/WebKitSupport/EditorClientWx.h
index ece15fa87..2b151283f 100644
--- a/Source/WebKit/wx/WebKitSupport/EditorClientWx.h
+++ b/Source/WebKit/wx/WebKitSupport/EditorClientWx.h
@@ -38,8 +38,8 @@
namespace WebCore {
class EditorClientWx : public EditorClient, public TextCheckerClient {
-friend class ::wxWebView;
-friend class ::wxWebFrame;
+friend class WebKit::WebView;
+friend class WebKit::WebFrame;
public:
virtual ~EditorClientWx();
diff --git a/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp b/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
index 78d56be13..899d0fc60 100644
--- a/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
+++ b/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
@@ -58,6 +58,9 @@
#include <wtf/RefPtr.h>
#include <stdio.h>
+#if OS(UNIX)
+#include <sys/utsname.h>
+#endif
#include "FrameNetworkingContextWx.h"
#include "WebFrame.h"
@@ -66,25 +69,27 @@
#include "WebView.h"
#include "WebViewPrivate.h"
+using namespace WebKit;
+
namespace WebCore {
inline int wxNavTypeFromWebNavType(NavigationType type){
if (type == NavigationTypeLinkClicked)
- return wxWEBVIEW_NAV_LINK_CLICKED;
+ return WEBVIEW_NAV_LINK_CLICKED;
if (type == NavigationTypeFormSubmitted)
- return wxWEBVIEW_NAV_FORM_SUBMITTED;
+ return WEBVIEW_NAV_FORM_SUBMITTED;
if (type == NavigationTypeBackForward)
- return wxWEBVIEW_NAV_BACK_NEXT;
+ return WEBVIEW_NAV_BACK_NEXT;
if (type == NavigationTypeReload)
- return wxWEBVIEW_NAV_RELOAD;
+ return WEBVIEW_NAV_RELOAD;
if (type == NavigationTypeFormResubmitted)
- return wxWEBVIEW_NAV_FORM_RESUBMITTED;
+ return WEBVIEW_NAV_FORM_RESUBMITTED;
- return wxWEBVIEW_NAV_OTHER;
+ return WEBVIEW_NAV_OTHER;
}
FrameLoaderClientWx::FrameLoaderClientWx()
@@ -100,13 +105,13 @@ FrameLoaderClientWx::~FrameLoaderClientWx()
{
}
-void FrameLoaderClientWx::setFrame(wxWebFrame *frame)
+void FrameLoaderClientWx::setFrame(WebKit::WebFrame *frame)
{
m_webFrame = frame;
m_frame = m_webFrame->m_impl->frame;
}
-void FrameLoaderClientWx::setWebView(wxWebView *webview)
+void FrameLoaderClientWx::setWebView(WebKit::WebView *webview)
{
m_webView = webview;
}
@@ -235,8 +240,8 @@ void FrameLoaderClientWx::detachedFromParent3()
void FrameLoaderClientWx::dispatchDidHandleOnloadEvents()
{
if (m_webView) {
- wxWebViewLoadEvent wkEvent(m_webView);
- wkEvent.SetState(wxWEBVIEW_LOAD_ONLOAD_HANDLED);
+ WebKit::WebViewLoadEvent wkEvent(m_webView);
+ wkEvent.SetState(WEBVIEW_LOAD_ONLOAD_HANDLED);
wkEvent.SetURL(m_frame->loader()->documentLoader()->request().url().string());
wkEvent.SetFrame(m_webFrame);
m_webView->GetEventHandler()->ProcessEvent(wkEvent);
@@ -293,8 +298,8 @@ void FrameLoaderClientWx::dispatchWillClose()
void FrameLoaderClientWx::dispatchDidStartProvisionalLoad()
{
if (m_webView) {
- wxWebViewLoadEvent wkEvent(m_webView);
- wkEvent.SetState(wxWEBVIEW_LOAD_NEGOTIATING);
+ WebKit::WebViewLoadEvent wkEvent(m_webView);
+ wkEvent.SetState(WEBVIEW_LOAD_NEGOTIATING);
wkEvent.SetURL(m_frame->loader()->provisionalDocumentLoader()->request().url().string());
wkEvent.SetFrame(m_webFrame);
m_webView->GetEventHandler()->ProcessEvent(wkEvent);
@@ -309,7 +314,7 @@ void FrameLoaderClientWx::dispatchDidReceiveTitle(const StringWithDirection& tit
if (m_webFrame == m_webView->GetMainFrame())
m_webView->SetPageTitle(title.string());
- wxWebViewReceivedTitleEvent wkEvent(m_webView);
+ WebViewReceivedTitleEvent wkEvent(m_webView);
wkEvent.SetFrame(m_webFrame);
wkEvent.SetTitle(title.string());
m_webView->GetEventHandler()->ProcessEvent(wkEvent);
@@ -320,8 +325,8 @@ void FrameLoaderClientWx::dispatchDidReceiveTitle(const StringWithDirection& tit
void FrameLoaderClientWx::dispatchDidCommitLoad()
{
if (m_webView) {
- wxWebViewLoadEvent wkEvent(m_webView);
- wkEvent.SetState(wxWEBVIEW_LOAD_TRANSFERRING);
+ WebKit::WebViewLoadEvent wkEvent(m_webView);
+ wkEvent.SetState(WEBVIEW_LOAD_TRANSFERRING);
wkEvent.SetURL(m_frame->loader()->documentLoader()->request().url().string());
wkEvent.SetFrame(m_webFrame);
m_webView->GetEventHandler()->ProcessEvent(wkEvent);
@@ -331,8 +336,8 @@ void FrameLoaderClientWx::dispatchDidCommitLoad()
void FrameLoaderClientWx::dispatchDidFinishDocumentLoad()
{
if (m_webView) {
- wxWebViewLoadEvent wkEvent(m_webView);
- wkEvent.SetState(wxWEBVIEW_LOAD_DOC_COMPLETED);
+ WebKit::WebViewLoadEvent wkEvent(m_webView);
+ wkEvent.SetState(WEBVIEW_LOAD_DOC_COMPLETED);
wkEvent.SetURL(m_frame->document()->url().string());
wkEvent.SetFrame(m_webFrame);
m_webView->GetEventHandler()->ProcessEvent(wkEvent);
@@ -382,12 +387,6 @@ void FrameLoaderClientWx::dispatchWillSubmitForm(FramePolicyFunction function,
}
-void FrameLoaderClientWx::dispatchDidLoadMainResource(DocumentLoader*)
-{
- notImplemented();
-}
-
-
void FrameLoaderClientWx::revertToProvisionalState(DocumentLoader*)
{
notImplemented();
@@ -406,8 +405,8 @@ void FrameLoaderClientWx::postProgressEstimateChangedNotification()
void FrameLoaderClientWx::postProgressFinishedNotification()
{
if (m_webView) {
- wxWebViewLoadEvent wkEvent(m_webView);
- wkEvent.SetState(wxWEBVIEW_LOAD_DL_COMPLETED);
+ WebKit::WebViewLoadEvent wkEvent(m_webView);
+ wkEvent.SetState(WEBVIEW_LOAD_DL_COMPLETED);
wkEvent.SetURL(m_frame->document()->url().string());
wkEvent.SetFrame(m_webFrame);
m_webView->GetEventHandler()->ProcessEvent(wkEvent);
@@ -445,14 +444,9 @@ void FrameLoaderClientWx::didChangeTitle(DocumentLoader *l)
}
-void FrameLoaderClientWx::finishedLoading(DocumentLoader* loader)
+void FrameLoaderClientWx::finishedLoading(DocumentLoader*)
{
- if (!m_pluginView) {
- if (m_firstData) {
- loader->writer()->setEncoding(m_response.textEncodingName(), false);
- m_firstData = false;
- }
- } else {
+ if (m_pluginView) {
m_pluginView->didFinishLoading();
m_pluginView = 0;
m_hasSentResponseToPlugin = false;
@@ -652,10 +646,7 @@ bool FrameLoaderClientWx::canCachePage() const
void FrameLoaderClientWx::setMainDocumentError(WebCore::DocumentLoader* loader, const WebCore::ResourceError&)
{
- if (m_firstData) {
- loader->writer()->setEncoding(m_response.textEncodingName(), false);
- m_firstData = false;
- }
+ notImplemented();
}
// FIXME: This function should be moved into WebCore.
@@ -762,7 +753,6 @@ void FrameLoaderClientWx::dispatchDidReceiveResponse(DocumentLoader* loader, uns
{
notImplemented();
m_response = response;
- m_firstData = true;
}
void FrameLoaderClientWx::dispatchDidReceiveContentLength(DocumentLoader* loader, unsigned long id, int length)
@@ -777,13 +767,9 @@ void FrameLoaderClientWx::dispatchDidFinishLoading(DocumentLoader*, unsigned lon
void FrameLoaderClientWx::dispatchDidFailLoading(DocumentLoader* loader, unsigned long, const ResourceError&)
{
- if (m_firstData) {
- loader->writer()->setEncoding(m_response.textEncodingName(), false);
- m_firstData = false;
- }
if (m_webView) {
- wxWebViewLoadEvent wkEvent(m_webView);
- wkEvent.SetState(wxWEBVIEW_LOAD_FAILED);
+ WebKit::WebViewLoadEvent wkEvent(m_webView);
+ wkEvent.SetState(WEBVIEW_LOAD_FAILED);
wkEvent.SetURL(m_frame->loader()->documentLoader()->request().url().string());
wkEvent.SetFrame(m_webFrame);
m_webView->GetEventHandler()->ProcessEvent(wkEvent);
@@ -827,7 +813,7 @@ void FrameLoaderClientWx::dispatchDecidePolicyForNewWindowAction(FramePolicyFunc
return;
if (m_webView) {
- wxWebViewNewWindowEvent wkEvent(m_webView);
+ WebKit::WebViewNewWindowEvent wkEvent(m_webView);
wkEvent.SetURL(request.url().string());
wkEvent.SetTargetName(targetName);
wkEvent.SetFrame(m_webFrame);
@@ -848,7 +834,7 @@ void FrameLoaderClientWx::dispatchDecidePolicyForNavigationAction(FramePolicyFun
return;
if (m_webView) {
- wxWebViewBeforeLoadEvent wkEvent(m_webView);
+ WebKit::WebViewBeforeLoadEvent wkEvent(m_webView);
wkEvent.SetNavigationType(wxNavTypeFromWebNavType(action.type()));
wkEvent.SetURL(request.url().string());
wkEvent.SetFrame(m_webFrame);
@@ -883,7 +869,7 @@ PassRefPtr<Frame> FrameLoaderClientWx::createFrame(const KURL& url, const String
data->marginWidth = marginWidth;
data->marginHeight = marginHeight;
- wxWebFrame* newFrame = new wxWebFrame(m_webView, m_webFrame, data);
+ WebKit::WebFrame* newFrame = new WebKit::WebFrame(m_webView, m_webFrame, data);
RefPtr<Frame> childFrame = adoptRef(newFrame->m_impl->frame);
@@ -900,14 +886,6 @@ PassRefPtr<Frame> FrameLoaderClientWx::createFrame(const KURL& url, const String
return childFrame.release();
}
-void FrameLoaderClientWx::didTransferChildFrameToNewDocument(Page*)
-{
-}
-
-void FrameLoaderClientWx::transferLoadingResourceFromPage(ResourceLoader*, const ResourceRequest&, Page*)
-{
-}
-
ObjectContentType FrameLoaderClientWx::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
{
notImplemented();
@@ -956,7 +934,7 @@ void FrameLoaderClientWx::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* w
return;
if (m_webView) {
- wxWebViewWindowObjectClearedEvent wkEvent(m_webView);
+ WebKit::WebViewWindowObjectClearedEvent wkEvent(m_webView);
Frame* coreFrame = m_webView->GetMainFrame()->GetFrame();
JSGlobalContextRef context = toGlobalRef(coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec());
JSObjectRef windowObject = toRef(coreFrame->script()->globalObject(mainThreadNormalWorld()));
diff --git a/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h b/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
index 4942ae8fe..dd6fd88f7 100644
--- a/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
+++ b/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
@@ -37,8 +37,12 @@
#include "HTMLPlugInElement.h"
#include <wtf/Forward.h>
-class wxWebFrame;
-class wxWebView;
+namespace WebKit {
+
+class WebFrame;
+class WebView;
+
+}
namespace WebCore {
@@ -56,10 +60,10 @@ namespace WebCore {
FrameLoaderClientWx();
~FrameLoaderClientWx();
- wxWebFrame* webFrame() { return m_webFrame; }
- void setFrame(wxWebFrame *frame);
- wxWebView* webView() { return m_webView; }
- void setWebView(wxWebView *webview);
+ WebKit::WebFrame* webFrame() { return m_webFrame; }
+ void setFrame(WebKit::WebFrame *frame);
+ WebKit::WebView* webView() { return m_webView; }
+ void setWebView(WebKit::WebView *webview);
virtual bool hasWebView() const; // mainly for assertions
@@ -117,10 +121,9 @@ namespace WebCore {
virtual void dispatchShow();
virtual void cancelPolicyCheck();
- virtual void dispatchWillSendSubmitEvent(HTMLFormElement*) { }
+ virtual void dispatchWillSendSubmitEvent(PassRefPtr<FormState>) { }
virtual void dispatchWillSubmitForm(FramePolicyFunction, PassRefPtr<FormState>);
- virtual void dispatchDidLoadMainResource(DocumentLoader*);
virtual void revertToProvisionalState(DocumentLoader*);
virtual void postProgressStartedNotification();
@@ -211,8 +214,6 @@ 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(Page*);
- virtual void transferLoadingResourceFromPage(ResourceLoader*, const ResourceRequest&, 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&);
@@ -234,13 +235,12 @@ namespace WebCore {
virtual PassRefPtr<FrameNetworkingContext> createNetworkingContext();
private:
- wxWebFrame *m_webFrame;
+ WebKit::WebFrame *m_webFrame;
Frame* m_frame;
- wxWebView *m_webView;
+ WebKit::WebView *m_webView;
PluginView* m_pluginView;
bool m_hasSentResponseToPlugin;
ResourceResponse m_response;
- bool m_firstData;
};
}
diff --git a/Source/WebKit/wx/WebSettings.cpp b/Source/WebKit/wx/WebSettings.cpp
index 891a867a8..4f8a5bcb8 100644
--- a/Source/WebKit/wx/WebSettings.cpp
+++ b/Source/WebKit/wx/WebSettings.cpp
@@ -32,13 +32,15 @@
#include "PlatformString.h"
#include "Settings.h"
-void wxWebSettings::SetDefaultFixedFontSize(int size)
+namespace WebKit {
+
+void WebSettings::SetDefaultFixedFontSize(int size)
{
if (m_settings)
m_settings->setDefaultFixedFontSize(size);
}
-int wxWebSettings::GetDefaultFixedFontSize() const
+int WebSettings::GetDefaultFixedFontSize() const
{
if (m_settings)
return m_settings->defaultFixedFontSize();
@@ -46,13 +48,13 @@ int wxWebSettings::GetDefaultFixedFontSize() const
return 0;
}
-void wxWebSettings::SetDefaultFontSize(int size)
+void WebSettings::SetDefaultFontSize(int size)
{
if (m_settings)
m_settings->setDefaultFontSize(size);
}
-int wxWebSettings::GetDefaultFontSize() const
+int WebSettings::GetDefaultFontSize() const
{
if (m_settings)
return m_settings->defaultFontSize();
@@ -60,13 +62,13 @@ int wxWebSettings::GetDefaultFontSize() const
return 0;
}
-void wxWebSettings::SetMinimumFontSize(int size)
+void WebSettings::SetMinimumFontSize(int size)
{
if (m_settings)
m_settings->setMinimumFontSize(size);
}
-int wxWebSettings::GetMinimumFontSize() const
+int WebSettings::GetMinimumFontSize() const
{
if (m_settings)
return m_settings->minimumFontSize();
@@ -74,13 +76,13 @@ int wxWebSettings::GetMinimumFontSize() const
return 0;
}
-void wxWebSettings::SetLoadsImagesAutomatically(bool loadAutomatically)
+void WebSettings::SetLoadsImagesAutomatically(bool loadAutomatically)
{
if (m_settings)
m_settings->setLoadsImagesAutomatically(loadAutomatically);
}
-bool wxWebSettings::LoadsImagesAutomatically() const
+bool WebSettings::LoadsImagesAutomatically() const
{
if (m_settings)
return m_settings->loadsImagesAutomatically();
@@ -88,13 +90,13 @@ bool wxWebSettings::LoadsImagesAutomatically() const
return false;
}
-void wxWebSettings::SetJavaScriptEnabled(bool enabled)
+void WebSettings::SetJavaScriptEnabled(bool enabled)
{
if (m_settings)
m_settings->setScriptEnabled(enabled);
}
-bool wxWebSettings::IsJavaScriptEnabled() const
+bool WebSettings::IsJavaScriptEnabled() const
{
if (m_settings)
return m_settings->isScriptEnabled();
@@ -102,13 +104,13 @@ bool wxWebSettings::IsJavaScriptEnabled() const
return false;
}
-void wxWebSettings::SetLocalStoragePath(const wxString& path)
+void WebSettings::SetLocalStoragePath(const wxString& path)
{
if (m_settings)
m_settings->setLocalStorageDatabasePath(path);
}
-wxString wxWebSettings::GetLocalStoragePath() const
+wxString WebSettings::GetLocalStoragePath() const
{
if (m_settings)
return m_settings->localStorageDatabasePath();
@@ -116,7 +118,7 @@ wxString wxWebSettings::GetLocalStoragePath() const
return wxEmptyString;
}
-void wxWebSettings::SetEditableLinkBehavior(wxEditableLinkBehavior behavior)
+void WebSettings::SetEditableLinkBehavior(wxEditableLinkBehavior behavior)
{
WebCore::EditableLinkBehavior webCoreBehavior;
if (m_settings) {
@@ -140,7 +142,7 @@ void wxWebSettings::SetEditableLinkBehavior(wxEditableLinkBehavior behavior)
}
}
-wxEditableLinkBehavior wxWebSettings::GetEditableLinkBehavior() const
+wxEditableLinkBehavior WebSettings::GetEditableLinkBehavior() const
{
wxEditableLinkBehavior behavior = wxEditableLinkDefaultBehavior;
if (m_settings) {
@@ -165,13 +167,13 @@ wxEditableLinkBehavior wxWebSettings::GetEditableLinkBehavior() const
return behavior;
}
-void wxWebSettings::SetPluginsEnabled(bool enabled)
+void WebSettings::SetPluginsEnabled(bool enabled)
{
if (m_settings)
m_settings->setPluginsEnabled(enabled);
}
-bool wxWebSettings::ArePluginsEnabled() const
+bool WebSettings::ArePluginsEnabled() const
{
if (m_settings)
return m_settings->arePluginsEnabled();
@@ -179,13 +181,13 @@ bool wxWebSettings::ArePluginsEnabled() const
return false;
}
-void wxWebSettings::SetPrivateBrowsingEnabled(bool enabled)
+void WebSettings::SetPrivateBrowsingEnabled(bool enabled)
{
if (m_settings)
m_settings->setPrivateBrowsingEnabled(enabled);
}
-bool wxWebSettings::PrivateBrowsingEnabled()
+bool WebSettings::PrivateBrowsingEnabled()
{
if (m_settings)
m_settings->privateBrowsingEnabled();
@@ -193,13 +195,13 @@ bool wxWebSettings::PrivateBrowsingEnabled()
return false;
}
-void wxWebSettings::SetUsesPageCache(bool enabled)
+void WebSettings::SetUsesPageCache(bool enabled)
{
if (m_settings)
m_settings->setUsesPageCache(enabled);
}
-bool wxWebSettings::UsesPageCache()
+bool WebSettings::UsesPageCache()
{
if (m_settings)
m_settings->usesPageCache();
@@ -207,16 +209,18 @@ bool wxWebSettings::UsesPageCache()
return false;
}
-void wxWebSettings::SetOfflineWebApplicationCacheEnabled(bool enabled)
+void WebSettings::SetOfflineWebApplicationCacheEnabled(bool enabled)
{
if (m_settings)
m_settings->setOfflineWebApplicationCacheEnabled(enabled);
}
-bool wxWebSettings::OfflineWebApplicationCacheEnabled()
+bool WebSettings::OfflineWebApplicationCacheEnabled()
{
if (m_settings)
m_settings->offlineWebApplicationCacheEnabled();
return false;
}
+
+}
diff --git a/Source/WebKit/wx/WebSettings.h b/Source/WebKit/wx/WebSettings.h
index b70dde5a3..dfc486a1a 100644
--- a/Source/WebKit/wx/WebSettings.h
+++ b/Source/WebKit/wx/WebSettings.h
@@ -40,6 +40,8 @@ namespace WebCore {
class Settings;
}
+namespace WebKit {
+
enum wxEditableLinkBehavior {
wxEditableLinkDefaultBehavior,
wxEditableLinkAlwaysLive,
@@ -49,25 +51,25 @@ enum wxEditableLinkBehavior {
};
/**
- @class wxWebSettings
+ @class WebSettings
This class is used to control the configurable aspects of the WebKit engine.
- Do not instantiate this object directly. Instead, create a wxWebView and
- call its wxWebView::GetWebSettings() method to get and change that WebView's settings.
+ Do not instantiate this object directly. Instead, create a WebView and
+ call its WebView::GetWebSettings() method to get and change that WebView's settings.
*/
-class WXDLLIMPEXP_WEBKIT wxWebSettings: public wxObject {
+class WXDLLIMPEXP_WEBKIT WebSettings: public wxObject {
public:
- wxWebSettings(WebCore::Settings* settings) :
+ WebSettings(WebCore::Settings* settings) :
wxObject(),
m_settings(settings)
- {}
+ { }
- wxWebSettings() : wxObject() {}
+ WebSettings() : wxObject() { }
- virtual ~wxWebSettings() { }
+ virtual ~WebSettings() { }
/**
Sets the default font size for fixed fonts.
@@ -131,12 +133,12 @@ public:
wxString GetLocalStoragePath() const;
/**
- Sets how links are handled when the wxWebView is in editing mode.
+ Sets how links are handled when the WebView is in editing mode.
*/
void SetEditableLinkBehavior(wxEditableLinkBehavior behavior);
/**
- Returns how links are handled when the wxWebView is in editing mode.
+ Returns how links are handled when the WebView is in editing mode.
*/
wxEditableLinkBehavior GetEditableLinkBehavior() const;
@@ -186,4 +188,6 @@ private:
};
+}
+
#endif // WebSettings_h
diff --git a/Source/WebKit/wx/WebView.cpp b/Source/WebKit/wx/WebView.cpp
index 9117c96b0..57276cab8 100644
--- a/Source/WebKit/wx/WebView.cpp
+++ b/Source/WebKit/wx/WebView.cpp
@@ -103,15 +103,22 @@ int rint(double val)
}
#endif
+#if OS(DARWIN)
+// prototype - function is in WebSystemInterface.mm
+void InitWebCoreSystemInterface(void);
+#endif
+
// ----------------------------------------------------------------------------
-// wxWebView Events
+// WebView Events
// ----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxWebViewLoadEvent, wxCommandEvent)
+namespace WebKit {
+
+IMPLEMENT_DYNAMIC_CLASS(WebViewLoadEvent, wxCommandEvent)
DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_LOAD)
-wxWebViewLoadEvent::wxWebViewLoadEvent(wxWindow* win)
+WebViewLoadEvent::WebViewLoadEvent(wxWindow* win)
{
SetEventType( wxEVT_WEBVIEW_LOAD);
SetEventObject( win );
@@ -119,11 +126,11 @@ wxWebViewLoadEvent::wxWebViewLoadEvent(wxWindow* win)
SetId(win->GetId());
}
-IMPLEMENT_DYNAMIC_CLASS(wxWebViewBeforeLoadEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(WebViewBeforeLoadEvent, wxCommandEvent)
DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_BEFORE_LOAD)
-wxWebViewBeforeLoadEvent::wxWebViewBeforeLoadEvent(wxWindow* win)
+WebViewBeforeLoadEvent::WebViewBeforeLoadEvent(wxWindow* win)
{
m_cancelled = false;
SetEventType(wxEVT_WEBVIEW_BEFORE_LOAD);
@@ -132,11 +139,11 @@ wxWebViewBeforeLoadEvent::wxWebViewBeforeLoadEvent(wxWindow* win)
SetId(win->GetId());
}
-IMPLEMENT_DYNAMIC_CLASS(wxWebViewNewWindowEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(WebViewNewWindowEvent, wxCommandEvent)
DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_NEW_WINDOW)
-wxWebViewNewWindowEvent::wxWebViewNewWindowEvent(wxWindow* win)
+WebViewNewWindowEvent::WebViewNewWindowEvent(wxWindow* win)
{
SetEventType(wxEVT_WEBVIEW_NEW_WINDOW);
SetEventObject(win);
@@ -144,11 +151,11 @@ wxWebViewNewWindowEvent::wxWebViewNewWindowEvent(wxWindow* win)
SetId(win->GetId());
}
-IMPLEMENT_DYNAMIC_CLASS(wxWebViewRightClickEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(WebViewRightClickEvent, wxCommandEvent)
DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_RIGHT_CLICK)
-wxWebViewRightClickEvent::wxWebViewRightClickEvent(wxWindow* win)
+WebViewRightClickEvent::WebViewRightClickEvent(wxWindow* win)
{
SetEventType(wxEVT_WEBVIEW_RIGHT_CLICK);
SetEventObject(win);
@@ -156,11 +163,11 @@ wxWebViewRightClickEvent::wxWebViewRightClickEvent(wxWindow* win)
SetId(win->GetId());
}
-IMPLEMENT_DYNAMIC_CLASS(wxWebViewConsoleMessageEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(WebViewConsoleMessageEvent, wxCommandEvent)
DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_CONSOLE_MESSAGE)
-wxWebViewConsoleMessageEvent::wxWebViewConsoleMessageEvent(wxWindow* win)
+WebViewConsoleMessageEvent::WebViewConsoleMessageEvent(wxWindow* win)
{
SetEventType(wxEVT_WEBVIEW_CONSOLE_MESSAGE);
SetEventObject(win);
@@ -168,11 +175,11 @@ wxWebViewConsoleMessageEvent::wxWebViewConsoleMessageEvent(wxWindow* win)
SetId(win->GetId());
}
-IMPLEMENT_DYNAMIC_CLASS(wxWebViewAlertEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(WebViewAlertEvent, wxCommandEvent)
DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_JS_ALERT)
-wxWebViewAlertEvent::wxWebViewAlertEvent(wxWindow* win)
+WebViewAlertEvent::WebViewAlertEvent(wxWindow* win)
{
SetEventType(wxEVT_WEBVIEW_JS_ALERT);
SetEventObject(win);
@@ -180,11 +187,11 @@ wxWebViewAlertEvent::wxWebViewAlertEvent(wxWindow* win)
SetId(win->GetId());
}
-IMPLEMENT_DYNAMIC_CLASS(wxWebViewConfirmEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(WebViewConfirmEvent, wxCommandEvent)
DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_JS_CONFIRM)
-wxWebViewConfirmEvent::wxWebViewConfirmEvent(wxWindow* win)
+WebViewConfirmEvent::WebViewConfirmEvent(wxWindow* win)
{
SetEventType(wxEVT_WEBVIEW_JS_CONFIRM);
SetEventObject(win);
@@ -192,11 +199,11 @@ wxWebViewConfirmEvent::wxWebViewConfirmEvent(wxWindow* win)
SetId(win->GetId());
}
-IMPLEMENT_DYNAMIC_CLASS(wxWebViewPromptEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(WebViewPromptEvent, wxCommandEvent)
DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_JS_PROMPT)
-wxWebViewPromptEvent::wxWebViewPromptEvent(wxWindow* win)
+WebViewPromptEvent::WebViewPromptEvent(wxWindow* win)
{
SetEventType(wxEVT_WEBVIEW_JS_PROMPT);
SetEventObject(win);
@@ -204,11 +211,11 @@ wxWebViewPromptEvent::wxWebViewPromptEvent(wxWindow* win)
SetId(win->GetId());
}
-IMPLEMENT_DYNAMIC_CLASS(wxWebViewReceivedTitleEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(WebViewReceivedTitleEvent, wxCommandEvent)
DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_RECEIVED_TITLE)
-wxWebViewReceivedTitleEvent::wxWebViewReceivedTitleEvent(wxWindow* win)
+WebViewReceivedTitleEvent::WebViewReceivedTitleEvent(wxWindow* win)
{
SetEventType(wxEVT_WEBVIEW_RECEIVED_TITLE);
SetEventObject(win);
@@ -216,11 +223,11 @@ wxWebViewReceivedTitleEvent::wxWebViewReceivedTitleEvent(wxWindow* win)
SetId(win->GetId());
}
-IMPLEMENT_DYNAMIC_CLASS(wxWebViewWindowObjectClearedEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(WebViewWindowObjectClearedEvent, wxCommandEvent)
DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_WINDOW_OBJECT_CLEARED)
-wxWebViewWindowObjectClearedEvent::wxWebViewWindowObjectClearedEvent(wxWindow* win)
+WebViewWindowObjectClearedEvent::WebViewWindowObjectClearedEvent(wxWindow* win)
{
SetEventType(wxEVT_WEBVIEW_WINDOW_OBJECT_CLEARED);
SetEventObject(win);
@@ -228,11 +235,11 @@ wxWebViewWindowObjectClearedEvent::wxWebViewWindowObjectClearedEvent(wxWindow* w
SetId(win->GetId());
}
-IMPLEMENT_DYNAMIC_CLASS(wxWebViewContentsChangedEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(WebViewContentsChangedEvent, wxCommandEvent)
DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_CONTENTS_CHANGED)
-wxWebViewContentsChangedEvent::wxWebViewContentsChangedEvent(wxWindow* win)
+WebViewContentsChangedEvent::WebViewContentsChangedEvent(wxWindow* win)
{
SetEventType(wxEVT_WEBVIEW_CONTENTS_CHANGED);
SetEventObject(win);
@@ -240,11 +247,11 @@ wxWebViewContentsChangedEvent::wxWebViewContentsChangedEvent(wxWindow* win)
SetId(win->GetId());
}
-IMPLEMENT_DYNAMIC_CLASS(wxWebViewSelectionChangedEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(WebViewSelectionChangedEvent, wxCommandEvent)
DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_SELECTION_CHANGED)
-wxWebViewSelectionChangedEvent::wxWebViewSelectionChangedEvent(wxWindow* win)
+WebViewSelectionChangedEvent::WebViewSelectionChangedEvent(wxWindow* win)
{
SetEventType(wxEVT_WEBVIEW_SELECTION_CHANGED);
SetEventObject(win);
@@ -252,11 +259,11 @@ wxWebViewSelectionChangedEvent::wxWebViewSelectionChangedEvent(wxWindow* win)
SetId(win->GetId());
}
-IMPLEMENT_DYNAMIC_CLASS(wxWebViewPrintFrameEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(WebViewPrintFrameEvent, wxCommandEvent)
DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_PRINT_FRAME)
-wxWebViewPrintFrameEvent::wxWebViewPrintFrameEvent(wxWindow* win)
+WebViewPrintFrameEvent::WebViewPrintFrameEvent(wxWindow* win)
{
SetEventType(wxEVT_WEBVIEW_PRINT_FRAME);
SetEventObject(win);
@@ -268,20 +275,20 @@ wxWebViewPrintFrameEvent::wxWebViewPrintFrameEvent(wxWindow* win)
// DOM Element info data type
//---------------------------------------------------------
-wxWebViewDOMElementInfo::wxWebViewDOMElementInfo() :
+WebViewDOMElementInfo::WebViewDOMElementInfo() :
m_isSelected(false),
m_text(wxEmptyString),
m_imageSrc(wxEmptyString),
m_link(wxEmptyString),
- m_urlElement(NULL),
- m_innerNode(NULL)
+ m_urlElement(0),
+ m_innerNode(0)
{
}
-static wxWebViewCachePolicy gs_cachePolicy;
+static WebViewCachePolicy gs_cachePolicy;
/* static */
-void wxWebView::SetCachePolicy(const wxWebViewCachePolicy& cachePolicy)
+void WebView::SetCachePolicy(const WebViewCachePolicy& cachePolicy)
{
WebCore::MemoryCache* globalCache = WebCore::memoryCache();
globalCache->setCapacities(cachePolicy.GetMinDeadCapacity(),
@@ -293,12 +300,12 @@ void wxWebView::SetCachePolicy(const wxWebViewCachePolicy& cachePolicy)
}
/* static */
-wxWebViewCachePolicy wxWebView::GetCachePolicy()
+WebViewCachePolicy WebView::GetCachePolicy()
{
return gs_cachePolicy;
}
-wxWebViewDOMElementInfo::wxWebViewDOMElementInfo(const wxWebViewDOMElementInfo& other)
+WebViewDOMElementInfo::WebViewDOMElementInfo(const WebViewDOMElementInfo& other)
{
m_isSelected = other.m_isSelected;
m_text = other.m_text;
@@ -308,7 +315,7 @@ wxWebViewDOMElementInfo::wxWebViewDOMElementInfo(const wxWebViewDOMElementInfo&
m_urlElement = other.m_urlElement;
}
-wxWebViewDOMElementInfo::~wxWebViewDOMElementInfo()
+WebViewDOMElementInfo::~WebViewDOMElementInfo()
{
if (m_innerNode)
delete m_innerNode;
@@ -317,29 +324,24 @@ wxWebViewDOMElementInfo::~wxWebViewDOMElementInfo()
delete m_urlElement;
}
-#if OS(DARWIN)
-// prototype - function is in WebSystemInterface.mm
-void InitWebCoreSystemInterface(void);
-#endif
-
-BEGIN_EVENT_TABLE(wxWebView, wxWindow)
- EVT_PAINT(wxWebView::OnPaint)
- EVT_SIZE(wxWebView::OnSize)
- EVT_MOUSE_EVENTS(wxWebView::OnMouseEvents)
- EVT_CONTEXT_MENU(wxWebView::OnContextMenuEvents)
- EVT_KEY_DOWN(wxWebView::OnKeyEvents)
- EVT_KEY_UP(wxWebView::OnKeyEvents)
- EVT_CHAR(wxWebView::OnKeyEvents)
- EVT_SET_FOCUS(wxWebView::OnSetFocus)
- EVT_KILL_FOCUS(wxWebView::OnKillFocus)
- EVT_MOUSE_CAPTURE_LOST(wxWebView::OnMouseCaptureLost)
+BEGIN_EVENT_TABLE(WebView, wxWindow)
+ EVT_PAINT(WebView::OnPaint)
+ EVT_SIZE(WebView::OnSize)
+ EVT_MOUSE_EVENTS(WebView::OnMouseEvents)
+ EVT_CONTEXT_MENU(WebView::OnContextMenuEvents)
+ EVT_KEY_DOWN(WebView::OnKeyEvents)
+ EVT_KEY_UP(WebView::OnKeyEvents)
+ EVT_CHAR(WebView::OnKeyEvents)
+ EVT_SET_FOCUS(WebView::OnSetFocus)
+ EVT_KILL_FOCUS(WebView::OnKillFocus)
+ EVT_MOUSE_CAPTURE_LOST(WebView::OnMouseCaptureLost)
END_EVENT_TABLE()
-IMPLEMENT_DYNAMIC_CLASS(wxWebView, wxWindow)
+IMPLEMENT_DYNAMIC_CLASS(WebView, wxWindow)
-const wxChar* wxWebViewNameStr = wxT("webView");
+const wxChar* WebViewNameStr = wxT("webView");
-wxWebView::wxWebView() :
+WebView::WebView() :
m_textMagnifier(1.0),
m_isInitialized(false),
m_beingDestroyed(false),
@@ -348,7 +350,7 @@ wxWebView::wxWebView() :
{
}
-wxWebView::wxWebView(wxWindow* parent, const wxString& url, int id, const wxPoint& position,
+WebView::WebView(wxWindow* parent, const wxString& url, int id, const wxPoint& position,
const wxSize& size, long style, const wxString& name) :
m_textMagnifier(1.0),
m_isInitialized(false),
@@ -359,7 +361,7 @@ wxWebView::wxWebView(wxWindow* parent, const wxString& url, int id, const wxPoin
Create(parent, url, id, position, size, style, name);
}
-bool wxWebView::Create(wxWindow* parent, const wxString& url, int id, const wxPoint& position,
+bool WebView::Create(wxWindow* parent, const wxString& url, int id, const wxPoint& position,
const wxSize& size, long style, const wxString& name)
{
#if OS(DARWIN)
@@ -401,9 +403,9 @@ bool wxWebView::Create(wxWindow* parent, const wxString& url, int id, const wxPo
m_impl->page = new WebCore::Page(pageClients);
editorClient->setPage(m_impl->page);
- m_mainFrame = new wxWebFrame(this);
+ m_mainFrame = new WebFrame(this);
- // Default settings - we should have wxWebViewSettings class for this
+ // Default settings - we should have WebViewSettings class for this
// eventually
WebCore::Settings* settings = m_impl->page->settings();
settings->setLoadsImagesAutomatically(true);
@@ -428,7 +430,7 @@ bool wxWebView::Create(wxWindow* parent, const wxString& url, int id, const wxPo
return true;
}
-wxWebView::~wxWebView()
+WebView::~WebView()
{
m_beingDestroyed = true;
@@ -442,10 +444,10 @@ wxWebView::~wxWebView()
m_impl->page = 0;
}
-// NOTE: binding to this event in the wxWebView constructor is too early in
+// NOTE: binding to this event in the WebView constructor is too early in
// some cases, but leave the event handler here so that users can bind to it
// at a later time if they have activation state problems.
-void wxWebView::OnTLWActivated(wxActivateEvent& event)
+void WebView::OnTLWActivated(wxActivateEvent& event)
{
if (m_impl && m_impl->page && m_impl->page->focusController())
m_impl->page->focusController()->setActive(event.GetActive());
@@ -454,19 +456,19 @@ void wxWebView::OnTLWActivated(wxActivateEvent& event)
}
-void wxWebView::Stop()
+void WebView::Stop()
{
if (m_mainFrame)
m_mainFrame->Stop();
}
-void wxWebView::Reload()
+void WebView::Reload()
{
if (m_mainFrame)
m_mainFrame->Reload();
}
-wxString wxWebView::GetPageSource()
+wxString WebView::GetPageSource()
{
if (m_mainFrame)
return m_mainFrame->GetPageSource();
@@ -474,13 +476,13 @@ wxString wxWebView::GetPageSource()
return wxEmptyString;
}
-void wxWebView::SetPageSource(const wxString& source, const wxString& baseUrl, const wxString& mimetype)
+void WebView::SetPageSource(const wxString& source, const wxString& baseUrl, const wxString& mimetype)
{
if (m_mainFrame)
m_mainFrame->SetPageSource(source, baseUrl, mimetype);
}
-wxString wxWebView::GetInnerText()
+wxString WebView::GetInnerText()
{
if (m_mainFrame)
return m_mainFrame->GetInnerText();
@@ -488,7 +490,7 @@ wxString wxWebView::GetInnerText()
return wxEmptyString;
}
-wxString wxWebView::GetAsMarkup()
+wxString WebView::GetAsMarkup()
{
if (m_mainFrame)
return m_mainFrame->GetAsMarkup();
@@ -496,7 +498,7 @@ wxString wxWebView::GetAsMarkup()
return wxEmptyString;
}
-wxString wxWebView::GetExternalRepresentation()
+wxString WebView::GetExternalRepresentation()
{
if (m_mainFrame)
return m_mainFrame->GetExternalRepresentation();
@@ -504,7 +506,7 @@ wxString wxWebView::GetExternalRepresentation()
return wxEmptyString;
}
-wxWebKitSelection wxWebView::GetSelection()
+WebKitSelection WebView::GetSelection()
{
if (m_mainFrame)
return m_mainFrame->GetSelection();
@@ -512,7 +514,7 @@ wxWebKitSelection wxWebView::GetSelection()
return 0;
}
-wxString wxWebView::GetSelectionAsHTML()
+wxString WebView::GetSelectionAsHTML()
{
if (m_mainFrame)
return m_mainFrame->GetSelectionAsHTML();
@@ -520,7 +522,7 @@ wxString wxWebView::GetSelectionAsHTML()
return wxEmptyString;
}
-wxString wxWebView::GetSelectionAsText()
+wxString WebView::GetSelectionAsText()
{
if (m_mainFrame)
return m_mainFrame->GetSelectionAsText();
@@ -528,7 +530,7 @@ wxString wxWebView::GetSelectionAsText()
return wxEmptyString;
}
-void wxWebView::SetTransparent(bool transparent)
+void WebView::SetTransparent(bool transparent)
{
WebCore::Frame* frame = 0;
if (m_mainFrame)
@@ -540,7 +542,7 @@ void wxWebView::SetTransparent(bool transparent)
frame->view()->setTransparent(transparent);
}
-bool wxWebView::IsTransparent() const
+bool WebView::IsTransparent() const
{
WebCore::Frame* frame = 0;
if (m_mainFrame)
@@ -552,7 +554,7 @@ bool wxWebView::IsTransparent() const
return frame->view()->isTransparent();
}
-wxString wxWebView::RunScript(const wxString& javascript)
+wxString WebView::RunScript(const wxString& javascript)
{
if (m_mainFrame)
return m_mainFrame->RunScript(javascript);
@@ -560,19 +562,19 @@ wxString wxWebView::RunScript(const wxString& javascript)
return wxEmptyString;
}
-bool wxWebView::ExecuteEditCommand(const wxString& command, const wxString& parameter)
+bool WebView::ExecuteEditCommand(const wxString& command, const wxString& parameter)
{
if (m_mainFrame)
return m_mainFrame->ExecuteEditCommand(command, parameter);
}
-EditState wxWebView::GetEditCommandState(const wxString& command) const
+EditState WebView::GetEditCommandState(const wxString& command) const
{
if (m_mainFrame)
return m_mainFrame->GetEditCommandState(command);
}
-wxString wxWebView::GetEditCommandValue(const wxString& command) const
+wxString WebView::GetEditCommandValue(const wxString& command) const
{
if (m_mainFrame)
return m_mainFrame->GetEditCommandValue(command);
@@ -580,13 +582,13 @@ wxString wxWebView::GetEditCommandValue(const wxString& command) const
return wxEmptyString;
}
-void wxWebView::LoadURL(const wxString& url)
+void WebView::LoadURL(const wxString& url)
{
if (m_mainFrame)
m_mainFrame->LoadURL(url);
}
-wxString wxWebView::GetMainFrameURL() const
+wxString WebView::GetMainFrameURL() const
{
if (m_mainFrame)
return m_mainFrame->GetURL();
@@ -594,7 +596,7 @@ wxString wxWebView::GetMainFrameURL() const
return wxEmptyString;
}
-bool wxWebView::GoBack()
+bool WebView::GoBack()
{
if (m_mainFrame)
return m_mainFrame->GoBack();
@@ -602,7 +604,7 @@ bool wxWebView::GoBack()
return false;
}
-bool wxWebView::GoForward()
+bool WebView::GoForward()
{
if (m_mainFrame)
return m_mainFrame->GoForward();
@@ -610,7 +612,7 @@ bool wxWebView::GoForward()
return false;
}
-bool wxWebView::CanGoBack()
+bool WebView::CanGoBack()
{
if (m_mainFrame)
return m_mainFrame->CanGoBack();
@@ -618,7 +620,7 @@ bool wxWebView::CanGoBack()
return false;
}
-bool wxWebView::CanGoForward()
+bool WebView::CanGoForward()
{
if (m_mainFrame)
return m_mainFrame->CanGoForward();
@@ -626,7 +628,7 @@ bool wxWebView::CanGoForward()
return false;
}
-bool wxWebView::CanIncreaseTextSize() const
+bool WebView::CanIncreaseTextSize() const
{
if (m_mainFrame)
return m_mainFrame->CanIncreaseTextSize();
@@ -634,13 +636,13 @@ bool wxWebView::CanIncreaseTextSize() const
return false;
}
-void wxWebView::IncreaseTextSize()
+void WebView::IncreaseTextSize()
{
if (m_mainFrame)
m_mainFrame->IncreaseTextSize();
}
-bool wxWebView::CanDecreaseTextSize() const
+bool WebView::CanDecreaseTextSize() const
{
if (m_mainFrame)
m_mainFrame->CanDecreaseTextSize();
@@ -648,25 +650,25 @@ bool wxWebView::CanDecreaseTextSize() const
return false;
}
-void wxWebView::DecreaseTextSize()
+void WebView::DecreaseTextSize()
{
if (m_mainFrame)
m_mainFrame->DecreaseTextSize();
}
-void wxWebView::ResetTextSize()
+void WebView::ResetTextSize()
{
if (m_mainFrame)
m_mainFrame->ResetTextSize();
}
-void wxWebView::MakeEditable(bool enable)
+void WebView::MakeEditable(bool enable)
{
if (m_mainFrame)
m_mainFrame->MakeEditable(enable);
}
-bool wxWebView::IsEditable() const
+bool WebView::IsEditable() const
{
if (m_mainFrame)
return m_mainFrame->IsEditable();
@@ -680,7 +682,7 @@ bool wxWebView::IsEditable() const
* Event forwarding functions to send events down to WebCore.
*/
-void wxWebView::OnPaint(wxPaintEvent& event)
+void WebView::OnPaint(wxPaintEvent& event)
{
if (m_beingDestroyed || !m_mainFrame)
return;
@@ -720,7 +722,7 @@ void wxWebView::OnPaint(wxPaintEvent& event)
}
}
-bool wxWebView::FindString(const wxString& string, bool forward, bool caseSensitive, bool wrapSelection, bool startInSelection)
+bool WebView::FindString(const wxString& string, bool forward, bool caseSensitive, bool wrapSelection, bool startInSelection)
{
if (m_mainFrame)
return m_mainFrame->FindString(string, forward, caseSensitive, wrapSelection, startInSelection);
@@ -728,7 +730,7 @@ bool wxWebView::FindString(const wxString& string, bool forward, bool caseSensit
return false;
}
-void wxWebView::OnSize(wxSizeEvent& event)
+void WebView::OnSize(wxSizeEvent& event)
{
if (m_isInitialized && m_mainFrame) {
WebCore::Frame* frame = m_mainFrame->GetFrame();
@@ -748,7 +750,7 @@ static int getDoubleClickTime()
#endif
}
-void wxWebView::OnMouseEvents(wxMouseEvent& event)
+void WebView::OnMouseEvents(wxMouseEvent& event)
{
event.Skip();
@@ -820,9 +822,9 @@ void wxWebView::OnMouseEvents(wxMouseEvent& event)
frame->eventHandler()->mouseMoved(wkEvent);
}
-void wxWebView::OnContextMenuEvents(wxContextMenuEvent& event)
+void WebView::OnContextMenuEvents(wxContextMenuEvent& event)
{
- Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxWebView::OnMenuSelectEvents), NULL, this);
+ Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(WebView::OnMenuSelectEvents), 0, this);
m_impl->page->contextMenuController()->clearContextMenu();
wxPoint localEventPoint = ScreenToClient(event.GetPosition());
@@ -853,10 +855,10 @@ void wxWebView::OnContextMenuEvents(wxContextMenuEvent& event)
PopupMenu(menuWx, localEventPoint);
- Disconnect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxWebView::OnMenuSelectEvents), NULL, this);
+ Disconnect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(WebView::OnMenuSelectEvents), 0, this);
}
-void wxWebView::OnMenuSelectEvents(wxCommandEvent& event)
+void WebView::OnMenuSelectEvents(wxCommandEvent& event)
{
// we shouldn't hit this unless there's a context menu showing
WebCore::ContextMenu* coreMenu = m_impl->page->contextMenuController()->contextMenu();
@@ -872,13 +874,13 @@ void wxWebView::OnMenuSelectEvents(wxCommandEvent& event)
delete item;
}
-void wxWebView::OnMouseCaptureLost(wxMouseCaptureLostEvent& event)
+void WebView::OnMouseCaptureLost(wxMouseCaptureLostEvent& event)
{
// do nothing - unfortunately, we MUST handle this event due to wxWidgets rules,
// otherwise we will assert, even though there is nothing for us to do here.
}
-bool wxWebView::CanCopy()
+bool WebView::CanCopy()
{
if (m_mainFrame)
return m_mainFrame->CanCopy();
@@ -886,13 +888,13 @@ bool wxWebView::CanCopy()
return false;
}
-void wxWebView::Copy()
+void WebView::Copy()
{
if (m_mainFrame)
m_mainFrame->Copy();
}
-bool wxWebView::CanCut()
+bool WebView::CanCut()
{
if (m_mainFrame)
return m_mainFrame->CanCut();
@@ -900,13 +902,13 @@ bool wxWebView::CanCut()
return false;
}
-void wxWebView::Cut()
+void WebView::Cut()
{
if (m_mainFrame)
m_mainFrame->Cut();
}
-bool wxWebView::CanPaste()
+bool WebView::CanPaste()
{
if (m_mainFrame)
return m_mainFrame->CanPaste();
@@ -914,13 +916,13 @@ bool wxWebView::CanPaste()
return false;
}
-void wxWebView::Paste()
+void WebView::Paste()
{
if (m_mainFrame)
m_mainFrame->Paste();
}
-void wxWebView::OnKeyEvents(wxKeyEvent& event)
+void WebView::OnKeyEvents(wxKeyEvent& event)
{
WebCore::Frame* frame = 0;
if (m_impl->page)
@@ -1055,7 +1057,7 @@ void wxWebView::OnKeyEvents(wxKeyEvent& event)
event.Skip();
}
-void wxWebView::OnSetFocus(wxFocusEvent& event)
+void WebView::OnSetFocus(wxFocusEvent& event)
{
if (m_impl && m_impl->page && m_impl->page->focusController()) {
m_impl->page->focusController()->setFocused(true);
@@ -1068,7 +1070,7 @@ void wxWebView::OnSetFocus(wxFocusEvent& event)
event.Skip();
}
-void wxWebView::OnKillFocus(wxFocusEvent& event)
+void WebView::OnKillFocus(wxFocusEvent& event)
{
if (m_impl && m_impl->page && m_impl->page->focusController()) {
m_impl->page->focusController()->setFocused(false);
@@ -1089,15 +1091,15 @@ void wxWebView::OnKillFocus(wxFocusEvent& event)
event.Skip();
}
-wxWebViewDOMElementInfo wxWebView::HitTest(const wxPoint& pos) const
+WebViewDOMElementInfo WebView::HitTest(const wxPoint& pos) const
{
if (m_mainFrame)
return m_mainFrame->HitTest(pos);
- return wxWebViewDOMElementInfo();
+ return WebViewDOMElementInfo();
}
-bool wxWebView::ShouldClose() const
+bool WebView::ShouldClose() const
{
if (m_mainFrame)
return m_mainFrame->ShouldClose();
@@ -1106,7 +1108,7 @@ bool wxWebView::ShouldClose() const
}
/* static */
-void wxWebView::SetDatabaseDirectory(const wxString& databaseDirectory)
+void WebView::SetDatabaseDirectory(const wxString& databaseDirectory)
{
#if ENABLE(SQL_DATABASE)
WebCore::DatabaseTracker::tracker().setDatabaseDirectoryPath(databaseDirectory);
@@ -1114,7 +1116,7 @@ void wxWebView::SetDatabaseDirectory(const wxString& databaseDirectory)
}
/* static */
-wxString wxWebView::GetDatabaseDirectory()
+wxString WebView::GetDatabaseDirectory()
{
#if ENABLE(SQL_DATABASE)
return WebCore::DatabaseTracker::tracker().databaseDirectoryPath();
@@ -1124,7 +1126,7 @@ wxString wxWebView::GetDatabaseDirectory()
}
/* static */
-void wxWebView::SetDatabasesEnabled(bool enabled)
+void WebView::SetDatabasesEnabled(bool enabled)
{
#if ENABLE(SQL_DATABASE)
WebCore::AbstractDatabase::setIsAvailable(enabled);
@@ -1132,7 +1134,7 @@ void wxWebView::SetDatabasesEnabled(bool enabled)
}
/* static */
-bool wxWebView::AreDatabasesEnabled()
+bool WebView::AreDatabasesEnabled()
{
#if ENABLE(SQL_DATABASE)
return WebCore::AbstractDatabase::isAvailable();
@@ -1155,7 +1157,7 @@ static WebCore::ResourceHandleManager::ProxyType curlProxyType(wxProxyType type)
}
/* static */
-void wxWebView::SetProxyInfo(const wxString& host,
+void WebView::SetProxyInfo(const wxString& host,
unsigned long port,
wxProxyType type,
const wxString& username,
@@ -1166,16 +1168,16 @@ void wxWebView::SetProxyInfo(const wxString& host,
mgr->setProxyInfo(host, port, curlProxyType(type), username, password);
}
-wxWebSettings wxWebView::GetWebSettings()
+WebSettings WebView::GetWebSettings()
{
ASSERT(m_impl->page);
if (m_impl->page)
- return wxWebSettings(m_impl->page->settings());
+ return WebSettings(m_impl->page->settings());
- return wxWebSettings();
+ return WebSettings();
}
-wxWebKitCompatibilityMode wxWebView::GetCompatibilityMode() const
+WebKitCompatibilityMode WebView::GetCompatibilityMode() const
{
if (m_mainFrame)
return m_mainFrame->GetCompatibilityMode();
@@ -1183,8 +1185,10 @@ wxWebKitCompatibilityMode wxWebView::GetCompatibilityMode() const
return QuirksMode;
}
-void wxWebView::GrantUniversalAccess()
+void WebView::GrantUniversalAccess()
{
if (m_mainFrame)
m_mainFrame->GrantUniversalAccess();
}
+
+}
diff --git a/Source/WebKit/wx/WebView.h b/Source/WebKit/wx/WebView.h
index 51b075fa5..3ad690c8c 100644
--- a/Source/WebKit/wx/WebView.h
+++ b/Source/WebKit/wx/WebView.h
@@ -25,8 +25,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WXWEBVIEW_H
-#define WXWEBVIEW_H
+#ifndef WebView_h
+#define WebView_h
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
@@ -40,7 +40,6 @@
class WebViewPrivate;
class WebViewFrameData;
-class wxWebFrame;
typedef struct OpaqueJSContext* JSGlobalContextRef;
typedef struct OpaqueJSValue* JSObjectRef;
@@ -50,22 +49,26 @@ namespace WebCore {
class FrameLoaderClientWx;
}
+static const int defaultCacheCapacity = 8192 * 1024; // mirrors MemoryCache.cpp
+
+namespace WebKit {
+
+class WebFrame;
+
#ifndef SWIG
-extern WXDLLIMPEXP_WEBKIT const wxChar* wxWebViewNameStr;
+extern WXDLLIMPEXP_WEBKIT const wxChar* WebViewNameStr;
#endif
-static const int defaultCacheCapacity = 8192 * 1024; // mirrors MemoryCache.cpp
-
-class WXDLLIMPEXP_WEBKIT wxWebViewCachePolicy
+class WXDLLIMPEXP_WEBKIT WebViewCachePolicy
{
public:
- wxWebViewCachePolicy(unsigned minDead = 0, unsigned maxDead = defaultCacheCapacity, unsigned totalCapacity = defaultCacheCapacity)
+ WebViewCachePolicy(unsigned minDead = 0, unsigned maxDead = defaultCacheCapacity, unsigned totalCapacity = defaultCacheCapacity)
: m_minDeadCapacity(minDead)
, m_maxDeadCapacity(maxDead)
, m_capacity(totalCapacity)
{}
- ~wxWebViewCachePolicy() {}
+ ~WebViewCachePolicy() {}
unsigned GetCapacity() const { return m_capacity; }
void SetCapacity(int capacity) { m_capacity = capacity; }
@@ -102,9 +105,9 @@ enum wxProxyType {
Socks5Hostname
};
-class WXDLLIMPEXP_WEBKIT wxWebView : public wxWindow
+class WXDLLIMPEXP_WEBKIT WebView : public wxWindow
{
- // ChromeClientWx needs to get the Page* stored by the wxWebView
+ // ChromeClientWx needs to get the Page* stored by the WebView
// for the createWindow function.
friend class WebCore::ChromeClientWx;
friend class WebCore::FrameLoaderClientWx;
@@ -112,21 +115,21 @@ class WXDLLIMPEXP_WEBKIT wxWebView : public wxWindow
public:
// ctor(s)
#if SWIG
- %pythonAppend wxWebView "self._setOORInfo(self)"
- %pythonAppend wxWebView() ""
+ %pythonAppend WebView "self._setOORInfo(self)"
+ %pythonAppend WebView() ""
#endif
- wxWebView(wxWindow* parent,
+ WebView(wxWindow* parent,
const wxString& url = "about:blank",
int id = wxID_ANY,
const wxPoint& point = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
- const wxString& name = wxWebViewNameStr); // For wxWebView internal data passing
+ const wxString& name = WebViewNameStr); // For WebView internal data passing
#if SWIG
- %rename(PreWebView) wxWebView();
+ %rename(PreWebView) WebView();
#else
- wxWebView();
+ WebView();
#endif
bool Create(wxWindow* parent,
@@ -135,10 +138,10 @@ public:
const wxPoint& point = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
- const wxString& name = wxWebViewNameStr); // For wxWebView internal data passing
+ const wxString& name = WebViewNameStr); // For WebView internal data passing
#ifndef SWIG
- virtual ~wxWebView();
+ virtual ~WebView();
#endif
void LoadURL(const wxString& url);
@@ -166,7 +169,7 @@ public:
wxString GetAsMarkup();
wxString GetExternalRepresentation();
- wxWebKitSelection GetSelection();
+ WebKitSelection GetSelection();
wxString GetSelectionAsHTML();
wxString GetSelectionAsText();
@@ -193,16 +196,16 @@ public:
wxString GetPageTitle() const { return m_title; }
void SetPageTitle(const wxString& title) { m_title = title; }
- wxWebFrame* GetMainFrame() { return m_mainFrame; }
+ WebFrame* GetMainFrame() { return m_mainFrame; }
wxString GetMainFrameURL() const;
- wxWebViewDOMElementInfo HitTest(const wxPoint& pos) const;
+ WebViewDOMElementInfo HitTest(const wxPoint& pos) const;
bool ShouldClose() const;
- static void SetCachePolicy(const wxWebViewCachePolicy& cachePolicy);
- static wxWebViewCachePolicy GetCachePolicy();
+ static void SetCachePolicy(const WebViewCachePolicy& cachePolicy);
+ static WebViewCachePolicy GetCachePolicy();
void SetMouseWheelZooms(bool mouseWheelZooms) { m_mouseWheelZooms = mouseWheelZooms; }
bool GetMouseWheelZooms() const { return m_mouseWheelZooms; }
@@ -226,8 +229,8 @@ public:
const wxString& username = wxEmptyString,
const wxString& password = wxEmptyString);
- wxWebSettings GetWebSettings();
- wxWebKitCompatibilityMode GetCompatibilityMode() const;
+ WebSettings GetWebSettings();
+ WebKitCompatibilityMode GetCompatibilityMode() const;
/*
This method allows cross site-scripting (XSS) in the WebView.
@@ -253,14 +256,14 @@ private:
// any class wishing to process wxWindows events must use this macro
#ifndef SWIG
DECLARE_EVENT_TABLE()
- DECLARE_DYNAMIC_CLASS(wxWebView)
+ DECLARE_DYNAMIC_CLASS(WebView)
#endif
float m_textMagnifier;
bool m_isInitialized;
bool m_beingDestroyed;
bool m_mouseWheelZooms;
WebViewPrivate* m_impl;
- wxWebFrame* m_mainFrame;
+ WebFrame* m_mainFrame;
wxString m_title;
};
@@ -270,31 +273,31 @@ private:
// ----------------------------------------------------------------------------
enum {
- wxWEBVIEW_LOAD_STARTED = 1,
- wxWEBVIEW_LOAD_NEGOTIATING = 2,
- wxWEBVIEW_LOAD_REDIRECTING = 4,
- wxWEBVIEW_LOAD_TRANSFERRING = 8,
- wxWEBVIEW_LOAD_STOPPED = 16,
- wxWEBVIEW_LOAD_FAILED = 32,
- wxWEBVIEW_LOAD_DL_COMPLETED = 64,
- wxWEBVIEW_LOAD_DOC_COMPLETED = 128,
- wxWEBVIEW_LOAD_ONLOAD_HANDLED = 256,
- wxWEBVIEW_LOAD_WINDOW_OBJECT_CLEARED = 512
+ WEBVIEW_LOAD_STARTED = 1,
+ WEBVIEW_LOAD_NEGOTIATING = 2,
+ WEBVIEW_LOAD_REDIRECTING = 4,
+ WEBVIEW_LOAD_TRANSFERRING = 8,
+ WEBVIEW_LOAD_STOPPED = 16,
+ WEBVIEW_LOAD_FAILED = 32,
+ WEBVIEW_LOAD_DL_COMPLETED = 64,
+ WEBVIEW_LOAD_DOC_COMPLETED = 128,
+ WEBVIEW_LOAD_ONLOAD_HANDLED = 256,
+ WEBVIEW_LOAD_WINDOW_OBJECT_CLEARED = 512
};
enum {
- wxWEBVIEW_NAV_LINK_CLICKED = 1,
- wxWEBVIEW_NAV_BACK_NEXT = 2,
- wxWEBVIEW_NAV_FORM_SUBMITTED = 4,
- wxWEBVIEW_NAV_RELOAD = 8,
- wxWEBVIEW_NAV_FORM_RESUBMITTED = 16,
- wxWEBVIEW_NAV_OTHER = 32
+ WEBVIEW_NAV_LINK_CLICKED = 1,
+ WEBVIEW_NAV_BACK_NEXT = 2,
+ WEBVIEW_NAV_FORM_SUBMITTED = 4,
+ WEBVIEW_NAV_RELOAD = 8,
+ WEBVIEW_NAV_FORM_RESUBMITTED = 16,
+ WEBVIEW_NAV_OTHER = 32
};
-class WXDLLIMPEXP_WEBKIT wxWebViewBeforeLoadEvent : public wxCommandEvent
+class WXDLLIMPEXP_WEBKIT WebViewBeforeLoadEvent : public wxCommandEvent
{
#ifndef SWIG
- DECLARE_DYNAMIC_CLASS( wxWebViewBeforeLoadEvent )
+ DECLARE_DYNAMIC_CLASS(WebViewBeforeLoadEvent)
#endif
public:
@@ -304,23 +307,23 @@ public:
void SetURL(const wxString& url) { m_url = url; }
void SetNavigationType(int navType) { m_navType = navType; }
int GetNavigationType() const { return m_navType; }
- wxWebFrame* GetFrame() const { return m_frame; }
- void SetFrame(wxWebFrame* frame) { m_frame = frame; }
+ WebFrame* GetFrame() const { return m_frame; }
+ void SetFrame(WebFrame* frame) { m_frame = frame; }
- wxWebViewBeforeLoadEvent( wxWindow* win = (wxWindow*) NULL );
- wxEvent *Clone(void) const { return new wxWebViewBeforeLoadEvent(*this); }
+ WebViewBeforeLoadEvent(wxWindow* win = 0);
+ wxEvent *Clone(void) const { return new WebViewBeforeLoadEvent(*this); }
private:
bool m_cancelled;
wxString m_url;
int m_navType;
- wxWebFrame* m_frame;
+ WebFrame* m_frame;
};
-class WXDLLIMPEXP_WEBKIT wxWebViewLoadEvent : public wxCommandEvent
+class WXDLLIMPEXP_WEBKIT WebViewLoadEvent : public wxCommandEvent
{
#ifndef SWIG
- DECLARE_DYNAMIC_CLASS( wxWebViewLoadEvent )
+ DECLARE_DYNAMIC_CLASS(WebViewLoadEvent)
#endif
public:
@@ -328,22 +331,22 @@ public:
void SetState(const int state) { m_state = state; }
wxString GetURL() const { return m_url; }
void SetURL(const wxString& url) { m_url = url; }
- wxWebFrame* GetFrame() const { return m_frame; }
- void SetFrame(wxWebFrame* frame) { m_frame = frame; }
+ WebFrame* GetFrame() const { return m_frame; }
+ void SetFrame(WebFrame* frame) { m_frame = frame; }
- wxWebViewLoadEvent( wxWindow* win = (wxWindow*) NULL );
- wxEvent *Clone(void) const { return new wxWebViewLoadEvent(*this); }
+ WebViewLoadEvent(wxWindow* win = 0);
+ wxEvent *Clone(void) const { return new WebViewLoadEvent(*this); }
private:
int m_state;
wxString m_url;
- wxWebFrame* m_frame;
+ WebFrame* m_frame;
};
-class WXDLLIMPEXP_WEBKIT wxWebKitWindowFeatures
+class WXDLLIMPEXP_WEBKIT WebKitWindowFeatures
{
public:
- wxWebKitWindowFeatures()
+ WebKitWindowFeatures()
: menuBarVisible(true)
, statusBarVisible(true)
, toolBarVisible(true)
@@ -364,10 +367,10 @@ public:
bool dialog;
};
-class WXDLLIMPEXP_WEBKIT wxWebViewNewWindowEvent : public wxCommandEvent
+class WXDLLIMPEXP_WEBKIT WebViewNewWindowEvent : public wxCommandEvent
{
#ifndef SWIG
- DECLARE_DYNAMIC_CLASS( wxWebViewNewWindowEvent )
+ DECLARE_DYNAMIC_CLASS(WebViewNewWindowEvent)
#endif
public:
@@ -375,57 +378,57 @@ public:
void SetURL(const wxString& url) { m_url = url; }
wxString GetTargetName() const { return m_targetName; }
void SetTargetName(const wxString& name) { m_targetName = name; }
- wxWebView* GetWebView() { return m_webView; }
- void SetWebView(wxWebView* webView) { m_webView = webView; }
- wxWebKitWindowFeatures GetWindowFeatures() { return m_features; }
- void SetWindowFeatures(wxWebKitWindowFeatures features) { m_features = features; }
- wxWebFrame* GetFrame() const { return m_frame; }
- void SetFrame(wxWebFrame* frame) { m_frame = frame; }
+ WebView* GetWebView() { return m_webView; }
+ void SetWebView(WebView* webView) { m_webView = webView; }
+ WebKitWindowFeatures GetWindowFeatures() { return m_features; }
+ void SetWindowFeatures(WebKitWindowFeatures features) { m_features = features; }
+ WebFrame* GetFrame() const { return m_frame; }
+ void SetFrame(WebFrame* frame) { m_frame = frame; }
- wxWebViewNewWindowEvent( wxWindow* win = static_cast<wxWindow*>(NULL));
- wxEvent *Clone(void) const { return new wxWebViewNewWindowEvent(*this); }
+ WebViewNewWindowEvent(wxWindow* win = 0);
+ wxEvent *Clone() const { return new WebViewNewWindowEvent(*this); }
private:
- wxWebView* m_webView;
- wxWebFrame* m_frame;
- wxWebKitWindowFeatures m_features;
+ WebView* m_webView;
+ WebFrame* m_frame;
+ WebKitWindowFeatures m_features;
wxString m_url;
wxString m_targetName;
};
-class WXDLLIMPEXP_WEBKIT wxWebViewRightClickEvent : public wxCommandEvent
+class WXDLLIMPEXP_WEBKIT WebViewRightClickEvent : public wxCommandEvent
{
#ifndef SWIG
- DECLARE_DYNAMIC_CLASS( wxWebViewRightClickEvent )
+ DECLARE_DYNAMIC_CLASS(WebViewRightClickEvent)
#endif
public:
- wxWebViewRightClickEvent( wxWindow* win = static_cast<wxWindow*>(NULL));
- wxEvent *Clone(void) const { return new wxWebViewRightClickEvent(*this); }
+ WebViewRightClickEvent(wxWindow* win = 0);
+ wxEvent *Clone() const { return new WebViewRightClickEvent(*this); }
- wxWebViewDOMElementInfo GetInfo() const { return m_info; }
- void SetInfo(wxWebViewDOMElementInfo info) { m_info = info; }
+ WebViewDOMElementInfo GetInfo() const { return m_info; }
+ void SetInfo(WebViewDOMElementInfo info) { m_info = info; }
wxPoint GetPosition() const { return m_position; }
void SetPosition(wxPoint pos) { m_position = pos; }
private:
- wxWebViewDOMElementInfo m_info;
+ WebViewDOMElementInfo m_info;
wxPoint m_position;
};
// copied from page/Console.h
-enum wxWebViewConsoleMessageLevel {
+enum WebViewConsoleMessageLevel {
TipMessageLevel,
LogMessageLevel,
WarningMessageLevel,
ErrorMessageLevel
};
-class WXDLLIMPEXP_WEBKIT wxWebViewConsoleMessageEvent : public wxCommandEvent
+class WXDLLIMPEXP_WEBKIT WebViewConsoleMessageEvent : public wxCommandEvent
{
#ifndef SWIG
- DECLARE_DYNAMIC_CLASS( wxWebViewConsoleMessageEvent )
+ DECLARE_DYNAMIC_CLASS(WebViewConsoleMessageEvent)
#endif
public:
@@ -438,95 +441,95 @@ public:
wxString GetSourceID() const { return m_sourceID; }
void SetSourceID(const wxString& sourceID) { m_sourceID = sourceID; }
- wxWebViewConsoleMessageEvent( wxWindow* win = (wxWindow*) NULL );
- wxEvent *Clone(void) const { return new wxWebViewConsoleMessageEvent(*this); }
+ WebViewConsoleMessageEvent(wxWindow* win = 0);
+ wxEvent *Clone() const { return new WebViewConsoleMessageEvent(*this); }
- wxWebViewConsoleMessageLevel GetLevel() const { return m_level; }
- void SetLevel(wxWebViewConsoleMessageLevel level) { m_level = level; }
+ WebViewConsoleMessageLevel GetLevel() const { return m_level; }
+ void SetLevel(WebViewConsoleMessageLevel level) { m_level = level; }
private:
unsigned int m_lineNumber;
wxString m_message;
wxString m_sourceID;
- wxWebViewConsoleMessageLevel m_level;
+ WebViewConsoleMessageLevel m_level;
};
-class WXDLLIMPEXP_WEBKIT wxWebViewAlertEvent : public wxCommandEvent
+class WXDLLIMPEXP_WEBKIT WebViewAlertEvent : public wxCommandEvent
{
#ifndef SWIG
- DECLARE_DYNAMIC_CLASS( wxWebViewAlertEvent )
+ DECLARE_DYNAMIC_CLASS(WebViewAlertEvent)
#endif
public:
wxString GetMessage() const { return m_message; }
void SetMessage(const wxString& message) { m_message = message; }
- wxWebViewAlertEvent( wxWindow* win = (wxWindow*) NULL );
- wxEvent *Clone(void) const { return new wxWebViewAlertEvent(*this); }
+ WebViewAlertEvent(wxWindow* win = 0);
+ wxEvent *Clone() const { return new WebViewAlertEvent(*this); }
private:
wxString m_message;
};
-class WXDLLIMPEXP_WEBKIT wxWebViewConfirmEvent : public wxWebViewAlertEvent
+class WXDLLIMPEXP_WEBKIT WebViewConfirmEvent : public WebViewAlertEvent
{
#ifndef SWIG
- DECLARE_DYNAMIC_CLASS( wxWebViewConfirmEvent )
+ DECLARE_DYNAMIC_CLASS(WebViewConfirmEvent)
#endif
public:
int GetReturnCode() const { return m_returnCode; }
void SetReturnCode(int code) { m_returnCode = code; }
- wxWebViewConfirmEvent( wxWindow* win = (wxWindow*) NULL );
- wxEvent *Clone(void) const { return new wxWebViewConfirmEvent(*this); }
+ WebViewConfirmEvent(wxWindow* win = 0);
+ wxEvent *Clone() const { return new WebViewConfirmEvent(*this); }
private:
int m_returnCode;
};
-class WXDLLIMPEXP_WEBKIT wxWebViewPromptEvent : public wxWebViewConfirmEvent
+class WXDLLIMPEXP_WEBKIT WebViewPromptEvent : public WebViewConfirmEvent
{
#ifndef SWIG
- DECLARE_DYNAMIC_CLASS( wxWebViewPromptEvent )
+ DECLARE_DYNAMIC_CLASS(WebViewPromptEvent)
#endif
public:
wxString GetResponse() const { return m_response; }
void SetResponse(const wxString& response) { m_response = response; }
- wxWebViewPromptEvent( wxWindow* win = (wxWindow*) NULL );
- wxEvent *Clone(void) const { return new wxWebViewPromptEvent(*this); }
+ WebViewPromptEvent(wxWindow* win = 0);
+ wxEvent *Clone() const { return new WebViewPromptEvent(*this); }
private:
wxString m_response;
};
-class WXDLLIMPEXP_WEBKIT wxWebViewReceivedTitleEvent : public wxCommandEvent
+class WXDLLIMPEXP_WEBKIT WebViewReceivedTitleEvent : public wxCommandEvent
{
#ifndef SWIG
- DECLARE_DYNAMIC_CLASS( wxWebViewReceivedTitleEvent )
+ DECLARE_DYNAMIC_CLASS(WebViewReceivedTitleEvent)
#endif
public:
wxString GetTitle() const { return m_title; }
void SetTitle(const wxString& title) { m_title = title; }
- wxWebFrame* GetFrame() const { return m_frame; }
- void SetFrame(wxWebFrame* frame) { m_frame = frame; }
+ WebFrame* GetFrame() const { return m_frame; }
+ void SetFrame(WebFrame* frame) { m_frame = frame; }
- wxWebViewReceivedTitleEvent( wxWindow* win = static_cast<wxWindow*>(NULL));
- wxEvent *Clone(void) const { return new wxWebViewReceivedTitleEvent(*this); }
+ WebViewReceivedTitleEvent(wxWindow* win = 0);
+ wxEvent *Clone() const { return new WebViewReceivedTitleEvent(*this); }
private:
wxString m_title;
- wxWebFrame* m_frame;
+ WebFrame* m_frame;
};
-class WXDLLIMPEXP_WEBKIT wxWebViewWindowObjectClearedEvent : public wxCommandEvent
+class WXDLLIMPEXP_WEBKIT WebViewWindowObjectClearedEvent : public wxCommandEvent
{
#ifndef SWIG
- DECLARE_DYNAMIC_CLASS( wxWebViewWindowObjectClearedEvent )
+ DECLARE_DYNAMIC_CLASS(WebViewWindowObjectClearedEvent)
#endif
public:
@@ -536,89 +539,89 @@ public:
JSObjectRef GetWindowObject() const { return m_windowObject; }
void SetWindowObject(JSObjectRef object) { m_windowObject = object; }
- wxWebViewWindowObjectClearedEvent( wxWindow* win = static_cast<wxWindow*>(NULL));
- wxEvent *Clone(void) const { return new wxWebViewWindowObjectClearedEvent(*this); }
+ WebViewWindowObjectClearedEvent(wxWindow* win = 0);
+ wxEvent *Clone() const { return new WebViewWindowObjectClearedEvent(*this); }
private:
JSGlobalContextRef m_jsContext;
JSObjectRef m_windowObject;
};
-class WXDLLIMPEXP_WEBKIT wxWebViewContentsChangedEvent : public wxCommandEvent {
+class WXDLLIMPEXP_WEBKIT WebViewContentsChangedEvent : public wxCommandEvent {
#ifndef SWIG
- DECLARE_DYNAMIC_CLASS(wxWebViewContentsChangedEvent)
+ DECLARE_DYNAMIC_CLASS(WebViewContentsChangedEvent)
#endif
public:
- wxWebViewContentsChangedEvent(wxWindow* win = static_cast<wxWindow*>(0));
- wxEvent *Clone(void) const { return new wxWebViewContentsChangedEvent(*this); }
+ WebViewContentsChangedEvent(wxWindow* win = 0);
+ wxEvent *Clone() const { return new WebViewContentsChangedEvent(*this); }
};
-class WXDLLIMPEXP_WEBKIT wxWebViewSelectionChangedEvent : public wxCommandEvent {
+class WXDLLIMPEXP_WEBKIT WebViewSelectionChangedEvent : public wxCommandEvent {
#ifndef SWIG
- DECLARE_DYNAMIC_CLASS(wxWebViewSelectionChangedEvent)
+ DECLARE_DYNAMIC_CLASS(WebViewSelectionChangedEvent)
#endif
public:
- wxWebViewSelectionChangedEvent(wxWindow* win = static_cast<wxWindow*>(0));
- wxEvent *Clone(void) const { return new wxWebViewSelectionChangedEvent(*this); }
+ WebViewSelectionChangedEvent(wxWindow* win = 0);
+ wxEvent *Clone() const { return new WebViewSelectionChangedEvent(*this); }
};
-class WXDLLIMPEXP_WEBKIT wxWebViewPrintFrameEvent : public wxCommandEvent {
+class WXDLLIMPEXP_WEBKIT WebViewPrintFrameEvent : public wxCommandEvent {
#ifndef SWIG
- DECLARE_DYNAMIC_CLASS(wxWebViewPrintFrameEvent)
+ DECLARE_DYNAMIC_CLASS(WebViewPrintFrameEvent)
#endif
public:
- wxWebViewPrintFrameEvent(wxWindow* win = 0);
- wxEvent *Clone(void) const { return new wxWebViewPrintFrameEvent(*this); }
+ WebViewPrintFrameEvent(wxWindow* win = 0);
+ wxEvent *Clone() const { return new WebViewPrintFrameEvent(*this); }
- wxWebFrame* GetWebFrame() { return m_webFrame; }
- void SetWebFrame(wxWebFrame* frame) { m_webFrame = frame; }
+ WebFrame* GetWebFrame() { return m_webFrame; }
+ void SetWebFrame(WebFrame* frame) { m_webFrame = frame; }
private:
- wxWebFrame* m_webFrame;
+ WebFrame* m_webFrame;
};
-typedef void (wxEvtHandler::*wxWebViewLoadEventFunction)(wxWebViewLoadEvent&);
-typedef void (wxEvtHandler::*wxWebViewBeforeLoadEventFunction)(wxWebViewBeforeLoadEvent&);
-typedef void (wxEvtHandler::*wxWebViewNewWindowEventFunction)(wxWebViewNewWindowEvent&);
-typedef void (wxEvtHandler::*wxWebViewRightClickEventFunction)(wxWebViewRightClickEvent&);
-typedef void (wxEvtHandler::*wxWebViewConsoleMessageEventFunction)(wxWebViewConsoleMessageEvent&);
-typedef void (wxEvtHandler::*wxWebViewAlertEventFunction)(wxWebViewAlertEvent&);
-typedef void (wxEvtHandler::*wxWebViewConfirmEventFunction)(wxWebViewConfirmEvent&);
-typedef void (wxEvtHandler::*wxWebViewPromptEventFunction)(wxWebViewPromptEvent&);
-typedef void (wxEvtHandler::*wxWebViewReceivedTitleEventFunction)(wxWebViewReceivedTitleEvent&);
-typedef void (wxEvtHandler::*wxWebViewWindowObjectClearedFunction)(wxWebViewWindowObjectClearedEvent&);
-typedef void (wxEvtHandler::*wxWebViewContentsChangedFunction)(wxWebViewContentsChangedEvent&);
-typedef void (wxEvtHandler::*wxWebViewSelectionChangedFunction)(wxWebViewSelectionChangedEvent&);
-typedef void (wxEvtHandler::*wxWebViewPrintFrameFunction)(wxWebViewPrintFrameEvent&);
-
-#define wxWebViewLoadEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewLoadEventFunction, &func)
-#define wxWebViewBeforeLoadEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewBeforeLoadEventFunction, &func)
-#define wxWebViewNewWindowEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewNewWindowEventFunction, &func)
-#define wxWebViewRightClickEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewRightClickEventFunction, &func)
-#define wxWebViewConsoleMessageEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewConsoleMessageEventFunction, &func)
-#define wxWebViewAlertEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewAlertEventFunction, &func)
-#define wxWebViewConfirmEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewConfirmEventFunction, &func)
-#define wxWebViewPromptEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewPromptEventFunction, &func)
-#define wxWebViewReceivedTitleEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewReceivedTitleEventFunction, &func)
-#define wxWebViewWindowObjectClearedEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewWindowObjectClearedFunction, &func)
-#define wxWebViewContentsChangedEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewContentsChangedEventFunction, &func)
-#define wxWebViewSelectionChangedEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewSelectionChangedEventFunction, &func)
-#define wxWebViewPrintFrameEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewPrintFrameEventFunction, &func)
+typedef void (wxEvtHandler::*WebViewLoadEventFunction)(WebViewLoadEvent&);
+typedef void (wxEvtHandler::*WebViewBeforeLoadEventFunction)(WebViewBeforeLoadEvent&);
+typedef void (wxEvtHandler::*WebViewNewWindowEventFunction)(WebViewNewWindowEvent&);
+typedef void (wxEvtHandler::*WebViewRightClickEventFunction)(WebViewRightClickEvent&);
+typedef void (wxEvtHandler::*WebViewConsoleMessageEventFunction)(WebViewConsoleMessageEvent&);
+typedef void (wxEvtHandler::*WebViewAlertEventFunction)(WebViewAlertEvent&);
+typedef void (wxEvtHandler::*WebViewConfirmEventFunction)(WebViewConfirmEvent&);
+typedef void (wxEvtHandler::*WebViewPromptEventFunction)(WebViewPromptEvent&);
+typedef void (wxEvtHandler::*WebViewReceivedTitleEventFunction)(WebViewReceivedTitleEvent&);
+typedef void (wxEvtHandler::*WebViewWindowObjectClearedFunction)(WebViewWindowObjectClearedEvent&);
+typedef void (wxEvtHandler::*WebViewContentsChangedFunction)(WebViewContentsChangedEvent&);
+typedef void (wxEvtHandler::*WebViewSelectionChangedFunction)(WebViewSelectionChangedEvent&);
+typedef void (wxEvtHandler::*WebViewPrintFrameFunction)(WebViewPrintFrameEvent&);
+
+#define WebViewLoadEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(WebViewLoadEventFunction, &func)
+#define WebViewBeforeLoadEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(WebViewBeforeLoadEventFunction, &func)
+#define WebViewNewWindowEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(WebViewNewWindowEventFunction, &func)
+#define WebViewRightClickEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(WebViewRightClickEventFunction, &func)
+#define WebViewConsoleMessageEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(WebViewConsoleMessageEventFunction, &func)
+#define WebViewAlertEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(WebViewAlertEventFunction, &func)
+#define WebViewConfirmEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(WebViewConfirmEventFunction, &func)
+#define WebViewPromptEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(WebViewPromptEventFunction, &func)
+#define WebViewReceivedTitleEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(WebViewReceivedTitleEventFunction, &func)
+#define WebViewWindowObjectClearedEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(WebViewWindowObjectClearedFunction, &func)
+#define WebViewContentsChangedEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(WebViewContentsChangedEventFunction, &func)
+#define WebViewSelectionChangedEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(WebViewSelectionChangedEventFunction, &func)
+#define WebViewPrintFrameEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(WebViewPrintFrameEventFunction, &func)
#ifndef SWIG
BEGIN_DECLARE_EVENT_TYPES()
@@ -643,87 +646,87 @@ END_DECLARE_EVENT_TYPES()
winid, \
wxID_ANY, \
(wxObjectEventFunction) \
- (wxWebViewLoadEventFunction) & func, \
- static_cast<wxObject*>(NULL)),
+ (WebViewLoadEventFunction) & func, \
+ static_cast<wxObject*>(0)),
#define EVT_WEBVIEW_BEFORE_LOAD(winid, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBVIEW_BEFORE_LOAD, \
winid, \
wxID_ANY, \
(wxObjectEventFunction) \
- (wxWebViewBeforeLoadEventFunction) & func, \
- static_cast<wxObject*>(NULL)),
+ (WebViewBeforeLoadEventFunction) & func, \
+ static_cast<wxObject*>(0)),
#define EVT_WEBVIEW_NEW_WINDOW(winid, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBVIEW_NEW_WINDOW, \
winid, \
wxID_ANY, \
(wxObjectEventFunction) \
- (wxWebViewNewWindowEventFunction) & func, \
- static_cast<wxObject*>(NULL)),
+ (WebViewNewWindowEventFunction) & func, \
+ static_cast<wxObject*>(0)),
#define EVT_WEBVIEW_RIGHT_CLICK(winid, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBVIEW_RIGHT_CLICK, \
winid, \
wxID_ANY, \
(wxObjectEventFunction) \
- (wxWebViewRightClickEventFunction) & func, \
- static_cast<wxObject*>(NULL)),
+ (WebViewRightClickEventFunction) & func, \
+ static_cast<wxObject*>(0)),
#define EVT_WEBVIEW_CONSOLE_MESSAGE(winid, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBVIEW_CONSOLE_MESSAGE, \
winid, \
wxID_ANY, \
(wxObjectEventFunction) \
- (wxWebViewConsoleMessageEventFunction) & func, \
- static_cast<wxObject*>(NULL)),
+ (WebViewConsoleMessageEventFunction) & func, \
+ static_cast<wxObject*>(0)),
#define EVT_WEBVIEW_JS_ALERT(winid, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBVIEW_JS_ALERT, \
winid, \
wxID_ANY, \
(wxObjectEventFunction) \
- (wxWebViewAlertEventFunction) & func, \
- static_cast<wxObject*>(NULL)),
+ (WebViewAlertEventFunction) & func, \
+ static_cast<wxObject*>(0)),
#define EVT_WEBVIEW_JS_CONFIRM(winid, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBVIEW_JS_CONFIRM, \
winid, \
wxID_ANY, \
(wxObjectEventFunction) \
- (wxWebViewConfirmEventFunction) & func, \
- static_cast<wxObject*>(NULL)),
+ (WebViewConfirmEventFunction) & func, \
+ static_cast<wxObject*>(0)),
#define EVT_WEBVIEW_JS_PROMPT(winid, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBVIEW_JS_PROMPT, \
winid, \
wxID_ANY, \
(wxObjectEventFunction) \
- (wxWebViewPromptEventFunction) & func, \
- static_cast<wxObject*>(NULL)),
+ (WebViewPromptEventFunction) & func, \
+ static_cast<wxObject*>(0)),
#define EVT_WEBVIEW_RECEIVED_TITLE(winid, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBVIEW_RECEIVED_TITLE, \
winid, \
wxID_ANY, \
(wxObjectEventFunction) \
- (wxWebViewReceivedTitleEventFunction) & func, \
- static_cast<wxObject*>(NULL)),
+ (WebViewReceivedTitleEventFunction) & func, \
+ static_cast<wxObject*>(0)),
#define EVT_WEBVIEW_WINDOW_OBJECT_CLEARED(winid, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBVIEW_WINDOW_OBJECT_CLEARED, \
winid, \
wxID_ANY, \
(wxObjectEventFunction) \
- (wxWebViewWindowObjectClearedFunction) & func, \
- static_cast<wxObject*>(NULL)),
+ (WebViewWindowObjectClearedFunction) & func, \
+ static_cast<wxObject*>(0)),
#define EVT_WEBVIEW_CONTENTS_CHANGED(winid, func) \
DECLARE_EVENT_TABLE_ENTRY(wxEVT_WEBVIEW_CONTENTS_CHANGED, \
winid, \
wxID_ANY, \
(wxObjectEventFunction) \
- (wxWebViewContentsChangedEventFunction) & func, \
+ (WebViewContentsChangedEventFunction) & func, \
static_cast<wxObject*>(0)),
#define EVT_WEBVIEW_SELECTION_CHANGED(winid, func) \
@@ -731,7 +734,7 @@ END_DECLARE_EVENT_TYPES()
winid, \
wxID_ANY, \
(wxObjectEventFunction) \
- (wxWebViewSelectionChangedEventFunction) & func, \
+ (WebViewSelectionChangedEventFunction) & func, \
static_cast<wxObject*>(0)),
#define EVT_WEBVIEW_PRINT_FRAME(winid, func) \
@@ -739,7 +742,9 @@ END_DECLARE_EVENT_TYPES()
winid, \
wxID_ANY, \
(wxObjectEventFunction) \
- (wxWebViewPrintFrameEventFunction) & func, \
+ (WebViewPrintFrameEventFunction) & func, \
static_cast<wxObject*>(0)),
-#endif // ifndef WXWEBVIEW_H
+} // namespace WebKit
+
+#endif // ifndef WebView_h
diff --git a/Source/WebKit/wx/bindings/python/webview.i b/Source/WebKit/wx/bindings/python/webview.i
index 4388f5dd8..c7e57aba4 100644
--- a/Source/WebKit/wx/bindings/python/webview.i
+++ b/Source/WebKit/wx/bindings/python/webview.i
@@ -51,6 +51,10 @@
#include "WebDOMRange.h"
#include "WebDOMWebKitAnimationList.h"
+using namespace WebKit;
+
+static const wxString wxPyWebViewNameStr(WebViewNameStr);
+
#ifndef __WXMSW__
PyObject* createDOMNodeSubtype(WebDOMNode* ptr, bool setThisOwn, bool isValueObject)
{
@@ -136,11 +140,9 @@ WebDOMString* createWebDOMString(PyObject* source)
%typemap(out) WebDOMString& { $result = PyUnicode_DecodeUTF8($1.utf8().data(), $1.utf8().length(), NULL); }
#endif
-MAKE_CONST_WXSTRING(WebViewNameStr);
-
-MustHaveApp(wxWebBrowserShell);
-MustHaveApp(wxWebFrame);
-MustHaveApp(wxWebView);
+MustHaveApp(WebBrowserShell);
+MustHaveApp(WebFrame);
+MustHaveApp(WebView);
%include WebKitDefines.h
@@ -162,7 +164,7 @@ MustHaveApp(wxWebView);
%include WebSettings.h
%include WebView.h
-%extend wxWebFrame {
+%extend WebKit::WebFrame {
%pythoncode {
def __eq__(self, other):
return self.this == other.this
diff --git a/Source/WebKit/wx/wscript b/Source/WebKit/wx/wscript
index f91a69cab..cc1845257 100644
--- a/Source/WebKit/wx/wscript
+++ b/Source/WebKit/wx/wscript
@@ -68,21 +68,18 @@ def configure(conf):
def pre_build(bld):
"""
- The wxWebKit library should be rebuilt if jscore or webcore changes,
- so we make those static libs as dependencies.
+ The wxWebKit library should be rebuilt if the webcore static
+ library changes, so we mark it as a dependency.
"""
ext = '.a'
if sys.platform.startswith('win'):
ext = '.lib'
- libjscore = os.path.join(output_dir, 'libjscore%s' % ext)
libwebcore = os.path.join(output_dir, 'libwebcore%s' % ext)
- assert os.path.exists(libjscore)
assert os.path.exists(libwebcore)
- bld.env.CXXDEPS_JSCORE = Utils.h_file(libjscore)
bld.env.CXXDEPS_WEBCORE = Utils.h_file(libwebcore)
def build(bld):