summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-18 10:55:06 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-18 10:55:06 +0200
commitee4c86d1990a9e26277a6948e7027ad8d525ebfa (patch)
tree1e2d3408cd097606571f40ab63353c27bcb7dd5c
parentd882bec96d0d30aeeda2141bfadfca7f038ee862 (diff)
downloadqtwebkit-ee4c86d1990a9e26277a6948e7027ad8d525ebfa.tar.gz
Imported WebKit commit 795dcd25a9649fccaf1c9b685f6e2ffedaf7e620 (http://svn.webkit.org/repository/webkit/trunk@131718)
New snapshot that includes the return of -fkeep-memory at link time to reduce memory pressure as well as modularized documentation
-rw-r--r--ChangeLog23
-rw-r--r--Source/JavaScriptCore/ChangeLog628
-rw-r--r--Source/JavaScriptCore/bytecode/CodeBlock.cpp11
-rw-r--r--Source/JavaScriptCore/bytecode/Opcode.h1
-rw-r--r--Source/JavaScriptCore/bytecode/ResolveOperation.h178
-rw-r--r--Source/JavaScriptCore/bytecode/SpecialPointer.h2
-rw-r--r--Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp97
-rw-r--r--Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h20
-rw-r--r--Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp36
-rw-r--r--Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp6
-rw-r--r--Source/JavaScriptCore/dfg/DFGCapabilities.h1
-rw-r--r--Source/JavaScriptCore/dfg/DFGGraph.cpp4
-rw-r--r--Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp19
-rw-r--r--Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp18
-rw-r--r--Source/JavaScriptCore/heap/BlockAllocator.cpp28
-rw-r--r--Source/JavaScriptCore/heap/HeapStatistics.cpp6
-rw-r--r--Source/JavaScriptCore/heap/HeapStatistics.h1
-rw-r--r--Source/JavaScriptCore/jit/JIT.cpp1
-rw-r--r--Source/JavaScriptCore/jit/JIT.h1
-rw-r--r--Source/JavaScriptCore/jit/JITOpcodes.cpp11
-rw-r--r--Source/JavaScriptCore/jit/JITPropertyAccess.cpp2
-rw-r--r--Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp2
-rw-r--r--Source/JavaScriptCore/jit/JITStubs.cpp8
-rw-r--r--Source/JavaScriptCore/jit/JITStubs.h1
-rw-r--r--Source/JavaScriptCore/llint/LLIntSlowPaths.cpp7
-rw-r--r--Source/JavaScriptCore/llint/LLIntSlowPaths.h1
-rw-r--r--Source/JavaScriptCore/llint/LowLevelInterpreter.asm6
-rw-r--r--Source/JavaScriptCore/runtime/ArrayConstructor.cpp19
-rw-r--r--Source/JavaScriptCore/runtime/ArrayConstructor.h3
-rw-r--r--Source/JavaScriptCore/runtime/CommonIdentifiers.h2
-rw-r--r--Source/JavaScriptCore/runtime/JSGlobalObject.cpp6
-rw-r--r--Source/JavaScriptCore/runtime/StringPrototype.cpp20
-rw-r--r--Source/JavaScriptCore/yarr/YarrPattern.cpp4
-rw-r--r--Source/Platform/ChangeLog9
-rw-r--r--Source/Platform/chromium/public/WebContentLayer.h1
-rw-r--r--Source/QtWebKit.pro2
-rw-r--r--Source/WTF/ChangeLog73
-rw-r--r--Source/WTF/WTF.xcodeproj/project.pbxproj46
-rw-r--r--Source/WTF/wtf/Deque.h2
-rw-r--r--Source/WTF/wtf/StreamBuffer.h2
-rw-r--r--Source/WTF/wtf/Vector.h42
-rw-r--r--Source/WTF/wtf/text/AtomicString.cpp21
-rw-r--r--Source/WTF/wtf/text/StringImpl.cpp86
-rw-r--r--Source/WTF/wtf/text/StringImpl.h2
-rw-r--r--Source/WebCore/CMakeLists.txt8
-rw-r--r--Source/WebCore/ChangeLog1035
-rw-r--r--Source/WebCore/GNUmakefile.list.am14
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBCallbacks.h6
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBCursor.cpp6
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBCursor.h2
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBCursor.idl3
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp6
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h2
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp2
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBFactory.cpp16
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBFactory.h2
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBFactory.idl3
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBIndex.cpp1
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBIndexBackendImpl.cpp10
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp17
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp1
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp15
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp21
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h1
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBRequest.cpp11
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBRequest.h2
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBTransaction.cpp1
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp1
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h1
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBTransactionBackendInterface.h1
-rw-r--r--Source/WebCore/PlatformBlackBerry.cmake1
-rw-r--r--Source/WebCore/PlatformEfl.cmake3
-rw-r--r--Source/WebCore/Target.pri3
-rw-r--r--Source/WebCore/WebCore.exp.in4
-rw-r--r--Source/WebCore/WebCore.gypi14
-rwxr-xr-xSource/WebCore/WebCore.vcproj/WebCore.vcproj16
-rw-r--r--Source/WebCore/WebCore.xcodeproj/project.pbxproj122
-rw-r--r--Source/WebCore/bindings/scripts/CodeGeneratorV8.pm6
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8Float64Array.h1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.h1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.h1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.h1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.h1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestException.h1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestInterface.h1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.h1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.h1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestNode.h1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestObj.h1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h1
-rw-r--r--Source/WebCore/bindings/v8/DOMWrapperWorld.cpp31
-rw-r--r--Source/WebCore/bindings/v8/DOMWrapperWorld.h11
-rw-r--r--Source/WebCore/bindings/v8/IDBBindingUtilities.cpp5
-rw-r--r--Source/WebCore/bindings/v8/ScriptController.cpp21
-rw-r--r--Source/WebCore/bindings/v8/ScriptController.h11
-rw-r--r--Source/WebCore/bindings/v8/V8DOMWindowShell.cpp18
-rw-r--r--Source/WebCore/bindings/v8/V8DOMWindowShell.h10
-rw-r--r--Source/WebCore/bindings/v8/V8StringResource.cpp10
-rw-r--r--Source/WebCore/bindings/v8/V8ValueCache.h4
-rw-r--r--Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp2
-rw-r--r--Source/WebCore/css/StyleBuilder.cpp1
-rw-r--r--Source/WebCore/css/StyleResolver.cpp4
-rw-r--r--Source/WebCore/dom/ContainerNodeAlgorithms.cpp12
-rw-r--r--Source/WebCore/dom/Document.cpp14
-rw-r--r--Source/WebCore/dom/EventTarget.cpp29
-rw-r--r--Source/WebCore/dom/EventTarget.h4
-rw-r--r--Source/WebCore/html/HTMLPlugInElement.cpp6
-rw-r--r--Source/WebCore/html/HTMLPlugInElement.h2
-rw-r--r--Source/WebCore/html/shadow/ContentDistributor.cpp3
-rw-r--r--Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp2
-rw-r--r--Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp2
-rw-r--r--Source/WebCore/html/shadow/HTMLContentElement.cpp3
-rw-r--r--Source/WebCore/html/shadow/HTMLContentElement.idl1
-rw-r--r--Source/WebCore/html/shadow/InsertionPoint.cpp6
-rw-r--r--Source/WebCore/html/shadow/InsertionPoint.h2
-rw-r--r--Source/WebCore/html/shadow/SliderThumbElement.cpp8
-rw-r--r--Source/WebCore/inspector/InspectorIndexedDBAgent.cpp2
-rw-r--r--Source/WebCore/inspector/front-end/ObjectPropertiesSection.js8
-rw-r--r--Source/WebCore/inspector/front-end/ResourceScriptMapping.js19
-rw-r--r--Source/WebCore/inspector/front-end/UISourceCode.js3
-rw-r--r--Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js13
-rw-r--r--Source/WebCore/loader/FrameLoader.cpp46
-rw-r--r--Source/WebCore/loader/FrameLoader.h11
-rw-r--r--Source/WebCore/loader/ImageLoader.cpp23
-rw-r--r--Source/WebCore/loader/ImageLoader.h2
-rw-r--r--Source/WebCore/loader/MainResourceLoader.cpp2
-rw-r--r--Source/WebCore/loader/MixedContentChecker.cpp108
-rw-r--r--Source/WebCore/loader/MixedContentChecker.h64
-rw-r--r--Source/WebCore/loader/SubframeLoader.cpp4
-rw-r--r--Source/WebCore/loader/SubresourceLoader.cpp37
-rw-r--r--Source/WebCore/loader/cache/CachedRawResource.cpp38
-rwxr-xr-xSource/WebCore/loader/cache/CachedResource.cpp65
-rw-r--r--Source/WebCore/loader/cache/CachedResource.h4
-rw-r--r--Source/WebCore/loader/cache/CachedResourceLoader.cpp4
-rw-r--r--Source/WebCore/loader/icon/IconController.cpp2
-rw-r--r--Source/WebCore/page/DragController.cpp7
-rw-r--r--Source/WebCore/page/Performance.cpp38
-rw-r--r--Source/WebCore/page/Performance.h16
-rw-r--r--Source/WebCore/page/Performance.idl13
-rw-r--r--Source/WebCore/page/PerformanceMark.h50
-rw-r--r--Source/WebCore/page/PerformanceMark.idl33
-rw-r--r--Source/WebCore/page/PerformanceMeasure.h50
-rw-r--r--Source/WebCore/page/PerformanceMeasure.idl33
-rw-r--r--Source/WebCore/page/PerformanceUserTiming.cpp167
-rw-r--r--Source/WebCore/page/PerformanceUserTiming.h73
-rw-r--r--Source/WebCore/platform/graphics/GraphicsLayerClient.h10
-rw-r--r--Source/WebCore/platform/graphics/GraphicsLayerUpdater.cpp81
-rw-r--r--Source/WebCore/platform/graphics/GraphicsLayerUpdater.h67
-rw-r--r--Source/WebCore/platform/graphics/SimpleFontData.h2
-rw-r--r--Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp10
-rw-r--r--Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp3
-rw-r--r--Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp4
-rw-r--r--Source/WebCore/platform/graphics/mac/ComplexTextController.cpp16
-rw-r--r--Source/WebCore/platform/graphics/mac/ComplexTextController.h2
-rw-r--r--Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm2
-rw-r--r--Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp7
-rw-r--r--Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp2
-rw-r--r--Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp3
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapper.h4
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp4
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp5
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h10
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp4
-rw-r--r--Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp5
-rw-r--r--Source/WebCore/platform/text/mac/StringMac.mm14
-rw-r--r--Source/WebCore/plugins/PluginViewBase.h1
-rw-r--r--Source/WebCore/rendering/RenderLayer.cpp25
-rw-r--r--Source/WebCore/rendering/RenderLayer.h2
-rw-r--r--Source/WebCore/rendering/RenderLayerBacking.cpp17
-rw-r--r--Source/WebCore/rendering/RenderLayerBacking.h20
-rw-r--r--Source/WebCore/rendering/RenderLayerCompositor.cpp83
-rw-r--r--Source/WebCore/rendering/RenderLayerCompositor.h32
-rw-r--r--Source/WebCore/rendering/RenderObjectChildList.cpp59
-rw-r--r--Source/WebCore/rendering/RenderTableCell.cpp97
-rw-r--r--Source/WebCore/rendering/style/ContentData.cpp46
-rw-r--r--Source/WebCore/rendering/style/ContentData.h27
-rw-r--r--Source/WebCore/rendering/style/RenderStyleConstants.h4
-rw-r--r--Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp14
-rw-r--r--Source/WebCore/svg/SVGAnimatedTypeAnimator.h11
-rw-r--r--Source/WebCore/testing/Internals.cpp10
-rw-r--r--Source/WebCore/testing/Internals.h1
-rw-r--r--Source/WebCore/testing/Internals.idl1
-rw-r--r--Source/WebKit/ChangeLog11
-rw-r--r--Source/WebKit/PlatformEfl.cmake1
-rw-r--r--Source/WebKit/blackberry/ChangeLog16
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp2
-rw-r--r--Source/WebKit/chromium/ChangeLog93
-rw-r--r--Source/WebKit/chromium/DEPS2
-rw-r--r--Source/WebKit/chromium/WebKitUnitTests.gyp1
-rw-r--r--Source/WebKit/chromium/public/WebDraggableRegion.h3
-rw-r--r--Source/WebKit/chromium/public/WebIDBTransactionCallbacks.h2
-rw-r--r--Source/WebKit/chromium/public/WebPlugin.h2
-rw-r--r--Source/WebKit/chromium/src/IDBCallbacksProxy.cpp10
-rw-r--r--Source/WebKit/chromium/src/IDBCallbacksProxy.h2
-rw-r--r--Source/WebKit/chromium/src/WebFrameImpl.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp10
-rw-r--r--Source/WebKit/chromium/src/WebIDBCallbacksImpl.h2
-rw-r--r--Source/WebKit/chromium/src/WebPluginContainerImpl.cpp8
-rw-r--r--Source/WebKit/chromium/src/WebPluginContainerImpl.h1
-rw-r--r--Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp2
-rw-r--r--Source/WebKit/chromium/tests/IDBDatabaseBackendTest.cpp2
-rw-r--r--Source/WebKit/efl/ChangeLog30
-rw-r--r--Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp4
-rw-r--r--Source/WebKit/efl/ewk/ewk_frame.cpp3
-rw-r--r--Source/WebKit/efl/tests/test_ewk_frame.cpp64
-rw-r--r--Source/WebKit/mac/ChangeLog12
-rw-r--r--Source/WebKit/mac/WebView/WebDataSource.mm2
-rw-r--r--Source/WebKit/qt/ChangeLog22
-rw-r--r--Source/WebKit/qt/docs/docs.pri7
-rw-r--r--Source/WebKit/qt/docs/qtwebkit.qdocconf193
-rw-r--r--Source/WebKit2/CMakeLists.txt2
-rw-r--r--Source/WebKit2/ChangeLog766
-rw-r--r--Source/WebKit2/GNUmakefile.list.am8
-rw-r--r--Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.cpp8
-rw-r--r--Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.h14
-rw-r--r--Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.cpp8
-rw-r--r--Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.h8
-rw-r--r--Source/WebKit2/Platform/CoreIPC/Connection.cpp71
-rw-r--r--Source/WebKit2/Platform/CoreIPC/Connection.h67
-rw-r--r--Source/WebKit2/Platform/CoreIPC/MessageDecoder.cpp64
-rw-r--r--Source/WebKit2/Platform/CoreIPC/MessageDecoder.h47
-rw-r--r--Source/WebKit2/Platform/CoreIPC/MessageEncoder.cpp49
-rw-r--r--Source/WebKit2/Platform/CoreIPC/MessageEncoder.h46
-rw-r--r--Source/WebKit2/Platform/CoreIPC/MessageSender.h10
-rw-r--r--Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp51
-rw-r--r--Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp30
-rw-r--r--Source/WebKit2/Platform/CoreIPC/win/ConnectionWin.cpp25
-rw-r--r--Source/WebKit2/PlatformEfl.cmake1
-rw-r--r--Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in2
-rw-r--r--Source/WebKit2/Scripts/webkit2/messages.py5
-rw-r--r--Source/WebKit2/Scripts/webkit2/messages_unittest.py30
-rw-r--r--Source/WebKit2/Shared/WebConnection.cpp8
-rw-r--r--Source/WebKit2/Shared/WebConnection.h2
-rw-r--r--Source/WebKit2/Target.pri4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/VibrationProvider.cpp6
-rw-r--r--Source/WebKit2/UIProcess/API/efl/VibrationProvider.h2
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item_private.h12
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_private.h10
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_context.cpp31
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_context.h12
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_context_download_client.cpp3
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_context_download_client_private.h2
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_context_history_client_private.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_context_private.h6
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_context_request_manager_client_private.h2
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager.cpp4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager.h20
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager_private.h13
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_download_job.cpp4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_download_job.h10
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_download_job_private.h21
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_error.cpp2
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_error.h2
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_error_private.h10
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.cpp2
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_favicon_database_private.h8
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request_private.h12
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_intent.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_intent_private.h12
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_intent_service.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_intent_service_private.h12
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_navigation_data.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_navigation_data_private.h12
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision_private.h14
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item.cpp2
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item_private.h10
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_resource.h2
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_resource_private.h10
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_settings.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_settings_private.h9
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_text_checker_private.h3
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_touch.h6
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_url_request.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_url_request_private.h12
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_url_response.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_url_response_private.h12
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.h2
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request_private.h2
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_view.cpp57
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_view.h38
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_view_private.h18
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardList.cpp66
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListItem.cpp45
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListPrivate.h11
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitContextMenu.cpp11
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.cpp7
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItemPrivate.h4
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuPrivate.h4
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitCookieManager.cpp44
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitCookieManagerPrivate.h4
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitDownload.cpp15
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitDownloadPrivate.h4
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp13
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h4
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationProvider.cpp21
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationProvider.h8
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp2
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.cpp2
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp2
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp29
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h5
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp8
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitWebInspector.cpp30
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitWebInspectorPrivate.h4
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp8
-rw-r--r--Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm70
-rw-r--r--Source/WebKit2/UIProcess/API/mac/WKView.mm447
-rw-r--r--Source/WebKit2/UIProcess/API/mac/WKViewInternal.h97
-rw-r--r--Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h6
-rw-r--r--Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp2
-rw-r--r--Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp2
-rw-r--r--Source/WebKit2/UIProcess/DrawingAreaProxy.cpp2
-rw-r--r--Source/WebKit2/UIProcess/DrawingAreaProxy.h18
-rw-r--r--Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp9
-rw-r--r--Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h1
-rw-r--r--Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm9
-rw-r--r--Source/WebKit2/UIProcess/Plugins/qt/PluginProcessProxyQt.cpp4
-rw-r--r--Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp4
-rw-r--r--Source/WebKit2/UIProcess/WebContext.cpp4
-rw-r--r--Source/WebKit2/UIProcess/WebProcessProxy.cpp6
-rw-r--r--Source/WebKit2/UIProcess/WebProcessProxy.h14
-rw-r--r--Source/WebKit2/UIProcess/mac/CorrectionPanel.mm6
-rw-r--r--Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm8
-rw-r--r--Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm16
-rw-r--r--Source/WebKit2/WebKit2.xcodeproj/project.pbxproj18
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.h1
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.mm7
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMText.h2
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMText.mm7
-rw-r--r--Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp2
-rw-r--r--Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.cpp2
-rw-r--r--Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp4
-rw-r--r--Source/WebKit2/WebProcess/WebPage/DecoderAdapter.cpp37
-rw-r--r--Source/WebKit2/WebProcess/WebPage/DecoderAdapter.h2
-rw-r--r--Source/WebKit2/WebProcess/WebPage/EncoderAdapter.cpp5
-rw-r--r--Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h4
-rw-r--r--Source/WebKit2/WebProcess/WebProcess.cpp6
-rwxr-xr-xSource/WebKit2/win/WebKit2.vcproj16
-rw-r--r--Source/api.pri2
-rw-r--r--Source/qtwebkit.qdocconf13
-rw-r--r--Tools/ChangeLog191
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp31
-rw-r--r--Tools/DumpRenderTree/chromium/DRTTestRunner.cpp9
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/GamepadController.cpp8
-rw-r--r--Tools/DumpRenderTree/chromium/TestWebPlugin.cpp4
-rw-r--r--Tools/DumpRenderTree/chromium/TestWebPlugin.h2
-rw-r--r--Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp115
-rw-r--r--Tools/DumpRenderTree/mac/DumpRenderTree.mm1
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py22
-rw-r--r--Tools/Scripts/webkitpy/common/config/committers.py3
-rwxr-xr-xTools/Scripts/webkitpy/common/config/watchlist9
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py1
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py2
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py4
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/port/chromium_win.py3
-rw-r--r--Tools/TestResultServer/static-dashboards/flakiness_dashboard.js12
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp1
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/Vector.cpp25
-rw-r--r--Tools/qmake/mkspecs/features/default_post.prf25
-rw-r--r--Tools/qmake/mkspecs/features/unix/default_post.prf2
366 files changed, 6681 insertions, 1997 deletions
diff --git a/ChangeLog b/ChangeLog
index dd8dc3870..d94b35006 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2012-10-17 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
+
+ [Qt] Modularize documentation for QtWebKit
+
+ Running 'make docs' would fail unless 'make qmake_all' was ran first,
+ but qmake_all involved generating all the derived sources, which seems
+ overly complex just for building documentation.
+
+ We solve this by preventing all subdirs except QtWebKit from having a
+ docs target. This would normally work fine on its own, but since we
+ use CONFIG += ordered, there's now a missing doc target for the
+ immediate dependency of the QtWebKit subdir. We solve this by adding
+ a dummy-target ourselves.
+
+ Finally, we clean up the qdocconf file to match the rest of the Qt
+ documentation modularization efforts.
+
+ Reviewed by Simon Hausmann.
+
+ * Source/QtWebKit.pro:
+ * Source/api.pri:
+ * Source/qtwebkit.qdocconf: Added.
+
2012-10-17 Grzegorz Czajkowski <g.czajkowski@samsung.com>, Michal Roj <m.roj@sasmung.com>
[WK2][EFL] Implementation of spellchecking feature.
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index 69429a65d..3574aa0d8 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,631 @@
+2012-10-17 Zoltan Horvath <zoltan@webkit.org>
+
+ Remove the JSHeap memory measurement of the PageLoad performacetests since it creates bogus JSGlobalDatas
+ https://bugs.webkit.org/show_bug.cgi?id=99609
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove the implementation since it creates bogus JSGlobalDatas in the layout tests.
+
+ * heap/HeapStatistics.cpp:
+ (JSC):
+ * heap/HeapStatistics.h:
+ (HeapStatistics):
+
+2012-10-17 Sam Weinig <sam@webkit.org>
+
+ Attempt to fix the build.
+
+ * bytecode/GlobalResolveInfo.h: Copied from bytecode/GlobalResolveInfo.h.
+
+2012-10-17 Oliver Hunt <oliver@apple.com>
+
+ Roll out r131645 as it causes random site crashes.
+
+ * GNUmakefile.list.am:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * bytecode/CodeBlock.cpp:
+ (JSC):
+ (JSC::isGlobalResolve):
+ (JSC::instructionOffsetForNth):
+ (JSC::printGlobalResolveInfo):
+ (JSC::CodeBlock::printStructures):
+ (JSC::CodeBlock::dump):
+ (JSC::CodeBlock::CodeBlock):
+ (JSC::CodeBlock::visitStructures):
+ (JSC::CodeBlock::finalizeUnconditionally):
+ (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
+ (JSC::CodeBlock::globalResolveInfoForBytecodeOffset):
+ (JSC::CodeBlock::shrinkToFit):
+ * bytecode/CodeBlock.h:
+ (CodeBlock):
+ (JSC::CodeBlock::addGlobalResolveInstruction):
+ (JSC::CodeBlock::addGlobalResolveInfo):
+ (JSC::CodeBlock::globalResolveInfo):
+ (JSC::CodeBlock::numberOfGlobalResolveInfos):
+ (JSC::CodeBlock::globalResolveInfoCount):
+ * bytecode/Opcode.h:
+ (JSC):
+ (JSC::padOpcodeName):
+ * bytecode/ResolveGlobalStatus.cpp:
+ (JSC):
+ (JSC::computeForStructure):
+ (JSC::computeForLLInt):
+ (JSC::ResolveGlobalStatus::computeFor):
+ * bytecode/ResolveGlobalStatus.h:
+ (JSC):
+ (ResolveGlobalStatus):
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::ResolveResult::checkValidity):
+ (JSC::ResolveResult::registerPointer):
+ (JSC):
+ (JSC::BytecodeGenerator::BytecodeGenerator):
+ (JSC::BytecodeGenerator::resolve):
+ (JSC::BytecodeGenerator::resolveConstDecl):
+ (JSC::BytecodeGenerator::shouldAvoidResolveGlobal):
+ (JSC::BytecodeGenerator::emitResolve):
+ (JSC::BytecodeGenerator::emitResolveBase):
+ (JSC::BytecodeGenerator::emitResolveBaseForPut):
+ (JSC::BytecodeGenerator::emitResolveWithBase):
+ (JSC::BytecodeGenerator::emitResolveWithThis):
+ (JSC::BytecodeGenerator::emitGetStaticVar):
+ (JSC::BytecodeGenerator::emitInitGlobalConst):
+ (JSC::BytecodeGenerator::emitPutStaticVar):
+ * bytecompiler/BytecodeGenerator.h:
+ (JSC::ResolveResult::registerResolve):
+ (JSC::ResolveResult::dynamicResolve):
+ (JSC::ResolveResult::lexicalResolve):
+ (JSC::ResolveResult::indexedGlobalResolve):
+ (JSC::ResolveResult::dynamicIndexedGlobalResolve):
+ (JSC::ResolveResult::globalResolve):
+ (JSC::ResolveResult::dynamicGlobalResolve):
+ (JSC::ResolveResult::type):
+ (JSC::ResolveResult::index):
+ (JSC::ResolveResult::depth):
+ (JSC::ResolveResult::globalObject):
+ (ResolveResult):
+ (JSC::ResolveResult::isStatic):
+ (JSC::ResolveResult::isIndexed):
+ (JSC::ResolveResult::isScoped):
+ (JSC::ResolveResult::isGlobal):
+ (JSC::ResolveResult::ResolveResult):
+ (BytecodeGenerator):
+ * bytecompiler/NodesCodegen.cpp:
+ (JSC::ResolveNode::isPure):
+ (JSC::FunctionCallResolveNode::emitBytecode):
+ (JSC::PostfixNode::emitResolve):
+ (JSC::PrefixNode::emitResolve):
+ (JSC::ReadModifyResolveNode::emitBytecode):
+ (JSC::AssignResolveNode::emitBytecode):
+ (JSC::ConstDeclNode::emitCodeSingle):
+ (JSC::ForInNode::emitBytecode):
+ * dfg/DFGAbstractState.cpp:
+ (JSC::DFG::AbstractState::execute):
+ * dfg/DFGByteCodeParser.cpp:
+ (ByteCodeParser):
+ (InlineStackEntry):
+ (JSC::DFG::ByteCodeParser::handleGetByOffset):
+ (JSC::DFG::ByteCodeParser::parseBlock):
+ (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
+ * dfg/DFGCapabilities.h:
+ (DFG):
+ (JSC::DFG::canCompileOpcode):
+ (JSC::DFG::canInlineOpcode):
+ * dfg/DFGGraph.h:
+ (ResolveGlobalData):
+ (DFG):
+ (Graph):
+ * dfg/DFGNode.h:
+ (JSC::DFG::Node::hasIdentifier):
+ * dfg/DFGNodeType.h:
+ (DFG):
+ * dfg/DFGOSRExit.cpp:
+ (JSC::DFG::OSRExit::OSRExit):
+ * dfg/DFGOSRExit.h:
+ (OSRExit):
+ * dfg/DFGOSRExitCompiler.cpp:
+ * dfg/DFGOSRExitCompiler32_64.cpp:
+ (JSC::DFG::OSRExitCompiler::compileExit):
+ * dfg/DFGOSRExitCompiler64.cpp:
+ (JSC::DFG::OSRExitCompiler::compileExit):
+ * dfg/DFGOperations.cpp:
+ * dfg/DFGOperations.h:
+ (JSC):
+ * dfg/DFGPredictionPropagationPhase.cpp:
+ (JSC::DFG::PredictionPropagationPhase::propagate):
+ * dfg/DFGRepatch.cpp:
+ (JSC::DFG::tryCacheGetByID):
+ * dfg/DFGSpeculativeJIT.cpp:
+ (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
+ * dfg/DFGSpeculativeJIT.h:
+ (JSC::DFG::SpeculativeJIT::callOperation):
+ * dfg/DFGSpeculativeJIT32_64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * dfg/DFGStructureCheckHoistingPhase.cpp:
+ (JSC::DFG::StructureCheckHoistingPhase::run):
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompileMainPass):
+ (JSC::JIT::privateCompileSlowCases):
+ * jit/JIT.h:
+ (JIT):
+ (JSC::JIT::emit_op_get_global_var_watchable):
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emit_op_resolve):
+ (JSC):
+ (JSC::JIT::emit_op_resolve_base):
+ (JSC::JIT::emit_op_resolve_skip):
+ (JSC::JIT::emit_op_resolve_global):
+ (JSC::JIT::emitSlow_op_resolve_global):
+ (JSC::JIT::emit_op_resolve_with_base):
+ (JSC::JIT::emit_op_resolve_with_this):
+ (JSC::JIT::emit_op_resolve_global_dynamic):
+ (JSC::JIT::emitSlow_op_resolve_global_dynamic):
+ * jit/JITOpcodes32_64.cpp:
+ (JSC::JIT::emit_op_resolve):
+ (JSC):
+ (JSC::JIT::emit_op_resolve_base):
+ (JSC::JIT::emit_op_resolve_skip):
+ (JSC::JIT::emit_op_resolve_global):
+ (JSC::JIT::emitSlow_op_resolve_global):
+ (JSC::JIT::emit_op_resolve_with_base):
+ (JSC::JIT::emit_op_resolve_with_this):
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::emit_op_get_scoped_var):
+ (JSC):
+ (JSC::JIT::emit_op_put_scoped_var):
+ (JSC::JIT::emit_op_get_global_var):
+ (JSC::JIT::emit_op_put_global_var):
+ (JSC::JIT::emit_op_put_global_var_check):
+ (JSC::JIT::emitSlow_op_put_global_var_check):
+ * jit/JITPropertyAccess32_64.cpp:
+ (JSC::JIT::emit_op_get_scoped_var):
+ (JSC):
+ (JSC::JIT::emit_op_put_scoped_var):
+ (JSC::JIT::emit_op_get_global_var):
+ (JSC::JIT::emit_op_put_global_var):
+ (JSC::JIT::emit_op_put_global_var_check):
+ (JSC::JIT::emitSlow_op_put_global_var_check):
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ (JSC):
+ * jit/JITStubs.h:
+ * llint/LLIntSlowPaths.cpp:
+ (LLInt):
+ (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+ * llint/LLIntSlowPaths.h:
+ (LLInt):
+ * llint/LowLevelInterpreter.asm:
+ * llint/LowLevelInterpreter32_64.asm:
+ * llint/LowLevelInterpreter64.asm:
+ * runtime/JSScope.cpp:
+ (JSC::JSScope::resolve):
+ (JSC::JSScope::resolveSkip):
+ (JSC::JSScope::resolveGlobal):
+ (JSC::JSScope::resolveGlobalDynamic):
+ (JSC::JSScope::resolveBase):
+ (JSC::JSScope::resolveWithBase):
+ (JSC::JSScope::resolveWithThis):
+ * runtime/JSScope.h:
+ (JSScope):
+ * runtime/JSVariableObject.cpp:
+ * runtime/JSVariableObject.h:
+ * runtime/Structure.h:
+
+2012-10-17 Filip Pizlo <fpizlo@apple.com>
+
+ REGRESSION (r130826 or r130828): Twitter top bar is dysfunctional
+ https://bugs.webkit.org/show_bug.cgi?id=99577
+ <rdar://problem/12518883>
+
+ Reviewed by Mark Hahnenberg.
+
+ It turns out that it's a good idea to maintain the invariants of your object model, such as that
+ elements past publicLength should have the hole value.
+
+ * dfg/DFGGraph.cpp:
+ (JSC::DFG::Graph::dump):
+ * dfg/DFGSpeculativeJIT32_64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+
+2012-10-17 Anders Carlsson <andersca@apple.com>
+
+ Clean up Vector.h
+ https://bugs.webkit.org/show_bug.cgi?id=99622
+
+ Reviewed by Benjamin Poulain.
+
+ Fix fallout from removing std::max and std::min using declarations.
+
+ * runtime/StringPrototype.cpp:
+ (JSC::jsSpliceSubstrings):
+ (JSC::jsSpliceSubstringsWithSeparators):
+ (JSC::stringProtoFuncIndexOf):
+ * yarr/YarrPattern.cpp:
+ (JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets):
+
+2012-10-17 Oliver Hunt <oliver@apple.com>
+
+ Committing new files is so overrated.
+
+ * bytecode/ResolveOperation.h: Added.
+ (JSC):
+ (JSC::ResolveOperation::getAndReturnScopedVar):
+ (JSC::ResolveOperation::checkForDynamicEntriesBeforeGlobalScope):
+ (ResolveOperation):
+ (JSC::ResolveOperation::getAndReturnGlobalVar):
+ (JSC::ResolveOperation::getAndReturnGlobalProperty):
+ (JSC::ResolveOperation::resolveFail):
+ (JSC::ResolveOperation::skipTopScopeNode):
+ (JSC::ResolveOperation::skipScopes):
+ (JSC::ResolveOperation::returnGlobalObjectAsBase):
+ (JSC::ResolveOperation::setBaseToGlobal):
+ (JSC::ResolveOperation::setBaseToUndefined):
+ (JSC::ResolveOperation::setBaseToScope):
+ (JSC::ResolveOperation::returnScopeAsBase):
+ (JSC::PutToBaseOperation::PutToBaseOperation):
+
+2012-10-17 Michael Saboff <msaboff@apple.com>
+
+ StringPrototype::jsSpliceSubstringsWithSeparators() doesn't optimally handle 8 bit strings
+ https://bugs.webkit.org/show_bug.cgi?id=99230
+
+ Reviewed by Geoffrey Garen.
+
+ Added code to select characters8() or characters16() on the not all 8 bit path for both the
+ processing of the source and the separators.
+
+ * runtime/StringPrototype.cpp:
+ (JSC::jsSpliceSubstringsWithSeparators):
+
+2012-10-17 Filip Pizlo <fpizlo@apple.com>
+
+ Array and object allocations via 'new Object' or 'new Array' should be inlined in bytecode to allow allocation site profiling
+ https://bugs.webkit.org/show_bug.cgi?id=99557
+
+ Reviewed by Geoffrey Garen.
+
+ Removed an inaccurate and misleading comment as per Geoff's review. (I forgot
+ to make this change as part of http://trac.webkit.org/changeset/131644).
+
+ * bytecompiler/NodesCodegen.cpp:
+ (JSC::FunctionCallResolveNode::emitBytecode):
+
+2012-10-17 Oliver Hunt <oliver@apple.com>
+
+ Bytecode should not have responsibility for determining how to perform non-local resolves
+ https://bugs.webkit.org/show_bug.cgi?id=99349
+
+ Reviewed by Gavin Barraclough.
+
+ This patch removes lexical analysis from the bytecode generation. This allows
+ us to delay lookup of a non-local variables until the lookup is actually necessary,
+ and simplifies a lot of the resolve logic in BytecodeGenerator.
+
+ Once a lookup is performed we cache the lookup information in a set of out-of-line
+ buffers in CodeBlock. This allows subsequent lookups to avoid unnecessary hashing,
+ etc, and allows the respective JITs to recreated optimal lookup code.
+
+ This is currently still a performance regression in LLInt, but most of the remaining
+ regression is caused by a lot of indirection that I'll remove in future work, as well
+ as some work necessary to allow LLInt to perform in line instruction repatching.
+ We will also want to improve the behaviour of the baseline JIT for some of the lookup
+ operations, however this patch was getting quite large already so I'm landing it now
+ that we've reached the bar of "performance-neutral".
+
+ * GNUmakefile.list.am:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::printStructures):
+ (JSC::CodeBlock::dump):
+ (JSC::CodeBlock::CodeBlock):
+ (JSC::CodeBlock::visitStructures):
+ (JSC):
+ (JSC::CodeBlock::finalizeUnconditionally):
+ (JSC::CodeBlock::shrinkToFit):
+ * bytecode/CodeBlock.h:
+ (JSC::CodeBlock::addResolve):
+ (JSC::CodeBlock::addPutToBase):
+ (CodeBlock):
+ (JSC::CodeBlock::resolveOperations):
+ (JSC::CodeBlock::putToBaseOperation):
+ (JSC::CodeBlock::numberOfResolveOperations):
+ (JSC::CodeBlock::numberOfPutToBaseOperations):
+ (JSC::CodeBlock::addPropertyAccessInstruction):
+ (JSC::CodeBlock::globalObjectConstant):
+ (JSC::CodeBlock::setGlobalObjectConstant):
+ * bytecode/GlobalResolveInfo.h: Removed.
+ * bytecode/Opcode.h:
+ (JSC):
+ (JSC::padOpcodeName):
+ * bytecode/ResolveGlobalStatus.cpp:
+ (JSC::computeForStructure):
+ (JSC::ResolveGlobalStatus::computeFor):
+ * bytecode/ResolveGlobalStatus.h:
+ (JSC):
+ (ResolveGlobalStatus):
+ * bytecode/ResolveOperation.h: Added.
+ The new types and logic we use to perform the cached lookups.
+ (JSC):
+ (ResolveOperation):
+ (JSC::ResolveOperation::getAndReturnScopedVar):
+ (JSC::ResolveOperation::checkForDynamicEntriesBeforeGlobalScope):
+ (JSC::ResolveOperation::getAndReturnGlobalVar):
+ (JSC::ResolveOperation::getAndReturnGlobalProperty):
+ (JSC::ResolveOperation::resolveFail):
+ (JSC::ResolveOperation::skipTopScopeNode):
+ (JSC::ResolveOperation::skipScopes):
+ (JSC::ResolveOperation::returnGlobalObjectAsBase):
+ (JSC::ResolveOperation::setBaseToGlobal):
+ (JSC::ResolveOperation::setBaseToUndefined):
+ (JSC::ResolveOperation::setBaseToScope):
+ (JSC::ResolveOperation::returnScopeAsBase):
+ (JSC::PutToBaseOperation::PutToBaseOperation):
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::ResolveResult::checkValidity):
+ (JSC):
+ (JSC::BytecodeGenerator::BytecodeGenerator):
+ (JSC::BytecodeGenerator::resolve):
+ (JSC::BytecodeGenerator::resolveConstDecl):
+ (JSC::BytecodeGenerator::shouldAvoidResolveGlobal):
+ (JSC::BytecodeGenerator::emitResolve):
+ (JSC::BytecodeGenerator::emitResolveBase):
+ (JSC::BytecodeGenerator::emitResolveBaseForPut):
+ (JSC::BytecodeGenerator::emitResolveWithBaseForPut):
+ (JSC::BytecodeGenerator::emitResolveWithThis):
+ (JSC::BytecodeGenerator::emitGetLocalVar):
+ (JSC::BytecodeGenerator::emitInitGlobalConst):
+ (JSC::BytecodeGenerator::emitPutToBase):
+ * bytecompiler/BytecodeGenerator.h:
+ (JSC::ResolveResult::registerResolve):
+ (JSC::ResolveResult::dynamicResolve):
+ (ResolveResult):
+ (JSC::ResolveResult::ResolveResult):
+ (JSC):
+ (NonlocalResolveInfo):
+ (JSC::NonlocalResolveInfo::NonlocalResolveInfo):
+ (JSC::NonlocalResolveInfo::~NonlocalResolveInfo):
+ (JSC::NonlocalResolveInfo::resolved):
+ (JSC::NonlocalResolveInfo::put):
+ (BytecodeGenerator):
+ (JSC::BytecodeGenerator::getResolveOperations):
+ (JSC::BytecodeGenerator::getResolveWithThisOperations):
+ (JSC::BytecodeGenerator::getResolveBaseOperations):
+ (JSC::BytecodeGenerator::getResolveBaseForPutOperations):
+ (JSC::BytecodeGenerator::getResolveWithBaseForPutOperations):
+ (JSC::BytecodeGenerator::getPutToBaseOperation):
+ * bytecompiler/NodesCodegen.cpp:
+ (JSC::ResolveNode::isPure):
+ (JSC::FunctionCallResolveNode::emitBytecode):
+ (JSC::PostfixNode::emitResolve):
+ (JSC::PrefixNode::emitResolve):
+ (JSC::ReadModifyResolveNode::emitBytecode):
+ (JSC::AssignResolveNode::emitBytecode):
+ (JSC::ConstDeclNode::emitCodeSingle):
+ (JSC::ForInNode::emitBytecode):
+ * dfg/DFGAbstractState.cpp:
+ (JSC::DFG::AbstractState::execute):
+ * dfg/DFGByteCodeParser.cpp:
+ (ByteCodeParser):
+ (InlineStackEntry):
+ (JSC::DFG::ByteCodeParser::handleGetByOffset):
+ (DFG):
+ (JSC::DFG::ByteCodeParser::parseResolveOperations):
+ (JSC::DFG::ByteCodeParser::parseBlock):
+ (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
+ * dfg/DFGCapabilities.h:
+ (JSC::DFG::canCompileResolveOperations):
+ (DFG):
+ (JSC::DFG::canCompilePutToBaseOperation):
+ (JSC::DFG::canCompileOpcode):
+ (JSC::DFG::canInlineOpcode):
+ * dfg/DFGGraph.h:
+ (ResolveGlobalData):
+ (ResolveOperationData):
+ (DFG):
+ (PutToBaseOperationData):
+ (Graph):
+ * dfg/DFGNode.h:
+ (JSC::DFG::Node::hasIdentifier):
+ (JSC::DFG::Node::resolveOperationsDataIndex):
+ (Node):
+ * dfg/DFGNodeType.h:
+ (DFG):
+ * dfg/DFGOSRExit.cpp:
+ (JSC::DFG::OSRExit::OSRExit):
+ * dfg/DFGOSRExit.h:
+ (OSRExit):
+ * dfg/DFGOSRExitCompiler.cpp:
+ * dfg/DFGOSRExitCompiler32_64.cpp:
+ (JSC::DFG::OSRExitCompiler::compileExit):
+ * dfg/DFGOSRExitCompiler64.cpp:
+ (JSC::DFG::OSRExitCompiler::compileExit):
+ * dfg/DFGOperations.cpp:
+ * dfg/DFGOperations.h:
+ * dfg/DFGPredictionPropagationPhase.cpp:
+ (JSC::DFG::PredictionPropagationPhase::propagate):
+ * dfg/DFGRepatch.cpp:
+ (JSC::DFG::tryCacheGetByID):
+ * dfg/DFGSpeculativeJIT.cpp:
+ (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
+ * dfg/DFGSpeculativeJIT.h:
+ (JSC::DFG::SpeculativeJIT::resolveOperations):
+ (SpeculativeJIT):
+ (JSC::DFG::SpeculativeJIT::putToBaseOperation):
+ (JSC::DFG::SpeculativeJIT::callOperation):
+ * dfg/DFGSpeculativeJIT32_64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * dfg/DFGStructureCheckHoistingPhase.cpp:
+ (JSC::DFG::StructureCheckHoistingPhase::run):
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompileMainPass):
+ (JSC::JIT::privateCompileSlowCases):
+ * jit/JIT.h:
+ (JIT):
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emit_op_put_to_base):
+ (JSC):
+ (JSC::JIT::emit_resolve_operations):
+ (JSC::JIT::emitSlow_link_resolve_operations):
+ (JSC::JIT::emit_op_resolve):
+ (JSC::JIT::emitSlow_op_resolve):
+ (JSC::JIT::emit_op_resolve_base):
+ (JSC::JIT::emitSlow_op_resolve_base):
+ (JSC::JIT::emit_op_resolve_with_base):
+ (JSC::JIT::emitSlow_op_resolve_with_base):
+ (JSC::JIT::emit_op_resolve_with_this):
+ (JSC::JIT::emitSlow_op_resolve_with_this):
+ (JSC::JIT::emitSlow_op_put_to_base):
+ * jit/JITOpcodes32_64.cpp:
+ (JSC::JIT::emit_op_put_to_base):
+ (JSC):
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::emit_op_init_global_const):
+ (JSC::JIT::emit_op_init_global_const_check):
+ (JSC::JIT::emitSlow_op_init_global_const_check):
+ * jit/JITPropertyAccess32_64.cpp:
+ (JSC::JIT::emit_op_init_global_const):
+ (JSC::JIT::emit_op_init_global_const_check):
+ (JSC::JIT::emitSlow_op_init_global_const_check):
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ (JSC):
+ * jit/JITStubs.h:
+ * llint/LLIntSlowPaths.cpp:
+ (LLInt):
+ (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+ * llint/LLIntSlowPaths.h:
+ (LLInt):
+ * llint/LowLevelInterpreter.asm:
+ * llint/LowLevelInterpreter32_64.asm:
+ * llint/LowLevelInterpreter64.asm:
+ * runtime/JSScope.cpp:
+ (JSC::LookupResult::base):
+ (JSC::LookupResult::value):
+ (JSC::LookupResult::setBase):
+ (JSC::LookupResult::setValue):
+ (LookupResult):
+ (JSC):
+ (JSC::setPutPropertyAccessOffset):
+ (JSC::executeResolveOperations):
+ (JSC::JSScope::resolveContainingScopeInternal):
+ (JSC::JSScope::resolveContainingScope):
+ (JSC::JSScope::resolve):
+ (JSC::JSScope::resolveBase):
+ (JSC::JSScope::resolveWithBase):
+ (JSC::JSScope::resolveWithThis):
+ (JSC::JSScope::resolvePut):
+ (JSC::JSScope::resolveGlobal):
+ * runtime/JSScope.h:
+ (JSScope):
+ * runtime/JSVariableObject.cpp:
+ (JSC):
+ * runtime/JSVariableObject.h:
+ (JSVariableObject):
+ * runtime/Structure.h:
+ (JSC::Structure::propertyAccessesAreCacheable):
+ (Structure):
+
+2012-10-17 Filip Pizlo <fpizlo@apple.com>
+
+ Array and object allocations via 'new Object' or 'new Array' should be inlined in bytecode to allow allocation site profiling
+ https://bugs.webkit.org/show_bug.cgi?id=99557
+
+ Reviewed by Geoffrey Garen.
+
+ This uses the old jneq_ptr trick to allow for the bytecode to "see" that the
+ operation in question is what we almost certainly know it to be.
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::dump):
+ * bytecode/Opcode.h:
+ (JSC):
+ (JSC::padOpcodeName):
+ * bytecode/SpecialPointer.h:
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::emitCall):
+ (JSC::BytecodeGenerator::emitCallEval):
+ (JSC::BytecodeGenerator::expectedFunctionForIdentifier):
+ (JSC):
+ (JSC::BytecodeGenerator::emitExpectedFunctionSnippet):
+ (JSC::BytecodeGenerator::emitConstruct):
+ * bytecompiler/BytecodeGenerator.h:
+ (BytecodeGenerator):
+ * bytecompiler/NodesCodegen.cpp:
+ (JSC::NewExprNode::emitBytecode):
+ (JSC::FunctionCallValueNode::emitBytecode):
+ (JSC::FunctionCallResolveNode::emitBytecode):
+ (JSC::FunctionCallBracketNode::emitBytecode):
+ (JSC::FunctionCallDotNode::emitBytecode):
+ (JSC::CallFunctionCallDotNode::emitBytecode):
+ (JSC::ApplyFunctionCallDotNode::emitBytecode):
+ * dfg/DFGByteCodeParser.cpp:
+ (JSC::DFG::ByteCodeParser::parseBlock):
+ * dfg/DFGCapabilities.h:
+ (JSC::DFG::canCompileOpcode):
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompileMainPass):
+ * jit/JIT.h:
+ (JIT):
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emit_op_new_array_with_size):
+ (JSC):
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ (JSC):
+ * jit/JITStubs.h:
+ * llint/LLIntSlowPaths.cpp:
+ (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+ (LLInt):
+ * llint/LLIntSlowPaths.h:
+ (LLInt):
+ * llint/LowLevelInterpreter.asm:
+ * runtime/ArrayConstructor.cpp:
+ (JSC::constructArrayWithSizeQuirk):
+ (JSC):
+ * runtime/ArrayConstructor.h:
+ (JSC):
+ * runtime/CommonIdentifiers.h:
+ * runtime/JSGlobalObject.cpp:
+ (JSC::JSGlobalObject::reset):
+ (JSC):
+
+2012-10-17 Filip Pizlo <fpizlo@apple.com>
+
+ JIT op_get_by_pname should call cti_get_by_val_generic and not cti_get_by_val
+ https://bugs.webkit.org/show_bug.cgi?id=99631
+ <rdar://problem/12483221>
+
+ Reviewed by Mark Hahnenberg.
+
+ cti_get_by_val assumes that the return address has patching metadata associated with it, which won't
+ be true for op_get_by_pname. cti_get_by_val_generic makes no such assumptions.
+
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::emitSlow_op_get_by_pname):
+ * jit/JITPropertyAccess32_64.cpp:
+ (JSC::JIT::emitSlow_op_get_by_pname):
+
+2012-10-17 Mark Hahnenberg <mhahnenberg@apple.com>
+
+ Block freeing thread should sleep indefinitely when there's no work to do
+ https://bugs.webkit.org/show_bug.cgi?id=98084
+
+ Reviewed by Geoffrey Garen.
+
+ r130212 didn't fully fix the problem.
+
+ * heap/BlockAllocator.cpp:
+ (JSC::BlockAllocator::blockFreeingThreadMain): We would just continue to the next iteration if
+ we found that we had zero blocks to copy. We should move the indefinite wait up to where that
+ check is done so that we properly detect the "no more blocks to copy, wait for more" condition.
+
2012-10-16 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed, rolling out r131516 and r131550.
diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.cpp b/Source/JavaScriptCore/bytecode/CodeBlock.cpp
index 9b8260a79..d1151482e 100644
--- a/Source/JavaScriptCore/bytecode/CodeBlock.cpp
+++ b/Source/JavaScriptCore/bytecode/CodeBlock.cpp
@@ -704,6 +704,13 @@ void CodeBlock::dump(ExecState* exec, const Vector<Instruction>::const_iterator&
dumpBytecodeCommentAndNewLine(location);
break;
}
+ case op_new_array_with_size: {
+ int dst = (++it)->u.operand;
+ int length = (++it)->u.operand;
+ dataLog("[%4d] new_array_with_size\t %s, %s", location, registerName(exec, dst).data(), registerName(exec, length).data());
+ dumpBytecodeCommentAndNewLine(location);
+ break;
+ }
case op_new_array_buffer: {
int dst = (++it)->u.operand;
int argv = (++it)->u.operand;
@@ -1245,9 +1252,9 @@ void CodeBlock::dump(ExecState* exec, const Vector<Instruction>::const_iterator&
}
case op_jneq_ptr: {
int r0 = (++it)->u.operand;
- void* pointer = (++it)->u.pointer;
+ Special::Pointer pointer = (++it)->u.specialPointer;
int offset = (++it)->u.operand;
- dataLog("[%4d] jneq_ptr\t\t %s, %p, %d(->%d)", location, registerName(exec, r0).data(), pointer, offset, location + offset);
+ dataLog("[%4d] jneq_ptr\t\t %s, %d (%p), %d(->%d)", location, registerName(exec, r0).data(), pointer, m_globalObject->actualPointerFor(pointer), offset, location + offset);
dumpBytecodeCommentAndNewLine(location);
break;
}
diff --git a/Source/JavaScriptCore/bytecode/Opcode.h b/Source/JavaScriptCore/bytecode/Opcode.h
index a5d466154..dd62df700 100644
--- a/Source/JavaScriptCore/bytecode/Opcode.h
+++ b/Source/JavaScriptCore/bytecode/Opcode.h
@@ -49,6 +49,7 @@ namespace JSC {
\
macro(op_new_object, 2) \
macro(op_new_array, 4) \
+ macro(op_new_array_with_size, 3) \
macro(op_new_array_buffer, 4) \
macro(op_new_regexp, 3) \
macro(op_mov, 3) \
diff --git a/Source/JavaScriptCore/bytecode/ResolveOperation.h b/Source/JavaScriptCore/bytecode/ResolveOperation.h
new file mode 100644
index 000000000..1543ef209
--- /dev/null
+++ b/Source/JavaScriptCore/bytecode/ResolveOperation.h
@@ -0,0 +1,178 @@
+/*
+ * 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. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ResolveOperation_h
+#define ResolveOperation_h
+
+#include "PropertyOffset.h"
+#include "WriteBarrier.h"
+
+#include <wtf/Vector.h>
+
+namespace JSC {
+
+class Structure;
+
+struct ResolveOperation {
+ typedef enum {
+ Fail,
+ SetBaseToUndefined,
+ ReturnScopeAsBase,
+ SetBaseToScope,
+ SetBaseToGlobal,
+ GetAndReturnScopedVar,
+ GetAndReturnGlobalVar,
+ GetAndReturnGlobalVarWatchable,
+ SkipTopScopeNode,
+ SkipScopes,
+ ReturnGlobalObjectAsBase,
+ GetAndReturnGlobalProperty,
+ CheckForDynamicEntriesBeforeGlobalScope
+ } ResolveOperationType;
+
+ ResolveOperationType m_operation;
+ WriteBarrier<Structure> m_structure;
+ union {
+ PropertyOffset m_offset;
+ WriteBarrier<Unknown>* m_registerAddress;
+ int m_scopesToSkip;
+ int m_activationRegister;
+ };
+ static ResolveOperation getAndReturnScopedVar(PropertyOffset offset)
+ {
+ ResolveOperation op;
+ op.m_operation = GetAndReturnScopedVar;
+ op.m_offset = offset;
+ return op;
+ }
+ static ResolveOperation checkForDynamicEntriesBeforeGlobalScope()
+ {
+ ResolveOperation op;
+ op.m_operation = CheckForDynamicEntriesBeforeGlobalScope;
+ return op;
+ }
+
+ static ResolveOperation getAndReturnGlobalVar(WriteBarrier<Unknown>* registerAddress, bool couldBeWatched)
+ {
+ ResolveOperation op;
+ op.m_operation = couldBeWatched ? GetAndReturnGlobalVarWatchable : GetAndReturnGlobalVar;
+ op.m_registerAddress = registerAddress;
+ return op;
+ }
+ static ResolveOperation getAndReturnGlobalProperty()
+ {
+ ResolveOperation op;
+ op.m_operation = GetAndReturnGlobalProperty;
+ return op;
+ }
+ static ResolveOperation resolveFail()
+ {
+ ResolveOperation op;
+ op.m_operation = Fail;
+ return op;
+ }
+ static ResolveOperation skipTopScopeNode(int activationRegister)
+ {
+ ResolveOperation op;
+ op.m_operation = SkipTopScopeNode;
+ op.m_activationRegister = activationRegister;
+ return op;
+ }
+ static ResolveOperation skipScopes(int scopesToSkip)
+ {
+ ResolveOperation op;
+ op.m_operation = SkipScopes;
+ op.m_scopesToSkip = scopesToSkip;
+ return op;
+ }
+ static ResolveOperation returnGlobalObjectAsBase()
+ {
+ ResolveOperation op;
+ op.m_operation = ReturnGlobalObjectAsBase;
+ return op;
+ }
+ static ResolveOperation setBaseToGlobal()
+ {
+ ResolveOperation op;
+ op.m_operation = SetBaseToGlobal;
+ return op;
+ }
+ static ResolveOperation setBaseToUndefined()
+ {
+ ResolveOperation op;
+ op.m_operation = SetBaseToUndefined;
+ return op;
+ }
+ static ResolveOperation setBaseToScope()
+ {
+ ResolveOperation op;
+ op.m_operation = SetBaseToScope;
+ return op;
+ }
+ static ResolveOperation returnScopeAsBase()
+ {
+ ResolveOperation op;
+ op.m_operation = ReturnScopeAsBase;
+ return op;
+ }
+};
+
+typedef Vector<ResolveOperation> ResolveOperations;
+
+struct PutToBaseOperation {
+ PutToBaseOperation(bool isStrict)
+ : m_kind(Uninitialised)
+ , m_isDynamic(false)
+ , m_isStrict(isStrict)
+ , m_predicatePointer(0)
+ {
+
+ }
+ enum Kind { Uninitialised, Generic, Readonly, GlobalVariablePut, GlobalVariablePutChecked, GlobalPropertyPut, VariablePut };
+ union {
+ Kind m_kind : 8;
+ uint8_t m_kindAsUint8;
+ };
+ bool m_isDynamic : 8;
+ bool m_isStrict : 8;
+ union {
+ bool* m_predicatePointer;
+ unsigned m_scopeDepth;
+ };
+ WriteBarrier<Structure> m_structure;
+ union {
+ // Used for GlobalVariablePut
+ WriteBarrier<Unknown>* m_registerAddress;
+
+ // Used for GlobalPropertyPut and VariablePut
+ struct {
+ PropertyOffset m_offset;
+ int32_t m_offsetInButterfly;
+ };
+ };
+};
+}
+
+#endif // ResolveOperation_h
diff --git a/Source/JavaScriptCore/bytecode/SpecialPointer.h b/Source/JavaScriptCore/bytecode/SpecialPointer.h
index 2c624784b..c18a6e904 100644
--- a/Source/JavaScriptCore/bytecode/SpecialPointer.h
+++ b/Source/JavaScriptCore/bytecode/SpecialPointer.h
@@ -35,6 +35,8 @@ namespace Special {
enum Pointer {
CallFunction,
ApplyFunction,
+ ObjectConstructor,
+ ArrayConstructor,
TableSize // Not a real special pointer. Use this to determine the number of pointers.
};
} // namespace Special
diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
index 4308148b3..1160a1888 100644
--- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
+++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
@@ -2013,9 +2013,9 @@ RegisterID* BytecodeGenerator::emitNewFunctionExpression(RegisterID* r0, FuncExp
return r0;
}
-RegisterID* BytecodeGenerator::emitCall(RegisterID* dst, RegisterID* func, CallArguments& callArguments, unsigned divot, unsigned startOffset, unsigned endOffset)
+RegisterID* BytecodeGenerator::emitCall(RegisterID* dst, RegisterID* func, ExpectedFunction expectedFunction, CallArguments& callArguments, unsigned divot, unsigned startOffset, unsigned endOffset)
{
- return emitCall(op_call, dst, func, callArguments, divot, startOffset, endOffset);
+ return emitCall(op_call, dst, func, expectedFunction, callArguments, divot, startOffset, endOffset);
}
void BytecodeGenerator::createArgumentsIfNecessary()
@@ -2048,10 +2048,85 @@ void BytecodeGenerator::createActivationIfNecessary()
RegisterID* BytecodeGenerator::emitCallEval(RegisterID* dst, RegisterID* func, CallArguments& callArguments, unsigned divot, unsigned startOffset, unsigned endOffset)
{
- return emitCall(op_call_eval, dst, func, callArguments, divot, startOffset, endOffset);
+ return emitCall(op_call_eval, dst, func, NoExpectedFunction, callArguments, divot, startOffset, endOffset);
}
-RegisterID* BytecodeGenerator::emitCall(OpcodeID opcodeID, RegisterID* dst, RegisterID* func, CallArguments& callArguments, unsigned divot, unsigned startOffset, unsigned endOffset)
+ExpectedFunction BytecodeGenerator::expectedFunctionForIdentifier(const Identifier& identifier)
+{
+ if (identifier == m_globalData->propertyNames->Object)
+ return ExpectObjectConstructor;
+ if (identifier == m_globalData->propertyNames->Array)
+ return ExpectArrayConstructor;
+ return NoExpectedFunction;
+}
+
+ExpectedFunction BytecodeGenerator::emitExpectedFunctionSnippet(RegisterID* dst, RegisterID* func, ExpectedFunction expectedFunction, CallArguments& callArguments, Label* done)
+{
+ RefPtr<Label> realCall = newLabel();
+ switch (expectedFunction) {
+ case ExpectObjectConstructor: {
+ // If the number of arguments is non-zero, then we can't do anything interesting.
+ if (callArguments.argumentCountIncludingThis() >= 2)
+ return NoExpectedFunction;
+
+ size_t begin = instructions().size();
+ emitOpcode(op_jneq_ptr);
+ instructions().append(func->index());
+ instructions().append(Special::ObjectConstructor);
+ instructions().append(realCall->bind(begin, instructions().size()));
+
+ if (dst != ignoredResult()) {
+ emitOpcode(op_new_object);
+ instructions().append(dst->index());
+ }
+ break;
+ }
+
+ case ExpectArrayConstructor: {
+ // If you're doing anything other than "new Array()" or "new Array(foo)" then we
+ // don't do inline it, for now. The only reason is that call arguments are in
+ // the opposite order of what op_new_array expects, so we'd either need to change
+ // how op_new_array works or we'd need an op_new_array_reverse. Neither of these
+ // things sounds like it's worth it.
+ if (callArguments.argumentCountIncludingThis() > 2)
+ return NoExpectedFunction;
+
+ size_t begin = instructions().size();
+ emitOpcode(op_jneq_ptr);
+ instructions().append(func->index());
+ instructions().append(Special::ArrayConstructor);
+ instructions().append(realCall->bind(begin, instructions().size()));
+
+ if (dst != ignoredResult()) {
+ if (callArguments.argumentCountIncludingThis() == 2) {
+ emitOpcode(op_new_array_with_size);
+ instructions().append(dst->index());
+ instructions().append(callArguments.argumentRegister(0)->index());
+ } else {
+ ASSERT(callArguments.argumentCountIncludingThis() == 1);
+ emitOpcode(op_new_array);
+ instructions().append(dst->index());
+ instructions().append(0);
+ instructions().append(0);
+ }
+ }
+ break;
+ }
+
+ default:
+ ASSERT(expectedFunction == NoExpectedFunction);
+ return NoExpectedFunction;
+ }
+
+ size_t begin = instructions().size();
+ emitOpcode(op_jmp);
+ instructions().append(done->bind(begin, instructions().size()));
+ emitLabel(realCall.get());
+
+ return expectedFunction;
+}
+
+RegisterID* BytecodeGenerator::emitCall(OpcodeID opcodeID, RegisterID* dst, RegisterID* func, ExpectedFunction expectedFunction, CallArguments& callArguments, unsigned divot, unsigned startOffset, unsigned endOffset)
{
ASSERT(opcodeID == op_call || opcodeID == op_call_eval);
ASSERT(func->refCount());
@@ -2076,6 +2151,9 @@ RegisterID* BytecodeGenerator::emitCall(OpcodeID opcodeID, RegisterID* dst, Regi
emitExpressionInfo(divot, startOffset, endOffset);
+ RefPtr<Label> done = newLabel();
+ expectedFunction = emitExpectedFunctionSnippet(dst, func, expectedFunction, callArguments, done.get());
+
// Emit call.
ArrayProfile* arrayProfile = newArrayProfile();
emitOpcode(opcodeID);
@@ -2093,6 +2171,9 @@ RegisterID* BytecodeGenerator::emitCall(OpcodeID opcodeID, RegisterID* dst, Regi
instructions().append(dst->index()); // dst
instructions().append(profile);
}
+
+ if (expectedFunction != NoExpectedFunction)
+ emitLabel(done.get());
if (m_shouldEmitProfileHooks) {
emitOpcode(op_profile_did_call);
@@ -2162,7 +2243,7 @@ RegisterID* BytecodeGenerator::emitUnaryNoDstOp(OpcodeID opcodeID, RegisterID* s
return src;
}
-RegisterID* BytecodeGenerator::emitConstruct(RegisterID* dst, RegisterID* func, CallArguments& callArguments, unsigned divot, unsigned startOffset, unsigned endOffset)
+RegisterID* BytecodeGenerator::emitConstruct(RegisterID* dst, RegisterID* func, ExpectedFunction expectedFunction, CallArguments& callArguments, unsigned divot, unsigned startOffset, unsigned endOffset)
{
ASSERT(func->refCount());
@@ -2187,6 +2268,9 @@ RegisterID* BytecodeGenerator::emitConstruct(RegisterID* dst, RegisterID* func,
callFrame.append(newTemporary());
emitExpressionInfo(divot, startOffset, endOffset);
+
+ RefPtr<Label> done = newLabel();
+ expectedFunction = emitExpectedFunctionSnippet(dst, func, expectedFunction, callArguments, done.get());
emitOpcode(op_construct);
instructions().append(func->index()); // func
@@ -2204,6 +2288,9 @@ RegisterID* BytecodeGenerator::emitConstruct(RegisterID* dst, RegisterID* func,
instructions().append(profile);
}
+ if (expectedFunction != NoExpectedFunction)
+ emitLabel(done.get());
+
if (m_shouldEmitProfileHooks) {
emitOpcode(op_profile_did_call);
instructions().append(callArguments.profileHookRegister()->index());
diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
index a429c710e..ae79a13ae 100644
--- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
+++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
@@ -51,6 +51,12 @@ namespace JSC {
class Label;
class JSScope;
+ enum ExpectedFunction {
+ NoExpectedFunction,
+ ExpectObjectConstructor,
+ ExpectArrayConstructor
+ };
+
class CallArguments {
public:
CallArguments(BytecodeGenerator& generator, ArgumentsNode* argumentsNode);
@@ -483,8 +489,9 @@ namespace JSC {
RegisterID* emitDeleteByVal(RegisterID* dst, RegisterID* base, RegisterID* property);
RegisterID* emitPutByIndex(RegisterID* base, unsigned index, RegisterID* value);
void emitPutGetterSetter(RegisterID* base, const Identifier& property, RegisterID* getter, RegisterID* setter);
-
- RegisterID* emitCall(RegisterID* dst, RegisterID* func, CallArguments&, unsigned divot, unsigned startOffset, unsigned endOffset);
+
+ ExpectedFunction expectedFunctionForIdentifier(const Identifier&);
+ RegisterID* emitCall(RegisterID* dst, RegisterID* func, ExpectedFunction, CallArguments&, unsigned divot, unsigned startOffset, unsigned endOffset);
RegisterID* emitCallEval(RegisterID* dst, RegisterID* func, CallArguments&, unsigned divot, unsigned startOffset, unsigned endOffset);
RegisterID* emitCallVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, RegisterID* profileHookRegister, unsigned divot, unsigned startOffset, unsigned endOffset);
RegisterID* emitLoadVarargs(RegisterID* argCountDst, RegisterID* thisRegister, RegisterID* args);
@@ -492,7 +499,7 @@ namespace JSC {
RegisterID* emitReturn(RegisterID* src);
RegisterID* emitEnd(RegisterID* src) { return emitUnaryNoDstOp(op_end, src); }
- RegisterID* emitConstruct(RegisterID* dst, RegisterID* func, CallArguments&, unsigned divot, unsigned startOffset, unsigned endOffset);
+ RegisterID* emitConstruct(RegisterID* dst, RegisterID* func, ExpectedFunction, CallArguments&, unsigned divot, unsigned startOffset, unsigned endOffset);
RegisterID* emitStrcat(RegisterID* dst, RegisterID* src, int count);
void emitToPrimitive(RegisterID* dst, RegisterID* src);
@@ -590,7 +597,12 @@ namespace JSC {
typedef HashMap<double, JSValue> NumberMap;
typedef HashMap<StringImpl*, JSString*, IdentifierRepHash> IdentifierStringMap;
- RegisterID* emitCall(OpcodeID, RegisterID* dst, RegisterID* func, CallArguments&, unsigned divot, unsigned startOffset, unsigned endOffset);
+ // Helper for emitCall() and emitConstruct(). This works because the set of
+ // expected functions have identical behavior for both call and construct
+ // (i.e. "Object()" is identical to "new Object()").
+ ExpectedFunction emitExpectedFunctionSnippet(RegisterID* dst, RegisterID* func, ExpectedFunction, CallArguments&, Label* done);
+
+ RegisterID* emitCall(OpcodeID, RegisterID* dst, RegisterID* func, ExpectedFunction, CallArguments&, unsigned divot, unsigned startOffset, unsigned endOffset);
RegisterID* newRegister();
diff --git a/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp b/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
index 0ac4149b6..10a873d1c 100644
--- a/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
+++ b/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
@@ -366,9 +366,14 @@ RegisterID* ArgumentListNode::emitBytecode(BytecodeGenerator& generator, Registe
RegisterID* NewExprNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst)
{
+ ExpectedFunction expectedFunction;
+ if (m_expr->isResolveNode())
+ expectedFunction = generator.expectedFunctionForIdentifier(static_cast<ResolveNode*>(m_expr)->identifier());
+ else
+ expectedFunction = NoExpectedFunction;
RefPtr<RegisterID> func = generator.emitNode(m_expr);
CallArguments callArguments(generator, m_args);
- return generator.emitConstruct(generator.finalDestinationOrIgnored(dst), func.get(), callArguments, divot(), startOffset(), endOffset());
+ return generator.emitConstruct(generator.finalDestinationOrIgnored(dst), func.get(), expectedFunction, callArguments, divot(), startOffset(), endOffset());
}
inline CallArguments::CallArguments(BytecodeGenerator& generator, ArgumentsNode* argumentsNode)
@@ -415,20 +420,23 @@ RegisterID* FunctionCallValueNode::emitBytecode(BytecodeGenerator& generator, Re
RefPtr<RegisterID> func = generator.emitNode(m_expr);
CallArguments callArguments(generator, m_args);
generator.emitLoad(callArguments.thisRegister(), jsUndefined());
- return generator.emitCall(generator.finalDestinationOrIgnored(dst, func.get()), func.get(), callArguments, divot(), startOffset(), endOffset());
+ return generator.emitCall(generator.finalDestinationOrIgnored(dst, func.get()), func.get(), NoExpectedFunction, callArguments, divot(), startOffset(), endOffset());
}
// ------------------------------ FunctionCallResolveNode ----------------------------------
RegisterID* FunctionCallResolveNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst)
{
+ ExpectedFunction expectedFunction = generator.expectedFunctionForIdentifier(m_ident);
ResolveResult resolveResult = generator.resolve(m_ident);
if (RegisterID* local = resolveResult.local()) {
RefPtr<RegisterID> func = generator.emitMove(generator.tempDestination(dst), local);
CallArguments callArguments(generator, m_args);
generator.emitLoad(callArguments.thisRegister(), jsUndefined());
- return generator.emitCall(generator.finalDestinationOrIgnored(dst, callArguments.thisRegister()), func.get(), callArguments, divot(), startOffset(), endOffset());
+ // This passes NoExpectedFunction because we expect that if the function is in a
+ // local variable, then it's not one of our built-in constructors.
+ return generator.emitCall(generator.finalDestinationOrIgnored(dst, callArguments.thisRegister()), func.get(), NoExpectedFunction, callArguments, divot(), startOffset(), endOffset());
}
if (resolveResult.isStatic()) {
@@ -436,7 +444,7 @@ RegisterID* FunctionCallResolveNode::emitBytecode(BytecodeGenerator& generator,
CallArguments callArguments(generator, m_args);
generator.emitGetStaticVar(func.get(), resolveResult, m_ident);
generator.emitLoad(callArguments.thisRegister(), jsUndefined());
- return generator.emitCall(generator.finalDestinationOrIgnored(dst, func.get()), func.get(), callArguments, divot(), startOffset(), endOffset());
+ return generator.emitCall(generator.finalDestinationOrIgnored(dst, func.get()), func.get(), expectedFunction, callArguments, divot(), startOffset(), endOffset());
}
RefPtr<RegisterID> func = generator.newTemporary();
@@ -445,7 +453,7 @@ RegisterID* FunctionCallResolveNode::emitBytecode(BytecodeGenerator& generator,
generator.emitExpressionInfo(identifierStart + m_ident.length(), m_ident.length(), 0);
generator.emitResolveWithThis(callArguments.thisRegister(), func.get(), resolveResult, m_ident);
- return generator.emitCall(generator.finalDestinationOrIgnored(dst, func.get()), func.get(), callArguments, divot(), startOffset(), endOffset());
+ return generator.emitCall(generator.finalDestinationOrIgnored(dst, func.get()), func.get(), expectedFunction, callArguments, divot(), startOffset(), endOffset());
}
// ------------------------------ FunctionCallBracketNode ----------------------------------
@@ -458,7 +466,7 @@ RegisterID* FunctionCallBracketNode::emitBytecode(BytecodeGenerator& generator,
RefPtr<RegisterID> function = generator.emitGetByVal(generator.tempDestination(dst), base.get(), property);
CallArguments callArguments(generator, m_args);
generator.emitMove(callArguments.thisRegister(), base.get());
- return generator.emitCall(generator.finalDestinationOrIgnored(dst, function.get()), function.get(), callArguments, divot(), startOffset(), endOffset());
+ return generator.emitCall(generator.finalDestinationOrIgnored(dst, function.get()), function.get(), NoExpectedFunction, callArguments, divot(), startOffset(), endOffset());
}
// ------------------------------ FunctionCallDotNode ----------------------------------
@@ -471,7 +479,7 @@ RegisterID* FunctionCallDotNode::emitBytecode(BytecodeGenerator& generator, Regi
generator.emitExpressionInfo(divot() - m_subexpressionDivotOffset, startOffset() - m_subexpressionDivotOffset, m_subexpressionEndOffset);
generator.emitMethodCheck();
generator.emitGetById(function.get(), callArguments.thisRegister(), m_ident);
- return generator.emitCall(generator.finalDestinationOrIgnored(dst, function.get()), function.get(), callArguments, divot(), startOffset(), endOffset());
+ return generator.emitCall(generator.finalDestinationOrIgnored(dst, function.get()), function.get(), NoExpectedFunction, callArguments, divot(), startOffset(), endOffset());
}
RegisterID* CallFunctionCallDotNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst)
@@ -491,7 +499,7 @@ RegisterID* CallFunctionCallDotNode::emitBytecode(BytecodeGenerator& generator,
RefPtr<RegisterID> realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
CallArguments callArguments(generator, m_args);
generator.emitNode(callArguments.thisRegister(), oldList->m_expr);
- generator.emitCall(finalDestinationOrIgnored.get(), realFunction.get(), callArguments, divot(), startOffset(), endOffset());
+ generator.emitCall(finalDestinationOrIgnored.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), startOffset(), endOffset());
generator.emitJump(end.get());
m_args->m_listNode = oldList;
@@ -499,7 +507,7 @@ RegisterID* CallFunctionCallDotNode::emitBytecode(BytecodeGenerator& generator,
RefPtr<RegisterID> realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
CallArguments callArguments(generator, m_args);
generator.emitLoad(callArguments.thisRegister(), jsUndefined());
- generator.emitCall(finalDestinationOrIgnored.get(), realFunction.get(), callArguments, divot(), startOffset(), endOffset());
+ generator.emitCall(finalDestinationOrIgnored.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), startOffset(), endOffset());
generator.emitJump(end.get());
}
}
@@ -507,7 +515,7 @@ RegisterID* CallFunctionCallDotNode::emitBytecode(BytecodeGenerator& generator,
{
CallArguments callArguments(generator, m_args);
generator.emitMove(callArguments.thisRegister(), base.get());
- generator.emitCall(finalDestinationOrIgnored.get(), function.get(), callArguments, divot(), startOffset(), endOffset());
+ generator.emitCall(finalDestinationOrIgnored.get(), function.get(), NoExpectedFunction, callArguments, divot(), startOffset(), endOffset());
}
generator.emitLabel(end.get());
return finalDestinationOrIgnored.get();
@@ -544,20 +552,20 @@ RegisterID* ApplyFunctionCallDotNode::emitBytecode(BytecodeGenerator& generator,
RefPtr<RegisterID> realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
CallArguments callArguments(generator, m_args);
generator.emitNode(callArguments.thisRegister(), oldList->m_expr);
- generator.emitCall(finalDestinationOrIgnored.get(), realFunction.get(), callArguments, divot(), startOffset(), endOffset());
+ generator.emitCall(finalDestinationOrIgnored.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), startOffset(), endOffset());
} else {
m_args->m_listNode = m_args->m_listNode->m_next;
RefPtr<RegisterID> realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
CallArguments callArguments(generator, m_args);
generator.emitNode(callArguments.thisRegister(), oldList->m_expr);
- generator.emitCall(finalDestinationOrIgnored.get(), realFunction.get(), callArguments, divot(), startOffset(), endOffset());
+ generator.emitCall(finalDestinationOrIgnored.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), startOffset(), endOffset());
}
m_args->m_listNode = oldList;
} else {
RefPtr<RegisterID> realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
CallArguments callArguments(generator, m_args);
generator.emitLoad(callArguments.thisRegister(), jsUndefined());
- generator.emitCall(finalDestinationOrIgnored.get(), realFunction.get(), callArguments, divot(), startOffset(), endOffset());
+ generator.emitCall(finalDestinationOrIgnored.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), startOffset(), endOffset());
}
} else {
ASSERT(m_args->m_listNode && m_args->m_listNode->m_next);
@@ -586,7 +594,7 @@ RegisterID* ApplyFunctionCallDotNode::emitBytecode(BytecodeGenerator& generator,
{
CallArguments callArguments(generator, m_args);
generator.emitMove(callArguments.thisRegister(), base.get());
- generator.emitCall(finalDestinationOrIgnored.get(), function.get(), callArguments, divot(), startOffset(), endOffset());
+ generator.emitCall(finalDestinationOrIgnored.get(), function.get(), NoExpectedFunction, callArguments, divot(), startOffset(), endOffset());
}
generator.emitLabel(end.get());
return finalDestinationOrIgnored.get();
diff --git a/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp b/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
index dc668d93e..4869cf8c1 100644
--- a/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
+++ b/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
@@ -1966,6 +1966,12 @@ bool ByteCodeParser::parseBlock(unsigned limit)
NEXT_OPCODE(op_new_array);
}
+ case op_new_array_with_size: {
+ int lengthOperand = currentInstruction[2].u.operand;
+ set(currentInstruction[1].u.operand, addToGraph(NewArrayWithSize, get(lengthOperand)));
+ NEXT_OPCODE(op_new_array_with_size);
+ }
+
case op_new_array_buffer: {
int startConstant = currentInstruction[2].u.operand;
int numConstants = currentInstruction[3].u.operand;
diff --git a/Source/JavaScriptCore/dfg/DFGCapabilities.h b/Source/JavaScriptCore/dfg/DFGCapabilities.h
index e1760699a..dc6f7aa1c 100644
--- a/Source/JavaScriptCore/dfg/DFGCapabilities.h
+++ b/Source/JavaScriptCore/dfg/DFGCapabilities.h
@@ -162,6 +162,7 @@ inline CapabilityLevel canCompileOpcode(OpcodeID opcodeID, CodeBlock*, Instructi
case op_resolve_global:
case op_new_object:
case op_new_array:
+ case op_new_array_with_size:
case op_new_array_buffer:
case op_strcat:
case op_to_primitive:
diff --git a/Source/JavaScriptCore/dfg/DFGGraph.cpp b/Source/JavaScriptCore/dfg/DFGGraph.cpp
index f4d260b9e..b9a0db2a2 100644
--- a/Source/JavaScriptCore/dfg/DFGGraph.cpp
+++ b/Source/JavaScriptCore/dfg/DFGGraph.cpp
@@ -246,12 +246,12 @@ void Graph::dump(const char* prefix, NodeIndex nodeIndex)
}
if (node.hasStructureSet()) {
for (size_t i = 0; i < node.structureSet().size(); ++i) {
- dataLog("%sstruct(%p)", hasPrinted ? ", " : "", node.structureSet()[i]);
+ dataLog("%sstruct(%p: %s)", hasPrinted ? ", " : "", node.structureSet()[i], indexingTypeToString(node.structureSet()[i]->indexingType()));
hasPrinted = true;
}
}
if (node.hasStructure()) {
- dataLog("%sstruct(%p)", hasPrinted ? ", " : "", node.structure());
+ dataLog("%sstruct(%p: %s)", hasPrinted ? ", " : "", node.structure(), indexingTypeToString(node.structure()->indexingType()));
hasPrinted = true;
}
if (node.hasStructureTransitionData()) {
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
index 0396f8696..41fe8db0f 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
@@ -3157,19 +3157,22 @@ void SpeculativeJIT::compile(Node& node)
case Array::ArrayWithContiguous:
case Array::ArrayWithContiguousOutOfBounds: {
m_jit.load32(
- MacroAssembler::Address(storageGPR, Butterfly::offsetOfPublicLength()), valueTagGPR);
+ MacroAssembler::Address(storageGPR, Butterfly::offsetOfPublicLength()), valuePayloadGPR);
MacroAssembler::Jump undefinedCase =
- m_jit.branchTest32(MacroAssembler::Zero, valueTagGPR);
- m_jit.sub32(TrustedImm32(1), valueTagGPR);
+ m_jit.branchTest32(MacroAssembler::Zero, valuePayloadGPR);
+ m_jit.sub32(TrustedImm32(1), valuePayloadGPR);
m_jit.store32(
- valueTagGPR, MacroAssembler::Address(storageGPR, Butterfly::offsetOfPublicLength()));
+ valuePayloadGPR, MacroAssembler::Address(storageGPR, Butterfly::offsetOfPublicLength()));
m_jit.load32(
- MacroAssembler::BaseIndex(storageGPR, valueTagGPR, MacroAssembler::TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.payload)),
- valuePayloadGPR);
- m_jit.load32(
- MacroAssembler::BaseIndex(storageGPR, valueTagGPR, MacroAssembler::TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.tag)),
+ MacroAssembler::BaseIndex(storageGPR, valuePayloadGPR, MacroAssembler::TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.tag)),
valueTagGPR);
MacroAssembler::Jump slowCase = m_jit.branch32(MacroAssembler::Equal, valueTagGPR, TrustedImm32(JSValue::EmptyValueTag));
+ m_jit.store32(
+ MacroAssembler::TrustedImm32(JSValue::EmptyValueTag),
+ MacroAssembler::BaseIndex(storageGPR, valuePayloadGPR, MacroAssembler::TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.tag)));
+ m_jit.load32(
+ MacroAssembler::BaseIndex(storageGPR, valuePayloadGPR, MacroAssembler::TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.payload)),
+ valuePayloadGPR);
addSlowPathGenerator(
slowPathMove(
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
index 0928dfa58..daca71da7 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
@@ -3191,24 +3191,30 @@ void SpeculativeJIT::compile(Node& node)
SpeculateCellOperand base(this, node.child1());
StorageOperand storage(this, node.child2());
GPRTemporary value(this);
+ GPRTemporary storageLength(this);
GPRReg baseGPR = base.gpr();
GPRReg storageGPR = storage.gpr();
GPRReg valueGPR = value.gpr();
+ GPRReg storageLengthGPR = storageLength.gpr();
switch (node.arrayMode()) {
case Array::ArrayWithContiguous:
case Array::ArrayWithContiguousOutOfBounds: {
m_jit.load32(
- MacroAssembler::Address(storageGPR, Butterfly::offsetOfPublicLength()), valueGPR);
+ MacroAssembler::Address(storageGPR, Butterfly::offsetOfPublicLength()), storageLengthGPR);
MacroAssembler::Jump undefinedCase =
- m_jit.branchTest32(MacroAssembler::Zero, valueGPR);
- m_jit.sub32(TrustedImm32(1), valueGPR);
+ m_jit.branchTest32(MacroAssembler::Zero, storageLengthGPR);
+ m_jit.sub32(TrustedImm32(1), storageLengthGPR);
m_jit.store32(
- valueGPR, MacroAssembler::Address(storageGPR, Butterfly::offsetOfPublicLength()));
+ storageLengthGPR, MacroAssembler::Address(storageGPR, Butterfly::offsetOfPublicLength()));
m_jit.loadPtr(
- MacroAssembler::BaseIndex(storageGPR, valueGPR, MacroAssembler::ScalePtr),
+ MacroAssembler::BaseIndex(storageGPR, storageLengthGPR, MacroAssembler::ScalePtr),
valueGPR);
+ // FIXME: This would not have to be here if changing the publicLength also zeroed the values between the old
+ // length and the new length.
+ m_jit.storePtr(
+ MacroAssembler::TrustedImmPtr(0), MacroAssembler::BaseIndex(storageGPR, storageLengthGPR, MacroAssembler::ScalePtr));
MacroAssembler::Jump slowCase = m_jit.branchTestPtr(MacroAssembler::Zero, valueGPR);
addSlowPathGenerator(
@@ -3225,8 +3231,6 @@ void SpeculativeJIT::compile(Node& node)
case Array::ArrayWithArrayStorage:
case Array::ArrayWithArrayStorageOutOfBounds: {
- GPRTemporary storageLength(this);
- GPRReg storageLengthGPR = storageLength.gpr();
m_jit.load32(MacroAssembler::Address(storageGPR, ArrayStorage::lengthOffset()), storageLengthGPR);
JITCompiler::Jump undefinedCase =
diff --git a/Source/JavaScriptCore/heap/BlockAllocator.cpp b/Source/JavaScriptCore/heap/BlockAllocator.cpp
index 9a2e0bf60..16f607396 100644
--- a/Source/JavaScriptCore/heap/BlockAllocator.cpp
+++ b/Source/JavaScriptCore/heap/BlockAllocator.cpp
@@ -102,6 +102,7 @@ void BlockAllocator::blockFreeingThreadStartFunc(void* blockAllocator)
void BlockAllocator::blockFreeingThreadMain()
{
+ size_t currentNumberOfEmptyRegions;
while (!m_blockFreeingThreadShouldQuit) {
// Generally wait for one second before scavenging free blocks. This
// may return early, particularly when we're being asked to quit.
@@ -114,12 +115,17 @@ void BlockAllocator::blockFreeingThreadMain()
continue;
}
- // Now process the list of free blocks. Keep freeing until half of the
- // blocks that are currently on the list are gone. Assume that a size_t
- // field can be accessed atomically.
- size_t currentNumberOfEmptyRegions = m_numberOfEmptyRegions;
- if (!currentNumberOfEmptyRegions)
- continue;
+ // Sleep until there is actually work to do rather than waking up every second to check.
+ {
+ MutexLocker locker(m_emptyRegionConditionLock);
+ SpinLockHolder regionLocker(&m_regionLock);
+ while (!m_numberOfEmptyRegions && !m_blockFreeingThreadShouldQuit) {
+ m_regionLock.Unlock();
+ m_emptyRegionCondition.wait(m_emptyRegionConditionLock);
+ m_regionLock.Lock();
+ }
+ currentNumberOfEmptyRegions = m_numberOfEmptyRegions;
+ }
size_t desiredNumberOfEmptyRegions = currentNumberOfEmptyRegions / 2;
@@ -141,16 +147,6 @@ void BlockAllocator::blockFreeingThreadMain()
delete region;
}
-
- // Sleep until there is actually work to do rather than waking up every second to check.
- MutexLocker locker(m_emptyRegionConditionLock);
- m_regionLock.Lock();
- while (!m_numberOfEmptyRegions && !m_blockFreeingThreadShouldQuit) {
- m_regionLock.Unlock();
- m_emptyRegionCondition.wait(m_emptyRegionConditionLock);
- m_regionLock.Lock();
- }
- m_regionLock.Unlock();
}
}
diff --git a/Source/JavaScriptCore/heap/HeapStatistics.cpp b/Source/JavaScriptCore/heap/HeapStatistics.cpp
index 68044e0b3..8340bfa37 100644
--- a/Source/JavaScriptCore/heap/HeapStatistics.cpp
+++ b/Source/JavaScriptCore/heap/HeapStatistics.cpp
@@ -138,12 +138,6 @@ void HeapStatistics::reportSuccess()
#endif // OS(UNIX)
-size_t HeapStatistics::usedJSHeap()
-{
- JSGlobalData* globalData = &JSGlobalData::sharedInstance();
- return globalData->heap.size();
-}
-
size_t HeapStatistics::parseMemoryAmount(char* s)
{
size_t multiplier = 1;
diff --git a/Source/JavaScriptCore/heap/HeapStatistics.h b/Source/JavaScriptCore/heap/HeapStatistics.h
index 34d05af7c..0800f0c16 100644
--- a/Source/JavaScriptCore/heap/HeapStatistics.h
+++ b/Source/JavaScriptCore/heap/HeapStatistics.h
@@ -36,7 +36,6 @@ class HeapStatistics {
public:
NO_RETURN static void exitWithFailure();
JS_EXPORT_PRIVATE static void reportSuccess();
- JS_EXPORT_PRIVATE static size_t usedJSHeap();
static void initialize();
static void recordGCPauseTime(double start, double end);
diff --git a/Source/JavaScriptCore/jit/JIT.cpp b/Source/JavaScriptCore/jit/JIT.cpp
index 49f9ec3b5..4eab17661 100644
--- a/Source/JavaScriptCore/jit/JIT.cpp
+++ b/Source/JavaScriptCore/jit/JIT.cpp
@@ -312,6 +312,7 @@ void JIT::privateCompileMainPass()
DEFINE_OP(op_neq)
DEFINE_OP(op_neq_null)
DEFINE_OP(op_new_array)
+ DEFINE_OP(op_new_array_with_size)
DEFINE_OP(op_new_array_buffer)
DEFINE_OP(op_new_func)
DEFINE_OP(op_new_func_exp)
diff --git a/Source/JavaScriptCore/jit/JIT.h b/Source/JavaScriptCore/jit/JIT.h
index 3e16972e2..054718573 100644
--- a/Source/JavaScriptCore/jit/JIT.h
+++ b/Source/JavaScriptCore/jit/JIT.h
@@ -718,6 +718,7 @@ namespace JSC {
void emit_op_neq(Instruction*);
void emit_op_neq_null(Instruction*);
void emit_op_new_array(Instruction*);
+ void emit_op_new_array_with_size(Instruction*);
void emit_op_new_array_buffer(Instruction*);
void emit_op_new_func(Instruction*);
void emit_op_new_func_exp(Instruction*);
diff --git a/Source/JavaScriptCore/jit/JITOpcodes.cpp b/Source/JavaScriptCore/jit/JITOpcodes.cpp
index 33db1d44f..c187e4725 100644
--- a/Source/JavaScriptCore/jit/JITOpcodes.cpp
+++ b/Source/JavaScriptCore/jit/JITOpcodes.cpp
@@ -1694,6 +1694,17 @@ void JIT::emitSlow_op_new_array(Instruction* currentInstruction, Vector<SlowCase
stubCall.call(currentInstruction[1].u.operand);
}
+void JIT::emit_op_new_array_with_size(Instruction* currentInstruction)
+{
+ JITStubCall stubCall(this, cti_op_new_array_with_size);
+#if USE(JSVALUE64)
+ stubCall.addArgument(currentInstruction[2].u.operand, regT2);
+#else
+ stubCall.addArgument(currentInstruction[2].u.operand);
+#endif
+ stubCall.call(currentInstruction[1].u.operand);
+}
+
void JIT::emit_op_new_array_buffer(Instruction* currentInstruction)
{
JITStubCall stubCall(this, cti_op_new_array_buffer);
diff --git a/Source/JavaScriptCore/jit/JITPropertyAccess.cpp b/Source/JavaScriptCore/jit/JITPropertyAccess.cpp
index 9deded62a..8a4017f1d 100644
--- a/Source/JavaScriptCore/jit/JITPropertyAccess.cpp
+++ b/Source/JavaScriptCore/jit/JITPropertyAccess.cpp
@@ -278,7 +278,7 @@ void JIT::emitSlow_op_get_by_pname(Instruction* currentInstruction, Vector<SlowC
linkSlowCase(iter);
linkSlowCase(iter);
- JITStubCall stubCall(this, cti_op_get_by_val);
+ JITStubCall stubCall(this, cti_op_get_by_val_generic);
stubCall.addArgument(base, regT2);
stubCall.addArgument(property, regT2);
stubCall.call(dst);
diff --git a/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp b/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
index e7c4a479b..a4a547889 100644
--- a/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
+++ b/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
@@ -1226,7 +1226,7 @@ void JIT::emitSlow_op_get_by_pname(Instruction* currentInstruction, Vector<SlowC
linkSlowCase(iter);
linkSlowCase(iter);
- JITStubCall stubCall(this, cti_op_get_by_val);
+ JITStubCall stubCall(this, cti_op_get_by_val_generic);
stubCall.addArgument(base);
stubCall.addArgument(property);
stubCall.call(dst);
diff --git a/Source/JavaScriptCore/jit/JITStubs.cpp b/Source/JavaScriptCore/jit/JITStubs.cpp
index 1a2c654bc..f1f2f4c9d 100644
--- a/Source/JavaScriptCore/jit/JITStubs.cpp
+++ b/Source/JavaScriptCore/jit/JITStubs.cpp
@@ -35,6 +35,7 @@
#include "CommonSlowPaths.h"
#include "Arguments.h"
+#include "ArrayConstructor.h"
#include "CallFrame.h"
#include "CodeBlock.h"
#include "CodeProfiling.h"
@@ -2360,6 +2361,13 @@ DEFINE_STUB_FUNCTION(JSObject*, op_new_array)
return constructArray(stackFrame.callFrame, reinterpret_cast<JSValue*>(&stackFrame.callFrame->registers()[stackFrame.args[0].int32()]), stackFrame.args[1].int32());
}
+DEFINE_STUB_FUNCTION(JSObject*, op_new_array_with_size)
+{
+ STUB_INIT_STACK_FRAME(stackFrame);
+
+ return constructArrayWithSizeQuirk(stackFrame.callFrame, stackFrame.callFrame->lexicalGlobalObject(), stackFrame.args[0].jsValue());
+}
+
DEFINE_STUB_FUNCTION(JSObject*, op_new_array_buffer)
{
STUB_INIT_STACK_FRAME(stackFrame);
diff --git a/Source/JavaScriptCore/jit/JITStubs.h b/Source/JavaScriptCore/jit/JITStubs.h
index ecf415d1f..4a3b252d6 100644
--- a/Source/JavaScriptCore/jit/JITStubs.h
+++ b/Source/JavaScriptCore/jit/JITStubs.h
@@ -413,6 +413,7 @@ extern "C" {
EncodedJSValue JIT_STUB cti_op_urshift(STUB_ARGS_DECLARATION) WTF_INTERNAL;
EncodedJSValue JIT_STUB cti_to_object(STUB_ARGS_DECLARATION) WTF_INTERNAL;
JSObject* JIT_STUB cti_op_new_array(STUB_ARGS_DECLARATION) WTF_INTERNAL;
+ JSObject* JIT_STUB cti_op_new_array_with_size(STUB_ARGS_DECLARATION) WTF_INTERNAL;
JSObject* JIT_STUB cti_op_new_array_buffer(STUB_ARGS_DECLARATION) WTF_INTERNAL;
JSObject* JIT_STUB cti_op_new_func(STUB_ARGS_DECLARATION) WTF_INTERNAL;
JSObject* JIT_STUB cti_op_new_func_exp(STUB_ARGS_DECLARATION) WTF_INTERNAL;
diff --git a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
index 5a9b41da7..fbf5b8598 100644
--- a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
+++ b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
@@ -29,6 +29,7 @@
#if ENABLE(LLINT)
#include "Arguments.h"
+#include "ArrayConstructor.h"
#include "CallFrame.h"
#include "CommonSlowPaths.h"
#include "GetterSetter.h"
@@ -504,6 +505,12 @@ LLINT_SLOW_PATH_DECL(slow_path_new_array)
LLINT_RETURN(constructArray(exec, bitwise_cast<JSValue*>(&LLINT_OP(2)), pc[3].u.operand));
}
+LLINT_SLOW_PATH_DECL(slow_path_new_array_with_size)
+{
+ LLINT_BEGIN();
+ LLINT_RETURN(constructArrayWithSizeQuirk(exec, exec->lexicalGlobalObject(), LLINT_OP_C(2).jsValue()));
+}
+
LLINT_SLOW_PATH_DECL(slow_path_new_array_buffer)
{
LLINT_BEGIN();
diff --git a/Source/JavaScriptCore/llint/LLIntSlowPaths.h b/Source/JavaScriptCore/llint/LLIntSlowPaths.h
index 5bfb0ccdf..3d770f3c5 100644
--- a/Source/JavaScriptCore/llint/LLIntSlowPaths.h
+++ b/Source/JavaScriptCore/llint/LLIntSlowPaths.h
@@ -121,6 +121,7 @@ LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_create_this);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_convert_this);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_object);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_array);
+LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_array_with_size);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_array_buffer);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_regexp);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_not);
diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
index a971abf4f..ad509e05d 100644
--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
@@ -428,6 +428,12 @@ _llint_op_new_array:
dispatch(4)
+_llint_op_new_array_with_size:
+ traceExecution()
+ callSlowPath(_llint_slow_path_new_array_with_size)
+ dispatch(3)
+
+
_llint_op_new_array_buffer:
traceExecution()
callSlowPath(_llint_slow_path_new_array_buffer)
diff --git a/Source/JavaScriptCore/runtime/ArrayConstructor.cpp b/Source/JavaScriptCore/runtime/ArrayConstructor.cpp
index a13648442..5c2cd7167 100644
--- a/Source/JavaScriptCore/runtime/ArrayConstructor.cpp
+++ b/Source/JavaScriptCore/runtime/ArrayConstructor.cpp
@@ -77,17 +77,24 @@ bool ArrayConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exe
// ------------------------------ Functions ---------------------------
+JSObject* constructArrayWithSizeQuirk(ExecState* exec, JSGlobalObject* globalObject, JSValue length)
+{
+ if (!length.isNumber())
+ return constructArray(exec, globalObject, &length, 1);
+
+ uint32_t n = length.toUInt32(exec);
+ if (n != length.toNumber(exec))
+ return throwError(exec, createRangeError(exec, ASCIILiteral("Array size is not a small enough positive integer.")));
+ return constructEmptyArray(exec, globalObject, n);
+}
+
static inline JSObject* constructArrayWithSizeQuirk(ExecState* exec, const ArgList& args)
{
JSGlobalObject* globalObject = asInternalFunction(exec->callee())->globalObject();
// a single numeric argument denotes the array size (!)
- if (args.size() == 1 && args.at(0).isNumber()) {
- uint32_t n = args.at(0).toUInt32(exec);
- if (n != args.at(0).toNumber(exec))
- return throwError(exec, createRangeError(exec, ASCIILiteral("Array size is not a small enough positive integer.")));
- return constructEmptyArray(exec, globalObject, n);
- }
+ if (args.size() == 1)
+ return constructArrayWithSizeQuirk(exec, globalObject, args.at(0));
// otherwise the array is constructed with the arguments in it
return constructArray(exec, globalObject, args);
diff --git a/Source/JavaScriptCore/runtime/ArrayConstructor.h b/Source/JavaScriptCore/runtime/ArrayConstructor.h
index b223a0f13..dcbf0a1b3 100644
--- a/Source/JavaScriptCore/runtime/ArrayConstructor.h
+++ b/Source/JavaScriptCore/runtime/ArrayConstructor.h
@@ -26,6 +26,7 @@
namespace JSC {
class ArrayPrototype;
+ class JSArray;
class ArrayConstructor : public InternalFunction {
public:
@@ -59,6 +60,8 @@ namespace JSC {
static CallType getCallData(JSCell*, CallData&);
};
+ JSObject* constructArrayWithSizeQuirk(ExecState*, JSGlobalObject*, JSValue);
+
} // namespace JSC
#endif // ArrayConstructor_h
diff --git a/Source/JavaScriptCore/runtime/CommonIdentifiers.h b/Source/JavaScriptCore/runtime/CommonIdentifiers.h
index e15335ef0..ae3b45b8c 100644
--- a/Source/JavaScriptCore/runtime/CommonIdentifiers.h
+++ b/Source/JavaScriptCore/runtime/CommonIdentifiers.h
@@ -29,6 +29,7 @@
#define JSC_COMMON_IDENTIFIERS_EACH_PROPERTY_NAME(macro) \
macro(apply) \
macro(arguments) \
+ macro(Array) \
macro(bind) \
macro(call) \
macro(callee) \
@@ -54,6 +55,7 @@
macro(multiline) \
macro(name) \
macro(now) \
+ macro(Object) \
macro(parse) \
macro(propertyIsEnumerable) \
macro(prototype) \
diff --git a/Source/JavaScriptCore/runtime/JSGlobalObject.cpp b/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
index 9eb266135..03252fad1 100644
--- a/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
+++ b/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
@@ -289,9 +289,9 @@ void JSGlobalObject::reset(JSValue prototype)
m_regExpPrototype->putDirectWithoutTransition(exec->globalData(), exec->propertyNames().constructor, m_regExpConstructor.get(), DontEnum);
m_errorPrototype->putDirectWithoutTransition(exec->globalData(), exec->propertyNames().constructor, m_errorConstructor.get(), DontEnum);
- putDirectWithoutTransition(exec->globalData(), Identifier(exec, "Object"), objectConstructor, DontEnum);
+ putDirectWithoutTransition(exec->globalData(), exec->propertyNames().Object, objectConstructor, DontEnum);
putDirectWithoutTransition(exec->globalData(), Identifier(exec, "Function"), functionConstructor, DontEnum);
- putDirectWithoutTransition(exec->globalData(), Identifier(exec, "Array"), arrayConstructor, DontEnum);
+ putDirectWithoutTransition(exec->globalData(), exec->propertyNames().Array, arrayConstructor, DontEnum);
putDirectWithoutTransition(exec->globalData(), Identifier(exec, "Boolean"), booleanConstructor, DontEnum);
putDirectWithoutTransition(exec->globalData(), Identifier(exec, "String"), stringConstructor, DontEnum);
putDirectWithoutTransition(exec->globalData(), Identifier(exec, "Number"), numberConstructor, DontEnum);
@@ -320,6 +320,8 @@ void JSGlobalObject::reset(JSValue prototype)
m_specialPointers[Special::CallFunction] = m_callFunction.get();
m_specialPointers[Special::ApplyFunction] = m_applyFunction.get();
+ m_specialPointers[Special::ObjectConstructor] = objectConstructor;
+ m_specialPointers[Special::ArrayConstructor] = arrayConstructor;
if (m_experimentsEnabled) {
NamePrototype* privateNamePrototype = NamePrototype::create(exec, NamePrototype::createStructure(exec->globalData(), this, m_objectPrototype.get()));
diff --git a/Source/JavaScriptCore/runtime/StringPrototype.cpp b/Source/JavaScriptCore/runtime/StringPrototype.cpp
index 1540177be..4d3ccfda2 100644
--- a/Source/JavaScriptCore/runtime/StringPrototype.cpp
+++ b/Source/JavaScriptCore/runtime/StringPrototype.cpp
@@ -280,7 +280,7 @@ static ALWAYS_INLINE JSValue jsSpliceSubstrings(ExecState* exec, JSString* sourc
if (position <= 0 && length >= sourceSize)
return sourceVal;
// We could call String::substringSharingImpl(), but this would result in redundant checks.
- return jsString(exec, StringImpl::create(source.impl(), max(0, position), min(sourceSize, length)));
+ return jsString(exec, StringImpl::create(source.impl(), std::max(0, position), std::min(sourceSize, length)));
}
int totalLength = 0;
@@ -335,7 +335,7 @@ static ALWAYS_INLINE JSValue jsSpliceSubstringsWithSeparators(ExecState* exec, J
if (position <= 0 && length >= sourceSize)
return sourceVal;
// We could call String::substringSharingImpl(), but this would result in redundant checks.
- return jsString(exec, StringImpl::create(source.impl(), max(0, position), min(sourceSize, length)));
+ return jsString(exec, StringImpl::create(source.impl(), std::max(0, position), std::min(sourceSize, length)));
}
int totalLength = 0;
@@ -359,7 +359,7 @@ static ALWAYS_INLINE JSValue jsSpliceSubstringsWithSeparators(ExecState* exec, J
if (!impl)
return throwOutOfMemoryError(exec);
- int maxCount = max(rangeCount, separatorCount);
+ int maxCount = std::max(rangeCount, separatorCount);
int bufferPos = 0;
for (int i = 0; i < maxCount; i++) {
if (i < rangeCount) {
@@ -384,18 +384,24 @@ static ALWAYS_INLINE JSValue jsSpliceSubstringsWithSeparators(ExecState* exec, J
if (!impl)
return throwOutOfMemoryError(exec);
- int maxCount = max(rangeCount, separatorCount);
+ int maxCount = std::max(rangeCount, separatorCount);
int bufferPos = 0;
for (int i = 0; i < maxCount; i++) {
if (i < rangeCount) {
if (int srcLen = substringRanges[i].length) {
- StringImpl::copyChars(buffer + bufferPos, source.characters() + substringRanges[i].position, srcLen);
+ if (source.is8Bit())
+ StringImpl::copyChars(buffer + bufferPos, source.characters8() + substringRanges[i].position, srcLen);
+ else
+ StringImpl::copyChars(buffer + bufferPos, source.characters16() + substringRanges[i].position, srcLen);
bufferPos += srcLen;
}
}
if (i < separatorCount) {
if (int sepLen = separators[i].length()) {
- StringImpl::copyChars(buffer + bufferPos, separators[i].characters(), sepLen);
+ if (separators[i].is8Bit())
+ StringImpl::copyChars(buffer + bufferPos, separators[i].characters8(), sepLen);
+ else
+ StringImpl::copyChars(buffer + bufferPos, separators[i].characters16(), sepLen);
bufferPos += sepLen;
}
}
@@ -767,7 +773,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncIndexOf(ExecState* exec)
unsigned pos;
int len = s.length();
if (a1.isUInt32())
- pos = min<uint32_t>(a1.asUInt32(), len);
+ pos = std::min<uint32_t>(a1.asUInt32(), len);
else {
double dpos = a1.toInteger(exec);
if (dpos < 0)
diff --git a/Source/JavaScriptCore/yarr/YarrPattern.cpp b/Source/JavaScriptCore/yarr/YarrPattern.cpp
index 5080929f4..c953a38d2 100644
--- a/Source/JavaScriptCore/yarr/YarrPattern.cpp
+++ b/Source/JavaScriptCore/yarr/YarrPattern.cpp
@@ -657,8 +657,8 @@ public:
for (unsigned alt = 0; alt < disjunction->m_alternatives.size(); ++alt) {
PatternAlternative* alternative = disjunction->m_alternatives[alt];
unsigned currentAlternativeCallFrameSize = setupAlternativeOffsets(alternative, initialCallFrameSize, initialInputPosition);
- minimumInputSize = min(minimumInputSize, alternative->m_minimumSize);
- maximumCallFrameSize = max(maximumCallFrameSize, currentAlternativeCallFrameSize);
+ minimumInputSize = std::min(minimumInputSize, alternative->m_minimumSize);
+ maximumCallFrameSize = std::max(maximumCallFrameSize, currentAlternativeCallFrameSize);
hasFixedSize &= alternative->m_hasFixedSize;
}
diff --git a/Source/Platform/ChangeLog b/Source/Platform/ChangeLog
index 28c5cd182..71c773ce1 100644
--- a/Source/Platform/ChangeLog
+++ b/Source/Platform/ChangeLog
@@ -1,3 +1,12 @@
+2012-10-17 Adrienne Walker <enne@chromium.org>
+
+ [chromium] Make WebContentLayer include what it uses
+ https://bugs.webkit.org/show_bug.cgi?id=99664
+
+ Reviewed by James Robinson.
+
+ * chromium/public/WebContentLayer.h:
+
2012-10-17 Harald Alvestrand <hta@google.com>
Implement the Selector argument to RTCPeerConnection.getStats
diff --git a/Source/Platform/chromium/public/WebContentLayer.h b/Source/Platform/chromium/public/WebContentLayer.h
index 7bd2579ac..a0ed0e4eb 100644
--- a/Source/Platform/chromium/public/WebContentLayer.h
+++ b/Source/Platform/chromium/public/WebContentLayer.h
@@ -27,6 +27,7 @@
#define WebContentLayer_h
#include "WebCommon.h"
+#include "WebLayer.h"
namespace WebKit {
class WebContentLayerClient;
diff --git a/Source/QtWebKit.pro b/Source/QtWebKit.pro
index b15862556..59f9a0d81 100644
--- a/Source/QtWebKit.pro
+++ b/Source/QtWebKit.pro
@@ -19,8 +19,6 @@ build?(webkit2) {
}
}
-include(WebKit/qt/docs/docs.pri)
-
declarative.file = WebKit/qt/declarative/declarative.pro
declarative.makefile = Makefile.declarative
have?(QTQUICK): SUBDIRS += declarative
diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog
index 2248da4f6..fc9ae9456 100644
--- a/Source/WTF/ChangeLog
+++ b/Source/WTF/ChangeLog
@@ -1,3 +1,76 @@
+2012-10-17 Anders Carlsson <andersca@apple.com>
+
+ Clean up Vector.h
+ https://bugs.webkit.org/show_bug.cgi?id=99622
+
+ Reviewed by Benjamin Poulain.
+
+ Remove unused member functions from Vector and get rid of the std::max and std::min using declarations
+ (as per the WebKit coding style guidelines).
+
+ * WTF.xcodeproj/project.pbxproj:
+ Turns out StreamBuffer.h was never added to the Xcode project; add it. Also go ahead and sort the project file.
+
+ * wtf/Deque.h:
+ (WTF::::expandCapacity):
+ * wtf/StreamBuffer.h:
+ (WTF::StreamBuffer::append):
+ Add std:: prefixes to max and min.
+
+ * wtf/Vector.h:
+ Remove VectorBase::bufferSlot(), VectorReverseProxy and add std:: prefixes where needed.
+
+2012-10-17 Michael Saboff <msaboff@apple.com>
+
+ Creating a String from an NSString should check for all 8 bit strings
+ https://bugs.webkit.org/show_bug.cgi?id=99392
+
+ Reviewed by Geoffrey Garen.
+
+ Exported the LChar* version of create().
+
+ * wtf/text/StringImpl.cpp:
+ (WTF::StringImpl::create):
+
+2012-10-17 Michael Saboff <msaboff@apple.com>
+
+ StringImpl::findIgnoringCase() and reverseFindIgnoringCase() don't optimally handle a mix of 8 and 16 bit strings
+ https://bugs.webkit.org/show_bug.cgi?id=99224
+
+ Reviewed by Geoffrey Garen.
+
+ Added helper templated functions and all four combinations similar to find() and reverseFind().
+
+ (WTF::findIgnoringCaseInner):
+ (WTF::StringImpl::findIgnoringCase):
+ (WTF::reverseFindIgnoringCaseInner):
+ (WTF::StringImpl::reverseFindIgnoringCase):
+
+2012-10-17 Michael Saboff <msaboff@apple.com>
+
+ AtomicString::HashAndUTF8CharactersTranslator::equal() doesn't optimally handle 8 bit strings
+ https://bugs.webkit.org/show_bug.cgi?id=99223
+
+ Reviewed by Geoffrey Garen.
+
+ Added an 8 bit path.
+
+ * wtf/text/AtomicString.cpp:
+ (WTF::HashAndUTF8CharactersTranslator::equal):
+
+2012-10-17 Anders Carlsson <andersca@apple.com>
+
+ Always use fastRealloc when growing or shrinking the Vector buffer
+ https://bugs.webkit.org/show_bug.cgi?id=99616
+
+ Reviewed by Andreas Kling.
+
+ Remove the pointless #if PLATFORM(BLACKBERRY) and always try to use fastRealloc to grow or shrink the
+ vector buffer when possible; realloc should always be at least as fast as free+malloc.
+
+ * wtf/Vector.h:
+ (WTF::VectorBufferBase::shouldReallocateBuffer):
+
2012-10-16 Michael Saboff <msaboff@apple.com>
Change WTF_USE_8BIT_TEXTRUN to ENABLE_8BIT_TEXTRUN
diff --git a/Source/WTF/WTF.xcodeproj/project.pbxproj b/Source/WTF/WTF.xcodeproj/project.pbxproj
index b8aa53be4..c2ff612e0 100644
--- a/Source/WTF/WTF.xcodeproj/project.pbxproj
+++ b/Source/WTF/WTF.xcodeproj/project.pbxproj
@@ -11,6 +11,7 @@
143F611F1565F0F900DB514A /* RAMSize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 143F611D1565F0F900DB514A /* RAMSize.cpp */; };
143F61201565F0F900DB514A /* RAMSize.h in Headers */ = {isa = PBXBuildFile; fileRef = 143F611E1565F0F900DB514A /* RAMSize.h */; settings = {ATTRIBUTES = (Private, ); }; };
14F3B0F715E45E4600210069 /* SaturatedArithmetic.h in Headers */ = {isa = PBXBuildFile; fileRef = 14F3B0F615E45E4600210069 /* SaturatedArithmetic.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 1A6BB769162F300500DD16DB /* StreamBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6BB768162F300500DD16DB /* StreamBuffer.h */; };
26147B0A15DDCCDC00DDB907 /* IntegerToStringConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 26147B0815DDCCDC00DDB907 /* IntegerToStringConversion.h */; };
2661122E160FEAD40013F5C3 /* URLQueryCharsetConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2661122D160FEAD40013F5C3 /* URLQueryCharsetConverter.h */; };
26E6C1EE1609037300CA6AF4 /* URLCanonEtc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26E6C1CE1609037300CA6AF4 /* URLCanonEtc.cpp */; };
@@ -68,7 +69,6 @@
A8A4738F151A825B004123FF /* BloomFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47265151A825A004123FF /* BloomFilter.h */; };
A8A47390151A825B004123FF /* BoundsCheckedPointer.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47266151A825A004123FF /* BoundsCheckedPointer.h */; };
A8A47391151A825B004123FF /* BumpPointerAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47267151A825A004123FF /* BumpPointerAllocator.h */; };
- EB95E1F0161A72410089A2F5 /* ByteOrder.h in Headers */ = {isa = PBXBuildFile; fileRef = EB95E1EF161A72410089A2F5 /* ByteOrder.h */; };
A8A47394151A825B004123FF /* CheckedArithmetic.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4726A151A825A004123FF /* CheckedArithmetic.h */; };
A8A47395151A825B004123FF /* CheckedBoolean.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4726B151A825A004123FF /* CheckedBoolean.h */; };
A8A47398151A825B004123FF /* Compiler.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47270151A825A004123FF /* Compiler.h */; };
@@ -278,6 +278,7 @@
A8A4748C151A8264004123FF /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4748B151A8264004123FF /* config.h */; };
CD5497AC15857D0300B5BC30 /* MediaTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD5497AA15857D0300B5BC30 /* MediaTime.cpp */; };
CD5497AD15857D0300B5BC30 /* MediaTime.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5497AB15857D0300B5BC30 /* MediaTime.h */; };
+ EB95E1F0161A72410089A2F5 /* ByteOrder.h in Headers */ = {isa = PBXBuildFile; fileRef = EB95E1EF161A72410089A2F5 /* ByteOrder.h */; };
F3525E461619A4EE00278BC1 /* MemoryInstrumentationHashMap.h in Headers */ = {isa = PBXBuildFile; fileRef = F3525E451619A4EE00278BC1 /* MemoryInstrumentationHashMap.h */; };
F3FBC71E161AF7BF00BB4BD4 /* MemoryInstrumentationHashCountedSet.h in Headers */ = {isa = PBXBuildFile; fileRef = F3FBC71D161AF7BF00BB4BD4 /* MemoryInstrumentationHashCountedSet.h */; };
F3FBC720161AF7CD00BB4BD4 /* MemoryInstrumentationSequence.h in Headers */ = {isa = PBXBuildFile; fileRef = F3FBC71F161AF7CD00BB4BD4 /* MemoryInstrumentationSequence.h */; };
@@ -288,6 +289,7 @@
143F611D1565F0F900DB514A /* RAMSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RAMSize.cpp; sourceTree = "<group>"; };
143F611E1565F0F900DB514A /* RAMSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RAMSize.h; sourceTree = "<group>"; };
14F3B0F615E45E4600210069 /* SaturatedArithmetic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SaturatedArithmetic.h; sourceTree = "<group>"; };
+ 1A6BB768162F300500DD16DB /* StreamBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamBuffer.h; sourceTree = "<group>"; };
26147B0815DDCCDC00DDB907 /* IntegerToStringConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntegerToStringConversion.h; sourceTree = "<group>"; };
2661122D160FEAD40013F5C3 /* URLQueryCharsetConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLQueryCharsetConverter.h; sourceTree = "<group>"; };
26E6C1CE1609037300CA6AF4 /* URLCanonEtc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URLCanonEtc.cpp; sourceTree = "<group>"; };
@@ -351,7 +353,6 @@
A8A47265151A825A004123FF /* BloomFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BloomFilter.h; sourceTree = "<group>"; };
A8A47266151A825A004123FF /* BoundsCheckedPointer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoundsCheckedPointer.h; sourceTree = "<group>"; };
A8A47267151A825A004123FF /* BumpPointerAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BumpPointerAllocator.h; sourceTree = "<group>"; };
- EB95E1EF161A72410089A2F5 /* ByteOrder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByteOrder.h; sourceTree = "<group>"; };
A8A4726A151A825A004123FF /* CheckedArithmetic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CheckedArithmetic.h; sourceTree = "<group>"; };
A8A4726B151A825A004123FF /* CheckedBoolean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CheckedBoolean.h; sourceTree = "<group>"; };
A8A47270151A825A004123FF /* Compiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Compiler.h; sourceTree = "<group>"; };
@@ -564,6 +565,7 @@
A8A4748B151A8264004123FF /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
CD5497AA15857D0300B5BC30 /* MediaTime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaTime.cpp; sourceTree = "<group>"; };
CD5497AB15857D0300B5BC30 /* MediaTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaTime.h; sourceTree = "<group>"; };
+ EB95E1EF161A72410089A2F5 /* ByteOrder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByteOrder.h; sourceTree = "<group>"; };
F3525E451619A4EE00278BC1 /* MemoryInstrumentationHashMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryInstrumentationHashMap.h; sourceTree = "<group>"; };
F3FBC71D161AF7BF00BB4BD4 /* MemoryInstrumentationHashCountedSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryInstrumentationHashCountedSet.h; sourceTree = "<group>"; };
F3FBC71F161AF7CD00BB4BD4 /* MemoryInstrumentationSequence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryInstrumentationSequence.h; sourceTree = "<group>"; };
@@ -778,6 +780,7 @@
A8A4730F151A825B004123FF /* StackBounds.h */,
A8A47310151A825B004123FF /* StaticConstructors.h */,
A8A47311151A825B004123FF /* StdLibExtras.h */,
+ 1A6BB768162F300500DD16DB /* StreamBuffer.h */,
A8A47312151A825B004123FF /* StringExtras.cpp */,
A8A47313151A825B004123FF /* StringExtras.h */,
A8A47314151A825B004123FF /* StringHasher.h */,
@@ -1063,6 +1066,15 @@
A8A473E8151A825B004123FF /* MathExtras.h in Headers */,
A8A473EA151A825B004123FF /* MD5.h in Headers */,
CD5497AD15857D0300B5BC30 /* MediaTime.h in Headers */,
+ 4F1D115415FF11BE0026E908 /* MemoryInstrumentation.h in Headers */,
+ 4FD8554716133E0E00C5B704 /* MemoryInstrumentationArrayBufferView.h in Headers */,
+ F3FBC71E161AF7BF00BB4BD4 /* MemoryInstrumentationHashCountedSet.h in Headers */,
+ F3525E461619A4EE00278BC1 /* MemoryInstrumentationHashMap.h in Headers */,
+ 4F1B2DB6160B44AA00586559 /* MemoryInstrumentationHashSet.h in Headers */,
+ 4FD2A359161B0EE100EBF236 /* MemoryInstrumentationParsedURL.h in Headers */,
+ F3FBC720161AF7CD00BB4BD4 /* MemoryInstrumentationSequence.h in Headers */,
+ 4FCF27E116172E8600CBF037 /* MemoryInstrumentationString.h in Headers */,
+ 4FCB710A160A1A07008425EC /* MemoryInstrumentationVector.h in Headers */,
A8A473EB151A825B004123FF /* MessageQueue.h in Headers */,
A8A473ED151A825B004123FF /* MetaAllocator.h in Headers */,
A8A473EE151A825B004123FF /* MetaAllocatorHandle.h in Headers */,
@@ -1114,6 +1126,7 @@
A8A47428151A825B004123FF /* StackBounds.h in Headers */,
A8A47429151A825B004123FF /* StaticConstructors.h in Headers */,
A8A4742A151A825B004123FF /* StdLibExtras.h in Headers */,
+ 1A6BB769162F300500DD16DB /* StreamBuffer.h in Headers */,
A8A4743B151A825B004123FF /* StringBuffer.h in Headers */,
A8A4743D151A825B004123FF /* StringBuilder.h in Headers */,
A8A4743E151A825B004123FF /* StringConcatenate.h in Headers */,
@@ -1148,10 +1161,18 @@
A8A4746D151A825B004123FF /* UnionFind.h in Headers */,
A8A4746E151A825B004123FF /* UnusedParam.h in Headers */,
A8A47473151A825B004123FF /* URLBuffer.h in Headers */,
+ 26E6C2011609037300CA6AF4 /* URLCanon.h in Headers */,
+ 26E6C1F61609037300CA6AF4 /* URLCanonInternal.h in Headers */,
A8A47475151A825B004123FF /* URLCharacterTypes.h in Headers */,
A8A47476151A825B004123FF /* URLComponent.h in Headers */,
+ 26E6C2031609037300CA6AF4 /* URLFile.h in Headers */,
+ 26E6C2081609037300CA6AF4 /* URLParse.h in Headers */,
+ 26E6C2051609037300CA6AF4 /* URLParseInternal.h in Headers */,
+ 2661122E160FEAD40013F5C3 /* URLQueryCharsetConverter.h in Headers */,
A8A4747C151A825B004123FF /* URLSegments.h in Headers */,
A8A47471151A825B004123FF /* URLString.h in Headers */,
+ 26E6C20D1609037300CA6AF4 /* URLUtil.h in Headers */,
+ 26E6C20A1609037300CA6AF4 /* URLUtilInternal.h in Headers */,
A8A4746A151A825B004123FF /* UTF8.h in Headers */,
A8A473B9151A825B004123FF /* utils.h in Headers */,
A8A4747D151A825B004123FF /* ValueCheck.h in Headers */,
@@ -1160,23 +1181,6 @@
A8A47480151A825B004123FF /* VMTags.h in Headers */,
A8A47446151A825B004123FF /* WTFString.h in Headers */,
A8A47487151A825B004123FF /* WTFThreadData.h in Headers */,
- 4F1D115415FF11BE0026E908 /* MemoryInstrumentation.h in Headers */,
- 26E6C1F61609037300CA6AF4 /* URLCanonInternal.h in Headers */,
- 26E6C2011609037300CA6AF4 /* URLCanon.h in Headers */,
- 26E6C2031609037300CA6AF4 /* URLFile.h in Headers */,
- 26E6C2051609037300CA6AF4 /* URLParseInternal.h in Headers */,
- 26E6C2081609037300CA6AF4 /* URLParse.h in Headers */,
- 2661122E160FEAD40013F5C3 /* URLQueryCharsetConverter.h in Headers */,
- 26E6C20A1609037300CA6AF4 /* URLUtilInternal.h in Headers */,
- 26E6C20D1609037300CA6AF4 /* URLUtil.h in Headers */,
- 4FCB710A160A1A07008425EC /* MemoryInstrumentationVector.h in Headers */,
- 4F1B2DB6160B44AA00586559 /* MemoryInstrumentationHashSet.h in Headers */,
- 4FD8554716133E0E00C5B704 /* MemoryInstrumentationArrayBufferView.h in Headers */,
- F3525E461619A4EE00278BC1 /* MemoryInstrumentationHashMap.h in Headers */,
- 4FCF27E116172E8600CBF037 /* MemoryInstrumentationString.h in Headers */,
- 4FD2A359161B0EE100EBF236 /* MemoryInstrumentationParsedURL.h in Headers */,
- F3FBC71E161AF7BF00BB4BD4 /* MemoryInstrumentationHashCountedSet.h in Headers */,
- F3FBC720161AF7CD00BB4BD4 /* MemoryInstrumentationSequence.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1294,8 +1298,8 @@
A8A473D8151A825B004123FF /* HashTable.cpp in Sources */,
A8A473E5151A825B004123FF /* MainThread.cpp in Sources */,
A8A473E4151A825B004123FF /* MainThreadMac.mm in Sources */,
- CD5497AC15857D0300B5BC30 /* MediaTime.cpp in Sources */,
A8A473E9151A825B004123FF /* MD5.cpp in Sources */,
+ CD5497AC15857D0300B5BC30 /* MediaTime.cpp in Sources */,
A8A473EC151A825B004123FF /* MetaAllocator.cpp in Sources */,
A8A473F2151A825B004123FF /* NullPtr.cpp in Sources */,
A8A473F4151A825B004123FF /* NumberOfCores.cpp in Sources */,
@@ -1334,8 +1338,8 @@
26E6C1FD1609037300CA6AF4 /* URLCanonRelative.cpp in Sources */,
26E6C1FF1609037300CA6AF4 /* URLCanonStdURL.cpp in Sources */,
A8A47474151A825B004123FF /* URLCharacterTypes.cpp in Sources */,
- 26E6C2041609037300CA6AF4 /* URLParseFile.cpp in Sources */,
26E6C2071609037300CA6AF4 /* URLParse.cpp in Sources */,
+ 26E6C2041609037300CA6AF4 /* URLParseFile.cpp in Sources */,
A8A4747B151A825B004123FF /* URLSegments.cpp in Sources */,
4330F38F15745B0500AAFA8F /* URLString.cpp in Sources */,
26E6C20C1609037300CA6AF4 /* URLUtil.cpp in Sources */,
diff --git a/Source/WTF/wtf/Deque.h b/Source/WTF/wtf/Deque.h
index 47c0dfffa..be69c81db 100644
--- a/Source/WTF/wtf/Deque.h
+++ b/Source/WTF/wtf/Deque.h
@@ -426,7 +426,7 @@ namespace WTF {
{
checkValidity();
size_t oldCapacity = m_buffer.capacity();
- size_t newCapacity = max(static_cast<size_t>(16), oldCapacity + oldCapacity / 4 + 1);
+ size_t newCapacity = std::max(static_cast<size_t>(16), oldCapacity + oldCapacity / 4 + 1);
T* oldBuffer = m_buffer.buffer();
m_buffer.allocateBuffer(newCapacity);
if (m_start <= m_end)
diff --git a/Source/WTF/wtf/StreamBuffer.h b/Source/WTF/wtf/StreamBuffer.h
index add2549d6..e7d958f69 100644
--- a/Source/WTF/wtf/StreamBuffer.h
+++ b/Source/WTF/wtf/StreamBuffer.h
@@ -63,7 +63,7 @@ public:
while (size) {
if (!m_buffer.size() || m_buffer.last()->size() == BlockSize)
m_buffer.append(adoptPtr(new Block));
- size_t appendSize = min(BlockSize - m_buffer.last()->size(), size);
+ size_t appendSize = std::min(BlockSize - m_buffer.last()->size(), size);
m_buffer.last()->append(data, appendSize);
data += appendSize;
size -= appendSize;
diff --git a/Source/WTF/wtf/Vector.h b/Source/WTF/wtf/Vector.h
index 6cd43115b..d2dedefea 100644
--- a/Source/WTF/wtf/Vector.h
+++ b/Source/WTF/wtf/Vector.h
@@ -34,9 +34,6 @@
namespace WTF {
- using std::min;
- using std::max;
-
template <bool needsDestruction, typename T>
struct VectorDestructor;
@@ -278,14 +275,7 @@ namespace WTF {
bool shouldReallocateBuffer(size_t newCapacity) const
{
-#if PLATFORM(BLACKBERRY)
- // Tested on BlackBerry.
return VectorTraits<T>::canMoveWithMemcpy && m_capacity && newCapacity;
-#else
- // FIXME: Return true on the platforms where realloc() gives better performance.
- UNUSED_PARAM(newCapacity);
- return false;
-#endif
}
void reallocateBuffer(size_t newCapacity)
@@ -312,7 +302,6 @@ namespace WTF {
T* buffer() { return m_buffer; }
const T* buffer() const { return m_buffer; }
- T** bufferSlot() { return &m_buffer; }
size_t capacity() const { return m_capacity; }
T* releaseBuffer()
@@ -385,7 +374,6 @@ namespace WTF {
using Base::deallocateBuffer;
using Base::buffer;
- using Base::bufferSlot;
using Base::capacity;
using Base::releaseBuffer;
@@ -486,7 +474,6 @@ namespace WTF {
}
using Base::buffer;
- using Base::bufferSlot;
using Base::capacity;
T* releaseBuffer()
@@ -514,8 +501,6 @@ namespace WTF {
typedef VectorBuffer<T, inlineCapacity> Buffer;
typedef VectorTypeOperations<T> TypeOperations;
- class VectorReverseProxy;
-
public:
typedef T ValueType;
@@ -588,9 +573,6 @@ namespace WTF {
const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
- VectorReverseProxy& reversed() { return static_cast<VectorReverseProxy&>(*this); }
- const VectorReverseProxy& reversed() const { return static_cast<const VectorReverseProxy&>(*this); }
-
T& first() { return at(0); }
const T& first() const { return at(0); }
T& last() { return at(size() - 1); }
@@ -668,26 +650,6 @@ namespace WTF {
template<typename U> U* expandCapacity(size_t newMinCapacity, U*);
template<typename U> void appendSlowCase(const U&);
- class VectorReverseProxy : private Vector {
- public:
- typedef typename Vector::reverse_iterator iterator;
- typedef typename Vector::const_reverse_iterator const_iterator;
-
- iterator begin() { return Vector::rbegin(); }
- iterator end() { return Vector::rend(); }
- const_iterator begin() const { return Vector::rbegin(); }
- const_iterator end() const { return Vector::rend(); }
-
- private:
- friend class Vector;
-
- // These are intentionally not implemented.
- VectorReverseProxy();
- VectorReverseProxy(const VectorReverseProxy&);
- VectorReverseProxy& operator=(const VectorReverseProxy&);
- ~VectorReverseProxy();
- };
-
size_t m_size;
Buffer m_buffer;
};
@@ -848,7 +810,7 @@ namespace WTF {
template<typename T, size_t inlineCapacity>
void Vector<T, inlineCapacity>::expandCapacity(size_t newMinCapacity)
{
- reserveCapacity(max(newMinCapacity, max(static_cast<size_t>(16), capacity() + capacity() / 4 + 1)));
+ reserveCapacity(std::max(newMinCapacity, std::max(static_cast<size_t>(16), capacity() + capacity() / 4 + 1)));
}
template<typename T, size_t inlineCapacity>
@@ -866,7 +828,7 @@ namespace WTF {
template<typename T, size_t inlineCapacity>
bool Vector<T, inlineCapacity>::tryExpandCapacity(size_t newMinCapacity)
{
- return tryReserveCapacity(max(newMinCapacity, max(static_cast<size_t>(16), capacity() + capacity() / 4 + 1)));
+ return tryReserveCapacity(std::max(newMinCapacity, std::max(static_cast<size_t>(16), capacity() + capacity() / 4 + 1)));
}
template<typename T, size_t inlineCapacity>
diff --git a/Source/WTF/wtf/text/AtomicString.cpp b/Source/WTF/wtf/text/AtomicString.cpp
index cbb5a20ee..a37c50e6f 100644
--- a/Source/WTF/wtf/text/AtomicString.cpp
+++ b/Source/WTF/wtf/text/AtomicString.cpp
@@ -187,11 +187,26 @@ struct HashAndUTF8CharactersTranslator {
if (buffer.utf16Length != string->length())
return false;
- const UChar* stringCharacters = string->characters();
-
// If buffer contains only ASCII characters UTF-8 and UTF16 length are the same.
- if (buffer.utf16Length != buffer.length)
+ if (buffer.utf16Length != buffer.length) {
+ const UChar* stringCharacters = string->characters();
+
return equalUTF16WithUTF8(stringCharacters, stringCharacters + string->length(), buffer.characters, buffer.characters + buffer.length);
+ }
+
+ if (string->is8Bit()) {
+ const LChar* stringCharacters = string->characters8();
+
+ for (unsigned i = 0; i < buffer.length; ++i) {
+ ASSERT(isASCII(buffer.characters[i]));
+ if (stringCharacters[i] != buffer.characters[i])
+ return false;
+ }
+
+ return true;
+ }
+
+ const UChar* stringCharacters = string->characters16();
for (unsigned i = 0; i < buffer.length; ++i) {
ASSERT(isASCII(buffer.characters[i]));
diff --git a/Source/WTF/wtf/text/StringImpl.cpp b/Source/WTF/wtf/text/StringImpl.cpp
index e23683bd7..53d92b0dc 100644
--- a/Source/WTF/wtf/text/StringImpl.cpp
+++ b/Source/WTF/wtf/text/StringImpl.cpp
@@ -1048,6 +1048,22 @@ size_t StringImpl::find(StringImpl* matchString, unsigned index)
return findInner(characters16() + index, matchString->characters16(), index, searchLength, matchLength);
}
+template <typename SearchCharacterType, typename MatchCharacterType>
+ALWAYS_INLINE static size_t findIgnoringCaseInner(const SearchCharacterType* searchCharacters, const MatchCharacterType* matchCharacters, unsigned index, unsigned searchLength, unsigned matchLength)
+{
+ // delta is the number of additional times to test; delta == 0 means test only once.
+ unsigned delta = searchLength - matchLength;
+
+ unsigned i = 0;
+ // keep looping until we match
+ while (!equalIgnoringCase(searchCharacters + i, matchCharacters, matchLength)) {
+ if (i == delta)
+ return notFound;
+ ++i;
+ }
+ return index + i;
+}
+
size_t StringImpl::findIgnoringCase(StringImpl* matchString, unsigned index)
{
// Check for null or empty string to match against
@@ -1063,20 +1079,17 @@ size_t StringImpl::findIgnoringCase(StringImpl* matchString, unsigned index)
unsigned searchLength = length() - index;
if (matchLength > searchLength)
return notFound;
- // delta is the number of additional times to test; delta == 0 means test only once.
- unsigned delta = searchLength - matchLength;
-
- const UChar* searchCharacters = characters() + index;
- const UChar* matchCharacters = matchString->characters();
- unsigned i = 0;
- // keep looping until we match
- while (!equalIgnoringCase(searchCharacters + i, matchCharacters, matchLength)) {
- if (i == delta)
- return notFound;
- ++i;
+ if (is8Bit()) {
+ if (matchString->is8Bit())
+ return findIgnoringCaseInner(characters8() + index, matchString->characters8(), index, length(), matchLength);
+ return findIgnoringCaseInner(characters8() + index, matchString->characters16(), index, length(), matchLength);
}
- return index + i;
+
+ if (matchString->is8Bit())
+ return findIgnoringCaseInner(characters16() + index, matchString->characters8(), index, length(), matchLength);
+
+ return findIgnoringCaseInner(characters16() + index, matchString->characters16(), index, length(), matchLength);
}
size_t StringImpl::reverseFind(UChar c, unsigned index)
@@ -1146,44 +1159,45 @@ size_t StringImpl::reverseFind(StringImpl* matchString, unsigned index)
return reverseFindInner(characters16(), matchString->characters16(), index, ourLength, matchLength);
}
+template <typename SearchCharacterType, typename MatchCharacterType>
+ALWAYS_INLINE static size_t reverseFindIgnoringCaseInner(const SearchCharacterType* searchCharacters, const MatchCharacterType* matchCharacters, unsigned index, unsigned length, unsigned matchLength)
+{
+ // delta is the number of additional times to test; delta == 0 means test only once.
+ unsigned delta = min(index, length - matchLength);
+
+ // keep looping until we match
+ while (!equalIgnoringCase(searchCharacters + delta, matchCharacters, matchLength)) {
+ if (!delta)
+ return notFound;
+ delta--;
+ }
+ return delta;
+}
+
size_t StringImpl::reverseFindIgnoringCase(StringImpl* matchString, unsigned index)
{
// Check for null or empty string to match against
if (!matchString)
return notFound;
unsigned matchLength = matchString->length();
+ unsigned ourLength = length();
if (!matchLength)
- return min(index, length());
+ return min(index, ourLength);
// Check index & matchLength are in range.
- if (matchLength > length())
+ if (matchLength > ourLength)
return notFound;
- // delta is the number of additional times to test; delta == 0 means test only once.
- unsigned delta = min(index, length() - matchLength);
-
- if (is8Bit() && matchString->is8Bit()) {
- const LChar *searchCharacters = characters8();
- const LChar *matchCharacters = matchString->characters8();
- // keep looping until we match
- while (!equalIgnoringCase(searchCharacters + delta, matchCharacters, matchLength)) {
- if (!delta)
- return notFound;
- delta--;
- }
- return delta;
+ if (is8Bit()) {
+ if (matchString->is8Bit())
+ return reverseFindIgnoringCaseInner(characters8(), matchString->characters8(), index, ourLength, matchLength);
+ return reverseFindIgnoringCaseInner(characters8(), matchString->characters16(), index, ourLength, matchLength);
}
- const UChar *searchCharacters = characters();
- const UChar *matchCharacters = matchString->characters();
+ if (matchString->is8Bit())
+ return reverseFindIgnoringCaseInner(characters16(), matchString->characters8(), index, ourLength, matchLength);
- // keep looping until we match
- while (!equalIgnoringCase(searchCharacters + delta, matchCharacters, matchLength)) {
- if (!delta)
- return notFound;
- delta--;
- }
- return delta;
+ return reverseFindIgnoringCaseInner(characters16(), matchString->characters16(), index, ourLength, matchLength);
}
ALWAYS_INLINE static bool equalInner(const StringImpl* stringImpl, unsigned startOffset, const char* matchString, unsigned matchLength, bool caseSensitive)
diff --git a/Source/WTF/wtf/text/StringImpl.h b/Source/WTF/wtf/text/StringImpl.h
index 7f3dea277..0067bebee 100644
--- a/Source/WTF/wtf/text/StringImpl.h
+++ b/Source/WTF/wtf/text/StringImpl.h
@@ -351,7 +351,7 @@ public:
WTF_EXPORT_STRING_API ~StringImpl();
WTF_EXPORT_STRING_API static PassRefPtr<StringImpl> create(const UChar*, unsigned length);
- static PassRefPtr<StringImpl> create(const LChar*, unsigned length);
+ WTF_EXPORT_STRING_API static PassRefPtr<StringImpl> create(const LChar*, unsigned length);
ALWAYS_INLINE static PassRefPtr<StringImpl> create(const char* s, unsigned length) { return create(reinterpret_cast<const LChar*>(s), length); }
WTF_EXPORT_STRING_API static PassRefPtr<StringImpl> create(const LChar*);
ALWAYS_INLINE static PassRefPtr<StringImpl> create(const char* s) { return create(reinterpret_cast<const LChar*>(s)); }
diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt
index f0fe4a94d..7637c6f2b 100644
--- a/Source/WebCore/CMakeLists.txt
+++ b/Source/WebCore/CMakeLists.txt
@@ -1634,6 +1634,7 @@ SET(WebCore_SOURCES
loader/ImageLoader.cpp
loader/LinkLoader.cpp
loader/MainResourceLoader.cpp
+ loader/MixedContentChecker.cpp
loader/NavigationAction.cpp
loader/NetscapePlugInStreamLoader.cpp
loader/PingLoader.cpp
@@ -1878,6 +1879,7 @@ SET(WebCore_SOURCES
platform/graphics/GraphicsContext.cpp
platform/graphics/GraphicsLayer.cpp
platform/graphics/GraphicsLayerAnimation.cpp
+ platform/graphics/GraphicsLayerUpdater.cpp
platform/graphics/GraphicsLayerTransform.cpp
platform/graphics/GraphicsTypes.cpp
platform/graphics/Image.cpp
@@ -2493,6 +2495,11 @@ SET(WebCore_USER_AGENT_STYLE_SHEETS
${WEBCORE_DIR}/css/view-source.css
)
+SET(WebCore_LIBRARIES
+ ${WTF_LIBRARY_NAME}
+ ${JavaScriptCore_LIBRARY_NAME}
+)
+
IF (ENABLE_SQL_DATABASE AND ENABLE_WORKERS)
LIST(APPEND WebCore_SOURCES
Modules/webdatabase/WorkerContextWebDatabase.cpp
@@ -2723,7 +2730,6 @@ SET(IDL_ATTRIBUTES_FILE ${WEBCORE_DIR}/bindings/scripts/IDLAttributes.txt)
INCLUDE(${WEBCORE_DIR}/UseJSC.cmake)
-SET(WebCore_LIBRARIES ${WTF_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_NAME})
WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
# ANGLE tokenizer & parser
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 94d68fa57..e954e70a4 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,1038 @@
+2012-10-18 Kent Tamura <tkent@chromium.org>
+
+ Set min-width property instead of width property for date/time fields
+ https://bugs.webkit.org/show_bug.cgi?id=99673
+
+ Reviewed by Hajime Morita.
+
+ A field can have a text wider than pre-computed width because of
+ :first-letter property. So, we should set min-width, not width.
+
+ Tests: Covered by fast/forms/*-multiple-fields/*-multipe-fields-appearance-style.html
+
+ * html/shadow/DateTimeNumericFieldElement.cpp:
+ (WebCore::DateTimeNumericFieldElement::customStyleForRenderer):
+ Set min-width instead of width.
+ * html/shadow/DateTimeSymbolicFieldElement.cpp:
+ (WebCore::DateTimeSymbolicFieldElement::customStyleForRenderer): Ditto.
+
+2012-10-18 MORITA Hajime <morrita@google.com>
+
+ Assertion failure at TreeScopeAdopter::moveNodeToNewDocument()
+ https://bugs.webkit.org/show_bug.cgi?id=99510
+
+ Reviewed by Kent Tamura.
+
+ Shadow DOM notification call didn't have checks for mutation detection.
+ This change adds such checks.
+
+ Test: fast/forms/textarea/textarea-autofocus-removal-while-focusing-with-style.html
+
+ * dom/ContainerNodeAlgorithms.cpp:
+ (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
+ (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
+
+2012-10-17 Kentaro Hara <haraken@chromium.org>
+
+ Unreviewed. Rebaselined run-bindings-tests.
+
+ * bindings/scripts/test/V8/V8Float64Array.h:
+ (V8Float64Array):
+ * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
+ (V8TestActiveDOMObject):
+ * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
+ (V8TestCustomNamedGetter):
+ * bindings/scripts/test/V8/V8TestEventConstructor.h:
+ (V8TestEventConstructor):
+ * bindings/scripts/test/V8/V8TestEventTarget.h:
+ (V8TestEventTarget):
+ * bindings/scripts/test/V8/V8TestException.h:
+ (V8TestException):
+ * bindings/scripts/test/V8/V8TestInterface.h:
+ (V8TestInterface):
+ * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
+ (V8TestMediaQueryListListener):
+ * bindings/scripts/test/V8/V8TestNamedConstructor.h:
+ (V8TestNamedConstructor):
+ * bindings/scripts/test/V8/V8TestNode.h:
+ (V8TestNode):
+ * bindings/scripts/test/V8/V8TestObj.h:
+ (V8TestObj):
+ * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
+ (V8TestSerializedScriptValueInterface):
+
+2012-10-17 Mike West <mkwst@chromium.org>
+
+ Move mixed content logic out of FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=45638
+
+ Reviewed by Eric Seidel.
+
+ This change moves checks for mixed content out of FrameLoader, and into
+ a new MixedContentChecker object. It's a pretty straightforward
+ refactoring with no change to the overall logic, and only minor changes
+ to the code to reduce repetition.
+
+ The only substantive change is renaming the methods from 'checkIf*' to
+ 'can*' to reflect the value of the boolean they return.
+
+ The visible functionality shouldn't change; this change should be
+ covered by existing tests in http/tests/security/mixedContent.
+
+ This patch is mostly a revitalization of Eric Sidel's original
+ patch: https://bugs.webkit.org/attachment.cgi?id=67432&action=prettypatch
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * Target.pri:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ Hey, look! A new file!
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::FrameLoader):
+ * loader/FrameLoader.h:
+ (WebCore::FrameLoader::mixedContentChecker):
+ (FrameLoader):
+ * loader/MixedContentChecker.cpp: Added.
+ (WebCore):
+ (WebCore::MixedContentChecker::MixedContentChecker):
+ (WebCore::MixedContentChecker::client):
+ (WebCore::asUTF8):
+ (WebCore::MixedContentChecker::isMixedContent):
+ (WebCore::MixedContentChecker::canDisplayInsecureContent):
+ (WebCore::MixedContentChecker::canRunInsecureContent):
+ (WebCore::MixedContentChecker::logWarning):
+ * loader/MixedContentChecker.h: Added.
+ (WebCore):
+ (MixedContentChecker):
+ Migrate functionality from FrameLoader::checkIf* to
+ MixedContentChecker::can*.
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::willSendRequest):
+ * loader/SubframeLoader.cpp:
+ (WebCore::SubframeLoader::pluginIsLoadable):
+ (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
+ * loader/cache/CachedResourceLoader.cpp:
+ (WebCore::CachedResourceLoader::checkInsecureContent):
+ Use the new method locations.
+
+2012-10-17 Dan Bernstein <mitz@apple.com>
+
+ REGRESSION (r95391): ComplexTextController is unnecessarily slow with characters with combining marks when the base character is not covered by any font
+ https://bugs.webkit.org/show_bug.cgi?id=99654
+
+ Reviewed by Adele Peterson.
+
+ When the base character of a combining character sequence is not covered by any one of the
+ available fonts, there is no point looking for a font that covers the entire sequence, nor
+ to try to use a combination of fallback fonts for the entire sequence.
+
+ * platform/graphics/SimpleFontData.h:
+ (WebCore::SimpleFontData::systemFallback): Moved ComplexTextController::systemFallbackFontData
+ here and renamed it.
+ * platform/graphics/mac/ComplexTextController.cpp:
+ (WebCore::ComplexTextController::collectComplexTextRuns): This function used to use
+ systemFallbackFontData() whenever Font::fontDataForCombiningCharacterSequence returned 0
+ for a base character with combining marks, regardless of whether the base character was
+ covered by any font. Changed it to preserve the return value of
+ fontDataForCombiningCharacterSequence, which is now 0 only if the base charcater is not in
+ any font, while systemFallbackFontData() is used to indicate that no single font in the
+ fallback list covers all characters in the sequence, but the base character is in some font.
+ * platform/graphics/mac/ComplexTextController.h:
+ (ComplexTextController): Moved systemFallbackFontData from here to SimpleFontData.
+ * platform/graphics/mac/ComplexTextControllerCoreText.mm:
+ (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Updated for the above
+ move.
+ * platform/graphics/mac/FontComplexTextMac.cpp:
+ (WebCore::Font::fontDataForCombiningCharacterSequence): Changed to return
+ systemFallbackFontData() if no single font in the fallback list covers all characters in the
+ sequence, while using 0 to signal the base character does not exist in any font.
+
+2012-10-17 Dan Bernstein <mitz@apple.com>
+
+ Try to fix the build after r131701.
+
+ * WebCore.exp.in:
+
+2012-10-17 Hayato Ito <hayato@chromium.org>
+
+ Content element does not expose distributedNodes property.
+ https://bugs.webkit.org/show_bug.cgi?id=99232
+
+ Reviewed by Dimitri Glazkov.
+
+ Add getDistributedNodes() to HTMLContentElement's IDL, which returns a
+ static NodeList whose node are distributed to the content element.
+
+ Test: fast/dom/shadow/content-element-distributed-nodes.html
+
+ * html/shadow/HTMLContentElement.idl:
+ * html/shadow/InsertionPoint.cpp:
+ (WebCore::InsertionPoint::getDistributedNodes):
+ * html/shadow/InsertionPoint.h:
+ (InsertionPoint):
+ * testing/Internals.cpp:
+ * testing/Internals.h:
+ (Internals):
+ * testing/Internals.idl:
+
+2012-10-17 Pan Deng <pan.deng@intel.com>
+
+ [User Timing] implement main interface in of User Timing, according to http://www.w3.org/TR/2012/CR-user-timing-20120726/
+ https://bugs.webkit.org/show_bug.cgi?id=90963
+
+ Reviewed by Tony Gentilcore.
+
+ This patch implemented mark(), measure(), clearMarks() and clearMeasures() interface of User Timing. Getters are not exposed by Performance Timeline yet, it will be future patch.
+
+ Tests: http/tests/w3c/webperf/submission/user-timing/test_user_timing_clearMarks.html
+ http/tests/w3c/webperf/submission/user-timing/test_user_timing_clearMeasures.html
+ http/tests/w3c/webperf/submission/user-timing/test_user_timing_mark.html
+ http/tests/w3c/webperf/submission/user-timing/test_user_timing_mark_exception.html
+ http/tests/w3c/webperf/submission/user-timing/test_user_timing_measure.html
+ http/tests/w3c/webperf/submission/user-timing/test_user_timing_measure_associate_with_navigation_timing.html
+ http/tests/w3c/webperf/submission/user-timing/test_user_timing_measure_exception.html
+ http/tests/w3c/webperf/submission/user-timing/test_user_timing_method_exist.html
+
+ * GNUmakefile.list.am:
+ * WebCore.gypi:
+ * page/Performance.cpp:
+ (WebCore::Performance::webkitGetEntries):
+ (WebCore::Performance::webkitGetEntriesByType):
+ (WebCore::Performance::webkitGetEntriesByName):
+ (WebCore):
+ (WebCore::Performance::webkitMark):
+ (WebCore::Performance::webkitClearMarks):
+ (WebCore::Performance::webkitMeasure):
+ (WebCore::Performance::webkitClearMeasures):
+ * page/Performance.h:
+ (WebCore):
+ (Performance):
+ * page/Performance.idl:
+ * page/PerformanceMark.h: Added.
+ (WebCore):
+ (PerformanceMark):
+ (WebCore::PerformanceMark::create):
+ (WebCore::PerformanceMark::PerformanceMark):
+ (WebCore::PerformanceMark::~PerformanceMark):
+ * page/PerformanceMark.idl: Added.
+ * page/PerformanceMeasure.h: Added.
+ (WebCore):
+ (PerformanceMeasure):
+ (WebCore::PerformanceMeasure::create):
+ (WebCore::PerformanceMeasure::PerformanceMeasure):
+ (WebCore::PerformanceMeasure::~PerformanceMeasure):
+ * page/PerformanceMeasure.idl: Added.
+ * page/PerformanceUserTiming.cpp: Added.
+ (WebCore):
+ (WebCore::UserTiming::UserTiming):
+ (WebCore::insertPerformanceEntry):
+ (WebCore::clearPeformanceEntries):
+ (WebCore::UserTiming::mark):
+ (WebCore::UserTiming::clearMarks):
+ (WebCore::UserTiming::findExistingMarkStartTime):
+ (WebCore::UserTiming::measure):
+ (WebCore::UserTiming::clearMeasures):
+ * page/PerformanceUserTiming.h: Added.
+ (WebCore):
+ (UserTiming):
+ (WebCore::UserTiming::create):
+
+2012-10-17 James Robinson <jamesr@chromium.org>
+
+ Unreviewed clang compile fix - GraphicsLayerUpdater needs a virtual destructor.
+
+ * platform/graphics/GraphicsLayerUpdater.h:
+ (GraphicsLayerUpdater):
+
+2012-10-17 Ryuan Choi <ryuan.choi@samsung.com>
+
+ Attempt to fix the build after r131680.
+
+ Unreviewed build fix.
+
+ * dom/Document.cpp: Guard ACCELERATED_COMPOSITING for RenderLayerCompositor.h
+
+2012-10-17 Elliott Sprehn <esprehn@chromium.org>
+
+ StyleRareNonInheritedData::contentDataEquivalent only looks at the first ContentData
+ https://bugs.webkit.org/show_bug.cgi?id=99560
+
+ Reviewed by Eric Seidel.
+
+ Previously we only compared the first ContentData in the linked
+ list of ContentData's which meant that if the resolved style
+ for content had the same prefix we wouldn't update the content.
+
+ This patch adds a loop to compare each of the ContentData objects
+ in the linked list.
+
+ Test: fast/css-generated-content/content-property-change.html
+
+ * rendering/style/StyleRareNonInheritedData.cpp:
+ (WebCore::StyleRareNonInheritedData::contentDataEquivalent):
+
+2012-10-17 Elliott Sprehn <esprehn@chromium.org>
+
+ Remove StyleContentType since it's not used anymore
+ https://bugs.webkit.org/show_bug.cgi?id=99659
+
+ Reviewed by Eric Seidel.
+
+ Remove StyleContentType enum since it's not used anymore and
+ make the is*() type checking methods on ContentData public.
+
+ No new tests needed, this is just deleting dead code.
+
+ * rendering/style/ContentData.h:
+ (ContentData):
+ * rendering/style/RenderStyleConstants.h:
+
+2012-10-17 Simon Fraser <simon.fraser@apple.com>
+
+ Create a GraphicsLayerUpdater class that will do periodic layer flushes for layer trees containing tile caches
+ https://bugs.webkit.org/show_bug.cgi?id=99518
+
+ Reviewed by Dean Jackson.
+
+ When using tile caches in place of tiled layers, we need to recompute their
+ visible area periodically while animations and scrolling are happening.
+ Make a new class, GraphicsLayerUpdater, to handle this updating.
+ Internally, it uses DisplayRefreshMonitor to generate the periodic updates.
+
+ GraphicsLayer clients are notified that layers need periodic updates. Clients
+ are free to make use of GraphicsLayerUpdater to handle this updating, as
+ RenderLayerCompositor does.
+
+ Also do some minor refactoring of methods in RenderLayerCompositor that
+ get to Page.
+
+ * CMakeLists.txt: Add GraphicsLayerUpdater.cpp to the build.
+ * GNUmakefile.list.am: Ditto.
+ * PlatformBlackBerry.cmake: Ditto.
+ * Target.pri: Ditto.
+ * WebCore.gypi: Ditto.
+ * WebCore.vcproj/WebCore.vcproj: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * dom/Document.cpp:
+ (WebCore::Document::windowScreenDidChange): Tell the compositor that the screen
+ changed, so it can tell the GraphicsLayerUpdater if it has one.
+ * platform/graphics/GraphicsLayerClient.h:
+ (WebCore::GraphicsLayerClient::notifyFlushBeforeDisplayRefresh): Method called
+ for layers that need periodic updates, like tile cache layers.
+ * platform/graphics/GraphicsLayerUpdater.cpp: Added. Uses DisplayRefreshMonitorManager
+ to flush layers before the next refresh.
+ (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
+ (WebCore::GraphicsLayerUpdater::~GraphicsLayerUpdater):
+ (WebCore::GraphicsLayerUpdater::scheduleUpdate):
+ (WebCore::GraphicsLayerUpdater::screenDidChange):
+ (WebCore::GraphicsLayerUpdater::displayRefreshFired):
+ * platform/graphics/GraphicsLayerUpdater.h: Added.
+ (GraphicsLayerUpdaterClient): Clients need to implement flushLayers().
+ (WebCore::GraphicsLayerUpdaterClient::~GraphicsLayerUpdaterClient):
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::recursiveCommitChanges): For tile cache layers,
+ tell the client that this layer should be updated soon to update the visible rect.
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::notifyFlushBeforeDisplayRefresh): Pass this message
+ on to the compositor.
+ * rendering/RenderLayerBacking.h:
+ (RenderLayerBacking): Implement notifyFlushBeforeDisplayRefresh.
+ Add OVERRIDE to all the client overrides.
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags): Use helper to get to Page.
+ (WebCore::RenderLayerCompositor::scheduleLayerFlush): Ditto.
+ (WebCore::RenderLayerCompositor::flushPendingLayerChanges): Soon we're going to be asking
+ about the current state of animations inside the flush (for visible rect computation), so we
+ need a AnimationUpdateBlock to make sure all the animation times are in sync.
+ (WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh): Make a GraphicsLayerUpdater
+ if necessary, and tell it to update soon.
+ (WebCore::RenderLayerCompositor::flushLayers): The GraphicsLayerUpdater client method.
+ Just does a flush. For now, considers this Frame as the flush root, which will need fixing for iframes.
+ (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): Use helper to get to Page.
+ (WebCore::RenderLayerCompositor::deviceScaleFactor): Ditto.
+ (WebCore::RenderLayerCompositor::pageScaleFactor): Ditto.
+ (WebCore::RenderLayerCompositor::destroyRootLayer): Ditto.
+ (WebCore::RenderLayerCompositor::windowScreenDidChange): Tell the updater if we have one.
+ (WebCore::RenderLayerCompositor::scrollingCoordinator): Use helper to get to Page.
+ (WebCore::RenderLayerCompositor::graphicsLayerFactory): Use helper to get to Page.
+ (WebCore::RenderLayerCompositor::page): The helper.
+ * rendering/RenderLayerCompositor.h:
+ (RenderLayerCompositor): Add OVERRIDE to all the client overrides.
+
+2012-10-17 Eric Seidel <eric@webkit.org>
+
+ Make dom-query.html slightly faster by removing unnecessary ref-churn in StringTraits
+ https://bugs.webkit.org/show_bug.cgi?id=99652
+
+ Reviewed by Adam Barth.
+
+ My testing showed this moved dom-query.html from 465560 runs/s to 479019
+ which is about 2% if I'm doing my math correctly.
+
+ I suspect that's due to avoiding the ref-churn we were incurring by using
+ return-by-value symantics here.
+
+ This is just the tip of the iceburg. :)
+
+ * bindings/v8/V8StringResource.cpp:
+ (StringTraits):
+ * bindings/v8/V8ValueCache.h:
+ (WebCore::WebCoreStringResource::webcoreString):
+ (WebCore::WebCoreStringResource::atomicString):
+
+2012-10-17 Luke Macpherson <macpherson@chromium.org>
+
+ Move handling of CSSPropertyWebkitLineClamp from StyleResolver into StyleBuilder.
+ https://bugs.webkit.org/show_bug.cgi?id=99534
+
+ Reviewed by Alexis Menard.
+
+ One small step towards removing the giant switch statement in StyleResolver, this patch moves line clamp handling into StyleBuilder.
+
+ Covered by fast/overflow/line-clamp.html
+
+ * css/StyleBuilder.cpp:
+ (WebCore::StyleBuilder::StyleBuilder):
+ * css/StyleResolver.cpp:
+ (WebCore::StyleResolver::applyProperty):
+
+2012-10-17 Andy Estes <aestes@apple.com>
+
+ [WebKit2] Add removeChild: to WKDOMNode and make WKDOMText.data read/write
+ https://bugs.webkit.org/show_bug.cgi?id=99662
+
+ Reviewed by Sam Weinig.
+
+ Export needed symbols.
+
+ * WebCore.exp.in:
+
+2012-10-17 Adam Barth <abarth@webkit.org>
+
+ [V8] Don't generate code that declares visitDOMWrapper if we're not going to generate the implementation
+ https://bugs.webkit.org/show_bug.cgi?id=99653
+
+ Reviewed by Eric Seidel.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ (GenerateHeader):
+
+2012-10-17 David Grogan <dgrogan@chromium.org>
+
+ IndexedDB: Destroy leveldb directory if unknown schema is detected
+ https://bugs.webkit.org/show_bug.cgi?id=99636
+
+ Reviewed by Tony Chang.
+
+ chromium browser test in progress at
+ https://codereview.chromium.org/11196029
+
+ * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
+ (WebCore):
+ (WebCore::isSchemaKnown):
+ Return true when the schema key doesn't exist because new databases
+ won't have one.
+
+ (WebCore::setUpMetadata):
+ (WebCore::IDBLevelDBBackingStore::open):
+ Piggy-back on existing leveldb::destroy code.
+
+2012-10-17 Arpita Bahuguna <arpitabahuguna@gmail.com>
+
+ Incorrect rendering of borders on <col> with span > 1
+ https://bugs.webkit.org/show_bug.cgi?id=76246
+
+ Reviewed by Julien Chaffraix.
+
+ The HTML5 rendering specification [10.2.2 - Display Types] states that
+ "For the purposes of the CSS table model, the col element is expected to
+ be treated as if it was present as many times as its span attribute
+ specifies."
+ We should thus apply a col element's border as if the element is present
+ as many number of times as its span attribute.
+
+ Apart from this, we should also treat the col and its enclosing colgroup
+ separately while computing the collapsed borders.
+
+ Test: fast/table/border-collapsing/collapsed-border-with-col-colgroup-span.html
+
+ * rendering/RenderTableCell.cpp:
+ (WebCore::RenderTableCell::computeCollapsedStartBorder):
+ (WebCore::RenderTableCell::computeCollapsedEndBorder):
+ Borders from col and its enclosing colgroup element should be handled
+ separately, while considering the preceeding col's end border (for start
+ border computation) and the next col's start border (for end border
+ computation).
+
+ Also, have made changes for handling of col elements with span attribute as
+ per the specification. We now apply the border (start or end) of the col
+ element irrespective of whether it has any span specified for it or not.
+
+2012-10-17 Tom Sepez <tsepez@chromium.org>
+
+ Crash in ContainerNode::removeAllChildren()
+ https://bugs.webkit.org/show_bug.cgi?id=98443
+
+ Reviewed by Eric Carlson.
+
+ This patch makes the errorEventSender added in WebKit Revision 112190 interact
+ with the updatedHasPendingLoadEvent() mechanism in the same manner as the other
+ existing event senders.
+
+ Test: http/tests/security/video-poster-cross-origin-crash2.html
+
+ * loader/ImageLoader.cpp:
+ (WebCore::ImageLoader::setImage):
+ (WebCore::ImageLoader::updateFromElement):
+ (WebCore::ImageLoader::notifyFinished):
+ (WebCore::ImageLoader::updatedHasPendingEvent):
+ (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
+ (WebCore::ImageLoader::dispatchPendingLoadEvent):
+ * loader/ImageLoader.h:
+ (ImageLoader):
+
+2012-10-17 Joshua Bell <jsbell@chromium.org>
+
+ IndexedDB: Closing connection in upgradeneeded should result in error event
+ https://bugs.webkit.org/show_bug.cgi?id=99486
+
+ Reviewed by Tony Chang.
+
+ The IDB spec requires that "...if connection is closed, return a DOMError of type AbortError".
+ This was being handled during the "enqueue" phase, which was too early either for synchronously
+ executing scripts or asynchronous messaging in multiprocess ports (crbug.com/150691). Move the
+ logic to the "dispatch" phase.
+
+ Test: storage/indexeddb/intversion-close-in-oncomplete.html
+
+ * Modules/indexeddb/IDBOpenDBRequest.cpp:
+ (WebCore::IDBOpenDBRequest::onSuccess): Move success to error morphing from here...
+ (WebCore::IDBOpenDBRequest::dispatchEvent): To here.
+ * Modules/indexeddb/IDBOpenDBRequest.h:
+ (IDBOpenDBRequest):
+
+2012-10-17 Elliott Sprehn <esprehn@chromium.org>
+
+ Use virtual dispatch to create ContentData renderers
+ https://bugs.webkit.org/show_bug.cgi?id=99646
+
+ Reviewed by Eric Seidel.
+
+ ContentData are conceptually very similar to Nodes and we can use
+ the same createRenderer pattern on them to simplify creating
+ renderers for generated content. Now each ContentData class knows
+ how to create its own renderer.
+
+ Previously we switched over the StyleContentType which required a
+ case for CONTENT_NONE and made the code look like it could return
+ null, but this case is actually impossible because no ContentData
+ class ever has a type of CONTENT_NONE and no null checks are really
+ needed.
+
+ This is the final step in removing dependence on StyleContentType.
+
+ No new tests needed, this is just a refactor.
+
+ * rendering/RenderObjectChildList.cpp: Remove createRendererForBeforeAfterContent.
+ (WebCore::RenderObjectChildList::updateBeforeAfterContent):
+ * rendering/style/ContentData.cpp:
+ (WebCore::ImageContentData::createRenderer):
+ (WebCore):
+ (WebCore::TextContentData::createRenderer):
+ (WebCore::CounterContentData::createRenderer):
+ (WebCore::QuoteContentData::createRenderer):
+ * rendering/style/ContentData.h: Added a new virtual method createRenderer.
+ (WebCore):
+ (ContentData):
+ (ImageContentData):
+ (TextContentData):
+ (CounterContentData):
+ (QuoteContentData):
+
+2012-10-17 Julien Chaffraix <jchaffraix@webkit.org>
+
+ RenderLayer subtrees without any self-painting layer shouldn't be walked during hit testing
+ https://bugs.webkit.org/show_bug.cgi?id=89393
+
+ Reviewed by Eric Seidel.
+
+ Performance optimization, covered by existing tests.
+
+ Bug 88888 added an peformance optimization for painting. As hit testing is very similar to
+ painting, it would benefit from the same optimization.
+
+ On http://dglazkov.github.com/performance-tests/biggrid.html, with a 10,000 * 100 tables,
+ it reduces the time to select some text inside a cell from 1-2 seconds to a usable time
+ (I didn't measure the exact timing).
+
+ Note that as in bug 88888, the multi-column code is not covered by this optimization.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::hitTest):
+ This is the entrance to the hit testing code so we check if we can bail out early.
+
+ (WebCore::RenderLayer::hitTestList):
+ If we have no self-painting descendant layers, we can bail out.
+
+ (WebCore::RenderLayer::hitTestContents):
+ (WebCore::RenderLayer::hitTestLayer):
+ hitTest should filter the layers that call these functions. Added some ASSERT to
+ make sure we don't mistakenly call them when could avoid it.
+
+2012-10-17 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] Certain SVG content freezes QtWebKit
+ https://bugs.webkit.org/show_bug.cgi?id=97258
+
+ Reviewed by Simon Hausmann.
+
+ Ensure dashpattern is well-formed by avoiding divisions by zero.
+
+ Test: svg/stroke/zero-width-hang.html
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::setLineDash):
+
+2012-10-17 Alec Flett <alecflett@chromium.org>
+
+ IndexedDB: Explicitly send null/undefined/integers to frontend IDBCallbacks
+ https://bugs.webkit.org/show_bug.cgi?id=99619
+
+ Reviewed by Adam Barth.
+
+ Rather than pass SerializedScriptValue tokens from the backend,
+ send explicit null, (as onSuccess(static_cast<SerializedScriptValue*>(0)))
+ undefined, (as onSucess()), and integers (as onSuccess(long long))
+
+ This reduces backend dependency on things that might require a JS
+ interpreter on the backend.
+
+ No new tests, this is a refactor and existing tests cover
+ correctness. Tests that might fail include:
+
+ Test: storage/indexeddb/index-count.html
+ Test: storage/indexeddb/objectstore-count.html
+ Test: storage/indexeddb/database-basics.html
+
+ * Modules/indexeddb/IDBCallbacks.h:
+ (IDBCallbacks):
+ * Modules/indexeddb/IDBCursorBackendImpl.cpp:
+ (WebCore::IDBCursorBackendImpl::advanceInternal):
+ (WebCore::IDBCursorBackendImpl::continueFunctionInternal):
+ (WebCore::IDBCursorBackendImpl::prefetchContinueInternal):
+ * Modules/indexeddb/IDBCursorBackendImpl.h:
+ (WebCore::IDBCursorBackendImpl::value):
+ * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
+ (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
+ * Modules/indexeddb/IDBIndex.cpp:
+ * Modules/indexeddb/IDBIndexBackendImpl.cpp:
+ (WebCore::IDBIndexBackendImpl::openCursorInternal):
+ (WebCore::IDBIndexBackendImpl::countInternal):
+ (WebCore::IDBIndexBackendImpl::getInternal):
+ * Modules/indexeddb/IDBObjectStore.cpp:
+ * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
+ (WebCore::IDBObjectStoreBackendImpl::getInternal):
+ (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
+ (WebCore::IDBObjectStoreBackendImpl::clearInternal):
+ (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
+ (WebCore::IDBObjectStoreBackendImpl::countInternal):
+ * Modules/indexeddb/IDBRequest.cpp:
+ (WebCore::IDBRequest::onSuccess):
+ (WebCore):
+ * Modules/indexeddb/IDBRequest.h:
+ * Modules/indexeddb/IDBTransaction.cpp:
+ * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
+ * Modules/indexeddb/IDBTransactionBackendImpl.h:
+ * Modules/indexeddb/IDBTransactionBackendInterface.h:
+ * bindings/v8/IDBBindingUtilities.cpp:
+ (WebCore::deserializeIDBValue):
+ * inspector/InspectorIndexedDBAgent.cpp:
+ (WebCore):
+
+2012-10-17 Nate Chapin <japhet@chromium.org>
+
+ Move ResourceRequest construction out of SubresourceLoader
+ https://bugs.webkit.org/show_bug.cgi?id=99627
+
+ Reviewed by Adam Barth.
+
+ CachedResource::load() fills out a bunch of http headers.
+ SubresourceLoader::create() adds a bunch more. Merge them.
+ Note that this merge requires a bit more care in CachedRawResource::canReuse(),
+ because more headers are set directly on CachedResource::m_resourceRequest, rather
+ than on a copy of it.
+
+ No new tests, no functionality change intended.
+
+ * loader/SubresourceLoader.cpp:
+ (WebCore::SubresourceLoader::create):
+ * loader/cache/CachedRawResource.cpp:
+ (WebCore::shouldIgnoreHeaderForCacheReuse):
+ (WebCore):
+ (WebCore::CachedRawResource::canReuse):
+ * loader/cache/CachedResource.cpp:
+ (WebCore::CachedResource::failBeforeStarting):
+ (WebCore):
+ (WebCore::CachedResource::addAdditionalRequestHeaders):
+ (WebCore::CachedResource::load):
+ * loader/cache/CachedResource.h:
+ (CachedResource):
+
+2012-10-17 Anders Carlsson <andersca@apple.com>
+
+ Clean up Vector.h
+ https://bugs.webkit.org/show_bug.cgi?id=99622
+
+ Reviewed by Benjamin Poulain.
+
+ Fix fallout from removing std::max and std::min using declarations.
+
+ * loader/cache/CachedResource.cpp:
+ (WebCore::CachedResource::currentAge):
+
+2012-10-17 Joshua Bell <jsbell@chromium.org>
+
+ IndexedDB: Enforce unsigned long/unsigned long long ranges
+ https://bugs.webkit.org/show_bug.cgi?id=99637
+
+ Reviewed by Tony Chang.
+
+ The IndexedDB spec has [EnforceRange] specified on unsigned long and unsigned long long
+ arguments, which requires the implementation to throw TypeError for negative values or
+ values that exceed 2^53-1 (maximum JS number that behaves like an integer) - and 0 is
+ specifically forbidden by the APIs as well.
+
+ A more correct fix in the binding layer is in webkit.org/b/96798 but we can temporarily
+ address this in the implementation.
+
+ Also refactor to prevent IDBFactory.open(name, -1) from triggering an internal code path.
+
+ Tests: storage/indexeddb/cursor-advance.html
+ storage/indexeddb/intversion-bad-parameters.html
+ storage/indexeddb/intversion-encoding.html
+
+ * Modules/indexeddb/IDBCursor.cpp:
+ (WebCore::IDBCursor::advance): Validate argument range.
+ * Modules/indexeddb/IDBCursor.h:
+ (IDBCursor):
+ * Modules/indexeddb/IDBCursor.idl: Drop "unsigned" qualifier as the binding code is
+ not yet doing the correct validation.
+ * Modules/indexeddb/IDBFactory.cpp: Refactor to prevent open(name, -1)
+ (WebCore):
+ (WebCore::IDBFactory::open): Validate the int version here, then pass to...
+ (WebCore::IDBFactory::openInternal): ... this method.
+ * Modules/indexeddb/IDBFactory.h:
+ (IDBFactory):
+ * Modules/indexeddb/IDBFactory.idl: Drop "unsigned" qualifier; meaningless to binding
+ code right now, can be re-added once webkit.org/b/96798 lands.
+
+2012-10-17 Tony Chang <tony@chromium.org>
+
+ fast/forms/range/input-appearance-range-rtl.html off by one pixel
+ https://bugs.webkit.org/show_bug.cgi?id=99625
+
+ Reviewed by Ojan Vafai.
+
+ Previously, we would assume that a vertical slider in RTL would render identically to
+ a vertical slider in LTR. Due to differing thumb sizes, there is an off by one.
+
+ This worked in deprecated flexbox because it doesn't adjust for RTL when applying
+ box-align: center.
+
+ Tests: fast/forms/range/input-appearance-range-rtl.html
+
+ * html/shadow/SliderThumbElement.cpp:
+ (WebCore::RenderSliderContainer::layout): Force LTR for flexbox layout when vertical. We have to restore the old value
+ just in case the user switches from vertical to horizontal.
+
+2012-10-17 Michael Saboff <msaboff@apple.com>
+
+ Creating a String from an NSString should check for all 8 bit strings
+ https://bugs.webkit.org/show_bug.cgi?id=99392
+
+ Reviewed by Geoffrey Garen.
+
+ Use CFStringGetBytes() to try to get Latin1 data to create an 8 bit string.
+
+ No functional change, change covered by existing tests.
+
+ * platform/text/mac/StringMac.mm:
+ (WTF::String::String):
+
+2012-10-17 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL] Remove redundant OpenGL library addition from the build system.
+ https://bugs.webkit.org/show_bug.cgi?id=99629
+
+ Reviewed by Rob Buis.
+
+ * PlatformEfl.cmake: Do not add OPENGL_gl_LIBRARY to
+ WebCore_LIBRARIES, this is already done in CMakeLists.txt these
+ days.
+
+2012-10-17 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [CMake] Set WebCore_LIBRARIES earlier.
+ https://bugs.webkit.org/show_bug.cgi?id=99630
+
+ Reviewed by Rob Buis.
+
+ * CMakeLists.txt: Follow the style we use in other CMakeList.txt
+ files and set the Foo_LIBRARIES variables before we start checking
+ for optional features, as they might append other libraries to the
+ list (it already happens with WTF_USE_3D_GRAPHICS, for example).
+
+2012-10-17 Philip Rogers <pdr@google.com>
+
+ Allow lazy initialization of SVG XML animated properties.
+ https://bugs.webkit.org/show_bug.cgi?id=84657
+
+ Reviewed by Tim Horton.
+
+ When animating a property in the shadow tree, instance properties and tearoffs are created
+ but they simply reference the animated element's animating properties.
+
+ When starting an animation for the first time (see SVGAnimateElement::resetAnimatedType),
+ we initialize the root property and instance properties using startAnimValAnimation(...).
+ If an instance property is added while the root property is animating, this initialization
+ will not occur and we crash.
+
+ This patch updates the resetAnimValToBaseVal codepath to start (and initialize) an animated
+ property if it is not already animating. After this patch, instance properties can be added
+ in the middle of animation and they will be properly started/initialized.
+
+ Test: svg/animations/use-while-animating-crash.html
+
+ * svg/SVGAnimatedTypeAnimator.h:
+ (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValue):
+ (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues):
+ (WebCore::SVGAnimatedTypeAnimator::executeAction):
+
+2012-10-17 Dan Carney <dcarney@google.com>
+
+ Bind isolatedWorldSecurityOrigin to world
+ https://bugs.webkit.org/show_bug.cgi?id=99582
+
+ Reviewed by Adam Barth.
+
+ Security origin of isolated worlds was not previously set at the world
+ level, although it could have been.
+
+ No new tests. No change in functionality.
+
+ * bindings/v8/DOMWrapperWorld.cpp:
+ (WebCore::DOMWrapperWorld::deallocate):
+ (WebCore):
+ (WebCore::isolatedWorldSecurityOrigins):
+ (WebCore::DOMWrapperWorld::isolatedWorldSecurityOrigin):
+ (WebCore::DOMWrapperWorld::setIsolatedWorldSecurityOrigin):
+ (WebCore::DOMWrapperWorld::clearIsolatedWorldSecurityOrigin):
+ * bindings/v8/DOMWrapperWorld.h:
+ (DOMWrapperWorld):
+ (WebCore::DOMWrapperWorld::isIsolatedWorldId):
+ (WebCore::DOMWrapperWorld::isIsolatedWorld):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::resetIsolatedWorlds):
+ (WebCore::ScriptController::evaluateInIsolatedWorld):
+ (WebCore::ScriptController::collectIsolatedContexts):
+ * bindings/v8/ScriptController.h:
+ (ScriptController):
+ (WebCore::ScriptController::setIsolatedWorldSecurityOrigin):
+ * bindings/v8/V8DOMWindowShell.cpp:
+ (WebCore::V8DOMWindowShell::initializeIfNeeded):
+ * bindings/v8/V8DOMWindowShell.h:
+ (V8DOMWindowShell):
+ * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
+ (WebCore::V8XMLHttpRequest::constructorCallback):
+
+2012-10-17 Simon Fraser <simon.fraser@apple.com>
+
+ GraphicsLayer visible rect computation needs to use the current animating transform
+ https://bugs.webkit.org/show_bug.cgi?id=99529
+
+ Reviewed by Dean Jackson.
+
+ If we're running an accelerated animation of transform
+ on a GraphicsLayerCA, the current value of the transform won't
+ be reflected in the GraphicsLayer's m_transform. However,
+ we need the current value of the transform in order to correctly
+ compute the visible rect of this layer and descendants.
+
+ Add a function to GraphicsLayerClient to retrieve the current
+ value of the transform from the client.
+
+ RenderLayer's currentTransform() used to return a transform
+ with transform-origin baked in; GraphicsLayerClient needs one
+ that excludes transform-origin, so enhance RenderLayer::currentTransform()
+ to be able to produce either.
+
+ Tests: compositing/visible-rect/animated-from-none.html
+ compositing/visible-rect/animated.html
+
+ * platform/graphics/GraphicsLayerClient.h:
+ (WebCore):
+ (GraphicsLayerClient):
+ (WebCore::GraphicsLayerClient::getCurrentTransform):
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::computeVisibleRect):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::currentTransform):
+ * rendering/RenderLayer.h:
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::currentTransform):
+ * rendering/RenderLayerBacking.h:
+ (RenderLayerBacking):
+
+2012-10-17 Sadrul Habib Chowdhury <sadrul@chromium.org>
+
+ plugins: Allow a plugin to dictate whether it can receive drag events or not.
+ https://bugs.webkit.org/show_bug.cgi?id=99355
+
+ Reviewed by Tony Chang.
+
+ When doing a drag over a plugin, ask the plugin whether it can accept
+ drag/drop to decide whether drag/drop is possible or not. At present,
+ plugins do not receive drag events through WebCore (i.e. various
+ implementations of PluginView::handleMouseEvent ignores the
+ drop-events). This change makes it possible for the ports to ask the
+ plugin first to decide whether it can (or wants to) accept drag events.
+ The default implementation remains the same, i.e. plugins do not receive
+ drag events. For chromium, the overridden implementation uses the
+ WebPlugin interface to check whether the plugin can accept drag events.
+
+ * html/HTMLPlugInElement.cpp:
+ (WebCore::HTMLPlugInElement::canProcessDrag):
+ (WebCore):
+ * html/HTMLPlugInElement.h:
+ (WebCore):
+ (HTMLPlugInElement):
+ * page/DragController.cpp:
+ (WebCore::DragController::canProcessDrag):
+ * plugins/PluginViewBase.h:
+ (WebCore):
+ (WebCore::PluginViewBase::canProcessDrag):
+
+2012-10-17 Andreas Kling <kling@webkit.org>
+
+ Shrink EventTargetData by making firingEventListeners vector optional.
+ <http://webkit.org/b/99532>
+ <rdar://problem/12515099>
+
+ Reviewed by Anders Carlsson.
+
+ The majority of event listeners never actually fire, and EventTargetData::firingEventListeners
+ is just sitting there taking up space. Make it an OwnPtr instead, shrinking EventTargetData
+ by 48 bytes and progressing Membuster3 by 395kB.
+
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::removeEventListener):
+ (WebCore::EventTarget::fireEventListeners):
+ (WebCore::EventTarget::removeAllEventListeners):
+ * dom/EventTarget.h:
+ (WebCore::EventTarget::isFiringEventListeners):
+
+2012-10-17 Christophe Dumez <christophe.dumez@intel.com>
+
+ xss-DENIED-xsl-document-securityOrigin.xml crashes with icon assertion
+ https://bugs.webkit.org/show_bug.cgi?id=99571
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Check that the iconURL is not empty in IconController::continueLoadWithDecision()
+ to avoid hitting assertions later when trying to commit this empty URL to the
+ database. IconController::url() may indeed return an empty URL but there was
+ no check for it.
+
+ No new tests, already covered by http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml.
+
+ * loader/icon/IconController.cpp:
+ (WebCore::IconController::continueLoadWithDecision):
+
+2012-10-17 Byungwoo Lee <bw80.lee@samsung.com>
+
+ Fix build warnings : -Wunused-parameter, -Wunused-variable
+ https://bugs.webkit.org/show_bug.cgi?id=99539
+
+ Reviewed by Kentaro Hara.
+
+ Fix build warnings about unused parameter or unused variable when
+ WTF_USE_TILED_BACKING_STORE option is enabled.
+
+ * html/shadow/HTMLContentElement.cpp:
+ (WebCore::contentTagName):
+ * platform/graphics/efl/GraphicsContext3DEfl.cpp:
+ (WebCore::GraphicsContext3D::getImageData):
+ * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
+ (WebCore::GraphicsContext3DPrivate::createSurface):
+ (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
+ * platform/graphics/opengl/Extensions3DOpenGL.cpp:
+ (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
+ * platform/graphics/texmap/TextureMapper.h:
+ (WebCore::BitmapTexture::canReuseWith):
+ (WebCore::TextureMapper::beginPainting):
+ * platform/graphics/texmap/TextureMapperGL.cpp:
+ (WebCore::TextureMapperGL::drawRepaintCounter):
+ * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
+ (WebCore::BitmapTextureImageBuffer::updateContents):
+ * platform/graphics/texmap/TextureMapperImageBuffer.h:
+ * platform/graphics/texmap/TextureMapperLayer.cpp:
+ (WebCore::TextureMapperLayer::sortByZOrder):
+ (WebCore::TextureMapperLayer::flushCompositingStateSelf):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames):
+
+2012-10-17 Shinya Kawanaka <shinyak@chromium.org>
+
+ Dynamically added elements do not get re-projected.
+ https://bugs.webkit.org/show_bug.cgi?id=99227
+
+ Reviewed by Dimitri Glazkov.
+
+ When distribution happens, we have to invalidate its host shadow's distribution, since the children of the host
+ is changed.
+
+ Test: fast/dom/shadow/content-reprojection-dynamic.html
+
+ * html/shadow/ContentDistributor.cpp:
+ (WebCore::ContentDistributor::distribute):
+
+2012-10-17 Yury Semikhatsky <yurys@chromium.org>
+
+ Web Inspector: no "delete watch expression" context menu item when clicking on the expression value
+ https://bugs.webkit.org/show_bug.cgi?id=99602
+
+ Reviewed by Pavel Feldman.
+
+ Add delete items to the watch expression's value's context menu.
+
+ * inspector/front-end/ObjectPropertiesSection.js:
+ (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuFired):
+ (WebInspector.ObjectPropertyTreeElement.prototype.populateContextMenu):
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionTreeElement.prototype.populateContextMenu):
+ (WebInspector.WatchExpressionTreeElement.prototype._contextMenu):
+
+2012-10-17 Vsevolod Vlasov <vsevik@chromium.org>
+
+ Web Inspector: [Regression] Undoing script changes does not restore breakpoints.
+ https://bugs.webkit.org/show_bug.cgi?id=99598
+
+ Reviewed by Pavel Feldman.
+
+ workingCopyChanged now dispatches did/willMergeToVM instead of did/willDivergeFromVM
+ when change returns uiSourceCode to non dirty state.
+ Added wasDirty parameter to workingCopyChanged event.
+
+ Test: inspector/debugger/live-edit-breakpoints.html
+
+ * inspector/front-end/ResourceScriptMapping.js:
+ (WebInspector.ResourceScriptFile.prototype._workingCopyCommitted):
+ (WebInspector.ResourceScriptFile.prototype._workingCopyChanged):
+ * inspector/front-end/UISourceCode.js:
+ (WebInspector.UISourceCode.prototype.setWorkingCopy):
+
2012-10-17 Simon Hausmann <simon.hausmann@digia.com>
[Qt] Avoid re-creating CSSGrammar.cpp with each (incremental) build
diff --git a/Source/WebCore/GNUmakefile.list.am b/Source/WebCore/GNUmakefile.list.am
index 40f1391f1..ab124b44f 100644
--- a/Source/WebCore/GNUmakefile.list.am
+++ b/Source/WebCore/GNUmakefile.list.am
@@ -595,6 +595,10 @@ webcore_built_sources += \
DerivedSources/WebCore/JSPerformanceEntry.h \
DerivedSources/WebCore/JSPerformanceEntryList.cpp \
DerivedSources/WebCore/JSPerformanceEntryList.h \
+ DerivedSources/WebCore/JSPerformanceMark.cpp \
+ DerivedSources/WebCore/JSPerformanceMark.h \
+ DerivedSources/WebCore/JSPerformanceMeasure.cpp \
+ DerivedSources/WebCore/JSPerformanceMeasure.h \
DerivedSources/WebCore/JSPerformanceNavigation.cpp \
DerivedSources/WebCore/JSPerformanceNavigation.h \
DerivedSources/WebCore/JSPerformanceTiming.cpp \
@@ -1566,6 +1570,8 @@ dom_binding_idls += \
$(WebCore)/page/Performance.idl \
$(WebCore)/page/PerformanceEntry.idl \
$(WebCore)/page/PerformanceEntryList.idl \
+ $(WebCore)/page/PerformanceMark.idl \
+ $(WebCore)/page/PerformanceMeasure.idl \
$(WebCore)/page/PerformanceNavigation.idl \
$(WebCore)/page/PerformanceResourceTiming.idl \
$(WebCore)/page/PerformanceTiming.idl \
@@ -3900,6 +3906,8 @@ webcore_sources += \
Source/WebCore/loader/LinkLoaderClient.h \
Source/WebCore/loader/MainResourceLoader.cpp \
Source/WebCore/loader/MainResourceLoader.h \
+ Source/WebCore/loader/MixedContentChecker.cpp \
+ Source/WebCore/loader/MixedContentChecker.h \
Source/WebCore/loader/NavigationAction.cpp \
Source/WebCore/loader/NavigationAction.h \
Source/WebCore/loader/NetscapePlugInStreamLoader.cpp \
@@ -4066,12 +4074,16 @@ webcore_sources += \
Source/WebCore/page/PerformanceEntry.h \
Source/WebCore/page/PerformanceEntryList.cpp \
Source/WebCore/page/PerformanceEntryList.h \
+ Source/WebCore/page/PerformanceMark.h \
+ Source/WebCore/page/PerformanceMeasure.h \
Source/WebCore/page/PerformanceNavigation.cpp \
Source/WebCore/page/PerformanceNavigation.h \
Source/WebCore/page/PerformanceResourceTiming.cpp \
Source/WebCore/page/PerformanceResourceTiming.h \
Source/WebCore/page/PerformanceTiming.cpp \
Source/WebCore/page/PerformanceTiming.h \
+ Source/WebCore/page/PerformanceUserTiming.cpp \
+ Source/WebCore/page/PerformanceUserTiming.h \
Source/WebCore/page/PointerLockController.cpp \
Source/WebCore/page/PointerLockController.h \
Source/WebCore/page/PrintContext.cpp \
@@ -4449,6 +4461,8 @@ webcore_sources += \
Source/WebCore/platform/graphics/GraphicsLayer.cpp \
Source/WebCore/platform/graphics/GraphicsLayerClient.h \
Source/WebCore/platform/graphics/GraphicsLayerFactory.h \
+ Source/WebCore/platform/graphics/GraphicsLayerUpdater.h \
+ Source/WebCore/platform/graphics/GraphicsLayerUpdater.cpp \
Source/WebCore/platform/graphics/GraphicsTypes.cpp \
Source/WebCore/platform/graphics/GraphicsTypes.h \
Source/WebCore/platform/graphics/GraphicsTypes3D.h \
diff --git a/Source/WebCore/Modules/indexeddb/IDBCallbacks.h b/Source/WebCore/Modules/indexeddb/IDBCallbacks.h
index 1feb0d701..c394068c5 100644
--- a/Source/WebCore/Modules/indexeddb/IDBCallbacks.h
+++ b/Source/WebCore/Modules/indexeddb/IDBCallbacks.h
@@ -62,6 +62,12 @@ public:
virtual void onSuccess(PassRefPtr<SerializedScriptValue>) = 0;
// From IDBObjectStore/IDBIndex.get() (with key injection)
virtual void onSuccess(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, const IDBKeyPath&) = 0;
+ // From IDBObjectStore/IDBIndex.count()
+ virtual void onSuccess(int64_t value) = 0;
+
+ // From IDBFactor.deleteDatabase(), IDBObjectStore/IDBIndex.get(), IDBObjectStore.delete(), IDBObjectStore.clear()
+ virtual void onSuccess() = 0;
+
// From IDBCursor.advance()/continue()
virtual void onSuccess(PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue>) = 0;
// From IDBCursor.advance()/continue()
diff --git a/Source/WebCore/Modules/indexeddb/IDBCursor.cpp b/Source/WebCore/Modules/indexeddb/IDBCursor.cpp
index dc33ec2fb..990e3a455 100644
--- a/Source/WebCore/Modules/indexeddb/IDBCursor.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBCursor.cpp
@@ -156,7 +156,7 @@ PassRefPtr<IDBRequest> IDBCursor::update(ScriptExecutionContext* context, Script
return objectStore->put(IDBObjectStoreBackendInterface::CursorUpdate, IDBAny::create(this), context, value, m_currentPrimaryKey, ec);
}
-void IDBCursor::advance(unsigned long count, ExceptionCode& ec)
+void IDBCursor::advance(long count, ExceptionCode& ec)
{
IDB_TRACE("IDBCursor::advance");
if (!m_gotValue) {
@@ -169,7 +169,9 @@ void IDBCursor::advance(unsigned long count, ExceptionCode& ec)
return;
}
- if (!count) {
+ // FIXME: This should only need to check for 0 once webkit.org/b/96798 lands.
+ const int64_t maxECMAScriptInteger = 0x20000000000000LL - 1;
+ if (count < 1 || count > maxECMAScriptInteger) {
ec = NATIVE_TYPE_ERR;
return;
}
diff --git a/Source/WebCore/Modules/indexeddb/IDBCursor.h b/Source/WebCore/Modules/indexeddb/IDBCursor.h
index a05768608..fe725c9ba 100644
--- a/Source/WebCore/Modules/indexeddb/IDBCursor.h
+++ b/Source/WebCore/Modules/indexeddb/IDBCursor.h
@@ -75,7 +75,7 @@ public:
IDBAny* source() const;
PassRefPtr<IDBRequest> update(ScriptExecutionContext*, ScriptValue&, ExceptionCode&);
- void advance(unsigned long, ExceptionCode&);
+ void advance(long, ExceptionCode&);
void continueFunction(PassRefPtr<IDBKey>, ExceptionCode&);
PassRefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, ExceptionCode&);
diff --git a/Source/WebCore/Modules/indexeddb/IDBCursor.idl b/Source/WebCore/Modules/indexeddb/IDBCursor.idl
index 375479bc3..b514fe951 100644
--- a/Source/WebCore/Modules/indexeddb/IDBCursor.idl
+++ b/Source/WebCore/Modules/indexeddb/IDBCursor.idl
@@ -39,7 +39,8 @@
[CallWith=ScriptExecutionContext] IDBRequest update(in any value)
raises (IDBDatabaseException);
- void advance(in unsigned long count)
+ // FIXME: Make this [EnforceRange] unsigned long once webkit.org/b/96798 lands.
+ void advance(in long count)
raises (IDBDatabaseException);
[ImplementedAs=continueFunction] void continue(in [Optional] IDBKey key)
raises (IDBDatabaseException);
diff --git a/Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp b/Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp
index 668466b0f..428cc0412 100644
--- a/Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp
@@ -87,7 +87,7 @@ void IDBCursorBackendImpl::advanceInternal(ScriptExecutionContext*, PassRefPtr<I
RefPtr<IDBCursorBackendImpl> cursor = prpCursor;
if (!cursor->m_cursor || !cursor->m_cursor->advance(count)) {
cursor->m_cursor = 0;
- callbacks->onSuccess(SerializedScriptValue::nullValue());
+ callbacks->onSuccess(static_cast<SerializedScriptValue*>(0));
return;
}
@@ -102,7 +102,7 @@ void IDBCursorBackendImpl::continueFunctionInternal(ScriptExecutionContext*, Pas
if (!cursor->m_cursor || !cursor->m_cursor->continueFunction(key.get())) {
cursor->m_cursor = 0;
- callbacks->onSuccess(SerializedScriptValue::nullValue());
+ callbacks->onSuccess(static_cast<SerializedScriptValue*>(0));
return;
}
@@ -169,7 +169,7 @@ void IDBCursorBackendImpl::prefetchContinueInternal(ScriptExecutionContext*, Pas
}
if (!foundKeys.size()) {
- callbacks->onSuccess(SerializedScriptValue::nullValue());
+ callbacks->onSuccess(static_cast<SerializedScriptValue*>(0));
return;
}
diff --git a/Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h b/Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h
index 2b76dd48c..3b92f117e 100644
--- a/Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h
+++ b/Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h
@@ -67,7 +67,7 @@ public:
PassRefPtr<IDBKey> key() const { return m_cursor->key(); }
PassRefPtr<IDBKey> primaryKey() const { return m_cursor->primaryKey(); }
- PassRefPtr<SerializedScriptValue> value() const { return (m_cursorType == IndexKeyCursor) ? SerializedScriptValue::nullValue() : SerializedScriptValue::createFromWire(m_cursor->value()); }
+ PassRefPtr<SerializedScriptValue> value() const { return (m_cursorType == IndexKeyCursor) ? 0 : SerializedScriptValue::createFromWire(m_cursor->value()); }
void close();
private:
diff --git a/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp b/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp
index d3322ca40..4e895417d 100644
--- a/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp
@@ -561,7 +561,7 @@ void IDBDatabaseBackendImpl::deleteDatabase(PassRefPtr<IDBCallbacks> prpCallback
m_id = InvalidId;
m_intVersion = IDBDatabaseMetadata::NoIntVersion;
m_objectStores.clear();
- callbacks->onSuccess(SerializedScriptValue::undefinedValue());
+ callbacks->onSuccess();
}
void IDBDatabaseBackendImpl::close(PassRefPtr<IDBDatabaseCallbacks> prpCallbacks)
diff --git a/Source/WebCore/Modules/indexeddb/IDBFactory.cpp b/Source/WebCore/Modules/indexeddb/IDBFactory.cpp
index f5fccb4e2..8535757f2 100644
--- a/Source/WebCore/Modules/indexeddb/IDBFactory.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBFactory.cpp
@@ -108,13 +108,19 @@ PassRefPtr<IDBRequest> IDBFactory::getDatabaseNames(ScriptExecutionContext* cont
PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext* context, const String& name, int64_t version, ExceptionCode& ec)
{
- if (name.isNull()) {
+ // FIXME: This should only need to check for 0 once webkit.org/b/96798 lands.
+ const int64_t maxECMAScriptInteger = 0x20000000000000LL - 1;
+ if (version < 1 || version > maxECMAScriptInteger) {
ec = NATIVE_TYPE_ERR;
return 0;
}
- // FIXME: We need to throw an error if script passes -1. Somehow refactor
- // this to avoid wanting to throw an error with the sentinel.
- if (!version || version < IDBDatabaseMetadata::NoIntVersion) {
+ return openInternal(context, name, version, ec);
+}
+
+PassRefPtr<IDBOpenDBRequest> IDBFactory::openInternal(ScriptExecutionContext* context, const String& name, int64_t version, ExceptionCode& ec)
+{
+ ASSERT(version >= 1 || version == IDBDatabaseMetadata::NoIntVersion);
+ if (name.isNull()) {
ec = NATIVE_TYPE_ERR;
return 0;
}
@@ -129,7 +135,7 @@ PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext* context, c
PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext* context, const String& name, ExceptionCode& ec)
{
- return open(context, name, IDBDatabaseMetadata::NoIntVersion, ec);
+ return openInternal(context, name, IDBDatabaseMetadata::NoIntVersion, ec);
}
PassRefPtr<IDBVersionChangeRequest> IDBFactory::deleteDatabase(ScriptExecutionContext* context, const String& name, ExceptionCode& ec)
diff --git a/Source/WebCore/Modules/indexeddb/IDBFactory.h b/Source/WebCore/Modules/indexeddb/IDBFactory.h
index 7cd961be5..421915792 100644
--- a/Source/WebCore/Modules/indexeddb/IDBFactory.h
+++ b/Source/WebCore/Modules/indexeddb/IDBFactory.h
@@ -67,6 +67,8 @@ public:
private:
IDBFactory(IDBFactoryBackendInterface*);
+ PassRefPtr<IDBOpenDBRequest> openInternal(ScriptExecutionContext*, const String& name, int64_t version, ExceptionCode&);
+
RefPtr<IDBFactoryBackendInterface> m_backend;
};
diff --git a/Source/WebCore/Modules/indexeddb/IDBFactory.idl b/Source/WebCore/Modules/indexeddb/IDBFactory.idl
index dfb276815..a24cd2b5d 100644
--- a/Source/WebCore/Modules/indexeddb/IDBFactory.idl
+++ b/Source/WebCore/Modules/indexeddb/IDBFactory.idl
@@ -28,7 +28,8 @@
] interface IDBFactory {
[CallWith=ScriptExecutionContext, ImplementedAs=getDatabaseNames] IDBRequest webkitGetDatabaseNames();
- [CallWith=ScriptExecutionContext] IDBOpenDBRequest open(in DOMString name, in [Optional] unsigned long long version)
+ // FIXME: Make this [EnforceRange] unsigned long long once webkit.org/b/96798 lands.
+ [CallWith=ScriptExecutionContext] IDBOpenDBRequest open(in DOMString name, in [Optional] long long version)
raises (IDBDatabaseException);
[CallWith=ScriptExecutionContext] IDBVersionChangeRequest deleteDatabase(in DOMString name)
raises (IDBDatabaseException);
diff --git a/Source/WebCore/Modules/indexeddb/IDBIndex.cpp b/Source/WebCore/Modules/indexeddb/IDBIndex.cpp
index f12250058..ec29837a1 100644
--- a/Source/WebCore/Modules/indexeddb/IDBIndex.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBIndex.cpp
@@ -37,6 +37,7 @@
#include "IDBRequest.h"
#include "IDBTracing.h"
#include "IDBTransaction.h"
+#include "ScriptExecutionContext.h"
namespace WebCore {
diff --git a/Source/WebCore/Modules/indexeddb/IDBIndexBackendImpl.cpp b/Source/WebCore/Modules/indexeddb/IDBIndexBackendImpl.cpp
index 7f32b9cd2..7b2a475e5 100644
--- a/Source/WebCore/Modules/indexeddb/IDBIndexBackendImpl.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBIndexBackendImpl.cpp
@@ -84,7 +84,7 @@ void IDBIndexBackendImpl::openCursorInternal(ScriptExecutionContext*, PassRefPtr
}
if (!backingStoreCursor) {
- callbacks->onSuccess(SerializedScriptValue::nullValue());
+ callbacks->onSuccess(static_cast<SerializedScriptValue*>(0));
return;
}
@@ -123,7 +123,7 @@ void IDBIndexBackendImpl::countInternal(ScriptExecutionContext*, PassRefPtr<IDBI
RefPtr<IDBBackingStore::Cursor> backingStoreCursor = index->backingStore()->openIndexKeyCursor(transaction->backingStoreTransaction(), index->databaseId(), index->m_objectStoreBackend->id(), index->id(), range.get(), IDBCursor::NEXT);
if (!backingStoreCursor) {
- callbacks->onSuccess(SerializedScriptValue::numberValue(count));
+ callbacks->onSuccess(count);
return;
}
@@ -131,7 +131,7 @@ void IDBIndexBackendImpl::countInternal(ScriptExecutionContext*, PassRefPtr<IDBI
++count;
} while (backingStoreCursor->continueFunction(0));
backingStoreCursor->close();
- callbacks->onSuccess(SerializedScriptValue::numberValue(count));
+ callbacks->onSuccess(count);
}
void IDBIndexBackendImpl::count(PassRefPtr<IDBKeyRange> range, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transactionPtr, ExceptionCode&)
@@ -155,7 +155,7 @@ void IDBIndexBackendImpl::getInternal(ScriptExecutionContext*, PassRefPtr<IDBInd
RefPtr<IDBBackingStore::Cursor> backingStoreCursor = index->backingStore()->openIndexCursor(transaction->backingStoreTransaction(), index->databaseId(), index->m_objectStoreBackend->id(), index->id(), keyRange.get(), IDBCursor::NEXT);
if (!backingStoreCursor) {
- callbacks->onSuccess(SerializedScriptValue::undefinedValue());
+ callbacks->onSuccess();
return;
}
key = backingStoreCursor->key();
@@ -167,7 +167,7 @@ void IDBIndexBackendImpl::getInternal(ScriptExecutionContext*, PassRefPtr<IDBInd
String value = index->backingStore()->getObjectStoreRecord(transaction->backingStoreTransaction(), index->databaseId(), index->m_objectStoreBackend->id(), *primaryKey);
if (value.isNull()) {
- callbacks->onSuccess(SerializedScriptValue::undefinedValue());
+ callbacks->onSuccess();
return;
}
if (index->m_objectStoreBackend->autoIncrement() && !index->m_objectStoreBackend->keyPath().isNull()) {
diff --git a/Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp b/Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp
index 62209e60b..d6fbb6767 100644
--- a/Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp
@@ -146,9 +146,18 @@ public:
virtual const char* name() const { return "idb_cmp1"; }
};
+const int64_t latestSchemaVersion = 1;
+static bool isSchemaKnown(LevelDBDatabase* db)
+{
+ int64_t schemaVersion = 0;
+ const Vector<char> metaDataKey = SchemaVersionKey::encode();
+ if (!getInt(db, metaDataKey, schemaVersion))
+ return true;
+ return schemaVersion <= latestSchemaVersion;
+}
+
static bool setUpMetadata(LevelDBDatabase* db, const String& origin)
{
- const int64_t latestSchemaVersion = 1;
const Vector<char> metaDataKey = SchemaVersionKey::encode();
int64_t schemaVersion = 0;
@@ -157,6 +166,7 @@ static bool setUpMetadata(LevelDBDatabase* db, const String& origin)
if (!putInt(db, metaDataKey, latestSchemaVersion))
return false;
} else {
+ ASSERT(schemaVersion <= latestSchemaVersion);
if (!schemaVersion) {
schemaVersion = latestSchemaVersion;
RefPtr<LevelDBTransaction> transaction = LevelDBTransaction::create(db);
@@ -248,8 +258,11 @@ PassRefPtr<IDBBackingStore> IDBLevelDBBackingStore::open(SecurityOrigin* securit
String path = pathByAppendingComponent(pathBase, securityOrigin->databaseIdentifier() + ".indexeddb.leveldb");
db = LevelDBDatabase::open(path, comparator.get());
+ bool knownSchema = isSchemaKnown(db.get());
+ if (!knownSchema)
+ LOG_ERROR("IndexedDB backing store had unknown schema, treating it as failure to open");
- if (!db) {
+ if (!db || !knownSchema) {
LOG_ERROR("IndexedDB backing store open failed, attempting cleanup");
bool success = LevelDBDatabase::destroy(path);
if (!success) {
diff --git a/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp b/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp
index 1ce94925e..2eacb319c 100644
--- a/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp
@@ -41,6 +41,7 @@
#include "IDBKeyRange.h"
#include "IDBTracing.h"
#include "IDBTransaction.h"
+#include "ScriptExecutionContext.h"
#include "SerializedScriptValue.h"
#include <wtf/UnusedParam.h>
diff --git a/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp b/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp
index 3745b62f5..d06818a58 100644
--- a/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp
@@ -42,7 +42,6 @@
#include "IDBKeyRange.h"
#include "IDBTracing.h"
#include "IDBTransactionBackendImpl.h"
-#include "ScriptExecutionContext.h"
#include <wtf/MathExtras.h>
namespace WebCore {
@@ -91,7 +90,7 @@ void IDBObjectStoreBackendImpl::getInternal(ScriptExecutionContext*, PassRefPtr<
else {
RefPtr<IDBBackingStore::Cursor> backingStoreCursor = objectStore->backingStore()->openObjectStoreCursor(transaction->backingStoreTransaction(), objectStore->databaseId(), objectStore->id(), keyRange.get(), IDBCursor::NEXT);
if (!backingStoreCursor) {
- callbacks->onSuccess(SerializedScriptValue::undefinedValue());
+ callbacks->onSuccess();
return;
}
key = backingStoreCursor->key();
@@ -100,7 +99,7 @@ void IDBObjectStoreBackendImpl::getInternal(ScriptExecutionContext*, PassRefPtr<
String wireData = objectStore->backingStore()->getObjectStoreRecord(transaction->backingStoreTransaction(), objectStore->databaseId(), objectStore->id(), *key);
if (wireData.isNull()) {
- callbacks->onSuccess(SerializedScriptValue::undefinedValue());
+ callbacks->onSuccess();
return;
}
@@ -404,7 +403,7 @@ void IDBObjectStoreBackendImpl::deleteInternal(ScriptExecutionContext*, PassRefP
backingStoreCursor->close();
}
- callbacks->onSuccess(SerializedScriptValue::undefinedValue());
+ callbacks->onSuccess();
}
void IDBObjectStoreBackendImpl::clear(PassRefPtr<IDBCallbacks> prpCallbacks, IDBTransactionBackendInterface* transactionPtr, ExceptionCode&)
@@ -425,7 +424,7 @@ void IDBObjectStoreBackendImpl::clear(PassRefPtr<IDBCallbacks> prpCallbacks, IDB
void IDBObjectStoreBackendImpl::clearInternal(ScriptExecutionContext*, PassRefPtr<IDBObjectStoreBackendImpl> objectStore, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<IDBTransactionBackendImpl> transaction)
{
objectStore->backingStore()->clearObjectStore(transaction->backingStoreTransaction(), objectStore->databaseId(), objectStore->id());
- callbacks->onSuccess(SerializedScriptValue::undefinedValue());
+ callbacks->onSuccess();
}
PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreBackendImpl::createIndex(int64_t id, const String& name, const IDBKeyPath& keyPath, bool unique, bool multiEntry, IDBTransactionBackendInterface* transactionPtr, ExceptionCode& ec)
@@ -521,7 +520,7 @@ void IDBObjectStoreBackendImpl::openCursorInternal(ScriptExecutionContext*, Pass
if (taskType == IDBTransactionBackendInterface::PreemptiveTask)
transaction->addPreemptiveEvent();
if (!backingStoreCursor) {
- callbacks->onSuccess(SerializedScriptValue::nullValue());
+ callbacks->onSuccess(static_cast<SerializedScriptValue*>(0));
return;
}
@@ -544,7 +543,7 @@ void IDBObjectStoreBackendImpl::countInternal(ScriptExecutionContext*, PassRefPt
uint32_t count = 0;
RefPtr<IDBBackingStore::Cursor> backingStoreCursor = objectStore->backingStore()->openObjectStoreKeyCursor(transaction->backingStoreTransaction(), objectStore->databaseId(), objectStore->id(), range.get(), IDBCursor::NEXT);
if (!backingStoreCursor) {
- callbacks->onSuccess(SerializedScriptValue::numberValue(count));
+ callbacks->onSuccess(count);
return;
}
@@ -553,7 +552,7 @@ void IDBObjectStoreBackendImpl::countInternal(ScriptExecutionContext*, PassRefPt
} while (backingStoreCursor->continueFunction(0));
backingStoreCursor->close();
- callbacks->onSuccess(SerializedScriptValue::numberValue(count));
+ callbacks->onSuccess(count);
}
void IDBObjectStoreBackendImpl::loadIndexes()
diff --git a/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp b/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp
index 79912dbd1..e070b8bd7 100644
--- a/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp
@@ -114,15 +114,6 @@ void IDBOpenDBRequest::onSuccess(PassRefPtr<IDBDatabaseBackendInterface> backend
idbDatabase = m_result->idbDatabase();
ASSERT(idbDatabase);
ASSERT(!m_databaseCallbacks);
-
- // If the connection closed between onUpgradeNeeded and onSuccess, an error
- // should be fired instead of success. The back-end may not be aware of
- // the closing state if the events are asynchronously delivered.
- if (idbDatabase->isClosePending()) {
- m_result.clear();
- onError(IDBDatabaseError::create(IDBDatabaseException::IDB_ABORT_ERR, "The connection was closed."));
- return;
- }
} else {
ASSERT(m_databaseCallbacks);
idbDatabase = IDBDatabase::create(scriptExecutionContext(), backend, m_databaseCallbacks);
@@ -143,6 +134,18 @@ bool IDBOpenDBRequest::shouldEnqueueEvent() const
return true;
}
+bool IDBOpenDBRequest::dispatchEvent(PassRefPtr<Event> event)
+{
+ // If the connection closed between onUpgradeNeeded and the delivery of the "success" event,
+ // an "error" event should be fired instead.
+ if (event->type() == eventNames().successEvent && m_result->idbDatabase()->isClosePending()) {
+ m_result.clear();
+ onError(IDBDatabaseError::create(IDBDatabaseException::IDB_ABORT_ERR, "The connection was closed."));
+ return false;
+ }
+
+ return IDBRequest::dispatchEvent(event);
+}
} // namespace WebCore
diff --git a/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h b/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h
index 1e84b54c9..a5514264e 100644
--- a/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h
+++ b/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h
@@ -47,6 +47,7 @@ public:
// EventTarget
virtual const AtomicString& interfaceName() const;
+ virtual bool dispatchEvent(PassRefPtr<Event>);
DEFINE_ATTRIBUTE_EVENT_LISTENER(blocked);
DEFINE_ATTRIBUTE_EVENT_LISTENER(upgradeneeded);
diff --git a/Source/WebCore/Modules/indexeddb/IDBRequest.cpp b/Source/WebCore/Modules/indexeddb/IDBRequest.cpp
index 06ae9e235..3f6f9cd84 100644
--- a/Source/WebCore/Modules/indexeddb/IDBRequest.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBRequest.cpp
@@ -41,6 +41,7 @@
#include "IDBEventDispatcher.h"
#include "IDBTracing.h"
#include "IDBTransaction.h"
+#include "ScriptExecutionContext.h"
namespace WebCore {
@@ -376,6 +377,16 @@ void IDBRequest::onSuccess(PassRefPtr<SerializedScriptValue> prpSerializedScript
onSuccessInternal(value);
}
+void IDBRequest::onSuccess(int64_t value)
+{
+ return onSuccess(SerializedScriptValue::numberValue(value));
+}
+
+void IDBRequest::onSuccess()
+{
+ return onSuccess(SerializedScriptValue::undefinedValue());
+}
+
void IDBRequest::onSuccessInternal(const ScriptValue& value)
{
m_result = IDBAny::create(value);
diff --git a/Source/WebCore/Modules/indexeddb/IDBRequest.h b/Source/WebCore/Modules/indexeddb/IDBRequest.h
index d82fac720..cab065120 100644
--- a/Source/WebCore/Modules/indexeddb/IDBRequest.h
+++ b/Source/WebCore/Modules/indexeddb/IDBRequest.h
@@ -88,6 +88,8 @@ public:
virtual void onSuccess(PassRefPtr<IDBTransactionBackendInterface>);
virtual void onSuccess(PassRefPtr<SerializedScriptValue>);
virtual void onSuccess(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, const IDBKeyPath&);
+ virtual void onSuccess(int64_t);
+ virtual void onSuccess();
virtual void onSuccess(PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue>);
virtual void onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<SerializedScriptValue> >&) { ASSERT_NOT_REACHED(); } // Not implemented. Callback should not reach the renderer side.
diff --git a/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp b/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
index 053e08656..8ec15e5ec 100644
--- a/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
@@ -40,6 +40,7 @@
#include "IDBPendingTransactionMonitor.h"
#include "IDBTracing.h"
#include "ScriptCallStack.h"
+#include "ScriptExecutionContext.h"
namespace WebCore {
diff --git a/Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp b/Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp
index 6265ee919..f16651949 100644
--- a/Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp
@@ -35,6 +35,7 @@
#include "IDBObjectStoreBackendImpl.h"
#include "IDBTracing.h"
#include "IDBTransactionCoordinator.h"
+#include "ScriptExecutionContext.h"
namespace WebCore {
diff --git a/Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h b/Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h
index 1ae145b6c..34a97570f 100644
--- a/Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h
+++ b/Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h
@@ -33,6 +33,7 @@
#include "IDBDatabaseError.h"
#include "IDBTransactionBackendInterface.h"
#include "IDBTransactionCallbacks.h"
+#include "ScriptExecutionContext.h"
#include "Timer.h"
#include <wtf/Deque.h>
#include <wtf/HashSet.h>
diff --git a/Source/WebCore/Modules/indexeddb/IDBTransactionBackendInterface.h b/Source/WebCore/Modules/indexeddb/IDBTransactionBackendInterface.h
index eb7341fe0..f707f34a0 100644
--- a/Source/WebCore/Modules/indexeddb/IDBTransactionBackendInterface.h
+++ b/Source/WebCore/Modules/indexeddb/IDBTransactionBackendInterface.h
@@ -27,7 +27,6 @@
#define IDBTransactionBackendInterface_h
#include "IDBCallbacks.h"
-#include "ScriptExecutionContext.h"
#include <wtf/Threading.h>
#include <wtf/text/WTFString.h>
diff --git a/Source/WebCore/PlatformBlackBerry.cmake b/Source/WebCore/PlatformBlackBerry.cmake
index 987202cde..622d0ee14 100644
--- a/Source/WebCore/PlatformBlackBerry.cmake
+++ b/Source/WebCore/PlatformBlackBerry.cmake
@@ -277,6 +277,7 @@ ENDIF ()
IF (WTF_USE_ACCELERATED_COMPOSITING)
LIST(APPEND WebCore_SOURCES
${WEBCORE_DIR}/platform/graphics/GraphicsLayer.cpp
+ ${WEBCORE_DIR}/platform/graphics/GraphicsLayerUpdater.cpp
${WEBCORE_DIR}/platform/graphics/blackberry/CanvasLayerWebKitThread.cpp
${WEBCORE_DIR}/platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp
${WEBCORE_DIR}/platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp
diff --git a/Source/WebCore/PlatformEfl.cmake b/Source/WebCore/PlatformEfl.cmake
index 80072fabb..332734f84 100644
--- a/Source/WebCore/PlatformEfl.cmake
+++ b/Source/WebCore/PlatformEfl.cmake
@@ -285,9 +285,6 @@ IF (WTF_USE_3D_GRAPHICS)
"${WEBCORE_DIR}/platform/graphics/opengl"
"${WEBCORE_DIR}/platform/graphics/texmap"
)
- LIST(APPEND WebCore_LIBRARIES
- ${OPENGL_gl_LIBRARY}
- )
LIST(APPEND WebCore_SOURCES
platform/graphics/OpenGLShims.cpp
platform/graphics/cairo/DrawingBufferCairo.cpp
diff --git a/Source/WebCore/Target.pri b/Source/WebCore/Target.pri
index 8e6491560..9346b471e 100644
--- a/Source/WebCore/Target.pri
+++ b/Source/WebCore/Target.pri
@@ -833,6 +833,7 @@ SOURCES += \
loader/ImageLoader.cpp \
loader/LinkLoader.cpp \
loader/MainResourceLoader.cpp \
+ loader/MixedContentChecker.cpp \
loader/NavigationAction.cpp \
loader/NetscapePlugInStreamLoader.cpp \
loader/PingLoader.cpp \
@@ -971,6 +972,7 @@ SOURCES += \
platform/graphics/GraphicsContext.cpp \
platform/graphics/GraphicsLayer.cpp \
platform/graphics/GraphicsLayerAnimation.cpp \
+ platform/graphics/GraphicsLayerUpdater.cpp \
platform/graphics/GraphicsLayerTransform.cpp \
platform/graphics/GraphicsTypes.cpp \
platform/graphics/Image.cpp \
@@ -1958,6 +1960,7 @@ HEADERS += \
loader/LinkLoader.h \
loader/LinkLoaderClient.h \
loader/MainResourceLoader.h \
+ loader/MixedContentChecker.h \
loader/NavigationAction.h \
loader/NetscapePlugInStreamLoader.h \
loader/PlaceholderDocument.h \
diff --git a/Source/WebCore/WebCore.exp.in b/Source/WebCore/WebCore.exp.in
index e8ef2431d..bc6fd9bbc 100644
--- a/Source/WebCore/WebCore.exp.in
+++ b/Source/WebCore/WebCore.exp.in
@@ -213,6 +213,7 @@ __ZN7WebCore13AXObjectCache18rootObjectForFrameEPNS_5FrameE
__ZN7WebCore13AXObjectCache21gAccessibilityEnabledE
__ZN7WebCore13AXObjectCache23focusedUIElementForPageEPKNS_4PageE
__ZN7WebCore13AXObjectCache42gAccessibilityEnhancedUserInterfaceEnabledE
+__ZN7WebCore13CharacterData7setDataERKN3WTF6StringERi
__ZN7WebCore13HTTPHeaderMapC1Ev
__ZN7WebCore13HTTPHeaderMapD1Ev
__ZN7WebCore13HitTestResultC1ERKS0_
@@ -672,6 +673,7 @@ __ZN7WebCore4KURLC1EPK7__CFURL
__ZN7WebCore4KURLC1ERKS0_RKN3WTF6StringE
__ZN7WebCore4Node10renderRectEPb
__ZN7WebCore4Node11appendChildEN3WTF10PassRefPtrIS0_EERib
+__ZN7WebCore4Node11removeChildEPS0_Ri
__ZN7WebCore4Node14removedLastRefEv
__ZN7WebCore4Node17stopIgnoringLeaksEv
__ZN7WebCore4Node18startIgnoringLeaksEv
@@ -1202,7 +1204,7 @@ __ZNK7WebCore14FrameSelection18isFocusedAndActiveEv
__ZNK7WebCore14FrameSelection31getClippedVisibleTextRectanglesERN3WTF6VectorINS_9FloatRectELm0EEE
__ZNK7WebCore14FrameSelection36rootEditableElementOrDocumentElementEv
__ZNK7WebCore14FrameSelection6boundsEb
-__ZNK7WebCore14InsertionPoint16distributedNodesEv
+__ZNK7WebCore14InsertionPoint19getDistributedNodesEv
__ZNK7WebCore14InsertionPoint8isActiveEv
__ZNK7WebCore14RenderListItem10markerTextEv
__ZNK7WebCore14ResourceBuffer4dataEv
diff --git a/Source/WebCore/WebCore.gypi b/Source/WebCore/WebCore.gypi
index 0a477b893..c9fda66b4 100644
--- a/Source/WebCore/WebCore.gypi
+++ b/Source/WebCore/WebCore.gypi
@@ -1215,6 +1215,8 @@
'page/Performance.idl',
'page/PerformanceEntry.idl',
'page/PerformanceEntryList.idl',
+ 'page/PerformanceMark.idl',
+ 'page/PerformanceMeasure.idl',
'page/PerformanceNavigation.idl',
'page/PerformanceResourceTiming.idl',
'page/PerformanceTiming.idl',
@@ -2993,6 +2995,8 @@
'loader/LinkLoaderClient.h',
'loader/MainResourceLoader.cpp',
'loader/MainResourceLoader.h',
+ 'loader/MixedContentChecker.cpp',
+ 'loader/MixedContentChecker.h',
'loader/NavigationAction.cpp',
'loader/NavigationScheduler.cpp',
'loader/NetscapePlugInStreamLoader.cpp',
@@ -3162,12 +3166,16 @@
'page/PerformanceEntry.h',
'page/PerformanceEntryList.cpp',
'page/PerformanceEntryList.h',
+ 'page/PerformanceMark.h',
+ 'page/PerformanceMeasure.h',
'page/PerformanceNavigation.cpp',
'page/PerformanceNavigation.h',
'page/PerformanceResourceTiming.cpp',
'page/PerformanceResourceTiming.h',
'page/PerformanceTiming.cpp',
'page/PerformanceTiming.h',
+ 'page/PerformanceUserTiming.cpp',
+ 'page/PerformanceUserTiming.h',
'page/PointerLockController.cpp',
'page/PointerLockController.h',
'page/PrintContext.cpp',
@@ -4789,6 +4797,8 @@
'platform/graphics/GraphicsLayer.cpp',
'platform/graphics/GraphicsLayerAnimation.cpp',
'platform/graphics/GraphicsLayerAnimation.h',
+ 'platform/graphics/GraphicsLayerUpdater.cpp',
+ 'platform/graphics/GraphicsLayerUpdater.h',
'platform/graphics/GraphicsLayerTransform.cpp',
'platform/graphics/GraphicsLayerTransform.h',
'platform/graphics/GraphicsTypes.cpp',
@@ -7798,6 +7808,10 @@
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceEntry.h',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceEntryList.cpp',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceEntryList.h',
+ '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceMark.cpp',
+ '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceMark.h',
+ '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceMeasure.cpp',
+ '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceMeasure.h',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceNavigation.cpp',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceNavigation.h',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceTiming.cpp',
diff --git a/Source/WebCore/WebCore.vcproj/WebCore.vcproj b/Source/WebCore/WebCore.vcproj/WebCore.vcproj
index cf57829e5..c064b78e7 100755
--- a/Source/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/Source/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -27615,6 +27615,14 @@
>
</File>
<File
+ RelativePath="..\loader\MixedContentChecker.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\loader\MixedContentChecker.h"
+ >
+ </File>
+ <File
RelativePath="..\loader\NavigationAction.cpp"
>
</File>
@@ -29606,6 +29614,14 @@
>
</File>
<File
+ RelativePath="..\platform\graphics\GraphicsLayerUpdater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\platform\graphics\GraphicsLayerUpdater.cpp"
+ >
+ </File>
+ <File
RelativePath="..\platform\graphics\GraphicsTypes.cpp"
>
</File>
diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
index 08498e3cc..d3d4b6944 100644
--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -262,6 +262,8 @@
0F5B7A5510F65D7A00376302 /* RenderEmbeddedObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5B7A5310F65D7A00376302 /* RenderEmbeddedObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F605AEC15F94848004DF0C0 /* ScrollingConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F605AEA15F94848004DF0C0 /* ScrollingConstraints.cpp */; };
0F605AED15F94848004DF0C0 /* ScrollingConstraints.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F605AEB15F94848004DF0C0 /* ScrollingConstraints.h */; };
+ 0FA24D79162DF91900A3F4C0 /* GraphicsLayerUpdater.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FA24D77162DF91900A3F4C0 /* GraphicsLayerUpdater.cpp */; };
+ 0FA24D7A162DF91900A3F4C0 /* GraphicsLayerUpdater.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FA24D78162DF91900A3F4C0 /* GraphicsLayerUpdater.h */; };
0FCF33240F2B9715004B6795 /* ColorCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FCF33230F2B9715004B6795 /* ColorCG.cpp */; };
0FCF332C0F2B9A25004B6795 /* WebTiledLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FCF33280F2B9A25004B6795 /* WebTiledLayer.mm */; };
0FCF332D0F2B9A25004B6795 /* WebTiledLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCF33290F2B9A25004B6795 /* WebTiledLayer.h */; };
@@ -1754,6 +1756,7 @@
656D373E0ADBA5DE00A4554D /* FrameLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 656D37260ADBA5DE00A4554D /* FrameLoaderClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
656D373F0ADBA5DE00A4554D /* ResourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 656D37270ADBA5DE00A4554D /* ResourceLoader.h */; settings = {ATTRIBUTES = (Private, ); }; };
656D37410ADBA5DE00A4554D /* MainResourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 656D37290ADBA5DE00A4554D /* MainResourceLoader.h */; };
+ 52F10866162B6DA8009AC81E /* MixedContentChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 52F10863162B6D82009AC81E /* MixedContentChecker.h */; settings = {ATTRIBUTES = (Private, ); }; };
656D37430ADBA5DE00A4554D /* NetscapePlugInStreamLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 656D372B0ADBA5DE00A4554D /* NetscapePlugInStreamLoader.h */; settings = {ATTRIBUTES = (Private, ); }; };
656D37480ADBA5DE00A4554D /* SubresourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 656D37300ADBA5DE00A4554D /* SubresourceLoader.h */; settings = {ATTRIBUTES = (Private, ); }; };
6571DCC81385E6A400702DD0 /* MemoryPressureHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 657EDA071385CB97004E0645 /* MemoryPressureHandler.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -3335,6 +3338,7 @@
93D9D53C0DA27E180077216C /* RangeBoundaryPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D9D53B0DA27E180077216C /* RangeBoundaryPoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
93E227E00AF589AD00D48324 /* DocumentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E227DB0AF589AD00D48324 /* DocumentLoader.cpp */; };
93E227E10AF589AD00D48324 /* MainResourceLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E227DC0AF589AD00D48324 /* MainResourceLoader.cpp */; };
+ 52F10865162B6DA4009AC81E /* MixedContentChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52F10862162B6D82009AC81E /* MixedContentChecker.cpp */; };
93E227E30AF589AD00D48324 /* ResourceLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E227DE0AF589AD00D48324 /* ResourceLoader.cpp */; };
93E227E40AF589AD00D48324 /* SubresourceLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E227DF0AF589AD00D48324 /* SubresourceLoader.cpp */; };
93E241FF0B2B4E4000C732A1 /* HTMLFrameOwnerElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E241FE0B2B4E4000C732A1 /* HTMLFrameOwnerElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -6355,11 +6359,17 @@
FD315FF912B0267600C1A359 /* AudioBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FAF12B0267500C1A359 /* AudioBuffer.h */; };
FD315FFB12B0267600C1A359 /* AudioBufferSourceNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FB112B0267500C1A359 /* AudioBufferSourceNode.cpp */; };
FD315FFC12B0267600C1A359 /* AudioBufferSourceNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FB212B0267500C1A359 /* AudioBufferSourceNode.h */; };
+ FD315FFE12B0267600C1A359 /* ChannelMergerNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FB412B0267500C1A359 /* ChannelMergerNode.cpp */; };
+ FD315FFF12B0267600C1A359 /* ChannelMergerNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FB512B0267500C1A359 /* ChannelMergerNode.h */; };
+ FD31600112B0267600C1A359 /* ChannelSplitterNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FB712B0267500C1A359 /* ChannelSplitterNode.cpp */; };
+ FD31600212B0267600C1A359 /* ChannelSplitterNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FB812B0267500C1A359 /* ChannelSplitterNode.h */; };
FD31600412B0267600C1A359 /* AudioContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FBA12B0267500C1A359 /* AudioContext.cpp */; };
FD31600512B0267600C1A359 /* AudioContext.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FBB12B0267500C1A359 /* AudioContext.h */; };
FD31600712B0267600C1A359 /* AudioDestinationNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FBD12B0267500C1A359 /* AudioDestinationNode.cpp */; };
FD31600812B0267600C1A359 /* AudioDestinationNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FBE12B0267500C1A359 /* AudioDestinationNode.h */; };
FD31600A12B0267600C1A359 /* AudioGain.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FC012B0267500C1A359 /* AudioGain.h */; };
+ FD31600C12B0267600C1A359 /* GainNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FC212B0267500C1A359 /* GainNode.cpp */; };
+ FD31600D12B0267600C1A359 /* GainNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FC312B0267500C1A359 /* GainNode.h */; };
FD31600F12B0267600C1A359 /* AudioListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FC512B0267500C1A359 /* AudioListener.cpp */; };
FD31601012B0267600C1A359 /* AudioListener.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FC612B0267500C1A359 /* AudioListener.h */; };
FD31601212B0267600C1A359 /* AudioNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FC812B0267500C1A359 /* AudioNode.cpp */; };
@@ -6368,6 +6378,8 @@
FD31601612B0267600C1A359 /* AudioNodeInput.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FCC12B0267500C1A359 /* AudioNodeInput.h */; };
FD31601712B0267600C1A359 /* AudioNodeOutput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FCD12B0267500C1A359 /* AudioNodeOutput.cpp */; };
FD31601812B0267600C1A359 /* AudioNodeOutput.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FCE12B0267500C1A359 /* AudioNodeOutput.h */; };
+ FD31601912B0267600C1A359 /* PannerNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FCF12B0267500C1A359 /* PannerNode.cpp */; };
+ FD31601A12B0267600C1A359 /* PannerNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FD012B0267500C1A359 /* PannerNode.h */; };
FD31601C12B0267600C1A359 /* AudioParam.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FD212B0267500C1A359 /* AudioParam.cpp */; };
FD31601D12B0267600C1A359 /* AudioParam.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FD312B0267500C1A359 /* AudioParam.h */; };
FD31601F12B0267600C1A359 /* AudioProcessingEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FD512B0267600C1A359 /* AudioProcessingEvent.cpp */; };
@@ -6377,10 +6389,6 @@
FD31602512B0267600C1A359 /* BiquadDSPKernel.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FDB12B0267600C1A359 /* BiquadDSPKernel.h */; };
FD31602612B0267600C1A359 /* BiquadProcessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FDC12B0267600C1A359 /* BiquadProcessor.cpp */; };
FD31602712B0267600C1A359 /* BiquadProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FDD12B0267600C1A359 /* BiquadProcessor.h */; };
- FD315FFE12B0267600C1A359 /* ChannelMergerNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FB412B0267500C1A359 /* ChannelMergerNode.cpp */; };
- FD315FFF12B0267600C1A359 /* ChannelMergerNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FB512B0267500C1A359 /* ChannelMergerNode.h */; };
- FD31600112B0267600C1A359 /* ChannelSplitterNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FB712B0267500C1A359 /* ChannelSplitterNode.cpp */; };
- FD31600212B0267600C1A359 /* ChannelSplitterNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FB812B0267500C1A359 /* ChannelSplitterNode.h */; };
FD31602812B0267600C1A359 /* ConvolverNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FDE12B0267600C1A359 /* ConvolverNode.cpp */; };
FD31602912B0267600C1A359 /* ConvolverNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FDF12B0267600C1A359 /* ConvolverNode.h */; };
FD31602B12B0267600C1A359 /* DelayDSPKernel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FE112B0267600C1A359 /* DelayDSPKernel.cpp */; };
@@ -6389,14 +6397,10 @@
FD31602E12B0267600C1A359 /* DelayNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FE412B0267600C1A359 /* DelayNode.h */; };
FD31603012B0267600C1A359 /* DelayProcessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FE612B0267600C1A359 /* DelayProcessor.cpp */; };
FD31603112B0267600C1A359 /* DelayProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FE712B0267600C1A359 /* DelayProcessor.h */; };
- FD31600C12B0267600C1A359 /* GainNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FC212B0267500C1A359 /* GainNode.cpp */; };
- FD31600D12B0267600C1A359 /* GainNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FC312B0267500C1A359 /* GainNode.h */; };
- FD31601912B0267600C1A359 /* PannerNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FCF12B0267500C1A359 /* PannerNode.cpp */; };
- FD31601A12B0267600C1A359 /* PannerNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FD012B0267500C1A359 /* PannerNode.h */; };
- FD31603B12B0267600C1A359 /* RealtimeAnalyser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FF112B0267600C1A359 /* RealtimeAnalyser.cpp */; };
- FD31603C12B0267600C1A359 /* RealtimeAnalyser.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FF212B0267600C1A359 /* RealtimeAnalyser.h */; };
FD31603512B0267600C1A359 /* ScriptProcessorNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FEB12B0267600C1A359 /* ScriptProcessorNode.cpp */; };
FD31603612B0267600C1A359 /* ScriptProcessorNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FEC12B0267600C1A359 /* ScriptProcessorNode.h */; };
+ FD31603B12B0267600C1A359 /* RealtimeAnalyser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FF112B0267600C1A359 /* RealtimeAnalyser.cpp */; };
+ FD31603C12B0267600C1A359 /* RealtimeAnalyser.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FF212B0267600C1A359 /* RealtimeAnalyser.h */; };
FD31603D12B0267600C1A359 /* AnalyserNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FF312B0267600C1A359 /* AnalyserNode.cpp */; };
FD31603E12B0267600C1A359 /* AnalyserNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FF412B0267600C1A359 /* AnalyserNode.h */; };
FD31607A12B026F700C1A359 /* AudioArray.h in Headers */ = {isa = PBXBuildFile; fileRef = FD31604412B026F700C1A359 /* AudioArray.h */; };
@@ -6497,38 +6501,38 @@
FD82D7F813D4C8BD004E4372 /* JSWaveShaperNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD82D7F613D4C8BD004E4372 /* JSWaveShaperNode.h */; };
FD8C46EB154608E700A5910C /* AudioScheduledSourceNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD8C46E9154608E700A5910C /* AudioScheduledSourceNode.cpp */; };
FD8C46EC154608E700A5910C /* AudioScheduledSourceNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD8C46EA154608E700A5910C /* AudioScheduledSourceNode.h */; };
- FDA15EC912B03F50003A583A /* JSAnalyserNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15EC712B03F50003A583A /* JSAnalyserNode.cpp */; };
- FDA15ECA12B03F50003A583A /* JSAnalyserNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15EC812B03F50003A583A /* JSAnalyserNode.h */; };
FDA15E9D12B03EE1003A583A /* JSAudioBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8112B03EE1003A583A /* JSAudioBuffer.cpp */; };
FDA15E9E12B03EE1003A583A /* JSAudioBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E8212B03EE1003A583A /* JSAudioBuffer.h */; };
FDA15E9F12B03EE1003A583A /* JSAudioBufferSourceNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8312B03EE1003A583A /* JSAudioBufferSourceNode.cpp */; };
FDA15EA012B03EE1003A583A /* JSAudioBufferSourceNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E8412B03EE1003A583A /* JSAudioBufferSourceNode.h */; };
+ FDA15EA112B03EE1003A583A /* JSChannelMergerNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8512B03EE1003A583A /* JSChannelMergerNode.cpp */; };
+ FDA15EA212B03EE1003A583A /* JSChannelMergerNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E8612B03EE1003A583A /* JSChannelMergerNode.h */; };
+ FDA15EA312B03EE1003A583A /* JSChannelSplitterNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8712B03EE1003A583A /* JSChannelSplitterNode.cpp */; };
+ FDA15EA412B03EE1003A583A /* JSChannelSplitterNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E8812B03EE1003A583A /* JSChannelSplitterNode.h */; };
FDA15EA512B03EE1003A583A /* JSAudioContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8912B03EE1003A583A /* JSAudioContext.cpp */; };
FDA15EA612B03EE1003A583A /* JSAudioContext.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E8A12B03EE1003A583A /* JSAudioContext.h */; };
FDA15EA712B03EE1003A583A /* JSAudioDestinationNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8B12B03EE1003A583A /* JSAudioDestinationNode.cpp */; };
FDA15EA812B03EE1003A583A /* JSAudioDestinationNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E8C12B03EE1003A583A /* JSAudioDestinationNode.h */; };
FDA15EA912B03EE1003A583A /* JSAudioGain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8D12B03EE1003A583A /* JSAudioGain.cpp */; };
FDA15EAA12B03EE1003A583A /* JSAudioGain.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E8E12B03EE1003A583A /* JSAudioGain.h */; };
+ FDA15EAB12B03EE1003A583A /* JSGainNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8F12B03EE1003A583A /* JSGainNode.cpp */; };
+ FDA15EAC12B03EE1003A583A /* JSGainNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E9012B03EE1003A583A /* JSGainNode.h */; };
FDA15EAD12B03EE1003A583A /* JSAudioListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E9112B03EE1003A583A /* JSAudioListener.cpp */; };
FDA15EAE12B03EE1003A583A /* JSAudioListener.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E9212B03EE1003A583A /* JSAudioListener.h */; };
FDA15EAF12B03EE1003A583A /* JSAudioNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E9312B03EE1003A583A /* JSAudioNode.cpp */; };
FDA15EB012B03EE1003A583A /* JSAudioNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E9412B03EE1003A583A /* JSAudioNode.h */; };
+ FDA15EB112B03EE1003A583A /* JSPannerNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E9512B03EE1003A583A /* JSPannerNode.cpp */; };
+ FDA15EB212B03EE1003A583A /* JSPannerNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E9612B03EE1003A583A /* JSPannerNode.h */; };
FDA15EB312B03EE1003A583A /* JSAudioParam.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E9712B03EE1003A583A /* JSAudioParam.cpp */; };
FDA15EB412B03EE1003A583A /* JSAudioParam.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E9812B03EE1003A583A /* JSAudioParam.h */; };
FDA15EB512B03EE1003A583A /* JSAudioProcessingEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E9912B03EE1003A583A /* JSAudioProcessingEvent.cpp */; };
FDA15EB612B03EE1003A583A /* JSAudioProcessingEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E9A12B03EE1003A583A /* JSAudioProcessingEvent.h */; };
FDA15EB712B03EE1003A583A /* JSAudioSourceNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E9B12B03EE1003A583A /* JSAudioSourceNode.cpp */; };
FDA15EB812B03EE1003A583A /* JSAudioSourceNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E9C12B03EE1003A583A /* JSAudioSourceNode.h */; };
- FDA15EA112B03EE1003A583A /* JSChannelMergerNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8512B03EE1003A583A /* JSChannelMergerNode.cpp */; };
- FDA15EA212B03EE1003A583A /* JSChannelMergerNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E8612B03EE1003A583A /* JSChannelMergerNode.h */; };
- FDA15EA312B03EE1003A583A /* JSChannelSplitterNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8712B03EE1003A583A /* JSChannelSplitterNode.cpp */; };
- FDA15EA412B03EE1003A583A /* JSChannelSplitterNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E8812B03EE1003A583A /* JSChannelSplitterNode.h */; };
FDA15EBD12B03F0B003A583A /* JSConvolverNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15EBB12B03F0B003A583A /* JSConvolverNode.cpp */; };
FDA15EBE12B03F0B003A583A /* JSConvolverNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15EBC12B03F0B003A583A /* JSConvolverNode.h */; };
- FDA15EAB12B03EE1003A583A /* JSGainNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8F12B03EE1003A583A /* JSGainNode.cpp */; };
- FDA15EAC12B03EE1003A583A /* JSGainNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E9012B03EE1003A583A /* JSGainNode.h */; };
- FDA15EB112B03EE1003A583A /* JSPannerNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E9512B03EE1003A583A /* JSPannerNode.cpp */; };
- FDA15EB212B03EE1003A583A /* JSPannerNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E9612B03EE1003A583A /* JSPannerNode.h */; };
+ FDA15EC912B03F50003A583A /* JSAnalyserNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15EC712B03F50003A583A /* JSAnalyserNode.cpp */; };
+ FDA15ECA12B03F50003A583A /* JSAnalyserNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15EC812B03F50003A583A /* JSAnalyserNode.h */; };
FDA15ECD12B03F61003A583A /* JSScriptProcessorNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15ECB12B03F61003A583A /* JSScriptProcessorNode.cpp */; };
FDA15ECE12B03F61003A583A /* JSScriptProcessorNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15ECC12B03F61003A583A /* JSScriptProcessorNode.h */; };
FDA15ED112B03F94003A583A /* JSDelayNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15ECF12B03F94003A583A /* JSDelayNode.cpp */; };
@@ -6554,11 +6558,11 @@
FDEA6247152102FC00479DF0 /* JSWaveTable.h in Headers */ = {isa = PBXBuildFile; fileRef = FDEA6245152102FC00479DF0 /* JSWaveTable.h */; };
FDEAAAF312B02EE400DCF33B /* JSAudioBufferSourceNodeCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDEAAAEF12B02EE400DCF33B /* JSAudioBufferSourceNodeCustom.cpp */; };
FDEAAAF412B02EE400DCF33B /* JSAudioContextCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDEAAAF012B02EE400DCF33B /* JSAudioContextCustom.cpp */; };
+ FDEAAAFE12B02F4900DCF33B /* JSScriptProcessorNodeCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDEAAAFD12B02F4900DCF33B /* JSScriptProcessorNodeCustom.cpp */; };
FDF09DC81399B62200688E5B /* JSBiquadFilterNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDF09DC61399B62200688E5B /* JSBiquadFilterNode.cpp */; };
FDF09DC91399B62200688E5B /* JSBiquadFilterNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDF09DC71399B62200688E5B /* JSBiquadFilterNode.h */; };
FDF6BAF8134A4C9800822920 /* JSOfflineAudioCompletionEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDF6BAF6134A4C9800822920 /* JSOfflineAudioCompletionEvent.cpp */; };
FDF6BAF9134A4C9800822920 /* JSOfflineAudioCompletionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = FDF6BAF7134A4C9800822920 /* JSOfflineAudioCompletionEvent.h */; };
- FDEAAAFE12B02F4900DCF33B /* JSScriptProcessorNodeCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDEAAAFD12B02F4900DCF33B /* JSScriptProcessorNodeCustom.cpp */; };
FDF7E9C313AC21DB00A51EAC /* JSAudioBufferCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDF7E9C113AC21DB00A51EAC /* JSAudioBufferCallback.cpp */; };
FDF7E9C413AC21DB00A51EAC /* JSAudioBufferCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = FDF7E9C213AC21DB00A51EAC /* JSAudioBufferCallback.h */; };
FE6FD4880F676E5700092873 /* Coordinates.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6FD4850F676E5700092873 /* Coordinates.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -7311,6 +7315,8 @@
0F5B7A5310F65D7A00376302 /* RenderEmbeddedObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderEmbeddedObject.h; sourceTree = "<group>"; };
0F605AEA15F94848004DF0C0 /* ScrollingConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollingConstraints.cpp; sourceTree = "<group>"; };
0F605AEB15F94848004DF0C0 /* ScrollingConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingConstraints.h; sourceTree = "<group>"; };
+ 0FA24D77162DF91900A3F4C0 /* GraphicsLayerUpdater.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsLayerUpdater.cpp; sourceTree = "<group>"; };
+ 0FA24D78162DF91900A3F4C0 /* GraphicsLayerUpdater.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsLayerUpdater.h; sourceTree = "<group>"; };
0FCF33230F2B9715004B6795 /* ColorCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ColorCG.cpp; sourceTree = "<group>"; };
0FCF33280F2B9A25004B6795 /* WebTiledLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebTiledLayer.mm; sourceTree = "<group>"; };
0FCF33290F2B9A25004B6795 /* WebTiledLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebTiledLayer.h; sourceTree = "<group>"; };
@@ -8962,6 +8968,7 @@
656D37260ADBA5DE00A4554D /* FrameLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FrameLoaderClient.h; sourceTree = "<group>"; };
656D37270ADBA5DE00A4554D /* ResourceLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ResourceLoader.h; sourceTree = "<group>"; };
656D37290ADBA5DE00A4554D /* MainResourceLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MainResourceLoader.h; sourceTree = "<group>"; };
+ 52F10863162B6D82009AC81E /* MixedContentChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MixedContentChecker.h; sourceTree = "<group>"; };
656D372B0ADBA5DE00A4554D /* NetscapePlugInStreamLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NetscapePlugInStreamLoader.h; sourceTree = "<group>"; };
656D37300ADBA5DE00A4554D /* SubresourceLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SubresourceLoader.h; sourceTree = "<group>"; };
657EDA061385CB97004E0645 /* MemoryPressureHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryPressureHandler.cpp; sourceTree = "<group>"; };
@@ -10547,6 +10554,7 @@
93D9D53B0DA27E180077216C /* RangeBoundaryPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RangeBoundaryPoint.h; sourceTree = "<group>"; };
93E227DB0AF589AD00D48324 /* DocumentLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentLoader.cpp; sourceTree = "<group>"; };
93E227DC0AF589AD00D48324 /* MainResourceLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MainResourceLoader.cpp; sourceTree = "<group>"; };
+ 52F10862162B6D82009AC81E /* MixedContentChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MixedContentChecker.cpp; sourceTree = "<group>"; };
93E227DD0AF589AD00D48324 /* NetscapePlugInStreamLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetscapePlugInStreamLoader.cpp; sourceTree = "<group>"; };
93E227DE0AF589AD00D48324 /* ResourceLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLoader.cpp; sourceTree = "<group>"; };
93E227DF0AF589AD00D48324 /* SubresourceLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SubresourceLoader.cpp; sourceTree = "<group>"; };
@@ -13794,6 +13802,12 @@
FD315FB112B0267500C1A359 /* AudioBufferSourceNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioBufferSourceNode.cpp; sourceTree = "<group>"; };
FD315FB212B0267500C1A359 /* AudioBufferSourceNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioBufferSourceNode.h; sourceTree = "<group>"; };
FD315FB312B0267500C1A359 /* AudioBufferSourceNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AudioBufferSourceNode.idl; sourceTree = "<group>"; };
+ FD315FB412B0267500C1A359 /* ChannelMergerNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChannelMergerNode.cpp; sourceTree = "<group>"; };
+ FD315FB512B0267500C1A359 /* ChannelMergerNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChannelMergerNode.h; sourceTree = "<group>"; };
+ FD315FB612B0267500C1A359 /* ChannelMergerNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChannelMergerNode.idl; sourceTree = "<group>"; };
+ FD315FB712B0267500C1A359 /* ChannelSplitterNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChannelSplitterNode.cpp; sourceTree = "<group>"; };
+ FD315FB812B0267500C1A359 /* ChannelSplitterNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChannelSplitterNode.h; sourceTree = "<group>"; };
+ FD315FB912B0267500C1A359 /* ChannelSplitterNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChannelSplitterNode.idl; sourceTree = "<group>"; };
FD315FBA12B0267500C1A359 /* AudioContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioContext.cpp; sourceTree = "<group>"; };
FD315FBB12B0267500C1A359 /* AudioContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioContext.h; sourceTree = "<group>"; };
FD315FBC12B0267500C1A359 /* AudioContext.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AudioContext.idl; sourceTree = "<group>"; };
@@ -13802,9 +13816,9 @@
FD315FBF12B0267500C1A359 /* AudioDestinationNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AudioDestinationNode.idl; sourceTree = "<group>"; };
FD315FC012B0267500C1A359 /* AudioGain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioGain.h; sourceTree = "<group>"; };
FD315FC112B0267500C1A359 /* AudioGain.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AudioGain.idl; sourceTree = "<group>"; };
- FD315FF312B0267600C1A359 /* AnalyserNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnalyserNode.cpp; sourceTree = "<group>"; };
- FD315FF412B0267600C1A359 /* AnalyserNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnalyserNode.h; sourceTree = "<group>"; };
- FD315FF512B0267600C1A359 /* AnalyserNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AnalyserNode.idl; sourceTree = "<group>"; };
+ FD315FC212B0267500C1A359 /* GainNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GainNode.cpp; sourceTree = "<group>"; };
+ FD315FC312B0267500C1A359 /* GainNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GainNode.h; sourceTree = "<group>"; };
+ FD315FC412B0267500C1A359 /* GainNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GainNode.idl; sourceTree = "<group>"; };
FD315FC512B0267500C1A359 /* AudioListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioListener.cpp; sourceTree = "<group>"; };
FD315FC612B0267500C1A359 /* AudioListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioListener.h; sourceTree = "<group>"; };
FD315FC712B0267500C1A359 /* AudioListener.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AudioListener.idl; sourceTree = "<group>"; };
@@ -13815,6 +13829,9 @@
FD315FCC12B0267500C1A359 /* AudioNodeInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioNodeInput.h; sourceTree = "<group>"; };
FD315FCD12B0267500C1A359 /* AudioNodeOutput.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioNodeOutput.cpp; sourceTree = "<group>"; };
FD315FCE12B0267500C1A359 /* AudioNodeOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioNodeOutput.h; sourceTree = "<group>"; };
+ FD315FCF12B0267500C1A359 /* PannerNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PannerNode.cpp; sourceTree = "<group>"; };
+ FD315FD012B0267500C1A359 /* PannerNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PannerNode.h; sourceTree = "<group>"; };
+ FD315FD112B0267500C1A359 /* PannerNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PannerNode.idl; sourceTree = "<group>"; };
FD315FD212B0267500C1A359 /* AudioParam.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioParam.cpp; sourceTree = "<group>"; };
FD315FD312B0267500C1A359 /* AudioParam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioParam.h; sourceTree = "<group>"; };
FD315FD412B0267500C1A359 /* AudioParam.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AudioParam.idl; sourceTree = "<group>"; };
@@ -13827,12 +13844,6 @@
FD315FDB12B0267600C1A359 /* BiquadDSPKernel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BiquadDSPKernel.h; sourceTree = "<group>"; };
FD315FDC12B0267600C1A359 /* BiquadProcessor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BiquadProcessor.cpp; sourceTree = "<group>"; };
FD315FDD12B0267600C1A359 /* BiquadProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BiquadProcessor.h; sourceTree = "<group>"; };
- FD315FB412B0267500C1A359 /* ChannelMergerNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChannelMergerNode.cpp; sourceTree = "<group>"; };
- FD315FB512B0267500C1A359 /* ChannelMergerNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChannelMergerNode.h; sourceTree = "<group>"; };
- FD315FB612B0267500C1A359 /* ChannelMergerNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChannelMergerNode.idl; sourceTree = "<group>"; };
- FD315FB712B0267500C1A359 /* ChannelSplitterNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChannelSplitterNode.cpp; sourceTree = "<group>"; };
- FD315FB812B0267500C1A359 /* ChannelSplitterNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChannelSplitterNode.h; sourceTree = "<group>"; };
- FD315FB912B0267500C1A359 /* ChannelSplitterNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChannelSplitterNode.idl; sourceTree = "<group>"; };
FD315FDE12B0267600C1A359 /* ConvolverNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConvolverNode.cpp; sourceTree = "<group>"; };
FD315FDF12B0267600C1A359 /* ConvolverNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConvolverNode.h; sourceTree = "<group>"; };
FD315FE012B0267600C1A359 /* ConvolverNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ConvolverNode.idl; sourceTree = "<group>"; };
@@ -13843,17 +13854,14 @@
FD315FE512B0267600C1A359 /* DelayNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DelayNode.idl; sourceTree = "<group>"; };
FD315FE612B0267600C1A359 /* DelayProcessor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DelayProcessor.cpp; sourceTree = "<group>"; };
FD315FE712B0267600C1A359 /* DelayProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DelayProcessor.h; sourceTree = "<group>"; };
- FD315FC212B0267500C1A359 /* GainNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GainNode.cpp; sourceTree = "<group>"; };
- FD315FC312B0267500C1A359 /* GainNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GainNode.h; sourceTree = "<group>"; };
- FD315FC412B0267500C1A359 /* GainNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GainNode.idl; sourceTree = "<group>"; };
- FD315FCF12B0267500C1A359 /* PannerNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PannerNode.cpp; sourceTree = "<group>"; };
- FD315FD012B0267500C1A359 /* PannerNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PannerNode.h; sourceTree = "<group>"; };
- FD315FD112B0267500C1A359 /* PannerNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PannerNode.idl; sourceTree = "<group>"; };
FD315FEB12B0267600C1A359 /* ScriptProcessorNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptProcessorNode.cpp; sourceTree = "<group>"; };
FD315FEC12B0267600C1A359 /* ScriptProcessorNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptProcessorNode.h; sourceTree = "<group>"; };
FD315FED12B0267600C1A359 /* ScriptProcessorNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ScriptProcessorNode.idl; sourceTree = "<group>"; };
FD315FF112B0267600C1A359 /* RealtimeAnalyser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RealtimeAnalyser.cpp; sourceTree = "<group>"; };
FD315FF212B0267600C1A359 /* RealtimeAnalyser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RealtimeAnalyser.h; sourceTree = "<group>"; };
+ FD315FF312B0267600C1A359 /* AnalyserNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnalyserNode.cpp; sourceTree = "<group>"; };
+ FD315FF412B0267600C1A359 /* AnalyserNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnalyserNode.h; sourceTree = "<group>"; };
+ FD315FF512B0267600C1A359 /* AnalyserNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AnalyserNode.idl; sourceTree = "<group>"; };
FD31604412B026F700C1A359 /* AudioArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioArray.h; sourceTree = "<group>"; };
FD31604512B026F700C1A359 /* AudioBus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioBus.cpp; sourceTree = "<group>"; };
FD31604612B026F700C1A359 /* AudioBus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioBus.h; sourceTree = "<group>"; };
@@ -13959,42 +13967,42 @@
FD82D7F613D4C8BD004E4372 /* JSWaveShaperNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWaveShaperNode.h; sourceTree = "<group>"; };
FD8C46E9154608E700A5910C /* AudioScheduledSourceNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioScheduledSourceNode.cpp; sourceTree = "<group>"; };
FD8C46EA154608E700A5910C /* AudioScheduledSourceNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioScheduledSourceNode.h; sourceTree = "<group>"; };
- FDA15EC712B03F50003A583A /* JSAnalyserNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAnalyserNode.cpp; sourceTree = "<group>"; };
- FDA15EC812B03F50003A583A /* JSAnalyserNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAnalyserNode.h; sourceTree = "<group>"; };
FDA15E8112B03EE1003A583A /* JSAudioBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioBuffer.cpp; sourceTree = "<group>"; };
FDA15E8212B03EE1003A583A /* JSAudioBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioBuffer.h; sourceTree = "<group>"; };
FDA15E8312B03EE1003A583A /* JSAudioBufferSourceNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioBufferSourceNode.cpp; sourceTree = "<group>"; };
FDA15E8412B03EE1003A583A /* JSAudioBufferSourceNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioBufferSourceNode.h; sourceTree = "<group>"; };
+ FDA15E8512B03EE1003A583A /* JSChannelMergerNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSChannelMergerNode.cpp; sourceTree = "<group>"; };
+ FDA15E8612B03EE1003A583A /* JSChannelMergerNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSChannelMergerNode.h; sourceTree = "<group>"; };
+ FDA15E8712B03EE1003A583A /* JSChannelSplitterNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSChannelSplitterNode.cpp; sourceTree = "<group>"; };
+ FDA15E8812B03EE1003A583A /* JSChannelSplitterNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSChannelSplitterNode.h; sourceTree = "<group>"; };
FDA15E8912B03EE1003A583A /* JSAudioContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioContext.cpp; sourceTree = "<group>"; };
FDA15E8A12B03EE1003A583A /* JSAudioContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioContext.h; sourceTree = "<group>"; };
FDA15E8B12B03EE1003A583A /* JSAudioDestinationNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioDestinationNode.cpp; sourceTree = "<group>"; };
FDA15E8C12B03EE1003A583A /* JSAudioDestinationNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioDestinationNode.h; sourceTree = "<group>"; };
FDA15E8D12B03EE1003A583A /* JSAudioGain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioGain.cpp; sourceTree = "<group>"; };
FDA15E8E12B03EE1003A583A /* JSAudioGain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioGain.h; sourceTree = "<group>"; };
+ FDA15E8F12B03EE1003A583A /* JSGainNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGainNode.cpp; sourceTree = "<group>"; };
+ FDA15E9012B03EE1003A583A /* JSGainNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGainNode.h; sourceTree = "<group>"; };
FDA15E9112B03EE1003A583A /* JSAudioListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioListener.cpp; sourceTree = "<group>"; };
FDA15E9212B03EE1003A583A /* JSAudioListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioListener.h; sourceTree = "<group>"; };
FDA15E9312B03EE1003A583A /* JSAudioNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioNode.cpp; sourceTree = "<group>"; };
FDA15E9412B03EE1003A583A /* JSAudioNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioNode.h; sourceTree = "<group>"; };
+ FDA15E9512B03EE1003A583A /* JSPannerNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPannerNode.cpp; sourceTree = "<group>"; };
+ FDA15E9612B03EE1003A583A /* JSPannerNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPannerNode.h; sourceTree = "<group>"; };
FDA15E9712B03EE1003A583A /* JSAudioParam.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioParam.cpp; sourceTree = "<group>"; };
FDA15E9812B03EE1003A583A /* JSAudioParam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioParam.h; sourceTree = "<group>"; };
FDA15E9912B03EE1003A583A /* JSAudioProcessingEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioProcessingEvent.cpp; sourceTree = "<group>"; };
FDA15E9A12B03EE1003A583A /* JSAudioProcessingEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioProcessingEvent.h; sourceTree = "<group>"; };
FDA15E9B12B03EE1003A583A /* JSAudioSourceNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioSourceNode.cpp; sourceTree = "<group>"; };
FDA15E9C12B03EE1003A583A /* JSAudioSourceNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioSourceNode.h; sourceTree = "<group>"; };
- FDA15E8512B03EE1003A583A /* JSChannelMergerNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSChannelMergerNode.cpp; sourceTree = "<group>"; };
- FDA15E8612B03EE1003A583A /* JSChannelMergerNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSChannelMergerNode.h; sourceTree = "<group>"; };
- FDA15E8712B03EE1003A583A /* JSChannelSplitterNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSChannelSplitterNode.cpp; sourceTree = "<group>"; };
- FDA15E8812B03EE1003A583A /* JSChannelSplitterNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSChannelSplitterNode.h; sourceTree = "<group>"; };
FDA15EBB12B03F0B003A583A /* JSConvolverNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSConvolverNode.cpp; sourceTree = "<group>"; };
FDA15EBC12B03F0B003A583A /* JSConvolverNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSConvolverNode.h; sourceTree = "<group>"; };
- FDA15ECF12B03F94003A583A /* JSDelayNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDelayNode.cpp; sourceTree = "<group>"; };
- FDA15ED012B03F94003A583A /* JSDelayNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDelayNode.h; sourceTree = "<group>"; };
- FDA15E8F12B03EE1003A583A /* JSGainNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGainNode.cpp; sourceTree = "<group>"; };
- FDA15E9012B03EE1003A583A /* JSGainNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGainNode.h; sourceTree = "<group>"; };
- FDA15E9512B03EE1003A583A /* JSPannerNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPannerNode.cpp; sourceTree = "<group>"; };
- FDA15E9612B03EE1003A583A /* JSPannerNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPannerNode.h; sourceTree = "<group>"; };
+ FDA15EC712B03F50003A583A /* JSAnalyserNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAnalyserNode.cpp; sourceTree = "<group>"; };
+ FDA15EC812B03F50003A583A /* JSAnalyserNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAnalyserNode.h; sourceTree = "<group>"; };
FDA15ECB12B03F61003A583A /* JSScriptProcessorNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScriptProcessorNode.cpp; sourceTree = "<group>"; };
FDA15ECC12B03F61003A583A /* JSScriptProcessorNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScriptProcessorNode.h; sourceTree = "<group>"; };
+ FDA15ECF12B03F94003A583A /* JSDelayNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDelayNode.cpp; sourceTree = "<group>"; };
+ FDA15ED012B03F94003A583A /* JSDelayNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDelayNode.h; sourceTree = "<group>"; };
FDA3E955134A49EF008D4B5A /* OfflineAudioCompletionEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OfflineAudioCompletionEvent.cpp; sourceTree = "<group>"; };
FDA3E956134A49EF008D4B5A /* OfflineAudioCompletionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OfflineAudioCompletionEvent.h; sourceTree = "<group>"; };
FDA3E957134A49EF008D4B5A /* OfflineAudioDestinationNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OfflineAudioDestinationNode.cpp; sourceTree = "<group>"; };
@@ -14018,11 +14026,11 @@
FDEA6245152102FC00479DF0 /* JSWaveTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWaveTable.h; sourceTree = "<group>"; };
FDEAAAEF12B02EE400DCF33B /* JSAudioBufferSourceNodeCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioBufferSourceNodeCustom.cpp; sourceTree = "<group>"; };
FDEAAAF012B02EE400DCF33B /* JSAudioContextCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioContextCustom.cpp; sourceTree = "<group>"; };
+ FDEAAAFD12B02F4900DCF33B /* JSScriptProcessorNodeCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScriptProcessorNodeCustom.cpp; sourceTree = "<group>"; };
FDF09DC61399B62200688E5B /* JSBiquadFilterNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSBiquadFilterNode.cpp; sourceTree = "<group>"; };
FDF09DC71399B62200688E5B /* JSBiquadFilterNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSBiquadFilterNode.h; sourceTree = "<group>"; };
FDF6BAF6134A4C9800822920 /* JSOfflineAudioCompletionEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOfflineAudioCompletionEvent.cpp; sourceTree = "<group>"; };
FDF6BAF7134A4C9800822920 /* JSOfflineAudioCompletionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOfflineAudioCompletionEvent.h; sourceTree = "<group>"; };
- FDEAAAFD12B02F4900DCF33B /* JSScriptProcessorNodeCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScriptProcessorNodeCustom.cpp; sourceTree = "<group>"; };
FDF7E9C113AC21DB00A51EAC /* JSAudioBufferCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioBufferCallback.cpp; sourceTree = "<group>"; };
FDF7E9C213AC21DB00A51EAC /* JSAudioBufferCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioBufferCallback.h; sourceTree = "<group>"; };
FE6FD4850F676E5700092873 /* Coordinates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Coordinates.h; sourceTree = "<group>"; };
@@ -19953,6 +19961,8 @@
0F580B0A0F12A2690051D689 /* GraphicsLayer.h */,
0F580B0B0F12A2690051D689 /* GraphicsLayerClient.h */,
1AC69592161A1E53003732CB /* GraphicsLayerFactory.h */,
+ 0FA24D77162DF91900A3F4C0 /* GraphicsLayerUpdater.cpp */,
+ 0FA24D78162DF91900A3F4C0 /* GraphicsLayerUpdater.h */,
B2A015940AF6CD53006BCE0E /* GraphicsTypes.cpp */,
B2A015950AF6CD53006BCE0E /* GraphicsTypes.h */,
77A17A7A12F2890B004E02F6 /* GraphicsTypes3D.h */,
@@ -20673,6 +20683,8 @@
984264EF12D5280A000D88A4 /* LinkLoaderClient.h */,
93E227DC0AF589AD00D48324 /* MainResourceLoader.cpp */,
656D37290ADBA5DE00A4554D /* MainResourceLoader.h */,
+ 52F10862162B6D82009AC81E /* MixedContentChecker.cpp */,
+ 52F10863162B6D82009AC81E /* MixedContentChecker.h */,
93CCF05F0AF6CA7600018E89 /* NavigationAction.cpp */,
93CCF0260AF6C52900018E89 /* NavigationAction.h */,
979F43D11075E44A0000F83B /* NavigationScheduler.cpp */,
@@ -23582,6 +23594,7 @@
499B3ED7128CD31400E726C2 /* GraphicsLayerCA.h in Headers */,
0F580B0E0F12A2690051D689 /* GraphicsLayerClient.h in Headers */,
1AC69593161A1E53003732CB /* GraphicsLayerFactory.h in Headers */,
+ 0FA24D7A162DF91900A3F4C0 /* GraphicsLayerUpdater.h in Headers */,
B2A015AB0AF6CD53006BCE0E /* GraphicsTypes.h in Headers */,
77A17A7B12F2890B004E02F6 /* GraphicsTypes3D.h in Headers */,
C50B561712119D23008B46E0 /* GroupSettings.h in Headers */,
@@ -24450,6 +24463,7 @@
BCE1C41B0D982980003B02F2 /* Location.h in Headers */,
A8239E0109B3CF8A00B60641 /* Logging.h in Headers */,
656D37410ADBA5DE00A4554D /* MainResourceLoader.h in Headers */,
+ 52F10866162B6DA8009AC81E /* MixedContentChecker.h in Headers */,
1A8F6BC60DB55CDC001DB794 /* ManifestParser.h in Headers */,
93309DF8099E64920056E581 /* markup.h in Headers */,
9728C3141268E4390041E89B /* MarkupAccumulator.h in Headers */,
@@ -24937,6 +24951,8 @@
1AF62F2614DAFEA10041556C /* ScrollingThread.h in Headers */,
1AAADDA414DB409F00AF64B3 /* ScrollingTree.h in Headers */,
1AAADDE414DC8C8F00AF64B3 /* ScrollingTreeNode.h in Headers */,
+ 9391A99D1629D70000297330 /* ScrollingTreeScrollingNode.h in Headers */,
+ 93C4A4151629DF5A00C3EB6E /* ScrollingTreeScrollingNodeMac.h in Headers */,
93C09C860B0657AA005ABD4D /* ScrollTypes.h in Headers */,
BC6D6E2609AF943500F59759 /* ScrollView.h in Headers */,
F55B3DD21251F12D003EF269 /* SearchInputType.h in Headers */,
@@ -25605,8 +25621,6 @@
E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
977E2E0F12F0FC9C00C13379 /* XSSAuditor.h in Headers */,
FD537353137B651800008DCE /* ZeroPole.h in Headers */,
- 9391A99D1629D70000297330 /* ScrollingTreeScrollingNode.h in Headers */,
- 93C4A4151629DF5A00C3EB6E /* ScrollingTreeScrollingNodeMac.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -26815,6 +26829,7 @@
B277B4040B22F37C0004BEC6 /* GraphicsContextMac.mm in Sources */,
0F580B0C0F12A2690051D689 /* GraphicsLayer.cpp in Sources */,
499B3ED6128CD31400E726C2 /* GraphicsLayerCA.cpp in Sources */,
+ 0FA24D79162DF91900A3F4C0 /* GraphicsLayerUpdater.cpp in Sources */,
B2A015AA0AF6CD53006BCE0E /* GraphicsTypes.cpp in Sources */,
C50B561612119D23008B46E0 /* GroupSettings.cpp in Sources */,
F55B3DBF1251F12D003EF269 /* HiddenInputType.cpp in Sources */,
@@ -27772,6 +27787,7 @@
A8239E0009B3CF8A00B60641 /* Logging.cpp in Sources */,
1402645E0AFDC19B005919E2 /* LoggingMac.mm in Sources */,
93E227E10AF589AD00D48324 /* MainResourceLoader.cpp in Sources */,
+ 52F10865162B6DA4009AC81E /* MixedContentChecker.cpp in Sources */,
1A8F6BC50DB55CDC001DB794 /* ManifestParser.cpp in Sources */,
93309DF7099E64920056E581 /* markup.cpp in Sources */,
9728C3131268E4390041E89B /* MarkupAccumulator.cpp in Sources */,
@@ -28165,6 +28181,8 @@
1AAADDA314DB409F00AF64B3 /* ScrollingTree.cpp in Sources */,
1A35862C152522540022A659 /* ScrollingTreeMac.mm in Sources */,
1AAADDE314DC8C8F00AF64B3 /* ScrollingTreeNode.cpp in Sources */,
+ 9391A99C1629D70000297330 /* ScrollingTreeScrollingNode.cpp in Sources */,
+ 93C4A4161629DF5A00C3EB6E /* ScrollingTreeScrollingNodeMac.mm in Sources */,
BC2441C40E8B65D00055320F /* ScrollView.cpp in Sources */,
9353676B09AED88B00D35CD6 /* ScrollViewMac.mm in Sources */,
F55B3DD11251F12D003EF269 /* SearchInputType.cpp in Sources */,
@@ -28710,8 +28728,6 @@
E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
977E2E0E12F0FC9C00C13379 /* XSSAuditor.cpp in Sources */,
FD537352137B651800008DCE /* ZeroPole.cpp in Sources */,
- 9391A99C1629D70000297330 /* ScrollingTreeScrollingNode.cpp in Sources */,
- 93C4A4161629DF5A00C3EB6E /* ScrollingTreeScrollingNodeMac.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm b/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
index ed1422178..8c9d868de 100644
--- a/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -382,9 +382,13 @@ END
}
inline static v8::Handle<v8::Object> wrap(${nativeType}*, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* = 0);
static void derefObject(void*);
- static void visitDOMWrapper(DOMDataStore*, void*, v8::Persistent<v8::Object>);
static WrapperTypeInfo info;
END
+
+ if (NeedsToVisitDOMWrapper($dataNode)) {
+ push(@headerContent, " static void visitDOMWrapper(DOMDataStore*, void*, v8::Persistent<v8::Object>);\n");
+ }
+
if ($dataNode->extendedAttributes->{"ActiveDOMObject"}) {
push(@headerContent, " static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>);\n");
}
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.h b/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.h
index 6819c73cb..1824b2753 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.h
+++ b/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.h
@@ -44,7 +44,6 @@ public:
}
inline static v8::Handle<v8::Object> wrap(Float64Array*, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* = 0);
static void derefObject(void*);
- static void visitDOMWrapper(DOMDataStore*, void*, v8::Persistent<v8::Object>);
static WrapperTypeInfo info;
static v8::Handle<v8::Value> constructorCallback(const v8::Arguments&);
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.h b/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.h
index ada591991..81498e256 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.h
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.h
@@ -43,7 +43,6 @@ public:
}
inline static v8::Handle<v8::Object> wrap(TestActiveDOMObject*, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* = 0);
static void derefObject(void*);
- static void visitDOMWrapper(DOMDataStore*, void*, v8::Persistent<v8::Object>);
static WrapperTypeInfo info;
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
static bool namedSecurityCheck(v8::Local<v8::Object> host, v8::Local<v8::Value> key, v8::AccessType, v8::Local<v8::Value> data);
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.h b/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.h
index 1148b25c1..d07e7a554 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.h
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.h
@@ -43,7 +43,6 @@ public:
}
inline static v8::Handle<v8::Object> wrap(TestCustomNamedGetter*, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* = 0);
static void derefObject(void*);
- static void visitDOMWrapper(DOMDataStore*, void*, v8::Persistent<v8::Object>);
static WrapperTypeInfo info;
static v8::Handle<v8::Value> namedPropertyGetter(v8::Local<v8::String>, const v8::AccessorInfo&);
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.h b/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.h
index 9c99344c1..2399c87fa 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.h
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.h
@@ -44,7 +44,6 @@ public:
}
inline static v8::Handle<v8::Object> wrap(TestEventConstructor*, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* = 0);
static void derefObject(void*);
- static void visitDOMWrapper(DOMDataStore*, void*, v8::Persistent<v8::Object>);
static WrapperTypeInfo info;
static v8::Handle<v8::Value> constructorCallback(const v8::Arguments&);
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.h b/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.h
index ea5307bb8..7981adc4b 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.h
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.h
@@ -43,7 +43,6 @@ public:
}
inline static v8::Handle<v8::Object> wrap(TestEventTarget*, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* = 0);
static void derefObject(void*);
- static void visitDOMWrapper(DOMDataStore*, void*, v8::Persistent<v8::Object>);
static WrapperTypeInfo info;
static v8::Handle<v8::Value> indexedPropertyGetter(uint32_t, const v8::AccessorInfo&);
static v8::Handle<v8::Value> namedPropertyGetter(v8::Local<v8::String>, const v8::AccessorInfo&);
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestException.h b/Source/WebCore/bindings/scripts/test/V8/V8TestException.h
index 0e3c1fe59..ff66cc594 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestException.h
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestException.h
@@ -43,7 +43,6 @@ public:
}
inline static v8::Handle<v8::Object> wrap(TestException*, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* = 0);
static void derefObject(void*);
- static void visitDOMWrapper(DOMDataStore*, void*, v8::Persistent<v8::Object>);
static WrapperTypeInfo info;
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
static void installPerContextProperties(v8::Handle<v8::Object>, TestException*) { }
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.h b/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.h
index e4f5899bb..535b7d0db 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.h
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.h
@@ -45,7 +45,6 @@ public:
}
inline static v8::Handle<v8::Object> wrap(TestInterface*, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* = 0);
static void derefObject(void*);
- static void visitDOMWrapper(DOMDataStore*, void*, v8::Persistent<v8::Object>);
static WrapperTypeInfo info;
static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>);
static v8::Handle<v8::Value> constructorCallback(const v8::Arguments&);
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.h b/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.h
index d98560dbe..b0a2ef70d 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.h
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.h
@@ -43,7 +43,6 @@ public:
}
inline static v8::Handle<v8::Object> wrap(TestMediaQueryListListener*, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* = 0);
static void derefObject(void*);
- static void visitDOMWrapper(DOMDataStore*, void*, v8::Persistent<v8::Object>);
static WrapperTypeInfo info;
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
static void installPerContextProperties(v8::Handle<v8::Object>, TestMediaQueryListListener*) { }
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.h b/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.h
index be2c8f7b9..2fc0099ae 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.h
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.h
@@ -49,7 +49,6 @@ public:
}
inline static v8::Handle<v8::Object> wrap(TestNamedConstructor*, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* = 0);
static void derefObject(void*);
- static void visitDOMWrapper(DOMDataStore*, void*, v8::Persistent<v8::Object>);
static WrapperTypeInfo info;
static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>);
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestNode.h b/Source/WebCore/bindings/scripts/test/V8/V8TestNode.h
index dde3b55a1..6b42e5bb5 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestNode.h
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestNode.h
@@ -43,7 +43,6 @@ public:
}
inline static v8::Handle<v8::Object> wrap(TestNode*, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* = 0);
static void derefObject(void*);
- static void visitDOMWrapper(DOMDataStore*, void*, v8::Persistent<v8::Object>);
static WrapperTypeInfo info;
static v8::Handle<v8::Value> constructorCallback(const v8::Arguments&);
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestObj.h b/Source/WebCore/bindings/scripts/test/V8/V8TestObj.h
index 2f1c20982..29c55353d 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestObj.h
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestObj.h
@@ -43,7 +43,6 @@ public:
}
inline static v8::Handle<v8::Object> wrap(TestObj*, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* = 0);
static void derefObject(void*);
- static void visitDOMWrapper(DOMDataStore*, void*, v8::Persistent<v8::Object>);
static WrapperTypeInfo info;
static v8::Handle<v8::Value> customMethodCallback(const v8::Arguments&);
static v8::Handle<v8::Value> customMethodWithArgsCallback(const v8::Arguments&);
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h b/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h
index 43b1cc78e..bfe6c99e9 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h
@@ -45,7 +45,6 @@ public:
}
inline static v8::Handle<v8::Object> wrap(TestSerializedScriptValueInterface*, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* = 0);
static void derefObject(void*);
- static void visitDOMWrapper(DOMDataStore*, void*, v8::Persistent<v8::Object>);
static WrapperTypeInfo info;
static v8::Handle<v8::Value> constructorCallback(const v8::Arguments&);
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
diff --git a/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp b/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp
index a0a60dbf1..6df0b72d5 100644
--- a/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp
+++ b/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp
@@ -112,4 +112,35 @@ PassRefPtr<DOMWrapperWorld> DOMWrapperWorld::ensureIsolatedWorld(int worldId, in
return world.release();
}
+typedef HashMap<int, RefPtr<SecurityOrigin> > IsolatedWorldSecurityOriginMap;
+static IsolatedWorldSecurityOriginMap& isolatedWorldSecurityOrigins()
+{
+ ASSERT(isMainThread());
+ DEFINE_STATIC_LOCAL(IsolatedWorldSecurityOriginMap, map, ());
+ return map;
+}
+
+SecurityOrigin* DOMWrapperWorld::isolatedWorldSecurityOrigin()
+{
+ ASSERT(this->isIsolatedWorld());
+ IsolatedWorldSecurityOriginMap& origins = isolatedWorldSecurityOrigins();
+ IsolatedWorldSecurityOriginMap::iterator it = origins.find(worldId());
+ return it == origins.end() ? 0 : it->value.get();
+}
+
+void DOMWrapperWorld::setIsolatedWorldSecurityOrigin(int worldID, PassRefPtr<SecurityOrigin> securityOrigin)
+{
+ ASSERT(DOMWrapperWorld::isIsolatedWorldId(worldID));
+ if (securityOrigin)
+ isolatedWorldSecurityOrigins().set(worldID, securityOrigin);
+ else
+ isolatedWorldSecurityOrigins().remove(worldID);
+}
+
+void DOMWrapperWorld::clearIsolatedWorldSecurityOrigin(int worldID)
+{
+ ASSERT(DOMWrapperWorld::isIsolatedWorldId(worldID));
+ isolatedWorldSecurityOrigins().remove(worldID);
+}
+
} // namespace WebCore
diff --git a/Source/WebCore/bindings/v8/DOMWrapperWorld.h b/Source/WebCore/bindings/v8/DOMWrapperWorld.h
index 9cccd5fc6..adf124ec2 100644
--- a/Source/WebCore/bindings/v8/DOMWrapperWorld.h
+++ b/Source/WebCore/bindings/v8/DOMWrapperWorld.h
@@ -32,6 +32,7 @@
#define DOMWrapperWorld_h
#include "DOMDataStore.h"
+#include "SecurityOrigin.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
@@ -45,14 +46,22 @@ public:
static const int mainWorldExtensionGroup = 0;
static const int uninitializedWorldId = -1;
static const int uninitializedExtensionGroup = -1;
- // If 0 is passed as worldId, the world will be assigned a temporary id instead.
+ // If uninitializedWorldId is passed as worldId, the world will be assigned a temporary id instead.
static PassRefPtr<DOMWrapperWorld> ensureIsolatedWorld(int worldId, int extensionGroup);
static bool isolatedWorldsExist() { return isolatedWorldCount; }
+ static bool isIsolatedWorldId(int worldId) { return worldId != mainWorldId && worldId != uninitializedWorldId; }
+ // Associates an isolated world (see above for description) with a security
+ // origin. XMLHttpRequest instances used in that world will be considered
+ // to come from that origin, not the frame's.
+ static void setIsolatedWorldSecurityOrigin(int worldID, PassRefPtr<SecurityOrigin>);
+ static void clearIsolatedWorldSecurityOrigin(int worldID);
+ SecurityOrigin* isolatedWorldSecurityOrigin();
// FIXME: this is a workaround for a problem in WebViewImpl.
// Do not use this anywhere else!!
static PassRefPtr<DOMWrapperWorld> createUninitializedWorld();
bool isMainWorld() { return m_worldId == mainWorldId; }
+ bool isIsolatedWorld() { return isIsolatedWorldId(m_worldId); }
int worldId() const { return m_worldId; }
int extensionGroup() const { return m_extensionGroup; }
DOMDataStore* domDataStore() const
diff --git a/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp b/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp
index 1f3008e78..83ae9b2fd 100644
--- a/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp
+++ b/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp
@@ -214,7 +214,10 @@ ScriptValue deserializeIDBValue(ScriptExecutionContext* scriptContext, PassRefPt
{
v8::HandleScope handleScope;
v8::Context::Scope contextScope(toV8Context(scriptContext, UseCurrentWorld));
- return ScriptValue(prpValue->deserialize());
+ RefPtr<SerializedScriptValue> serializedValue = prpValue;
+ if (serializedValue)
+ return ScriptValue(serializedValue->deserialize());
+ return ScriptValue(v8::Null());
}
bool injectIDBKeyIntoScriptValue(PassRefPtr<IDBKey> key, ScriptValue& value, const IDBKeyPath& keyPath)
diff --git a/Source/WebCore/bindings/v8/ScriptController.cpp b/Source/WebCore/bindings/v8/ScriptController.cpp
index dd57bc439..b2a9b96a9 100644
--- a/Source/WebCore/bindings/v8/ScriptController.cpp
+++ b/Source/WebCore/bindings/v8/ScriptController.cpp
@@ -149,7 +149,6 @@ void ScriptController::resetIsolatedWorlds()
iter->value->destroyIsolatedShell();
}
m_isolatedWorlds.clear();
- m_isolatedWorldSecurityOrigins.clear();
}
void ScriptController::clearForClose()
@@ -369,12 +368,6 @@ void ScriptController::evaluateInIsolatedWorld(int worldID, const Vector<ScriptS
v8::HandleScope evaluateHandleScope;
V8DOMWindowShell* isolatedWorldShell = ensureIsolatedWorldContext(worldID, extensionGroup);
- if (worldID != DOMWrapperWorld::uninitializedWorldId) {
- IsolatedWorldSecurityOriginMap::iterator securityOriginIter = m_isolatedWorldSecurityOrigins.find(worldID);
- if (securityOriginIter != m_isolatedWorldSecurityOrigins.end())
- isolatedWorldShell->setIsolatedWorldSecurityOrigin(securityOriginIter->value);
- }
-
isolatedWorldShell->initializeIfNeeded();
if (isolatedWorldShell->context().IsEmpty())
return;
@@ -406,15 +399,6 @@ void ScriptController::evaluateInIsolatedWorld(int worldID, const Vector<ScriptS
}
}
-void ScriptController::setIsolatedWorldSecurityOrigin(int worldID, PassRefPtr<SecurityOrigin> securityOrigin)
-{
- ASSERT(worldID);
- m_isolatedWorldSecurityOrigins.set(worldID, securityOrigin);
- IsolatedWorldMap::iterator iter = m_isolatedWorlds.find(worldID);
- if (iter != m_isolatedWorlds.end())
- iter->value->setIsolatedWorldSecurityOrigin(securityOrigin);
-}
-
TextPosition ScriptController::eventHandlerPosition() const
{
ScriptableDocumentParser* parser = m_frame->document()->scriptableDocumentParser();
@@ -667,13 +651,14 @@ void ScriptController::collectIsolatedContexts(Vector<std::pair<ScriptState*, Se
v8::HandleScope handleScope;
for (IsolatedWorldMap::iterator it = m_isolatedWorlds.begin(); it != m_isolatedWorlds.end(); ++it) {
V8DOMWindowShell* isolatedWorldShell = it->value;
- if (!isolatedWorldShell->isolatedWorldSecurityOrigin())
+ SecurityOrigin* origin = isolatedWorldShell->world()->isolatedWorldSecurityOrigin();
+ if (!origin)
continue;
v8::Handle<v8::Context> v8Context = isolatedWorldShell->context();
if (v8Context.IsEmpty())
continue;
ScriptState* scriptState = ScriptState::forContext(v8::Local<v8::Context>::New(v8Context));
- result.append(std::pair<ScriptState*, SecurityOrigin*>(scriptState, isolatedWorldShell->isolatedWorldSecurityOrigin()));
+ result.append(std::pair<ScriptState*, SecurityOrigin*>(scriptState, origin));
}
}
#endif
diff --git a/Source/WebCore/bindings/v8/ScriptController.h b/Source/WebCore/bindings/v8/ScriptController.h
index dffee3503..5a1ff4578 100644
--- a/Source/WebCore/bindings/v8/ScriptController.h
+++ b/Source/WebCore/bindings/v8/ScriptController.h
@@ -107,10 +107,11 @@ public:
// FIXME: Get rid of extensionGroup here.
void evaluateInIsolatedWorld(int worldID, const Vector<ScriptSourceCode>& sources, int extensionGroup, Vector<ScriptValue>* results);
- // Associates an isolated world (see above for description) with a security
- // origin. XMLHttpRequest instances used in that world will be considered
- // to come from that origin, not the frame's.
- void setIsolatedWorldSecurityOrigin(int worldID, PassRefPtr<SecurityOrigin>);
+ // FIXME: Remove references to this call in chromium and delete it.
+ inline static void setIsolatedWorldSecurityOrigin(int worldID, PassRefPtr<SecurityOrigin> origin)
+ {
+ DOMWrapperWorld::setIsolatedWorldSecurityOrigin(worldID, origin);
+ }
// Creates a property of the global object of a frame.
void bindToWindowObject(Frame*, const String& key, NPObject*);
@@ -190,7 +191,6 @@ private:
// reference to the v8 context it contains, which is not made weak until we
// call world->destroyIsolatedShell().
typedef HashMap<int, V8DOMWindowShell*> IsolatedWorldMap;
- typedef HashMap<int, RefPtr<SecurityOrigin> > IsolatedWorldSecurityOriginMap;
void resetIsolatedWorlds();
@@ -204,7 +204,6 @@ private:
// here so that they can be used again by future calls to
// evaluateInIsolatedWorld().
IsolatedWorldMap m_isolatedWorlds;
- IsolatedWorldSecurityOriginMap m_isolatedWorldSecurityOrigins;
bool m_paused;
diff --git a/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp b/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
index 8d1bc2649..8a41b56a7 100644
--- a/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
+++ b/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
@@ -381,6 +381,12 @@ bool V8DOMWindowShell::initializeIfNeeded()
// document domain
// changes.
m_context->UseDefaultSecurityToken();
+
+ SecurityOrigin* origin = m_world->isolatedWorldSecurityOrigin();
+ if (origin && InspectorInstrumentation::hasFrontends()) {
+ ScriptState* scriptState = ScriptState::forContext(v8::Local<v8::Context>::New(m_context.get()));
+ InspectorInstrumentation::didCreateIsolatedContext(m_frame, scriptState, origin);
+ }
}
m_frame->loader()->client()->didCreateScriptContext(m_context.get(), m_world->extensionGroup(), m_world->worldId());
@@ -611,16 +617,4 @@ void V8DOMWindowShell::updateSecurityOrigin()
setSecurityToken();
}
-void V8DOMWindowShell::setIsolatedWorldSecurityOrigin(PassRefPtr<SecurityOrigin> securityOrigin)
-{
- ASSERT(!m_world->isMainWorld());
- // FIXME: Should this be here?
- if (!m_isolatedWorldShellSecurityOrigin && !context().IsEmpty() && InspectorInstrumentation::runtimeAgentEnabled(m_frame)) {
- v8::HandleScope handleScope;
- ScriptState* scriptState = ScriptState::forContext(v8::Local<v8::Context>::New(context()));
- InspectorInstrumentation::didCreateIsolatedContext(m_frame, scriptState, securityOrigin.get());
- }
- m_isolatedWorldShellSecurityOrigin = securityOrigin;
-}
-
} // WebCore
diff --git a/Source/WebCore/bindings/v8/V8DOMWindowShell.h b/Source/WebCore/bindings/v8/V8DOMWindowShell.h
index 01d29817f..7d206d4cd 100644
--- a/Source/WebCore/bindings/v8/V8DOMWindowShell.h
+++ b/Source/WebCore/bindings/v8/V8DOMWindowShell.h
@@ -83,13 +83,6 @@ public:
DOMWrapperWorld* world() { return m_world.get(); }
- void setIsolatedWorldSecurityOrigin(PassRefPtr<SecurityOrigin>);
- SecurityOrigin* isolatedWorldSecurityOrigin() const
- {
- ASSERT(!m_world->isMainWorld());
- return m_isolatedWorldShellSecurityOrigin.get();
- };
-
// Returns the isolated world associated with
// v8::Context::GetEntered(). Because worlds are isolated, the entire
// JavaScript call stack should be from the same isolated world.
@@ -136,9 +129,6 @@ private:
ScopedPersistent<v8::Context> m_context;
ScopedPersistent<v8::Object> m_global;
ScopedPersistent<v8::Object> m_document;
-
- // FIXME: Either remove this or the map in ScriptController.
- RefPtr<SecurityOrigin> m_isolatedWorldShellSecurityOrigin;
};
} // namespace WebCore
diff --git a/Source/WebCore/bindings/v8/V8StringResource.cpp b/Source/WebCore/bindings/v8/V8StringResource.cpp
index c7c964df1..598553fff 100644
--- a/Source/WebCore/bindings/v8/V8StringResource.cpp
+++ b/Source/WebCore/bindings/v8/V8StringResource.cpp
@@ -30,14 +30,14 @@
namespace WebCore {
-template <class S> struct StringTraits {
- static S fromStringResource(WebCoreStringResource*);
- static S fromV8String(v8::Handle<v8::String>, int);
+template <class StringClass> struct StringTraits {
+ static const StringClass& fromStringResource(WebCoreStringResource*);
+ static StringClass fromV8String(v8::Handle<v8::String>, int);
};
template<>
struct StringTraits<String> {
- static String fromStringResource(WebCoreStringResource* resource)
+ static const String& fromStringResource(WebCoreStringResource* resource)
{
return resource->webcoreString();
}
@@ -56,7 +56,7 @@ struct StringTraits<String> {
template<>
struct StringTraits<AtomicString> {
- static AtomicString fromStringResource(WebCoreStringResource* resource)
+ static const AtomicString& fromStringResource(WebCoreStringResource* resource)
{
return resource->atomicString();
}
diff --git a/Source/WebCore/bindings/v8/V8ValueCache.h b/Source/WebCore/bindings/v8/V8ValueCache.h
index a74c4a3c3..72a1b7045 100644
--- a/Source/WebCore/bindings/v8/V8ValueCache.h
+++ b/Source/WebCore/bindings/v8/V8ValueCache.h
@@ -113,9 +113,9 @@ public:
virtual size_t length() const { return m_plainString.impl()->length(); }
- String webcoreString() { return m_plainString; }
+ const String& webcoreString() { return m_plainString; }
- AtomicString atomicString()
+ const AtomicString& atomicString()
{
#ifndef NDEBUG
ASSERT(m_threadId == WTF::currentThread());
diff --git a/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp b/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp
index 050b7fb4d..6f3d6ee41 100644
--- a/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp
@@ -56,7 +56,7 @@ v8::Handle<v8::Value> V8XMLHttpRequest::constructorCallback(const v8::Arguments&
RefPtr<SecurityOrigin> securityOrigin;
if (V8DOMWindowShell* isolatedWorldShell = V8DOMWindowShell::getEntered())
- securityOrigin = isolatedWorldShell->isolatedWorldSecurityOrigin();
+ securityOrigin = isolatedWorldShell->world()->isolatedWorldSecurityOrigin();
RefPtr<XMLHttpRequest> xmlHttpRequest = XMLHttpRequest::create(context, securityOrigin);
diff --git a/Source/WebCore/css/StyleBuilder.cpp b/Source/WebCore/css/StyleBuilder.cpp
index 8075d8d0d..d6284ed2e 100644
--- a/Source/WebCore/css/StyleBuilder.cpp
+++ b/Source/WebCore/css/StyleBuilder.cpp
@@ -2003,6 +2003,7 @@ StyleBuilder::StyleBuilder()
setPropertyHandler(CSSPropertyWebkitHyphens, ApplyPropertyDefault<Hyphens, &RenderStyle::hyphens, Hyphens, &RenderStyle::setHyphens, Hyphens, &RenderStyle::initialHyphens>::createHandler());
setPropertyHandler(CSSPropertyWebkitLineAlign, ApplyPropertyDefault<LineAlign, &RenderStyle::lineAlign, LineAlign, &RenderStyle::setLineAlign, LineAlign, &RenderStyle::initialLineAlign>::createHandler());
setPropertyHandler(CSSPropertyWebkitLineBreak, ApplyPropertyDefault<EKHTMLLineBreak, &RenderStyle::khtmlLineBreak, EKHTMLLineBreak, &RenderStyle::setKHTMLLineBreak, EKHTMLLineBreak, &RenderStyle::initialKHTMLLineBreak>::createHandler());
+ setPropertyHandler(CSSPropertyWebkitLineClamp, ApplyPropertyDefault<const LineClampValue&, &RenderStyle::lineClamp, LineClampValue, &RenderStyle::setLineClamp, LineClampValue, &RenderStyle::initialLineClamp>::createHandler());
setPropertyHandler(CSSPropertyWebkitLineGrid, ApplyPropertyString<MapNoneToNull, &RenderStyle::lineGrid, &RenderStyle::setLineGrid, &RenderStyle::initialLineGrid>::createHandler());
setPropertyHandler(CSSPropertyWebkitLineSnap, ApplyPropertyDefault<LineSnap, &RenderStyle::lineSnap, LineSnap, &RenderStyle::setLineSnap, LineSnap, &RenderStyle::initialLineSnap>::createHandler());
setPropertyHandler(CSSPropertyWebkitMarginAfterCollapse, ApplyPropertyDefault<EMarginCollapse, &RenderStyle::marginAfterCollapse, EMarginCollapse, &RenderStyle::setMarginAfterCollapse, EMarginCollapse, &RenderStyle::initialMarginAfterCollapse>::createHandler());
diff --git a/Source/WebCore/css/StyleResolver.cpp b/Source/WebCore/css/StyleResolver.cpp
index c930c9a9c..072a0f779 100644
--- a/Source/WebCore/css/StyleResolver.cpp
+++ b/Source/WebCore/css/StyleResolver.cpp
@@ -3318,9 +3318,6 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
}
return;
}
- case CSSPropertyWebkitLineClamp:
- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(lineClamp, LineClamp)
- return;
case CSSPropertyWebkitLocale: {
HANDLE_INHERIT_AND_INITIAL(locale, Locale);
if (!primitiveValue)
@@ -3835,6 +3832,7 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
case CSSPropertyWebkitHyphens:
case CSSPropertyWebkitLineAlign:
case CSSPropertyWebkitLineBreak:
+ case CSSPropertyWebkitLineClamp:
case CSSPropertyWebkitLineGrid:
case CSSPropertyWebkitLineSnap:
case CSSPropertyWebkitMarqueeDirection:
diff --git a/Source/WebCore/dom/ContainerNodeAlgorithms.cpp b/Source/WebCore/dom/ContainerNodeAlgorithms.cpp
index f565adb4d..59dac7444 100644
--- a/Source/WebCore/dom/ContainerNodeAlgorithms.cpp
+++ b/Source/WebCore/dom/ContainerNodeAlgorithms.cpp
@@ -48,8 +48,10 @@ void ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument(ContainerN
if (ElementShadow* shadow = toElement(node)->shadow()) {
ShadowRootVector roots(shadow);
- for (size_t i = 0; i < roots.size(); ++i)
- notifyNodeInsertedIntoDocument(roots[i].get());
+ for (size_t i = 0; i < roots.size(); ++i) {
+ if (node->inDocument() && roots[i]->host() == node)
+ notifyNodeInsertedIntoDocument(roots[i].get());
+ }
}
}
@@ -83,8 +85,10 @@ void ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument(ContainerNode
if (ElementShadow* shadow = toElement(node)->shadow()) {
ShadowRootVector roots(shadow);
- for (size_t i = 0; i < roots.size(); ++i)
- notifyNodeRemovedFromDocument(roots[i].get());
+ for (size_t i = 0; i < roots.size(); ++i) {
+ if (!node->inDocument() && roots[i]->host() == node)
+ notifyNodeRemovedFromDocument(roots[i].get());
+ }
}
}
diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp
index c453cd3cc..efe89f40f 100644
--- a/Source/WebCore/dom/Document.cpp
+++ b/Source/WebCore/dom/Document.cpp
@@ -182,6 +182,10 @@
#include <wtf/StdLibExtras.h>
#include <wtf/text/StringBuffer.h>
+#if USE(ACCELERATED_COMPOSITING)
+#include "RenderLayerCompositor.h"
+#endif
+
#if ENABLE(SHARED_WORKERS)
#include "SharedWorkerRepository.h"
#endif
@@ -4962,14 +4966,18 @@ void Document::resumeScriptedAnimationControllerCallbacks()
void Document::windowScreenDidChange(PlatformDisplayID displayID)
{
+ UNUSED_PARAM(displayID);
+
#if ENABLE(REQUEST_ANIMATION_FRAME)
if (m_scriptedAnimationController)
m_scriptedAnimationController->windowScreenDidChange(displayID);
-#else
- UNUSED_PARAM(displayID);
#endif
-}
+#if USE(ACCELERATED_COMPOSITING)
+ if (renderView()->usesCompositing())
+ renderView()->compositor()->windowScreenDidChange(displayID);
+#endif
+}
String Document::displayStringModifiedByEncoding(const String& str) const
{
diff --git a/Source/WebCore/dom/EventTarget.cpp b/Source/WebCore/dom/EventTarget.cpp
index 56fd4dd0b..214f9a3e6 100644
--- a/Source/WebCore/dom/EventTarget.cpp
+++ b/Source/WebCore/dom/EventTarget.cpp
@@ -84,16 +84,19 @@ bool EventTarget::removeEventListener(const AtomicString& eventType, EventListen
// Notify firing events planning to invoke the listener at 'index' that
// they have one less listener to invoke.
- for (size_t i = 0; i < d->firingEventIterators.size(); ++i) {
- if (eventType != d->firingEventIterators[i].eventType)
+ if (!d->firingEventIterators)
+ return true;
+ for (size_t i = 0; i < d->firingEventIterators->size(); ++i) {
+ FiringEventIterator& firingIterator = d->firingEventIterators->at(i);
+ if (eventType != firingIterator.eventType)
continue;
- if (indexOfRemovedListener >= d->firingEventIterators[i].end)
+ if (indexOfRemovedListener >= firingIterator.end)
continue;
- --d->firingEventIterators[i].end;
- if (indexOfRemovedListener <= d->firingEventIterators[i].iterator)
- --d->firingEventIterators[i].iterator;
+ --firingIterator.end;
+ if (indexOfRemovedListener <= firingIterator.iterator)
+ --firingIterator.iterator;
}
return true;
@@ -185,7 +188,9 @@ void EventTarget::fireEventListeners(Event* event, EventTargetData* d, EventList
size_t i = 0;
size_t end = entry.size();
- d->firingEventIterators.append(FiringEventIterator(event->type(), i, end));
+ if (!d->firingEventIterators)
+ d->firingEventIterators = adoptPtr(new FiringEventIteratorVector);
+ d->firingEventIterators->append(FiringEventIterator(event->type(), i, end));
for ( ; i < end; ++i) {
RegisteredEventListener& registeredListener = entry[i];
if (event->eventPhase() == Event::CAPTURING_PHASE && !registeredListener.useCapture)
@@ -205,7 +210,7 @@ void EventTarget::fireEventListeners(Event* event, EventTargetData* d, EventList
registeredListener.listener->handleEvent(context, event);
InspectorInstrumentation::didHandleEvent(cookie);
}
- d->firingEventIterators.removeLast();
+ d->firingEventIterators->removeLast();
}
const EventListenerVector& EventTarget::getEventListeners(const AtomicString& eventType)
@@ -232,9 +237,11 @@ void EventTarget::removeAllEventListeners()
// Notify firing events planning to invoke the listener at 'index' that
// they have one less listener to invoke.
- for (size_t i = 0; i < d->firingEventIterators.size(); ++i) {
- d->firingEventIterators[i].iterator = 0;
- d->firingEventIterators[i].end = 0;
+ if (d->firingEventIterators) {
+ for (size_t i = 0; i < d->firingEventIterators->size(); ++i) {
+ d->firingEventIterators->at(i).iterator = 0;
+ d->firingEventIterators->at(i).end = 0;
+ }
}
}
diff --git a/Source/WebCore/dom/EventTarget.h b/Source/WebCore/dom/EventTarget.h
index 146f6a899..d4a6330c9 100644
--- a/Source/WebCore/dom/EventTarget.h
+++ b/Source/WebCore/dom/EventTarget.h
@@ -97,7 +97,7 @@ namespace WebCore {
~EventTargetData();
EventListenerMap eventListenerMap;
- FiringEventIteratorVector firingEventIterators;
+ OwnPtr<FiringEventIteratorVector> firingEventIterators;
};
class EventTarget {
@@ -190,7 +190,7 @@ namespace WebCore {
EventTargetData* d = eventTargetData();
if (!d)
return false;
- return d->firingEventIterators.size() != 0;
+ return d->firingEventIterators && !d->firingEventIterators->isEmpty();
}
inline bool EventTarget::hasEventListeners()
diff --git a/Source/WebCore/html/HTMLPlugInElement.cpp b/Source/WebCore/html/HTMLPlugInElement.cpp
index 9947a736e..2d965624a 100644
--- a/Source/WebCore/html/HTMLPlugInElement.cpp
+++ b/Source/WebCore/html/HTMLPlugInElement.cpp
@@ -72,6 +72,12 @@ HTMLPlugInElement::~HTMLPlugInElement()
#endif
}
+bool HTMLPlugInElement::canProcessDrag() const
+{
+ const PluginViewBase* plugin = pluginWidget() && pluginWidget()->isPluginViewBase() ? static_cast<const PluginViewBase*>(pluginWidget()) : 0;
+ return plugin ? plugin->canProcessDrag() : false;
+}
+
void HTMLPlugInElement::detach()
{
m_instance.clear();
diff --git a/Source/WebCore/html/HTMLPlugInElement.h b/Source/WebCore/html/HTMLPlugInElement.h
index d7bcb166e..859ac2edc 100644
--- a/Source/WebCore/html/HTMLPlugInElement.h
+++ b/Source/WebCore/html/HTMLPlugInElement.h
@@ -66,6 +66,8 @@ public:
bool canContainRangeEndPoint() const { return false; }
+ bool canProcessDrag() const;
+
protected:
HTMLPlugInElement(const QualifiedName& tagName, Document*);
diff --git a/Source/WebCore/html/shadow/ContentDistributor.cpp b/Source/WebCore/html/shadow/ContentDistributor.cpp
index 40059c609..ec367ef2c 100644
--- a/Source/WebCore/html/shadow/ContentDistributor.cpp
+++ b/Source/WebCore/html/shadow/ContentDistributor.cpp
@@ -89,6 +89,9 @@ void ContentDistributor::distribute(Element* host)
distributeNodeChildrenTo(point, older);
older->setAssignedTo(point);
}
+
+ if (ElementShadow* shadow = node->parentNode()->isElementNode() ? toElement(node->parentNode())->shadow() : 0)
+ shadow->invalidateDistribution();
}
}
}
diff --git a/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp b/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp
index ffb03979d..f843fa630 100644
--- a/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp
+++ b/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp
@@ -82,7 +82,7 @@ PassRefPtr<RenderStyle> DateTimeNumericFieldElement::customStyleForRenderer()
float maxiumWidth = style->font().width(m_placeholder);
maxiumWidth = std::max(maxiumWidth, style->font().width(formatValue(maximum())));
maxiumWidth = std::max(maxiumWidth, style->font().width(value()));
- style->setWidth(Length(maxiumWidth, Fixed));
+ style->setMinWidth(Length(maxiumWidth, Fixed));
return style.release();
}
diff --git a/Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp b/Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp
index 742208f53..f8aae7a6d 100644
--- a/Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp
+++ b/Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp
@@ -68,7 +68,7 @@ PassRefPtr<RenderStyle> DateTimeSymbolicFieldElement::customStyleForRenderer()
float maxiumWidth = style->font().width(visibleEmptyValue());
for (unsigned index = 0; index < m_symbols.size(); ++index)
maxiumWidth = std::max(maxiumWidth, style->font().width(m_symbols[index]));
- style->setWidth(Length(maxiumWidth, Fixed));
+ style->setMinWidth(Length(maxiumWidth, Fixed));
return style.release();
}
diff --git a/Source/WebCore/html/shadow/HTMLContentElement.cpp b/Source/WebCore/html/shadow/HTMLContentElement.cpp
index 912cfdf51..6c063c1b6 100644
--- a/Source/WebCore/html/shadow/HTMLContentElement.cpp
+++ b/Source/WebCore/html/shadow/HTMLContentElement.cpp
@@ -40,14 +40,13 @@ namespace WebCore {
using HTMLNames::selectAttr;
-static const QualifiedName& contentTagName(Document* document)
+static const QualifiedName& contentTagName(Document*)
{
#if ENABLE(SHADOW_DOM)
if (!RuntimeEnabledFeatures::shadowDOMEnabled())
return HTMLNames::webkitShadowContentTag;
return HTMLNames::contentTag;
#else
- UNUSED_PARAM(document);
return HTMLNames::webkitShadowContentTag;
#endif
}
diff --git a/Source/WebCore/html/shadow/HTMLContentElement.idl b/Source/WebCore/html/shadow/HTMLContentElement.idl
index 448c979a3..b286c48fd 100644
--- a/Source/WebCore/html/shadow/HTMLContentElement.idl
+++ b/Source/WebCore/html/shadow/HTMLContentElement.idl
@@ -30,4 +30,5 @@
] interface HTMLContentElement : HTMLElement {
[Reflect] attribute DOMString select;
attribute boolean resetStyleInheritance;
+ NodeList getDistributedNodes();
};
diff --git a/Source/WebCore/html/shadow/InsertionPoint.cpp b/Source/WebCore/html/shadow/InsertionPoint.cpp
index 7aecaa56e..092077467 100644
--- a/Source/WebCore/html/shadow/InsertionPoint.cpp
+++ b/Source/WebCore/html/shadow/InsertionPoint.cpp
@@ -88,11 +88,9 @@ bool InsertionPoint::isActive() const
return true;
}
-PassRefPtr<NodeList> InsertionPoint::distributedNodes() const
+PassRefPtr<NodeList> InsertionPoint::getDistributedNodes() const
{
- if (!attached())
- return 0;
-
+ document()->updateLayout();
Vector<RefPtr<Node> > nodes;
for (size_t i = 0; i < m_distribution.size(); ++i)
diff --git a/Source/WebCore/html/shadow/InsertionPoint.h b/Source/WebCore/html/shadow/InsertionPoint.h
index 2ef36c1c5..95f7995d7 100644
--- a/Source/WebCore/html/shadow/InsertionPoint.h
+++ b/Source/WebCore/html/shadow/InsertionPoint.h
@@ -49,7 +49,7 @@ public:
bool isShadowBoundary() const;
bool isActive() const;
- PassRefPtr<NodeList> distributedNodes() const;
+ PassRefPtr<NodeList> getDistributedNodes() const;
virtual const AtomicString& select() const = 0;
virtual bool isSelectValid() const = 0;
diff --git a/Source/WebCore/html/shadow/SliderThumbElement.cpp b/Source/WebCore/html/shadow/SliderThumbElement.cpp
index b045e2389..5e53eced1 100644
--- a/Source/WebCore/html/shadow/SliderThumbElement.cpp
+++ b/Source/WebCore/html/shadow/SliderThumbElement.cpp
@@ -169,9 +169,17 @@ void RenderSliderContainer::layout()
HTMLInputElement* input = node()->shadowHost()->toInputElement();
bool isVertical = hasVerticalAppearance(input);
style()->setFlexDirection(isVertical ? FlowColumn : FlowRow);
+ TextDirection oldTextDirection = style()->direction();
+ if (isVertical) {
+ // FIXME: Work around rounding issues in RTL vertical sliders. We want them to
+ // render identically to LTR vertical sliders. We can remove this work around when
+ // subpixel rendering is enabled on all ports.
+ style()->setDirection(LTR);
+ }
RenderFlexibleBox::layout();
+ style()->setDirection(oldTextDirection);
// These should always exist, unless someone mutates the shadow DOM (e.g., in the inspector).
if (!input->sliderThumbElement() || !input->sliderThumbElement()->renderer())
return;
diff --git a/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp b/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp
index d045170f5..63401dd6e 100644
--- a/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp
+++ b/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp
@@ -102,6 +102,8 @@ public:
virtual void onSuccess(PassRefPtr<IDBTransactionBackendInterface>) OVERRIDE { }
virtual void onSuccess(PassRefPtr<SerializedScriptValue>) OVERRIDE { }
virtual void onSuccess(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, const IDBKeyPath&) OVERRIDE { }
+ virtual void onSuccess(int64_t value) OVERRIDE { return onSuccess(SerializedScriptValue::numberValue(value)); }
+ virtual void onSuccess() OVERRIDE { return onSuccess(SerializedScriptValue::undefinedValue()); }
virtual void onSuccess(PassRefPtr<IDBKey>, PassRefPtr<IDBKey>, PassRefPtr<SerializedScriptValue>) OVERRIDE { }
virtual void onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<SerializedScriptValue> >&) OVERRIDE { }
virtual void onUpgradeNeeded(int64_t, PassRefPtr<WebCore::IDBTransactionBackendInterface>, PassRefPtr<WebCore::IDBDatabaseBackendInterface>) OVERRIDE { }
diff --git a/Source/WebCore/inspector/front-end/ObjectPropertiesSection.js b/Source/WebCore/inspector/front-end/ObjectPropertiesSection.js
index a27d37ef5..b64a00be9 100644
--- a/Source/WebCore/inspector/front-end/ObjectPropertiesSection.js
+++ b/Source/WebCore/inspector/front-end/ObjectPropertiesSection.js
@@ -254,10 +254,18 @@ WebInspector.ObjectPropertyTreeElement.prototype = {
_contextMenuFired: function(value, event)
{
var contextMenu = new WebInspector.ContextMenu();
+ this.populateContextMenu(contextMenu);
contextMenu.appendApplicableItems(value);
contextMenu.show(event);
},
+ /**
+ * @param {WebInspector.ContextMenu} contextMenu
+ */
+ populateContextMenu: function(contextMenu)
+ {
+ },
+
updateSiblings: function()
{
if (this.parent.root)
diff --git a/Source/WebCore/inspector/front-end/ResourceScriptMapping.js b/Source/WebCore/inspector/front-end/ResourceScriptMapping.js
index 811e7e256..0e627e69f 100644
--- a/Source/WebCore/inspector/front-end/ResourceScriptMapping.js
+++ b/Source/WebCore/inspector/front-end/ResourceScriptMapping.js
@@ -323,6 +323,7 @@ WebInspector.ResourceScriptFile.prototype = {
function innerCallback(error)
{
if (error) {
+ this._hasDivergedFromVM = true;
WebInspector.showErrorMessage(error);
return;
}
@@ -342,12 +343,18 @@ WebInspector.ResourceScriptFile.prototype = {
_workingCopyChanged: function(event)
{
- this._isDivergingFromVM = true;
- this.dispatchEventToListeners(WebInspector.ScriptFile.Events.WillDivergeFromVM, this._uiSourceCode);
- this._hasDivergedFromVM = true;
- this._resourceScriptMapping._hasDivergedFromVM(this._uiSourceCode);
- this.dispatchEventToListeners(WebInspector.ScriptFile.Events.DidDivergeFromVM, this._uiSourceCode);
- delete this._isDivergingFromVM;
+ var wasDirty = /** @type {boolean} */ event.data.wasDirty;
+ if (!wasDirty && this._uiSourceCode.isDirty() && !this._hasDivergedFromVM) {
+ this._isDivergingFromVM = true;
+ this.dispatchEventToListeners(WebInspector.ScriptFile.Events.WillDivergeFromVM, this._uiSourceCode);
+ this._resourceScriptMapping._hasDivergedFromVM(this._uiSourceCode);
+ this.dispatchEventToListeners(WebInspector.ScriptFile.Events.DidDivergeFromVM, this._uiSourceCode);
+ delete this._isDivergingFromVM;
+ } else if (wasDirty && !this._uiSourceCode.isDirty() && !this._hasDivergedFromVM) {
+ this.dispatchEventToListeners(WebInspector.ScriptFile.Events.WillMergeToVM, this._uiSourceCode);
+ this._resourceScriptMapping._hasMergedToVM(this._uiSourceCode);
+ this.dispatchEventToListeners(WebInspector.ScriptFile.Events.DidMergeToVM, this._uiSourceCode);
+ }
},
/**
diff --git a/Source/WebCore/inspector/front-end/UISourceCode.js b/Source/WebCore/inspector/front-end/UISourceCode.js
index cf44d9400..9bfd340d1 100644
--- a/Source/WebCore/inspector/front-end/UISourceCode.js
+++ b/Source/WebCore/inspector/front-end/UISourceCode.js
@@ -304,13 +304,14 @@ WebInspector.UISourceCode.prototype = {
*/
setWorkingCopy: function(newWorkingCopy)
{
+ var wasDirty = this.isDirty();
this._mimeType = this.canonicalMimeType();
var oldWorkingCopy = this._workingCopy;
if (this._content === newWorkingCopy)
delete this._workingCopy;
else
this._workingCopy = newWorkingCopy;
- this.dispatchEventToListeners(WebInspector.UISourceCode.Events.WorkingCopyChanged, {oldWorkingCopy: oldWorkingCopy, workingCopy: this.workingCopy()});
+ this.dispatchEventToListeners(WebInspector.UISourceCode.Events.WorkingCopyChanged, {oldWorkingCopy: oldWorkingCopy, workingCopy: this.workingCopy(), wasDirty: wasDirty});
},
/**
diff --git a/Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js b/Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
index 2c50862bd..1d92b7a0a 100644
--- a/Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
+++ b/Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
@@ -391,12 +391,21 @@ WebInspector.WatchExpressionTreeElement.prototype = {
this.listItemElement.insertBefore(deleteButton, this.listItemElement.firstChild);
},
- _contextMenu: function(event)
+ /**
+ * @param {WebInspector.ContextMenu} contextMenu
+ * @override
+ */
+ populateContextMenu: function(contextMenu)
{
- var contextMenu = new WebInspector.ContextMenu();
contextMenu.appendItem(WebInspector.UIString("Delete watch expression"), this._deleteButtonClicked.bind(this));
if (this.treeOutline.section.watchExpressions.length > 1)
contextMenu.appendItem(WebInspector.UIString("Delete all watch expressions"), this._deleteAllButtonClicked.bind(this));
+ },
+
+ _contextMenu: function(event)
+ {
+ var contextMenu = new WebInspector.ContextMenu();
+ this.populateContextMenu(contextMenu);
contextMenu.show(event);
},
diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp
index 8ab3d8922..a84c508eb 100644
--- a/Source/WebCore/loader/FrameLoader.cpp
+++ b/Source/WebCore/loader/FrameLoader.cpp
@@ -212,6 +212,7 @@ FrameLoader::FrameLoader(Frame* frame, FrameLoaderClient* client)
, m_notifer(frame)
, m_subframeLoader(frame)
, m_icon(frame)
+ , m_mixedContentChecker(frame)
, m_state(FrameStateCommittedPage)
, m_loadType(FrameLoadTypeStandard)
, m_delegateIsHandlingProvisionalLoadError(false)
@@ -914,51 +915,6 @@ String FrameLoader::outgoingOrigin() const
return m_frame->document()->securityOrigin()->toString();
}
-bool FrameLoader::isMixedContent(SecurityOrigin* context, const KURL& url)
-{
- if (context->protocol() != "https")
- return false; // We only care about HTTPS security origins.
-
- // We're in a secure context, so |url| is mixed content if it's insecure.
- return !SecurityOrigin::isSecure(url);
-}
-
-bool FrameLoader::checkIfDisplayInsecureContent(SecurityOrigin* context, const KURL& url)
-{
- if (!isMixedContent(context, url))
- return true;
-
- Settings* settings = m_frame->settings();
- bool allowed = m_client->allowDisplayingInsecureContent(settings && settings->allowDisplayOfInsecureContent(), context, url);
- String message = (allowed ? emptyString() : "[blocked] ") + "The page at " +
- m_frame->document()->url().string() + " displayed insecure content from " + url.string() + ".\n";
-
- m_frame->document()->domWindow()->console()->addMessage(HTMLMessageSource, LogMessageType, WarningMessageLevel, message);
-
- if (allowed)
- m_client->didDisplayInsecureContent();
-
- return allowed;
-}
-
-bool FrameLoader::checkIfRunInsecureContent(SecurityOrigin* context, const KURL& url)
-{
- if (!isMixedContent(context, url))
- return true;
-
- Settings* settings = m_frame->settings();
- bool allowed = m_client->allowRunningInsecureContent(settings && settings->allowRunningOfInsecureContent(), context, url);
- String message = (allowed ? emptyString() : "[blocked] ") + "The page at " +
- m_frame->document()->url().string() + " ran insecure content from " + url.string() + ".\n";
-
- m_frame->document()->domWindow()->console()->addMessage(HTMLMessageSource, LogMessageType, WarningMessageLevel, message);
-
- if (allowed)
- m_client->didRunInsecureContent(context, url);
-
- return allowed;
-}
-
bool FrameLoader::checkIfFormActionAllowedByCSP(const KURL& url) const
{
if (m_submittedFormURL.isEmpty())
diff --git a/Source/WebCore/loader/FrameLoader.h b/Source/WebCore/loader/FrameLoader.h
index 4f140a184..e78ee4e9e 100644
--- a/Source/WebCore/loader/FrameLoader.h
+++ b/Source/WebCore/loader/FrameLoader.h
@@ -39,6 +39,7 @@
#include "IconController.h"
#include "IconURL.h"
#include "LayoutMilestones.h"
+#include "MixedContentChecker.h"
#include "PolicyChecker.h"
#include "ResourceHandle.h"
#include "ResourceLoadNotifier.h"
@@ -93,6 +94,7 @@ public:
ResourceLoadNotifier* notifier() const { return &m_notifer; }
SubframeLoader* subframeLoader() const { return &m_subframeLoader; }
IconController* icon() const { return &m_icon; }
+ MixedContentChecker* mixedContentChecker() const { return &m_mixedContentChecker; }
void prepareForHistoryNavigation();
void setupForReplace();
@@ -213,11 +215,6 @@ public:
void forceSandboxFlags(SandboxFlags flags) { m_forcedSandboxFlags |= flags; }
SandboxFlags effectiveSandboxFlags() const;
- // Mixed content related functions.
- static bool isMixedContent(SecurityOrigin* context, const KURL&);
- bool checkIfDisplayInsecureContent(SecurityOrigin* context, const KURL&);
- bool checkIfRunInsecureContent(SecurityOrigin* context, const KURL&);
-
bool checkIfFormActionAllowedByCSP(const KURL&) const;
Frame* opener();
@@ -374,12 +371,16 @@ private:
Frame* m_frame;
FrameLoaderClient* m_client;
+ // FIXME: These should be OwnPtr<T> to reduce build times and simplify
+ // header dependencies unless performance testing proves otherwise.
+ // Some of these could be lazily created for memory savings on devices.
mutable PolicyChecker m_policyChecker;
mutable HistoryController m_history;
mutable ResourceLoadNotifier m_notifer;
mutable SubframeLoader m_subframeLoader;
mutable FrameLoaderStateMachine m_stateMachine;
mutable IconController m_icon;
+ mutable MixedContentChecker m_mixedContentChecker;
class FrameProgressTracker;
OwnPtr<FrameProgressTracker> m_progressTracker;
diff --git a/Source/WebCore/loader/ImageLoader.cpp b/Source/WebCore/loader/ImageLoader.cpp
index 0523b3a89..a6da61e65 100644
--- a/Source/WebCore/loader/ImageLoader.cpp
+++ b/Source/WebCore/loader/ImageLoader.cpp
@@ -129,7 +129,7 @@ void ImageLoader::setImage(CachedImage* newImage)
// Only consider updating the protection ref-count of the Element immediately before returning
// from this function as doing so might result in the destruction of this ImageLoader.
- updatedHasPendingLoadEvent();
+ updatedHasPendingEvent();
}
void ImageLoader::setImageWithoutConsideringPendingLoadEvent(CachedImage* newImage)
@@ -248,7 +248,7 @@ void ImageLoader::updateFromElement()
// Only consider updating the protection ref-count of the Element immediately before returning
// from this function as doing so might result in the destruction of this ImageLoader.
- updatedHasPendingLoadEvent();
+ updatedHasPendingEvent();
}
void ImageLoader::updateFromElementIgnoringPreviousError()
@@ -286,7 +286,7 @@ void ImageLoader::notifyFinished(CachedResource* resource)
// Only consider updating the protection ref-count of the Element immediately before returning
// from this function as doing so might result in the destruction of this ImageLoader.
- updatedHasPendingLoadEvent();
+ updatedHasPendingEvent();
return;
}
@@ -294,7 +294,7 @@ void ImageLoader::notifyFinished(CachedResource* resource)
m_hasPendingLoadEvent = false;
// Only consider updating the protection ref-count of the Element immediately before returning
// from this function as doing so might result in the destruction of this ImageLoader.
- updatedHasPendingLoadEvent();
+ updatedHasPendingEvent();
return;
}
@@ -341,18 +341,17 @@ void ImageLoader::updateRenderer()
imageResource->setCachedImage(m_image.get());
}
-void ImageLoader::updatedHasPendingLoadEvent()
+void ImageLoader::updatedHasPendingEvent()
{
- // If an Element that does image loading is removed from the DOM the load event for the image is still observable.
+ // If an Element that does image loading is removed from the DOM the load/error event for the image is still observable.
// As long as the ImageLoader is actively loading, the Element itself needs to be ref'ed to keep it from being
// destroyed by DOM manipulation or garbage collection.
// If such an Element wishes for the load to stop when removed from the DOM it needs to stop the ImageLoader explicitly.
-
- if (m_hasPendingLoadEvent == m_elementIsProtected)
+ bool wasProtected = m_elementIsProtected;
+ m_elementIsProtected = m_hasPendingLoadEvent || m_hasPendingErrorEvent;
+ if (wasProtected == m_elementIsProtected)
return;
- m_elementIsProtected = m_hasPendingLoadEvent;
-
if (m_elementIsProtected)
client()->refSourceElement();
else
@@ -397,7 +396,7 @@ void ImageLoader::dispatchPendingBeforeLoadEvent()
// Only consider updating the protection ref-count of the Element immediately before returning
// from this function as doing so might result in the destruction of this ImageLoader.
- updatedHasPendingLoadEvent();
+ updatedHasPendingEvent();
}
void ImageLoader::dispatchPendingLoadEvent()
@@ -413,7 +412,7 @@ void ImageLoader::dispatchPendingLoadEvent()
// Only consider updating the protection ref-count of the Element immediately before returning
// from this function as doing so might result in the destruction of this ImageLoader.
- updatedHasPendingLoadEvent();
+ updatedHasPendingEvent();
}
void ImageLoader::dispatchPendingErrorEvent()
diff --git a/Source/WebCore/loader/ImageLoader.h b/Source/WebCore/loader/ImageLoader.h
index 910744416..bc85915b9 100644
--- a/Source/WebCore/loader/ImageLoader.h
+++ b/Source/WebCore/loader/ImageLoader.h
@@ -82,7 +82,7 @@ private:
virtual void dispatchLoadEvent() = 0;
virtual String sourceURI(const AtomicString&) const = 0;
- void updatedHasPendingLoadEvent();
+ void updatedHasPendingEvent();
void dispatchPendingBeforeLoadEvent();
void dispatchPendingLoadEvent();
diff --git a/Source/WebCore/loader/MainResourceLoader.cpp b/Source/WebCore/loader/MainResourceLoader.cpp
index 1f9bb4652..485aaa2c1 100644
--- a/Source/WebCore/loader/MainResourceLoader.cpp
+++ b/Source/WebCore/loader/MainResourceLoader.cpp
@@ -236,7 +236,7 @@ void MainResourceLoader::willSendRequest(ResourceRequest& newRequest, const Reso
Frame* top = m_frame->tree()->top();
if (top != m_frame) {
- if (!frameLoader()->checkIfDisplayInsecureContent(top->document()->securityOrigin(), newRequest.url())) {
+ if (!frameLoader()->mixedContentChecker()->canDisplayInsecureContent(top->document()->securityOrigin(), newRequest.url())) {
cancel();
return;
}
diff --git a/Source/WebCore/loader/MixedContentChecker.cpp b/Source/WebCore/loader/MixedContentChecker.cpp
new file mode 100644
index 000000000..71fd2b36e
--- /dev/null
+++ b/Source/WebCore/loader/MixedContentChecker.cpp
@@ -0,0 +1,108 @@
+/*
+ * 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "MixedContentChecker.h"
+
+#include "Console.h"
+#include "DOMWindow.h"
+#include "Document.h"
+#include "Frame.h"
+#include "FrameLoaderClient.h"
+#include "SchemeRegistry.h"
+#include "SecurityOrigin.h"
+#include "Settings.h"
+#include <wtf/text/CString.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+MixedContentChecker::MixedContentChecker(Frame* frame)
+ : m_frame(frame)
+{
+}
+
+FrameLoaderClient* MixedContentChecker::client() const
+{
+ return m_frame->loader()->client();
+}
+
+static inline CString asUTF8(const KURL& url)
+{
+ return url.string().utf8();
+}
+
+bool MixedContentChecker::isMixedContent(SecurityOrigin* securityOrigin, const KURL& url)
+{
+ if (securityOrigin->protocol() != "https")
+ return false; // We only care about HTTPS security origins.
+
+ // We're in a secure context, so |url| is mixed content if it's insecure.
+ return !SecurityOrigin::isSecure(url);
+}
+
+bool MixedContentChecker::canDisplayInsecureContent(SecurityOrigin* securityOrigin, const KURL& url) const
+{
+ if (!isMixedContent(securityOrigin, url))
+ return true;
+
+ Settings* settings = m_frame->settings();
+ bool allowed = client()->allowDisplayingInsecureContent(settings && settings->allowDisplayOfInsecureContent(), securityOrigin, url);
+ logWarning(allowed, "displayed", url);
+
+ if (allowed)
+ client()->didDisplayInsecureContent();
+
+ return allowed;
+}
+
+bool MixedContentChecker::canRunInsecureContent(SecurityOrigin* securityOrigin, const KURL& url) const
+{
+ if (!isMixedContent(securityOrigin, url))
+ return true;
+
+ Settings* settings = m_frame->settings();
+ bool allowed = client()->allowRunningInsecureContent(settings && settings->allowRunningOfInsecureContent(), securityOrigin, url);
+ logWarning(allowed, "ran", url);
+
+ if (allowed)
+ client()->didRunInsecureContent(securityOrigin, url);
+
+ return allowed;
+}
+
+void MixedContentChecker::logWarning(bool allowed, const String& action, const KURL& target) const
+{
+ Console* console = m_frame->document()->domWindow()->console();
+ // FIXME: Why does this message not have a source URL or a line number? webkit.org/b/97979
+ String message = String::format("%sThe page at %s %s insecure content from %s.\n",
+ (allowed ? "" : "[blocked] "), asUTF8(m_frame->document()->url()).data(), action.utf8().data(), asUTF8(target).data());
+ console->addMessage(HTMLMessageSource, LogMessageType, WarningMessageLevel, message);
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/loader/MixedContentChecker.h b/Source/WebCore/loader/MixedContentChecker.h
new file mode 100644
index 000000000..ee7daf619
--- /dev/null
+++ b/Source/WebCore/loader/MixedContentChecker.h
@@ -0,0 +1,64 @@
+/*
+ * 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 MixedContentChecker_h
+#define MixedContentChecker_h
+
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class Frame;
+class FrameLoaderClient;
+class KURL;
+class SecurityOrigin;
+
+class MixedContentChecker {
+ WTF_MAKE_NONCOPYABLE(MixedContentChecker);
+public:
+ MixedContentChecker(Frame*);
+
+ bool canDisplayInsecureContent(SecurityOrigin*, const KURL&) const;
+ bool canRunInsecureContent(SecurityOrigin*, const KURL&) const;
+
+private:
+ // FIXME: This should probably have a separate client from FrameLoader.
+ FrameLoaderClient* client() const;
+
+ static bool isMixedContent(SecurityOrigin*, const KURL&);
+ void logWarning(bool allowed, const String& action, const KURL&) const;
+
+ Frame* m_frame;
+};
+
+} // namespace WebCore
+
+#endif // MixedContentChecker_h
+
diff --git a/Source/WebCore/loader/SubframeLoader.cpp b/Source/WebCore/loader/SubframeLoader.cpp
index c3b38a87c..ab461f6d6 100644
--- a/Source/WebCore/loader/SubframeLoader.cpp
+++ b/Source/WebCore/loader/SubframeLoader.cpp
@@ -136,7 +136,7 @@ bool SubframeLoader::pluginIsLoadable(HTMLPlugInImageElement* pluginElement, con
return false;
}
- if (m_frame->loader() && !m_frame->loader()->checkIfRunInsecureContent(document()->securityOrigin(), url))
+ if (m_frame->loader() && !m_frame->loader()->mixedContentChecker()->canRunInsecureContent(document()->securityOrigin(), url))
return false;
}
@@ -265,7 +265,7 @@ PassRefPtr<Widget> SubframeLoader::loadMediaPlayerProxyPlugin(Node* node, const
else if (mediaElement->isVideo())
size = RenderVideo::defaultSize();
- if (!m_frame->loader()->checkIfRunInsecureContent(m_frame->document()->securityOrigin(), completedURL))
+ if (!m_frame->loader()->mixedContentChecker()->canRunInsecureContent(m_frame->document()->securityOrigin(), completedURL))
return 0;
RefPtr<Widget> widget = m_frame->loader()->client()->createMediaPlayerProxyPlugin(size, mediaElement, completedURL,
diff --git a/Source/WebCore/loader/SubresourceLoader.cpp b/Source/WebCore/loader/SubresourceLoader.cpp
index 36b367660..50975794e 100644
--- a/Source/WebCore/loader/SubresourceLoader.cpp
+++ b/Source/WebCore/loader/SubresourceLoader.cpp
@@ -33,12 +33,9 @@
#include "Document.h"
#include "DocumentLoader.h"
#include "Frame.h"
-#include "FrameLoader.h"
#include "Logging.h"
#include "MemoryCache.h"
#include "ResourceBuffer.h"
-#include "SecurityOrigin.h"
-#include "SecurityPolicy.h"
#include "WebCoreMemoryInstrumentation.h"
#include <wtf/RefCountedLeakCounter.h>
#include <wtf/StdLibExtras.h>
@@ -83,40 +80,8 @@ SubresourceLoader::~SubresourceLoader()
PassRefPtr<SubresourceLoader> SubresourceLoader::create(Frame* frame, CachedResource* resource, const ResourceRequest& request, const ResourceLoaderOptions& options)
{
- if (!frame)
- return 0;
-
- FrameLoader* frameLoader = frame->loader();
- if (options.securityCheck == DoSecurityCheck && (frameLoader->state() == FrameStateProvisional || !frameLoader->activeDocumentLoader() || frameLoader->activeDocumentLoader()->isStopping()))
- return 0;
-
- ResourceRequest newRequest = request;
-
- // Note: We skip the Content-Security-Policy check here because we check
- // the Content-Security-Policy at the CachedResourceLoader layer so we can
- // handle different resource types differently.
-
- String outgoingReferrer;
- String outgoingOrigin;
- if (request.httpReferrer().isNull()) {
- outgoingReferrer = frameLoader->outgoingReferrer();
- outgoingOrigin = frameLoader->outgoingOrigin();
- } else {
- outgoingReferrer = request.httpReferrer();
- outgoingOrigin = SecurityOrigin::createFromString(outgoingReferrer)->toString();
- }
-
- outgoingReferrer = SecurityPolicy::generateReferrerHeader(frame->document()->referrerPolicy(), request.url(), outgoingReferrer);
- if (outgoingReferrer.isEmpty())
- newRequest.clearHTTPReferrer();
- else if (!request.httpReferrer())
- newRequest.setHTTPReferrer(outgoingReferrer);
- FrameLoader::addHTTPOriginIfNeeded(newRequest, outgoingOrigin);
-
- frameLoader->addExtraFieldsToSubresourceRequest(newRequest);
-
RefPtr<SubresourceLoader> subloader(adoptRef(new SubresourceLoader(frame, resource, options)));
- if (!subloader->init(newRequest))
+ if (!subloader->init(request))
return 0;
return subloader.release();
}
diff --git a/Source/WebCore/loader/cache/CachedRawResource.cpp b/Source/WebCore/loader/cache/CachedRawResource.cpp
index 6d6c1297f..194b15f89 100644
--- a/Source/WebCore/loader/cache/CachedRawResource.cpp
+++ b/Source/WebCore/loader/cache/CachedRawResource.cpp
@@ -129,6 +129,24 @@ void CachedRawResource::setDefersLoading(bool defers)
m_loader->setDefersLoading(defers);
}
+static bool shouldIgnoreHeaderForCacheReuse(AtomicString headerName)
+{
+ // FIXME: This list of headers that don't affect cache policy almost certainly isn't complete.
+ DEFINE_STATIC_LOCAL(HashSet<AtomicString>, m_headers, ());
+ if (m_headers.isEmpty()) {
+ m_headers.add("Accept");
+ m_headers.add("Cache-Control");
+ m_headers.add("If-Modified-Since");
+ m_headers.add("If-None-Match");
+ m_headers.add("Origin");
+ m_headers.add("Pragma");
+ m_headers.add("Purpose");
+ m_headers.add("Referer");
+ m_headers.add("User-Agent");
+ }
+ return m_headers.contains(headerName);
+}
+
bool CachedRawResource::canReuse(const ResourceRequest& newRequest) const
{
if (m_options.shouldBufferData == DoNotBufferData)
@@ -143,20 +161,24 @@ bool CachedRawResource::canReuse(const ResourceRequest& newRequest) const
if (m_resourceRequest.allowCookies() != newRequest.allowCookies())
return false;
- // Ensure all headers match the existing headers before continuing.
- // Note that only headers set by our client will be present in either
- // ResourceRequest, since SubresourceLoader creates a separate copy
- // for its purposes.
- // FIXME: There might be some headers that shouldn't block reuse.
+ // Ensure most headers match the existing headers before continuing.
+ // Note that the list of ignored headers includes some headers explicitly related to caching.
+ // A more detailed check of caching policy will be performed later, this is simply a list of
+ // headers that we might permit to be different and still reuse the existing CachedResource.
const HTTPHeaderMap& newHeaders = newRequest.httpHeaderFields();
const HTTPHeaderMap& oldHeaders = m_resourceRequest.httpHeaderFields();
- if (newHeaders.size() != oldHeaders.size())
- return false;
HTTPHeaderMap::const_iterator end = newHeaders.end();
for (HTTPHeaderMap::const_iterator i = newHeaders.begin(); i != end; ++i) {
AtomicString headerName = i->key;
- if (i->value != oldHeaders.get(headerName))
+ if (!shouldIgnoreHeaderForCacheReuse(headerName) && i->value != oldHeaders.get(headerName))
+ return false;
+ }
+
+ end = oldHeaders.end();
+ for (HTTPHeaderMap::const_iterator i = oldHeaders.begin(); i != end; ++i) {
+ AtomicString headerName = i->key;
+ if (!shouldIgnoreHeaderForCacheReuse(headerName) && i->value != newHeaders.get(headerName))
return false;
}
return true;
diff --git a/Source/WebCore/loader/cache/CachedResource.cpp b/Source/WebCore/loader/cache/CachedResource.cpp
index 58115e058..703c42836 100755
--- a/Source/WebCore/loader/cache/CachedResource.cpp
+++ b/Source/WebCore/loader/cache/CachedResource.cpp
@@ -32,6 +32,7 @@
#include "CachedResourceLoader.h"
#include "CrossOriginAccessControl.h"
#include "Document.h"
+#include "DocumentLoader.h"
#include "FrameLoaderClient.h"
#include "InspectorInstrumentation.h"
#include "KURL.h"
@@ -40,6 +41,8 @@
#include "ResourceBuffer.h"
#include "ResourceHandle.h"
#include "ResourceLoadScheduler.h"
+#include "SecurityOrigin.h"
+#include "SecurityPolicy.h"
#include "SubresourceLoader.h"
#include "WebCoreMemoryInstrumentation.h"
#include <wtf/CurrentTime.h>
@@ -190,8 +193,55 @@ CachedResource::~CachedResource()
m_owningCachedResourceLoader->removeCachedResource(this);
}
+void CachedResource::failBeforeStarting()
+{
+ // FIXME: What if resources in other frames were waiting for this revalidation?
+ LOG(ResourceLoading, "Cannot start loading '%s'", url().string().latin1().data());
+ if (m_resourceToRevalidate)
+ memoryCache()->revalidationFailed(this);
+ error(CachedResource::LoadError);
+}
+
+void CachedResource::addAdditionalRequestHeaders(CachedResourceLoader* cachedResourceLoader)
+{
+ // Note: We skip the Content-Security-Policy check here because we check
+ // the Content-Security-Policy at the CachedResourceLoader layer so we can
+ // handle different resource types differently.
+
+ FrameLoader* frameLoader = cachedResourceLoader->frame()->loader();
+ String outgoingReferrer;
+ String outgoingOrigin;
+ if (m_resourceRequest.httpReferrer().isNull()) {
+ outgoingReferrer = frameLoader->outgoingReferrer();
+ outgoingOrigin = frameLoader->outgoingOrigin();
+ } else {
+ outgoingReferrer = m_resourceRequest.httpReferrer();
+ outgoingOrigin = SecurityOrigin::createFromString(outgoingReferrer)->toString();
+ }
+
+ outgoingReferrer = SecurityPolicy::generateReferrerHeader(cachedResourceLoader->document()->referrerPolicy(), m_resourceRequest.url(), outgoingReferrer);
+ if (outgoingReferrer.isEmpty())
+ m_resourceRequest.clearHTTPReferrer();
+ else if (!m_resourceRequest.httpReferrer())
+ m_resourceRequest.setHTTPReferrer(outgoingReferrer);
+ FrameLoader::addHTTPOriginIfNeeded(m_resourceRequest, outgoingOrigin);
+
+ frameLoader->addExtraFieldsToSubresourceRequest(m_resourceRequest);
+}
+
void CachedResource::load(CachedResourceLoader* cachedResourceLoader, const ResourceLoaderOptions& options)
{
+ if (!cachedResourceLoader->frame()) {
+ failBeforeStarting();
+ return;
+ }
+
+ FrameLoader* frameLoader = cachedResourceLoader->frame()->loader();
+ if (options.securityCheck == DoSecurityCheck && (frameLoader->state() == FrameStateProvisional || !frameLoader->activeDocumentLoader() || frameLoader->activeDocumentLoader()->isStopping())) {
+ failBeforeStarting();
+ return;
+ }
+
m_options = options;
m_loading = true;
@@ -225,14 +275,11 @@ void CachedResource::load(CachedResourceLoader* cachedResourceLoader, const Reso
m_resourceRequest.setHTTPHeaderField("Purpose", "prefetch");
#endif
m_resourceRequest.setPriority(loadPriority());
-
- m_loader = resourceLoadScheduler()->scheduleSubresourceLoad(cachedResourceLoader->document()->frame(), this, m_resourceRequest, m_resourceRequest.priority(), options);
+ addAdditionalRequestHeaders(cachedResourceLoader);
+
+ m_loader = resourceLoadScheduler()->scheduleSubresourceLoad(cachedResourceLoader->frame(), this, m_resourceRequest, m_resourceRequest.priority(), options);
if (!m_loader) {
- // FIXME: What if resources in other frames were waiting for this revalidation?
- LOG(ResourceLoading, "Cannot start loading '%s'", url().string().latin1().data());
- if (m_resourceToRevalidate)
- memoryCache()->revalidationFailed(this);
- error(CachedResource::LoadError);
+ failBeforeStarting();
return;
}
@@ -293,9 +340,9 @@ double CachedResource::currentAge() const
// RFC2616 13.2.3
// No compensation for latency as that is not terribly important in practice
double dateValue = m_response.date();
- double apparentAge = isfinite(dateValue) ? max(0., m_responseTimestamp - dateValue) : 0;
+ double apparentAge = isfinite(dateValue) ? std::max(0., m_responseTimestamp - dateValue) : 0;
double ageValue = m_response.age();
- double correctedReceivedAge = isfinite(ageValue) ? max(apparentAge, ageValue) : apparentAge;
+ double correctedReceivedAge = isfinite(ageValue) ? std::max(apparentAge, ageValue) : apparentAge;
double residentTime = currentTime() - m_responseTimestamp;
return correctedReceivedAge + residentTime;
}
diff --git a/Source/WebCore/loader/cache/CachedResource.h b/Source/WebCore/loader/cache/CachedResource.h
index 9c5d365ca..c3d093a2f 100644
--- a/Source/WebCore/loader/cache/CachedResource.h
+++ b/Source/WebCore/loader/cache/CachedResource.h
@@ -255,6 +255,8 @@ public:
protected:
virtual void checkNotify();
+ virtual void addAdditionalRequestHeaders(CachedResourceLoader*);
+
void setEncodedSize(unsigned);
void setDecodedSize(unsigned);
void didAccessDecodedData(double timeStamp);
@@ -301,6 +303,8 @@ private:
double currentAge() const;
double freshnessLifetime() const;
+ void failBeforeStarting();
+
RefPtr<CachedMetadata> m_cachedMetadata;
double m_lastDecodedAccessTime; // Used as a "thrash guard" in the cache
diff --git a/Source/WebCore/loader/cache/CachedResourceLoader.cpp b/Source/WebCore/loader/cache/CachedResourceLoader.cpp
index c6ce406b6..7c420c066 100644
--- a/Source/WebCore/loader/cache/CachedResourceLoader.cpp
+++ b/Source/WebCore/loader/cache/CachedResourceLoader.cpp
@@ -261,7 +261,7 @@ bool CachedResourceLoader::checkInsecureContent(CachedResource::Type type, const
// These resource can inject script into the current document (Script,
// XSL) or exfiltrate the content of the current document (CSS).
if (Frame* f = frame())
- if (!f->loader()->checkIfRunInsecureContent(m_document->securityOrigin(), url))
+ if (!f->loader()->mixedContentChecker()->canRunInsecureContent(m_document->securityOrigin(), url))
return false;
break;
#if ENABLE(VIDEO_TRACK)
@@ -276,7 +276,7 @@ bool CachedResourceLoader::checkInsecureContent(CachedResource::Type type, const
// These resources can corrupt only the frame's pixels.
if (Frame* f = frame()) {
Frame* top = f->tree()->top();
- if (!top->loader()->checkIfDisplayInsecureContent(top->document()->securityOrigin(), url))
+ if (!top->loader()->mixedContentChecker()->canDisplayInsecureContent(top->document()->securityOrigin(), url))
return false;
}
break;
diff --git a/Source/WebCore/loader/icon/IconController.cpp b/Source/WebCore/loader/icon/IconController.cpp
index b4a72c63b..74faa959c 100644
--- a/Source/WebCore/loader/icon/IconController.cpp
+++ b/Source/WebCore/loader/icon/IconController.cpp
@@ -213,6 +213,8 @@ void IconController::continueLoadWithDecision(IconLoadDecision iconLoadDecision)
if (iconLoadDecision == IconLoadNo) {
KURL iconURL(url());
String urlString(iconURL.string());
+ if (urlString.isEmpty())
+ return;
LOG(IconDatabase, "IconController::startLoader() - Told not to load this icon, committing iconURL %s to database for pageURL mapping", urlString.ascii().data());
commitToDatabase(iconURL);
diff --git a/Source/WebCore/page/DragController.cpp b/Source/WebCore/page/DragController.cpp
index c744c189e..2e0aafb96 100644
--- a/Source/WebCore/page/DragController.cpp
+++ b/Source/WebCore/page/DragController.cpp
@@ -48,6 +48,7 @@
#include "HTMLAnchorElement.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
+#include "HTMLPlugInElement.h"
#include "HitTestRequest.h"
#include "HitTestResult.h"
#include "Image.h"
@@ -552,7 +553,11 @@ bool DragController::canProcessDrag(DragData* dragData)
if (dragData->containsFiles() && asFileInput(result.innerNonSharedNode()))
return true;
- if (!result.innerNonSharedNode()->rendererIsEditable())
+ if (result.innerNonSharedNode()->isPluginElement()) {
+ HTMLPlugInElement* plugin = static_cast<HTMLPlugInElement*>(result.innerNonSharedNode());
+ if (!plugin->canProcessDrag() && !result.innerNonSharedNode()->rendererIsEditable())
+ return false;
+ } else if (!result.innerNonSharedNode()->rendererIsEditable())
return false;
if (m_didInitiateDrag && m_documentUnderMouse == m_dragInitiator && result.isSelected())
diff --git a/Source/WebCore/page/Performance.cpp b/Source/WebCore/page/Performance.cpp
index bff1b5361..149175ca6 100644
--- a/Source/WebCore/page/Performance.cpp
+++ b/Source/WebCore/page/Performance.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2012 Intel Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -38,6 +39,7 @@
#include "PerformanceNavigation.h"
#include "PerformanceResourceTiming.h"
#include "PerformanceTiming.h"
+#include "PerformanceUserTiming.h"
#include "ResourceResponse.h"
#include <wtf/CurrentTime.h>
@@ -99,6 +101,7 @@ PassRefPtr<PerformanceEntryList> Performance::webkitGetEntries() const
entries->appendAll(m_resourceTimingBuffer);
#endif // ENABLE(RESOURCE_TIMING)
+ // FIXME: User Timing entries should be handled here. see https://bugs.webkit.org/show_bug.cgi?id=91072
return entries;
}
@@ -112,6 +115,7 @@ PassRefPtr<PerformanceEntryList> Performance::webkitGetEntriesByType(const Strin
entries->append(*resource);
#endif // ENABLE(RESOURCE_TIMING)
+ // FIXME: User Timing entries should be handled here. see https://bugs.webkit.org/show_bug.cgi?id=91072
return entries;
}
@@ -126,6 +130,7 @@ PassRefPtr<PerformanceEntryList> Performance::webkitGetEntriesByName(const Strin
entries->append(*resource);
#endif // ENABLE(RESOURCE_TIMING)
+ // FIXME: User Timing entries should be handled here. see https://bugs.webkit.org/show_bug.cgi?id=91072
return entries;
}
@@ -165,6 +170,39 @@ EventTargetData* Performance::ensureEventTargetData()
return &m_eventTargetData;
}
+#if ENABLE(USER_TIMING)
+void Performance::webkitMark(const String& markName, ExceptionCode& ec)
+{
+ ec = 0;
+ if (!m_userTiming)
+ m_userTiming = UserTiming::create(this);
+ m_userTiming->mark(markName, ec);
+}
+
+void Performance::webkitClearMarks(const String& markName)
+{
+ if (!m_userTiming)
+ m_userTiming = UserTiming::create(this);
+ m_userTiming->clearMarks(markName);
+}
+
+void Performance::webkitMeasure(const String& measureName, const String& startMark, const String& endMark, ExceptionCode& ec)
+{
+ ec = 0;
+ if (!m_userTiming)
+ m_userTiming = UserTiming::create(this);
+ m_userTiming->measure(measureName, startMark, endMark, ec);
+}
+
+void Performance::webkitClearMeasures(const String& measureName)
+{
+ if (!m_userTiming)
+ m_userTiming = UserTiming::create(this);
+ m_userTiming->clearMeasures(measureName);
+}
+
+#endif // ENABLE(USER_TIMING)
+
double Performance::now() const
{
return 1000.0 * m_frame->document()->loader()->timing()->monotonicTimeToZeroBasedDocumentTime(monotonicallyIncreasingTime());
diff --git a/Source/WebCore/page/Performance.h b/Source/WebCore/page/Performance.h
index 7c270ce0d..fe09d902c 100644
--- a/Source/WebCore/page/Performance.h
+++ b/Source/WebCore/page/Performance.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2012 Intel Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -47,8 +48,11 @@
namespace WebCore {
class Document;
+class PerformanceEntry;
+class PerformanceEntryList;
class ResourceRequest;
class ResourceResponse;
+class UserTiming;
class Performance : public RefCounted<Performance>, public DOMWindowProperty, public EventTarget {
public:
@@ -81,6 +85,14 @@ public:
using RefCounted<Performance>::ref;
using RefCounted<Performance>::deref;
+#if ENABLE(USER_TIMING)
+ void webkitMark(const String& markName, ExceptionCode&);
+ void webkitClearMarks(const String& markName);
+
+ void webkitMeasure(const String& measureName, const String& startMark, const String& endMark, ExceptionCode&);
+ void webkitClearMeasures(const String& measureName);
+#endif // ENABLE(USER_TIMING)
+
private:
explicit Performance(Frame*);
@@ -97,6 +109,10 @@ private:
#if ENABLE(RESOURCE_TIMING)
Vector<RefPtr<PerformanceEntry> > m_resourceTimingBuffer;
#endif
+
+#if ENABLE(USER_TIMING)
+ RefPtr<UserTiming> m_userTiming;
+#endif // ENABLE(USER_TIMING)
};
}
diff --git a/Source/WebCore/page/Performance.idl b/Source/WebCore/page/Performance.idl
index c32cf328e..5f26e7ee8 100644
--- a/Source/WebCore/page/Performance.idl
+++ b/Source/WebCore/page/Performance.idl
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2012 Intel Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -50,6 +51,18 @@
attribute EventListener onwebkitresourcetimingbufferfull;
#endif
+
+ // See http://www.w3.org/TR/2012/CR-user-timing-20120726/
+#if defined(ENABLE_USER_TIMING) && ENABLE_USER_TIMING
+ void webkitMark(in DOMString markName)
+ raises(DOMException);
+ void webkitClearMarks(in [Optional=DefaultIsNullString] DOMString markName);
+
+ void webkitMeasure(in DOMString measureName, in [Optional=DefaultIsNullString] DOMString startMark, in [Optional=DefaultIsNullString] DOMString endMark)
+ raises(DOMException);
+ void webkitClearMeasures(in [Optional=DefaultIsNullString] DOMString measureName);
+#endif
+
// See http://www.w3.org/TR/hr-time/ for details.
double now();
};
diff --git a/Source/WebCore/page/PerformanceMark.h b/Source/WebCore/page/PerformanceMark.h
new file mode 100644
index 000000000..d131860aa
--- /dev/null
+++ b/Source/WebCore/page/PerformanceMark.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2012 Intel Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PerformanceMark_h
+#define PerformanceMark_h
+
+#if ENABLE(USER_TIMING)
+
+#include "PerformanceEntry.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class PerformanceMark : public PerformanceEntry {
+public:
+ static PassRefPtr<PerformanceMark> create(const String& name, double startTime) { return adoptRef(new PerformanceMark(name, startTime)); }
+
+private:
+ PerformanceMark(const String& name, double startTime) : PerformanceEntry(name, "mark", startTime, 0.0) { }
+ ~PerformanceMark() { }
+};
+
+}
+
+#endif // ENABLE(USER_TIMING)
+
+#endif // !defined(PerformanceMark_h)
diff --git a/Source/WebCore/page/PerformanceMark.idl b/Source/WebCore/page/PerformanceMark.idl
new file mode 100644
index 000000000..13b80fa93
--- /dev/null
+++ b/Source/WebCore/page/PerformanceMark.idl
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2012 Intel Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module window {
+
+ interface [
+ Conditional=USER_TIMING,
+ OmitConstructor
+ ] PerformanceMark : PerformanceEntry {
+ };
+}
diff --git a/Source/WebCore/page/PerformanceMeasure.h b/Source/WebCore/page/PerformanceMeasure.h
new file mode 100644
index 000000000..b0243d1f4
--- /dev/null
+++ b/Source/WebCore/page/PerformanceMeasure.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2012 Intel Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PerformanceMeasure_h
+#define PerformanceMeasure_h
+
+#if ENABLE(USER_TIMING)
+
+#include "PerformanceEntry.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class PerformanceMeasure : public PerformanceEntry {
+public:
+ static PassRefPtr<PerformanceMeasure> create(const String& name, double startTime, double duration) { return adoptRef(new PerformanceMeasure(name, startTime, duration)); }
+
+private:
+ PerformanceMeasure(const String& name, double startTime, double duration) : PerformanceEntry(name, "measure", startTime, duration) { }
+ ~PerformanceMeasure() { }
+};
+
+}
+
+#endif // ENABLE(USER_TIMING)
+
+#endif // !defined(PerformanceMeasure_h)
diff --git a/Source/WebCore/page/PerformanceMeasure.idl b/Source/WebCore/page/PerformanceMeasure.idl
new file mode 100644
index 000000000..f7236998f
--- /dev/null
+++ b/Source/WebCore/page/PerformanceMeasure.idl
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2012 Intel Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module window {
+
+ interface [
+ Conditional=USER_TIMING,
+ OmitConstructor
+ ] PerformanceMeasure : PerformanceEntry {
+ };
+}
diff --git a/Source/WebCore/page/PerformanceUserTiming.cpp b/Source/WebCore/page/PerformanceUserTiming.cpp
new file mode 100644
index 000000000..b5f729294
--- /dev/null
+++ b/Source/WebCore/page/PerformanceUserTiming.cpp
@@ -0,0 +1,167 @@
+/*
+ * Copyright (C) 2012 Intel Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "PerformanceUserTiming.h"
+
+#if ENABLE(USER_TIMING)
+
+#include "Performance.h"
+#include "PerformanceMark.h"
+#include "PerformanceMeasure.h"
+#include <wtf/dtoa/utils.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+HashMap<String, NavigationTimingFunction> UserTiming::m_restrictedKeyMap;
+
+UserTiming::UserTiming(Performance* performance)
+ : m_performance(performance)
+{
+ static const struct RestrictedField {
+ String key;
+ NavigationTimingFunction navigationTimingFunction;
+ } defaultRestrictions[] = {
+ {"navigationStart", &PerformanceTiming::navigationStart},
+ {"unloadEventStart", &PerformanceTiming::unloadEventStart},
+ {"unloadEventEnd", &PerformanceTiming::unloadEventEnd},
+ {"redirectStart", &PerformanceTiming::redirectStart},
+ {"redirectEnd", &PerformanceTiming::redirectEnd},
+ {"fetchStart", &PerformanceTiming::fetchStart},
+ {"domainLookupStart", &PerformanceTiming::domainLookupStart},
+ {"domainLookupEnd", &PerformanceTiming::domainLookupEnd},
+ {"connectStart", &PerformanceTiming::connectStart},
+ {"connectEnd", &PerformanceTiming::connectEnd},
+ {"secureConnectionStart", &PerformanceTiming::secureConnectionStart},
+ {"requestStart", &PerformanceTiming::requestStart},
+ {"responseStart", &PerformanceTiming::responseStart},
+ {"responseEnd", &PerformanceTiming::responseEnd},
+ {"domLoading", &PerformanceTiming::domLoading},
+ {"domInteractive", &PerformanceTiming::domInteractive},
+ {"domContentLoadedEventStart", &PerformanceTiming::domContentLoadedEventStart},
+ {"domContentLoadedEventEnd", &PerformanceTiming::domContentLoadedEventEnd},
+ {"domComplete", &PerformanceTiming::domComplete},
+ {"loadEventStart", &PerformanceTiming::loadEventStart},
+ {"loadEventEnd", &PerformanceTiming::loadEventEnd}
+ };
+
+ if (!m_restrictedKeyMap.isEmpty())
+ return;
+
+ for (const struct RestrictedField* restriction = defaultRestrictions;
+ static_cast<unsigned>(restriction - defaultRestrictions) < ARRAY_SIZE(defaultRestrictions);
+ ++restriction) {
+ m_restrictedKeyMap.add(restriction->key, restriction->navigationTimingFunction);
+ }
+}
+
+static void insertPerformanceEntry(PerformanceEntryMap& performanceEntryMap, PassRefPtr<PerformanceEntry> performanceEntry)
+{
+ RefPtr<PerformanceEntry> entry = performanceEntry;
+ PerformanceEntryMap::iterator it = performanceEntryMap.find(entry->name());
+ if (it != performanceEntryMap.end())
+ it->second.append(entry);
+ else {
+ Vector<RefPtr<PerformanceEntry> > v(1);
+ v[0] = entry;
+ performanceEntryMap.set(entry->name(), v);
+ }
+}
+
+static void clearPeformanceEntries(PerformanceEntryMap& performanceEntryMap, const String& name)
+{
+ if (name.isNull()) {
+ performanceEntryMap.clear();
+ return;
+ }
+
+ if (performanceEntryMap.contains(name))
+ performanceEntryMap.remove(name);
+}
+
+void UserTiming::mark(const String& markName, ExceptionCode& ec)
+{
+ ec = 0;
+ if (m_restrictedKeyMap.contains(markName)) {
+ ec = SYNTAX_ERR;
+ return;
+ }
+
+ double startTime = m_performance->webkitNow();
+ insertPerformanceEntry(m_marksMap, PerformanceMark::create(markName, startTime));
+}
+
+void UserTiming::clearMarks(const String& markName)
+{
+ clearPeformanceEntries(m_marksMap, markName);
+}
+
+double UserTiming::findExistingMarkStartTime(const String& markName, ExceptionCode& ec)
+{
+ ec = 0;
+
+ if (m_marksMap.contains(markName))
+ return m_marksMap.get(markName).last()->startTime();
+
+ if (m_restrictedKeyMap.contains(markName))
+ return static_cast<double>((m_performance->timing()->*(m_restrictedKeyMap.get(markName)))()) - m_performance->timing()->navigationStart();
+
+ ec = SYNTAX_ERR;
+ return 0.0;
+}
+
+void UserTiming::measure(const String& measureName, const String& startMark, const String& endMark, ExceptionCode& ec)
+{
+ double startTime = 0.0;
+ double endTime = 0.0;
+
+ if (startMark.isNull())
+ endTime = m_performance->webkitNow();
+ else if (endMark.isNull()) {
+ endTime = m_performance->webkitNow();
+ startTime = findExistingMarkStartTime(startMark, ec);
+ if (ec)
+ return;
+ } else {
+ endTime = findExistingMarkStartTime(endMark, ec);
+ if (ec)
+ return;
+ startTime = findExistingMarkStartTime(startMark, ec);
+ if (ec)
+ return;
+ }
+
+ insertPerformanceEntry(m_measuresMap, PerformanceMeasure::create(measureName, startTime, endTime - startTime));
+}
+
+void UserTiming::clearMeasures(const String& measureName)
+{
+ clearPeformanceEntries(m_measuresMap, measureName);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(USER_TIMING)
diff --git a/Source/WebCore/page/PerformanceUserTiming.h b/Source/WebCore/page/PerformanceUserTiming.h
new file mode 100644
index 000000000..08441eee0
--- /dev/null
+++ b/Source/WebCore/page/PerformanceUserTiming.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2012 Intel Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PerformanceUserTiming_h
+#define PerformanceUserTiming_h
+
+#if ENABLE(USER_TIMING)
+
+#include "EventException.h"
+#include "ExceptionCode.h"
+#include "Performance.h"
+#include "PerformanceTiming.h"
+#include "PlatformString.h"
+#include <wtf/HashMap.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/text/StringHash.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class Performance;
+class PerformanceEntry;
+
+typedef unsigned long long (PerformanceTiming::*NavigationTimingFunction)() const;
+typedef HashMap<String, Vector<RefPtr<PerformanceEntry> > > PerformanceEntryMap;
+
+class UserTiming : public RefCounted<UserTiming> {
+public:
+ static PassRefPtr<UserTiming> create(Performance* performance) { return adoptRef(new UserTiming(performance)); }
+ void mark(const String& markName, ExceptionCode&);
+ void clearMarks(const String& markName);
+
+ void measure(const String& measureName, const String& startMark, const String& endMark, ExceptionCode&);
+ void clearMeasures(const String& measureName);
+
+private:
+ explicit UserTiming(Performance*);
+ static HashMap<String, NavigationTimingFunction> m_restrictedKeyMap;
+
+ double findExistingMarkStartTime(const String& markName, ExceptionCode&);
+ Performance* m_performance;
+ PerformanceEntryMap m_marksMap;
+ PerformanceEntryMap m_measuresMap;
+};
+
+}
+
+#endif // ENABLE(USER_TIMING)
+
+#endif // !defined(PerformanceUserTiming_h)
diff --git a/Source/WebCore/platform/graphics/GraphicsLayerClient.h b/Source/WebCore/platform/graphics/GraphicsLayerClient.h
index 7efee0e65..3e105ce6b 100644
--- a/Source/WebCore/platform/graphics/GraphicsLayerClient.h
+++ b/Source/WebCore/platform/graphics/GraphicsLayerClient.h
@@ -30,11 +30,12 @@
namespace WebCore {
+class FloatPoint;
class GraphicsContext;
class GraphicsLayer;
class IntPoint;
class IntRect;
-class FloatPoint;
+class TransformationMatrix;
enum GraphicsLayerPaintingPhaseFlags {
GraphicsLayerPaintBackground = (1 << 0),
@@ -66,9 +67,16 @@ public:
// to appear on the screen.
virtual void notifyFlushRequired(const GraphicsLayer*) = 0;
+ // Notification that this layer requires a flush before the next display refresh.
+ virtual void notifyFlushBeforeDisplayRefresh(const GraphicsLayer*) { }
+
virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& inClip) = 0;
virtual void didCommitChangesForLayer(const GraphicsLayer*) const { }
+ // Provides current transform (taking transform-origin and animations into account). Input matrix has been
+ // initialized to identity already. Returns false if the layer has no transform.
+ virtual bool getCurrentTransform(const GraphicsLayer*, TransformationMatrix&) const { return false; }
+
// Multiplier for backing store size, related to high DPI.
virtual float deviceScaleFactor() const { return 1; }
// Page scale factor.
diff --git a/Source/WebCore/platform/graphics/GraphicsLayerUpdater.cpp b/Source/WebCore/platform/graphics/GraphicsLayerUpdater.cpp
new file mode 100644
index 000000000..2eb656924
--- /dev/null
+++ b/Source/WebCore/platform/graphics/GraphicsLayerUpdater.cpp
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+
+#if USE(ACCELERATED_COMPOSITING)
+
+#include "GraphicsLayerUpdater.h"
+
+#include "GraphicsLayer.h"
+
+namespace WebCore {
+
+GraphicsLayerUpdater::GraphicsLayerUpdater(GraphicsLayerUpdaterClient* client, PlatformDisplayID displayID)
+ : m_client(client)
+ , m_scheduled(false)
+{
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
+ DisplayRefreshMonitorManager::sharedManager()->registerClient(this);
+ DisplayRefreshMonitorManager::sharedManager()->windowScreenDidChange(displayID, this);
+ DisplayRefreshMonitorManager::sharedManager()->scheduleAnimation(this);
+#endif
+}
+
+GraphicsLayerUpdater::~GraphicsLayerUpdater()
+{
+ // ~DisplayRefreshMonitorClient unregisters us as a client.
+}
+
+void GraphicsLayerUpdater::scheduleUpdate()
+{
+ if (m_scheduled)
+ return;
+
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
+ DisplayRefreshMonitorManager::sharedManager()->scheduleAnimation(this);
+#endif
+ m_scheduled = true;
+}
+
+void GraphicsLayerUpdater::screenDidChange(PlatformDisplayID displayID)
+{
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
+ DisplayRefreshMonitorManager::sharedManager()->windowScreenDidChange(displayID, this);
+#endif
+}
+
+void GraphicsLayerUpdater::displayRefreshFired(double timestamp)
+{
+ UNUSED_PARAM(timestamp);
+ m_scheduled = false;
+
+ if (m_client)
+ m_client->flushLayers(this);
+}
+
+} // namespace WebCore
+
+#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/Source/WebCore/platform/graphics/GraphicsLayerUpdater.h b/Source/WebCore/platform/graphics/GraphicsLayerUpdater.h
new file mode 100644
index 000000000..108099ae6
--- /dev/null
+++ b/Source/WebCore/platform/graphics/GraphicsLayerUpdater.h
@@ -0,0 +1,67 @@
+/*
+ * 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 GraphicsLayerUpdater_h
+#define GraphicsLayerUpdater_h
+
+#if USE(ACCELERATED_COMPOSITING)
+
+#include "DisplayRefreshMonitor.h"
+#include "PlatformScreen.h"
+
+namespace WebCore {
+
+class GraphicsLayerUpdater;
+
+class GraphicsLayerUpdaterClient {
+public:
+ virtual ~GraphicsLayerUpdaterClient() { }
+ virtual void flushLayers(GraphicsLayerUpdater*) = 0;
+};
+
+class GraphicsLayerUpdater
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
+ : public DisplayRefreshMonitorClient
+#endif
+{
+public:
+ GraphicsLayerUpdater(GraphicsLayerUpdaterClient*, PlatformDisplayID);
+ virtual ~GraphicsLayerUpdater();
+
+ void scheduleUpdate();
+ void screenDidChange(PlatformDisplayID);
+
+private:
+ virtual void displayRefreshFired(double timestamp);
+
+ GraphicsLayerUpdaterClient* m_client;
+ bool m_scheduled;
+};
+
+} // namespace WebCore
+
+#endif // USE(ACCELERATED_COMPOSITING)
+
+#endif // GraphicsLayerUpdater_h
diff --git a/Source/WebCore/platform/graphics/SimpleFontData.h b/Source/WebCore/platform/graphics/SimpleFontData.h
index db28040fc..5e9f770d6 100644
--- a/Source/WebCore/platform/graphics/SimpleFontData.h
+++ b/Source/WebCore/platform/graphics/SimpleFontData.h
@@ -98,6 +98,8 @@ public:
virtual ~SimpleFontData();
+ static const SimpleFontData* systemFallback() { return reinterpret_cast<const SimpleFontData*>(-1); }
+
const FontPlatformData& platformData() const { return m_platformData; }
#if ENABLE(OPENTYPE_VERTICAL)
const OpenTypeVerticalData* verticalData() const { return m_verticalData; }
diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
index 3ec8343a9..d3df7fe0f 100644
--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
@@ -921,12 +921,13 @@ void GraphicsLayerCA::computeVisibleRect(TransformState& state)
TransformationMatrix layerTransform;
layerTransform.translate(m_position.x(), m_position.y());
-
- if (!transform().isIdentity()) {
+
+ TransformationMatrix currentTransform;
+ if (client() && client()->getCurrentTransform(this, currentTransform) && !currentTransform.isIdentity()) {
FloatPoint3D absoluteAnchorPoint(anchorPoint());
absoluteAnchorPoint.scale(size().width(), size().height(), 1);
layerTransform.translate3d(absoluteAnchorPoint.x(), absoluteAnchorPoint.y(), absoluteAnchorPoint.z());
- layerTransform.multiply(transform());
+ layerTransform.multiply(currentTransform);
layerTransform.translate3d(-absoluteAnchorPoint.x(), -absoluteAnchorPoint.y(), -absoluteAnchorPoint.z());
}
@@ -1015,6 +1016,9 @@ void GraphicsLayerCA::recursiveCommitChanges(const TransformState& state, float
commitLayerChangesAfterSublayers();
+ if (client() && m_layer->layerType() == PlatformCALayer::LayerTypeTileCacheLayer)
+ client()->notifyFlushBeforeDisplayRefresh(this);
+
if (hadChanges && client())
client()->didCommitChangesForLayer(this);
}
diff --git a/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp b/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp
index 6f1d4ca15..64f3b702a 100644
--- a/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp
+++ b/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp
@@ -229,8 +229,7 @@ void GraphicsContext3D::createGraphicsSurfaces(const IntSize& size)
}
#endif
-bool GraphicsContext3D::getImageData(Image* image, GC3Denum format, GC3Denum type, bool premultiplyAlpha,
- bool ignoreGammaAndColorProfile, Vector<uint8_t>& outputVector)
+bool GraphicsContext3D::getImageData(Image*, GC3Denum /* format */, GC3Denum /* type */, bool /* premultiplyAlpha */, bool /* ignoreGammaAndColorProfile */, Vector<uint8_t>& /* outputVector */)
{
notImplemented();
return false;
diff --git a/Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp b/Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp
index 68bd0d57b..1c1dc568a 100644
--- a/Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp
+++ b/Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp
@@ -108,8 +108,6 @@ bool GraphicsContext3DPrivate::createSurface(PageClientEfl* pageClient, bool ren
{
// If RenderStyle is RenderOffscreen, we will be rendering to a FBO,
// so Evas_GL_Surface has a 1x1 dummy surface.
- int x = 0;
- int y = 0;
int width = 1;
int height = 1;
@@ -165,7 +163,7 @@ bool GraphicsContext3DPrivate::makeContextCurrent()
}
#if USE(TEXTURE_MAPPER_GL)
-void GraphicsContext3DPrivate::paintToTextureMapper(TextureMapper*, const FloatRect& target, const TransformationMatrix&, float opacity, BitmapTexture* mask)
+void GraphicsContext3DPrivate::paintToTextureMapper(TextureMapper*, const FloatRect& /* target */, const TransformationMatrix&, float /* opacity */, BitmapTexture* /* mask */)
{
notImplemented();
}
diff --git a/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp b/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
index 81cf10486..87bd52dc0 100644
--- a/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
+++ b/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
@@ -329,12 +329,8 @@ void ComplexTextController::collectComplexTextRuns()
nextIsMissingGlyph = false;
#if !PLATFORM(WX)
nextFontData = m_font.fontDataForCombiningCharacterSequence(sequenceStart, curr - sequenceStart, nextIsSmallCaps ? SmallCapsVariant : NormalVariant);
- if (!nextFontData) {
- if (markCount)
- nextFontData = systemFallbackFontData();
- else
- nextIsMissingGlyph = true;
- }
+ if (!nextFontData)
+ nextIsMissingGlyph = true;
#endif
while (curr < end) {
@@ -361,12 +357,8 @@ void ComplexTextController::collectComplexTextRuns()
#if !PLATFORM(WX)
else {
nextFontData = m_font.fontDataForCombiningCharacterSequence(cp + index, curr - cp - index, nextIsSmallCaps ? SmallCapsVariant : NormalVariant);
- if (!nextFontData) {
- if (markCount)
- nextFontData = systemFallbackFontData();
- else
- nextIsMissingGlyph = true;
- }
+ if (!nextFontData)
+ nextIsMissingGlyph = true;
}
#endif
diff --git a/Source/WebCore/platform/graphics/mac/ComplexTextController.h b/Source/WebCore/platform/graphics/mac/ComplexTextController.h
index 25c946ee3..b0dc0713e 100644
--- a/Source/WebCore/platform/graphics/mac/ComplexTextController.h
+++ b/Source/WebCore/platform/graphics/mac/ComplexTextController.h
@@ -72,8 +72,6 @@ public:
float maxGlyphBoundingBoxY() const { return m_maxGlyphBoundingBoxY; }
private:
- static const SimpleFontData* systemFallbackFontData() { return reinterpret_cast<const SimpleFontData*>(-1); }
-
class ComplexTextRun : public RefCounted<ComplexTextRun> {
public:
static PassRefPtr<ComplexTextRun> create(CTRunRef ctRun, const SimpleFontData* fontData, const UChar* characters, unsigned stringLocation, size_t stringLength, CFRange runRange)
diff --git a/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm b/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm
index f7d03110b..4cb876c36 100644
--- a/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm
+++ b/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm
@@ -200,7 +200,7 @@ void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp,
UChar32 baseCharacter = 0;
RetainPtr<CFDictionaryRef> stringAttributes;
- if (fontData == systemFallbackFontData()) {
+ if (fontData == SimpleFontData::systemFallback()) {
// FIXME: This code path does not support small caps.
isSystemFallback = true;
diff --git a/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp b/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp
index da80c2bde..9dd95e85a 100644
--- a/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp
+++ b/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp
@@ -176,8 +176,11 @@ const SimpleFontData* Font::fontDataForCombiningCharacterSequence(const UChar* c
GlyphData baseCharacterGlyphData = glyphDataForCharacter(baseCharacter, false, variant);
+ if (!baseCharacterGlyphData.glyph)
+ return 0;
+
if (length == baseCharacterLength)
- return baseCharacterGlyphData.glyph ? baseCharacterGlyphData.fontData : 0;
+ return baseCharacterGlyphData.fontData;
bool triedBaseCharacterFontData = false;
@@ -216,7 +219,7 @@ const SimpleFontData* Font::fontDataForCombiningCharacterSequence(const UChar* c
if (!triedBaseCharacterFontData && baseCharacterGlyphData.fontData && baseCharacterGlyphData.fontData->canRenderCombiningCharacterSequence(characters, length))
return baseCharacterGlyphData.fontData;
- return 0;
+ return SimpleFontData::systemFallback();
}
} // namespace WebCore
diff --git a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp
index ccccd38bf..b560bd48e 100644
--- a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp
+++ b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp
@@ -102,6 +102,8 @@ void Extensions3DOpenGL::bindVertexArrayOES(Platform3DObject array)
m_context->makeContextCurrent();
#if !PLATFORM(GTK) && !PLATFORM(QT) && !PLATFORM(EFL) && defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object
glBindVertexArrayAPPLE(array);
+#else
+ UNUSED_PARAM(array);
#endif
}
diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index c2ab6dfb0..c41983bfd 100644
--- a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -1190,6 +1190,9 @@ void GraphicsContext::setLineDash(const DashArray& dashes, float dashOffset)
count *= 2;
float penWidth = narrowPrecisionToFloat(double(pen.widthF()));
+ if (penWidth <= 0.f)
+ penWidth = 1.f;
+
for (unsigned i = 0; i < count; i++)
pattern.append(dashes[i % dashLength] / penWidth);
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapper.h b/Source/WebCore/platform/graphics/texmap/TextureMapper.h
index a90dbe4f1..86a55df49 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapper.h
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapper.h
@@ -73,7 +73,7 @@ public:
inline Flags flags() const { return m_flags; }
virtual int bpp() const { return 32; }
- virtual bool canReuseWith(const IntSize& contentsSize, Flags flags = 0) { return false; }
+ virtual bool canReuseWith(const IntSize& /* contentsSize */, Flags = 0) { return false; }
void reset(const IntSize& size, Flags flags = 0)
{
m_flags = flags;
@@ -140,7 +140,7 @@ public:
TextDrawingModeFlags textDrawingMode() const { return m_textDrawingMode; }
AccelerationMode accelerationMode() const { return m_accelerationMode; }
- virtual void beginPainting(PaintFlags flags = 0) { }
+ virtual void beginPainting(PaintFlags = 0) { }
virtual void endPainting() { }
virtual IntSize maxTextureSize() const { return IntSize(INT_MAX, INT_MAX); }
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
index 94e449345..19feae868 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
@@ -345,6 +345,10 @@ void TextureMapperGL::drawRepaintCounter(int value, int pointSize, const FloatPo
texture->updateContents(bits, sourceRect, IntPoint::zero(), image.bytesPerLine());
drawTexture(*texture, targetRect, modelViewMatrix, 1.0f, 0, AllEdges);
#else
+ UNUSED_PARAM(value);
+ UNUSED_PARAM(pointSize);
+ UNUSED_PARAM(targetPoint);
+ UNUSED_PARAM(modelViewMatrix);
notImplemented();
#endif
}
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp
index 9282959de..7802b3f0e 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp
@@ -46,6 +46,11 @@ void BitmapTextureImageBuffer::updateContents(const void* data, const IntRect& t
bytesPerLine));
m_image->context()->platformContext()->drawSurfaceToContext(surface.get(), targetRect,
IntRect(sourceOffset, targetRect.size()), m_image->context());
+#else
+ UNUSED_PARAM(data);
+ UNUSED_PARAM(targetRect);
+ UNUSED_PARAM(sourceOffset);
+ UNUSED_PARAM(bytesPerLine);
#endif
}
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h b/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h
index 7d51e8805..fe9774a32 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h
@@ -52,8 +52,14 @@ public:
static PassOwnPtr<TextureMapper> create() { return adoptPtr(new TextureMapperImageBuffer); }
// TextureMapper implementation
- virtual void drawBorder(const Color& color, float borderWidth, const FloatRect& targetRect, const TransformationMatrix& modelViewMatrix = TransformationMatrix()) OVERRIDE { };
- virtual void drawRepaintCounter(int value, int pointSize, const FloatPoint&, const TransformationMatrix& modelViewMatrix = TransformationMatrix()) OVERRIDE { };
+ virtual void drawBorder(const Color&, float /* borderWidth */, const FloatRect& /* targetRect */, const TransformationMatrix& modelViewMatrix = TransformationMatrix()) OVERRIDE
+ {
+ UNUSED_PARAM(modelViewMatrix);
+ };
+ virtual void drawRepaintCounter(int /* value */, int /* pointSize */, const FloatPoint&, const TransformationMatrix& modelViewMatrix = TransformationMatrix()) OVERRIDE
+ {
+ UNUSED_PARAM(modelViewMatrix);
+ };
virtual void drawTexture(const BitmapTexture&, const FloatRect& targetRect, const TransformationMatrix&, float opacity, const BitmapTexture* maskTexture, unsigned exposedEdges) OVERRIDE;
virtual void beginClip(const TransformationMatrix&, const FloatRect&) OVERRIDE;
virtual void bindSurface(BitmapTexture* surface) OVERRIDE { m_currentSurface = surface;}
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
index e36dbc948..b9544609e 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
@@ -183,7 +183,7 @@ int TextureMapperLayer::compareGraphicsLayersZValue(const void* a, const void* b
return int(((*layerA)->m_centerZ - (*layerB)->m_centerZ) * 1000);
}
-void TextureMapperLayer::sortByZOrder(Vector<TextureMapperLayer* >& array, int first, int last)
+void TextureMapperLayer::sortByZOrder(Vector<TextureMapperLayer* >& array, int /* first */, int /* last */)
{
qsort(array.data(), array.size(), sizeof(TextureMapperLayer*), compareGraphicsLayersZValue);
}
@@ -407,7 +407,7 @@ void TextureMapperLayer::flushCompositingState(GraphicsLayerTextureMapper* graph
flushCompositingState(graphicsLayer, rootLayer()->m_textureMapper, options);
}
-void TextureMapperLayer::flushCompositingStateSelf(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper)
+void TextureMapperLayer::flushCompositingStateSelf(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper*)
{
int changeMask = graphicsLayer->changeMask();
diff --git a/Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp b/Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp
index 22d514aa7..7b7e45aec 100644
--- a/Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp
+++ b/Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp
@@ -173,8 +173,9 @@ static bool encodePixels(IntSize imageSize, unsigned char* inputPixels, bool pre
row.resize(cinfo.image_width * cinfo.input_components);
const size_t pixelRowStride = cinfo.image_width * 4;
while (cinfo.next_scanline < cinfo.image_height) {
- extractRowRGB(pixels, cinfo.image_width, row.data());
- jpeg_write_scanlines(&cinfo, row.dataSlot(), 1);
+ JSAMPLE* rowData = row.data();
+ extractRowRGB(pixels, cinfo.image_width, rowData);
+ jpeg_write_scanlines(&cinfo, &rowData, 1);
pixels += pixelRowStride;
}
diff --git a/Source/WebCore/platform/text/mac/StringMac.mm b/Source/WebCore/platform/text/mac/StringMac.mm
index 9544048b2..4e9b2c696 100644
--- a/Source/WebCore/platform/text/mac/StringMac.mm
+++ b/Source/WebCore/platform/text/mac/StringMac.mm
@@ -34,9 +34,17 @@ String::String(NSString* str)
if (size == 0)
m_impl = StringImpl::empty();
else {
- Vector<UChar, 1024> buffer(size);
- CFStringGetCharacters(reinterpret_cast<CFStringRef>(str), CFRangeMake(0, size), buffer.data());
- m_impl = StringImpl::create(buffer.data(), size);
+ Vector<LChar, 1024> lcharBuffer(size);
+ CFIndex usedBufLen;
+ CFIndex convertedsize = CFStringGetBytes(reinterpret_cast<CFStringRef>(str), CFRangeMake(0, size), kCFStringEncodingISOLatin1, 0, false, lcharBuffer.data(), size, &usedBufLen);
+ if ((convertedsize == size) && (usedBufLen == size)) {
+ m_impl = StringImpl::create(lcharBuffer.data(), size);
+ return;
+ }
+
+ Vector<UChar, 1024> ucharBuffer(size);
+ CFStringGetCharacters(reinterpret_cast<CFStringRef>(str), CFRangeMake(0, size), ucharBuffer.data());
+ m_impl = StringImpl::create(ucharBuffer.data(), size);
}
}
diff --git a/Source/WebCore/plugins/PluginViewBase.h b/Source/WebCore/plugins/PluginViewBase.h
index 1d5ce0ca3..e4a0c4943 100644
--- a/Source/WebCore/plugins/PluginViewBase.h
+++ b/Source/WebCore/plugins/PluginViewBase.h
@@ -61,6 +61,7 @@ public:
// FIXME: This is a hack that works around the fact that the WebKit2 PluginView isn't a ScrollableArea.
virtual bool wantsWheelEvents() { return false; }
virtual bool supportsKeyboardFocus() const { return false; }
+ virtual bool canProcessDrag() const { return false; }
protected:
explicit PluginViewBase(PlatformWidget widget = 0) : Widget(widget) { }
diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp
index c850a2f4d..62606f196 100644
--- a/Source/WebCore/rendering/RenderLayer.cpp
+++ b/Source/WebCore/rendering/RenderLayer.cpp
@@ -597,7 +597,7 @@ void RenderLayer::updateTransform()
dirty3DTransformedDescendantStatus();
}
-TransformationMatrix RenderLayer::currentTransform() const
+TransformationMatrix RenderLayer::currentTransform(RenderStyle::ApplyTransformOrigin applyOrigin) const
{
if (!m_transform)
return TransformationMatrix();
@@ -606,7 +606,16 @@ TransformationMatrix RenderLayer::currentTransform() const
if (renderer()->style()->isRunningAcceleratedAnimation()) {
TransformationMatrix currTransform;
RefPtr<RenderStyle> style = renderer()->animation()->getAnimatedStyleForRenderer(renderer());
- style->applyTransform(currTransform, renderBox()->pixelSnappedBorderBoxRect().size(), RenderStyle::IncludeTransformOrigin);
+ style->applyTransform(currTransform, renderBox()->pixelSnappedBorderBoxRect().size(), applyOrigin);
+ makeMatrixRenderable(currTransform, canRender3DTransforms());
+ return currTransform;
+ }
+
+ // m_transform includes transform-origin, so we need to recompute the transform here.
+ if (applyOrigin == RenderStyle::ExcludeTransformOrigin) {
+ RenderBox* box = renderBox();
+ TransformationMatrix currTransform;
+ box->style()->applyTransform(currTransform, box->pixelSnappedBorderBoxRect().size(), RenderStyle::ExcludeTransformOrigin);
makeMatrixRenderable(currTransform, canRender3DTransforms());
return currTransform;
}
@@ -3495,6 +3504,8 @@ bool RenderLayer::hitTest(const HitTestRequest& request, HitTestResult& result)
bool RenderLayer::hitTest(const HitTestRequest& request, const HitTestLocation& hitTestLocation, HitTestResult& result)
{
+ ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant());
+
renderer()->document()->updateLayout();
LayoutRect hitTestArea = renderer()->isRenderFlowThread() ? toRenderFlowThread(renderer())->borderBoxRect() : renderer()->view()->documentRect();
@@ -3615,6 +3626,9 @@ RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, RenderLayer* cont
const LayoutRect& hitTestRect, const HitTestLocation& hitTestLocation, bool appliedTransform,
const HitTestingTransformState* transformState, double* zOffset)
{
+ if (!isSelfPaintingLayer() && !hasSelfPaintingLayerDescendant())
+ return 0;
+
// The natural thing would be to keep HitTestingTransformState on the stack, but it's big, so we heap-allocate.
bool useTemporaryClipRects = renderer()->view()->frameView()->containsScrollableAreaWithOverlayScrollbars();
@@ -3786,6 +3800,8 @@ RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, RenderLayer* cont
bool RenderLayer::hitTestContents(const HitTestRequest& request, HitTestResult& result, const LayoutRect& layerBounds, const HitTestLocation& hitTestLocation, HitTestFilter hitTestFilter) const
{
+ ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant());
+
if (!renderer()->hitTest(request, result, hitTestLocation,
toLayoutPoint(layerBounds.location() - renderBoxLocation()),
hitTestFilter)) {
@@ -3820,7 +3836,10 @@ RenderLayer* RenderLayer::hitTestList(Vector<RenderLayer*>* list, RenderLayer* r
{
if (!list)
return 0;
-
+
+ if (!hasSelfPaintingLayerDescendant())
+ return 0;
+
RenderLayer* resultLayer = 0;
for (int i = list->size() - 1; i >= 0; --i) {
RenderLayer* childLayer = list->at(i);
diff --git a/Source/WebCore/rendering/RenderLayer.h b/Source/WebCore/rendering/RenderLayer.h
index c3db96d1d..181103643 100644
--- a/Source/WebCore/rendering/RenderLayer.h
+++ b/Source/WebCore/rendering/RenderLayer.h
@@ -595,7 +595,7 @@ public:
// currentTransform computes a transform which takes accelerated animations into account. The
// resulting transform has transform-origin baked in. If the layer does not have a transform,
// returns the identity matrix.
- TransformationMatrix currentTransform() const;
+ TransformationMatrix currentTransform(RenderStyle::ApplyTransformOrigin = RenderStyle::IncludeTransformOrigin) const;
TransformationMatrix renderableTransform(PaintBehavior) const;
// Get the perspective transform, which is applied to transformed sublayers.
diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp
index 1ef75e7b2..6e3aa530e 100644
--- a/Source/WebCore/rendering/RenderLayerBacking.cpp
+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp
@@ -1539,6 +1539,18 @@ void RenderLayerBacking::didCommitChangesForLayer(const GraphicsLayer*) const
compositor()->didFlushChangesForLayer(m_owningLayer);
}
+bool RenderLayerBacking::getCurrentTransform(const GraphicsLayer* graphicsLayer, TransformationMatrix& transform) const
+{
+ if (graphicsLayer != m_graphicsLayer)
+ return false;
+
+ if (m_owningLayer->hasTransform()) {
+ transform = m_owningLayer->currentTransform(RenderStyle::ExcludeTransformOrigin);
+ return true;
+ }
+ return false;
+}
+
bool RenderLayerBacking::showDebugBorders(const GraphicsLayer*) const
{
return compositor() ? compositor()->compositorShowDebugBorders() : false;
@@ -1721,6 +1733,11 @@ void RenderLayerBacking::notifyFlushRequired(const GraphicsLayer*)
compositor()->scheduleLayerFlush();
}
+void RenderLayerBacking::notifyFlushBeforeDisplayRefresh(const GraphicsLayer* layer)
+{
+ compositor()->notifyFlushBeforeDisplayRefresh(layer);
+}
+
// This is used for the 'freeze' API, for testing only.
void RenderLayerBacking::suspendAnimations(double time)
{
diff --git a/Source/WebCore/rendering/RenderLayerBacking.h b/Source/WebCore/rendering/RenderLayerBacking.h
index c04146551..565b308c4 100644
--- a/Source/WebCore/rendering/RenderLayerBacking.h
+++ b/Source/WebCore/rendering/RenderLayerBacking.h
@@ -139,18 +139,20 @@ public:
bool usingTileCache() const { return m_usingTiledCacheLayer; }
// GraphicsLayerClient interface
- virtual bool shouldUseTileCache(const GraphicsLayer*) const;
- virtual void notifyAnimationStarted(const GraphicsLayer*, double startTime);
- virtual void notifyFlushRequired(const GraphicsLayer*);
+ virtual bool shouldUseTileCache(const GraphicsLayer*) const OVERRIDE;
+ virtual void notifyAnimationStarted(const GraphicsLayer*, double startTime) OVERRIDE;
+ virtual void notifyFlushRequired(const GraphicsLayer*) OVERRIDE;
+ virtual void notifyFlushBeforeDisplayRefresh(const GraphicsLayer*) OVERRIDE;
- virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& clip);
+ virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& clip) OVERRIDE;
- virtual float deviceScaleFactor() const;
- virtual float pageScaleFactor() const;
- virtual void didCommitChangesForLayer(const GraphicsLayer*) const;
+ virtual float deviceScaleFactor() const OVERRIDE;
+ virtual float pageScaleFactor() const OVERRIDE;
+ virtual void didCommitChangesForLayer(const GraphicsLayer*) const OVERRIDE;
+ virtual bool getCurrentTransform(const GraphicsLayer*, TransformationMatrix&) const OVERRIDE;
- virtual bool showDebugBorders(const GraphicsLayer*) const;
- virtual bool showRepaintCounter(const GraphicsLayer*) const;
+ virtual bool showDebugBorders(const GraphicsLayer*) const OVERRIDE;
+ virtual bool showRepaintCounter(const GraphicsLayer*) const OVERRIDE;
#ifndef NDEBUG
virtual void verifyNotPainting();
diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp
index fabac0d71..bfc851713 100644
--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp
+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp
@@ -230,9 +230,7 @@ void RenderLayerCompositor::cacheAcceleratedCompositingFlags()
// We allow the chrome to override the settings, in case the page is rendered
// on a chrome that doesn't allow accelerated compositing.
if (hasAcceleratedCompositing) {
- Frame* frame = m_renderView->frameView()->frame();
- Page* page = frame ? frame->page() : 0;
- if (page) {
+ if (Page* page = this->page()) {
ChromeClient* chromeClient = page->chrome()->client();
m_compositingTriggers = chromeClient->allowedCompositingTriggers();
hasAcceleratedCompositing = m_compositingTriggers;
@@ -272,12 +270,8 @@ void RenderLayerCompositor::setCompositingLayersNeedRebuild(bool needRebuild)
void RenderLayerCompositor::scheduleLayerFlush()
{
- Frame* frame = m_renderView->frameView()->frame();
- Page* page = frame ? frame->page() : 0;
- if (!page)
- return;
-
- page->chrome()->client()->scheduleCompositingLayerFlush();
+ if (Page* page = this->page())
+ page->chrome()->client()->scheduleCompositingLayerFlush();
}
void RenderLayerCompositor::flushPendingLayerChanges(bool isFlushRoot)
@@ -289,6 +283,8 @@ void RenderLayerCompositor::flushPendingLayerChanges(bool isFlushRoot)
if (!isFlushRoot && rootLayerAttachment() == RootLayerAttachedViaEnclosingFrame)
return;
+ AnimationUpdateBlock animationUpdateBlock(m_renderView->frameView()->frame()->animation());
+
ASSERT(!m_flushingLayers);
m_flushingLayers = true;
@@ -309,6 +305,24 @@ void RenderLayerCompositor::didFlushChangesForLayer(RenderLayer*)
{
}
+void RenderLayerCompositor::notifyFlushBeforeDisplayRefresh(const GraphicsLayer*)
+{
+ if (!m_layerUpdater) {
+ PlatformDisplayID displayID = 0;
+ if (Page* page = this->page())
+ displayID = page->displayID();
+
+ m_layerUpdater = adoptPtr(new GraphicsLayerUpdater(this, displayID));
+ }
+
+ m_layerUpdater->scheduleUpdate();
+}
+
+void RenderLayerCompositor::flushLayers(GraphicsLayerUpdater*)
+{
+ flushPendingLayerChanges(true); // FIXME: deal with iframes
+}
+
RenderLayerCompositor* RenderLayerCompositor::enclosingCompositorFlushingLayers() const
{
if (!m_renderView->frameView())
@@ -1397,6 +1411,8 @@ bool RenderLayerCompositor::allowsIndependentlyCompositedFrames(const FrameView*
#if PLATFORM(MAC)
// frames are only independently composited in Mac pre-WebKit2.
return view->platformWidget();
+#else
+ UNUSED_PARAM(view);
#endif
return false;
}
@@ -1421,8 +1437,7 @@ bool RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame() const
// On Mac, only propagate compositing if the frame is overlapped in the parent
// document, or the parent is already compositing, or the main frame is scaled.
- Frame* frame = m_renderView->frameView()->frame();
- Page* page = frame ? frame->page() : 0;
+ Page* page = this->page();
if (page && page->pageScaleFactor() != 1)
return true;
@@ -1979,24 +1994,14 @@ bool RenderLayerCompositor::showRepaintCounter(const GraphicsLayer* layer) const
float RenderLayerCompositor::deviceScaleFactor() const
{
- Frame* frame = m_renderView->frameView()->frame();
- if (!frame)
- return 1;
- Page* page = frame->page();
- if (!page)
- return 1;
- return page->deviceScaleFactor();
+ Page* page = this->page();
+ return page ? page->deviceScaleFactor() : 1;
}
float RenderLayerCompositor::pageScaleFactor() const
{
- Frame* frame = m_renderView->frameView()->frame();
- if (!frame)
- return 1;
- Page* page = frame->page();
- if (!page)
- return 1;
- return page->pageScaleFactor();
+ Page* page = this->page();
+ return page ? page->pageScaleFactor() : 1;
}
void RenderLayerCompositor::didCommitChangesForLayer(const GraphicsLayer*) const
@@ -2292,6 +2297,8 @@ void RenderLayerCompositor::destroyRootLayer()
}
ASSERT(!m_scrollLayer);
m_rootContentLayer = nullptr;
+
+ m_layerUpdater = nullptr;
}
void RenderLayerCompositor::attachRootLayer(RootLayerAttachment attachment)
@@ -2451,26 +2458,36 @@ void RenderLayerCompositor::deviceOrPageScaleFactorChanged()
rootLayer->noteDeviceOrPageScaleFactorChangedIncludingDescendants();
}
+void RenderLayerCompositor::windowScreenDidChange(PlatformDisplayID displayID)
+{
+ if (m_layerUpdater)
+ m_layerUpdater->screenDidChange(displayID);
+}
+
ScrollingCoordinator* RenderLayerCompositor::scrollingCoordinator() const
{
- if (Frame* frame = m_renderView->frameView()->frame()) {
- if (Page* page = frame->page())
- return page->scrollingCoordinator();
- }
+ if (Page* page = this->page())
+ return page->scrollingCoordinator();
return 0;
}
GraphicsLayerFactory* RenderLayerCompositor::graphicsLayerFactory() const
{
- if (Frame* frame = m_renderView->frameView()->frame()) {
- if (Page* page = frame->page())
- return page->chrome()->client()->graphicsLayerFactory();
- }
+ if (Page* page = this->page())
+ return page->chrome()->client()->graphicsLayerFactory();
return 0;
}
+Page* RenderLayerCompositor::page() const
+{
+ if (Frame* frame = m_renderView->frameView()->frame())
+ return frame->page();
+
+ return 0;
+}
+
} // namespace WebCore
#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/Source/WebCore/rendering/RenderLayerCompositor.h b/Source/WebCore/rendering/RenderLayerCompositor.h
index 386119947..2591c882a 100644
--- a/Source/WebCore/rendering/RenderLayerCompositor.h
+++ b/Source/WebCore/rendering/RenderLayerCompositor.h
@@ -28,12 +28,14 @@
#include "ChromeClient.h"
#include "Frame.h"
+#include "GraphicsLayerUpdater.h"
#include "RenderLayer.h"
#include "RenderLayerBacking.h"
namespace WebCore {
class GraphicsLayer;
+class GraphicsLayerUpdater;
class RenderEmbeddedObject;
class RenderPart;
class ScrollingCoordinator;
@@ -55,7 +57,7 @@ enum CompositingUpdateType {
//
// There is one RenderLayerCompositor per RenderView.
-class RenderLayerCompositor : public GraphicsLayerClient {
+class RenderLayerCompositor : public GraphicsLayerClient, public GraphicsLayerUpdaterClient {
WTF_MAKE_FAST_ALLOCATED;
public:
RenderLayerCompositor(RenderView*);
@@ -203,15 +205,18 @@ public:
bool compositorShowDebugBorders() const { return m_showDebugBorders; }
bool compositorShowRepaintCounter() const { return m_showRepaintCounter; }
- virtual float deviceScaleFactor() const;
- virtual float pageScaleFactor() const;
- virtual void didCommitChangesForLayer(const GraphicsLayer*) const;
+ virtual float deviceScaleFactor() const OVERRIDE;
+ virtual float pageScaleFactor() const OVERRIDE;
+ virtual void didCommitChangesForLayer(const GraphicsLayer*) const OVERRIDE;
+ virtual void notifyFlushBeforeDisplayRefresh(const GraphicsLayer*) OVERRIDE;
bool keepLayersPixelAligned() const;
bool acceleratedDrawingEnabled() const { return m_acceleratedDrawingEnabled; }
void deviceOrPageScaleFactorChanged();
+ void windowScreenDidChange(PlatformDisplayID);
+
GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizontalScrollbar.get(); }
GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVerticalScrollbar.get(); }
GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.get(); }
@@ -224,13 +229,16 @@ public:
private:
class OverlapMap;
- // GraphicsLayerClient Implementation
- virtual void notifyAnimationStarted(const GraphicsLayer*, double) { }
- virtual void notifyFlushRequired(const GraphicsLayer*) { scheduleLayerFlush(); }
- virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect&);
+ // GraphicsLayerClient implementation
+ virtual void notifyAnimationStarted(const GraphicsLayer*, double) OVERRIDE { }
+ virtual void notifyFlushRequired(const GraphicsLayer*) OVERRIDE { scheduleLayerFlush(); }
+ virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect&) OVERRIDE;
- virtual bool showDebugBorders(const GraphicsLayer*) const;
- virtual bool showRepaintCounter(const GraphicsLayer*) const;
+ virtual bool showDebugBorders(const GraphicsLayer*) const OVERRIDE;
+ virtual bool showRepaintCounter(const GraphicsLayer*) const OVERRIDE;
+
+ // GraphicsLayerUpdaterClient implementation
+ virtual void flushLayers(GraphicsLayerUpdater*) OVERRIDE;
// Whether the given RL needs a compositing layer.
bool needsToBeComposited(const RenderLayer*) const;
@@ -283,6 +291,8 @@ private:
void notifyIFramesOfCompositingChange();
bool isFlushingLayers() const { return m_flushingLayers; }
+
+ Page* page() const;
GraphicsLayerFactory* graphicsLayerFactory() const;
ScrollingCoordinator* scrollingCoordinator() const;
@@ -356,6 +366,8 @@ private:
OwnPtr<GraphicsLayer> m_contentShadowLayer;
#endif
+ OwnPtr<GraphicsLayerUpdater> m_layerUpdater; // Updates tiled layer visible area periodically while animations are running.
+
#if !LOG_DISABLED
int m_rootLayerUpdateCount;
int m_obligateCompositedLayerCount; // count of layer that have to be composited.
diff --git a/Source/WebCore/rendering/RenderObjectChildList.cpp b/Source/WebCore/rendering/RenderObjectChildList.cpp
index 058f8e6fd..bee4cc2f6 100644
--- a/Source/WebCore/rendering/RenderObjectChildList.cpp
+++ b/Source/WebCore/rendering/RenderObjectChildList.cpp
@@ -31,16 +31,11 @@
#include "ContentData.h"
#include "RenderBlock.h"
#include "RenderCounter.h"
-#include "RenderImage.h"
-#include "RenderImageResourceStyleImage.h"
-#include "RenderInline.h"
#include "RenderLayer.h"
#include "RenderListItem.h"
#include "RenderNamedFlowThread.h"
-#include "RenderQuote.h"
#include "RenderRegion.h"
#include "RenderStyle.h"
-#include "RenderTextFragment.h"
#include "RenderView.h"
namespace WebCore {
@@ -305,40 +300,6 @@ void RenderObjectChildList::updateBeforeAfterStyle(RenderObject* child, PseudoId
}
}
-static RenderObject* createRendererForBeforeAfterContent(RenderObject* owner, const ContentData* content, RenderStyle* pseudoElementStyle)
-{
- RenderObject* renderer = 0;
- switch (content->type()) {
- case CONTENT_NONE:
- break;
- case CONTENT_TEXT:
- renderer = new (owner->renderArena()) RenderTextFragment(owner->document() /* anonymous object */, static_cast<const TextContentData*>(content)->text().impl());
- renderer->setStyle(pseudoElementStyle);
- break;
- case CONTENT_OBJECT: {
- RenderImage* image = new (owner->renderArena()) RenderImage(owner->document()); // anonymous object
- RefPtr<RenderStyle> style = RenderStyle::create();
- style->inheritFrom(pseudoElementStyle);
- image->setStyle(style.release());
- if (const StyleImage* styleImage = static_cast<const ImageContentData*>(content)->image())
- image->setImageResource(RenderImageResourceStyleImage::create(const_cast<StyleImage*>(styleImage)));
- else
- image->setImageResource(RenderImageResource::create());
- renderer = image;
- break;
- }
- case CONTENT_COUNTER:
- renderer = new (owner->renderArena()) RenderCounter(owner->document(), *static_cast<const CounterContentData*>(content)->counter());
- renderer->setStyle(pseudoElementStyle);
- break;
- case CONTENT_QUOTE:
- renderer = new (owner->renderArena()) RenderQuote(owner->document(), static_cast<const QuoteContentData*>(content)->quote());
- renderer->setStyle(pseudoElementStyle);
- break;
- }
- return renderer;
-}
-
static RenderObject* ensureBeforeAfterContainer(RenderObject* owner, PseudoId type, RenderStyle* pseudoElementStyle, Node* generatingNode, RenderObject* insertBefore)
{
// Make a generated box that might be any display type now that we are able to drill down into children
@@ -465,21 +426,19 @@ void RenderObjectChildList::updateBeforeAfterContent(RenderObject* owner, Pseudo
else {
// Walk our list of generated content and create render objects for each.
for (const ContentData* content = pseudoElementStyle->contentData(); content; content = content->next()) {
- RenderObject* renderer = createRendererForBeforeAfterContent(owner, content, pseudoElementStyle);
+ RenderObject* renderer = content->createRenderer(owner->document(), pseudoElementStyle);
- if (renderer) {
+ if (!generatedContentContainer) {
+ generatedContentContainer = ensureBeforeAfterContainer(owner, type, pseudoElementStyle, styledObject->node(), insertBefore);
if (!generatedContentContainer) {
- generatedContentContainer = ensureBeforeAfterContainer(owner, type, pseudoElementStyle, styledObject->node(), insertBefore);
- if (!generatedContentContainer) {
- renderer->destroy();
- return;
- }
- }
- if (generatedContentContainer->isChildAllowed(renderer, pseudoElementStyle))
- generatedContentContainer->addChild(renderer);
- else
renderer->destroy();
+ return;
+ }
}
+ if (generatedContentContainer->isChildAllowed(renderer, pseudoElementStyle))
+ generatedContentContainer->addChild(renderer);
+ else
+ renderer->destroy();
}
}
diff --git a/Source/WebCore/rendering/RenderTableCell.cpp b/Source/WebCore/rendering/RenderTableCell.cpp
index 55ac553dd..b3a0457ea 100644
--- a/Source/WebCore/rendering/RenderTableCell.cpp
+++ b/Source/WebCore/rendering/RenderTableCell.cpp
@@ -500,26 +500,49 @@ CollapsedBorderValue RenderTableCell::computeCollapsedStartBorder(IncludeBorderC
// (5) Our column and column group's start borders.
bool startColEdge;
bool endColEdge;
- RenderTableCol* colElt = table->colElement(col(), &startColEdge, &endColEdge);
- if (colElt && startColEdge) {
- result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellStartBorder(this), includeColor ? colElt->style()->visitedDependentColor(startColorProperty) : Color(), BCOL));
- if (!result.exists())
- return result;
- if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroupIfAdjacentBefore()) {
- result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellStartBorder(this), includeColor ? enclosingColumnGroup->style()->visitedDependentColor(startColorProperty) : Color(), BCOLGROUP));
+ if (RenderTableCol* colElt = table->colElement(col(), &startColEdge, &endColEdge)) {
+ if (colElt->isTableColumnGroup() && startColEdge) {
+ // The |colElt| is a column group and is also the first colgroup (in case of spanned colgroups).
+ result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellStartBorder(this), includeColor ? colElt->style()->visitedDependentColor(startColorProperty) : Color(), BCOLGROUP));
+ if (!result.exists())
+ return result;
+ } else if (!colElt->isTableColumnGroup()) {
+ // We first consider the |colElt| and irrespective of whether it is a spanned col or not, we apply
+ // its start border. This is as per HTML5 which states that: "For the purposes of the CSS table model,
+ // the col element is expected to be treated as if it was present as many times as its span attribute specifies".
+ result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellStartBorder(this), includeColor ? colElt->style()->visitedDependentColor(startColorProperty) : Color(), BCOL));
if (!result.exists())
return result;
+ // Next, apply the start border of the enclosing colgroup but only if it is adjacent to the cell's edge.
+ if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroupIfAdjacentBefore()) {
+ result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellStartBorder(this), includeColor ? enclosingColumnGroup->style()->visitedDependentColor(startColorProperty) : Color(), BCOLGROUP));
+ if (!result.exists())
+ return result;
+ }
}
}
// (6) The end border of the preceding column.
if (cellBefore) {
- colElt = table->colElement(col() -1, &startColEdge, &endColEdge);
- if (colElt && endColEdge) {
- CollapsedBorderValue columnBeforeAdjoiningBorder = CollapsedBorderValue(colElt->borderAdjoiningCellAfter(this), includeColor ? colElt->style()->visitedDependentColor(endColorProperty) : Color(), BCOL);
- result = chooseBorder(columnBeforeAdjoiningBorder, result);
- if (!result.exists())
- return result;
+ if (RenderTableCol* colElt = table->colElement(col() - 1, &startColEdge, &endColEdge)) {
+ if (colElt->isTableColumnGroup() && endColEdge) {
+ // The element is a colgroup and is also the last colgroup (in case of spanned colgroups).
+ result = chooseBorder(CollapsedBorderValue(colElt->borderAdjoiningCellAfter(this), includeColor ? colElt->style()->visitedDependentColor(endColorProperty) : Color(), BCOLGROUP), result);
+ if (!result.exists())
+ return result;
+ } else if (colElt->isTableColumn()) {
+ // Resolve the collapsing border against the col's border ignoring any 'span' as per HTML5.
+ result = chooseBorder(CollapsedBorderValue(colElt->borderAdjoiningCellAfter(this), includeColor ? colElt->style()->visitedDependentColor(endColorProperty) : Color(), BCOL), result);
+ if (!result.exists())
+ return result;
+ // Next, if the previous col has a parent colgroup then its end border should be applied
+ // but only if it is adjacent to the cell's edge.
+ if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroupIfAdjacentAfter()) {
+ result = chooseBorder(CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellEndBorder(this), includeColor ? enclosingColumnGroup->style()->visitedDependentColor(endColorProperty) : Color(), BCOLGROUP), result);
+ if (!result.exists())
+ return result;
+ }
+ }
}
} else {
// (7) The table's start border.
@@ -575,26 +598,48 @@ CollapsedBorderValue RenderTableCell::computeCollapsedEndBorder(IncludeBorderCol
// (5) Our column and column group's end borders.
bool startColEdge;
bool endColEdge;
- RenderTableCol* colElt = table->colElement(col() + colSpan() - 1, &startColEdge, &endColEdge);
- if (colElt && endColEdge) {
- result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellEndBorder(this), includeColor ? colElt->style()->visitedDependentColor(endColorProperty) : Color(), BCOL));
- if (!result.exists())
- return result;
- if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroupIfAdjacentAfter()) {
- result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellEndBorder(this), includeColor ? enclosingColumnGroup->style()->visitedDependentColor(endColorProperty) : Color(), BCOLGROUP));
+ if (RenderTableCol* colElt = table->colElement(col() + colSpan() - 1, &startColEdge, &endColEdge)) {
+ if (colElt->isTableColumnGroup() && endColEdge) {
+ // The element is a colgroup and is also the last colgroup (in case of spanned colgroups).
+ result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellEndBorder(this), includeColor ? colElt->style()->visitedDependentColor(endColorProperty) : Color(), BCOLGROUP));
+ if (!result.exists())
+ return result;
+ } else if (!colElt->isTableColumnGroup()) {
+ // First apply the end border of the column irrespective of whether it is spanned or not. This is as per
+ // HTML5 which states that: "For the purposes of the CSS table model, the col element is expected to be
+ // treated as if it was present as many times as its span attribute specifies".
+ result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellEndBorder(this), includeColor ? colElt->style()->visitedDependentColor(endColorProperty) : Color(), BCOL));
if (!result.exists())
return result;
+ // Next, if it has a parent colgroup then we apply its end border but only if it is adjacent to the cell.
+ if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroupIfAdjacentAfter()) {
+ result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellEndBorder(this), includeColor ? enclosingColumnGroup->style()->visitedDependentColor(endColorProperty) : Color(), BCOLGROUP));
+ if (!result.exists())
+ return result;
+ }
}
}
// (6) The start border of the next column.
if (!isEndColumn) {
- colElt = table->colElement(col() + colSpan(), &startColEdge, &endColEdge);
- if (colElt && startColEdge) {
- CollapsedBorderValue columnAfterAdjoiningBorder = CollapsedBorderValue(colElt->borderAdjoiningCellBefore(this), includeColor ? colElt->style()->visitedDependentColor(startColorProperty) : Color(), BCOL);
- result = chooseBorder(result, columnAfterAdjoiningBorder);
- if (!result.exists())
- return result;
+ if (RenderTableCol* colElt = table->colElement(col() + colSpan(), &startColEdge, &endColEdge)) {
+ if (colElt->isTableColumnGroup() && startColEdge) {
+ // This case is a colgroup without any col, we only compute it if it is adjacent to the cell's edge.
+ result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellBefore(this), includeColor ? colElt->style()->visitedDependentColor(startColorProperty) : Color(), BCOLGROUP));
+ if (!result.exists())
+ return result;
+ } else if (colElt->isTableColumn()) {
+ // Resolve the collapsing border against the col's border ignoring any 'span' as per HTML5.
+ result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellBefore(this), includeColor ? colElt->style()->visitedDependentColor(startColorProperty) : Color(), BCOL));
+ if (!result.exists())
+ return result;
+ // If we have a parent colgroup, resolve the border only if it is adjacent to the cell.
+ if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroupIfAdjacentBefore()) {
+ result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellStartBorder(this), includeColor ? enclosingColumnGroup->style()->visitedDependentColor(startColorProperty) : Color(), BCOLGROUP));
+ if (!result.exists())
+ return result;
+ }
+ }
}
} else {
// (7) The table's end border.
diff --git a/Source/WebCore/rendering/style/ContentData.cpp b/Source/WebCore/rendering/style/ContentData.cpp
index 7f87a0c2b..9cac254ce 100644
--- a/Source/WebCore/rendering/style/ContentData.cpp
+++ b/Source/WebCore/rendering/style/ContentData.cpp
@@ -22,6 +22,15 @@
#include "config.h"
#include "ContentData.h"
+#include "RenderCounter.h"
+#include "RenderImage.h"
+#include "RenderImageResource.h"
+#include "RenderImageResourceStyleImage.h"
+#include "RenderQuote.h"
+#include "RenderStyle.h"
+#include "RenderTextFragment.h"
+#include "StyleInheritedData.h"
+
namespace WebCore {
PassOwnPtr<ContentData> ContentData::create(PassRefPtr<StyleImage> image)
@@ -58,4 +67,41 @@ PassOwnPtr<ContentData> ContentData::clone() const
return result.release();
}
+RenderObject* ImageContentData::createRenderer(Document* doc, RenderStyle* pseudoStyle) const
+{
+ RenderImage* image = new (doc->renderArena()) RenderImage(doc);
+ // Images are special and must inherit the pseudoStyle so the width and height of
+ // the pseudo element don't change the size of the image. In all other cases we
+ // can just share the style.
+ RefPtr<RenderStyle> style = RenderStyle::create();
+ style->inheritFrom(pseudoStyle);
+ image->setStyle(style.release());
+ if (m_image)
+ image->setImageResource(RenderImageResourceStyleImage::create(m_image.get()));
+ else
+ image->setImageResource(RenderImageResource::create());
+ return image;
+}
+
+RenderObject* TextContentData::createRenderer(Document* doc, RenderStyle* pseudoStyle) const
+{
+ RenderObject* renderer = new (doc->renderArena()) RenderTextFragment(doc, m_text.impl());
+ renderer->setStyle(pseudoStyle);
+ return renderer;
+}
+
+RenderObject* CounterContentData::createRenderer(Document* doc, RenderStyle* pseudoStyle) const
+{
+ RenderObject* renderer = new (doc->renderArena()) RenderCounter(doc, *m_counter);
+ renderer->setStyle(pseudoStyle);
+ return renderer;
+}
+
+RenderObject* QuoteContentData::createRenderer(Document* doc, RenderStyle* pseudoStyle) const
+{
+ RenderObject* renderer = new (doc->renderArena()) RenderQuote(doc, m_quote);
+ renderer->setStyle(pseudoStyle);
+ return renderer;
+}
+
} // namespace WebCore
diff --git a/Source/WebCore/rendering/style/ContentData.h b/Source/WebCore/rendering/style/ContentData.h
index 88718d84f..3346a6516 100644
--- a/Source/WebCore/rendering/style/ContentData.h
+++ b/Source/WebCore/rendering/style/ContentData.h
@@ -32,7 +32,9 @@
namespace WebCore {
-class StyleImage;
+class Document;
+class RenderObject;
+class RenderStyle;
class ContentData {
WTF_MAKE_FAST_ALLOCATED;
@@ -49,7 +51,8 @@ public:
virtual bool isQuote() const { return false; }
virtual bool isText() const { return false; }
- virtual StyleContentType type() const = 0;
+ virtual RenderObject* createRenderer(Document*, RenderStyle*) const = 0;
+
virtual PassOwnPtr<ContentData> clone() const;
ContentData* next() const { return m_next.get(); }
@@ -70,6 +73,9 @@ public:
StyleImage* image() { return m_image.get(); }
void setImage(PassRefPtr<StyleImage> image) { m_image = image; }
+ virtual bool isImage() const OVERRIDE { return true; }
+ virtual RenderObject* createRenderer(Document*, RenderStyle*) const OVERRIDE;
+
virtual bool equals(const ContentData& data) const OVERRIDE
{
if (!data.isImage())
@@ -83,8 +89,6 @@ private:
{
}
- virtual StyleContentType type() const { return CONTENT_OBJECT; }
- virtual bool isImage() const { return true; }
virtual PassOwnPtr<ContentData> cloneInternal() const
{
RefPtr<StyleImage> image = const_cast<StyleImage*>(this->image());
@@ -100,6 +104,9 @@ public:
const String& text() const { return m_text; }
void setText(const String& text) { m_text = text; }
+ virtual bool isText() const OVERRIDE { return true; }
+ virtual RenderObject* createRenderer(Document*, RenderStyle*) const OVERRIDE;
+
virtual bool equals(const ContentData& data) const OVERRIDE
{
if (!data.isText())
@@ -113,8 +120,6 @@ private:
{
}
- virtual StyleContentType type() const { return CONTENT_TEXT; }
- virtual bool isText() const { return true; }
virtual PassOwnPtr<ContentData> cloneInternal() const { return create(text()); }
String m_text;
@@ -126,14 +131,15 @@ public:
const CounterContent* counter() const { return m_counter.get(); }
void setCounter(PassOwnPtr<CounterContent> counter) { m_counter = counter; }
+ virtual bool isCounter() const OVERRIDE { return true; }
+ virtual RenderObject* createRenderer(Document*, RenderStyle*) const OVERRIDE;
+
private:
CounterContentData(PassOwnPtr<CounterContent> counter)
: m_counter(counter)
{
}
- virtual StyleContentType type() const { return CONTENT_COUNTER; }
- virtual bool isCounter() const { return true; }
virtual PassOwnPtr<ContentData> cloneInternal() const
{
OwnPtr<CounterContent> counterData = adoptPtr(new CounterContent(*counter()));
@@ -156,6 +162,9 @@ public:
QuoteType quote() const { return m_quote; }
void setQuote(QuoteType quote) { m_quote = quote; }
+ virtual bool isQuote() const OVERRIDE { return true; }
+ virtual RenderObject* createRenderer(Document*, RenderStyle*) const OVERRIDE;
+
virtual bool equals(const ContentData& data) const OVERRIDE
{
if (!data.isQuote())
@@ -169,8 +178,6 @@ private:
{
}
- virtual StyleContentType type() const { return CONTENT_QUOTE; }
- virtual bool isQuote() const { return true; }
virtual PassOwnPtr<ContentData> cloneInternal() const { return create(quote()); }
QuoteType m_quote;
diff --git a/Source/WebCore/rendering/style/RenderStyleConstants.h b/Source/WebCore/rendering/style/RenderStyleConstants.h
index f5a25d32a..a6702253c 100644
--- a/Source/WebCore/rendering/style/RenderStyleConstants.h
+++ b/Source/WebCore/rendering/style/RenderStyleConstants.h
@@ -303,10 +303,6 @@ enum EListStyleType {
NoneListStyle
};
-enum StyleContentType {
- CONTENT_NONE, CONTENT_OBJECT, CONTENT_TEXT, CONTENT_COUNTER, CONTENT_QUOTE
-};
-
enum QuoteType {
OPEN_QUOTE, CLOSE_QUOTE, NO_OPEN_QUOTE, NO_CLOSE_QUOTE
};
diff --git a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp b/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
index 462e394a0..9ddd890dc 100644
--- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
+++ b/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
@@ -256,13 +256,15 @@ bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c
bool StyleRareNonInheritedData::contentDataEquivalent(const StyleRareNonInheritedData& o) const
{
- if (m_content.get() == o.m_content.get())
- return true;
-
- if (m_content && o.m_content && *m_content == *o.m_content)
- return true;
+ ContentData* a = m_content.get();
+ ContentData* b = o.m_content.get();
- return false;
+ while (a && b && *a == *b) {
+ a = a->next();
+ b = b->next();
+ }
+
+ return !a && !b;
}
bool StyleRareNonInheritedData::counterDataEquivalent(const StyleRareNonInheritedData& o) const
diff --git a/Source/WebCore/svg/SVGAnimatedTypeAnimator.h b/Source/WebCore/svg/SVGAnimatedTypeAnimator.h
index aaa03c3b8..f3f0bc06e 100644
--- a/Source/WebCore/svg/SVGAnimatedTypeAnimator.h
+++ b/Source/WebCore/svg/SVGAnimatedTypeAnimator.h
@@ -150,7 +150,10 @@ protected:
ASSERT(animatedTypes[0].properties.size() == 1);
ASSERT(type);
ASSERT(type->type() == m_type);
- (type->*getter)() = castAnimatedPropertyToActualType<AnimValType>(animatedTypes[0].properties[0].get())->currentBaseValue();
+ typename AnimValType::ContentType& animatedTypeValue = (type->*getter)();
+ animatedTypeValue = castAnimatedPropertyToActualType<AnimValType>(animatedTypes[0].properties[0].get())->currentBaseValue();
+
+ executeAction<AnimValType>(StartAnimationAction, animatedTypes, 0, &animatedTypeValue);
}
template<typename AnimValType>
@@ -198,6 +201,9 @@ protected:
pair<typename AnimValType1::ContentType, typename AnimValType2::ContentType>& animatedTypeValue = (type->*getter)();
animatedTypeValue.first = castAnimatedPropertyToActualType<AnimValType1>(animatedTypes[0].properties[0].get())->currentBaseValue();
animatedTypeValue.second = castAnimatedPropertyToActualType<AnimValType2>(animatedTypes[0].properties[1].get())->currentBaseValue();
+
+ executeAction<AnimValType1>(StartAnimationAction, animatedTypes, 0, &animatedTypeValue.first);
+ executeAction<AnimValType2>(StartAnimationAction, animatedTypes, 1, &animatedTypeValue.second);
}
template<typename AnimValType1, typename AnimValType2>
@@ -262,7 +268,8 @@ private:
switch (action) {
case StartAnimationAction:
ASSERT(type);
- property->animationStarted(type);
+ if (!property->isAnimating())
+ property->animationStarted(type);
break;
case StopAnimationAction:
ASSERT(!type);
diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp
index a430fc5a3..c26d6ea4f 100644
--- a/Source/WebCore/testing/Internals.cpp
+++ b/Source/WebCore/testing/Internals.cpp
@@ -297,16 +297,6 @@ Node* Internals::parentTreeScope(Node* node, ExceptionCode& ec)
return parentTreeScope ? parentTreeScope->rootNode() : 0;
}
-PassRefPtr<NodeList> Internals::distributedNodes(Element* insertionPoint, ExceptionCode& ec)
-{
- if (!insertionPoint || !isInsertionPoint(insertionPoint)) {
- ec = INVALID_ACCESS_ERR;
- return 0;
- }
-
- return toInsertionPoint(insertionPoint)->distributedNodes();
-}
-
bool Internals::hasShadowInsertionPoint(const Node* root, ExceptionCode& ec) const
{
if (root && root->isShadowRoot())
diff --git a/Source/WebCore/testing/Internals.h b/Source/WebCore/testing/Internals.h
index e4ab96d66..bbc5c5b7b 100644
--- a/Source/WebCore/testing/Internals.h
+++ b/Source/WebCore/testing/Internals.h
@@ -90,7 +90,6 @@ public:
bool isValidContentSelect(Element* insertionPoint, ExceptionCode&);
Node* treeScopeRootNode(Node*, ExceptionCode&);
Node* parentTreeScope(Node*, ExceptionCode&);
- PassRefPtr<NodeList> distributedNodes(Element* insertionPoint, ExceptionCode&);
bool attached(Node*, ExceptionCode&);
diff --git a/Source/WebCore/testing/Internals.idl b/Source/WebCore/testing/Internals.idl
index 3e2d47468..77ba66010 100644
--- a/Source/WebCore/testing/Internals.idl
+++ b/Source/WebCore/testing/Internals.idl
@@ -56,7 +56,6 @@
boolean isValidContentSelect(in Element contentElement) raises(DOMException);
Node treeScopeRootNode(in Node node) raises (DOMException);
Node parentTreeScope(in Node node) raises (DOMException);
- NodeList distributedNodes(in Element insertionPoint) raises(DOMException);
Node nextSiblingByWalker(in Node node) raises(DOMException);
Node firstChildByWalker(in Node node) raises(DOMException);
diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog
index 576c4924f..39ba4a759 100644
--- a/Source/WebKit/ChangeLog
+++ b/Source/WebKit/ChangeLog
@@ -1,3 +1,14 @@
+2012-10-18 Kangil Han <kangil.han@samsung.com>
+
+ [EFL] Add unit test for ewk_frame_source_get.
+ https://bugs.webkit.org/show_bug.cgi?id=95984
+
+ Reviewed by Gyuyoung Kim.
+
+ Add test_ewk_frame.cpp for unit test.
+
+ * PlatformEfl.cmake:
+
2012-10-15 David Kilzer <ddkilzer@apple.com>
Move framework and library linking into WebKit.xcconfig
diff --git a/Source/WebKit/PlatformEfl.cmake b/Source/WebKit/PlatformEfl.cmake
index 17b243943..baef3800b 100644
--- a/Source/WebKit/PlatformEfl.cmake
+++ b/Source/WebKit/PlatformEfl.cmake
@@ -242,6 +242,7 @@ TARGET_LINK_LIBRARIES(ewkTestUtils ${EWKUnitTests_LIBRARIES})
SET(WEBKIT_EFL_TEST_DIR "${WEBKIT_DIR}/efl/tests/")
SET(EWKUnitTests_BINARIES
+ test_ewk_frame
test_ewk_view
)
diff --git a/Source/WebKit/blackberry/ChangeLog b/Source/WebKit/blackberry/ChangeLog
index eaa2b3b50..e4cb6eb99 100644
--- a/Source/WebKit/blackberry/ChangeLog
+++ b/Source/WebKit/blackberry/ChangeLog
@@ -1,3 +1,19 @@
+2012-10-17 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] Prevent focus zoom on non-userscalable pages.
+ https://bugs.webkit.org/show_bug.cgi?id=99608
+
+ Reviewed by Rob Buis.
+
+ PR 222378.
+
+ Disable focus zoom when the page is non-user scalable.
+
+ Reviewed Internally by Nima Ghanavatian.
+
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
+
2012-10-16 Mike Lattanzio <mlattanzio@rim.com>
2012-10-16 Mike Lattanzio <mlattanzio@rim.com>
diff --git a/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp b/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
index 6b8fd5f63..e2ea590a9 100644
--- a/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
@@ -1079,7 +1079,7 @@ void InputHandler::ensureFocusTextElementVisible(CaretScrollType scrollType)
// The minimum size being defined as 3 mm is a good value based on my observations.
static const int s_minimumTextHeightInPixels = Graphics::Screen::primaryScreen()->heightInMMToPixels(3);
- if (fontHeight && fontHeight * m_webPage->currentScale() < s_minimumTextHeightInPixels && !isRunningDrt()) {
+ if (m_webPage->isUserScalable() && fontHeight && fontHeight * m_webPage->currentScale() < s_minimumTextHeightInPixels && !isRunningDrt()) {
if (!m_focusZoomScale) {
m_focusZoomScale = m_webPage->currentScale();
m_focusZoomLocation = selectionFocusRect.location();
diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog
index 4b059aa68..1be153b8e 100644
--- a/Source/WebKit/chromium/ChangeLog
+++ b/Source/WebKit/chromium/ChangeLog
@@ -1,3 +1,96 @@
+2012-10-17 Mike West <mkwst@chromium.org>
+
+ Move mixed content logic out of FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=45638
+
+ Reviewed by Eric Seidel.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::checkIfRunInsecureContent):
+ Use the new method location.
+
+2012-10-17 Shashi Shekhar <shashishekhar@google.com>
+
+ Remove redundant sdk_build parameter.
+ https://bugs.webkit.org/show_bug.cgi?id=99648
+
+ Reviewed by Adam Barth.
+
+ sdk_build parameter is no longer needed.
+
+ * WebKitUnitTests.gyp:
+
+2012-10-17 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed. Rolled DEPS.
+
+ * DEPS:
+
+2012-10-17 Alec Flett <alecflett@chromium.org>
+
+ IndexedDB: Explicitly send null/undefined/integers to frontend IDBCallbacks
+ https://bugs.webkit.org/show_bug.cgi?id=99619
+
+ Reviewed by Adam Barth.
+
+ Hook up new undefined/integer-based onSuccess handlers.
+
+ * src/IDBCallbacksProxy.cpp:
+ (WebKit::IDBCallbacksProxy::onSuccess):
+ (WebKit):
+ * src/IDBCallbacksProxy.h:
+ (IDBCallbacksProxy):
+ * src/WebIDBCallbacksImpl.cpp:
+ (WebKit::WebIDBCallbacksImpl::onSuccess):
+ (WebKit):
+ * src/WebIDBCallbacksImpl.h:
+ (WebIDBCallbacksImpl):
+ * tests/IDBAbortOnCorruptTest.cpp:
+ * tests/IDBDatabaseBackendTest.cpp:
+
+2012-10-17 Sadrul Habib Chowdhury <sadrul@chromium.org>
+
+ plugins: Allow a plugin to dictate whether it can receive drag events or not.
+ https://bugs.webkit.org/show_bug.cgi?id=99355
+
+ Reviewed by Tony Chang.
+
+ Introduce WebPlugin::canProcessDrag() and use that to implement PluginViewBase::canProcessDrag.
+
+ * public/WebPlugin.h:
+ (WebKit::WebPlugin::canProcessDrag):
+ (WebPlugin):
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::canProcessDrag):
+ (WebKit):
+ (WebKit::WebPluginContainerImpl::handleMouseEvent):
+ * src/WebPluginContainerImpl.h:
+ (WebPluginContainerImpl):
+
+2012-10-17 Jian Li <jianli@chromium.org>
+
+ [chromium] Remove legacy members from WebDraggableRegion
+ https://bugs.webkit.org/show_bug.cgi?id=99612
+
+ Reviewed by Adam Barth.
+
+ Those legacy members to support old syntax are not longer needed after
+ chromium side changes landed.
+
+ * public/WebDraggableRegion.h:
+ (WebDraggableRegion):
+
+2012-10-17 Joshua Bell <jsbell@chromium.org>
+
+ [Chromium] IndexedDB: Delete obsolete public API method
+ https://bugs.webkit.org/show_bug.cgi?id=99603
+
+ Reviewed by Dimitri Glazkov.
+
+ Remove a stub that was necessary while the Chromium side of webkit.org/b/99097 was landing.
+
+ * public/WebIDBTransactionCallbacks.h:
+
2012-10-17 Keishi Hattori <keishi@webkit.org>
Localized date should be based on LDML
diff --git a/Source/WebKit/chromium/DEPS b/Source/WebKit/chromium/DEPS
index 3da6c012c..1fdffb9ca 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': '162220'
+ 'chromium_rev': '162322'
}
deps = {
diff --git a/Source/WebKit/chromium/WebKitUnitTests.gyp b/Source/WebKit/chromium/WebKitUnitTests.gyp
index 00631256a..5dcfcd2b4 100644
--- a/Source/WebKit/chromium/WebKitUnitTests.gyp
+++ b/Source/WebKit/chromium/WebKitUnitTests.gyp
@@ -201,7 +201,6 @@
'-DPRODUCT_DIR=<(ant_build_out)',
'--ant-args',
'-DCHROMIUM_SRC=<(ant_build_to_chromium_src)',
- '--sdk-build=<(sdk_build)',
'--app_abi',
'<(android_app_abi)',
],
diff --git a/Source/WebKit/chromium/public/WebDraggableRegion.h b/Source/WebKit/chromium/public/WebDraggableRegion.h
index 56006f6a5..591b0f63b 100644
--- a/Source/WebKit/chromium/public/WebDraggableRegion.h
+++ b/Source/WebKit/chromium/public/WebDraggableRegion.h
@@ -40,9 +40,6 @@ namespace WebKit {
struct WebDraggableRegion {
bool draggable;
WebRect bounds;
- // FIXME: to be removed after chromium change is done.
- WebString label;
- WebRect clip;
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/public/WebIDBTransactionCallbacks.h b/Source/WebKit/chromium/public/WebIDBTransactionCallbacks.h
index 497d5e8db..ef3a6a08b 100644
--- a/Source/WebKit/chromium/public/WebIDBTransactionCallbacks.h
+++ b/Source/WebKit/chromium/public/WebIDBTransactionCallbacks.h
@@ -36,8 +36,6 @@ class WebIDBTransactionCallbacks {
public:
virtual ~WebIDBTransactionCallbacks() { }
- // FIXME: Remove after callers are updated following WK99097.
- virtual void onAbort() { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void onAbort(const WebIDBDatabaseError&) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void onComplete() { WEBKIT_ASSERT_NOT_REACHED(); }
};
diff --git a/Source/WebKit/chromium/public/WebPlugin.h b/Source/WebKit/chromium/public/WebPlugin.h
index c72fff325..c6a0a5997 100644
--- a/Source/WebKit/chromium/public/WebPlugin.h
+++ b/Source/WebKit/chromium/public/WebPlugin.h
@@ -70,6 +70,8 @@ public:
virtual bool getFormValue(WebString&) { return false; }
virtual bool supportsKeyboardFocus() const { return false; }
+ virtual bool canProcessDrag() const { return false; }
+
virtual void paint(WebCanvas*, const WebRect&) = 0;
// Coordinates are relative to the containing window.
diff --git a/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp b/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp
index af4984a77..42ac76ba5 100644
--- a/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp
@@ -106,6 +106,16 @@ void IDBCallbacksProxy::onSuccess(PassRefPtr<SerializedScriptValue> serializedSc
m_callbacks->onSuccess(serializedScriptValue, key, keyPath);
}
+void IDBCallbacksProxy::onSuccess(int64_t value)
+{
+ m_callbacks->onSuccess(value);
+}
+
+void IDBCallbacksProxy::onSuccess()
+{
+ m_callbacks->onSuccess();
+}
+
void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBKey> key, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SerializedScriptValue> value)
{
m_callbacks->onSuccess(key, primaryKey, value);
diff --git a/Source/WebKit/chromium/src/IDBCallbacksProxy.h b/Source/WebKit/chromium/src/IDBCallbacksProxy.h
index f613a85c2..c940698f7 100644
--- a/Source/WebKit/chromium/src/IDBCallbacksProxy.h
+++ b/Source/WebKit/chromium/src/IDBCallbacksProxy.h
@@ -54,6 +54,8 @@ public:
virtual void onSuccess(PassRefPtr<WebCore::IDBTransactionBackendInterface>);
virtual void onSuccess(PassRefPtr<WebCore::SerializedScriptValue>);
virtual void onSuccess(PassRefPtr<WebCore::SerializedScriptValue>, PassRefPtr<WebCore::IDBKey>, const WebCore::IDBKeyPath&);
+ virtual void onSuccess(int64_t);
+ virtual void onSuccess();
virtual void onSuccess(PassRefPtr<WebCore::IDBKey>, PassRefPtr<WebCore::IDBKey> primaryKey, PassRefPtr<WebCore::SerializedScriptValue>);
virtual void onSuccessWithPrefetch(const Vector<RefPtr<WebCore::IDBKey> >& keys, const Vector<RefPtr<WebCore::IDBKey> >& primaryKeys, const Vector<RefPtr<WebCore::SerializedScriptValue> >& values);
virtual void onBlocked();
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.cpp b/Source/WebKit/chromium/src/WebFrameImpl.cpp
index ec687147b..ff4a0b44c 100644
--- a/Source/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFrameImpl.cpp
@@ -866,7 +866,7 @@ void WebFrameImpl::collectGarbage()
bool WebFrameImpl::checkIfRunInsecureContent(const WebURL& url) const
{
ASSERT(frame());
- return frame()->loader()->checkIfRunInsecureContent(frame()->document()->securityOrigin(), url);
+ return frame()->loader()->mixedContentChecker()->canRunInsecureContent(frame()->document()->securityOrigin(), url);
}
v8::Handle<v8::Value> WebFrameImpl::executeScriptAndReturnValue(const WebScriptSource& source)
diff --git a/Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp b/Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
index 2cb90ea46..e09c1a3fe 100644
--- a/Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
@@ -100,6 +100,16 @@ void WebIDBCallbacksImpl::onSuccess(const WebSerializedScriptValue& serializedSc
m_callbacks->onSuccess(serializedScriptValue, key, keyPath);
}
+void WebIDBCallbacksImpl::onSuccess(long long value)
+{
+ m_callbacks->onSuccess(value);
+}
+
+void WebIDBCallbacksImpl::onSuccess()
+{
+ m_callbacks->onSuccess();
+}
+
void WebIDBCallbacksImpl::onSuccess(const WebIDBKey& key, const WebIDBKey& primaryKey, const WebSerializedScriptValue& value)
{
m_callbacks->onSuccess(key, primaryKey, value);
diff --git a/Source/WebKit/chromium/src/WebIDBCallbacksImpl.h b/Source/WebKit/chromium/src/WebIDBCallbacksImpl.h
index 33cd2029f..ba4448428 100644
--- a/Source/WebKit/chromium/src/WebIDBCallbacksImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBCallbacksImpl.h
@@ -50,6 +50,8 @@ public:
virtual void onSuccess(const WebSerializedScriptValue&);
virtual void onSuccess(const WebSerializedScriptValue&, const WebIDBKey&, const WebIDBKeyPath&);
virtual void onSuccess(const WebIDBKey&, const WebIDBKey& primaryKey, const WebSerializedScriptValue&);
+ virtual void onSuccess(long long);
+ virtual void onSuccess();
virtual void onBlocked();
virtual void onBlocked(long long oldVersion);
virtual void onUpgradeNeeded(long long oldVersion, WebIDBTransaction*, WebIDBDatabase*);
diff --git a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
index af23011ff..87a660156 100644
--- a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
@@ -577,6 +577,11 @@ bool WebPluginContainerImpl::supportsKeyboardFocus() const
return m_webPlugin->supportsKeyboardFocus();
}
+bool WebPluginContainerImpl::canProcessDrag() const
+{
+ return m_webPlugin->canProcessDrag();
+}
+
void WebPluginContainerImpl::willDestroyPluginLoadObserver(WebPluginLoadObserver* observer)
{
size_t pos = m_pluginLoadObservers.find(observer);
@@ -661,7 +666,8 @@ void WebPluginContainerImpl::handleMouseEvent(MouseEvent* event)
ASSERT(parent()->isFrameView());
if (event->isDragEvent()) {
- handleDragEvent(event);
+ if (m_webPlugin->canProcessDrag())
+ handleDragEvent(event);
return;
}
diff --git a/Source/WebKit/chromium/src/WebPluginContainerImpl.h b/Source/WebKit/chromium/src/WebPluginContainerImpl.h
index e89af0987..89f2971b7 100644
--- a/Source/WebKit/chromium/src/WebPluginContainerImpl.h
+++ b/Source/WebKit/chromium/src/WebPluginContainerImpl.h
@@ -78,6 +78,7 @@ public:
// PluginViewBase methods
virtual bool getFormValue(String&);
virtual bool supportsKeyboardFocus() const;
+ virtual bool canProcessDrag() const;
// Widget methods
virtual void setFrameRect(const WebCore::IntRect&);
diff --git a/Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp b/Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp
index b080bfc4d..cd2a07649 100644
--- a/Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp
+++ b/Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp
@@ -61,6 +61,8 @@ public:
virtual void onSuccess(PassRefPtr<IDBTransactionBackendInterface>) { }
virtual void onSuccess(PassRefPtr<SerializedScriptValue>) { }
virtual void onSuccess(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, const IDBKeyPath&) { }
+ virtual void onSuccess(int64_t) OVERRIDE { }
+ virtual void onSuccess() OVERRIDE { }
virtual void onSuccess(PassRefPtr<IDBKey>, PassRefPtr<IDBKey>, PassRefPtr<SerializedScriptValue>) { };
virtual void onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<SerializedScriptValue> >&) { }
virtual void onBlocked() { }
diff --git a/Source/WebKit/chromium/tests/IDBDatabaseBackendTest.cpp b/Source/WebKit/chromium/tests/IDBDatabaseBackendTest.cpp
index 2cf2a1f88..cee089c85 100644
--- a/Source/WebKit/chromium/tests/IDBDatabaseBackendTest.cpp
+++ b/Source/WebKit/chromium/tests/IDBDatabaseBackendTest.cpp
@@ -91,6 +91,8 @@ public:
virtual void onSuccess(PassRefPtr<IDBTransactionBackendInterface>) OVERRIDE { }
virtual void onSuccess(PassRefPtr<SerializedScriptValue>) OVERRIDE { }
virtual void onSuccess(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, const IDBKeyPath&) OVERRIDE { };
+ virtual void onSuccess(int64_t) OVERRIDE { }
+ virtual void onSuccess() OVERRIDE { }
virtual void onSuccess(PassRefPtr<IDBKey>, PassRefPtr<IDBKey>, PassRefPtr<SerializedScriptValue>) OVERRIDE { };
virtual void onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<SerializedScriptValue> >&) OVERRIDE { }
virtual void onBlocked() OVERRIDE { }
diff --git a/Source/WebKit/efl/ChangeLog b/Source/WebKit/efl/ChangeLog
index f8d710e25..c8704bc4e 100644
--- a/Source/WebKit/efl/ChangeLog
+++ b/Source/WebKit/efl/ChangeLog
@@ -1,3 +1,33 @@
+2012-10-18 Kangil Han <kangil.han@samsung.com>
+
+ [EFL] Add unit test for ewk_frame_source_get.
+ https://bugs.webkit.org/show_bug.cgi?id=95984
+
+ Reviewed by Gyuyoung Kim.
+
+ Add three unit test cases to verify ewk_frame_source_get function.
+ Additionally, insert code to check if uri exists in order to return error since view itself has blank html.
+
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_source_get):
+ * tests/test_ewk_frame.cpp: Added.
+ (initBuffer):
+ (TEST_F):
+
+2012-10-17 Byungwoo Lee <bw80.lee@samsung.com>
+
+ Fix build warnings : -Wunused-parameter, -Wunused-variable
+ https://bugs.webkit.org/show_bug.cgi?id=99539
+
+ Reviewed by Kentaro Hara.
+
+ Fix build warnings about unused parameter or unused variable when
+ WTF_USE_TILED_BACKING_STORE option is enabled.
+
+ * WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore::ChromeClientEfl::attachRootGraphicsLayer):
+ (WebCore::ChromeClientEfl::delegatedScrollRequested):
+
2012-10-17 Byungwoo Lee <bw80.lee@samsung.com>
[EFL] Add background color to the checkbox theme.
diff --git a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
index d4b6d7ad0..1f52af33a 100644
--- a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
@@ -591,7 +591,7 @@ PassRefPtr<SearchPopupMenu> ChromeClientEfl::createSearchPopupMenu(PopupMenuClie
}
#if USE(ACCELERATED_COMPOSITING)
-void ChromeClientEfl::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* rootLayer)
+void ChromeClientEfl::attachRootGraphicsLayer(Frame*, GraphicsLayer*)
{
notImplemented();
}
@@ -649,7 +649,7 @@ void ChromeClientEfl::exitFullScreenForElement(WebCore::Element*)
#endif
#if USE(TILED_BACKING_STORE)
-void ChromeClientEfl::delegatedScrollRequested(const IntPoint& point)
+void ChromeClientEfl::delegatedScrollRequested(const IntPoint&)
{
notImplemented();
}
diff --git a/Source/WebKit/efl/ewk/ewk_frame.cpp b/Source/WebKit/efl/ewk/ewk_frame.cpp
index 546eea512..11957e446 100644
--- a/Source/WebKit/efl/ewk/ewk_frame.cpp
+++ b/Source/WebKit/efl/ewk/ewk_frame.cpp
@@ -1641,6 +1641,9 @@ ssize_t ewk_frame_source_get(const Evas_Object* ewkFrame, char** frameSource)
StringBuilder builder;
*frameSource = 0; // Saves 0 to pointer until it's not allocated.
+ if (!ewk_frame_uri_get(ewkFrame))
+ return -1;
+
if (!smartData->frame->document()->isHTMLDocument()) {
// FIXME: Support others documents.
WARN("Only HTML documents are supported");
diff --git a/Source/WebKit/efl/tests/test_ewk_frame.cpp b/Source/WebKit/efl/tests/test_ewk_frame.cpp
new file mode 100644
index 000000000..3fc9dd774
--- /dev/null
+++ b/Source/WebKit/efl/tests/test_ewk_frame.cpp
@@ -0,0 +1,64 @@
+/*
+ * 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. Red istributions 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 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 THE COPYRIGHT
+ * HOLDERS 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 "UnitTestUtils/EWKTestBase.h"
+#include "UnitTestUtils/EWKTestConfig.h"
+#include <EWebKit.h>
+
+using namespace EWKUnitTests;
+
+static void initBuffer(char** buffer)
+{
+ free(*buffer);
+ *buffer = 0;
+}
+
+/**
+ * @brief Unit test for ewk_frame_source_get.
+ */
+TEST_F(EWKTestBase, ewk_frame_source_get)
+{
+ char* buffer = 0;
+ ssize_t failed = -1;
+
+ // Checking if function works properly without loading url.
+ ssize_t read = ewk_frame_source_get(ewk_view_frame_main_get(webView()), &buffer);
+ ASSERT_EQ(read, failed);
+ initBuffer(&buffer);
+
+ // Checking if function works properly when loading non-existing url.
+ loadUrl("http://www.abcdefg^^.com");
+ read = ewk_frame_source_get(ewk_view_frame_main_get(webView()), &buffer);
+ ASSERT_EQ(read, failed);
+ initBuffer(&buffer);
+
+ // Checking if function works properly when finishing load url.
+ loadUrl();
+ read = ewk_frame_source_get(ewk_view_frame_main_get(webView()), &buffer);
+ ASSERT_GT(read, 0);
+ initBuffer(&buffer);
+}
diff --git a/Source/WebKit/mac/ChangeLog b/Source/WebKit/mac/ChangeLog
index 9149d3b06..4e29f0e43 100644
--- a/Source/WebKit/mac/ChangeLog
+++ b/Source/WebKit/mac/ChangeLog
@@ -1,3 +1,15 @@
+2012-10-17 Joseph Pecoraro <pecoraro@apple.com>
+
+ [Mac] Uninitialized Members in WebDataSourcePrivate
+ https://bugs.webkit.org/show_bug.cgi?id=99617
+
+ Reviewed by David Kilzer.
+
+ Initialize BOOL member variables.
+
+ * WebView/WebDataSource.mm:
+ (WebDataSourcePrivate::WebDataSourcePrivate):
+
2012-10-17 Mark Rowe <mrowe@apple.com>
Fix the build with a newer version of clang.
diff --git a/Source/WebKit/mac/WebView/WebDataSource.mm b/Source/WebKit/mac/WebView/WebDataSource.mm
index d92a22ccc..95494e97e 100644
--- a/Source/WebKit/mac/WebView/WebDataSource.mm
+++ b/Source/WebKit/mac/WebView/WebDataSource.mm
@@ -73,6 +73,8 @@ class WebDataSourcePrivate
public:
WebDataSourcePrivate(PassRefPtr<WebDocumentLoaderMac> loader)
: loader(loader)
+ , representationFinishedLoading(NO)
+ , includedInWebKitStatistics(NO)
{
ASSERT(this->loader);
}
diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog
index 177837e5a..06bb3220a 100644
--- a/Source/WebKit/qt/ChangeLog
+++ b/Source/WebKit/qt/ChangeLog
@@ -1,3 +1,25 @@
+2012-10-17 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
+
+ [Qt] Modularize documentation for QtWebKit
+
+ Running 'make docs' would fail unless 'make qmake_all' was ran first,
+ but qmake_all involved generating all the derived sources, which seems
+ overly complex just for building documentation.
+
+ We solve this by preventing all subdirs except QtWebKit from having a
+ docs target. This would normally work fine on its own, but since we
+ use CONFIG += ordered, there's now a missing doc target for the
+ immediate dependency of the QtWebKit subdir. We solve this by adding
+ a dummy-target ourselves.
+
+ Finally, we clean up the qdocconf file to match the rest of the Qt
+ documentation modularization efforts.
+
+ Reviewed by Simon Hausmann.
+
+ * docs/docs.pri: Removed.
+ * docs/qtwebkit.qdocconf: Removed.
+
2012-10-15 Simon Hausmann <simon.hausmann@digia.com>
[Qt] Separate Qt WebKit into Qt WebKit and Qt WebKit Widgets
diff --git a/Source/WebKit/qt/docs/docs.pri b/Source/WebKit/qt/docs/docs.pri
deleted file mode 100644
index 58704cc47..000000000
--- a/Source/WebKit/qt/docs/docs.pri
+++ /dev/null
@@ -1,7 +0,0 @@
-qtPrepareTool(QDOC, qdoc)
-
-QDOC = SRCDIR=$$PWD/../../.. OUTPUT_DIR=$${ROOT_BUILD_DIR} $$QDOC
-
-docs.commands = $$QDOC $$PWD/qtwebkit.qdocconf
-
-QMAKE_EXTRA_TARGETS += docs
diff --git a/Source/WebKit/qt/docs/qtwebkit.qdocconf b/Source/WebKit/qt/docs/qtwebkit.qdocconf
deleted file mode 100644
index adf5cbf2f..000000000
--- a/Source/WebKit/qt/docs/qtwebkit.qdocconf
+++ /dev/null
@@ -1,193 +0,0 @@
-# Run qdoc from the directory that contains this file.
-
-project = qtwebkit
-description = "Qt WebKit API Documentation"
-
-headerdirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit2/UIProcess/API/qt
-sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs $SRCDIR/Source/JavaScriptCore/qt/api $SRCDIR/WebKit2/UIProcess/API/qt
-outputdir = $OUTPUT_DIR/doc/html
-outputformats = HTML
-sources.fileextensions = "*.cpp *.doc *.qdoc"
-headers.fileextensions = "*.h"
-exampledirs = $SRCDIR/WebKit/qt/docs
-imagedirs = $SRCDIR/WebKit/qt/docs
-
-#indexes = $QTDIR/doc/html/qt.index
-
-# macros.qdocconf
-
-macro.aring.HTML = "&aring;"
-macro.Auml.HTML = "&Auml;"
-macro.author = "\\b{Author:}"
-macro.br.HTML = "<br />"
-macro.BR.HTML = "<br />"
-macro.aacute.HTML = "&aacute;"
-macro.eacute.HTML = "&eacute;"
-macro.iacute.HTML = "&iacute;"
-macro.gui = "\\b"
-macro.hr.HTML = "<hr />"
-macro.key = "\\b"
-macro.menu = "\\b"
-macro.note = "\\b{Note:}"
-macro.oslash.HTML = "&oslash;"
-macro.ouml.HTML = "&ouml;"
-macro.QA = "\\e{Qt Assistant}"
-macro.QD = "\\e{Qt Designer}"
-macro.QL = "\\e{Qt Linguist}"
-macro.param = "\\e"
-macro.raisedaster.HTML = "<sup>*</sup>"
-macro.reg.HTML = "<sup>&reg;</sup>"
-macro.return = "Returns"
-macro.starslash = "\\c{*/}"
-macro.uuml.HTML = "&uuml;"
-macro.mdash.HTML = "&mdash;"
-
-# compat.qdocconf
-
-alias.include = input
-
-macro.0 = "\\\\0"
-macro.b = "\\\\b"
-macro.n = "\\\\n"
-macro.r = "\\\\r"
-macro.i = "\\li"
-macro.i11 = "\\li{1,1}"
-macro.i12 = "\\li{1,2}"
-macro.i13 = "\\li{1,3}"
-macro.i14 = "\\li{1,4}"
-macro.i15 = "\\li{1,5}"
-macro.i16 = "\\li{1,6}"
-macro.i17 = "\\li{1,7}"
-macro.i18 = "\\li{1,8}"
-macro.i19 = "\\li{1,9}"
-macro.i21 = "\\li{2,1}"
-macro.i31 = "\\li{3,1}"
-macro.i41 = "\\li{4,1}"
-macro.i51 = "\\li{5,1}"
-macro.i61 = "\\li{6,1}"
-macro.i71 = "\\li{7,1}"
-macro.i81 = "\\li{8,1}"
-macro.i91 = "\\li{9,1}"
-macro.img = "\\image"
-macro.endquote = "\\endquotation"
-
-spurious = "Missing comma in .*" \
- "Missing pattern .*"
-
-# Doxygen compatibility commands
-
-macro.see = "\\sa"
-macro.function = "\\fn"
-
-# qt-cpp-ignore.qdocconf
-
-Cpp.ignoretokens = QAXFACTORY_EXPORT \
- QDESIGNER_COMPONENTS_LIBRARY \
- QDESIGNER_EXTENSION_LIBRARY \
- QDESIGNER_SDK_LIBRARY \
- QDESIGNER_SHARED_LIBRARY \
- QDESIGNER_UILIB_LIBRARY \
- QM_EXPORT_CANVAS \
- QM_EXPORT_DNS \
- QM_EXPORT_DOM \
- QM_EXPORT_FTP \
- QM_EXPORT_HTTP \
- QM_EXPORT_ICONVIEW \
- QM_EXPORT_NETWORK \
- QM_EXPORT_OPENGL \
- QM_EXPORT_SQL \
- QM_EXPORT_TABLE \
- QM_EXPORT_WORKSPACE \
- QM_EXPORT_XML \
- QT_ASCII_CAST_WARN \
- QT_ASCII_CAST_WARN_CONSTRUCTOR \
- QT_BEGIN_HEADER \
- QT_DESIGNER_STATIC \
- QT_END_HEADER \
- QT_FASTCALL \
- QT_WIDGET_PLUGIN_EXPORT \
- Q_COMPAT_EXPORT \
- Q_CORE_EXPORT \
- Q_EXPLICIT \
- Q_EXPORT \
- Q_EXPORT_CODECS_CN \
- Q_EXPORT_CODECS_JP \
- Q_EXPORT_CODECS_KR \
- Q_EXPORT_PLUGIN \
- Q_GFX_INLINE \
- Q_GUI_EXPORT \
- Q_GUI_EXPORT_INLINE \
- Q_GUI_EXPORT_STYLE_CDE \
- Q_GUI_EXPORT_STYLE_COMPACT \
- Q_GUI_EXPORT_STYLE_MAC \
- Q_GUI_EXPORT_STYLE_MOTIF \
- Q_GUI_EXPORT_STYLE_MOTIFPLUS \
- Q_GUI_EXPORT_STYLE_PLATINUM \
- Q_GUI_EXPORT_STYLE_POCKETPC \
- Q_GUI_EXPORT_STYLE_SGI \
- Q_GUI_EXPORT_STYLE_WINDOWS \
- Q_GUI_EXPORT_STYLE_WINDOWSXP \
- QHELP_EXPORT \
- Q_INLINE_TEMPLATE \
- Q_INTERNAL_WIN_NO_THROW \
- Q_NETWORK_EXPORT \
- Q_OPENGL_EXPORT \
- Q_OUTOFLINE_TEMPLATE \
- Q_SQL_EXPORT \
- Q_SVG_EXPORT \
- Q_SCRIPT_EXPORT \
- Q_TESTLIB_EXPORT \
- Q_TYPENAME \
- Q_XML_EXPORT \
- Q_XMLSTREAM_EXPORT \
- Q_XMLPATTERNS_EXPORT \
- QDBUS_EXPORT \
- QT_BEGIN_NAMESPACE \
- QT_BEGIN_INCLUDE_NAMESPACE \
- QT_END_NAMESPACE \
- QT_END_INCLUDE_NAMESPACE \
- EXTENSIONSYSTEM_EXPORT \
- QWEBKIT_EXPORT
-Cpp.ignoredirectives = Q_DECLARE_HANDLE \
- Q_DECLARE_INTERFACE \
- Q_DECLARE_METATYPE \
- Q_DECLARE_OPERATORS_FOR_FLAGS \
- Q_DECLARE_PRIVATE \
- Q_DECLARE_PUBLIC \
- Q_DECLARE_SHARED \
- Q_DECLARE_TR_FUNCTIONS \
- Q_DECLARE_TYPEINFO \
- Q_DISABLE_COPY \
- QT_FORWARD_DECLARE_CLASS \
- Q_DUMMY_COMPARISON_OPERATOR \
- Q_ENUMS \
- Q_FLAGS \
- Q_INTERFACES \
- __attribute__
-
-
-
-HTML.style = "" \
- "h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }"\
- "a:link { color: #004faf; text-decoration: none }"\
- "a:visited { color: #672967; text-decoration: none }"\
- "td.postheader { font-family: sans-serif }"\
- "tr.address { font-family: sans-serif }"\
- "body { background: #ffffff; color: black }"\
- "table tr.odd { background: #f0f0f0; color: black; }"\
- "table tr.even { background: #e4e4e4; color: black; }"\
- "table.annotated th { padding: 3px; text-align: left }"\
- "table.annotated td { padding: 3px; } "\
- "table tr pre { padding-top: none; padding-bottom: none; padding-left: none; padding-right: none; border: none; background: none }"\
- "tr.qt-style { background: #a2c511; color: black }"\
- "body pre { padding: 0.2em; border: #e7e7e7 1px solid; background: #f1f1f1; color: black }"\
- "span.preprocessor, span.preprocessor a { color: darkblue; }"\
- "span.comment { color: darkred; font-style: italic }"\
- "span.string,span.char { color: darkgreen; }"\
- ".title { text-align: center }"\
- ".subtitle { font-size: 0.8em }"\
- ".small-subtitle { font-size: 0.65em }"
-
-HTML.postheader = ""
-
-HTML.footer = ""
diff --git a/Source/WebKit2/CMakeLists.txt b/Source/WebKit2/CMakeLists.txt
index 8564d98a9..bb746c699 100644
--- a/Source/WebKit2/CMakeLists.txt
+++ b/Source/WebKit2/CMakeLists.txt
@@ -123,6 +123,8 @@ SET(WebKit2_SOURCES
Platform/CoreIPC/BinarySemaphore.cpp
Platform/CoreIPC/Connection.cpp
Platform/CoreIPC/DataReference.cpp
+ Platform/CoreIPC/MessageDecoder.cpp
+ Platform/CoreIPC/MessageEncoder.cpp
Platform/CoreIPC/MessageReceiverMap.cpp
PluginProcess/PluginControllerProxy.cpp
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index 9cc45cd2a..c80bb5fc1 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,3 +1,769 @@
+2012-10-18 Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+ Add PluginProcessProxy::platformInitializeLaunchOptions
+ https://bugs.webkit.org/show_bug.cgi?id=99583
+
+ Reviewed by Sam Weinig.
+
+ Add a platform specific launch options initializer. This enables
+ fixing bug 99297 "[EFL] Make plugin process debugging easier
+ (PLUGIN_PROCESS_COMMAND_PREFIX)".
+
+ * UIProcess/Plugins/PluginProcessProxy.cpp:
+ (WebKit::PluginProcessProxy::PluginProcessProxy):
+ * UIProcess/Plugins/PluginProcessProxy.h:
+ (PluginProcessProxy):
+ * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
+ (WebKit::PluginProcessProxy::platformInitializeLaunchOptions):
+ (WebKit):
+ * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:
+ (WebKit::PluginProcessProxy::platformInitializeLaunchOptions):
+ (WebKit):
+ * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
+ (WebKit::PluginProcessProxy::platformInitializeLaunchOptions):
+ (WebKit):
+
+2012-10-18 Byungwoo Lee <bw80.lee@samsung.com>
+
+ [WK2] Update test expectation for the python message test after r131700
+ https://bugs.webkit.org/show_bug.cgi?id=99689
+
+ Reviewed by Gyuyoung Kim.
+
+ Need to update test expectations about including headers and forwarding
+ declarations on derived sources for ipc message. (after r131700 : build fix)
+
+ * Scripts/webkit2/messages_unittest.py:
+
+2012-10-18 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [EFL][WK2] Remove '_' prefix from private API structure names
+ https://bugs.webkit.org/show_bug.cgi?id=99575
+
+ Reviewed by Gyuyoung Kim.
+
+ Removed underscore prefix from WK2 EFL internal structure names.
+
+ * UIProcess/API/efl/VibrationProvider.cpp:
+ (Ewk_Vibration_Client::Ewk_Vibration_Client):
+ * UIProcess/API/efl/VibrationProvider.h:
+ * UIProcess/API/efl/ewk_back_forward_list.h:
+ * UIProcess/API/efl/ewk_back_forward_list_item.h:
+ * UIProcess/API/efl/ewk_back_forward_list_item_private.h:
+ (Ewk_Back_Forward_List_Item::create):
+ (Ewk_Back_Forward_List_Item::Ewk_Back_Forward_List_Item):
+ * UIProcess/API/efl/ewk_back_forward_list_private.h:
+ (Ewk_Back_Forward_List::create):
+ (Ewk_Back_Forward_List::Ewk_Back_Forward_List):
+ * UIProcess/API/efl/ewk_context.cpp:
+ (Ewk_Url_Scheme_Handler::Ewk_Url_Scheme_Handler):
+ (Ewk_Context::Ewk_Context):
+ (ewk_context_url_scheme_request_received):
+ (ewk_context_url_scheme_register):
+ * UIProcess/API/efl/ewk_context.h:
+ * UIProcess/API/efl/ewk_context_download_client_private.h:
+ * UIProcess/API/efl/ewk_context_history_client_private.h:
+ * UIProcess/API/efl/ewk_context_private.h:
+ * UIProcess/API/efl/ewk_context_request_manager_client_private.h:
+ * UIProcess/API/efl/ewk_cookie_manager.cpp:
+ (Ewk_Cookie_Manager::Ewk_Cookie_Manager):
+ (Ewk_Cookie_Manager::~Ewk_Cookie_Manager):
+ * UIProcess/API/efl/ewk_cookie_manager.h:
+ * UIProcess/API/efl/ewk_cookie_manager_private.h:
+ (Ewk_Cookie_Manager::create):
+ (Ewk_Cookie_Manager):
+ * UIProcess/API/efl/ewk_download_job.h:
+ * UIProcess/API/efl/ewk_download_job_private.h:
+ (Ewk_Download_Job::create):
+ (Ewk_Download_Job::Ewk_Download_Job):
+ * UIProcess/API/efl/ewk_error.cpp:
+ (Ewk_Error::Ewk_Error):
+ * UIProcess/API/efl/ewk_error.h:
+ * UIProcess/API/efl/ewk_error_private.h:
+ (Ewk_Error::create):
+ (Ewk_Error):
+ * UIProcess/API/efl/ewk_favicon_database.cpp:
+ (Ewk_Favicon_Database::Ewk_Favicon_Database):
+ * UIProcess/API/efl/ewk_favicon_database.h:
+ * UIProcess/API/efl/ewk_favicon_database_private.h:
+ (Ewk_Favicon_Database::create):
+ (Ewk_Favicon_Database):
+ * UIProcess/API/efl/ewk_form_submission_request.h:
+ * UIProcess/API/efl/ewk_form_submission_request_private.h:
+ (Ewk_Form_Submission_Request::~Ewk_Form_Submission_Request):
+ (Ewk_Form_Submission_Request::create):
+ (Ewk_Form_Submission_Request::Ewk_Form_Submission_Request):
+ * UIProcess/API/efl/ewk_intent.h:
+ * UIProcess/API/efl/ewk_intent_private.h:
+ (Ewk_Intent::create):
+ (Ewk_Intent::Ewk_Intent):
+ * UIProcess/API/efl/ewk_intent_service.h:
+ * UIProcess/API/efl/ewk_intent_service_private.h:
+ (Ewk_Intent_Service::create):
+ (Ewk_Intent_Service::Ewk_Intent_Service):
+ * UIProcess/API/efl/ewk_navigation_data.h:
+ * UIProcess/API/efl/ewk_navigation_data_private.h:
+ (Ewk_Navigation_Data::create):
+ (Ewk_Navigation_Data::Ewk_Navigation_Data):
+ * UIProcess/API/efl/ewk_navigation_policy_decision.h:
+ * UIProcess/API/efl/ewk_navigation_policy_decision_private.h:
+ (Ewk_Navigation_Policy_Decision::~Ewk_Navigation_Policy_Decision):
+ (Ewk_Navigation_Policy_Decision::create):
+ (Ewk_Navigation_Policy_Decision::Ewk_Navigation_Policy_Decision):
+ * UIProcess/API/efl/ewk_popup_menu_item.cpp:
+ (Ewk_Popup_Menu_Item::Ewk_Popup_Menu_Item):
+ * UIProcess/API/efl/ewk_popup_menu_item.h:
+ * UIProcess/API/efl/ewk_popup_menu_item_private.h:
+ (Ewk_Popup_Menu_Item::create):
+ (Ewk_Popup_Menu_Item):
+ * UIProcess/API/efl/ewk_resource.h:
+ * UIProcess/API/efl/ewk_resource_private.h:
+ (Ewk_Resource::create):
+ (Ewk_Resource::Ewk_Resource):
+ * UIProcess/API/efl/ewk_settings.h:
+ * UIProcess/API/efl/ewk_settings_private.h:
+ (Ewk_Settings::Ewk_Settings):
+ * UIProcess/API/efl/ewk_text_checker_private.h:
+ * UIProcess/API/efl/ewk_touch.h:
+ * UIProcess/API/efl/ewk_url_request.h:
+ * UIProcess/API/efl/ewk_url_request_private.h:
+ (Ewk_Url_Request::create):
+ (Ewk_Url_Request::Ewk_Url_Request):
+ * UIProcess/API/efl/ewk_url_response.h:
+ * UIProcess/API/efl/ewk_url_response_private.h:
+ (Ewk_Url_Response::create):
+ (Ewk_Url_Response::Ewk_Url_Response):
+ * UIProcess/API/efl/ewk_url_scheme_request.h:
+ * UIProcess/API/efl/ewk_url_scheme_request_private.h:
+ * UIProcess/API/efl/ewk_view.cpp:
+ (Ewk_View_Private_Data::Ewk_View_Private_Data):
+ (Ewk_View_Private_Data::~Ewk_View_Private_Data):
+ (_ewk_view_smart_add):
+ * UIProcess/API/efl/ewk_view.h:
+ * UIProcess/API/efl/ewk_view_private.h:
+
+2012-10-18 Ryosuke Niwa <rniwa@webkit.org>
+
+ Lion build fix after r131686. Add back if-def around #imports.
+
+ * UIProcess/API/mac/WKView.mm:
+
+2012-10-17 Byungwoo Lee <bw80.lee@samsung.com>
+
+ [WK2] Fix build break
+ https://bugs.webkit.org/show_bug.cgi?id=99670
+
+ Reviewed by Anders Carlsson.
+
+ Unreviewed build fix.
+
+ Include MessageEncoder.h instead of forwarding declaration for
+ MessageEncoder class.
+
+ * Scripts/webkit2/messages.py:
+ (forward_declarations_and_headers):
+
+2012-10-17 Darin Adler <darin@apple.com>
+
+ Make subclassing of WKView safer by namespacing methods and eliminating its use as an observer and delegate
+ https://bugs.webkit.org/show_bug.cgi?id=99251
+
+ Reviewed by Anders Carlsson.
+
+ Apps that subclass WKView should be able to freely choose method names without conflicting with a name
+ we chose to use internally in WKView's own implementation. Thus, it's a good idea to add a "_wk_" prefix
+ to any method names that are solely for internal WebKit2 use. Exceptions to this are method names that
+ are predetermined by AppKit, or names that are part of API or SPI.
+
+ Apps that subclass WKView should be able to add observers or use the WKView as a delegate without
+ conflicting with similar use in the WKView implementations. Thus, changed to use separate block-style
+ observers for the window notifications and a separate delegate for the tool tip implementation.
+
+ The challenging aspect of this patch was to research which method names were determined by AppKit.
+ There's nothing in the WebKit2 source code that necessarily states this explicitly.
+
+ * UIProcess/API/mac/PageClientImpl.mm:
+ (WebKit::PageClientImpl::createDrawingAreaProxy): Updated for new method name.
+ (WebKit::PageClientImpl::scrollView): Ditto.
+ (WebKit::PageClientImpl::isViewFocused): Ditto.
+ (WebKit::PageClientImpl::colorSpace): Ditto.
+ (WebKit::PageClientImpl::processDidCrash): Ditto.
+ (WebKit::PageClientImpl::pageClosed): Ditto.
+ (WebKit::PageClientImpl::didRelaunchProcess): Ditto.
+ (WebKit::PageClientImpl::toolTipChanged): Ditto.
+ (WebKit::PageClientImpl::setCursor): Ditto.
+ (WebKit::PageClientImpl::interpretKeyEvent): Ditto.
+ (WebKit::PageClientImpl::setDragImage): Ditto.
+ (WebKit::PageClientImpl::setPromisedData): Ditto.
+ (WebKit::PageClientImpl::updateTextInputState): Ditto.
+ (WebKit::PageClientImpl::resetTextInputState): Ditto.
+ (WebKit::PageClientImpl::convertToDeviceSpace): Ditto.
+ (WebKit::PageClientImpl::convertToUserSpace): Ditto.
+ (WebKit::PageClientImpl::doneWithKeyEvent): Ditto.
+ (WebKit::PageClientImpl::setFindIndicator): Ditto.
+ (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived): Ditto.
+ (WebKit::PageClientImpl::enterAcceleratedCompositingMode): Ditto.
+ (WebKit::PageClientImpl::exitAcceleratedCompositingMode): Ditto.
+ (WebKit::PageClientImpl::updateAcceleratedCompositingMode): Ditto.
+ (WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged): Ditto.
+ (WebKit::PageClientImpl::setPluginComplexTextInputState): Ditto.
+ (WebKit::PageClientImpl::didChangeScrollbarsForMainFrame): Ditto.
+ (WebKit::PageClientImpl::didCommitLoadForMainFrame): Ditto.
+ (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation): Ditto.
+ (WebKit::PageClientImpl::customRepresentationZoomFactor): Ditto.
+ (WebKit::PageClientImpl::setCustomRepresentationZoomFactor): Ditto.
+ (WebKit::PageClientImpl::findStringInCustomRepresentation): Ditto.
+ (WebKit::PageClientImpl::countStringMatchesInCustomRepresentation): Ditto.
+ (WebKit::PageClientImpl::executeSavedCommandBySelector): Ditto.
+ (WebKit::PageClientImpl::showDictationAlternativeUI): Ditto.
+
+ * UIProcess/API/mac/WKView.mm: Simplified imports a bit. No need for conditional imports of basic classes
+ like NSTextAlternatives.h and NSAttributedString.h. No need to put internal headers in a separate paragraph.
+ Added WKToolTipDelegate class and added _toolTipDelegate and _observers fields to WKViewData.
+ (-[WKView becomeFirstResponder]): Updated for new method name.
+ (-[WKView resignFirstResponder]): Ditto.
+ (-[WKView setFrameSize:]): Ditto.
+ (-[WKView _wk_updateWindowAndViewFrames]): Ditto.
+ (-[WKView renewGState]): Ditto.
+ (-[WKView _wk_setPluginComplexTextInputState:]): Ditto.
+ (validateCommandCallback): Ditto.
+ (-[WKView displayIfNeeded]): Fixed a comment typo.
+ (-[WKView _wk_setMouseDownEvent:]): Updated for new method name.
+ (-[WKView mouseDown:]): Ditto.
+ (-[WKView mouseUp:]): Ditto.
+ (-[WKView acceptsFirstMouse:]): Ditto.
+ (-[WKView shouldDelayWindowOrderingForEvent:]): Ditto.
+ (-[WKView _wk_handleStyleKeyEquivalent:]): Ditto.
+ (-[WKView performKeyEquivalent:]): Ditto.
+ (-[WKView _wk_disableComplexTextInputIfNecessary]): Ditto.
+ (-[WKView _wk_handlePluginComplexTextInputKeyDown:]): Ditto.
+ (-[WKView _wk_tryHandlePluginComplexTextInputKeyDown:]): Ditto.
+ (-[WKView keyDown:]): Ditto.
+ (-[WKView _wk_executeSavedKeypressCommands]): Ditto.
+ (-[WKView _wk_notifyInputContextAboutDiscardedComposition]): Ditto.
+ (-[WKView selectedRange]): Ditto.
+ (-[WKView hasMarkedText]): Ditto.
+ (-[WKView unmarkText]): Ditto.
+ (-[WKView setMarkedText:selectedRange:replacementRange:]): Ditto.
+ (-[WKView markedRange]): Ditto.
+ (-[WKView attributedSubstringForProposedRange:actualRange:]): Ditto.
+ (-[WKView characterIndexForPoint:]): Ditto.
+ (-[WKView firstRectForCharacterRange:actualRange:]): Ditto.
+ (-[WKView _wk_updateWindowVisibility]): Ditto.
+ (-[WKView _wk_updateWindowObserversForWindow:]): Replaced the two separate methods
+ addWindowObserversForWindow and removeWindowObservers with this single method, since
+ the two are only used in tandem. Changed code to use blocks for the observers and to
+ keep the observers in an array.
+ (-[WKView viewWillMoveToWindow:]): Updated to use _wk_updateWindowObserversForWindow.
+ (-[WKView viewDidMoveToWindow]): Updated for new method names.
+ (-[WKView _wk_windowScreenDidChange]): Ditto.
+ (-[WKView _wk_windowDidBecomeKey:]): Ditto.
+ (-[WKView _wk_windowDidChangeScreen:]): Ditto.
+ (-[WKView _wk_windowDidResignKey:]): Ditto.
+ (-[WKView _wk_windowDidMiniaturize:]): Ditto.
+ (-[WKView _wk_windowDidDeminiaturize:]): Ditto.
+ (-[WKView _wk_windowDidMove:]): Ditto.
+ (-[WKView _wk_windowDidResize:]): Ditto.
+ (-[WKView _wk_windowDidOrderOffScreen:]): Ditto.
+ (-[WKView _wk_windowDidOrderOnScreen:]): Ditto.
+ (-[WKView _wk_windowDidChangeBackingProperties:]): Ditto.
+ (-[WKView drawRect:]): Ditto.
+ (-[WKView _wk_accessibilityRegisterUIProcessTokens]): Ditto.
+ (-[WKView _wk_updateRemoteAccessibilityRegistration:]): Ditto.
+ (-[WKView _wk_postFakeMouseMovedEventForFlagsChangedEvent:]): Ditto.
+ (-[WKView _wk_intrinsicDeviceScaleFactor]): Ditto.
+ (-[WKView _wk_setDrawingAreaSize:]): Ditto.
+ (-[WKView _wk_shouldUseTiledDrawingArea]): Ditto.
+ (-[WKView _wk_createDrawingAreaProxy]): Ditto.
+ (-[WKView _wk_isFocused]): Ditto.
+ (-[WKView _wk_processDidCrash]): Ditto.
+ (-[WKView _wk_pageClosed]): Ditto.
+ (-[WKView _wk_didRelaunchProcess]): Ditto.
+ (-[WKView _wk_setCursor:]): Ditto.
+ (-[WKView _wk_setUserInterfaceItemState:enabled:state:]): Ditto.
+ (-[WKView _wk_tryPostProcessPluginComplexTextInputKeyDown:]): Ditto.
+ (-[WKView _wk_doneWithKeyEvent:eventWasHandled:]): Ditto.
+ (-[WKView _wk_interpretKeyEvent:savingCommandsTo:]): Ditto.
+ (-[WKView _wk_convertToDeviceSpace:]): Ditto.
+ (-[WKView _wk_convertToUserSpace:]): Ditto.
+ (-[WKView _wk_addTrackingRect:owner:userData:assumeInside:useTrackingNum:]): Ditto.
+ (-[WKView _wk_addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]): Ditto.
+ (-[WKView _wk_removeTrackingRects:count:]): Ditto.
+ (-[WKView _wk_sendToolTipMouseExited]): Ditto.
+ (-[WKView _wk_sendToolTipMouseEntered]): Ditto.
+ (-[WKView _wk_toolTipChangedFrom:to:]): Changed to use the data object as the tool tip owner so
+ the delegate method can be there rather than on WKView.
+ (-[WKView _wk_setFindIndicator:fadeOut:animate:]): Updated for new method names.
+ (-[WKView _wk_enterAcceleratedCompositingMode:]): Ditto.
+ (-[WKView _wk_exitAcceleratedCompositingMode]): Ditto.
+ (-[WKView _wk_updateAcceleratedCompositingMode:]): Ditto.
+ (-[WKView _wk_setAccessibilityWebProcessToken:]): Ditto.
+ (-[WKView _wk_pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]): Ditto.
+ (-[WKView _wk_setPluginComplexTextInputState:pluginComplexTextInputIdentifier:]): Ditto.
+ (-[WKView _wk_setPageHasCustomRepresentation:]): Ditto.
+ (-[WKView _wk_didFinishLoadingDataForCustomRepresentationWithSuggestedFilename:dataReference:]): Ditto.
+ (-[WKView _wk_customRepresentationZoomFactor]): Ditto.
+ (-[WKView _wk_setCustomRepresentationZoomFactor:]): Ditto.
+ (-[WKView _wk_findStringInCustomRepresentation:withFindOptions:maxMatchCount:]): Ditto.
+ (-[WKView _wk_countStringMatchesInCustomRepresentation:withFindOptions:maxMatchCount:]): Ditto.
+ (-[WKView _wk_setDragImage:at:linkDrag:]): Ditto.
+ (-[WKView _wk_setPromisedData:withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:forPasteboard:]): Ditto.
+ (-[WKView _wk_updateSecureInputState]): Ditto.
+ (-[WKView _wk_updateTextInputStateIncludingSecureInputState:]): Ditto.
+ (-[WKView _wk_resetTextInputState]): Ditto.
+ (-[WKView _wk_didChangeScrollbarsForMainFrame]): Ditto.
+ (-[WKView _wk_hasFullScreenWindowController]): Ditto.
+ (-[WKView _wk_fullScreenWindowController]): Ditto.
+ (-[WKView _wk_closeFullScreenWindowController]): Ditto.
+ (-[WKView _wk_executeSavedCommandBySelector:]): Ditto.
+ (-[WKView _wk_cacheWindowBottomCornerRect]): Ditto.
+ (-[WKView _wk_spellCheckerDocumentTag]): Ditto.
+ (-[WKView _wk_handleAcceptedAlternativeText:]): Ditto.
+ (-[WKView _wk_setSuppressVisibilityUpdates:]): Ditto.
+ (-[WKView _wk_suppressVisibilityUpdates]): Ditto.
+ (-[WKView _wk_registerDraggedTypes]): Ditto.
+ (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): Ditto.
+ (-[WKView wantsUpdateLayer]): Ditto.
+ (-[WKView enableFrameSizeUpdates]): Ditto.
+ (-[WKToolTipDelegate initWithPage:]): Added.
+ (-[WKToolTipDelegate view:stringForToolTip:point:userData:]): Added.
+
+
+ * UIProcess/API/mac/WKViewInternal.h: Changed all internal method names to have a _wk_ prefix.
+ * UIProcess/API/mac/WKViewPrivate.h: Expose the _shouldUseTiledDrawingArea method formally as SPI
+ since Safari is currently overriding this method.
+
+ * UIProcess/mac/CorrectionPanel.mm:
+ (WebKit::CorrectionPanel::recordAutocorrectionResponse): Updated for new method names.
+ (WebKit::CorrectionPanel::handleAcceptedReplacement): Ditto.
+
+ * UIProcess/mac/WKFullScreenWindowController.mm:
+ (-[WKFullScreenWindowController enterFullScreen:]): Updated for new method names.
+ (-[WKFullScreenWindowController exitFullScreen]): Ditto.
+ (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Ditto.
+ (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): Ditto.
+
+ * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
+ (WebKit::WebFullScreenManagerProxy::invalidate): Updated for new method names.
+ (WebKit::WebFullScreenManagerProxy::close): Ditto.
+ (WebKit::WebFullScreenManagerProxy::isFullScreen): Ditto.
+ (WebKit::WebFullScreenManagerProxy::enterFullScreen): Ditto.
+ (WebKit::WebFullScreenManagerProxy::exitFullScreen): Ditto.
+ (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen): Ditto.
+ (WebKit::WebFullScreenManagerProxy::beganExitFullScreen): Ditto.
+
+2012-10-15 Anders Carlsson <andersca@apple.com>
+
+ Add MessageEncoder and MessageDecoder subclasses
+ https://bugs.webkit.org/show_bug.cgi?id=99365
+
+ Reviewed by Andreas Kling.
+
+ This is the first step towards cleaning up IPC handling in WebKit2. The idea is that MessageEncoder and MessageDecoder
+ will handle all the IPC specific parts of encoding and decoding (such as attachments), whereas the ArgumentEncoder and ArgumentDecoder
+ classes are only used for serializing simpler data types.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * Platform/CoreIPC/ArgumentDecoder.cpp:
+ (CoreIPC::ArgumentDecoder::create):
+ (CoreIPC::ArgumentDecoder::initialize):
+ * Platform/CoreIPC/ArgumentDecoder.h:
+ (ArgumentDecoder):
+ * Platform/CoreIPC/ArgumentEncoder.cpp:
+ (CoreIPC::ArgumentEncoder::create):
+ (CoreIPC::ArgumentEncoder::ArgumentEncoder):
+ * Platform/CoreIPC/ArgumentEncoder.h:
+ (ArgumentEncoder):
+ * Platform/CoreIPC/Connection.cpp:
+ (CoreIPC::Connection::createSyncMessageEncoder):
+ (CoreIPC::Connection::sendMessage):
+ (CoreIPC::Connection::sendSyncReply):
+ (CoreIPC::Connection::waitForMessage):
+ (CoreIPC::Connection::sendSyncMessage):
+ (CoreIPC::Connection::waitForSyncReply):
+ (CoreIPC::Connection::processIncomingSyncReply):
+ (CoreIPC::Connection::processIncomingMessage):
+ (CoreIPC::Connection::dispatchSyncMessage):
+ (CoreIPC::Connection::dispatchMessage):
+ * Platform/CoreIPC/Connection.h:
+ (Connection):
+ (PendingSyncReply):
+ (CoreIPC::Connection::PendingSyncReply::releaseReplyDecoder):
+ (CoreIPC::Connection::send):
+ (CoreIPC::Connection::sendSync):
+ (CoreIPC::Connection::waitForAndDispatchImmediately):
+ (CoreIPC::Connection::deprecatedSendSync):
+ (CoreIPC::Connection::deprecatedSend):
+ * Platform/CoreIPC/MessageDecoder.cpp:
+ (CoreIPC::MessageDecoder::create):
+ (CoreIPC::MessageDecoder::~MessageDecoder):
+ (CoreIPC::MessageDecoder::MessageDecoder):
+ * Platform/CoreIPC/MessageDecoder.h:
+ (CoreIPC):
+ (MessageDecoder):
+ * Platform/CoreIPC/MessageEncoder.cpp:
+ (CoreIPC):
+ (CoreIPC::MessageEncoder::create):
+ (CoreIPC::MessageEncoder::MessageEncoder):
+ (CoreIPC::MessageEncoder::~MessageEncoder):
+ * Platform/CoreIPC/MessageEncoder.h:
+ (CoreIPC):
+ (MessageEncoder):
+ * Platform/CoreIPC/MessageSender.h:
+ (CoreIPC::MessageSender::send):
+ (CoreIPC::MessageSender::sendMessage):
+ * Platform/CoreIPC/mac/ConnectionMac.cpp:
+ (CoreIPC::Connection::open):
+ (CoreIPC::Connection::sendOutgoingMessage):
+ (CoreIPC::createMessageDecoder):
+ (CoreIPC::Connection::receiveSourceEventHandler):
+ * Platform/CoreIPC/unix/ConnectionUnix.cpp:
+ (CoreIPC::Connection::processMessage):
+ (CoreIPC::Connection::sendOutgoingMessage):
+ * Platform/CoreIPC/win/ConnectionWin.cpp:
+ (CoreIPC::Connection::readEventHandler):
+ (CoreIPC::Connection::writeEventHandler):
+ (CoreIPC::Connection::platformCanSendOutgoingMessages):
+ (CoreIPC::Connection::sendOutgoingMessage):
+ * Scripts/webkit2/messages.py:
+ (generate_message_handler):
+ * Scripts/webkit2/messages_unittest.py:
+ (MessageEncoder):
+ * Shared/WebConnection.cpp:
+ (WebKit::WebConnection::postMessage):
+ (WebKit::WebConnection::handleMessage):
+ * Shared/WebConnection.h:
+ (CoreIPC):
+ * Target.pri:
+ * UIProcess/WebContext.cpp:
+ (WebKit::WebContext::createNewWebProcess):
+ (WebKit::WebContext::postMessageToInjectedBundle):
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::sendMessage):
+ * UIProcess/WebProcessProxy.h:
+ (WebProcessProxy):
+ (WebKit::WebProcessProxy::deprecatedSend):
+ (WebKit::WebProcessProxy::send):
+ * WebKit2.xcodeproj/project.pbxproj:
+ * WebProcess/WebPage/DecoderAdapter.cpp:
+ (WebKit::DecoderAdapter::DecoderAdapter):
+ (WebKit::DecoderAdapter::decodeBytes):
+ (WebKit::DecoderAdapter::decodeBool):
+ (WebKit::DecoderAdapter::decodeUInt16):
+ (WebKit::DecoderAdapter::decodeUInt32):
+ (WebKit::DecoderAdapter::decodeUInt64):
+ (WebKit::DecoderAdapter::decodeInt32):
+ (WebKit::DecoderAdapter::decodeInt64):
+ (WebKit::DecoderAdapter::decodeFloat):
+ (WebKit::DecoderAdapter::decodeDouble):
+ (WebKit::DecoderAdapter::decodeString):
+ * WebProcess/WebPage/DecoderAdapter.h:
+ (DecoderAdapter):
+ * WebProcess/WebPage/EncoderAdapter.cpp:
+ (WebKit::EncoderAdapter::EncoderAdapter):
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::postInjectedBundleMessage):
+ * win/WebKit2.vcproj:
+
+2012-10-17 Andy Estes <aestes@apple.com>
+
+ [WebKit2] Add removeChild: to WKDOMNode and make WKDOMText.data read/write
+ https://bugs.webkit.org/show_bug.cgi?id=99662
+
+ Reviewed by Sam Weinig.
+
+ * WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
+ * WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
+ (-[WKDOMNode removeChild:]):
+ * WebProcess/InjectedBundle/API/mac/WKDOMText.h:
+ * WebProcess/InjectedBundle/API/mac/WKDOMText.mm:
+ (-[WKDOMText setData:]):
+
+2012-10-17 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Memory leak in ewk_download_job_response_set()
+ https://bugs.webkit.org/show_bug.cgi?id=99621
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ No longer call ewk_url_response_ref() on the response
+ object in ewk_download_job_response_set() since it will
+ be ref'd when assigning to the RefPtr member already.
+
+ * UIProcess/API/efl/ewk_context_download_client.cpp:
+ (didReceiveResponse):
+ * UIProcess/API/efl/ewk_download_job.cpp:
+ (ewk_download_job_response_set):
+ * UIProcess/API/efl/ewk_download_job_private.h: Remove several unimplemented functions.
+
+2012-10-17 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Compilation warning in Ewk_View when accelerated compositing is disabled
+ https://bugs.webkit.org/show_bug.cgi?id=99613
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Fix compilation warning in _ewk_view_smart_calculate() when
+ the ACCELERATED_COMPOSITING flag is not set.
+
+ * UIProcess/API/efl/ewk_view.cpp:
+ (_ewk_view_smart_calculate):
+
+2012-10-17 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Use smart pointers inside Ewk_View
+ https://bugs.webkit.org/show_bug.cgi?id=99611
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Use smart pointers instead of raw ones for several
+ Ewk_View members to avoid handling memory manually.
+
+ * PlatformEfl.cmake:
+ * UIProcess/API/efl/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (_Ewk_View_Private_Data::_Ewk_View_Private_Data):
+ (_Ewk_View_Private_Data::~_Ewk_View_Private_Data):
+ (ewk_view_cursor_set):
+ (ewk_view_color_picker_dismiss):
+ (ewk_view_color_picker_color_set):
+
+2012-10-17 Byungwoo Lee <bw80.lee@samsung.com>
+
+ Fix build warnings : -Wunused-parameter, -Wunused-variable
+ https://bugs.webkit.org/show_bug.cgi?id=99539
+
+ Reviewed by Kentaro Hara.
+
+ Fix build warnings about unused parameter or unused variable when
+ WTF_USE_TILED_BACKING_STORE option is enabled.
+
+ * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
+ (WebKit::CoordinatedBackingStore::paintToTextureMapper):
+ * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
+ (WebKit::LayerTreeRenderer::createLayer):
+ * UIProcess/DrawingAreaProxy.cpp:
+ (WebKit::DrawingAreaProxy::didReceiveLayerTreeCoordinatorProxyMessage):
+ * UIProcess/DrawingAreaProxy.h:
+ (WebKit::DrawingAreaProxy::setVisibleContentsRect):
+ (WebKit::DrawingAreaProxy::createTileForLayer):
+ (WebKit::DrawingAreaProxy::updateTileForLayer):
+ (WebKit::DrawingAreaProxy::removeTileForLayer):
+ (WebKit::DrawingAreaProxy::update):
+ (WebKit::DrawingAreaProxy::didUpdateBackingStoreState):
+ (WebKit::DrawingAreaProxy::enterAcceleratedCompositingMode):
+ (WebKit::DrawingAreaProxy::exitAcceleratedCompositingMode):
+ (WebKit::DrawingAreaProxy::updateAcceleratedCompositingMode):
+ * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
+ (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintEnd):
+ * WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.cpp:
+ (WebKit::CoordinatedTile::paint):
+ * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
+ (WebKit::LayerTreeCoordinator::scrollNonCompositedContents):
+ (WebKit::LayerTreeCoordinator::notifyAnimationStarted):
+ * WebProcess/WebPage/LayerTreeHost.h:
+ (WebKit::LayerTreeHost::setVisibleContentsRect):
+ (WebKit::LayerTreeHost::setVisibleContentsRectForLayer):
+
+2012-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Don't use the C API internally in WebKitDownload
+ https://bugs.webkit.org/show_bug.cgi?id=96773
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Using the C++ classes directly instead of the C API wrappers we
+ avoid a lot of toImpl/toAPI casts, string conversions and
+ allocations. The code is also a lot simpler and easier to read.
+
+ * UIProcess/API/gtk/WebKitDownload.cpp:
+ (_WebKitDownloadPrivate):
+ (webkitDownloadCreate):
+ (webkit_download_get_request):
+ (webkit_download_cancel):
+ * UIProcess/API/gtk/WebKitDownloadPrivate.h:
+ * UIProcess/API/gtk/WebKitWebContext.cpp:
+ (webkit_web_context_download_uri):
+ (webkitWebContextGetOrCreateDownload):
+
+2012-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Don't use the C API internally in WebKitCookieManager
+ https://bugs.webkit.org/show_bug.cgi?id=96772
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Using the C++ classes directly instead of the C API wrappers we
+ avoid a lot of toImpl/toAPI casts, string conversions and
+ allocations. The code is also a lot simpler and easier to read.
+
+ * UIProcess/API/gtk/WebKitCookieManager.cpp:
+ (_WebKitCookieManagerPrivate):
+ (webkitCookieManagerFinalize):
+ (webkitCookieManagerCreate):
+ (webkit_cookie_manager_set_persistent_storage):
+ (webkit_cookie_manager_set_accept_policy):
+ (webkit_cookie_manager_get_accept_policy):
+ (webkitCookieManagerGetDomainsWithCookiesCallback):
+ (webkit_cookie_manager_get_domains_with_cookies):
+ (webkit_cookie_manager_delete_cookies_for_domain):
+ (webkit_cookie_manager_delete_all_cookies):
+ * UIProcess/API/gtk/WebKitCookieManagerPrivate.h:
+ * UIProcess/API/gtk/WebKitWebContext.cpp:
+ (webkit_web_context_get_cookie_manager):
+
+2012-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Don't use the C API internally in WebKitContextMenu
+ https://bugs.webkit.org/show_bug.cgi?id=96770
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Using the C++ classes directly instead of the C API wrappers we
+ avoid a lot of toImpl/toAPI casts, string conversions and
+ allocations. The code is also a lot simpler and easier to read.
+
+ * UIProcess/API/gtk/WebKitContextMenu.cpp:
+ (webkitContextMenuCreate):
+ * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
+ (webkitContextMenuItemCreate):
+ * UIProcess/API/gtk/WebKitContextMenuItemPrivate.h:
+ * UIProcess/API/gtk/WebKitContextMenuPrivate.h:
+ * UIProcess/API/gtk/WebKitWebView.cpp:
+ (webkitWebViewPopulateContextMenu):
+
+2012-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Don't use the C API internally in WebKitBackForwardList
+ https://bugs.webkit.org/show_bug.cgi?id=96769
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Using the C++ classes directly instead of the C API wrappers we
+ avoid a lot of toImpl/toAPI casts, string conversions and
+ allocations. The code is also a lot simpler and easier to read.
+
+ * UIProcess/API/gtk/WebKitBackForwardList.cpp:
+ (_WebKitBackForwardListPrivate):
+ (webkitBackForwardListGetOrCreateItem):
+ (webkitBackForwardListCreateList):
+ (webkitBackForwardListCreate):
+ (webkitBackForwardListChanged):
+ (webkit_back_forward_list_get_current_item):
+ (webkit_back_forward_list_get_back_item):
+ (webkit_back_forward_list_get_forward_item):
+ (webkit_back_forward_list_get_nth_item):
+ (webkit_back_forward_list_get_length):
+ (webkit_back_forward_list_get_back_list):
+ (webkit_back_forward_list_get_back_list_with_limit):
+ (webkit_back_forward_list_get_forward_list):
+ (webkit_back_forward_list_get_forward_list_with_limit):
+ * UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
+ (_WebKitBackForwardListItemPrivate):
+ (webkitBackForwardListItemFinalized):
+ (webkitBackForwardListItemGetOrCreate):
+ (webkitBackForwardListItemGetItem):
+ (webkit_back_forward_list_item_get_uri):
+ (webkit_back_forward_list_item_get_title):
+ (webkit_back_forward_list_item_get_original_uri):
+ * UIProcess/API/gtk/WebKitBackForwardListPrivate.h:
+ * UIProcess/API/gtk/WebKitLoaderClient.cpp:
+ (didChangeBackForwardList):
+ * UIProcess/API/gtk/WebKitWebView.cpp:
+ (webkitWebViewConstructed):
+ (webkit_web_view_go_to_back_forward_list_item):
+
+2012-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Don't use the C API internally in WebKitURISchemeRequest
+ https://bugs.webkit.org/show_bug.cgi?id=96787
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Using the C++ classes directly instead of the C API wrappers we
+ avoid a lot of toImpl/toAPI casts, string conversions and
+ allocations. The code is also a lot simpler and easier to read.
+
+ * UIProcess/API/gtk/WebKitRequestManagerClient.cpp:
+ (didReceiveURIRequest):
+ * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
+ (_WebKitURISchemeRequestPrivate):
+ (webkitURISchemeRequestCreate):
+ (webkit_uri_scheme_request_get_web_view):
+ (webkitURISchemeRequestReadCallback):
+ * UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h:
+
+2012-10-17 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Make sure the favicon database path is set only once
+ https://bugs.webkit.org/show_bug.cgi?id=99597
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Make sure the icon database path is set only once by checking
+ that the database is not already open before settign the path.
+ This avoids printing error message on stderr.
+
+ * UIProcess/API/efl/ewk_context.cpp:
+ (ewk_context_favicon_database_get):
+
+2012-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Don't use the C API internally in WebKitWebInspector
+ https://bugs.webkit.org/show_bug.cgi?id=96786
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Using the C++ classes directly instead of the C API wrappers we
+ avoid a lot of toImpl/toAPI casts, string conversions and
+ allocations. The code is also a lot simpler and easier to read.
+
+ * UIProcess/API/gtk/WebKitWebInspector.cpp:
+ (_WebKitWebInspectorPrivate):
+ (webkitWebInspectorFinalize):
+ (webkitWebInspectorCreate):
+ (webkit_web_inspector_get_web_view):
+ (webkit_web_inspector_is_attached):
+ (webkit_web_inspector_attach):
+ (webkit_web_inspector_detach):
+ (webkit_web_inspector_show):
+ (webkit_web_inspector_close):
+ (webkit_web_inspector_get_attached_height):
+ * UIProcess/API/gtk/WebKitWebInspectorPrivate.h:
+ * UIProcess/API/gtk/WebKitWebView.cpp:
+ (webkit_web_view_get_inspector):
+
+2012-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Don't use the C API internally in WebKitGeolocation classes
+ https://bugs.webkit.org/show_bug.cgi?id=96778
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Using the C++ classes directly instead of the C API wrappers we
+ avoid a lot of toImpl/toAPI casts, string conversions and
+ allocations. The code is also a lot simpler and easier to read.
+
+ * UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp:
+ (_WebKitGeolocationPermissionRequestPrivate):
+ (webkitGeolocationPermissionRequestAllow):
+ (webkitGeolocationPermissionRequestDeny):
+ (webkitGeolocationPermissionRequestFinalize):
+ (webkitGeolocationPermissionRequestCreate):
+ * UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h:
+ * UIProcess/API/gtk/WebKitGeolocationProvider.cpp:
+ (WebKitGeolocationProvider::create):
+ (WebKitGeolocationProvider::WebKitGeolocationProvider):
+ (WebKitGeolocationProvider::notifyPositionChanged):
+ (WebKitGeolocationProvider::notifyErrorOccurred):
+ * UIProcess/API/gtk/WebKitGeolocationProvider.h:
+ (WebKitGeolocationProvider):
+ * UIProcess/API/gtk/WebKitUIClient.cpp:
+ (decidePolicyForGeolocationPermissionRequest):
+ * UIProcess/API/gtk/WebKitWebContext.cpp:
+ (createDefaultWebContext):
+
2012-10-17 Grzegorz Czajkowski <g.czajkowski@samsung.com>
[WK2][EFL] Add unit tests for Spelling
diff --git a/Source/WebKit2/GNUmakefile.list.am b/Source/WebKit2/GNUmakefile.list.am
index 371f4f558..f1e80d57a 100644
--- a/Source/WebKit2/GNUmakefile.list.am
+++ b/Source/WebKit2/GNUmakefile.list.am
@@ -257,6 +257,10 @@ webkit2_sources += \
Source/WebKit2/Platform/CoreIPC/DataReference.cpp \
Source/WebKit2/Platform/CoreIPC/DataReference.h \
Source/WebKit2/Platform/CoreIPC/HandleMessage.h \
+ Source/WebKit2/Platform/CoreIPC/MessageDecoder.cpp \
+ Source/WebKit2/Platform/CoreIPC/MessageDecoder.h \
+ Source/WebKit2/Platform/CoreIPC/MessageEncoder.cpp \
+ Source/WebKit2/Platform/CoreIPC/MessageEncoder.h \
Source/WebKit2/Platform/CoreIPC/MessageID.h \
Source/WebKit2/Platform/CoreIPC/MessageReceiver.h \
Source/WebKit2/Platform/CoreIPC/MessageReceiverMap.cpp \
@@ -1219,6 +1223,10 @@ webkit2_plugin_process_sources += \
Source/WebKit2/Platform/CoreIPC/DataReference.cpp \
Source/WebKit2/Platform/CoreIPC/DataReference.h \
Source/WebKit2/Platform/CoreIPC/HandleMessage.h \
+ Source/WebKit2/Platform/CoreIPC/MessageDecoder.cpp \
+ Source/WebKit2/Platform/CoreIPC/MessageDecoder.h \
+ Source/WebKit2/Platform/CoreIPC/MessageEncoder.cpp \
+ Source/WebKit2/Platform/CoreIPC/MessageEncoder.h \
Source/WebKit2/Platform/CoreIPC/MessageID.h \
Source/WebKit2/Platform/CoreIPC/MessageReceiver.h \
Source/WebKit2/Platform/CoreIPC/MessageReceiverMap.cpp \
diff --git a/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.cpp b/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.cpp
index f49076a6d..9d7ff3bcb 100644
--- a/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.cpp
+++ b/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.cpp
@@ -31,9 +31,10 @@
namespace CoreIPC {
-ArgumentDecoder::ArgumentDecoder(const uint8_t* buffer, size_t bufferSize)
+PassOwnPtr<ArgumentDecoder> ArgumentDecoder::create(const uint8_t* buffer, size_t bufferSize)
{
- initialize(buffer, bufferSize);
+ Deque<Attachment> attachments;
+ return adoptPtr(new ArgumentDecoder(buffer, bufferSize, attachments));
}
ArgumentDecoder::ArgumentDecoder(const uint8_t* buffer, size_t bufferSize, Deque<Attachment>& attachments)
@@ -76,9 +77,6 @@ void ArgumentDecoder::initialize(const uint8_t* buffer, size_t bufferSize)
m_bufferPos = m_buffer;
m_bufferEnd = m_buffer + bufferSize;
memcpy(m_buffer, buffer, bufferSize);
-
- // Decode the destination ID.
- decodeUInt64(m_destinationID);
}
static inline bool alignedBufferIsLargeEnoughToContain(const uint8_t* alignedPosition, const uint8_t* bufferEnd, size_t size)
diff --git a/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.h b/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.h
index 53f9f8c6c..3c81eb377 100644
--- a/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.h
+++ b/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.h
@@ -29,6 +29,7 @@
#include "ArgumentCoder.h"
#include "Attachment.h"
#include <wtf/Deque.h>
+#include <wtf/PassOwnPtr.h>
#include <wtf/TypeTraits.h>
#include <wtf/Vector.h>
@@ -38,9 +39,8 @@ class DataReference;
class ArgumentDecoder {
public:
- ArgumentDecoder(const uint8_t* buffer, size_t bufferSize);
- ArgumentDecoder(const uint8_t* buffer, size_t bufferSize, Deque<Attachment>&);
- ~ArgumentDecoder();
+ static PassOwnPtr<ArgumentDecoder> create(const uint8_t* buffer, size_t bufferSize);
+ virtual ~ArgumentDecoder();
uint64_t destinationID() const { return m_destinationID; }
@@ -103,17 +103,19 @@ public:
void debug();
#endif
-private:
- ArgumentDecoder(const ArgumentDecoder*);
- ArgumentDecoder* operator=(const ArgumentDecoder*);
+protected:
+ ArgumentDecoder(const uint8_t* buffer, size_t bufferSize, Deque<Attachment>&);
void initialize(const uint8_t* buffer, size_t bufferSize);
bool alignBufferPosition(unsigned alignment, size_t size);
bool bufferIsLargeEnoughToContain(unsigned alignment, size_t size) const;
+// FIXME: Move m_destinationID to MessageDecoder.
+protected:
uint64_t m_destinationID;
+private:
uint8_t* m_allocatedBase;
uint8_t* m_buffer;
uint8_t* m_bufferPos;
diff --git a/Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.cpp b/Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.cpp
index 96688a172..9df51ec19 100644
--- a/Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.cpp
+++ b/Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.cpp
@@ -32,19 +32,17 @@
namespace CoreIPC {
-PassOwnPtr<ArgumentEncoder> ArgumentEncoder::create(uint64_t destinationID)
+PassOwnPtr<ArgumentEncoder> ArgumentEncoder::create()
{
- return adoptPtr(new ArgumentEncoder(destinationID));
+ return adoptPtr(new ArgumentEncoder);
}
-ArgumentEncoder::ArgumentEncoder(uint64_t destinationID)
+ArgumentEncoder::ArgumentEncoder()
: m_buffer(0)
, m_bufferPointer(0)
, m_bufferSize(0)
, m_bufferCapacity(0)
{
- // Encode the destination ID.
- encodeUInt64(destinationID);
}
ArgumentEncoder::~ArgumentEncoder()
diff --git a/Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.h b/Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.h
index b734d7531..9bfea0304 100644
--- a/Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.h
+++ b/Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.h
@@ -39,8 +39,8 @@ class DataReference;
class ArgumentEncoder {
public:
- static PassOwnPtr<ArgumentEncoder> create(uint64_t destinationID);
- ~ArgumentEncoder();
+ static PassOwnPtr<ArgumentEncoder> create();
+ virtual ~ArgumentEncoder();
void encodeFixedLengthData(const uint8_t*, size_t, unsigned alignment);
void encodeVariableLengthByteArray(const DataReference&);
@@ -77,8 +77,10 @@ public:
void debug();
#endif
+protected:
+ ArgumentEncoder();
+
private:
- explicit ArgumentEncoder(uint64_t destinationID);
uint8_t* grow(unsigned alignment, size_t size);
uint8_t* m_buffer;
diff --git a/Source/WebKit2/Platform/CoreIPC/Connection.cpp b/Source/WebKit2/Platform/CoreIPC/Connection.cpp
index 02634874c..98f355934 100644
--- a/Source/WebKit2/Platform/CoreIPC/Connection.cpp
+++ b/Source/WebKit2/Platform/CoreIPC/Connection.cpp
@@ -283,18 +283,18 @@ void Connection::markCurrentlyDispatchedMessageAsInvalid()
m_didReceiveInvalidMessage = true;
}
-PassOwnPtr<ArgumentEncoder> Connection::createSyncMessageArgumentEncoder(uint64_t destinationID, uint64_t& syncRequestID)
+PassOwnPtr<MessageEncoder> Connection::createSyncMessageEncoder(const CString& messageReceiverName, const CString& messageName, uint64_t destinationID, uint64_t& syncRequestID)
{
- OwnPtr<ArgumentEncoder> argumentEncoder = ArgumentEncoder::create(destinationID);
+ OwnPtr<MessageEncoder> encoder = MessageEncoder::create(messageReceiverName, messageName, destinationID);
// Encode the sync request ID.
syncRequestID = ++m_syncRequestID;
- argumentEncoder->encode(syncRequestID);
+ encoder->encode(syncRequestID);
- return argumentEncoder.release();
+ return encoder.release();
}
-bool Connection::sendMessage(MessageID messageID, PassOwnPtr<ArgumentEncoder> arguments, unsigned messageSendFlags)
+bool Connection::sendMessage(MessageID messageID, PassOwnPtr<MessageEncoder> encoder, unsigned messageSendFlags)
{
if (!isValid())
return false;
@@ -305,19 +305,19 @@ bool Connection::sendMessage(MessageID messageID, PassOwnPtr<ArgumentEncoder> ar
messageID = messageID.messageIDWithAddedFlags(MessageID::DispatchMessageWhenWaitingForSyncReply);
MutexLocker locker(m_outgoingMessagesLock);
- m_outgoingMessages.append(OutgoingMessage(messageID, arguments));
+ m_outgoingMessages.append(OutgoingMessage(messageID, encoder));
// FIXME: We should add a boolean flag so we don't call this when work has already been scheduled.
m_connectionQueue.dispatch(WTF::bind(&Connection::sendOutgoingMessages, this));
return true;
}
-bool Connection::sendSyncReply(PassOwnPtr<ArgumentEncoder> arguments)
+bool Connection::sendSyncReply(PassOwnPtr<MessageEncoder> encoder)
{
- return sendMessage(MessageID(CoreIPCMessage::SyncMessageReply), arguments);
+ return sendMessage(MessageID(CoreIPCMessage::SyncMessageReply), encoder);
}
-PassOwnPtr<ArgumentDecoder> Connection::waitForMessage(MessageID messageID, uint64_t destinationID, double timeout)
+PassOwnPtr<MessageDecoder> Connection::waitForMessage(MessageID messageID, uint64_t destinationID, double timeout)
{
// First, check if this message is already in the incoming messages queue.
{
@@ -327,10 +327,10 @@ PassOwnPtr<ArgumentDecoder> Connection::waitForMessage(MessageID messageID, uint
IncomingMessage& message = *it;
if (message.messageID() == messageID && message.arguments()->destinationID() == destinationID) {
- OwnPtr<ArgumentDecoder> arguments = message.releaseArguments();
+ OwnPtr<MessageDecoder> decoder = message.releaseArguments();
m_incomingMessages.remove(it);
- return arguments.release();
+ return decoder.release();
}
}
}
@@ -353,14 +353,14 @@ PassOwnPtr<ArgumentDecoder> Connection::waitForMessage(MessageID messageID, uint
while (true) {
MutexLocker locker(m_waitForMessageMutex);
- HashMap<std::pair<unsigned, uint64_t>, ArgumentDecoder*>::iterator it = m_waitForMessageMap.find(messageAndDestination);
+ HashMap<std::pair<unsigned, uint64_t>, MessageDecoder*>::iterator it = m_waitForMessageMap.find(messageAndDestination);
if (it->value) {
// FIXME: m_waitForMessageMap should really hold OwnPtrs to
// ArgumentDecoders, but HashMap doesn't currently support OwnPtrs.
- OwnPtr<ArgumentDecoder> arguments = adoptPtr(it->value);
+ OwnPtr<MessageDecoder> decoder = adoptPtr(it->value);
m_waitForMessageMap.remove(it);
- return arguments.release();
+ return decoder.release();
}
// Now we wait.
@@ -375,7 +375,7 @@ PassOwnPtr<ArgumentDecoder> Connection::waitForMessage(MessageID messageID, uint
return nullptr;
}
-PassOwnPtr<ArgumentDecoder> Connection::sendSyncMessage(MessageID messageID, uint64_t syncRequestID, PassOwnPtr<ArgumentEncoder> encoder, double timeout, unsigned syncSendFlags)
+PassOwnPtr<MessageDecoder> Connection::sendSyncMessage(MessageID messageID, uint64_t syncRequestID, PassOwnPtr<MessageEncoder> encoder, double timeout, unsigned syncSendFlags)
{
// We only allow sending sync messages from the client run loop.
ASSERT(RunLoop::current() == m_clientRunLoop);
@@ -402,7 +402,7 @@ PassOwnPtr<ArgumentDecoder> Connection::sendSyncMessage(MessageID messageID, uin
// Then wait for a reply. Waiting for a reply could involve dispatching incoming sync messages, so
// keep an extra reference to the connection here in case it's invalidated.
RefPtr<Connection> protect(this);
- OwnPtr<ArgumentDecoder> reply = waitForSyncReply(syncRequestID, timeout, syncSendFlags);
+ OwnPtr<MessageDecoder> reply = waitForSyncReply(syncRequestID, timeout, syncSendFlags);
// Finally, pop the pending sync reply information.
{
@@ -417,7 +417,7 @@ PassOwnPtr<ArgumentDecoder> Connection::sendSyncMessage(MessageID messageID, uin
return reply.release();
}
-PassOwnPtr<ArgumentDecoder> Connection::waitForSyncReply(uint64_t syncRequestID, double timeout, unsigned syncSendFlags)
+PassOwnPtr<MessageDecoder> Connection::waitForSyncReply(uint64_t syncRequestID, double timeout, unsigned syncSendFlags)
{
// Use a really long timeout.
if (timeout == NoTimeout)
@@ -474,7 +474,7 @@ PassOwnPtr<ArgumentDecoder> Connection::waitForSyncReply(uint64_t syncRequestID,
return nullptr;
}
-void Connection::processIncomingSyncReply(PassOwnPtr<ArgumentDecoder> arguments)
+void Connection::processIncomingSyncReply(PassOwnPtr<MessageDecoder> decoder)
{
MutexLocker locker(m_syncReplyStateMutex);
@@ -483,12 +483,12 @@ void Connection::processIncomingSyncReply(PassOwnPtr<ArgumentDecoder> arguments)
for (size_t i = m_pendingSyncReplies.size(); i > 0; --i) {
PendingSyncReply& pendingSyncReply = m_pendingSyncReplies[i - 1];
- if (pendingSyncReply.syncRequestID != arguments->destinationID())
+ if (pendingSyncReply.syncRequestID != decoder->destinationID())
continue;
ASSERT(!pendingSyncReply.replyDecoder);
- pendingSyncReply.replyDecoder = arguments.leakPtr();
+ pendingSyncReply.replyDecoder = decoder.leakPtr();
pendingSyncReply.didReceiveReply = true;
// We got a reply to the last send message, wake up the client run loop so it can be processed.
@@ -502,15 +502,15 @@ void Connection::processIncomingSyncReply(PassOwnPtr<ArgumentDecoder> arguments)
// This can happen if the send timed out, so it's fine to ignore.
}
-void Connection::processIncomingMessage(MessageID messageID, PassOwnPtr<ArgumentDecoder> arguments)
+void Connection::processIncomingMessage(MessageID messageID, PassOwnPtr<MessageDecoder> decoder)
{
// Check if this is a sync reply.
if (messageID == MessageID(CoreIPCMessage::SyncMessageReply)) {
- processIncomingSyncReply(arguments);
+ processIncomingSyncReply(decoder);
return;
}
- IncomingMessage incomingMessage(messageID, arguments);
+ IncomingMessage incomingMessage(messageID, decoder);
// Check if this is a sync message or if it's a message that should be dispatched even when waiting for
// a sync reply. If it is, and we're waiting for a sync reply this message needs to be dispatched.
@@ -522,7 +522,7 @@ void Connection::processIncomingMessage(MessageID messageID, PassOwnPtr<Argument
{
MutexLocker locker(m_waitForMessageMutex);
- HashMap<std::pair<unsigned, uint64_t>, ArgumentDecoder*>::iterator it = m_waitForMessageMap.find(std::make_pair(messageID.toInt(), incomingMessage.destinationID()));
+ HashMap<std::pair<unsigned, uint64_t>, MessageDecoder*>::iterator it = m_waitForMessageMap.find(std::make_pair(messageID.toInt(), incomingMessage.destinationID()));
if (it != m_waitForMessageMap.end()) {
it->value = incomingMessage.releaseArguments().leakPtr();
ASSERT(it->value);
@@ -614,27 +614,28 @@ void Connection::sendOutgoingMessages()
}
}
-void Connection::dispatchSyncMessage(MessageID messageID, ArgumentDecoder* arguments)
+void Connection::dispatchSyncMessage(MessageID messageID, MessageDecoder* decoder)
{
ASSERT(messageID.isSync());
uint64_t syncRequestID = 0;
- if (!arguments->decodeUInt64(syncRequestID) || !syncRequestID) {
+ if (!decoder->decodeUInt64(syncRequestID) || !syncRequestID) {
// We received an invalid sync message.
- arguments->markInvalid();
+ decoder->markInvalid();
return;
}
- OwnPtr<ArgumentEncoder> replyEncoder = ArgumentEncoder::create(syncRequestID);
+ // FIXME: ArgumentEncoder should be MessageEncoder here.
+ OwnPtr<ArgumentEncoder> replyEncoder = MessageEncoder::create("", "", syncRequestID);
// Hand off both the decoder and encoder to the client.
- m_client->didReceiveSyncMessage(this, messageID, arguments, replyEncoder);
+ m_client->didReceiveSyncMessage(this, messageID, decoder, replyEncoder);
// FIXME: If the message was invalid, we should send back a SyncMessageError.
- ASSERT(!arguments->isInvalid());
+ ASSERT(!decoder->isInvalid());
if (replyEncoder)
- sendSyncReply(replyEncoder.release());
+ sendSyncReply(adoptPtr(static_cast<MessageEncoder*>(replyEncoder.leakPtr())));
}
void Connection::didFailToSendSyncMessage()
@@ -653,18 +654,18 @@ void Connection::enqueueIncomingMessage(IncomingMessage& incomingMessage)
m_clientRunLoop->dispatch(WTF::bind(&Connection::dispatchOneMessage, this));
}
-void Connection::dispatchMessage(MessageID messageID, ArgumentDecoder* argumentDecoder)
+void Connection::dispatchMessage(MessageID messageID, MessageDecoder* decoder)
{
// Try the message receiver map first.
- if (m_messageReceiverMap.dispatchMessage(this, messageID, argumentDecoder))
+ if (m_messageReceiverMap.dispatchMessage(this, messageID, decoder))
return;
- m_client->didReceiveMessage(this, messageID, argumentDecoder);
+ m_client->didReceiveMessage(this, messageID, decoder);
}
void Connection::dispatchMessage(IncomingMessage& message)
{
- OwnPtr<ArgumentDecoder> arguments = message.releaseArguments();
+ OwnPtr<MessageDecoder> arguments = message.releaseArguments();
// If there's no client, return. We do this after calling releaseArguments so that
// the ArgumentDecoder message will be freed.
diff --git a/Source/WebKit2/Platform/CoreIPC/Connection.h b/Source/WebKit2/Platform/CoreIPC/Connection.h
index 652bcfe30..7313b7fbb 100644
--- a/Source/WebKit2/Platform/CoreIPC/Connection.h
+++ b/Source/WebKit2/Platform/CoreIPC/Connection.h
@@ -28,15 +28,16 @@
#ifndef Connection_h
#define Connection_h
-#include "ArgumentDecoder.h"
-#include "ArgumentEncoder.h"
#include "Arguments.h"
+#include "MessageDecoder.h"
+#include "MessageEncoder.h"
#include "MessageReceiver.h"
#include "MessageReceiverMap.h"
#include "WorkQueue.h"
#include <wtf/PassRefPtr.h>
#include <wtf/OwnPtr.h>
#include <wtf/Threading.h>
+#include <wtf/text/CString.h>
#if OS(DARWIN)
#include <mach/mach_port.h>
@@ -190,9 +191,9 @@ public:
template<typename T> bool sendSync(const T& message, const typename T::Reply& reply, uint64_t destinationID, double timeout = NoTimeout, unsigned syncSendFlags = 0);
template<typename T> bool waitForAndDispatchImmediately(uint64_t destinationID, double timeout);
- PassOwnPtr<ArgumentEncoder> createSyncMessageArgumentEncoder(uint64_t destinationID, uint64_t& syncRequestID);
- bool sendMessage(MessageID, PassOwnPtr<ArgumentEncoder>, unsigned messageSendFlags = 0);
- bool sendSyncReply(PassOwnPtr<ArgumentEncoder>);
+ PassOwnPtr<MessageEncoder> createSyncMessageEncoder(const CString& messageReceiverName, const CString& messageName, uint64_t destinationID, uint64_t& syncRequestID);
+ bool sendMessage(MessageID, PassOwnPtr<MessageEncoder>, unsigned messageSendFlags = 0);
+ bool sendSyncReply(PassOwnPtr<MessageEncoder>);
// FIXME: These variants of send, sendSync and waitFor are all deprecated.
// All clients should move to the overloads that take a message type.
@@ -242,7 +243,7 @@ private:
};
public:
- typedef Message<ArgumentEncoder> OutgoingMessage;
+ typedef Message<MessageEncoder> OutgoingMessage;
private:
Connection(Identifier, bool isServer, Client*, WebCore::RunLoop* clientRunLoop);
@@ -251,14 +252,14 @@ private:
bool isValid() const { return m_client; }
- PassOwnPtr<ArgumentDecoder> waitForMessage(MessageID, uint64_t destinationID, double timeout);
+ PassOwnPtr<MessageDecoder> waitForMessage(MessageID, uint64_t destinationID, double timeout);
- PassOwnPtr<ArgumentDecoder> sendSyncMessage(MessageID, uint64_t syncRequestID, PassOwnPtr<ArgumentEncoder>, double timeout, unsigned syncSendFlags = 0);
- PassOwnPtr<ArgumentDecoder> waitForSyncReply(uint64_t syncRequestID, double timeout, unsigned syncSendFlags);
+ PassOwnPtr<MessageDecoder> sendSyncMessage(MessageID, uint64_t syncRequestID, PassOwnPtr<MessageEncoder>, double timeout, unsigned syncSendFlags = 0);
+ PassOwnPtr<MessageDecoder> waitForSyncReply(uint64_t syncRequestID, double timeout, unsigned syncSendFlags);
// Called on the connection work queue.
- void processIncomingMessage(MessageID, PassOwnPtr<ArgumentDecoder>);
- void processIncomingSyncReply(PassOwnPtr<ArgumentDecoder>);
+ void processIncomingMessage(MessageID, PassOwnPtr<MessageDecoder>);
+ void processIncomingSyncReply(PassOwnPtr<MessageDecoder>);
void addQueueClientOnWorkQueue(QueueClient*);
void removeQueueClientOnWorkQueue(QueueClient*);
@@ -266,17 +267,17 @@ private:
bool canSendOutgoingMessages() const;
bool platformCanSendOutgoingMessages() const;
void sendOutgoingMessages();
- bool sendOutgoingMessage(MessageID, PassOwnPtr<ArgumentEncoder>);
+ bool sendOutgoingMessage(MessageID, PassOwnPtr<MessageEncoder>);
void connectionDidClose();
- typedef Message<ArgumentDecoder> IncomingMessage;
+ typedef Message<MessageDecoder> IncomingMessage;
// Called on the listener thread.
void dispatchConnectionDidClose();
void dispatchOneMessage();
void dispatchMessage(IncomingMessage&);
- void dispatchMessage(MessageID, ArgumentDecoder*);
- void dispatchSyncMessage(MessageID, ArgumentDecoder*);
+ void dispatchMessage(MessageID, MessageDecoder*);
+ void dispatchSyncMessage(MessageID, MessageDecoder*);
void didFailToSendSyncMessage();
// Can be called on any thread.
@@ -312,7 +313,7 @@ private:
ThreadCondition m_waitForMessageCondition;
Mutex m_waitForMessageMutex;
- HashMap<std::pair<unsigned, uint64_t>, ArgumentDecoder*> m_waitForMessageMap;
+ HashMap<std::pair<unsigned, uint64_t>, MessageDecoder*> m_waitForMessageMap;
// Represents a sync request for which we're waiting on a reply.
struct PendingSyncReply {
@@ -321,7 +322,7 @@ private:
// The reply decoder, will be null if there was an error processing the sync
// message on the other side.
- ArgumentDecoder* replyDecoder;
+ MessageDecoder* replyDecoder;
// Will be set to true once a reply has been received or an error occurred.
bool didReceiveReply;
@@ -340,9 +341,9 @@ private:
{
}
- PassOwnPtr<ArgumentDecoder> releaseReplyDecoder()
+ PassOwnPtr<MessageDecoder> releaseReplyDecoder()
{
- OwnPtr<ArgumentDecoder> reply = adoptPtr(replyDecoder);
+ OwnPtr<MessageDecoder> reply = adoptPtr(replyDecoder);
replyDecoder = 0;
return reply.release();
@@ -388,7 +389,7 @@ private:
Vector<uint8_t> m_readBuffer;
OVERLAPPED m_readState;
- OwnPtr<ArgumentEncoder> m_pendingWriteArguments;
+ OwnPtr<MessageEncoder> m_pendingWriteEncoder;
OVERLAPPED m_writeState;
HANDLE m_connectionPipe;
#elif USE(UNIX_DOMAIN_SOCKETS)
@@ -409,22 +410,22 @@ private:
template<typename T> bool Connection::send(const T& message, uint64_t destinationID, unsigned messageSendFlags)
{
- OwnPtr<ArgumentEncoder> argumentEncoder = ArgumentEncoder::create(destinationID);
- argumentEncoder->encode(message);
+ OwnPtr<MessageEncoder> encoder = MessageEncoder::create("", "", destinationID);
+ encoder->encode(message);
- return sendMessage(MessageID(T::messageID), argumentEncoder.release(), messageSendFlags);
+ return sendMessage(MessageID(T::messageID), encoder.release(), messageSendFlags);
}
template<typename T> bool Connection::sendSync(const T& message, const typename T::Reply& reply, uint64_t destinationID, double timeout, unsigned syncSendFlags)
{
uint64_t syncRequestID = 0;
- OwnPtr<ArgumentEncoder> argumentEncoder = createSyncMessageArgumentEncoder(destinationID, syncRequestID);
+ OwnPtr<MessageEncoder> encoder = createSyncMessageEncoder("", "", destinationID, syncRequestID);
// Encode the rest of the input arguments.
- argumentEncoder->encode(message);
+ encoder->encode(message);
// Now send the message and wait for a reply.
- OwnPtr<ArgumentDecoder> replyDecoder = sendSyncMessage(MessageID(T::messageID), syncRequestID, argumentEncoder.release(), timeout, syncSendFlags);
+ OwnPtr<MessageDecoder> replyDecoder = sendSyncMessage(MessageID(T::messageID), syncRequestID, encoder.release(), timeout, syncSendFlags);
if (!replyDecoder)
return false;
@@ -434,7 +435,7 @@ template<typename T> bool Connection::sendSync(const T& message, const typename
template<typename T> bool Connection::waitForAndDispatchImmediately(uint64_t destinationID, double timeout)
{
- OwnPtr<ArgumentDecoder> decoder = waitForMessage(MessageID(T::messageID), destinationID, timeout);
+ OwnPtr<MessageDecoder> decoder = waitForMessage(MessageID(T::messageID), destinationID, timeout);
if (!decoder)
return false;
@@ -449,13 +450,13 @@ template<typename E, typename T, typename U>
inline bool Connection::deprecatedSendSync(E messageID, uint64_t destinationID, const T& arguments, const U& reply, double timeout)
{
uint64_t syncRequestID = 0;
- OwnPtr<ArgumentEncoder> argumentEncoder = createSyncMessageArgumentEncoder(destinationID, syncRequestID);
+ OwnPtr<MessageEncoder> encoder = createSyncMessageEncoder("", "", destinationID, syncRequestID);
// Encode the input arguments.
- argumentEncoder->encode(arguments);
+ encoder->encode(arguments);
// Now send the message and wait for a reply.
- OwnPtr<ArgumentDecoder> replyDecoder = sendSyncMessage(MessageID(messageID), syncRequestID, argumentEncoder.release(), timeout);
+ OwnPtr<MessageDecoder> replyDecoder = sendSyncMessage(MessageID(messageID), syncRequestID, encoder.release(), timeout);
if (!replyDecoder)
return false;
@@ -466,10 +467,10 @@ inline bool Connection::deprecatedSendSync(E messageID, uint64_t destinationID,
template<typename E, typename T>
bool Connection::deprecatedSend(E messageID, uint64_t destinationID, const T& arguments)
{
- OwnPtr<ArgumentEncoder> argumentEncoder = ArgumentEncoder::create(destinationID);
- argumentEncoder->encode(arguments);
+ OwnPtr<MessageEncoder> encoder = MessageEncoder::create("", "", destinationID);
+ encoder->encode(arguments);
- return sendMessage(MessageID(messageID), argumentEncoder.release());
+ return sendMessage(MessageID(messageID), encoder.release());
}
} // namespace CoreIPC
diff --git a/Source/WebKit2/Platform/CoreIPC/MessageDecoder.cpp b/Source/WebKit2/Platform/CoreIPC/MessageDecoder.cpp
new file mode 100644
index 000000000..e0aef3525
--- /dev/null
+++ b/Source/WebKit2/Platform/CoreIPC/MessageDecoder.cpp
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+#include "MessageDecoder.h"
+
+#include "ArgumentCoders.h"
+#include "DataReference.h"
+#include <wtf/text/CString.h>
+
+namespace CoreIPC {
+
+PassOwnPtr<MessageDecoder> MessageDecoder::create(const DataReference& buffer)
+{
+ Deque<Attachment> attachments;
+ return adoptPtr(new MessageDecoder(buffer, attachments));
+}
+
+PassOwnPtr<MessageDecoder> MessageDecoder::create(const DataReference& buffer, Deque<Attachment>& attachments)
+{
+ return adoptPtr(new MessageDecoder(buffer, attachments));
+}
+
+MessageDecoder::~MessageDecoder()
+{
+}
+
+MessageDecoder::MessageDecoder(const DataReference& buffer, Deque<Attachment>& attachments)
+ : ArgumentDecoder(buffer.data(), buffer.size(), attachments)
+{
+ CString messageReceiverName;
+ if (!decode(messageReceiverName))
+ return;
+
+ CString messageName;
+ if (!decode(messageName))
+ return;
+
+ decodeUInt64(m_destinationID);
+}
+
+} // namespace CoreIPC
diff --git a/Source/WebKit2/Platform/CoreIPC/MessageDecoder.h b/Source/WebKit2/Platform/CoreIPC/MessageDecoder.h
new file mode 100644
index 000000000..848c9b4b9
--- /dev/null
+++ b/Source/WebKit2/Platform/CoreIPC/MessageDecoder.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 MessageDecoder_h
+#define MessageDecoder_h
+
+#include "ArgumentDecoder.h"
+
+namespace CoreIPC {
+
+class DataReference;
+
+class MessageDecoder : public ArgumentDecoder {
+public:
+ static PassOwnPtr<MessageDecoder> create(const DataReference& buffer);
+ static PassOwnPtr<MessageDecoder> create(const DataReference& buffer, Deque<Attachment>&);
+ virtual ~MessageDecoder();
+
+private:
+ MessageDecoder(const DataReference& buffer, Deque<Attachment>&);
+};
+
+} // namespace CoreIPC
+
+#endif // MessageDecoder_h
diff --git a/Source/WebKit2/Platform/CoreIPC/MessageEncoder.cpp b/Source/WebKit2/Platform/CoreIPC/MessageEncoder.cpp
new file mode 100644
index 000000000..53858b6eb
--- /dev/null
+++ b/Source/WebKit2/Platform/CoreIPC/MessageEncoder.cpp
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+#include "MessageEncoder.h"
+
+#include "ArgumentCoders.h"
+
+namespace CoreIPC {
+
+PassOwnPtr<MessageEncoder> MessageEncoder::create(const CString& messageReceiverName, const CString& messageName, uint64_t destinationID)
+{
+ return adoptPtr(new MessageEncoder(messageReceiverName, messageName, destinationID));
+}
+
+MessageEncoder::MessageEncoder(const CString& messageReceiverName, const CString& messageName, uint64_t destinationID)
+{
+ encode(messageReceiverName);
+ encode(messageName);
+ encode(destinationID);
+}
+
+MessageEncoder::~MessageEncoder()
+{
+}
+
+} // namespace CoreIPC
diff --git a/Source/WebKit2/Platform/CoreIPC/MessageEncoder.h b/Source/WebKit2/Platform/CoreIPC/MessageEncoder.h
new file mode 100644
index 000000000..2a87850b9
--- /dev/null
+++ b/Source/WebKit2/Platform/CoreIPC/MessageEncoder.h
@@ -0,0 +1,46 @@
+/*
+ * 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 MessageEncoder_h
+#define MessageEncoder_h
+
+#include "ArgumentEncoder.h"
+#include <wtf/Forward.h>
+
+namespace CoreIPC {
+
+class MessageEncoder : public ArgumentEncoder {
+public:
+ static PassOwnPtr<MessageEncoder> create(const CString& messageReceiverName, const CString& messageName, uint64_t destinationID);
+ virtual ~MessageEncoder();
+
+private:
+ MessageEncoder(const CString& messageReceiverName, const CString& messageName, uint64_t destinationID);
+
+};
+
+} // namespace CoreIPC
+
+#endif // MessageEncoder_h
diff --git a/Source/WebKit2/Platform/CoreIPC/MessageSender.h b/Source/WebKit2/Platform/CoreIPC/MessageSender.h
index e2ba0b56f..74381050c 100644
--- a/Source/WebKit2/Platform/CoreIPC/MessageSender.h
+++ b/Source/WebKit2/Platform/CoreIPC/MessageSender.h
@@ -40,18 +40,18 @@ public:
template<typename U> bool send(const U& message, uint64_t destinationID)
{
- OwnPtr<ArgumentEncoder> argumentEncoder = ArgumentEncoder::create(destinationID);
- argumentEncoder->encode(message);
+ OwnPtr<MessageEncoder> encoder = MessageEncoder::create("", "", destinationID);
+ encoder->encode(message);
- return static_cast<T*>(this)->sendMessage(MessageID(U::messageID), argumentEncoder.release());
+ return static_cast<T*>(this)->sendMessage(MessageID(U::messageID), encoder.release());
}
- bool sendMessage(MessageID messageID, PassOwnPtr<ArgumentEncoder> argumentEncoder)
+ bool sendMessage(MessageID messageID, PassOwnPtr<MessageEncoder> encoder)
{
Connection* connection = static_cast<T*>(this)->connection();
ASSERT(connection);
- return connection->sendMessage(messageID, argumentEncoder);
+ return connection->sendMessage(messageID, encoder);
}
template<typename U> bool sendSync(const U& message, const typename U::Reply& reply, double timeout = Connection::NoTimeout)
diff --git a/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp b/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp
index 72989dda0..c13b23ba5 100644
--- a/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp
+++ b/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp
@@ -27,6 +27,7 @@
#include "Connection.h"
#include "CoreIPCMessageKinds.h"
+#include "DataReference.h"
#include "MachPort.h"
#include "MachUtilities.h"
#include <WebCore/RunLoop.h>
@@ -111,10 +112,10 @@ bool Connection::open()
m_isConnected = true;
// Send the initialize message, which contains a send right for the server to use.
- OwnPtr<ArgumentEncoder> argumentEncoder = ArgumentEncoder::create(0);
- argumentEncoder->encode(MachPort(m_receivePort, MACH_MSG_TYPE_MAKE_SEND));
+ OwnPtr<MessageEncoder> encoder = MessageEncoder::create("", "", 0);
+ encoder->encode(MachPort(m_receivePort, MACH_MSG_TYPE_MAKE_SEND));
- sendMessage(MessageID(CoreIPCMessage::InitializeConnection), argumentEncoder.release());
+ sendMessage(MessageID(CoreIPCMessage::InitializeConnection), encoder.release());
// Set the dead name handler for our send port.
initializeDeadNameSource();
@@ -130,10 +131,10 @@ bool Connection::open()
if (m_exceptionPort) {
m_connectionQueue.registerMachPortEventHandler(m_exceptionPort, WorkQueue::MachPortDataAvailable, bind(&Connection::exceptionSourceEventHandler, this));
- OwnPtr<ArgumentEncoder> argumentEncoder = ArgumentEncoder::create(0);
- argumentEncoder->encode(MachPort(m_exceptionPort, MACH_MSG_TYPE_MAKE_SEND));
+ OwnPtr<MessageEncoder> encoder = MessageEncoder::create("", "", 0);
+ encoder->encode(MachPort(m_exceptionPort, MACH_MSG_TYPE_MAKE_SEND));
- sendMessage(MessageID(CoreIPCMessage::SetExceptionPort), argumentEncoder.release());
+ sendMessage(MessageID(CoreIPCMessage::SetExceptionPort), encoder.release());
}
return true;
@@ -157,9 +158,9 @@ bool Connection::platformCanSendOutgoingMessages() const
return true;
}
-bool Connection::sendOutgoingMessage(MessageID messageID, PassOwnPtr<ArgumentEncoder> arguments)
+bool Connection::sendOutgoingMessage(MessageID messageID, PassOwnPtr<MessageEncoder> encoder)
{
- Vector<Attachment> attachments = arguments->releaseAttachments();
+ Vector<Attachment> attachments = encoder->releaseAttachments();
size_t numberOfPortDescriptors = 0;
size_t numberOfOOLMemoryDescriptors = 0;
@@ -171,14 +172,14 @@ bool Connection::sendOutgoingMessage(MessageID messageID, PassOwnPtr<ArgumentEnc
numberOfOOLMemoryDescriptors++;
}
- size_t messageSize = machMessageSize(arguments->bufferSize(), numberOfPortDescriptors, numberOfOOLMemoryDescriptors);
+ size_t messageSize = machMessageSize(encoder->bufferSize(), numberOfPortDescriptors, numberOfOOLMemoryDescriptors);
char buffer[inlineMessageMaxSize];
bool messageBodyIsOOL = false;
if (messageSize > sizeof(buffer)) {
messageBodyIsOOL = true;
- attachments.append(Attachment(arguments->buffer(), arguments->bufferSize(), MACH_MSG_VIRTUAL_COPY, false));
+ attachments.append(Attachment(encoder->buffer(), encoder->bufferSize(), MACH_MSG_VIRTUAL_COPY, false));
numberOfOOLMemoryDescriptors++;
messageSize = machMessageSize(0, numberOfPortDescriptors, numberOfOOLMemoryDescriptors);
}
@@ -233,7 +234,7 @@ bool Connection::sendOutgoingMessage(MessageID messageID, PassOwnPtr<ArgumentEnc
// Copy the data if it is not being sent out-of-line.
if (!messageBodyIsOOL)
- memcpy(messageData, arguments->buffer(), arguments->bufferSize());
+ memcpy(messageData, encoder->buffer(), encoder->bufferSize());
ASSERT(m_sendPort);
@@ -251,14 +252,14 @@ void Connection::initializeDeadNameSource()
m_connectionQueue.registerMachPortEventHandler(m_sendPort, WorkQueue::MachPortDeadNameNotification, bind(&Connection::connectionDidClose, this));
}
-static PassOwnPtr<ArgumentDecoder> createArgumentDecoder(mach_msg_header_t* header)
+static PassOwnPtr<MessageDecoder> createMessageDecoder(mach_msg_header_t* header)
{
if (!(header->msgh_bits & MACH_MSGH_BITS_COMPLEX)) {
// We have a simple message.
- size_t bodySize = header->msgh_size - sizeof(mach_msg_header_t);
uint8_t* body = reinterpret_cast<uint8_t*>(header + 1);
-
- return adoptPtr(new ArgumentDecoder(body, bodySize));
+ size_t bodySize = header->msgh_size - sizeof(mach_msg_header_t);
+
+ return MessageDecoder::create(DataReference(body, bodySize));
}
bool messageBodyIsOOL = header->msgh_id & MessageBodyIsOOL;
@@ -303,22 +304,22 @@ static PassOwnPtr<ArgumentDecoder> createArgumentDecoder(mach_msg_header_t* head
uint8_t* messageBody = static_cast<uint8_t*>(messageBodyAttachment.address());
size_t messageBodySize = messageBodyAttachment.size();
- ArgumentDecoder* argumentDecoder;
+ OwnPtr<MessageDecoder> decoder;
if (attachments.isEmpty())
- argumentDecoder = new ArgumentDecoder(messageBody, messageBodySize);
+ decoder = MessageDecoder::create(DataReference(messageBody, messageBodySize));
else
- argumentDecoder = new ArgumentDecoder(messageBody, messageBodySize, attachments);
+ decoder = MessageDecoder::create(DataReference(messageBody, messageBodySize), attachments);
vm_deallocate(mach_task_self(), reinterpret_cast<vm_address_t>(messageBodyAttachment.address()), messageBodyAttachment.size());
- return adoptPtr(argumentDecoder);
+ return decoder.release();
}
uint8_t* messageBody = descriptorData;
size_t messageBodySize = header->msgh_size - (descriptorData - reinterpret_cast<uint8_t*>(header));
- return adoptPtr(new ArgumentDecoder(messageBody, messageBodySize, attachments));
+ return MessageDecoder::create(DataReference(messageBody, messageBodySize), attachments);
}
// The receive buffer size should always include the maximum trailer size.
@@ -360,8 +361,8 @@ void Connection::receiveSourceEventHandler()
return;
MessageID messageID = MessageID::fromInt(header->msgh_id);
- OwnPtr<ArgumentDecoder> arguments = createArgumentDecoder(header);
- ASSERT(arguments);
+ OwnPtr<MessageDecoder> decoder = createMessageDecoder(header);
+ ASSERT(decoder);
if (messageID == MessageID(CoreIPCMessage::InitializeConnection)) {
ASSERT(m_isServer);
@@ -369,7 +370,7 @@ void Connection::receiveSourceEventHandler()
ASSERT(!m_sendPort);
MachPort port;
- if (!arguments->decode(port)) {
+ if (!decoder->decode(port)) {
// FIXME: Disconnect.
return;
}
@@ -390,14 +391,14 @@ void Connection::receiveSourceEventHandler()
if (messageID == MessageID(CoreIPCMessage::SetExceptionPort)) {
MachPort exceptionPort;
- if (!arguments->decode(exceptionPort))
+ if (!decoder->decode(exceptionPort))
return;
setMachExceptionPort(exceptionPort.port());
return;
}
- processIncomingMessage(messageID, arguments.release());
+ processIncomingMessage(messageID, decoder.release());
}
void Connection::exceptionSourceEventHandler()
diff --git a/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp b/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp
index 6374f0323..2df61641f 100644
--- a/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp
+++ b/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp
@@ -28,7 +28,7 @@
#include "config.h"
#include "Connection.h"
-#include "ArgumentEncoder.h"
+#include "DataReference.h"
#include "SharedMemory.h"
#include <sys/socket.h>
#include <unistd.h>
@@ -282,13 +282,13 @@ bool Connection::processMessage()
if (messageInfo.isMessageBodyOOL())
messageBody = reinterpret_cast<uint8_t*>(oolMessageBody->data());
- ArgumentDecoder* argumentDecoder;
+ OwnPtr<MessageDecoder> decoder;
if (attachments.isEmpty())
- argumentDecoder = new ArgumentDecoder(messageBody, messageInfo.bodySize());
+ decoder = MessageDecoder::create(DataReference(messageBody, messageInfo.bodySize()));
else
- argumentDecoder = new ArgumentDecoder(messageBody, messageInfo.bodySize(), attachments);
+ decoder = MessageDecoder::create(DataReference(messageBody, messageInfo.bodySize()), attachments);
- processIncomingMessage(messageInfo.messageID(), adoptPtr(argumentDecoder));
+ processIncomingMessage(messageInfo.messageID(), decoder.release());
if (m_readBufferSize > messageLength) {
memmove(m_readBuffer.data(), m_readBuffer.data() + messageLength, m_readBufferSize - messageLength);
@@ -441,7 +441,7 @@ bool Connection::platformCanSendOutgoingMessages() const
return m_isConnected;
}
-bool Connection::sendOutgoingMessage(MessageID messageID, PassOwnPtr<ArgumentEncoder> arguments)
+bool Connection::sendOutgoingMessage(MessageID messageID, PassOwnPtr<MessageEncoder> encoder)
{
#if PLATFORM(QT)
ASSERT(m_socketNotifier);
@@ -449,7 +449,7 @@ bool Connection::sendOutgoingMessage(MessageID messageID, PassOwnPtr<ArgumentEnc
COMPILE_ASSERT(sizeof(MessageInfo) + attachmentMaxAmount * sizeof(size_t) <= messageMaxSize, AttachmentsFitToMessageInline);
- Vector<Attachment> attachments = arguments->releaseAttachments();
+ Vector<Attachment> attachments = encoder->releaseAttachments();
AttachmentResourceGuard<Vector<Attachment>, Vector<Attachment>::iterator> attachementDisposer(attachments);
if (attachments.size() > (attachmentMaxAmount - 1)) {
@@ -457,10 +457,10 @@ bool Connection::sendOutgoingMessage(MessageID messageID, PassOwnPtr<ArgumentEnc
return false;
}
- MessageInfo messageInfo(messageID, arguments->bufferSize(), attachments.size());
- size_t messageSizeWithBodyInline = sizeof(messageInfo) + (attachments.size() * sizeof(AttachmentInfo)) + arguments->bufferSize();
- if (messageSizeWithBodyInline > messageMaxSize && arguments->bufferSize()) {
- RefPtr<WebKit::SharedMemory> oolMessageBody = WebKit::SharedMemory::create(arguments->bufferSize());
+ MessageInfo messageInfo(messageID, encoder->bufferSize(), attachments.size());
+ size_t messageSizeWithBodyInline = sizeof(messageInfo) + (attachments.size() * sizeof(AttachmentInfo)) + encoder->bufferSize();
+ if (messageSizeWithBodyInline > messageMaxSize && encoder->bufferSize()) {
+ RefPtr<WebKit::SharedMemory> oolMessageBody = WebKit::SharedMemory::create(encoder->bufferSize());
if (!oolMessageBody)
return false;
@@ -470,7 +470,7 @@ bool Connection::sendOutgoingMessage(MessageID messageID, PassOwnPtr<ArgumentEnc
messageInfo.setMessageBodyOOL();
- memcpy(oolMessageBody->data(), arguments->buffer(), arguments->bufferSize());
+ memcpy(oolMessageBody->data(), encoder->buffer(), encoder->bufferSize());
attachments.append(handle.releaseToAttachment());
}
@@ -540,9 +540,9 @@ bool Connection::sendOutgoingMessage(MessageID messageID, PassOwnPtr<ArgumentEnc
++iovLength;
}
- if (!messageInfo.isMessageBodyOOL() && arguments->bufferSize()) {
- iov[iovLength].iov_base = reinterpret_cast<void*>(arguments->buffer());
- iov[iovLength].iov_len = arguments->bufferSize();
+ if (!messageInfo.isMessageBodyOOL() && encoder->bufferSize()) {
+ iov[iovLength].iov_base = reinterpret_cast<void*>(encoder->buffer());
+ iov[iovLength].iov_len = encoder->bufferSize();
++iovLength;
}
diff --git a/Source/WebKit2/Platform/CoreIPC/win/ConnectionWin.cpp b/Source/WebKit2/Platform/CoreIPC/win/ConnectionWin.cpp
index f51ad079a..c91e7c331 100644
--- a/Source/WebKit2/Platform/CoreIPC/win/ConnectionWin.cpp
+++ b/Source/WebKit2/Platform/CoreIPC/win/ConnectionWin.cpp
@@ -26,8 +26,8 @@
#include "config.h"
#include "Connection.h"
-#include "ArgumentEncoder.h"
#include "BinarySemaphore.h"
+#include "DataReference.h"
#include <wtf/Functional.h>
#include <wtf/RandomNumber.h>
#include <wtf/text/WTFString.h>
@@ -172,7 +172,8 @@ void Connection::readEventHandler()
unsigned messageID = *reinterpret_cast<unsigned*>(m_readBuffer.data() + realBufferSize);
- processIncomingMessage(MessageID::fromInt(messageID), adoptPtr(new ArgumentDecoder(m_readBuffer.data(), realBufferSize)));
+ OwnPtr<MessageDecoder> decoder = MessageDecoder::create(DataReference(m_readBuffer.data(), realBufferSize));
+ processIncomingMessage(MessageID::fromInt(messageID), decoder.release());
}
// Find out the size of the next message in the pipe (if there is one) so that we can read
@@ -247,9 +248,9 @@ void Connection::writeEventHandler()
ASSERT_NOT_REACHED();
}
- // The pending write has finished, so we are now done with its arguments. Clearing this member
+ // The pending write has finished, so we are now done with its encoder. Clearing this member
// will allow us to send messages again.
- m_pendingWriteArguments = nullptr;
+ m_pendingWriteEncoder = nullptr;
// Now that the pending write has finished, we can try to send a new message.
sendOutgoingMessages();
@@ -274,24 +275,24 @@ bool Connection::platformCanSendOutgoingMessages() const
{
// We only allow sending one asynchronous message at a time. If we wanted to send more than one
// at once, we'd have to use multiple OVERLAPPED structures and hold onto multiple pending
- // ArgumentEncoders (one of each for each simultaneous asynchronous message).
- return !m_pendingWriteArguments;
+ // MessageEncoders (one of each for each simultaneous asynchronous message).
+ return !m_pendingWriteEncoder;
}
-bool Connection::sendOutgoingMessage(MessageID messageID, PassOwnPtr<ArgumentEncoder> arguments)
+bool Connection::sendOutgoingMessage(MessageID messageID, PassOwnPtr<MessageEncoder> encoder)
{
- ASSERT(!m_pendingWriteArguments);
+ ASSERT(!m_pendingWriteEncoder);
// Just bail if the handle has been closed.
if (m_connectionPipe == INVALID_HANDLE_VALUE)
return false;
// We put the message ID last.
- arguments->encodeUInt32(messageID.toInt());
+ encoder->encodeUInt32(messageID.toInt());
// Write the outgoing message.
- if (::WriteFile(m_connectionPipe, arguments->buffer(), arguments->bufferSize(), 0, &m_writeState)) {
+ if (::WriteFile(m_connectionPipe, encoder->buffer(), encoder->bufferSize(), 0, &m_writeState)) {
// We successfully sent this message.
return true;
}
@@ -309,9 +310,9 @@ bool Connection::sendOutgoingMessage(MessageID messageID, PassOwnPtr<ArgumentEnc
return false;
}
- // The message will be sent soon. Hold onto the arguments so that they won't be destroyed
+ // The message will be sent soon. Hold onto the encoder so that it won't be destroyed
// before the write completes.
- m_pendingWriteArguments = arguments;
+ m_pendingWriteEncoder = encoder;
// We can only send one asynchronous message at a time (see comment in platformCanSendOutgoingMessages).
return false;
diff --git a/Source/WebKit2/PlatformEfl.cmake b/Source/WebKit2/PlatformEfl.cmake
index 6df5d3ab5..d734148d3 100644
--- a/Source/WebKit2/PlatformEfl.cmake
+++ b/Source/WebKit2/PlatformEfl.cmake
@@ -153,6 +153,7 @@ LIST(APPEND WebKit2_INCLUDE_DIRECTORIES
"${WEBKIT2_DIR}/WebProcess/soup"
"${WEBKIT2_DIR}/WebProcess/WebCoreSupport/efl"
"${WEBKIT2_DIR}/WebProcess/WebCoreSupport/soup"
+ "${WTF_DIR}/wtf/efl/"
"${WTF_DIR}/wtf/gobject"
${CAIRO_INCLUDE_DIRS}
${ECORE_INCLUDE_DIRS}
diff --git a/Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in b/Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in
index 0671a23c0..ad6698828 100644
--- a/Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in
+++ b/Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in
@@ -112,7 +112,7 @@ messages -> PluginControllerProxy {
SetLayerHostingMode(uint32_t layerHostingMode)
#endif
- # Return a snapshot of the plugin
+ # Return a snapshot of the plugin.
Snapshot() -> (WebKit::ShareableBitmap::Handle backingStoreHandle)
# Sent when storage blocking policy changes
diff --git a/Source/WebKit2/Scripts/webkit2/messages.py b/Source/WebKit2/Scripts/webkit2/messages.py
index c8a0ab92a..56d97bc81 100644
--- a/Source/WebKit2/Scripts/webkit2/messages.py
+++ b/Source/WebKit2/Scripts/webkit2/messages.py
@@ -224,13 +224,14 @@ def forward_declarations_and_headers(receiver):
headers = set([
'"Arguments.h"',
+ '"MessageEncoder.h"',
'"MessageID.h"',
])
for message in receiver.messages:
if message.reply_parameters != None and message.has_attribute(DELAYED_ATTRIBUTE):
headers.add('<wtf/ThreadSafeRefCounted.h>')
- types_by_namespace['CoreIPC'].update(['ArgumentEncoder', 'Connection'])
+ types_by_namespace['CoreIPC'].update(['Connection'])
for parameter in receiver.iterparameters():
type = parameter.type
@@ -502,7 +503,7 @@ def generate_message_handler(file):
result.append('{\n')
result.append(' ASSERT(m_arguments);\n')
result += [' m_arguments->encode(%s);\n' % x.name for x in message.reply_parameters]
- result.append(' bool result = m_connection->sendSyncReply(m_arguments.release());\n')
+ result.append(' bool result = m_connection->sendSyncReply(static_pointer_cast<CoreIPC::MessageEncoder>(m_arguments.release()));\n')
result.append(' m_connection = nullptr;\n')
result.append(' return result;\n')
result.append('}\n')
diff --git a/Source/WebKit2/Scripts/webkit2/messages_unittest.py b/Source/WebKit2/Scripts/webkit2/messages_unittest.py
index dd9fbecc3..c27e2588c 100644
--- a/Source/WebKit2/Scripts/webkit2/messages_unittest.py
+++ b/Source/WebKit2/Scripts/webkit2/messages_unittest.py
@@ -315,6 +315,7 @@ _expected_header = """/*
#include "Arguments.h"
#include "Connection.h"
+#include "MessageEncoder.h"
#include "MessageID.h"
#include "Plugin.h"
#include <WebCore/KeyboardEvent.h>
@@ -323,7 +324,6 @@ _expected_header = """/*
#include <wtf/Vector.h>
namespace CoreIPC {
- class ArgumentEncoder;
class Connection;
class DummyType;
class MachPort;
@@ -467,14 +467,14 @@ struct GetPlugins : CoreIPC::Arguments1<bool> {
struct GetPluginProcessConnection : CoreIPC::Arguments1<const WTF::String&> {
static const Kind messageID = GetPluginProcessConnectionID;
struct DelayedReply : public ThreadSafeRefCounted<DelayedReply> {
- DelayedReply(PassRefPtr<CoreIPC::Connection>, PassOwnPtr<CoreIPC::ArgumentEncoder>);
+ DelayedReply(PassRefPtr<CoreIPC::Connection>, PassOwnPtr<CoreIPC::MessageEncoder>);
~DelayedReply();
bool send(const CoreIPC::Connection::Handle& connectionHandle);
private:
RefPtr<CoreIPC::Connection> m_connection;
- OwnPtr<CoreIPC::ArgumentEncoder> m_arguments;
+ OwnPtr<CoreIPC::MessageEncoder> m_encoder;
};
typedef CoreIPC::Arguments1<CoreIPC::Connection::Handle&> Reply;
@@ -488,14 +488,14 @@ struct GetPluginProcessConnection : CoreIPC::Arguments1<const WTF::String&> {
struct TestMultipleAttributes : CoreIPC::Arguments0 {
static const Kind messageID = TestMultipleAttributesID;
struct DelayedReply : public ThreadSafeRefCounted<DelayedReply> {
- DelayedReply(PassRefPtr<CoreIPC::Connection>, PassOwnPtr<CoreIPC::ArgumentEncoder>);
+ DelayedReply(PassRefPtr<CoreIPC::Connection>, PassOwnPtr<CoreIPC::MessageEncoder>);
~DelayedReply();
bool send();
private:
RefPtr<CoreIPC::Connection> m_connection;
- OwnPtr<CoreIPC::ArgumentEncoder> m_arguments;
+ OwnPtr<CoreIPC::MessageEncoder> m_encoder;
};
typedef CoreIPC::Arguments0 Reply;
@@ -640,9 +640,9 @@ namespace Messages {
namespace WebPage {
-GetPluginProcessConnection::DelayedReply::DelayedReply(PassRefPtr<CoreIPC::Connection> connection, PassOwnPtr<CoreIPC::ArgumentEncoder> arguments)
+GetPluginProcessConnection::DelayedReply::DelayedReply(PassRefPtr<CoreIPC::Connection> connection, PassOwnPtr<CoreIPC::MessageEncoder> arguments)
: m_connection(connection)
- , m_arguments(arguments)
+ , m_encoder(arguments)
{
}
@@ -653,16 +653,16 @@ GetPluginProcessConnection::DelayedReply::~DelayedReply()
bool GetPluginProcessConnection::DelayedReply::send(const CoreIPC::Connection::Handle& connectionHandle)
{
- ASSERT(m_arguments);
- m_arguments->encode(connectionHandle);
- bool result = m_connection->sendSyncReply(m_arguments.release());
+ ASSERT(m_encoder);
+ m_encoder->encode(connectionHandle);
+ bool result = m_connection->sendSyncReply(static_pointer_cast<CoreIPC::MessageEncoder>(m_arguments.release()));
m_connection = nullptr;
return result;
}
-TestMultipleAttributes::DelayedReply::DelayedReply(PassRefPtr<CoreIPC::Connection> connection, PassOwnPtr<CoreIPC::ArgumentEncoder> arguments)
+TestMultipleAttributes::DelayedReply::DelayedReply(PassRefPtr<CoreIPC::Connection> connection, PassOwnPtr<CoreIPC::MessageEncoder> arguments)
: m_connection(connection)
- , m_arguments(arguments)
+ , m_encoder(arguments)
{
}
@@ -673,8 +673,8 @@ TestMultipleAttributes::DelayedReply::~DelayedReply()
bool TestMultipleAttributes::DelayedReply::send()
{
- ASSERT(m_arguments);
- bool result = m_connection->sendSyncReply(m_arguments.release());
+ ASSERT(m_encoder);
+ bool result = m_connection->sendSyncReply(static_pointer_cast<CoreIPC::MessageEncoder>(m_arguments.release()));
m_connection = nullptr;
return result;
}
@@ -755,7 +755,7 @@ void WebPage::didReceiveWebPageMessage(CoreIPC::Connection*, CoreIPC::MessageID
ASSERT_NOT_REACHED();
}
-void WebPage::didReceiveSyncWebPageMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply)
+void WebPage::didReceiveSyncWebPageMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::MessageEncoder>& reply)
{
switch (messageID.get<Messages::WebPage::Kind>()) {
case Messages::WebPage::CreatePluginID:
diff --git a/Source/WebKit2/Shared/WebConnection.cpp b/Source/WebKit2/Shared/WebConnection.cpp
index d941318db..9743a78c7 100644
--- a/Source/WebKit2/Shared/WebConnection.cpp
+++ b/Source/WebKit2/Shared/WebConnection.cpp
@@ -53,7 +53,7 @@ void WebConnection::postMessage(const String& messageName, APIObject* messageBod
if (!m_connection)
return;
- OwnPtr<CoreIPC::ArgumentEncoder> messageData = CoreIPC::ArgumentEncoder::create(0);
+ OwnPtr<CoreIPC::ArgumentEncoder> messageData = CoreIPC::ArgumentEncoder::create();
messageData->encode(messageName);
encodeMessageBody(messageData.get(), messageBody);
@@ -62,14 +62,14 @@ void WebConnection::postMessage(const String& messageName, APIObject* messageBod
void WebConnection::handleMessage(const CoreIPC::DataReference& messageData)
{
- CoreIPC::ArgumentDecoder messageDecoder(messageData.data(), messageData.size());
+ OwnPtr<CoreIPC::ArgumentDecoder> decoder = CoreIPC::ArgumentDecoder::create(messageData.data(), messageData.size());
String messageName;
- if (!messageDecoder.decode(messageName))
+ if (!decoder->decode(messageName))
return;
RefPtr<APIObject> messageBody;
- if (!decodeMessageBody(&messageDecoder, messageBody))
+ if (!decodeMessageBody(decoder.get(), messageBody))
return;
m_client.didReceiveMessage(this, messageName, messageBody.get());
diff --git a/Source/WebKit2/Shared/WebConnection.h b/Source/WebKit2/Shared/WebConnection.h
index 3abd14d46..b14d1f347 100644
--- a/Source/WebKit2/Shared/WebConnection.h
+++ b/Source/WebKit2/Shared/WebConnection.h
@@ -35,6 +35,8 @@ namespace CoreIPC {
class ArgumentEncoder;
class Connection;
class DataReference;
+ class MessageDecoder;
+ class MessageEncoder;
class MessageID;
}
diff --git a/Source/WebKit2/Target.pri b/Source/WebKit2/Target.pri
index 4f3930753..bfa7d3bc6 100644
--- a/Source/WebKit2/Target.pri
+++ b/Source/WebKit2/Target.pri
@@ -25,6 +25,8 @@ HEADERS += \
Platform/CoreIPC/CoreIPCMessageKinds.h \
Platform/CoreIPC/DataReference.h \
Platform/CoreIPC/HandleMessage.h \
+ Platform/CoreIPC/MessageDecoder.h \
+ Platform/CoreIPC/MessageEncoder.h \
Platform/CoreIPC/MessageID.h \
Platform/CoreIPC/MessageReceiver.h \
Platform/CoreIPC/MessageReceiverMap.h \
@@ -384,6 +386,8 @@ SOURCES += \
Platform/CoreIPC/Attachment.cpp \
Platform/CoreIPC/Connection.cpp \
Platform/CoreIPC/DataReference.cpp \
+ Platform/CoreIPC/MessageDecoder.cpp \
+ Platform/CoreIPC/MessageEncoder.cpp \
Platform/CoreIPC/MessageReceiverMap.cpp \
Platform/Logging.cpp \
Platform/Module.cpp \
diff --git a/Source/WebKit2/UIProcess/API/efl/VibrationProvider.cpp b/Source/WebKit2/UIProcess/API/efl/VibrationProvider.cpp
index 13d4de6d6..9d8feb1fe 100644
--- a/Source/WebKit2/UIProcess/API/efl/VibrationProvider.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/VibrationProvider.cpp
@@ -36,15 +36,15 @@
using namespace WebCore;
/**
- * \struct _Ewk_Vibration_Client
+ * \struct Ewk_Vibration_Client
* @brief Contains the vibration client callbacks.
*/
-struct _Ewk_Vibration_Client {
+struct Ewk_Vibration_Client {
Ewk_Vibration_Client_Vibrate_Cb vibrate;
Ewk_Vibration_Client_Vibration_Cancel_Cb cancelVibration;
void* userData;
- _Ewk_Vibration_Client(Ewk_Vibration_Client_Vibrate_Cb vibrate, Ewk_Vibration_Client_Vibration_Cancel_Cb cancelVibration, void* userData)
+ Ewk_Vibration_Client(Ewk_Vibration_Client_Vibrate_Cb vibrate, Ewk_Vibration_Client_Vibration_Cancel_Cb cancelVibration, void* userData)
: vibrate(vibrate)
, cancelVibration(cancelVibration)
, userData(userData)
diff --git a/Source/WebKit2/UIProcess/API/efl/VibrationProvider.h b/Source/WebKit2/UIProcess/API/efl/VibrationProvider.h
index 6b2db4eec..fadd58a1b 100644
--- a/Source/WebKit2/UIProcess/API/efl/VibrationProvider.h
+++ b/Source/WebKit2/UIProcess/API/efl/VibrationProvider.h
@@ -33,7 +33,7 @@
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
-typedef struct _Ewk_Vibration_Client Ewk_Vibration_Client;
+typedef struct Ewk_Vibration_Client Ewk_Vibration_Client;
class VibrationProvider : public RefCounted<VibrationProvider> {
public:
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.h b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.h
index c58476140..09dbc5ab6 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.h
@@ -37,8 +37,8 @@
extern "C" {
#endif
-/** Creates a type name for _Ewk_Back_Forward_List */
-typedef struct _Ewk_Back_Forward_List Ewk_Back_Forward_List;
+/** Creates a type name for Ewk_Back_Forward_List */
+typedef struct Ewk_Back_Forward_List Ewk_Back_Forward_List;
/**
* Returns the current item in the @a list.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.h b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.h
index 3c544f3ef..8d0724d4a 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.h
@@ -37,8 +37,8 @@
extern "C" {
#endif
-/** Creates a type name for _Ewk_Back_Forward_List_Item */
-typedef struct _Ewk_Back_Forward_List_Item Ewk_Back_Forward_List_Item;
+/** Creates a type name for Ewk_Back_Forward_List_Item */
+typedef struct Ewk_Back_Forward_List_Item Ewk_Back_Forward_List_Item;
/**
* Increases the reference count of the given object.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item_private.h
index 254074ab5..a300a305e 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item_private.h
@@ -32,27 +32,25 @@
#include <wtf/RefCounted.h>
/**
- * \struct _Ewk_Back_Forward_List
+ * \struct Ewk_Back_Forward_List
* @brief Contains the Back Forward List data.
*/
-class _Ewk_Back_Forward_List_Item : public RefCounted<_Ewk_Back_Forward_List_Item> {
+class Ewk_Back_Forward_List_Item : public RefCounted<Ewk_Back_Forward_List_Item> {
public:
WKRetainPtr<WKBackForwardListItemRef> wkItem;
mutable WKEinaSharedString url;
mutable WKEinaSharedString title;
mutable WKEinaSharedString originalURL;
- static PassRefPtr<_Ewk_Back_Forward_List_Item> create(WKBackForwardListItemRef itemRef)
+ static PassRefPtr<Ewk_Back_Forward_List_Item> create(WKBackForwardListItemRef itemRef)
{
- return adoptRef(new _Ewk_Back_Forward_List_Item(itemRef));
+ return adoptRef(new Ewk_Back_Forward_List_Item(itemRef));
}
private:
- explicit _Ewk_Back_Forward_List_Item(WKBackForwardListItemRef itemRef)
+ explicit Ewk_Back_Forward_List_Item(WKBackForwardListItemRef itemRef)
: wkItem(itemRef)
{ }
};
-typedef struct _Ewk_Back_Forward_List_Item Ewk_Back_Forward_List_Item;
-
#endif // ewk_back_forward_list_private_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_private.h
index 26b050d82..fcf25f6cc 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_private.h
@@ -32,22 +32,20 @@
#include <wtf/HashMap.h>
#include <wtf/PassOwnPtr.h>
-typedef struct _Ewk_Back_Forward_List Ewk_Back_Forward_List;
-
typedef HashMap<WKBackForwardListItemRef, RefPtr<Ewk_Back_Forward_List_Item> > ItemsMap;
-class _Ewk_Back_Forward_List {
+class Ewk_Back_Forward_List {
public:
WKRetainPtr<WKBackForwardListRef> wkList;
mutable ItemsMap wrapperCache;
- static PassOwnPtr<_Ewk_Back_Forward_List> create(WKBackForwardListRef listRef)
+ static PassOwnPtr<Ewk_Back_Forward_List> create(WKBackForwardListRef listRef)
{
- return adoptPtr(new _Ewk_Back_Forward_List(listRef));
+ return adoptPtr(new Ewk_Back_Forward_List(listRef));
}
private:
- explicit _Ewk_Back_Forward_List(WKBackForwardListRef listRef)
+ explicit Ewk_Back_Forward_List(WKBackForwardListRef listRef)
: wkList(listRef)
{ }
};
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp
index 6338eac82..b7617dab2 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp
@@ -30,6 +30,7 @@
#include "WKRetainPtr.h"
#include "WKString.h"
#include "WebContext.h"
+#include "WebIconDatabase.h"
#include "ewk_context_download_client_private.h"
#include "ewk_context_history_client_private.h"
#include "ewk_context_private.h"
@@ -52,24 +53,24 @@
using namespace WebCore;
using namespace WebKit;
-struct _Ewk_Url_Scheme_Handler {
+struct Ewk_Url_Scheme_Handler {
Ewk_Url_Scheme_Request_Cb callback;
void* userData;
- _Ewk_Url_Scheme_Handler()
+ Ewk_Url_Scheme_Handler()
: callback(0)
, userData(0)
{ }
- _Ewk_Url_Scheme_Handler(Ewk_Url_Scheme_Request_Cb callback, void* userData)
+ Ewk_Url_Scheme_Handler(Ewk_Url_Scheme_Request_Cb callback, void* userData)
: callback(callback)
, userData(userData)
{ }
};
-typedef HashMap<String, _Ewk_Url_Scheme_Handler> URLSchemeHandlerMap;
+typedef HashMap<String, Ewk_Url_Scheme_Handler> URLSchemeHandlerMap;
-struct _Ewk_Context {
+struct Ewk_Context {
unsigned __ref; /**< the reference count of the object */
WKRetainPtr<WKContextRef> context;
@@ -91,7 +92,7 @@ struct _Ewk_Context {
Ewk_Context_History_Client historyClient;
- _Ewk_Context(WKRetainPtr<WKContextRef> contextRef)
+ Ewk_Context(WKRetainPtr<WKContextRef> contextRef)
: __ref(1)
, context(contextRef)
, requestManager(WKContextGetSoupRequestManager(contextRef.get()))
@@ -166,12 +167,14 @@ Ewk_Favicon_Database* ewk_context_favicon_database_get(const Ewk_Context* ewkCon
EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, 0);
if (!ewkContext->faviconDatabase) {
- // Set database path.
- WebContext* webContext = toImpl(ewkContext->context.get());
- String databasePath = webContext->iconDatabasePath() + "/" + WebCore::IconDatabase::defaultDatabaseFilename();
- webContext->setIconDatabasePath(databasePath);
-
- const_cast<Ewk_Context*>(ewkContext)->faviconDatabase = Ewk_Favicon_Database::create(WKContextGetIconDatabase(ewkContext->context.get()));
+ WKRetainPtr<WKIconDatabaseRef> iconDatabase = WKContextGetIconDatabase(ewkContext->context.get());
+ // Set the database path if it is not open yet.
+ if (!toImpl(iconDatabase.get())->isOpen()) {
+ WebContext* webContext = toImpl(ewkContext->context.get());
+ String databasePath = webContext->iconDatabasePath() + "/" + WebCore::IconDatabase::defaultDatabaseFilename();
+ webContext->setIconDatabasePath(databasePath);
+ }
+ const_cast<Ewk_Context*>(ewkContext)->faviconDatabase = Ewk_Favicon_Database::create(iconDatabase.get());
}
return ewkContext->faviconDatabase.get();
@@ -254,7 +257,7 @@ void ewk_context_url_scheme_request_received(Ewk_Context* ewkContext, Ewk_Url_Sc
EINA_SAFETY_ON_NULL_RETURN(ewkContext);
EINA_SAFETY_ON_NULL_RETURN(schemeRequest);
- _Ewk_Url_Scheme_Handler handler = ewkContext->urlSchemeHandlers.get(ewk_url_scheme_request_scheme_get(schemeRequest));
+ Ewk_Url_Scheme_Handler handler = ewkContext->urlSchemeHandlers.get(ewk_url_scheme_request_scheme_get(schemeRequest));
if (!handler.callback)
return;
@@ -290,7 +293,7 @@ Eina_Bool ewk_context_url_scheme_register(Ewk_Context* ewkContext, const char* s
EINA_SAFETY_ON_NULL_RETURN_VAL(scheme, false);
EINA_SAFETY_ON_NULL_RETURN_VAL(callback, false);
- ewkContext->urlSchemeHandlers.set(String::fromUTF8(scheme), _Ewk_Url_Scheme_Handler(callback, userData));
+ ewkContext->urlSchemeHandlers.set(String::fromUTF8(scheme), Ewk_Url_Scheme_Handler(callback, userData));
WKRetainPtr<WKStringRef> wkScheme(AdoptWK, WKStringCreateWithUTF8CString(scheme));
WKSoupRequestManagerRegisterURIScheme(ewkContext->requestManager.get(), wkScheme.get());
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_context.h b/Source/WebKit2/UIProcess/API/efl/ewk_context.h
index 0cb413363..f6b8bb67d 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_context.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_context.h
@@ -47,15 +47,15 @@
extern "C" {
#endif
-/** Creates a type name for @a _Ewk_Context. */
-typedef struct _Ewk_Context Ewk_Context;
+/** Creates a type name for @a Ewk_Context. */
+typedef struct Ewk_Context Ewk_Context;
/**
- * \enum _Ewk_Cache_Model
+ * \enum Ewk_Cache_Model
*
* @brief Contains option for cache model
*/
-enum _Ewk_Cache_Model {
+enum Ewk_Cache_Model {
/// Use the smallest cache capacity.
EWK_CACHE_MODEL_DOCUMENT_VIEWER,
/// Use bigger cache capacity than EWK_CACHE_MODEL_DOCUMENT_VIEWER.
@@ -64,8 +64,8 @@ enum _Ewk_Cache_Model {
EWK_CACHE_MODEL_PRIMARY_WEBBROWSER
};
-/// Creates a type name for the _Ewk_Cache_Model.
-typedef enum _Ewk_Cache_Model Ewk_Cache_Model;
+/// Creates a type name for the Ewk_Cache_Model.
+typedef enum Ewk_Cache_Model Ewk_Cache_Model;
/**
* @typedef Ewk_Url_Scheme_Request_Cb Ewk_Url_Scheme_Request_Cb
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_context_download_client.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_context_download_client.cpp
index 8822e6ae1..088bd6a79 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_context_download_client.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_context_download_client.cpp
@@ -69,8 +69,7 @@ static void didReceiveResponse(WKContextRef, WKDownloadRef wkDownload, WKURLResp
{
Ewk_Download_Job* download = ewk_context_download_job_get(toEwkContext(clientInfo), toImpl(wkDownload)->downloadID());
ASSERT(download);
- RefPtr<Ewk_Url_Response> response = Ewk_Url_Response::create(wkResponse);
- ewk_download_job_response_set(download, response.get());
+ ewk_download_job_response_set(download, Ewk_Url_Response::create(wkResponse));
}
static void didCreateDestination(WKContextRef, WKDownloadRef wkDownload, WKStringRef /*path*/, const void* clientInfo)
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_context_download_client_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_context_download_client_private.h
index f7017a863..e056aafe6 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_context_download_client_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_context_download_client_private.h
@@ -26,7 +26,7 @@
#ifndef ewk_context_download_client_private_h
#define ewk_context_download_client_private_h
-typedef struct _Ewk_Context Ewk_Context;
+typedef struct Ewk_Context Ewk_Context;
void ewk_context_download_client_attach(Ewk_Context*);
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_context_history_client_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_context_history_client_private.h
index d9518ced9..0b470dcaf 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_context_history_client_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_context_history_client_private.h
@@ -28,7 +28,7 @@
#include "ewk_context.h"
-struct _Ewk_Context_History_Client {
+struct Ewk_Context_History_Client {
void* user_data;
Ewk_History_Navigation_Cb navigate_func;
Ewk_History_Client_Redirection_Cb client_redirect_func;
@@ -37,8 +37,6 @@ struct _Ewk_Context_History_Client {
Ewk_History_Populate_Visited_Links_Cb populate_visited_links_func;
};
-typedef struct _Ewk_Context_History_Client Ewk_Context_History_Client;
-
void ewk_context_history_client_attach(Ewk_Context*);
#endif // ewk_context_history_client_private_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_context_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_context_private.h
index 29f74a184..705739a16 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_context_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_context_private.h
@@ -22,10 +22,10 @@
#include <WebKit2/WKBase.h>
-typedef struct _Ewk_Context Ewk_Context;
-typedef struct _Ewk_Download_Job Ewk_Download_Job;
+typedef struct Ewk_Context Ewk_Context;
+typedef struct Ewk_Download_Job Ewk_Download_Job;
typedef struct Ewk_Url_Scheme_Request Ewk_Url_Scheme_Request;
-typedef struct _Ewk_Context_History_Client Ewk_Context_History_Client;
+typedef struct Ewk_Context_History_Client Ewk_Context_History_Client;
WKContextRef ewk_context_WKContext_get(const Ewk_Context*);
Ewk_Context* ewk_context_new_from_WKContext(WKContextRef);
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_context_request_manager_client_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_context_request_manager_client_private.h
index 689bbf622..311343890 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_context_request_manager_client_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_context_request_manager_client_private.h
@@ -26,7 +26,7 @@
#ifndef ewk_context_request_manager_client_private_h
#define ewk_context_request_manager_client_private_h
-typedef struct _Ewk_Context Ewk_Context;
+typedef struct Ewk_Context Ewk_Context;
void ewk_context_request_manager_client_attach(Ewk_Context* context);
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager.cpp
index 52b7ca7cc..3cbf7fef0 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager.cpp
@@ -42,7 +42,7 @@ using namespace WebKit;
static void cookiesDidChange(WKCookieManagerRef, const void* clientInfo);
-_Ewk_Cookie_Manager::_Ewk_Cookie_Manager(WKCookieManagerRef cookieManagerRef)
+Ewk_Cookie_Manager::Ewk_Cookie_Manager(WKCookieManagerRef cookieManagerRef)
: wkCookieManager(cookieManagerRef)
{
WKCookieManagerClient wkCookieManagerClient = {
@@ -53,7 +53,7 @@ _Ewk_Cookie_Manager::_Ewk_Cookie_Manager(WKCookieManagerRef cookieManagerRef)
WKCookieManagerSetClient(wkCookieManager.get(), &wkCookieManagerClient);
}
-_Ewk_Cookie_Manager::~_Ewk_Cookie_Manager()
+Ewk_Cookie_Manager::~Ewk_Cookie_Manager()
{
if (changeHandler.callback)
WKCookieManagerStopObservingCookieChanges(wkCookieManager.get());
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager.h b/Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager.h
index c31b90018..0d2a4c64f 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager.h
@@ -38,15 +38,15 @@
extern "C" {
#endif
-/** Creates a type name for _Ewk_Cookie_Manager */
-typedef struct _Ewk_Cookie_Manager Ewk_Cookie_Manager;
+/** Creates a type name for Ewk_Cookie_Manager */
+typedef struct Ewk_Cookie_Manager Ewk_Cookie_Manager;
/**
- * \enum _Ewk_Cookie_Accept_Policy
+ * \enum Ewk_Cookie_Accept_Policy
*
* @brief Contains accept policies for the cookies.
*/
-enum _Ewk_Cookie_Accept_Policy {
+enum Ewk_Cookie_Accept_Policy {
/// Accepts every cookie sent from any page.
EWK_COOKIE_ACCEPT_POLICY_ALWAYS,
/// Rejects all cookies.
@@ -55,23 +55,23 @@ enum _Ewk_Cookie_Accept_Policy {
EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY
};
-/// Creates a type name for the _Ewk_Cookie_Accept_Policy.
-typedef enum _Ewk_Cookie_Accept_Policy Ewk_Cookie_Accept_Policy;
+/// Creates a type name for the Ewk_Cookie_Accept_Policy.
+typedef enum Ewk_Cookie_Accept_Policy Ewk_Cookie_Accept_Policy;
/**
- * \enum _Ewk_Cookie_Persistent_Storage
+ * \enum Ewk_Cookie_Persistent_Storage
*
* @brief Enum values to denote cookies persistent storage type.
*/
-enum _Ewk_Cookie_Persistent_Storage {
+enum Ewk_Cookie_Persistent_Storage {
/// Cookies are stored in a text file in the Mozilla "cookies.txt" format.
EWK_COOKIE_PERSISTENT_STORAGE_TEXT,
/// Cookies are stored in a SQLite file in the current Mozilla format.
EWK_COOKIE_PERSISTENT_STORAGE_SQLITE
};
-/// Creates a type name for the _Ewk_Cookie_Persistent_Storage.
-typedef enum _Ewk_Cookie_Persistent_Storage Ewk_Cookie_Persistent_Storage;
+/// Creates a type name for the Ewk_Cookie_Persistent_Storage.
+typedef enum Ewk_Cookie_Persistent_Storage Ewk_Cookie_Persistent_Storage;
/**
* @typedef Ewk_Cookie_Manager_Async_Policy_Get_Cb Ewk_Cookie_Manager_Async_Policy_Get_Cb
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager_private.h
index 691322b6c..b7579aa99 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager_private.h
@@ -47,23 +47,20 @@ struct Cookie_Change_Handler {
{ }
};
-
-typedef struct _Ewk_Cookie_Manager Ewk_Cookie_Manager;
-
-class _Ewk_Cookie_Manager {
+class Ewk_Cookie_Manager {
public:
WKRetainPtr<WKCookieManagerRef> wkCookieManager;
Cookie_Change_Handler changeHandler;
- static PassOwnPtr<_Ewk_Cookie_Manager> create(WKCookieManagerRef cookieManagerRef)
+ static PassOwnPtr<Ewk_Cookie_Manager> create(WKCookieManagerRef cookieManagerRef)
{
- return adoptPtr(new _Ewk_Cookie_Manager(cookieManagerRef));
+ return adoptPtr(new Ewk_Cookie_Manager(cookieManagerRef));
}
- ~_Ewk_Cookie_Manager();
+ ~Ewk_Cookie_Manager();
private:
- explicit _Ewk_Cookie_Manager(WKCookieManagerRef cookieManagerRef);
+ explicit Ewk_Cookie_Manager(WKCookieManagerRef cookieManagerRef);
};
#endif // ewk_cookie_manager_private_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_download_job.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_download_job.cpp
index de8f597e0..46a198dc7 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_download_job.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_download_job.cpp
@@ -174,12 +174,12 @@ double ewk_download_job_elapsed_time_get(const Ewk_Download_Job* download)
* @internal
* Sets the URL @a response for this @a download.
*/
-void ewk_download_job_response_set(Ewk_Download_Job* download, Ewk_Url_Response* response)
+void ewk_download_job_response_set(Ewk_Download_Job* download, PassRefPtr<Ewk_Url_Response> response)
{
EINA_SAFETY_ON_NULL_RETURN(download);
EINA_SAFETY_ON_NULL_RETURN(response);
- download->response = ewk_url_response_ref(response);
+ download->response = response;
}
/**
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_download_job.h b/Source/WebKit2/UIProcess/API/efl/ewk_download_job.h
index 388276c9c..0cad5c2ed 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_download_job.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_download_job.h
@@ -43,11 +43,11 @@
extern "C" {
#endif
-/** Creates a type name for _Ewk_Download_Job_Job */
-typedef struct _Ewk_Download_Job Ewk_Download_Job;
+/** Creates a type name for Ewk_Download_Job_Job */
+typedef struct Ewk_Download_Job Ewk_Download_Job;
/// Defines the possible states of a download.
-enum _Ewk_Download_Job_State {
+enum Ewk_Download_Job_State {
/// The download state is unknown
EWK_DOWNLOAD_JOB_STATE_UNKNOWN = -1,
/// The download has not started yet
@@ -63,8 +63,8 @@ enum _Ewk_Download_Job_State {
/// The download completed successfully.
EWK_DOWNLOAD_JOB_STATE_FINISHED
};
-/// Creates a type name for @a _Ewk_Download_Job_State.
-typedef enum _Ewk_Download_Job_State Ewk_Download_Job_State;
+/// Creates a type name for @a Ewk_Download_Job_State.
+typedef enum Ewk_Download_Job_State Ewk_Download_Job_State;
/**
* Increases the reference count of the given object.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_download_job_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_download_job_private.h
index a4a40c0f6..5fac47db0 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_download_job_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_download_job_private.h
@@ -38,10 +38,10 @@ class DownloadProxy;
}
/**
- * \struct _Ewk_Download_Job
+ * \struct Ewk_Download_Job
* @brief Contains the download data.
*/
-class _Ewk_Download_Job : public RefCounted<_Ewk_Download_Job> {
+class Ewk_Download_Job : public RefCounted<Ewk_Download_Job> {
public:
WebKit::DownloadProxy* downloadProxy;
Evas_Object* view;
@@ -54,13 +54,13 @@ public:
WKEinaSharedString destination;
WKEinaSharedString suggestedFilename;
- static PassRefPtr<_Ewk_Download_Job> create(WebKit::DownloadProxy* download, Evas_Object* ewkView)
+ static PassRefPtr<Ewk_Download_Job> create(WebKit::DownloadProxy* download, Evas_Object* ewkView)
{
- return adoptRef(new _Ewk_Download_Job(download, ewkView));
+ return adoptRef(new Ewk_Download_Job(download, ewkView));
}
private:
- _Ewk_Download_Job(WebKit::DownloadProxy* download, Evas_Object* ewkView)
+ Ewk_Download_Job(WebKit::DownloadProxy* download, Evas_Object* ewkView)
: downloadProxy(download)
, view(ewkView)
, state(EWK_DOWNLOAD_JOB_STATE_NOT_STARTED)
@@ -70,20 +70,13 @@ private:
{ }
};
-typedef struct _Ewk_Download_Job Ewk_Download_Job;
-typedef struct _Ewk_Error Ewk_Error;
+typedef struct Ewk_Error Ewk_Error;
uint64_t ewk_download_job_id_get(const Ewk_Download_Job*);
Evas_Object* ewk_download_job_view_get(const Ewk_Download_Job*);
-
void ewk_download_job_state_set(Ewk_Download_Job*, Ewk_Download_Job_State);
-void ewk_download_job_cancelled(Ewk_Download_Job*);
-void ewk_download_job_failed(Ewk_Download_Job*);
-void ewk_download_job_finished(Ewk_Download_Job*);
-void ewk_download_job_started(Ewk_Download_Job*);
-
void ewk_download_job_received_data(Ewk_Download_Job*, uint64_t length);
-void ewk_download_job_response_set(Ewk_Download_Job*, Ewk_Url_Response*);
+void ewk_download_job_response_set(Ewk_Download_Job*, PassRefPtr<Ewk_Url_Response>);
void ewk_download_job_suggested_filename_set(Ewk_Download_Job*, const char* suggestedFilename);
#endif // ewk_download_job_private_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_error.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_error.cpp
index fed8e2cc3..5bcfd81f9 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_error.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_error.cpp
@@ -36,7 +36,7 @@
using namespace WebCore;
using namespace WebKit;
-_Ewk_Error::_Ewk_Error(WKErrorRef errorRef)
+Ewk_Error::Ewk_Error(WKErrorRef errorRef)
: wkError(errorRef)
, url(AdoptWK, WKErrorCopyFailingURL(errorRef))
, description(AdoptWK, WKErrorCopyLocalizedDescription(errorRef))
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_error.h b/Source/WebKit2/UIProcess/API/efl/ewk_error.h
index 01214d121..d151543e9 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_error.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_error.h
@@ -38,7 +38,7 @@ extern "C" {
#endif
/** Creates a type name for @a Ewk_Error. */
-typedef struct _Ewk_Error Ewk_Error;
+typedef struct Ewk_Error Ewk_Error;
/// Creates a type name for Ewk_Error_Type.
typedef enum {
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_error_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_error_private.h
index 5ae457bf0..a26e0fc4f 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_error_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_error_private.h
@@ -31,24 +31,22 @@
#include <WKRetainPtr.h>
#include <wtf/PassOwnPtr.h>
-typedef struct _Ewk_Error Ewk_Error;
-
-class _Ewk_Error {
+class Ewk_Error {
public:
WKRetainPtr<WKErrorRef> wkError;
WKEinaSharedString url;
WKEinaSharedString description;
- static PassOwnPtr<_Ewk_Error> create(WKErrorRef errorRef)
+ static PassOwnPtr<Ewk_Error> create(WKErrorRef errorRef)
{
if (!errorRef)
return nullptr;
- return adoptPtr(new _Ewk_Error(errorRef));
+ return adoptPtr(new Ewk_Error(errorRef));
}
private:
- explicit _Ewk_Error(WKErrorRef errorRef);
+ explicit Ewk_Error(WKErrorRef errorRef);
};
#endif // ewk_error_private_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.cpp
index 6e52c3510..9e059e2c4 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.cpp
@@ -41,7 +41,7 @@ using namespace WebKit;
static void didChangeIconForPageURL(WKIconDatabaseRef iconDatabase, WKURLRef pageURL, const void* clientInfo);
static void iconDataReadyForPageURL(WKIconDatabaseRef iconDatabase, WKURLRef pageURL, const void* clientInfo);
-_Ewk_Favicon_Database::_Ewk_Favicon_Database(WKIconDatabaseRef iconDatabaseRef)
+Ewk_Favicon_Database::Ewk_Favicon_Database(WKIconDatabaseRef iconDatabaseRef)
: wkIconDatabase(iconDatabaseRef)
{
WKIconDatabaseClient iconDatabaseClient;
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.h b/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.h
index c3d44e47e..8ceaf5b23 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.h
@@ -37,8 +37,8 @@
extern "C" {
#endif
-/** Creates a type name for @a _Ewk_Favicon_Database. */
-typedef struct _Ewk_Favicon_Database Ewk_Favicon_Database;
+/** Creates a type name for @a Ewk_Favicon_Database. */
+typedef struct Ewk_Favicon_Database Ewk_Favicon_Database;
/**
* @typedef Ewk_Favicon_Database_Icon_Change_Cb Ewk_Favicon_Database_Icon_Change_Cb
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database_private.h
index c58842430..9d90902c5 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database_private.h
@@ -69,19 +69,19 @@ typedef HashMap<Ewk_Favicon_Database_Icon_Change_Cb, IconChangeCallbackData> Cha
typedef Vector<IconRequestCallbackData> PendingIconRequestVector;
typedef HashMap<String /* pageURL */, PendingIconRequestVector> PendingIconRequestMap;
-class _Ewk_Favicon_Database {
+class Ewk_Favicon_Database {
public:
WKRetainPtr<WKIconDatabaseRef> wkIconDatabase;
ChangeListenerMap changeListeners;
PendingIconRequestMap iconRequests;
- static PassOwnPtr<_Ewk_Favicon_Database> create(WKIconDatabaseRef iconDatabaseRef)
+ static PassOwnPtr<Ewk_Favicon_Database> create(WKIconDatabaseRef iconDatabaseRef)
{
- return adoptPtr(new _Ewk_Favicon_Database(iconDatabaseRef));
+ return adoptPtr(new Ewk_Favicon_Database(iconDatabaseRef));
}
private:
- explicit _Ewk_Favicon_Database(WKIconDatabaseRef iconDatabaseRef);
+ explicit Ewk_Favicon_Database(WKIconDatabaseRef iconDatabaseRef);
};
#endif // ewk_favicon_database_private_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.h b/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.h
index 9521e741c..b7fd0c6a8 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.h
@@ -40,8 +40,8 @@
extern "C" {
#endif
-/** Creates a type name for _Ewk_Form_Submission_Request */
-typedef struct _Ewk_Form_Submission_Request Ewk_Form_Submission_Request;
+/** Creates a type name for Ewk_Form_Submission_Request */
+typedef struct Ewk_Form_Submission_Request Ewk_Form_Submission_Request;
/**
* Increases the reference count of the given object.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request_private.h
index b9bf57a14..993b53357 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request_private.h
@@ -32,28 +32,26 @@
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
-typedef struct _Ewk_Form_Submission_Request Ewk_Form_Submission_Request;
-
-class _Ewk_Form_Submission_Request : public RefCounted<_Ewk_Form_Submission_Request> {
+class Ewk_Form_Submission_Request : public RefCounted<Ewk_Form_Submission_Request> {
public:
WKRetainPtr<WKDictionaryRef> wkValues;
WKRetainPtr<WKFormSubmissionListenerRef> wkListener;
bool handledRequest;
- ~_Ewk_Form_Submission_Request()
+ ~Ewk_Form_Submission_Request()
{
// Make sure the request is always handled before destroying.
if (!handledRequest)
WKFormSubmissionListenerContinue(wkListener.get());
}
- static PassRefPtr<_Ewk_Form_Submission_Request> create(WKDictionaryRef values, WKFormSubmissionListenerRef listener)
+ static PassRefPtr<Ewk_Form_Submission_Request> create(WKDictionaryRef values, WKFormSubmissionListenerRef listener)
{
- return adoptRef(new _Ewk_Form_Submission_Request(values, listener));
+ return adoptRef(new Ewk_Form_Submission_Request(values, listener));
}
private:
- _Ewk_Form_Submission_Request(WKDictionaryRef values, WKFormSubmissionListenerRef listener)
+ Ewk_Form_Submission_Request(WKDictionaryRef values, WKFormSubmissionListenerRef listener)
: wkValues(values)
, wkListener(listener)
, handledRequest(false)
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_intent.h b/Source/WebKit2/UIProcess/API/efl/ewk_intent.h
index 5b869023f..a23696da7 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_intent.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_intent.h
@@ -37,8 +37,8 @@
extern "C" {
#endif
-/** Creates a type name for _Ewk_Intent */
-typedef struct _Ewk_Intent Ewk_Intent;
+/** Creates a type name for Ewk_Intent */
+typedef struct Ewk_Intent Ewk_Intent;
/**
* Increases the reference count of the given object.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_intent_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_intent_private.h
index 95ffbb248..166a8a4f0 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_intent_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_intent_private.h
@@ -35,26 +35,24 @@
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
-typedef struct _Ewk_Intent Ewk_Intent;
-
/**
- * \struct _Ewk_Intent
+ * \struct Ewk_Intent
* @brief Contains the intent data.
*/
-class _Ewk_Intent : public RefCounted<_Ewk_Intent> {
+class Ewk_Intent : public RefCounted<Ewk_Intent> {
public:
WKRetainPtr<WKIntentDataRef> wkIntent;
WKEinaSharedString action;
WKEinaSharedString type;
WKEinaSharedString service;
- static PassRefPtr<_Ewk_Intent> create(WKIntentDataRef intentRef)
+ static PassRefPtr<Ewk_Intent> create(WKIntentDataRef intentRef)
{
- return adoptRef(new _Ewk_Intent(intentRef));
+ return adoptRef(new Ewk_Intent(intentRef));
}
private:
- explicit _Ewk_Intent(WKIntentDataRef intentRef)
+ explicit Ewk_Intent(WKIntentDataRef intentRef)
: wkIntent(intentRef)
, action(AdoptWK, WKIntentDataCopyAction(intentRef))
, type(AdoptWK, WKIntentDataCopyType(intentRef))
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_intent_service.h b/Source/WebKit2/UIProcess/API/efl/ewk_intent_service.h
index db946d247..a7d3d1a14 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_intent_service.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_intent_service.h
@@ -37,8 +37,8 @@
extern "C" {
#endif
-/** Creates a type name for _Ewk_Intent_Service */
-typedef struct _Ewk_Intent_Service Ewk_Intent_Service;
+/** Creates a type name for Ewk_Intent_Service */
+typedef struct Ewk_Intent_Service Ewk_Intent_Service;
/**
* Increases the reference count of the given object.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_intent_service_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_intent_service_private.h
index ca561c548..119d6703a 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_intent_service_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_intent_service_private.h
@@ -34,13 +34,11 @@
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
-typedef struct _Ewk_Intent_Service Ewk_Intent_Service;
-
/**
- * \struct _Ewk_Intent_Service
+ * \struct Ewk_Intent_Service
* @brief Contains the intent service data.
*/
-class _Ewk_Intent_Service : public RefCounted<_Ewk_Intent_Service> {
+class Ewk_Intent_Service : public RefCounted<Ewk_Intent_Service> {
public:
WKEinaSharedString action;
WKEinaSharedString type;
@@ -48,13 +46,13 @@ public:
WKEinaSharedString title;
WKEinaSharedString disposition;
- static PassRefPtr<_Ewk_Intent_Service> create(WKIntentServiceInfoRef serviceRef)
+ static PassRefPtr<Ewk_Intent_Service> create(WKIntentServiceInfoRef serviceRef)
{
- return adoptRef(new _Ewk_Intent_Service(serviceRef));
+ return adoptRef(new Ewk_Intent_Service(serviceRef));
}
private:
- explicit _Ewk_Intent_Service(WKIntentServiceInfoRef serviceRef)
+ explicit Ewk_Intent_Service(WKIntentServiceInfoRef serviceRef)
: action(AdoptWK, WKIntentServiceInfoCopyAction(serviceRef))
, type(AdoptWK, WKIntentServiceInfoCopyType(serviceRef))
, href(AdoptWK, WKIntentServiceInfoCopyHref(serviceRef))
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_navigation_data.h b/Source/WebKit2/UIProcess/API/efl/ewk_navigation_data.h
index 1a1e60732..b3b5c26fc 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_navigation_data.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_navigation_data.h
@@ -38,8 +38,8 @@
extern "C" {
#endif
-/** Creates a type name for _Ewk_Navigation_Data */
-typedef struct _Ewk_Navigation_Data Ewk_Navigation_Data;
+/** Creates a type name for Ewk_Navigation_Data */
+typedef struct Ewk_Navigation_Data Ewk_Navigation_Data;
/**
* Increases the reference count of the given object.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_navigation_data_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_navigation_data_private.h
index 08ad0ce16..e06016da4 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_navigation_data_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_navigation_data_private.h
@@ -36,28 +36,26 @@
#include <wtf/RefCounted.h>
/**
- * \struct _Ewk_Navigation_Data
+ * \struct Ewk_Navigation_Data
* @brief Contains the navigation data details.
*/
-class _Ewk_Navigation_Data : public RefCounted<_Ewk_Navigation_Data> {
+class Ewk_Navigation_Data : public RefCounted<Ewk_Navigation_Data> {
public:
RefPtr<Ewk_Url_Request> request;
WKEinaSharedString title;
WKEinaSharedString url;
- static PassRefPtr<_Ewk_Navigation_Data> create(WKNavigationDataRef dataRef)
+ static PassRefPtr<Ewk_Navigation_Data> create(WKNavigationDataRef dataRef)
{
- return adoptRef(new _Ewk_Navigation_Data(dataRef));
+ return adoptRef(new Ewk_Navigation_Data(dataRef));
}
private:
- explicit _Ewk_Navigation_Data(WKNavigationDataRef dataRef)
+ explicit Ewk_Navigation_Data(WKNavigationDataRef dataRef)
: request(Ewk_Url_Request::create(adoptWK(WKNavigationDataCopyOriginalRequest(dataRef)).get()))
, title(AdoptWK, WKNavigationDataCopyTitle(dataRef))
, url(AdoptWK, WKNavigationDataCopyURL(dataRef))
{ }
};
-typedef struct _Ewk_Navigation_Data Ewk_Navigation_Data;
-
#endif // ewk_navigation_data_private_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.h b/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.h
index 9f3c045ae..166b1dc8d 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.h
@@ -38,8 +38,8 @@
extern "C" {
#endif
-/** Creates a type name for _Ewk_Navigation_Policy_Decision */
-typedef struct _Ewk_Navigation_Policy_Decision Ewk_Navigation_Policy_Decision;
+/** Creates a type name for Ewk_Navigation_Policy_Decision */
+typedef struct Ewk_Navigation_Policy_Decision Ewk_Navigation_Policy_Decision;
/// Enum containing navigation types
typedef enum {
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision_private.h
index be1a8df5b..e7e454979 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision_private.h
@@ -37,10 +37,10 @@
#include <wtf/PassRefPtr.h>
/**
- * \struct _Ewk_Navigation_Policy_Decision
+ * \struct Ewk_Navigation_Policy_Decision
* @brief Contains the navigation policy decision data.
*/
-class _Ewk_Navigation_Policy_Decision : public RefCounted<_Ewk_Navigation_Policy_Decision> {
+class Ewk_Navigation_Policy_Decision : public RefCounted<Ewk_Navigation_Policy_Decision> {
public:
WKRetainPtr<WKFramePolicyListenerRef> listener;
bool actedUponByClient;
@@ -50,21 +50,21 @@ public:
RefPtr<Ewk_Url_Request> request;
WKEinaSharedString frameName;
- ~_Ewk_Navigation_Policy_Decision()
+ ~Ewk_Navigation_Policy_Decision()
{
// This is the default choice for all policy decisions in WebPageProxy.cpp.
if (!actedUponByClient)
WKFramePolicyListenerUse(listener.get());
}
- static PassRefPtr<_Ewk_Navigation_Policy_Decision> create(WKFrameNavigationType navigationType, WKEventMouseButton mouseButton, WKEventModifiers modifiers, WKURLRequestRef requestRef, const char* frameName, WKFramePolicyListenerRef listener)
+ static PassRefPtr<Ewk_Navigation_Policy_Decision> create(WKFrameNavigationType navigationType, WKEventMouseButton mouseButton, WKEventModifiers modifiers, WKURLRequestRef requestRef, const char* frameName, WKFramePolicyListenerRef listener)
{
RefPtr<Ewk_Url_Request> request = Ewk_Url_Request::create(requestRef);
- return adoptRef(new _Ewk_Navigation_Policy_Decision(listener, static_cast<Ewk_Navigation_Type>(navigationType), static_cast<Event_Mouse_Button>(mouseButton), static_cast<Event_Modifier_Keys>(modifiers), request.release(), frameName));
+ return adoptRef(new Ewk_Navigation_Policy_Decision(listener, static_cast<Ewk_Navigation_Type>(navigationType), static_cast<Event_Mouse_Button>(mouseButton), static_cast<Event_Modifier_Keys>(modifiers), request.release(), frameName));
}
private:
- _Ewk_Navigation_Policy_Decision(WKFramePolicyListenerRef listener, Ewk_Navigation_Type navigationType, Event_Mouse_Button mouseButton, Event_Modifier_Keys modifiers, PassRefPtr<Ewk_Url_Request> request, const char* frameName)
+ Ewk_Navigation_Policy_Decision(WKFramePolicyListenerRef listener, Ewk_Navigation_Type navigationType, Event_Mouse_Button mouseButton, Event_Modifier_Keys modifiers, PassRefPtr<Ewk_Url_Request> request, const char* frameName)
: listener(listener)
, actedUponByClient(false)
, navigationType(navigationType)
@@ -75,6 +75,4 @@ private:
{ }
};
-typedef struct _Ewk_Navigation_Policy_Decision Ewk_Navigation_Policy_Decision;
-
#endif // ewk_navigation_policy_decision_private_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item.cpp
index d0a3f6061..4b229be83 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item.cpp
@@ -32,7 +32,7 @@
using namespace WebKit;
-_Ewk_Popup_Menu_Item::_Ewk_Popup_Menu_Item(const WebKit::WebPopupItem& item)
+Ewk_Popup_Menu_Item::Ewk_Popup_Menu_Item(const WebKit::WebPopupItem& item)
: type(static_cast<Ewk_Popup_Menu_Item_Type>(item.m_type))
, textDirection(static_cast<Ewk_Text_Direction>(item.m_textDirection))
, hasTextDirectionOverride(item.m_hasTextDirectionOverride)
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item.h b/Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item.h
index b96d4366d..5efe6fe0e 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item.h
@@ -45,8 +45,8 @@ typedef enum {
EWK_POPUP_MENU_UNKNOWN = -1
} Ewk_Popup_Menu_Item_Type;
-/** Creates a type name for _Ewk_Popup_Menu_Item */
-typedef struct _Ewk_Popup_Menu_Item Ewk_Popup_Menu_Item;
+/** Creates a type name for Ewk_Popup_Menu_Item */
+typedef struct Ewk_Popup_Menu_Item Ewk_Popup_Menu_Item;
/**
* Returns type of the popup menu item.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item_private.h
index ec2ec36a8..ad215dcaf 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item_private.h
@@ -32,10 +32,10 @@
#include <wtf/PassOwnPtr.h>
/**
- * \struct _Ewk_Popup_Menu_Item
+ * \struct Ewk_Popup_Menu_Item
* @brief Contains the popup menu data.
*/
-class _Ewk_Popup_Menu_Item {
+class Ewk_Popup_Menu_Item {
public:
Ewk_Popup_Menu_Item_Type type;
Ewk_Text_Direction textDirection;
@@ -49,13 +49,13 @@ public:
WKEinaSharedString toolTip;
WKEinaSharedString accessibilityText;
- static PassOwnPtr<_Ewk_Popup_Menu_Item> create(const WebKit::WebPopupItem& item)
+ static PassOwnPtr<Ewk_Popup_Menu_Item> create(const WebKit::WebPopupItem& item)
{
- return adoptPtr(new _Ewk_Popup_Menu_Item(item));
+ return adoptPtr(new Ewk_Popup_Menu_Item(item));
}
private:
- explicit _Ewk_Popup_Menu_Item(const WebKit::WebPopupItem& item);
+ explicit Ewk_Popup_Menu_Item(const WebKit::WebPopupItem& item);
};
#endif // ewk_popup_menu_item_private_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_resource.h b/Source/WebKit2/UIProcess/API/efl/ewk_resource.h
index a2f4786b8..5ec40bb7a 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_resource.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_resource.h
@@ -38,7 +38,7 @@ extern "C" {
#endif
/** Creates a type name for @a Ewk_Resource. */
-typedef struct _Ewk_Resource Ewk_Resource;
+typedef struct Ewk_Resource Ewk_Resource;
/**
* Increases the reference count of the given object.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_resource_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_resource_private.h
index d86d67be8..99cc9333b 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_resource_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_resource_private.h
@@ -33,20 +33,18 @@
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
-typedef struct _Ewk_Resource Ewk_Resource;
-
-class _Ewk_Resource : public RefCounted<_Ewk_Resource> {
+class Ewk_Resource : public RefCounted<Ewk_Resource> {
public:
WKEinaSharedString url;
bool isMainResource;
- static PassRefPtr<_Ewk_Resource> create(WKURLRef url, bool isMainResource)
+ static PassRefPtr<Ewk_Resource> create(WKURLRef url, bool isMainResource)
{
- return adoptRef(new _Ewk_Resource(url, isMainResource));
+ return adoptRef(new Ewk_Resource(url, isMainResource));
}
private:
- _Ewk_Resource(WKURLRef url, bool isMainResource)
+ Ewk_Resource(WKURLRef url, bool isMainResource)
: url(url)
, isMainResource(isMainResource)
{ }
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_settings.h b/Source/WebKit2/UIProcess/API/efl/ewk_settings.h
index 1f178b6ae..861b9917f 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_settings.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_settings.h
@@ -40,8 +40,8 @@
extern "C" {
#endif
-/** Creates a type name for _Ewk_Settings */
-typedef struct _Ewk_Settings Ewk_Settings;
+/** Creates a type name for Ewk_Settings */
+typedef struct Ewk_Settings Ewk_Settings;
/**
* Creates a type name for the callback function used to notify the client when
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_settings_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_settings_private.h
index 2c9da0d7c..40ae3b781 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_settings_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_settings_private.h
@@ -31,17 +31,14 @@
#include <WebKit2/WKRetainPtr.h>
#include <wtf/PassOwnPtr.h>
-/** Creates a type name for _Ewk_Settings */
-typedef struct _Ewk_Settings Ewk_Settings;
-
/**
- * \struct _Ewk_Settings
+ * \struct Ewk_Settings
* @brief Contains the settings data.
*/
-struct _Ewk_Settings {
+struct Ewk_Settings {
WKRetainPtr<WKPreferencesRef> preferences;
- explicit _Ewk_Settings(WKPreferencesRef wkPreferences)
+ explicit Ewk_Settings(WKPreferencesRef wkPreferences)
: preferences(wkPreferences)
{ }
};
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_text_checker_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_text_checker_private.h
index d45505ad9..e74810613 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_text_checker_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_text_checker_private.h
@@ -35,7 +35,7 @@
*
* @internal
*/
-struct _Ewk_Text_Checker {
+struct Ewk_Text_Checker {
Ewk_Text_Checker_Unique_Spell_Document_Tag_Get_Cb unique_spell_document_tag_get;
Ewk_Text_Checker_Unique_Spell_Document_Tag_Close_Cb unique_spell_document_tag_close;
Ewk_Text_Checker_String_Spelling_Check_Cb string_spelling_check;
@@ -43,7 +43,6 @@ struct _Ewk_Text_Checker {
Ewk_Text_Checker_Word_Learn_Cb word_learn;
Ewk_Text_Checker_Word_Ignore_Cb word_ignore;
};
-typedef _Ewk_Text_Checker Ewk_Text_Checker;
Ewk_Text_Checker* ewk_text_checker_callbacks_get();
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_touch.h b/Source/WebKit2/UIProcess/API/efl/ewk_touch.h
index 1c9cdd59d..f2971a639 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_touch.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_touch.h
@@ -40,11 +40,11 @@ typedef enum {
EWK_TOUCH_CANCEL
} Ewk_Touch_Event_Type;
-/// Creates a type name for _Ewk_Touch_Point.
-typedef struct _Ewk_Touch_Point Ewk_Touch_Point;
+/// Creates a type name for Ewk_Touch_Point.
+typedef struct Ewk_Touch_Point Ewk_Touch_Point;
/// Represents a touch point.
-struct _Ewk_Touch_Point {
+struct Ewk_Touch_Point {
int id; /**< identifier of the touch event */
int x; /**< the horizontal position of the touch event */
int y; /**< the vertical position of the touch event */
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_url_request.h b/Source/WebKit2/UIProcess/API/efl/ewk_url_request.h
index f61b88af9..987bd8f05 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_url_request.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_url_request.h
@@ -37,8 +37,8 @@
extern "C" {
#endif
-/** Creates a type name for _Ewk_Url_Request */
-typedef struct _Ewk_Url_Request Ewk_Url_Request;
+/** Creates a type name for Ewk_Url_Request */
+typedef struct Ewk_Url_Request Ewk_Url_Request;
/**
* Increases the reference count of the given object.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_url_request_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_url_request_private.h
index b1bc13318..6fafb8876 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_url_request_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_url_request_private.h
@@ -33,28 +33,26 @@
#include <wtf/PassRefPtr.h>
/**
- * \struct _Ewk_Url_Request
+ * \struct Ewk_Url_Request
* @brief Contains the URL request data.
*/
-class _Ewk_Url_Request : public RefCounted<_Ewk_Url_Request> {
+class Ewk_Url_Request : public RefCounted<Ewk_Url_Request> {
public:
WKEinaSharedString url;
WKEinaSharedString firstParty;
WKEinaSharedString httpMethod;
- static PassRefPtr<_Ewk_Url_Request> create(WKURLRequestRef requestRef)
+ static PassRefPtr<Ewk_Url_Request> create(WKURLRequestRef requestRef)
{
- return adoptRef(new _Ewk_Url_Request(requestRef));
+ return adoptRef(new Ewk_Url_Request(requestRef));
}
private:
- explicit _Ewk_Url_Request(WKURLRequestRef requestRef)
+ explicit Ewk_Url_Request(WKURLRequestRef requestRef)
: url(AdoptWK, WKURLRequestCopyURL(requestRef))
, firstParty(AdoptWK, WKURLRequestCopyFirstPartyForCookies(requestRef))
, httpMethod(AdoptWK, WKURLRequestCopyHTTPMethod(requestRef))
{ }
};
-typedef struct _Ewk_Url_Request Ewk_Url_Request;
-
#endif // ewk_url_request_private_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_url_response.h b/Source/WebKit2/UIProcess/API/efl/ewk_url_response.h
index 25814d21d..cad8e0f76 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_url_response.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_url_response.h
@@ -37,8 +37,8 @@
extern "C" {
#endif
-/** Creates a type name for _Ewk_Url_Response */
-typedef struct _Ewk_Url_Response Ewk_Url_Response;
+/** Creates a type name for Ewk_Url_Response */
+typedef struct Ewk_Url_Response Ewk_Url_Response;
/**
* Increases the reference count of the given object.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_url_response_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_url_response_private.h
index 885d32bec..357c1c64e 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_url_response_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_url_response_private.h
@@ -33,31 +33,29 @@
#include <wtf/PassRefPtr.h>
/**
- * \struct _Ewk_Url_Response
+ * \struct Ewk_Url_Response
* @brief Contains the URL response data.
*/
-class _Ewk_Url_Response : public RefCounted<_Ewk_Url_Response> {
+class Ewk_Url_Response : public RefCounted<Ewk_Url_Response> {
public:
WebCore::ResourceResponse coreResponse;
WKEinaSharedString url;
WKEinaSharedString mimeType;
- static PassRefPtr<_Ewk_Url_Response> create(WKURLResponseRef wkResponse)
+ static PassRefPtr<Ewk_Url_Response> create(WKURLResponseRef wkResponse)
{
if (!wkResponse)
return 0;
- return adoptRef(new _Ewk_Url_Response(WebKit::toImpl(wkResponse)->resourceResponse()));
+ return adoptRef(new Ewk_Url_Response(WebKit::toImpl(wkResponse)->resourceResponse()));
}
private:
- explicit _Ewk_Url_Response(const WebCore::ResourceResponse& _coreResponse)
+ explicit Ewk_Url_Response(const WebCore::ResourceResponse& _coreResponse)
: coreResponse(_coreResponse)
, url(AdoptWK, WKURLResponseCopyURL(WebKit::toAPI(coreResponse)))
, mimeType(AdoptWK, WKURLResponseCopyMIMEType(WebKit::toAPI(coreResponse)))
{ }
};
-typedef struct _Ewk_Url_Response Ewk_Url_Response;
-
#endif // ewk_url_response_private_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.h b/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.h
index 94b502913..f36ea4fcd 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.h
@@ -37,7 +37,7 @@
extern "C" {
#endif
-/** Creates a type name for _Ewk_Url_Scheme_Request */
+/** Creates a type name for Ewk_Url_Scheme_Request */
typedef struct Ewk_Url_Scheme_Request Ewk_Url_Scheme_Request;
/**
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request_private.h
index 8c781022e..6bcba947e 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request_private.h
@@ -34,7 +34,7 @@
#include "WKSoupRequestManager.h"
/**
- * \struct _Ewk_Url_Scheme_Request
+ * \struct Ewk_Url_Scheme_Request
* @brief Contains the URL scheme request data.
*/
struct Ewk_Url_Scheme_Request : public RefCounted<Ewk_Url_Scheme_Request> {
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
index 95b084e10..ee4507c9f 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
@@ -25,6 +25,7 @@
#include "NativeWebMouseEvent.h"
#include "NativeWebWheelEvent.h"
#include "PageClientImpl.h"
+#include "RefPtrEfl.h"
#include "WKAPICast.h"
#include "WKColorPickerResultListener.h"
#include "WKEinaSharedString.h"
@@ -111,7 +112,7 @@ static inline void removeFromPageViewMap(const Evas_Object* ewkView)
pageViewMap().remove(ewk_view_page_get(ewkView));
}
-struct _Ewk_View_Private_Data {
+struct Ewk_View_Private_Data {
OwnPtr<PageClientImpl> pageClient;
#if USE(COORDINATED_GRAPHICS)
OwnPtr<EflViewportHandler> viewportHandler;
@@ -124,12 +125,12 @@ struct _Ewk_View_Private_Data {
WKEinaSharedString customEncoding;
WKEinaSharedString cursorGroup;
WKEinaSharedString faviconURL;
- Evas_Object* cursorObject;
+ RefPtr<Evas_Object> cursorObject;
LoadingResourcesMap loadingResourcesMap;
OwnPtr<Ewk_Back_Forward_List> backForwardList;
OwnPtr<Ewk_Settings> settings;
bool areMouseEventsEnabled;
- WKColorPickerResultListenerRef colorPickerResultListener;
+ WKRetainPtr<WKColorPickerResultListenerRef> colorPickerResultListener;
Ewk_Context* context;
#if ENABLE(TOUCH_EVENTS)
bool areTouchEventsEnabled;
@@ -148,10 +149,8 @@ struct _Ewk_View_Private_Data {
Evas_GL_Surface* evasGlSurface;
#endif
- _Ewk_View_Private_Data()
- : cursorObject(0)
- , areMouseEventsEnabled(false)
- , colorPickerResultListener(0)
+ Ewk_View_Private_Data()
+ : areMouseEventsEnabled(false)
, context(0)
#if ENABLE(TOUCH_EVENTS)
, areTouchEventsEnabled(false)
@@ -168,15 +167,12 @@ struct _Ewk_View_Private_Data {
#endif
{ }
- ~_Ewk_View_Private_Data()
+ ~Ewk_View_Private_Data()
{
/* Unregister icon change callback */
Ewk_Favicon_Database* iconDatabase = ewk_context_favicon_database_get(context);
ewk_favicon_database_icon_change_callback_del(iconDatabase, _ewk_view_on_favicon_changed);
- if (cursorObject)
- evas_object_del(cursorObject);
-
void* item;
EINA_LIST_FREE(popupMenuItems, item)
delete static_cast<Ewk_Popup_Menu_Item*>(item);
@@ -507,7 +503,7 @@ static void _ewk_view_smart_add(Evas_Object* ewkView)
smartData->priv = _ewk_view_priv_new(smartData);
if (!smartData->priv) {
- EINA_LOG_CRIT("could not allocate _Ewk_View_Private_Data");
+ EINA_LOG_CRIT("could not allocate Ewk_View_Private_Data");
evas_object_smart_data_set(ewkView, 0);
free(smartData);
return;
@@ -659,11 +655,14 @@ static void _ewk_view_smart_calculate(Evas_Object* ewkView)
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
- Evas_Coord x, y, width, height;
+
+#if USE(ACCELERATED_COMPOSITING)
bool needsNewSurface = false;
+#endif
smartData->changed.any = false;
+ Evas_Coord x, y, width, height;
evas_object_geometry_get(ewkView, &x, &y, &width, &height);
if (smartData->changed.size) {
@@ -1248,15 +1247,11 @@ void ewk_view_cursor_set(Evas_Object* ewkView, const Cursor& cursor)
return;
priv->cursorGroup = group;
-
- if (priv->cursorObject)
- evas_object_del(priv->cursorObject);
- priv->cursorObject = edje_object_add(smartData->base.evas);
+ priv->cursorObject = adoptRef(edje_object_add(smartData->base.evas));
Ecore_Evas* ecoreEvas = ecore_evas_ecore_evas_get(smartData->base.evas);
- if (!priv->theme || !edje_object_file_set(priv->cursorObject, priv->theme, group)) {
- evas_object_del(priv->cursorObject);
- priv->cursorObject = 0;
+ if (!priv->theme || !edje_object_file_set(priv->cursorObject.get(), priv->theme, group)) {
+ priv->cursorObject.clear();
ecore_evas_object_cursor_set(ecoreEvas, 0, 0, 0, 0);
#ifdef HAVE_ECORE_X
@@ -1267,27 +1262,27 @@ void ewk_view_cursor_set(Evas_Object* ewkView, const Cursor& cursor)
}
Evas_Coord width, height;
- edje_object_size_min_get(priv->cursorObject, &width, &height);
+ edje_object_size_min_get(priv->cursorObject.get(), &width, &height);
if (width <= 0 || height <= 0)
- edje_object_size_min_calc(priv->cursorObject, &width, &height);
+ edje_object_size_min_calc(priv->cursorObject.get(), &width, &height);
if (width <= 0 || height <= 0) {
width = defaultCursorSize;
height = defaultCursorSize;
}
- evas_object_resize(priv->cursorObject, width, height);
+ evas_object_resize(priv->cursorObject.get(), width, height);
const char* data;
int hotspotX = 0;
- data = edje_object_data_get(priv->cursorObject, "hot.x");
+ data = edje_object_data_get(priv->cursorObject.get(), "hot.x");
if (data)
hotspotX = atoi(data);
int hotspotY = 0;
- data = edje_object_data_get(priv->cursorObject, "hot.y");
+ data = edje_object_data_get(priv->cursorObject.get(), "hot.y");
if (data)
hotspotY = atoi(data);
- ecore_evas_object_cursor_set(ecoreEvas, priv->cursorObject, EVAS_LAYER_MAX, hotspotX, hotspotY);
+ ecore_evas_object_cursor_set(ecoreEvas, priv->cursorObject.get(), EVAS_LAYER_MAX, hotspotX, hotspotY);
}
void ewk_view_display(Evas_Object* ewkView, const IntRect& rect)
@@ -1909,7 +1904,7 @@ WKEinaSharedString ewk_view_run_javascript_prompt(Evas_Object* ewkView, const WK
#if ENABLE(INPUT_TYPE_COLOR)
/**
* @internal
- * Reqeusts to show external color picker.
+ * Requests to show external color picker.
*/
void ewk_view_color_picker_request(Evas_Object* ewkView, int r, int g, int b, int a, WKColorPickerResultListenerRef listener)
{
@@ -1924,7 +1919,7 @@ void ewk_view_color_picker_request(Evas_Object* ewkView, int r, int g, int b, in
/**
* @internal
- * Reqeusts to hide external color picker.
+ * Requests to hide external color picker.
*/
void ewk_view_color_picker_dismiss(Evas_Object* ewkView)
{
@@ -1932,7 +1927,7 @@ void ewk_view_color_picker_dismiss(Evas_Object* ewkView)
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
EINA_SAFETY_ON_NULL_RETURN(smartData->api->input_picker_color_dismiss);
- priv->colorPickerResultListener = 0;
+ priv->colorPickerResultListener.clear();
smartData->api->input_picker_color_dismiss(smartData);
}
@@ -1947,8 +1942,8 @@ Eina_Bool ewk_view_color_picker_color_set(Evas_Object* ewkView, int r, int g, in
WebCore::Color color = WebCore::Color(r, g, b, a);
const WKStringRef colorString = WKStringCreateWithUTF8CString(color.serialized().utf8().data());
- WKColorPickerResultListenerSetColor(priv->colorPickerResultListener, colorString);
- priv->colorPickerResultListener = 0;
+ WKColorPickerResultListenerSetColor(priv->colorPickerResultListener.get(), colorString);
+ priv->colorPickerResultListener.clear();
return true;
#else
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.h b/Source/WebKit2/UIProcess/API/efl/ewk_view.h
index 7d8bb6acb..34a0817ba 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_view.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.h
@@ -96,11 +96,11 @@ typedef enum {
EWK_TEXT_DIRECTION_LEFT_TO_RIGHT
} Ewk_Text_Direction;
-typedef struct _Ewk_View_Smart_Data Ewk_View_Smart_Data;
-typedef struct _Ewk_View_Smart_Class Ewk_View_Smart_Class;
+typedef struct Ewk_View_Smart_Data Ewk_View_Smart_Data;
+typedef struct Ewk_View_Smart_Class Ewk_View_Smart_Class;
/// Ewk view's class, to be overridden by sub-classes.
-struct _Ewk_View_Smart_Class {
+struct Ewk_View_Smart_Class {
Evas_Smart_Class sc; /**< all but 'data' is free to be changed. */
unsigned long version;
@@ -182,14 +182,14 @@ struct _Ewk_View_Smart_Class {
*/
#define EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION(name) EWK_VIEW_SMART_CLASS_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name))
-typedef struct _Ewk_View_Private_Data Ewk_View_Private_Data;
+typedef struct Ewk_View_Private_Data Ewk_View_Private_Data;
/**
* @brief Contains an internal View data.
*
* It is to be considered private by users, but may be extended or
* changed by sub-classes (that's why it's in public header file).
*/
-struct _Ewk_View_Smart_Data {
+struct Ewk_View_Smart_Data {
Evas_Object_Smart_Clipped_Data base;
const Ewk_View_Smart_Class* api; /**< reference to casted class instance */
Evas_Object* self; /**< reference to owner object */
@@ -205,49 +205,49 @@ struct _Ewk_View_Smart_Data {
} changed;
};
-/// Creates a type name for _Ewk_Resource_Request.
-typedef struct _Ewk_Resource_Request Ewk_Resource_Request;
+/// Creates a type name for Ewk_Resource_Request.
+typedef struct Ewk_Resource_Request Ewk_Resource_Request;
/**
* @brief Structure containing details about a resource request.
*/
-struct _Ewk_Resource_Request {
+struct Ewk_Resource_Request {
Ewk_Resource *resource; /**< resource being requested */
Ewk_Url_Request *request; /**< URL request for the resource */
Ewk_Url_Response *redirect_response; /**< Possible redirect response for the resource or @c NULL */
};
-/// Creates a type name for _Ewk_Resource_Load_Response.
-typedef struct _Ewk_Resource_Load_Response Ewk_Resource_Load_Response;
+/// Creates a type name for Ewk_Resource_Load_Response.
+typedef struct Ewk_Resource_Load_Response Ewk_Resource_Load_Response;
/**
* @brief Structure containing details about a response to a resource request.
*/
-struct _Ewk_Resource_Load_Response {
+struct Ewk_Resource_Load_Response {
Ewk_Resource *resource; /**< resource requested */
Ewk_Url_Response *response; /**< resource load response */
};
-/// Creates a type name for _Ewk_Resource_Load_Error.
-typedef struct _Ewk_Resource_Load_Error Ewk_Resource_Load_Error;
+/// Creates a type name for Ewk_Resource_Load_Error.
+typedef struct Ewk_Resource_Load_Error Ewk_Resource_Load_Error;
/**
* @brief Structure containing details about a resource load error.
*
* Details given about a resource load failure.
*/
-struct _Ewk_Resource_Load_Error {
+struct Ewk_Resource_Load_Error {
Ewk_Resource *resource; /**< resource that failed loading */
Ewk_Error *error; /**< load error */
};
-/// Creates a type name for _Ewk_Download_Job_Error.
-typedef struct _Ewk_Download_Job_Error Ewk_Download_Job_Error;
+/// Creates a type name for Ewk_Download_Job_Error.
+typedef struct Ewk_Download_Job_Error Ewk_Download_Job_Error;
/**
* @brief Structure containing details about a download failure.
*/
-struct _Ewk_Download_Job_Error {
+struct Ewk_Download_Job_Error {
Ewk_Download_Job *download_job; /**< download that failed */
Ewk_Error *error; /**< download error */
};
@@ -257,7 +257,7 @@ struct _Ewk_Download_Job_Error {
* @brief Provides option to find text
* @info Keep this in sync with WKFindOptions.h
*/
-enum _Ewk_Find_Options {
+enum Ewk_Find_Options {
EWK_FIND_OPTIONS_NONE, /**< no search flags, this means a case sensitive, no wrap, forward only search. */
EWK_FIND_OPTIONS_CASE_INSENSITIVE = 1 << 0, /**< case insensitive search. */
EWK_FIND_OPTIONS_AT_WORD_STARTS = 1 << 1, /**< search text only at the beginning of the words. */
@@ -268,7 +268,7 @@ enum _Ewk_Find_Options {
EWK_FIND_OPTIONS_SHOW_FIND_INDICATOR = 1 << 6, /**< show indicator */
EWK_FIND_OPTIONS_SHOW_HIGHLIGHT = 1 << 7 /**< show highlight */
};
-typedef enum _Ewk_Find_Options Ewk_Find_Options;
+typedef enum Ewk_Find_Options Ewk_Find_Options;
/**
* Sets the smart class APIs, enabling view to be inherited.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h
index 64f7e8d5e..61c7bd41a 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h
@@ -39,18 +39,18 @@ class WebPopupItem;
class WebPopupMenuProxyEfl;
}
-typedef struct _Ewk_Download_Job Ewk_Download_Job;
-typedef struct _Ewk_Form_Submission_Request Ewk_Form_Submission_Request;
-typedef struct _Ewk_Url_Request Ewk_Url_Request;
-typedef struct _Ewk_Url_Response Ewk_Url_Response;
-typedef struct _Ewk_Error Ewk_Error;
-typedef struct _Ewk_Resource Ewk_Resource;
-typedef struct _Ewk_Navigation_Policy_Decision Ewk_Navigation_Policy_Decision;
+typedef struct Ewk_Download_Job Ewk_Download_Job;
+typedef struct Ewk_Form_Submission_Request Ewk_Form_Submission_Request;
+typedef struct Ewk_Url_Request Ewk_Url_Request;
+typedef struct Ewk_Url_Response Ewk_Url_Response;
+typedef struct Ewk_Error Ewk_Error;
+typedef struct Ewk_Resource Ewk_Resource;
+typedef struct Ewk_Navigation_Policy_Decision Ewk_Navigation_Policy_Decision;
#if ENABLE(WEB_INTENTS)
-typedef struct _Ewk_Intent Ewk_Intent;
+typedef struct Ewk_Intent Ewk_Intent;
#endif
#if ENABLE(WEB_INTENTS_TAG)
-typedef struct _Ewk_Intent_Service Ewk_Intent_Service;
+typedef struct Ewk_Intent_Service Ewk_Intent_Service;
#endif
void ewk_view_cursor_set(Evas_Object* ewkView, const WebCore::Cursor& cursor);
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardList.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardList.cpp
index ebeb92034..d600d7816 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardList.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardList.cpp
@@ -52,10 +52,10 @@ enum {
LAST_SIGNAL
};
-typedef HashMap<WKBackForwardListItemRef, GRefPtr<WebKitBackForwardListItem> > BackForwardListItemsMap;
+typedef HashMap<WebBackForwardListItem*, GRefPtr<WebKitBackForwardListItem> > BackForwardListItemsMap;
struct _WebKitBackForwardListPrivate {
- WKBackForwardListRef wkList;
+ WebBackForwardList* backForwardItems;
BackForwardListItemsMap itemsMap;
};
@@ -107,55 +107,55 @@ static void webkit_back_forward_list_class_init(WebKitBackForwardListClass* list
g_type_class_add_private(listClass, sizeof(WebKitBackForwardListPrivate));
}
-static WebKitBackForwardListItem* webkitBackForwardListGetOrCreateItem(WebKitBackForwardList* list, WKBackForwardListItemRef wkListItem)
+static WebKitBackForwardListItem* webkitBackForwardListGetOrCreateItem(WebKitBackForwardList* list, WebBackForwardListItem* webListItem)
{
- if (!wkListItem)
+ if (!webListItem)
return 0;
WebKitBackForwardListPrivate* priv = list->priv;
- GRefPtr<WebKitBackForwardListItem> listItem = priv->itemsMap.get(wkListItem);
+ GRefPtr<WebKitBackForwardListItem> listItem = priv->itemsMap.get(webListItem);
if (listItem)
return listItem.get();
- listItem = webkitBackForwardListItemGetOrCreate(wkListItem);
- priv->itemsMap.set(wkListItem, listItem);
+ listItem = webkitBackForwardListItemGetOrCreate(webListItem);
+ priv->itemsMap.set(webListItem, listItem);
return listItem.get();
}
-static GList* webkitBackForwardListCreateList(WebKitBackForwardList* list, WKArrayRef wkList)
+static GList* webkitBackForwardListCreateList(WebKitBackForwardList* list, ImmutableArray* backForwardItems)
{
- if (!wkList)
+ if (!backForwardItems)
return 0;
GList* returnValue = 0;
- for (size_t i = 0; i < WKArrayGetSize(wkList); ++i) {
- WKBackForwardListItemRef wkItem = static_cast<WKBackForwardListItemRef>(WKArrayGetItemAtIndex(wkList, i));
- returnValue = g_list_prepend(returnValue, webkitBackForwardListGetOrCreateItem(list, wkItem));
+ for (size_t i = 0; i < backForwardItems->size(); ++i) {
+ WebBackForwardListItem* webItem = static_cast<WebBackForwardListItem*>(backForwardItems->at(i));
+ returnValue = g_list_prepend(returnValue, webkitBackForwardListGetOrCreateItem(list, webItem));
}
return returnValue;
}
-WebKitBackForwardList* webkitBackForwardListCreate(WKBackForwardListRef wkList)
+WebKitBackForwardList* webkitBackForwardListCreate(WebBackForwardList* backForwardItems)
{
WebKitBackForwardList* list = WEBKIT_BACK_FORWARD_LIST(g_object_new(WEBKIT_TYPE_BACK_FORWARD_LIST, NULL));
- list->priv->wkList = wkList;
+ list->priv->backForwardItems = backForwardItems;
return list;
}
-void webkitBackForwardListChanged(WebKitBackForwardList* backForwardList, WKBackForwardListItemRef wkAddedItem, WKArrayRef wkRemovedItems)
+void webkitBackForwardListChanged(WebKitBackForwardList* backForwardList, WebBackForwardListItem* webAddedItem, ImmutableArray* webRemovedItems)
{
- WebKitBackForwardListItem* addedItem = webkitBackForwardListGetOrCreateItem(backForwardList, wkAddedItem);
+ WebKitBackForwardListItem* addedItem = webkitBackForwardListGetOrCreateItem(backForwardList, webAddedItem);
GList* removedItems = 0;
- size_t removedItemsSize = wkRemovedItems ? WKArrayGetSize(wkRemovedItems) : 0;
+ size_t removedItemsSize = webRemovedItems ? webRemovedItems->size() : 0;
WebKitBackForwardListPrivate* priv = backForwardList->priv;
for (size_t i = 0; i < removedItemsSize; ++i) {
- WKBackForwardListItemRef wkItem = static_cast<WKBackForwardListItemRef>(WKArrayGetItemAtIndex(wkRemovedItems, i));
- removedItems = g_list_prepend(removedItems, g_object_ref(G_OBJECT(priv->itemsMap.get(wkItem).get())));
- priv->itemsMap.remove(wkItem);
+ WebBackForwardListItem* webItem = static_cast<WebBackForwardListItem*>(webRemovedItems->at(i));
+ removedItems = g_list_prepend(removedItems, g_object_ref(G_OBJECT(priv->itemsMap.get(webItem).get())));
+ priv->itemsMap.remove(webItem);
}
g_signal_emit(backForwardList, signals[CHANGED], 0, addedItem, removedItems, NULL);
@@ -175,7 +175,7 @@ WebKitBackForwardListItem* webkit_back_forward_list_get_current_item(WebKitBackF
{
g_return_val_if_fail(WEBKIT_IS_BACK_FORWARD_LIST(backForwardList), 0);
- return webkitBackForwardListGetOrCreateItem(backForwardList, WKBackForwardListGetCurrentItem(backForwardList->priv->wkList));
+ return webkitBackForwardListGetOrCreateItem(backForwardList, backForwardList->priv->backForwardItems->currentItem());
}
/**
@@ -191,7 +191,7 @@ WebKitBackForwardListItem* webkit_back_forward_list_get_back_item(WebKitBackForw
{
g_return_val_if_fail(WEBKIT_IS_BACK_FORWARD_LIST(backForwardList), 0);
- return webkitBackForwardListGetOrCreateItem(backForwardList, WKBackForwardListGetBackItem(backForwardList->priv->wkList));
+ return webkitBackForwardListGetOrCreateItem(backForwardList, backForwardList->priv->backForwardItems->backItem());
}
/**
@@ -207,7 +207,7 @@ WebKitBackForwardListItem* webkit_back_forward_list_get_forward_item(WebKitBackF
{
g_return_val_if_fail(WEBKIT_IS_BACK_FORWARD_LIST(backForwardList), 0);
- return webkitBackForwardListGetOrCreateItem(backForwardList, WKBackForwardListGetForwardItem(backForwardList->priv->wkList));
+ return webkitBackForwardListGetOrCreateItem(backForwardList, backForwardList->priv->backForwardItems->forwardItem());
}
/**
@@ -224,7 +224,7 @@ WebKitBackForwardListItem* webkit_back_forward_list_get_nth_item(WebKitBackForwa
{
g_return_val_if_fail(WEBKIT_IS_BACK_FORWARD_LIST(backForwardList), 0);
- return webkitBackForwardListGetOrCreateItem(backForwardList, WKBackForwardListGetItemAtIndex(backForwardList->priv->wkList, index));
+ return webkitBackForwardListGetOrCreateItem(backForwardList, backForwardList->priv->backForwardItems->itemAtIndex(index));
}
/**
@@ -239,7 +239,7 @@ guint webkit_back_forward_list_get_length(WebKitBackForwardList* backForwardList
WebKitBackForwardListPrivate* priv = backForwardList->priv;
guint currentItem = webkit_back_forward_list_get_current_item(backForwardList) ? 1 : 0;
- return WKBackForwardListGetBackListCount(priv->wkList) + WKBackForwardListGetForwardListCount(priv->wkList) + currentItem;
+ return priv->backForwardItems->backListCount() + priv->backForwardItems->forwardListCount() + currentItem;
}
/**
@@ -253,9 +253,7 @@ GList* webkit_back_forward_list_get_back_list(WebKitBackForwardList* backForward
{
g_return_val_if_fail(WEBKIT_IS_BACK_FORWARD_LIST(backForwardList), 0);
- guint limit = WKBackForwardListGetBackListCount(backForwardList->priv->wkList);
- WKRetainPtr<WKArrayRef> wkList(AdoptWK, WKBackForwardListCopyBackListWithLimit(backForwardList->priv->wkList, limit));
- return webkitBackForwardListCreateList(backForwardList, wkList.get());
+ return webkit_back_forward_list_get_back_list_with_limit(backForwardList, backForwardList->priv->backForwardItems->backListCount());
}
/**
@@ -270,8 +268,8 @@ GList* webkit_back_forward_list_get_back_list_with_limit(WebKitBackForwardList*
{
g_return_val_if_fail(WEBKIT_IS_BACK_FORWARD_LIST(backForwardList), 0);
- WKRetainPtr<WKArrayRef> wkList(AdoptWK, WKBackForwardListCopyBackListWithLimit(backForwardList->priv->wkList, limit));
- return webkitBackForwardListCreateList(backForwardList, wkList.get());
+ WebKitBackForwardListPrivate* priv = backForwardList->priv;
+ return webkitBackForwardListCreateList(backForwardList, priv->backForwardItems->backListAsImmutableArrayWithLimit(limit).leakRef());
}
/**
@@ -285,9 +283,7 @@ GList* webkit_back_forward_list_get_forward_list(WebKitBackForwardList* backForw
{
g_return_val_if_fail(WEBKIT_IS_BACK_FORWARD_LIST(backForwardList), 0);
- guint limit = WKBackForwardListGetForwardListCount(backForwardList->priv->wkList);
- WKRetainPtr<WKArrayRef> wkList(AdoptWK, WKBackForwardListCopyForwardListWithLimit(backForwardList->priv->wkList, limit));
- return webkitBackForwardListCreateList(backForwardList, wkList.get());
+ return webkit_back_forward_list_get_forward_list_with_limit(backForwardList, backForwardList->priv->backForwardItems->forwardListCount());
}
/**
@@ -302,6 +298,6 @@ GList* webkit_back_forward_list_get_forward_list_with_limit(WebKitBackForwardLis
{
g_return_val_if_fail(WEBKIT_IS_BACK_FORWARD_LIST(backForwardList), 0);
- WKRetainPtr<WKArrayRef> wkList(AdoptWK, WKBackForwardListCopyForwardListWithLimit(backForwardList->priv->wkList, limit));
- return webkitBackForwardListCreateList(backForwardList, wkList.get());
+ WebKitBackForwardListPrivate* priv = backForwardList->priv;
+ return webkitBackForwardListCreateList(backForwardList, priv->backForwardItems->forwardListAsImmutableArrayWithLimit(limit).leakRef());
}
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListItem.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListItem.cpp
index c6a4b598c..8b22afc46 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListItem.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListItem.cpp
@@ -29,7 +29,7 @@
using namespace WebKit;
struct _WebKitBackForwardListItemPrivate {
- WKRetainPtr<WKBackForwardListItemRef> wkListItem;
+ RefPtr<WebBackForwardListItem> webListItem;
CString uri;
CString title;
CString originalURI;
@@ -59,7 +59,7 @@ static void webkit_back_forward_list_item_class_init(WebKitBackForwardListItemCl
g_type_class_add_private(listItemClass, sizeof(WebKitBackForwardListItemPrivate));
}
-typedef HashMap<WKBackForwardListItemRef, WebKitBackForwardListItem*> HistoryItemsMap;
+typedef HashMap<WebBackForwardListItem*, WebKitBackForwardListItem*> HistoryItemsMap;
static HistoryItemsMap& historyItemsMap()
{
@@ -67,34 +67,33 @@ static HistoryItemsMap& historyItemsMap()
return itemsMap;
}
-static void webkitBackForwardListItemFinalized(gpointer wkListItem, GObject* finalizedListItem)
+static void webkitBackForwardListItemFinalized(gpointer webListItem, GObject* finalizedListItem)
{
- ASSERT(G_OBJECT(historyItemsMap().get(static_cast<WKBackForwardListItemRef>(wkListItem))) == finalizedListItem);
- historyItemsMap().remove(static_cast<WKBackForwardListItemRef>(wkListItem));
+ ASSERT(G_OBJECT(historyItemsMap().get(static_cast<WebBackForwardListItem*>(webListItem))) == finalizedListItem);
+ historyItemsMap().remove(static_cast<WebBackForwardListItem*>(webListItem));
}
-WebKitBackForwardListItem* webkitBackForwardListItemGetOrCreate(WKBackForwardListItemRef wkListItem)
+WebKitBackForwardListItem* webkitBackForwardListItemGetOrCreate(WebBackForwardListItem* webListItem)
{
- if (!wkListItem)
+ if (!webListItem)
return 0;
- WebKitBackForwardListItem* listItem = historyItemsMap().get(wkListItem);
+ WebKitBackForwardListItem* listItem = historyItemsMap().get(webListItem);
if (listItem)
return listItem;
listItem = WEBKIT_BACK_FORWARD_LIST_ITEM(g_object_new(WEBKIT_TYPE_BACK_FORWARD_LIST_ITEM, NULL));
- listItem->priv->wkListItem = wkListItem;
+ listItem->priv->webListItem = webListItem;
- g_object_weak_ref(G_OBJECT(listItem), webkitBackForwardListItemFinalized,
- const_cast<OpaqueWKBackForwardListItem*>(wkListItem));
- historyItemsMap().set(wkListItem, listItem);
+ g_object_weak_ref(G_OBJECT(listItem), webkitBackForwardListItemFinalized, webListItem);
+ historyItemsMap().set(webListItem, listItem);
return listItem;
}
-WKBackForwardListItemRef webkitBackForwardListItemGetWKItem(WebKitBackForwardListItem* listItem)
+WebBackForwardListItem* webkitBackForwardListItemGetItem(WebKitBackForwardListItem* listItem)
{
- return listItem->priv->wkListItem.get();
+ return listItem->priv->webListItem.get();
}
/**
@@ -113,11 +112,11 @@ const gchar* webkit_back_forward_list_item_get_uri(WebKitBackForwardListItem* li
g_return_val_if_fail(WEBKIT_IS_BACK_FORWARD_LIST_ITEM(listItem), 0);
WebKitBackForwardListItemPrivate* priv = listItem->priv;
- WKRetainPtr<WKURLRef> wkURI(AdoptWK, WKBackForwardListItemCopyURL(priv->wkListItem.get()));
- if (toImpl(wkURI.get())->string().isEmpty())
+ String url = priv->webListItem->url();
+ if (url.isEmpty())
return 0;
- priv->uri = toImpl(wkURI.get())->string().utf8();
+ priv->uri = url.utf8();
return priv->uri.data();
}
@@ -133,11 +132,11 @@ const gchar* webkit_back_forward_list_item_get_title(WebKitBackForwardListItem*
g_return_val_if_fail(WEBKIT_IS_BACK_FORWARD_LIST_ITEM(listItem), 0);
WebKitBackForwardListItemPrivate* priv = listItem->priv;
- WKRetainPtr<WKStringRef> wkTitle(AdoptWK, WKBackForwardListItemCopyTitle(priv->wkListItem.get()));
- if (toImpl(wkTitle.get())->string().isEmpty())
+ String title = priv->webListItem->title();
+ if (title.isEmpty())
return 0;
- priv->title = toImpl(wkTitle.get())->string().utf8();
+ priv->title = title.utf8();
return priv->title.data();
}
@@ -155,10 +154,10 @@ const gchar* webkit_back_forward_list_item_get_original_uri(WebKitBackForwardLis
g_return_val_if_fail(WEBKIT_IS_BACK_FORWARD_LIST_ITEM(listItem), 0);
WebKitBackForwardListItemPrivate* priv = listItem->priv;
- WKRetainPtr<WKURLRef> wkOriginalURI(AdoptWK, WKBackForwardListItemCopyOriginalURL(priv->wkListItem.get()));
- if (toImpl(wkOriginalURI.get())->string().isEmpty())
+ String originalURL = priv->webListItem->originalURL();
+ if (originalURL.isEmpty())
return 0;
- priv->originalURI = toImpl(wkOriginalURI.get())->string().utf8();
+ priv->originalURI = originalURL.utf8();
return priv->originalURI.data();
}
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListPrivate.h b/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListPrivate.h
index 333e68d18..e3ec77a3d 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListPrivate.h
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListPrivate.h
@@ -28,11 +28,12 @@
#include "WebBackForwardList.h"
#include "WebKitBackForwardList.h"
-#include <WebKit2/WebKit2_C.h>
-WebKitBackForwardList* webkitBackForwardListCreate(WKBackForwardListRef);
-WebKitBackForwardListItem* webkitBackForwardListItemGetOrCreate(WKBackForwardListItemRef);
-WKBackForwardListItemRef webkitBackForwardListItemGetWKItem(WebKitBackForwardListItem*);
-void webkitBackForwardListChanged(WebKitBackForwardList*, WKBackForwardListItemRef wkAddedItem, WKArrayRef wkRemovedItems);
+using namespace WebKit;
+
+WebKitBackForwardList* webkitBackForwardListCreate(WebBackForwardList*);
+WebKitBackForwardListItem* webkitBackForwardListItemGetOrCreate(WebBackForwardListItem*);
+WebBackForwardListItem* webkitBackForwardListItemGetItem(WebKitBackForwardListItem*);
+void webkitBackForwardListChanged(WebKitBackForwardList*, WebBackForwardListItem* webAddedItem, ImmutableArray* webRemovedItems);
#endif // WebKitBackForwardListPrivate_h
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenu.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenu.cpp
index f05fbf93f..510c25dbc 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenu.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenu.cpp
@@ -20,10 +20,11 @@
#include "config.h"
#include "WebKitContextMenu.h"
+#include "ImmutableArray.h"
+#include "WebContextMenuItem.h"
#include "WebKitContextMenuItemPrivate.h"
#include "WebKitContextMenuPrivate.h"
-using namespace WebKit;
using namespace WebCore;
struct _WebKitContextMenuPrivate {
@@ -64,12 +65,12 @@ void webkitContextMenuPopulate(WebKitContextMenu* menu, Vector<ContextMenuItem>&
}
}
-WebKitContextMenu* webkitContextMenuCreate(WKArrayRef wkItems)
+WebKitContextMenu* webkitContextMenuCreate(ImmutableArray* items)
{
WebKitContextMenu* menu = webkit_context_menu_new();
- for (size_t i = 0; i < WKArrayGetSize(wkItems); ++i) {
- WKContextMenuItemRef wkItem = static_cast<WKContextMenuItemRef>(WKArrayGetItemAtIndex(wkItems, i));
- webkit_context_menu_prepend(menu, webkitContextMenuItemCreate(wkItem));
+ for (size_t i = 0; i < items->size(); ++i) {
+ WebContextMenuItem* item = static_cast<WebContextMenuItem*>(items->at(i));
+ webkit_context_menu_prepend(menu, webkitContextMenuItemCreate(item));
}
menu->priv->items = g_list_reverse(menu->priv->items);
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.cpp
index b2b22fe41..0887f7749 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.cpp
@@ -34,7 +34,6 @@
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/gobject/GRefPtr.h>
-using namespace WebKit;
using namespace WebCore;
struct _WebKitContextMenuItemPrivate {
@@ -91,10 +90,10 @@ static void webkitContextMenuItemSetSubMenu(WebKitContextMenuItem* item, GRefPtr
webkitContextMenuSetParentItem(subMenu.get(), item);
}
-WebKitContextMenuItem* webkitContextMenuItemCreate(WKContextMenuItemRef wkItem)
+WebKitContextMenuItem* webkitContextMenuItemCreate(WebContextMenuItem* webItem)
{
WebKitContextMenuItem* item = WEBKIT_CONTEXT_MENU_ITEM(g_object_new(WEBKIT_TYPE_CONTEXT_MENU_ITEM, NULL));
- WebContextMenuItemData* itemData = toImpl(wkItem)->data();
+ WebContextMenuItemData* itemData = webItem->data();
item->priv->menuItem = WTF::adoptPtr(new ContextMenuItem(itemData->type(), itemData->action(), itemData->title(), itemData->enabled(), itemData->checked()));
const Vector<WebContextMenuItemData>& subMenu = itemData->submenu();
if (!subMenu.size())
@@ -104,7 +103,7 @@ WebKitContextMenuItem* webkitContextMenuItemCreate(WKContextMenuItemRef wkItem)
subMenuItems->reserveCapacity(subMenu.size());
for (size_t i = 0; i < subMenu.size(); ++i)
subMenuItems->append(WebContextMenuItem::create(subMenu[i]).get());
- webkitContextMenuItemSetSubMenu(item, adoptGRef(webkitContextMenuCreate(toAPI(subMenuItems.get()))));
+ webkitContextMenuItemSetSubMenu(item, adoptGRef(webkitContextMenuCreate(subMenuItems.get())));
return item;
}
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItemPrivate.h b/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItemPrivate.h
index 9c88003bf..022fcec88 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItemPrivate.h
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItemPrivate.h
@@ -23,7 +23,9 @@
#include "WebKitContextMenuItem.h"
#include "WebKitPrivate.h"
-WebKitContextMenuItem* webkitContextMenuItemCreate(WKContextMenuItemRef);
+using namespace WebKit;
+
+WebKitContextMenuItem* webkitContextMenuItemCreate(WebContextMenuItem*);
GtkMenuItem* webkitContextMenuItemRelease(WebKitContextMenuItem*);
void webkitContextMenuItemSetSubMenuFromGtkMenu(WebKitContextMenuItem*, GtkMenu*);
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuPrivate.h b/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuPrivate.h
index 6d3f18015..3a39dff00 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuPrivate.h
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuPrivate.h
@@ -23,7 +23,9 @@
#include "WebKitContextMenu.h"
#include "WebKitPrivate.h"
-WebKitContextMenu* webkitContextMenuCreate(WKArrayRef wkItems);
+using namespace WebKit;
+
+WebKitContextMenu* webkitContextMenuCreate(ImmutableArray* items);
void webkitContextMenuPopulate(WebKitContextMenu*, Vector<WebCore::ContextMenuItem>&);
void webkitContextMenuSetParentItem(WebKitContextMenu*, WebKitContextMenuItem*);
WebKitContextMenuItem* webkitContextMenuGetParentItem(WebKitContextMenu*);
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitCookieManager.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitCookieManager.cpp
index 8790c7cbf..037b69171 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitCookieManager.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitCookieManager.cpp
@@ -27,8 +27,6 @@
#include <wtf/gobject/GRefPtr.h>
#include <wtf/text/CString.h>
-using namespace WebKit;
-
enum {
CHANGED,
@@ -36,7 +34,7 @@ enum {
};
struct _WebKitCookieManagerPrivate {
- WKRetainPtr<WKCookieManagerRef> wkCookieManager;
+ RefPtr<WebCookieManagerProxy> webCookieManager;
};
static guint signals[LAST_SIGNAL] = { 0, };
@@ -46,9 +44,9 @@ G_DEFINE_TYPE(WebKitCookieManager, webkit_cookie_manager, G_TYPE_OBJECT)
COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_COOKIE_PERSISTENT_STORAGE_TEXT, SoupCookiePersistentStorageText);
COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE, SoupCookiePersistentStorageSQLite);
-COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS, kWKHTTPCookieAcceptPolicyAlways);
-COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_COOKIE_POLICY_ACCEPT_NEVER, kWKHTTPCookieAcceptPolicyNever);
-COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY, kWKHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain);
+COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS, HTTPCookieAcceptPolicyAlways);
+COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_COOKIE_POLICY_ACCEPT_NEVER, HTTPCookieAcceptPolicyNever);
+COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY, HTTPCookieAcceptPolicyOnlyFromMainDocumentDomain);
static void webkit_cookie_manager_init(WebKitCookieManager* manager)
{
@@ -60,7 +58,7 @@ static void webkit_cookie_manager_init(WebKitCookieManager* manager)
static void webkitCookieManagerFinalize(GObject* object)
{
WebKitCookieManagerPrivate* priv = WEBKIT_COOKIE_MANAGER(object)->priv;
- WKCookieManagerStopObservingCookieChanges(priv->wkCookieManager.get());
+ priv->webCookieManager->stopObservingCookieChanges();
priv->~WebKitCookieManagerPrivate();
G_OBJECT_CLASS(webkit_cookie_manager_parent_class)->finalize(object);
}
@@ -92,18 +90,18 @@ static void cookiesDidChange(WKCookieManagerRef, const void* clientInfo)
g_signal_emit(WEBKIT_COOKIE_MANAGER(clientInfo), signals[CHANGED], 0);
}
-WebKitCookieManager* webkitCookieManagerCreate(WKCookieManagerRef wkCookieManager)
+WebKitCookieManager* webkitCookieManagerCreate(WebCookieManagerProxy* webCookieManager)
{
WebKitCookieManager* manager = WEBKIT_COOKIE_MANAGER(g_object_new(WEBKIT_TYPE_COOKIE_MANAGER, NULL));
- manager->priv->wkCookieManager = wkCookieManager;
+ manager->priv->webCookieManager = webCookieManager;
WKCookieManagerClient wkCookieManagerClient = {
kWKCookieManagerClientCurrentVersion,
manager, // clientInfo
cookiesDidChange
};
- WKCookieManagerSetClient(wkCookieManager, &wkCookieManagerClient);
- WKCookieManagerStartObservingCookieChanges(wkCookieManager);
+ WKCookieManagerSetClient(toAPI(webCookieManager), &wkCookieManagerClient);
+ manager->priv->webCookieManager->startObservingCookieChanges();
return manager;
}
@@ -127,9 +125,9 @@ void webkit_cookie_manager_set_persistent_storage(WebKitCookieManager* manager,
g_return_if_fail(WEBKIT_IS_COOKIE_MANAGER(manager));
g_return_if_fail(filename);
- WKCookieManagerStopObservingCookieChanges(manager->priv->wkCookieManager.get());
- toImpl(manager->priv->wkCookieManager.get())->setCookiePersistentStorage(String::fromUTF8(filename), storage);
- WKCookieManagerStartObservingCookieChanges(manager->priv->wkCookieManager.get());
+ manager->priv->webCookieManager->stopObservingCookieChanges();
+ manager->priv->webCookieManager->setCookiePersistentStorage(String::fromUTF8(filename), storage);
+ manager->priv->webCookieManager->startObservingCookieChanges();
}
/**
@@ -143,7 +141,7 @@ void webkit_cookie_manager_set_accept_policy(WebKitCookieManager* manager, WebKi
{
g_return_if_fail(WEBKIT_IS_COOKIE_MANAGER(manager));
- WKCookieManagerSetHTTPCookieAcceptPolicy(manager->priv->wkCookieManager.get(), policy);
+ manager->priv->webCookieManager->setHTTPCookieAcceptPolicy(policy);
}
struct GetAcceptPolicyAsyncData {
@@ -186,7 +184,7 @@ void webkit_cookie_manager_get_accept_policy(WebKitCookieManager* manager, GCanc
data->cancellable = cancellable;
g_simple_async_result_set_op_res_gpointer(result, data, reinterpret_cast<GDestroyNotify>(destroyGetAcceptPolicyAsyncData));
- WKCookieManagerGetHTTPCookieAcceptPolicy(manager->priv->wkCookieManager.get(), result, webkitCookieManagerGetAcceptPolicyCallback);
+ manager->priv->webCookieManager->getHTTPCookieAcceptPolicy(HTTPCookieAcceptPolicyCallback::create(result, webkitCookieManagerGetAcceptPolicyCallback));
}
/**
@@ -228,10 +226,11 @@ static void webkitCookieManagerGetDomainsWithCookiesCallback(WKArrayRef wkDomain
if (g_cancellable_set_error_if_cancelled(data->cancellable.get(), &error))
g_simple_async_result_take_error(result.get(), error);
else {
+ ImmutableArray* domains = toImpl(wkDomains);
data->domains = adoptGRef(g_ptr_array_new_with_free_func(g_free));
- for (size_t i = 0; i < WKArrayGetSize(wkDomains); ++i) {
- WKStringRef wkDomain = static_cast<WKStringRef>(WKArrayGetItemAtIndex(wkDomains, i));
- String domain = toImpl(wkDomain)->string();
+ for (size_t i = 0; i < domains->size(); ++i) {
+ WebString* domainString = static_cast<WebString*>(domains->at(i));
+ String domain = domainString->string();
if (domain.isEmpty())
continue;
g_ptr_array_add(data->domains.get(), g_strdup(domain.utf8().data()));
@@ -262,7 +261,7 @@ void webkit_cookie_manager_get_domains_with_cookies(WebKitCookieManager* manager
GetDomainsWithCookiesAsyncData* data = createGetDomainsWithCookiesAsyncData();
data->cancellable = cancellable;
g_simple_async_result_set_op_res_gpointer(result, data, reinterpret_cast<GDestroyNotify>(destroyGetDomainsWithCookiesAsyncData));
- WKCookieManagerGetHostnamesWithCookies(manager->priv->wkCookieManager.get(), result, webkitCookieManagerGetDomainsWithCookiesCallback);
+ manager->priv->webCookieManager->getHostnamesWithCookies(ArrayCallback::create(result, webkitCookieManagerGetDomainsWithCookiesCallback));
}
/**
@@ -305,8 +304,7 @@ void webkit_cookie_manager_delete_cookies_for_domain(WebKitCookieManager* manage
g_return_if_fail(WEBKIT_IS_COOKIE_MANAGER(manager));
g_return_if_fail(domain);
- WKRetainPtr<WKStringRef> wkDomain(AdoptWK, WKStringCreateWithUTF8CString(domain));
- WKCookieManagerDeleteCookiesForHostname(manager->priv->wkCookieManager.get(), wkDomain.get());
+ manager->priv->webCookieManager->deleteCookiesForHostname(String::fromUTF8(domain));
}
/**
@@ -319,5 +317,5 @@ void webkit_cookie_manager_delete_all_cookies(WebKitCookieManager* manager)
{
g_return_if_fail(WEBKIT_IS_COOKIE_MANAGER(manager));
- WKCookieManagerDeleteAllCookies(manager->priv->wkCookieManager.get());
+ manager->priv->webCookieManager->deleteAllCookies();
}
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitCookieManagerPrivate.h b/Source/WebKit2/UIProcess/API/gtk/WebKitCookieManagerPrivate.h
index a387af907..528d1fa29 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitCookieManagerPrivate.h
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitCookieManagerPrivate.h
@@ -23,6 +23,8 @@
#include "WebKitCookieManager.h"
#include "WebKitPrivate.h"
-WebKitCookieManager* webkitCookieManagerCreate(WKCookieManagerRef);
+using namespace WebKit;
+
+WebKitCookieManager* webkitCookieManagerCreate(WebCookieManagerProxy*);
#endif // WebKitCookieManagerPrivate_h
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitDownload.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitDownload.cpp
index aa2623783..620ac96db 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitDownload.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitDownload.cpp
@@ -31,7 +31,6 @@
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/gobject/GRefPtr.h>
-using namespace WebKit;
using namespace WebCore;
enum {
@@ -53,7 +52,7 @@ enum {
};
struct _WebKitDownloadPrivate {
- WKRetainPtr<WKDownloadRef> wkDownload;
+ RefPtr<DownloadProxy> download;
GRefPtr<WebKitURIRequest> request;
GRefPtr<WebKitURIResponse> response;
@@ -264,11 +263,11 @@ static void webkit_download_class_init(WebKitDownloadClass* downloadClass)
g_type_class_add_private(downloadClass, sizeof(WebKitDownloadPrivate));
}
-WebKitDownload* webkitDownloadCreate(WKDownloadRef wkDownload)
+WebKitDownload* webkitDownloadCreate(DownloadProxy* downloadProxy)
{
- ASSERT(wkDownload);
+ ASSERT(downloadProxy);
WebKitDownload* download = WEBKIT_DOWNLOAD(g_object_new(WEBKIT_TYPE_DOWNLOAD, NULL));
- download->priv->wkDownload = wkDownload;
+ download->priv->download = downloadProxy;
return download;
}
@@ -379,8 +378,8 @@ WebKitURIRequest* webkit_download_get_request(WebKitDownload* download)
WebKitDownloadPrivate* priv = download->priv;
if (!priv->request)
- priv->request = adoptGRef(webkitURIRequestCreateForResourceRequest(toImpl(priv->wkDownload.get())->request()));
- return download->priv->request.get();
+ priv->request = adoptGRef(webkitURIRequestCreateForResourceRequest(priv->download->request()));
+ return priv->request.get();
}
/**
@@ -465,7 +464,7 @@ void webkit_download_cancel(WebKitDownload* download)
g_return_if_fail(WEBKIT_IS_DOWNLOAD(download));
download->priv->isCancelled = true;
- WKDownloadCancel(download->priv->wkDownload.get());
+ download->priv->download->cancel();
}
/**
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitDownloadPrivate.h b/Source/WebKit2/UIProcess/API/gtk/WebKitDownloadPrivate.h
index 6f4b5363c..ce429d28e 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitDownloadPrivate.h
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitDownloadPrivate.h
@@ -25,7 +25,9 @@
#include <WebCore/ResourceError.h>
#include <wtf/text/CString.h>
-WebKitDownload* webkitDownloadCreate(WKDownloadRef);
+using namespace WebKit;
+
+WebKitDownload* webkitDownloadCreate(DownloadProxy*);
bool webkitDownloadIsCancelled(WebKitDownload*);
void webkitDownloadSetResponse(WebKitDownload*, WebKitURIResponse*);
void webkitDownloadNotifyProgress(WebKitDownload*, guint64 bytesReceived);
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp
index 51f186842..1079af778 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp
@@ -20,6 +20,7 @@
#include "config.h"
#include "WebKitGeolocationPermissionRequest.h"
+#include "GeolocationPermissionRequestProxy.h"
#include "WebKitGeolocationPermissionRequestPrivate.h"
#include "WebKitPermissionRequest.h"
@@ -39,7 +40,7 @@ G_DEFINE_TYPE_WITH_CODE(WebKitGeolocationPermissionRequest, webkit_geolocation_p
webkit_permission_request_interface_init))
struct _WebKitGeolocationPermissionRequestPrivate {
- WKRetainPtr<WKGeolocationPermissionRequestRef> wkRequest;
+ RefPtr<GeolocationPermissionRequestProxy> request;
bool madeDecision;
};
@@ -53,7 +54,7 @@ static void webkitGeolocationPermissionRequestAllow(WebKitPermissionRequest* req
if (priv->madeDecision)
return;
- WKGeolocationPermissionRequestAllow(priv->wkRequest.get());
+ priv->request->allow();
priv->madeDecision = true;
}
@@ -67,7 +68,7 @@ static void webkitGeolocationPermissionRequestDeny(WebKitPermissionRequest* requ
if (priv->madeDecision)
return;
- WKGeolocationPermissionRequestDeny(priv->wkRequest.get());
+ priv->request->deny();
priv->madeDecision = true;
}
@@ -89,7 +90,7 @@ static void webkitGeolocationPermissionRequestFinalize(GObject* object)
// Default behaviour when no decision has been made is denying the request.
if (!priv->madeDecision)
- WKGeolocationPermissionRequestDeny(priv->wkRequest.get());
+ priv->request->deny();
priv->~WebKitGeolocationPermissionRequestPrivate();
G_OBJECT_CLASS(webkit_geolocation_permission_request_parent_class)->finalize(object);
@@ -102,9 +103,9 @@ static void webkit_geolocation_permission_request_class_init(WebKitGeolocationPe
g_type_class_add_private(klass, sizeof(WebKitGeolocationPermissionRequestPrivate));
}
-WebKitGeolocationPermissionRequest* webkitGeolocationPermissionRequestCreate(WKGeolocationPermissionRequestRef wkRequest)
+WebKitGeolocationPermissionRequest* webkitGeolocationPermissionRequestCreate(GeolocationPermissionRequestProxy* request)
{
WebKitGeolocationPermissionRequest* geolocationPermissionRequest = WEBKIT_GEOLOCATION_PERMISSION_REQUEST(g_object_new(WEBKIT_TYPE_GEOLOCATION_PERMISSION_REQUEST, NULL));
- geolocationPermissionRequest->priv->wkRequest = wkRequest;
+ geolocationPermissionRequest->priv->request = request;
return geolocationPermissionRequest;
}
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h b/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h
index e6de68753..94f5cba4a 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h
@@ -23,6 +23,8 @@
#include "WebKitGeolocationPermissionRequest.h"
#include "WebKitPrivate.h"
-WebKitGeolocationPermissionRequest* webkitGeolocationPermissionRequestCreate(WKGeolocationPermissionRequestRef);
+using namespace WebKit;
+
+WebKitGeolocationPermissionRequest* webkitGeolocationPermissionRequestCreate(GeolocationPermissionRequestProxy*);
#endif // WebKitGeolocationPermissionRequestPrivate_h
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationProvider.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationProvider.cpp
index 648c8093b..36f0f23fd 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationProvider.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationProvider.cpp
@@ -26,6 +26,9 @@
#include "config.h"
#include "WebKitGeolocationProvider.h"
+#include "WebGeolocationManagerProxy.h"
+#include "WebGeolocationPosition.h"
+
#if ENABLE(GEOLOCATION)
static inline WebKitGeolocationProvider* toGeolocationProvider(const void* clientInfo)
@@ -48,16 +51,16 @@ WebKitGeolocationProvider::~WebKitGeolocationProvider()
m_provider.stopUpdating();
}
-PassRefPtr<WebKitGeolocationProvider> WebKitGeolocationProvider::create(WKGeolocationManagerRef wkGeolocationManager)
+PassRefPtr<WebKitGeolocationProvider> WebKitGeolocationProvider::create(WebGeolocationManagerProxy* geolocationManager)
{
- return adoptRef(new WebKitGeolocationProvider(wkGeolocationManager));
+ return adoptRef(new WebKitGeolocationProvider(geolocationManager));
}
-WebKitGeolocationProvider::WebKitGeolocationProvider(WKGeolocationManagerRef wkGeolocationManager)
- : m_wkGeolocationManager(wkGeolocationManager)
+WebKitGeolocationProvider::WebKitGeolocationProvider(WebGeolocationManagerProxy* geolocationManager)
+ : m_geolocationManager(geolocationManager)
, m_provider(this)
{
- ASSERT(wkGeolocationManager);
+ ASSERT(geolocationManager);
WKGeolocationProvider wkGeolocationProvider = {
kWKGeolocationProviderCurrentVersion,
@@ -65,7 +68,7 @@ WebKitGeolocationProvider::WebKitGeolocationProvider(WKGeolocationManagerRef wkG
startUpdatingCallback,
stopUpdatingCallback
};
- WKGeolocationManagerSetProvider(m_wkGeolocationManager.get(), &wkGeolocationProvider);
+ WKGeolocationManagerSetProvider(toAPI(geolocationManager), &wkGeolocationProvider);
}
void WebKitGeolocationProvider::startUpdating()
@@ -80,13 +83,13 @@ void WebKitGeolocationProvider::stopUpdating()
void WebKitGeolocationProvider::notifyPositionChanged(int timestamp, double latitude, double longitude, double altitude, double accuracy, double altitudeAccuracy)
{
- WKRetainPtr<WKGeolocationPositionRef> wkGeolocationPosition(AdoptWK, WKGeolocationPositionCreate(timestamp, latitude, longitude, accuracy));
- WKGeolocationManagerProviderDidChangePosition(m_wkGeolocationManager.get(), wkGeolocationPosition.get());
+ RefPtr<WebGeolocationPosition> position = WebGeolocationPosition::create(timestamp, latitude, longitude, accuracy, true, altitude, true, altitudeAccuracy, false, 0, false, 0);
+ m_geolocationManager->providerDidChangePosition(position.get());
}
void WebKitGeolocationProvider::notifyErrorOccurred(const char* message)
{
- WKGeolocationManagerProviderDidFailToDeterminePosition(m_wkGeolocationManager.get());
+ m_geolocationManager->providerDidFailToDeterminePosition();
}
#endif // ENABLE(GEOLOCATION)
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationProvider.h b/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationProvider.h
index a02bfcb08..11c7c1a2f 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationProvider.h
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationProvider.h
@@ -28,22 +28,24 @@
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
+using namespace WebKit;
+
class WebKitGeolocationProvider : public RefCounted<WebKitGeolocationProvider>, public WebCore::GeolocationProviderGeoclueClient {
public:
virtual ~WebKitGeolocationProvider();
- static PassRefPtr<WebKitGeolocationProvider> create(WKGeolocationManagerRef);
+ static PassRefPtr<WebKitGeolocationProvider> create(WebGeolocationManagerProxy*);
void startUpdating();
void stopUpdating();
private:
- WebKitGeolocationProvider(WKGeolocationManagerRef);
+ WebKitGeolocationProvider(WebGeolocationManagerProxy*);
// GeolocationProviderGeoclueClient interface.
virtual void notifyPositionChanged(int, double, double, double, double, double);
virtual void notifyErrorOccurred(const char*);
- WKRetainPtr<WKGeolocationManagerRef> m_wkGeolocationManager;
+ RefPtr<WebGeolocationManagerProxy> m_geolocationManager;
WebCore::GeolocationProviderGeoclue m_provider;
};
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp
index 457c40141..0b9275fdf 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp
@@ -112,7 +112,7 @@ static void didChangeProgress(WKPageRef page, const void* clientInfo)
static void didChangeBackForwardList(WKPageRef page, WKBackForwardListItemRef addedItem, WKArrayRef removedItems, const void* clientInfo)
{
- webkitBackForwardListChanged(webkit_web_view_get_back_forward_list(WEBKIT_WEB_VIEW(clientInfo)), addedItem, removedItems);
+ webkitBackForwardListChanged(webkit_web_view_get_back_forward_list(WEBKIT_WEB_VIEW(clientInfo)), toImpl(addedItem), toImpl(removedItems));
}
void attachLoaderClientToView(WebKitWebView* webView)
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.cpp
index babafe651..3bb2434ce 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.cpp
@@ -29,7 +29,7 @@ using namespace WebKit;
static void didReceiveURIRequest(WKSoupRequestManagerRef soupRequestManagerRef, WKURLRef urlRef, WKPageRef initiatingPageRef, uint64_t requestID, const void* clientInfo)
{
WebKitWebContext* webContext = WEBKIT_WEB_CONTEXT(clientInfo);
- GRefPtr<WebKitURISchemeRequest> request = adoptGRef(webkitURISchemeRequestCreate(webContext, soupRequestManagerRef, urlRef, initiatingPageRef, requestID));
+ GRefPtr<WebKitURISchemeRequest> request = adoptGRef(webkitURISchemeRequestCreate(webContext, toImpl(soupRequestManagerRef), toImpl(urlRef), toImpl(initiatingPageRef), requestID));
webkitWebContextReceivedURIRequest(webContext, request.get());
}
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp
index 1925e6a21..1ca453b2e 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp
@@ -148,7 +148,7 @@ static void runOpenPanel(WKPageRef page, WKFrameRef frame, WKOpenPanelParameters
static void decidePolicyForGeolocationPermissionRequest(WKPageRef, WKFrameRef, WKSecurityOriginRef, WKGeolocationPermissionRequestRef request, const void* clientInfo)
{
- GRefPtr<WebKitGeolocationPermissionRequest> geolocationPermissionRequest = adoptGRef(webkitGeolocationPermissionRequestCreate(request));
+ GRefPtr<WebKitGeolocationPermissionRequest> geolocationPermissionRequest = adoptGRef(webkitGeolocationPermissionRequestCreate(toImpl(request)));
webkitWebViewMakePermissionRequest(WEBKIT_WEB_VIEW(clientInfo), WEBKIT_PERMISSION_REQUEST(geolocationPermissionRequest.get()));
}
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp
index e69831f29..6f46dbeda 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp
@@ -20,25 +20,25 @@
#include "config.h"
#include "WebKitURISchemeRequest.h"
+#include "WebData.h"
#include "WebKitURISchemeRequestPrivate.h"
#include "WebKitWebContextPrivate.h"
#include "WebKitWebView.h"
#include "WebPageProxy.h"
+#include "WebSoupRequestManagerProxy.h"
#include <WebCore/GOwnPtrSoup.h>
#include <libsoup/soup.h>
#include <wtf/gobject/GRefPtr.h>
#include <wtf/text/CString.h>
-using namespace WebKit;
-
static const unsigned int gReadBufferSize = 8192;
G_DEFINE_TYPE(WebKitURISchemeRequest, webkit_uri_scheme_request, G_TYPE_OBJECT)
struct _WebKitURISchemeRequestPrivate {
WebKitWebContext* webContext;
- WKRetainPtr<WKSoupRequestManagerRef> wkRequestManager;
- WKRetainPtr<WKPageRef> wkInitiatingPage;
+ RefPtr<WebSoupRequestManagerProxy> webRequestManager;
+ RefPtr<WebPageProxy> initiatingPage;
uint64_t requestID;
CString uri;
GOwnPtr<SoupURI> soupURI;
@@ -71,13 +71,13 @@ static void webkit_uri_scheme_request_class_init(WebKitURISchemeRequestClass* re
g_type_class_add_private(requestClass, sizeof(WebKitURISchemeRequestPrivate));
}
-WebKitURISchemeRequest* webkitURISchemeRequestCreate(WebKitWebContext* webContext, WKSoupRequestManagerRef wkRequestManager, WKURLRef wkURL, WKPageRef wkInitiatingPage, uint64_t requestID)
+WebKitURISchemeRequest* webkitURISchemeRequestCreate(WebKitWebContext* webContext, WebSoupRequestManagerProxy* webRequestManager, WebURL* webURL, WebPageProxy* initiatingPage, uint64_t requestID)
{
WebKitURISchemeRequest* request = WEBKIT_URI_SCHEME_REQUEST(g_object_new(WEBKIT_TYPE_URI_SCHEME_REQUEST, NULL));
request->priv->webContext = webContext;
- request->priv->wkRequestManager = wkRequestManager;
- request->priv->uri = toImpl(wkURL)->string().utf8();
- request->priv->wkInitiatingPage = wkInitiatingPage;
+ request->priv->webRequestManager = webRequestManager;
+ request->priv->uri = webURL->string().utf8();
+ request->priv->initiatingPage = initiatingPage;
request->priv->requestID = requestID;
return request;
}
@@ -154,7 +154,7 @@ WebKitWebView* webkit_uri_scheme_request_get_web_view(WebKitURISchemeRequest* re
{
g_return_val_if_fail(WEBKIT_IS_URI_SCHEME_REQUEST(request), 0);
- return WEBKIT_WEB_VIEW(toImpl(request->priv->wkInitiatingPage.get())->viewWidget());
+ return WEBKIT_WEB_VIEW(request->priv->initiatingPage->viewWidget());
}
static void webkitURISchemeRequestReadCallback(GInputStream* inputStream, GAsyncResult* result, WebKitURISchemeRequest* schemeRequest)
@@ -168,14 +168,13 @@ static void webkitURISchemeRequestReadCallback(GInputStream* inputStream, GAsync
}
WebKitURISchemeRequestPrivate* priv = request->priv;
- WKRetainPtr<WKDataRef> wkData(AdoptWK, WKDataCreate(bytesRead ? reinterpret_cast<const unsigned char*>(priv->readBuffer) : 0, bytesRead));
+ RefPtr<WebData> webData = WebData::create(reinterpret_cast<const unsigned char*>(priv->readBuffer), bytesRead);
if (!priv->bytesRead) {
- // First chunk read. In case of empty reply an empty WKDataRef is sent to the WebProcess.
- WKRetainPtr<WKStringRef> wkMimeType = !priv->mimeType.isNull() ? adoptWK(WKStringCreateWithUTF8CString(priv->mimeType.data())) : 0;
- WKSoupRequestManagerDidHandleURIRequest(priv->wkRequestManager.get(), wkData.get(), priv->streamLength, wkMimeType.get(), priv->requestID);
+ // First chunk read. In case of empty reply an empty WebData is sent to the WebProcess.
+ priv->webRequestManager->didHandleURIRequest(webData.get(), priv->streamLength, String::fromUTF8(priv->mimeType.data()), priv->requestID);
} else if (bytesRead || (!bytesRead && !priv->streamLength)) {
- // Subsequent chunk read. We only send an empty WKDataRef to the WebProcess when stream length is unknown.
- WKSoupRequestManagerDidReceiveURIRequestData(priv->wkRequestManager.get(), wkData.get(), priv->requestID);
+ // Subsequent chunk read. We only send an empty WebData to the WebProcess when stream length is unknown.
+ priv->webRequestManager->didReceiveURIRequestData(webData.get(), priv->requestID);
}
if (!bytesRead) {
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h b/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h
index b7c011f66..ef3dd53d6 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h
@@ -23,9 +23,10 @@
#include "WebKitPrivate.h"
#include "WebKitURISchemeRequest.h"
#include "WebKitWebContext.h"
-#include <WebKit2/WKSoupRequestManager.h>
-WebKitURISchemeRequest* webkitURISchemeRequestCreate(WebKitWebContext*, WKSoupRequestManagerRef, WKURLRef, WKPageRef, uint64_t requestID);
+using namespace WebKit;
+
+WebKitURISchemeRequest* webkitURISchemeRequestCreate(WebKitWebContext*, WebSoupRequestManagerProxy*, WebURL*, WebPageProxy*, uint64_t requestID);
uint64_t webkitURISchemeRequestGetID(WebKitURISchemeRequest*);
void webkitURISchemeRequestCancel(WebKitURISchemeRequest*);
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
index dab18a87d..0c29b2440 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
@@ -164,7 +164,7 @@ static gpointer createDefaultWebContext(gpointer)
attachRequestManagerClientToContext(webContext.get());
#if ENABLE(GEOLOCATION)
- priv->geolocationProvider = WebKitGeolocationProvider::create(toAPI(priv->context->geolocationManagerProxy()));
+ priv->geolocationProvider = WebKitGeolocationProvider::create(priv->context->geolocationManagerProxy());
#endif
#if ENABLE(SPELLCHECK)
priv->textChecker = WebKitTextChecker::create();
@@ -299,7 +299,7 @@ WebKitDownload* webkit_web_context_download_uri(WebKitWebContext* context, const
g_return_val_if_fail(uri, 0);
DownloadProxy* downloadProxy = context->priv->context->download(0, WebCore::ResourceRequest(String::fromUTF8(uri)));
- WebKitDownload* download = webkitDownloadCreate(toAPI(downloadProxy));
+ WebKitDownload* download = webkitDownloadCreate(downloadProxy);
downloadsMap().set(downloadProxy, download);
return download;
}
@@ -318,7 +318,7 @@ WebKitCookieManager* webkit_web_context_get_cookie_manager(WebKitWebContext* con
WebKitWebContextPrivate* priv = context->priv;
if (!priv->cookieManager)
- priv->cookieManager = adoptGRef(webkitCookieManagerCreate(toAPI(priv->context->cookieManagerProxy())));
+ priv->cookieManager = adoptGRef(webkitCookieManagerCreate(priv->context->cookieManagerProxy()));
return priv->cookieManager.get();
}
@@ -688,7 +688,7 @@ WebKitDownload* webkitWebContextGetOrCreateDownload(DownloadProxy* downloadProxy
if (download)
return download.get();
- download = adoptGRef(webkitDownloadCreate(toAPI(downloadProxy)));
+ download = adoptGRef(webkitDownloadCreate(downloadProxy));
downloadsMap().set(downloadProxy, download.get());
return download.get();
}
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitWebInspector.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitWebInspector.cpp
index 25023cf94..d384ac067 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitWebInspector.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitWebInspector.cpp
@@ -27,8 +27,6 @@
#include <wtf/gobject/GRefPtr.h>
#include <wtf/text/CString.h>
-using namespace WebKit;
-
enum {
OPEN_WINDOW,
BRING_TO_FRONT,
@@ -47,7 +45,7 @@ enum {
};
struct _WebKitWebInspectorPrivate {
- WKRetainPtr<WKInspectorRef> wkInspector;
+ RefPtr<WebInspectorProxy> webInspector;
CString inspectedURI;
unsigned attachedHeight;
};
@@ -75,7 +73,7 @@ static void webkitWebInspectorGetProperty(GObject* object, guint propId, GValue*
static void webkitWebInspectorFinalize(GObject* object)
{
WebKitWebInspectorPrivate* priv = WEBKIT_WEB_INSPECTOR(object)->priv;
- WKInspectorSetInspectorClientGtk(priv->wkInspector.get(), 0);
+ WKInspectorSetInspectorClientGtk(toAPI(priv->webInspector.get()), 0);
priv->~WebKitWebInspectorPrivate();
G_OBJECT_CLASS(webkit_web_inspector_parent_class)->finalize(object);
}
@@ -295,10 +293,10 @@ static void didChangeAttachedHeight(WKInspectorRef, unsigned height, const void*
g_object_notify(G_OBJECT(inspector), "attached-height");
}
-WebKitWebInspector* webkitWebInspectorCreate(WKInspectorRef wkInspector)
+WebKitWebInspector* webkitWebInspectorCreate(WebInspectorProxy* webInspector)
{
WebKitWebInspector* inspector = WEBKIT_WEB_INSPECTOR(g_object_new(WEBKIT_TYPE_WEB_INSPECTOR, NULL));
- inspector->priv->wkInspector = wkInspector;
+ inspector->priv->webInspector = webInspector;
WKInspectorClientGtk wkInspectorClientGtk = {
kWKInspectorClientGtkCurrentVersion,
@@ -311,7 +309,7 @@ WebKitWebInspector* webkitWebInspectorCreate(WKInspectorRef wkInspector)
detach,
didChangeAttachedHeight
};
- WKInspectorSetInspectorClientGtk(wkInspector, &wkInspectorClientGtk);
+ WKInspectorSetInspectorClientGtk(toAPI(webInspector), &wkInspectorClientGtk);
return inspector;
}
@@ -330,7 +328,7 @@ WebKitWebViewBase* webkit_web_inspector_get_web_view(WebKitWebInspector* inspect
{
g_return_val_if_fail(WEBKIT_IS_WEB_INSPECTOR(inspector), 0);
- return WEBKIT_WEB_VIEW_BASE(toImpl(inspector->priv->wkInspector.get())->inspectorView());
+ return WEBKIT_WEB_VIEW_BASE(inspector->priv->webInspector->inspectorView());
}
/**
@@ -364,7 +362,7 @@ gboolean webkit_web_inspector_is_attached(WebKitWebInspector* inspector)
{
g_return_val_if_fail(WEBKIT_IS_WEB_INSPECTOR(inspector), FALSE);
- return WKInspectorIsAttached(inspector->priv->wkInspector.get());
+ return inspector->priv->webInspector->isAttached();
}
/**
@@ -378,9 +376,9 @@ void webkit_web_inspector_attach(WebKitWebInspector* inspector)
{
g_return_if_fail(WEBKIT_IS_WEB_INSPECTOR(inspector));
- if (WKInspectorIsAttached(inspector->priv->wkInspector.get()))
+ if (inspector->priv->webInspector->isAttached())
return;
- WKInspectorAttach(inspector->priv->wkInspector.get());
+ inspector->priv->webInspector->attach();
}
/**
@@ -394,9 +392,9 @@ void webkit_web_inspector_detach(WebKitWebInspector* inspector)
{
g_return_if_fail(WEBKIT_IS_WEB_INSPECTOR(inspector));
- if (!WKInspectorIsAttached(inspector->priv->wkInspector.get()))
+ if (!inspector->priv->webInspector->isAttached())
return;
- WKInspectorDetach(inspector->priv->wkInspector.get());
+ inspector->priv->webInspector->detach();
}
/**
@@ -409,7 +407,7 @@ void webkit_web_inspector_show(WebKitWebInspector* inspector)
{
g_return_if_fail(WEBKIT_IS_WEB_INSPECTOR(inspector));
- WKInspectorShow(inspector->priv->wkInspector.get());
+ inspector->priv->webInspector->show();
}
/**
@@ -422,7 +420,7 @@ void webkit_web_inspector_close(WebKitWebInspector* inspector)
{
g_return_if_fail(WEBKIT_IS_WEB_INSPECTOR(inspector));
- WKInspectorClose(inspector->priv->wkInspector.get());
+ inspector->priv->webInspector->close();
}
/**
@@ -439,7 +437,7 @@ guint webkit_web_inspector_get_attached_height(WebKitWebInspector* inspector)
{
g_return_val_if_fail(WEBKIT_IS_WEB_INSPECTOR(inspector), 0);
- if (!WKInspectorIsAttached(inspector->priv->wkInspector.get()))
+ if (!inspector->priv->webInspector->isAttached())
return 0;
return inspector->priv->attachedHeight;
}
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitWebInspectorPrivate.h b/Source/WebKit2/UIProcess/API/gtk/WebKitWebInspectorPrivate.h
index 703472137..5424e6006 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitWebInspectorPrivate.h
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitWebInspectorPrivate.h
@@ -23,6 +23,8 @@
#include "WebKitPrivate.h"
#include "WebKitWebInspector.h"
-WebKitWebInspector* webkitWebInspectorCreate(WKInspectorRef);
+using namespace WebKit;
+
+WebKitWebInspector* webkitWebInspectorCreate(WebInspectorProxy*);
#endif // WebKitWebInspectorPrivate_h
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
index 236a4f304..46c4bd464 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
@@ -408,7 +408,7 @@ static void webkitWebViewConstructed(GObject* object)
attachContextMenuClientToView(webView);
attachFormClientToView(webView);
- priv->backForwardList = adoptGRef(webkitBackForwardListCreate(toAPI(getPage(webView)->backForwardList())));
+ priv->backForwardList = adoptGRef(webkitBackForwardListCreate(getPage(webView)->backForwardList()));
GRefPtr<WebKitSettings> settings = adoptGRef(webkit_settings_new());
webkitWebViewSetSettings(webView, settings.get());
@@ -1577,7 +1577,7 @@ void webkitWebViewPopulateContextMenu(WebKitWebView* webView, ImmutableArray* pr
WebContextMenuProxyGtk* contextMenuProxy = webkitWebViewBaseGetActiveContextMenuProxy(webViewBase);
ASSERT(contextMenuProxy);
- GRefPtr<WebKitContextMenu> contextMenu = adoptGRef(webkitContextMenuCreate(toAPI(proposedMenu)));
+ GRefPtr<WebKitContextMenu> contextMenu = adoptGRef(webkitContextMenuCreate(proposedMenu));
if (webHitTestResult->isContentEditable())
webkitWebViewCreateAndAppendInputMethodsMenuItem(webView, contextMenu.get());
@@ -2057,7 +2057,7 @@ void webkit_web_view_go_to_back_forward_list_item(WebKitWebView* webView, WebKit
g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
g_return_if_fail(WEBKIT_IS_BACK_FORWARD_LIST_ITEM(listItem));
- getPage(webView)->goToBackForwardItem(toImpl(webkitBackForwardListItemGetWKItem(listItem)));
+ getPage(webView)->goToBackForwardItem(webkitBackForwardListItemGetItem(listItem));
}
/**
@@ -2569,7 +2569,7 @@ WebKitWebInspector* webkit_web_view_get_inspector(WebKitWebView* webView)
g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0);
if (!webView->priv->inspector)
- webView->priv->inspector = adoptGRef(webkitWebInspectorCreate(toAPI(getPage(webView)->inspector())));
+ webView->priv->inspector = adoptGRef(webkitWebInspectorCreate(getPage(webView)->inspector()));
return webView->priv->inspector.get();
}
diff --git a/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm b/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
index 7b54b4bd7..ba88107e1 100644
--- a/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
+++ b/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
@@ -139,7 +139,7 @@ PageClientImpl::~PageClientImpl()
PassOwnPtr<DrawingAreaProxy> PageClientImpl::createDrawingAreaProxy()
{
- return [m_wkView _createDrawingAreaProxy];
+ return [m_wkView _wk_createDrawingAreaProxy];
}
void PageClientImpl::setViewNeedsDisplay(const WebCore::IntRect& rect)
@@ -156,7 +156,7 @@ void PageClientImpl::scrollView(const IntRect& scrollRect, const IntSize& scroll
{
NSRect clippedScrollRect = NSIntersectionRect(scrollRect, NSOffsetRect(scrollRect, -scrollOffset.width(), -scrollOffset.height()));
- [m_wkView _cacheWindowBottomCornerRect];
+ [m_wkView _wk_cacheWindowBottomCornerRect];
[m_wkView translateRectsNeedingDisplayInRect:clippedScrollRect by:scrollOffset];
[m_wkView scrollRect:clippedScrollRect by:scrollOffset];
@@ -174,7 +174,7 @@ bool PageClientImpl::isViewWindowActive()
bool PageClientImpl::isViewFocused()
{
- return [m_wkView _isFocused];
+ return [m_wkView _wk_isFocused];
}
void PageClientImpl::makeFirstResponder()
@@ -220,17 +220,17 @@ LayerHostingMode PageClientImpl::viewLayerHostingMode()
ColorSpaceData PageClientImpl::colorSpace()
{
- return [m_wkView _colorSpace];
+ return [m_wkView _wk_colorSpace];
}
void PageClientImpl::processDidCrash()
{
- [m_wkView _processDidCrash];
+ [m_wkView _wk_processDidCrash];
}
void PageClientImpl::pageClosed()
{
- [m_wkView _pageClosed];
+ [m_wkView _wk_pageClosed];
#if USE(DICTATION_ALTERNATIVES)
m_alternativeTextUIController->clear();
#endif
@@ -238,18 +238,18 @@ void PageClientImpl::pageClosed()
void PageClientImpl::didRelaunchProcess()
{
- [m_wkView _didRelaunchProcess];
+ [m_wkView _wk_didRelaunchProcess];
}
void PageClientImpl::toolTipChanged(const String& oldToolTip, const String& newToolTip)
{
- [m_wkView _toolTipChangedFrom:nsStringFromWebCoreString(oldToolTip) to:nsStringFromWebCoreString(newToolTip)];
+ [m_wkView _wk_toolTipChangedFrom:nsStringFromWebCoreString(oldToolTip) to:nsStringFromWebCoreString(newToolTip)];
}
void PageClientImpl::setCursor(const WebCore::Cursor& cursor)
{
if (![NSApp _cursorRectCursor])
- [m_wkView _setCursor:cursor.platformCursor()];
+ [m_wkView _wk_setCursor:cursor.platformCursor()];
}
void PageClientImpl::setCursorHiddenUntilMouseMoves(bool hiddenUntilMouseMoves)
@@ -291,7 +291,7 @@ void PageClientImpl::executeUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
bool PageClientImpl::interpretKeyEvent(const NativeWebKeyboardEvent& event, Vector<WebCore::KeypressCommand>& commands)
{
- return [m_wkView _interpretKeyEvent:event.nativeEvent() savingCommandsTo:commands];
+ return [m_wkView _wk_interpretKeyEvent:event.nativeEvent() savingCommandsTo:commands];
}
void PageClientImpl::setDragImage(const IntPoint& clientPosition, PassRefPtr<ShareableBitmap> dragImage, bool isLinkDrag)
@@ -299,34 +299,34 @@ void PageClientImpl::setDragImage(const IntPoint& clientPosition, PassRefPtr<Sha
RetainPtr<CGImageRef> dragCGImage = dragImage->makeCGImage();
RetainPtr<NSImage> dragNSImage(AdoptNS, [[NSImage alloc] initWithCGImage:dragCGImage.get() size:dragImage->size()]);
- [m_wkView _setDragImage:dragNSImage.get() at:clientPosition linkDrag:isLinkDrag];
+ [m_wkView _wk_setDragImage:dragNSImage.get() at:clientPosition linkDrag:isLinkDrag];
}
void PageClientImpl::setPromisedData(const String& pasteboardName, PassRefPtr<SharedBuffer> imageBuffer, const String& filename, const String& extension, const String& title, const String& url, const String& visibleUrl, PassRefPtr<SharedBuffer> archiveBuffer)
{
RefPtr<Image> image = BitmapImage::create();
image->setData(imageBuffer.get(), true);
- [m_wkView _setPromisedData:image.get() withFileName:filename withExtension:extension withTitle:title withURL:url withVisibleURL:visibleUrl withArchive:archiveBuffer.get() forPasteboard:pasteboardName];
+ [m_wkView _wk_setPromisedData:image.get() withFileName:filename withExtension:extension withTitle:title withURL:url withVisibleURL:visibleUrl withArchive:archiveBuffer.get() forPasteboard:pasteboardName];
}
void PageClientImpl::updateTextInputState(bool updateSecureInputState)
{
- [m_wkView _updateTextInputStateIncludingSecureInputState:updateSecureInputState];
+ [m_wkView _wk_updateTextInputStateIncludingSecureInputState:updateSecureInputState];
}
void PageClientImpl::resetTextInputState()
{
- [m_wkView _resetTextInputState];
+ [m_wkView _wk_resetTextInputState];
}
FloatRect PageClientImpl::convertToDeviceSpace(const FloatRect& rect)
{
- return [m_wkView _convertToDeviceSpace:rect];
+ return [m_wkView _wk_convertToDeviceSpace:rect];
}
FloatRect PageClientImpl::convertToUserSpace(const FloatRect& rect)
{
- return [m_wkView _convertToUserSpace:rect];
+ return [m_wkView _wk_convertToUserSpace:rect];
}
IntPoint PageClientImpl::screenToWindow(const IntPoint& point)
@@ -352,7 +352,7 @@ void PageClientImpl::doneWithGestureEvent(const WebGestureEvent&, bool wasEventH
void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool eventWasHandled)
{
- [m_wkView _doneWithKeyEvent:event.nativeEvent() eventWasHandled:eventWasHandled];
+ [m_wkView _wk_doneWithKeyEvent:event.nativeEvent() eventWasHandled:eventWasHandled];
}
PassRefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy* page)
@@ -375,40 +375,40 @@ PassRefPtr<WebColorChooserProxy> PageClientImpl::createColorChooserProxy(WebPage
void PageClientImpl::setFindIndicator(PassRefPtr<FindIndicator> findIndicator, bool fadeOut, bool animate)
{
- [m_wkView _setFindIndicator:findIndicator fadeOut:fadeOut animate:animate];
+ [m_wkView _wk_setFindIndicator:findIndicator fadeOut:fadeOut animate:animate];
}
void PageClientImpl::accessibilityWebProcessTokenReceived(const CoreIPC::DataReference& data)
{
- NSData* remoteToken = [NSData dataWithBytes:data.data() length:data.size()];
- [m_wkView _setAccessibilityWebProcessToken:remoteToken];
+ NSData *remoteToken = [NSData dataWithBytes:data.data() length:data.size()];
+ [m_wkView _wk_setAccessibilityWebProcessToken:remoteToken];
}
#if USE(ACCELERATED_COMPOSITING)
void PageClientImpl::enterAcceleratedCompositingMode(const LayerTreeContext& layerTreeContext)
{
- [m_wkView _enterAcceleratedCompositingMode:layerTreeContext];
+ [m_wkView _wk_enterAcceleratedCompositingMode:layerTreeContext];
}
void PageClientImpl::exitAcceleratedCompositingMode()
{
- [m_wkView _exitAcceleratedCompositingMode];
+ [m_wkView _wk_exitAcceleratedCompositingMode];
}
void PageClientImpl::updateAcceleratedCompositingMode(const LayerTreeContext& layerTreeContext)
{
- [m_wkView _updateAcceleratedCompositingMode:layerTreeContext];
+ [m_wkView _wk_updateAcceleratedCompositingMode:layerTreeContext];
}
#endif // USE(ACCELERATED_COMPOSITING)
void PageClientImpl::pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus)
{
- [m_wkView _pluginFocusOrWindowFocusChanged:pluginHasFocusAndWindowHasFocus pluginComplexTextInputIdentifier:pluginComplexTextInputIdentifier];
+ [m_wkView _wk_pluginFocusOrWindowFocusChanged:pluginHasFocusAndWindowHasFocus pluginComplexTextInputIdentifier:pluginComplexTextInputIdentifier];
}
void PageClientImpl::setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, PluginComplexTextInputState pluginComplexTextInputState)
{
- [m_wkView _setPluginComplexTextInputState:pluginComplexTextInputState pluginComplexTextInputIdentifier:pluginComplexTextInputIdentifier];
+ [m_wkView _wk_setPluginComplexTextInputState:pluginComplexTextInputState pluginComplexTextInputIdentifier:pluginComplexTextInputIdentifier];
}
CGContextRef PageClientImpl::containingWindowGraphicsContext()
@@ -424,37 +424,37 @@ CGContextRef PageClientImpl::containingWindowGraphicsContext()
void PageClientImpl::didChangeScrollbarsForMainFrame() const
{
- [m_wkView _didChangeScrollbarsForMainFrame];
+ [m_wkView _wk_didChangeScrollbarsForMainFrame];
}
void PageClientImpl::didCommitLoadForMainFrame(bool useCustomRepresentation)
{
- [m_wkView _setPageHasCustomRepresentation:useCustomRepresentation];
+ [m_wkView _wk_setPageHasCustomRepresentation:useCustomRepresentation];
}
void PageClientImpl::didFinishLoadingDataForCustomRepresentation(const String& suggestedFilename, const CoreIPC::DataReference& dataReference)
{
- [m_wkView _didFinishLoadingDataForCustomRepresentationWithSuggestedFilename:suggestedFilename dataReference:dataReference];
+ [m_wkView _wk_didFinishLoadingDataForCustomRepresentationWithSuggestedFilename:suggestedFilename dataReference:dataReference];
}
double PageClientImpl::customRepresentationZoomFactor()
{
- return [m_wkView _customRepresentationZoomFactor];
+ return [m_wkView _wk_customRepresentationZoomFactor];
}
void PageClientImpl::setCustomRepresentationZoomFactor(double zoomFactor)
{
- [m_wkView _setCustomRepresentationZoomFactor:zoomFactor];
+ [m_wkView _wk_setCustomRepresentationZoomFactor:zoomFactor];
}
void PageClientImpl::findStringInCustomRepresentation(const String& string, FindOptions options, unsigned maxMatchCount)
{
- [m_wkView _findStringInCustomRepresentation:string withFindOptions:options maxMatchCount:maxMatchCount];
+ [m_wkView _wk_findStringInCustomRepresentation:string withFindOptions:options maxMatchCount:maxMatchCount];
}
void PageClientImpl::countStringMatchesInCustomRepresentation(const String& string, FindOptions options, unsigned maxMatchCount)
{
- [m_wkView _countStringMatchesInCustomRepresentation:string withFindOptions:options maxMatchCount:maxMatchCount];
+ [m_wkView _wk_countStringMatchesInCustomRepresentation:string withFindOptions:options maxMatchCount:maxMatchCount];
}
void PageClientImpl::flashBackingStoreUpdates(const Vector<IntRect>&)
@@ -555,10 +555,11 @@ void PageClientImpl::recommendedScrollbarStyleDidChange(int32_t newStyle)
bool PageClientImpl::executeSavedCommandBySelector(const String& selectorString)
{
- return [m_wkView _executeSavedCommandBySelector:NSSelectorFromString(selectorString)];
+ return [m_wkView _wk_executeSavedCommandBySelector:NSSelectorFromString(selectorString)];
}
#if USE(DICTATION_ALTERNATIVES)
+
uint64_t PageClientImpl::addDictationAlternatives(const RetainPtr<NSTextAlternatives>& alternatives)
{
return m_alternativeTextUIController->addAlternatives(alternatives);
@@ -574,7 +575,7 @@ void PageClientImpl::showDictationAlternativeUI(const WebCore::FloatRect& boundi
if (!isViewVisible() || !isViewInWindow())
return;
m_alternativeTextUIController->showAlternatives(m_wkView, boundingBoxOfDictatedText, dictationContext, ^(NSString* acceptedAlternative){
- [m_wkView handleAcceptedAlternativeText:acceptedAlternative];
+ [m_wkView _wk_handleAcceptedAlternativeText:acceptedAlternative];
});
}
@@ -587,6 +588,7 @@ void PageClientImpl::dismissDictationAlternativeUI()
{
m_alternativeTextUIController->dismissAlternatives();
}
+
#endif
} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/API/mac/WKView.mm b/Source/WebKit2/UIProcess/API/mac/WKView.mm
index d4b301298..e4a6e6b4b 100644
--- a/Source/WebKit2/UIProcess/API/mac/WKView.mm
+++ b/Source/WebKit2/UIProcess/API/mac/WKView.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2011, 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
@@ -26,9 +26,9 @@
#import "config.h"
#import "WKView.h"
-#if USE(DICTATION_ALTERNATIVES)
-#import <AppKit/NSTextAlternatives.h>
-#import <AppKit/NSAttributedString.h>
+#if USE(DICTATION_ALTERNATIVES)
+#import <AppKit/NSTextAlternatives.h>
+#import <AppKit/NSAttributedString.h>
#endif
#import "AttributedString.h"
@@ -51,8 +51,11 @@
#import "TextCheckerState.h"
#import "TiledCoreAnimationDrawingAreaProxy.h"
#import "WKAPICast.h"
+#import "WKBrowsingContextControllerInternal.h"
+#import "WKBrowsingContextGroupInternal.h"
#import "WKFullScreenWindowController.h"
#import "WKPrintingView.h"
+#import "WKProcessGroupInternal.h"
#import "WKStringCF.h"
#import "WKTextInputWindowController.h"
#import "WKViewInternal.h"
@@ -69,6 +72,7 @@
#import <WebCore/DragController.h>
#import <WebCore/DragData.h>
#import <WebCore/DragSession.h>
+#import <WebCore/FileSystem.h>
#import <WebCore/FloatRect.h>
#import <WebCore/Image.h>
#import <WebCore/IntRect.h>
@@ -81,18 +85,11 @@
#import <WebCore/SharedBuffer.h>
#import <WebCore/TextAlternativeWithRange.h>
#import <WebCore/WebCoreNSStringExtras.h>
-#import <WebCore/FileSystem.h>
#import <WebKitSystemInterface.h>
#import <sys/stat.h>
#import <wtf/RefPtr.h>
#import <wtf/RetainPtr.h>
-/* API internals. */
-#import "WKBrowsingContextControllerInternal.h"
-#import "WKBrowsingContextGroupInternal.h"
-#import "WKProcessGroupInternal.h"
-
-
@interface NSApplication (WKNSApplicationDetails)
- (void)speakString:(NSString *)string;
- (void)_setCurrentEvent:(NSEvent *)event;
@@ -134,13 +131,18 @@ struct WKViewInterpretKeyEventsParameters {
};
@interface WKView ()
-- (void)_accessibilityRegisterUIProcessTokens;
-- (void)_disableComplexTextInputIfNecessary;
-- (float)_intrinsicDeviceScaleFactor;
-- (void)_postFakeMouseMovedEventForFlagsChangedEvent:(NSEvent *)flagsChangedEvent;
-- (void)_setDrawingAreaSize:(NSSize)size;
-- (void)_setPluginComplexTextInputState:(PluginComplexTextInputState)pluginComplexTextInputState;
-- (BOOL)_shouldUseTiledDrawingArea;
+- (void)_wk_accessibilityRegisterUIProcessTokens;
+- (void)_wk_disableComplexTextInputIfNecessary;
+- (float)_wk_intrinsicDeviceScaleFactor;
+- (void)_wk_postFakeMouseMovedEventForFlagsChangedEvent:(NSEvent *)flagsChangedEvent;
+- (void)_wk_setDrawingAreaSize:(NSSize)size;
+- (void)_wk_setPluginComplexTextInputState:(PluginComplexTextInputState)pluginComplexTextInputState;
+@end
+
+@interface WKToolTipDelegate : NSObject {
+ RefPtr<WebPageProxy> _page;
+}
+- (id)initWithPage:(WebPageProxy *)page;
@end
@interface WKViewData : NSObject {
@@ -214,6 +216,9 @@ struct WKViewInterpretKeyEventsParameters {
RefPtr<WebCore::Image> _promisedImage;
String _promisedFilename;
String _promisedURL;
+
+ RetainPtr<WKToolTipDelegate> _toolTipDelegate;
+ RetainPtr<NSMutableArray> _observers;
}
@end
@@ -221,7 +226,6 @@ struct WKViewInterpretKeyEventsParameters {
@implementation WKViewData
@end
-
@interface WKResponderChainSink : NSResponder {
NSResponder *_lastResponderInChain;
bool _didReceiveUnhandledCommand;
@@ -307,7 +311,7 @@ struct WKViewInterpretKeyEventsParameters {
_data->_inBecomeFirstResponder = true;
- [self _updateSecureInputState];
+ [self _wk_updateSecureInputState];
_data->_page->viewStateDidChange(WebPageProxy::ViewIsFocused);
_data->_inBecomeFirstResponder = false;
@@ -328,7 +332,7 @@ struct WKViewInterpretKeyEventsParameters {
if (_data->_page->editorState().hasComposition && !_data->_page->editorState().shouldIgnoreCompositionSelectionChange)
_data->_page->cancelComposition();
- [self _resetTextInputState];
+ [self _wk_resetTextInputState];
if (!_data->_page->maintainsInactiveSelection())
_data->_page->clearSelection();
@@ -363,10 +367,10 @@ struct WKViewInterpretKeyEventsParameters {
[super setFrameSize:size];
if (![self frameSizeUpdatesDisabled])
- [self _setDrawingAreaSize:size];
+ [self _wk_setDrawingAreaSize:size];
}
-- (void)_updateWindowAndViewFrames
+- (void)_wk_updateWindowAndViewFrames
{
NSWindow *window = [self window];
ASSERT(window);
@@ -385,12 +389,12 @@ struct WKViewInterpretKeyEventsParameters {
// Update the view frame.
if ([self window])
- [self _updateWindowAndViewFrames];
+ [self _wk_updateWindowAndViewFrames];
[super renewGState];
}
-- (void)_setPluginComplexTextInputState:(PluginComplexTextInputState)pluginComplexTextInputState
+- (void)_wk_setPluginComplexTextInputState:(PluginComplexTextInputState)pluginComplexTextInputState
{
_data->_pluginComplexTextInputState = pluginComplexTextInputState;
@@ -653,7 +657,7 @@ static void validateCommandCallback(WKStringRef commandName, bool isEnabled, int
WKView* wkView = static_cast<WKView*>(context);
ASSERT(wkView);
- [wkView _setUserInterfaceItemState:nsStringFromWebCoreString(toImpl(commandName)->string()) enabled:isEnabled state:state];
+ [wkView _wk_setUserInterfaceItemState:nsStringFromWebCoreString(toImpl(commandName)->string()) enabled:isEnabled state:state];
}
- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item
@@ -964,7 +968,7 @@ static void speakString(WKStringRef string, WKErrorRef error, void*)
{
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
// FIXME: We should remove this code when <rdar://problem/9362085> is resolved. In the meantime,
- // it is necessary to disable scren updates so we get a chance to redraw the corners before this
+ // it is necessary to disable screen updates so we get a chance to redraw the corners before this
// display is visible.
NSWindow *window = [self window];
BOOL shouldMaskWindow = window && !NSIsEmptyRect(_data->_windowBottomCornerIntersectionRect);
@@ -992,7 +996,7 @@ static void speakString(WKStringRef string, WKErrorRef error, void*)
return YES;
}
-- (void)_setMouseDownEvent:(NSEvent *)event
+- (void)_wk_setMouseDownEvent:(NSEvent *)event
{
ASSERT(!event || [event type] == NSLeftMouseDown || [event type] == NSRightMouseDown || [event type] == NSOtherMouseDown);
@@ -1016,10 +1020,10 @@ static void speakString(WKStringRef string, WKErrorRef error, void*)
NATIVE_MOUSE_EVENT_HANDLER(mouseEntered)
NATIVE_MOUSE_EVENT_HANDLER(mouseExited)
-NATIVE_MOUSE_EVENT_HANDLER(mouseMovedInternal)
-NATIVE_MOUSE_EVENT_HANDLER(mouseDownInternal)
-NATIVE_MOUSE_EVENT_HANDLER(mouseUpInternal)
-NATIVE_MOUSE_EVENT_HANDLER(mouseDraggedInternal)
+NATIVE_MOUSE_EVENT_HANDLER(_wk_mouseMovedInternal)
+NATIVE_MOUSE_EVENT_HANDLER(_wk_mouseDownInternal)
+NATIVE_MOUSE_EVENT_HANDLER(_wk_mouseUpInternal)
+NATIVE_MOUSE_EVENT_HANDLER(_wk_mouseDraggedInternal)
NATIVE_MOUSE_EVENT_HANDLER(otherMouseDown)
NATIVE_MOUSE_EVENT_HANDLER(otherMouseDragged)
NATIVE_MOUSE_EVENT_HANDLER(otherMouseMoved)
@@ -1047,27 +1051,27 @@ NATIVE_EVENT_HANDLER(scrollWheel, Wheel)
if (self == [[self window] firstResponder] && !NSPointInRect([self convertPoint:[event locationInWindow] fromView:nil], [self visibleRect]))
return;
- [self mouseMovedInternal:event];
+ [self _wk_mouseMovedInternal:event];
}
- (void)mouseDown:(NSEvent *)event
{
- [self _setMouseDownEvent:event];
+ [self _wk_setMouseDownEvent:event];
_data->_ignoringMouseDraggedEvents = NO;
- [self mouseDownInternal:event];
+ [self _wk_mouseDownInternal:event];
}
- (void)mouseUp:(NSEvent *)event
{
- [self _setMouseDownEvent:nil];
- [self mouseUpInternal:event];
+ [self _wk_setMouseDownEvent:nil];
+ [self _wk_mouseUpInternal:event];
}
- (void)mouseDragged:(NSEvent *)event
{
if (_data->_ignoringMouseDraggedEvents)
return;
- [self mouseDraggedInternal:event];
+ [self _wk_mouseDraggedInternal:event];
}
- (BOOL)acceptsFirstMouse:(NSEvent *)event
@@ -1080,9 +1084,9 @@ NATIVE_EVENT_HANDLER(scrollWheel, Wheel)
if (![self hitTest:[event locationInWindow]])
return NO;
- [self _setMouseDownEvent:event];
+ [self _wk_setMouseDownEvent:event];
bool result = _data->_page->acceptsFirstMouse([event eventNumber], WebEventFactory::createWebMouseEvent(event, self));
- [self _setMouseDownEvent:nil];
+ [self _wk_setMouseDownEvent:nil];
return result;
}
@@ -1101,9 +1105,9 @@ NATIVE_EVENT_HANDLER(scrollWheel, Wheel)
if (![self hitTest:[event locationInWindow]])
return NO;
- [self _setMouseDownEvent:event];
+ [self _wk_setMouseDownEvent:event];
bool result = _data->_page->shouldDelayWindowOrderingForEvent(WebEventFactory::createWebMouseEvent(event, self));
- [self _setMouseDownEvent:nil];
+ [self _wk_setMouseDownEvent:nil];
return result;
}
@@ -1140,6 +1144,7 @@ static const short kIOHIDEventTypeScroll = 6;
}];
}
}
+
#endif
- (void)doCommandBySelector:(SEL)selector
@@ -1226,7 +1231,7 @@ static const short kIOHIDEventTypeScroll = 6;
parameters->eventInterpretationHadSideEffects |= eventHandled;
}
-- (BOOL)_handleStyleKeyEquivalent:(NSEvent *)event
+- (BOOL)_wk_handleStyleKeyEquivalent:(NSEvent *)event
{
if (!_data->_page->editorState().isContentEditable)
return NO;
@@ -1262,7 +1267,7 @@ static const short kIOHIDEventTypeScroll = 6;
BOOL eventWasSentToWebCore = (_data->_keyDownEventBeingResent == event);
if (!eventWasSentToWebCore)
- [self _disableComplexTextInputIfNecessary];
+ [self _wk_disableComplexTextInputIfNecessary];
// Pass key combos through WebCore if there is a key binding available for
// this event. This lets web pages have a crack at intercepting key-modified keypresses.
@@ -1273,7 +1278,7 @@ static const short kIOHIDEventTypeScroll = 6;
return YES;
}
- return [self _handleStyleKeyEquivalent:event] || [super performKeyEquivalent:event];
+ return [self _wk_handleStyleKeyEquivalent:event] || [super performKeyEquivalent:event];
}
- (void)keyUp:(NSEvent *)theEvent
@@ -1282,7 +1287,7 @@ static const short kIOHIDEventTypeScroll = 6;
_data->_page->handleKeyboardEvent(NativeWebKeyboardEvent(theEvent, self));
}
-- (void)_disableComplexTextInputIfNecessary
+- (void)_wk_disableComplexTextInputIfNecessary
{
if (!_data->_pluginComplexTextInputIdentifier)
return;
@@ -1292,10 +1297,10 @@ static const short kIOHIDEventTypeScroll = 6;
// Check if the text input window has been dismissed.
if (![[WKTextInputWindowController sharedTextInputWindowController] hasMarkedText])
- [self _setPluginComplexTextInputState:PluginComplexTextInputDisabled];
+ [self _wk_setPluginComplexTextInputState:PluginComplexTextInputDisabled];
}
-- (BOOL)_handlePluginComplexTextInputKeyDown:(NSEvent *)event
+- (BOOL)_wk_handlePluginComplexTextInputKeyDown:(NSEvent *)event
{
ASSERT(_data->_pluginComplexTextInputIdentifier);
ASSERT(_data->_pluginComplexTextInputState != PluginComplexTextInputDisabled);
@@ -1315,18 +1320,18 @@ static const short kIOHIDEventTypeScroll = 6;
return didHandleEvent;
}
-- (BOOL)_tryHandlePluginComplexTextInputKeyDown:(NSEvent *)event
+- (BOOL)_wk_tryHandlePluginComplexTextInputKeyDown:(NSEvent *)event
{
if (!_data->_pluginComplexTextInputIdentifier || _data->_pluginComplexTextInputState == PluginComplexTextInputDisabled)
return NO;
// Check if the text input window has been dismissed and let the plug-in process know.
// This is only valid with the updated Cocoa text input spec.
- [self _disableComplexTextInputIfNecessary];
+ [self _wk_disableComplexTextInputIfNecessary];
// Try feeding the keyboard event directly to the plug-in.
if (_data->_pluginComplexTextInputState == PluginComplexTextInputEnabledLegacy)
- return [self _handlePluginComplexTextInputKeyDown:event];
+ return [self _wk_handlePluginComplexTextInputKeyDown:event];
return NO;
}
@@ -1340,7 +1345,7 @@ static const short kIOHIDEventTypeScroll = 6;
// the current event prevents that from causing a problem inside WebKit or AppKit code.
[[theEvent retain] autorelease];
- if ([self _tryHandlePluginComplexTextInputKeyDown:theEvent]) {
+ if ([self _wk_tryHandlePluginComplexTextInputKeyDown:theEvent]) {
LOG(TextInput, "...handled by plug-in");
return;
}
@@ -1374,7 +1379,7 @@ static const short kIOHIDEventTypeScroll = 6;
_data->_page->handleKeyboardEvent(NativeWebKeyboardEvent(theEvent, self));
}
-- (void)_executeSavedKeypressCommands
+- (void)_wk_executeSavedKeypressCommands
{
WKViewInterpretKeyEventsParameters* parameters = _data->_interpretKeyEventsParameters;
if (!parameters || parameters->commands->isEmpty())
@@ -1395,7 +1400,7 @@ static const short kIOHIDEventTypeScroll = 6;
LOG(TextInput, "...done executing saved keypress commands.");
}
-- (void)_notifyInputContextAboutDiscardedComposition
+- (void)_wk_notifyInputContextAboutDiscardedComposition
{
// <rdar://problem/9359055>: -discardMarkedText can only be called for active contexts.
// FIXME: We fail to ever notify the input context if something (e.g. a navigation) happens while the window is not key.
@@ -1423,7 +1428,7 @@ static const short kIOHIDEventTypeScroll = 6;
- (NSRange)selectedRange
{
- [self _executeSavedKeypressCommands];
+ [self _wk_executeSavedKeypressCommands];
uint64_t selectionStart;
uint64_t selectionLength;
@@ -1447,7 +1452,7 @@ static const short kIOHIDEventTypeScroll = 6;
result = _data->_page->editorState().hasComposition;
if (result) {
// A saved command can confirm a composition, but it cannot start a new one.
- [self _executeSavedKeypressCommands];
+ [self _wk_executeSavedKeypressCommands];
result = _data->_page->editorState().hasComposition;
}
} else {
@@ -1463,7 +1468,7 @@ static const short kIOHIDEventTypeScroll = 6;
- (void)unmarkText
{
- [self _executeSavedKeypressCommands];
+ [self _wk_executeSavedKeypressCommands];
LOG(TextInput, "unmarkText");
@@ -1522,7 +1527,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
- (void)setMarkedText:(id)string selectedRange:(NSRange)newSelRange replacementRange:(NSRange)replacementRange
{
- [self _executeSavedKeypressCommands];
+ [self _wk_executeSavedKeypressCommands];
BOOL isAttributedString = [string isKindOfClass:[NSAttributedString class]];
ASSERT(isAttributedString || [string isKindOfClass:[NSString class]]);
@@ -1551,7 +1556,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
// In password fields, we only allow ASCII dead keys, and don't allow inline input, matching NSSecureTextInputField.
// Allowing ASCII dead keys is necessary to enable full Roman input when using a Vietnamese keyboard.
ASSERT(!_data->_page->editorState().hasComposition);
- [self _notifyInputContextAboutDiscardedComposition];
+ [self _wk_notifyInputContextAboutDiscardedComposition];
if ([text length] == 1 && [[text decomposedStringWithCanonicalMapping] characterAtIndex:0] < 0x80) {
_data->_page->insertText(text, replacementRange.location, NSMaxRange(replacementRange));
} else
@@ -1564,7 +1569,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
- (NSRange)markedRange
{
- [self _executeSavedKeypressCommands];
+ [self _wk_executeSavedKeypressCommands];
uint64_t location;
uint64_t length;
@@ -1576,7 +1581,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)nsRange actualRange:(NSRangePointer)actualRange
{
- [self _executeSavedKeypressCommands];
+ [self _wk_executeSavedKeypressCommands];
if (!_data->_page->editorState().isContentEditable) {
LOG(TextInput, "attributedSubstringFromRange:(%u, %u) -> nil", nsRange.location, nsRange.length);
@@ -1600,7 +1605,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
- (NSUInteger)characterIndexForPoint:(NSPoint)thePoint
{
- [self _executeSavedKeypressCommands];
+ [self _wk_executeSavedKeypressCommands];
NSWindow *window = [self window];
@@ -1615,7 +1620,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
- (NSRect)firstRectForCharacterRange:(NSRange)theRange actualRange:(NSRangePointer)actualRange
{
- [self _executeSavedKeypressCommands];
+ [self _wk_executeSavedKeypressCommands];
// Just to match NSTextView's behavior. Regression tests cannot detect this;
// to reproduce, use a test application from http://bugs.webkit.org/show_bug.cgi?id=4682
@@ -1640,6 +1645,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
}
#if ENABLE(DRAG_SUPPORT)
+
- (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation
{
NSPoint windowImageLoc = [[self window] convertScreenToBase:aPoint];
@@ -1781,6 +1787,7 @@ static void createSandboxExtensionsForFileUpload(NSPasteboard *pasteboard, Sandb
return self;
return nil;
}
+
#endif // ENABLE(DRAG_SUPPORT)
- (BOOL)_windowResizeMouseLocationIsInVisibleScrollerThumb:(NSPoint)loc
@@ -1790,13 +1797,14 @@ static void createSandboxExtensionsForFileUpload(NSPasteboard *pasteboard, Sandb
return NSMouseInRect(localPoint, visibleThumbRect, [self isFlipped]);
}
-- (void)_updateWindowVisibility
+- (void)_wk_updateWindowVisibility
{
_data->_page->updateWindowIsVisible([[self window] isVisible]);
}
#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
+
- (BOOL)_ownsWindowGrowBox
{
NSWindow* window = [self window];
@@ -1845,54 +1853,45 @@ static void createSandboxExtensionsForFileUpload(NSPasteboard *pasteboard, Sandb
return ownsGrowBox;
}
+
#endif
// FIXME: Use AppKit constants for these when they are available.
+static NSString * const windowDidBecomeVisibleNotification = @"_NSWindowDidBecomeVisible";
+static NSString * const windowDidOrderOffScreenNotification = @"NSWindowDidOrderOffScreenNotification";
static NSString * const windowDidChangeBackingPropertiesNotification = @"NSWindowDidChangeBackingPropertiesNotification";
static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOldScaleFactorKey";
-- (void)addWindowObserversForWindow:(NSWindow *)window
-{
- if (window) {
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidBecomeKey:)
- name:NSWindowDidBecomeKeyNotification object:nil];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidResignKey:)
- name:NSWindowDidResignKeyNotification object:nil];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidMiniaturize:)
- name:NSWindowDidMiniaturizeNotification object:window];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidDeminiaturize:)
- name:NSWindowDidDeminiaturizeNotification object:window];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidMove:)
- name:NSWindowDidMoveNotification object:window];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidResize:)
- name:NSWindowDidResizeNotification object:window];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidOrderOffScreen:)
- name:@"NSWindowDidOrderOffScreenNotification" object:window];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidOrderOnScreen:)
- name:@"_NSWindowDidBecomeVisible" object:window];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidChangeBackingProperties:)
- name:windowDidChangeBackingPropertiesNotification object:window];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidChangeScreen:)
- name:NSWindowDidChangeScreenNotification object:window];
- }
-}
-
-- (void)removeWindowObservers
+- (void)_wk_updateWindowObserversForWindow:(NSWindow *)window
{
- NSWindow *window = [self window];
+ for (id observer in _data->_observers.get())
+ [[NSNotificationCenter defaultCenter] removeObserver:observer];
+ [_data->_observers.get() removeAllObjects];
+
if (!window)
return;
- [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidBecomeKeyNotification object:nil];
- [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidResignKeyNotification object:nil];
- [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidMiniaturizeNotification object:window];
- [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidDeminiaturizeNotification object:window];
- [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidMoveNotification object:window];
- [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidResizeNotification object:window];
- [[NSNotificationCenter defaultCenter] removeObserver:self name:@"NSWindowDidOrderOffScreenNotification" object:window];
- [[NSNotificationCenter defaultCenter] removeObserver:self name:@"_NSWindowDidBecomeVisible" object:window];
- [[NSNotificationCenter defaultCenter] removeObserver:self name:windowDidChangeBackingPropertiesNotification object:window];
- [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidChangeScreenNotification object:window];
+ if (!_data->_observers)
+ _data->_observers = adoptNS([[NSMutableArray alloc] init]);
+
+ #define ADD_OBSERVER(selectorName, notificationName, notificationObject) \
+ [_data->_observers.get() addObject:[[NSNotificationCenter defaultCenter] \
+ addObserverForName:notificationName object:notificationObject queue:[NSOperationQueue mainQueue] \
+ usingBlock:^(NSNotification *notification){ [self selectorName:notification]; }] \
+ ];
+
+ ADD_OBSERVER(_wk_windowDidBecomeKey, NSWindowDidBecomeKeyNotification, nil);
+ ADD_OBSERVER(_wk_windowDidChangeBackingProperties, windowDidChangeBackingPropertiesNotification, window);
+ ADD_OBSERVER(_wk_windowDidChangeScreen, NSWindowDidChangeScreenNotification, window);
+ ADD_OBSERVER(_wk_windowDidDeminiaturize, NSWindowDidDeminiaturizeNotification, window);
+ ADD_OBSERVER(_wk_windowDidMiniaturize, NSWindowDidMiniaturizeNotification, window);
+ ADD_OBSERVER(_wk_windowDidMove, NSWindowDidMoveNotification, window);
+ ADD_OBSERVER(_wk_windowDidOrderOffScreen, windowDidOrderOffScreenNotification, window);
+ ADD_OBSERVER(_wk_windowDidOrderOnScreen, windowDidBecomeVisibleNotification, window);
+ ADD_OBSERVER(_wk_windowDidResignKey, NSWindowDidResignKeyNotification, nil);
+ ADD_OBSERVER(_wk_windowDidResize, NSWindowDidResizeNotification, window);
+
+ #undef ADD_OBSERVER
}
- (void)viewWillMoveToWindow:(NSWindow *)window
@@ -1912,8 +1911,7 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl
#endif
_data->_pageClient->viewWillMoveToAnotherWindow();
- [self removeWindowObservers];
- [self addWindowObserversForWindow:window];
+ [self _wk_updateWindowObserversForWindow:window];
#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
if ([currentWindow _growBoxOwner] == self)
@@ -1928,21 +1926,21 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl
// update the active state.
if ([self window]) {
_data->_windowHasValidBackingStore = NO;
- [self _updateWindowVisibility];
+ [self _wk_updateWindowVisibility];
_data->_page->viewStateDidChange(WebPageProxy::ViewWindowIsActive);
_data->_page->viewStateDidChange(WebPageProxy::ViewIsVisible | WebPageProxy::ViewIsInWindow);
- [self _updateWindowAndViewFrames];
+ [self _wk_updateWindowAndViewFrames];
if (!_data->_flagsChangedEventMonitor) {
_data->_flagsChangedEventMonitor = [NSEvent addLocalMonitorForEventsMatchingMask:NSFlagsChangedMask handler:^(NSEvent *flagsChangedEvent) {
- [self _postFakeMouseMovedEventForFlagsChangedEvent:flagsChangedEvent];
+ [self _wk_postFakeMouseMovedEventForFlagsChangedEvent:flagsChangedEvent];
return flagsChangedEvent;
}];
}
- [self _accessibilityRegisterUIProcessTokens];
+ [self _wk_accessibilityRegisterUIProcessTokens];
} else {
- [self _updateWindowVisibility];
+ [self _wk_updateWindowVisibility];
_data->_page->viewStateDidChange(WebPageProxy::ViewIsVisible);
_data->_page->viewStateDidChange(WebPageProxy::ViewWindowIsActive | WebPageProxy::ViewIsInWindow);
@@ -1960,67 +1958,67 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl
#endif
}
- _data->_page->setIntrinsicDeviceScaleFactor([self _intrinsicDeviceScaleFactor]);
+ _data->_page->setIntrinsicDeviceScaleFactor([self _wk_intrinsicDeviceScaleFactor]);
}
-- (void)doWindowDidChangeScreen
+- (void)_wk_windowScreenDidChange
{
_data->_page->windowScreenDidChange((PlatformDisplayID)[[[[[self window] screen] deviceDescription] objectForKey:@"NSScreenNumber"] intValue]);
}
-- (void)_windowDidBecomeKey:(NSNotification *)notification
+- (void)_wk_windowDidBecomeKey:(NSNotification *)notification
{
NSWindow *keyWindow = [notification object];
if (keyWindow == [self window] || keyWindow == [[self window] attachedSheet]) {
- [self _updateSecureInputState];
+ [self _wk_updateSecureInputState];
_data->_page->viewStateDidChange(WebPageProxy::ViewWindowIsActive);
}
// Send a change screen to make sure the initial displayID is set
- [self doWindowDidChangeScreen];
+ [self _wk_windowScreenDidChange];
}
-- (void)_windowDidChangeScreen:(NSNotification *)notification
+- (void)_wk_windowDidChangeScreen:(NSNotification *)notification
{
- [self doWindowDidChangeScreen];
+ [self _wk_windowScreenDidChange];
}
-- (void)_windowDidResignKey:(NSNotification *)notification
+- (void)_wk_windowDidResignKey:(NSNotification *)notification
{
NSWindow *formerKeyWindow = [notification object];
if (formerKeyWindow == [self window] || formerKeyWindow == [[self window] attachedSheet]) {
- [self _updateSecureInputState];
+ [self _wk_updateSecureInputState];
_data->_page->viewStateDidChange(WebPageProxy::ViewWindowIsActive);
}
}
-- (void)_windowDidMiniaturize:(NSNotification *)notification
+- (void)_wk_windowDidMiniaturize:(NSNotification *)notification
{
_data->_windowHasValidBackingStore = NO;
- [self _updateWindowVisibility];
+ [self _wk_updateWindowVisibility];
}
-- (void)_windowDidDeminiaturize:(NSNotification *)notification
+- (void)_wk_windowDidDeminiaturize:(NSNotification *)notification
{
- [self _updateWindowVisibility];
+ [self _wk_updateWindowVisibility];
}
-- (void)_windowDidMove:(NSNotification *)notification
+- (void)_wk_windowDidMove:(NSNotification *)notification
{
- [self _updateWindowAndViewFrames];
+ [self _wk_updateWindowAndViewFrames];
}
-- (void)_windowDidResize:(NSNotification *)notification
+- (void)_wk_windowDidResize:(NSNotification *)notification
{
_data->_windowHasValidBackingStore = NO;
- [self _updateWindowAndViewFrames];
+ [self _wk_updateWindowAndViewFrames];
}
-- (void)_windowDidOrderOffScreen:(NSNotification *)notification
+- (void)_wk_windowDidOrderOffScreen:(NSNotification *)notification
{
- [self _updateWindowVisibility];
+ [self _wk_updateWindowVisibility];
// We want to make sure to update the active state while hidden, so since the view is about to be hidden,
// we hide it first and then update the active state.
@@ -2028,9 +2026,9 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl
_data->_page->viewStateDidChange(WebPageProxy::ViewWindowIsActive);
}
-- (void)_windowDidOrderOnScreen:(NSNotification *)notification
+- (void)_wk_windowDidOrderOnScreen:(NSNotification *)notification
{
- [self _updateWindowVisibility];
+ [self _wk_updateWindowVisibility];
// We want to make sure to update the active state while hidden, so since the view is about to become visible,
// we update the active state first and then make it visible.
@@ -2038,10 +2036,10 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl
_data->_page->viewStateDidChange(WebPageProxy::ViewIsVisible);
}
-- (void)_windowDidChangeBackingProperties:(NSNotification *)notification
+- (void)_wk_windowDidChangeBackingProperties:(NSNotification *)notification
{
CGFloat oldBackingScaleFactor = [[notification.userInfo objectForKey:backingPropertyOldScaleFactorKey] doubleValue];
- CGFloat newBackingScaleFactor = [self _intrinsicDeviceScaleFactor];
+ CGFloat newBackingScaleFactor = [self _wk_intrinsicDeviceScaleFactor];
if (oldBackingScaleFactor == newBackingScaleFactor)
return;
@@ -2138,7 +2136,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
drawingArea->colorSpaceDidChange();
}
-- (void)_accessibilityRegisterUIProcessTokens
+- (void)_wk_accessibilityRegisterUIProcessTokens
{
// Initialize remote accessibility when the window connection has been established.
NSData *remoteElementToken = WKAXRemoteTokenForElement(self);
@@ -2148,7 +2146,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
_data->_page->registerUIProcessAccessibilityTokens(elementToken, windowToken);
}
-- (void)_updateRemoteAccessibilityRegistration:(BOOL)registerProcess
+- (void)_wk_updateRemoteAccessibilityRegistration:(BOOL)registerProcess
{
// When the tree is connected/disconnected, the remote accessibility registration
// needs to be updated with the pid of the remote process. If the process is going
@@ -2220,7 +2218,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
return hitView;
}
-- (void)_postFakeMouseMovedEventForFlagsChangedEvent:(NSEvent *)flagsChangedEvent
+- (void)_wk_postFakeMouseMovedEventForFlagsChangedEvent:(NSEvent *)flagsChangedEvent
{
NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved location:[[flagsChangedEvent window] convertScreenToBase:[NSEvent mouseLocation]]
modifierFlags:[flagsChangedEvent modifierFlags] timestamp:[flagsChangedEvent timestamp] windowNumber:[flagsChangedEvent windowNumber]
@@ -2234,7 +2232,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
return (NSInteger)self;
}
-- (float)_intrinsicDeviceScaleFactor
+- (float)_wk_intrinsicDeviceScaleFactor
{
NSWindow *window = [self window];
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
@@ -2248,7 +2246,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
#endif
}
-- (void)_setDrawingAreaSize:(NSSize)size
+- (void)_wk_setDrawingAreaSize:(NSSize)size
{
if (!_data->_page->drawingArea())
return;
@@ -2257,11 +2255,6 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
_data->_resizeScrollOffset = NSZeroSize;
}
-- (BOOL)_shouldUseTiledDrawingArea
-{
- return NO;
-}
-
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
- (void)quickLookWithEvent:(NSEvent *)event
{
@@ -2274,7 +2267,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
@implementation WKView (Internal)
-- (PassOwnPtr<WebKit::DrawingAreaProxy>)_createDrawingAreaProxy
+- (PassOwnPtr<WebKit::DrawingAreaProxy>)_wk_createDrawingAreaProxy
{
#if ENABLE(THREADED_SCROLLING)
if ([self _shouldUseTiledDrawingArea])
@@ -2284,7 +2277,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
return DrawingAreaProxyImpl::create(_data->_page.get());
}
-- (BOOL)_isFocused
+- (BOOL)_wk_isFocused
{
if (_data->_inBecomeFirstResponder)
return YES;
@@ -2293,7 +2286,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
return [[self window] firstResponder] == self;
}
-- (WebKit::ColorSpaceData)_colorSpace
+- (WebKit::ColorSpaceData)_wk_colorSpace
{
if (!_data->_colorSpace) {
if ([self window])
@@ -2308,32 +2301,32 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
return colorSpaceData;
}
-- (void)_processDidCrash
+- (void)_wk_processDidCrash
{
if (_data->_layerHostingView)
- [self _exitAcceleratedCompositingMode];
+ [self _wk_exitAcceleratedCompositingMode];
- [self _updateRemoteAccessibilityRegistration:NO];
+ [self _wk_updateRemoteAccessibilityRegistration:NO];
}
-- (void)_pageClosed
+- (void)_wk_pageClosed
{
- [self _updateRemoteAccessibilityRegistration:NO];
+ [self _wk_updateRemoteAccessibilityRegistration:NO];
}
-- (void)_didRelaunchProcess
+- (void)_wk_didRelaunchProcess
{
- [self _accessibilityRegisterUIProcessTokens];
+ [self _wk_accessibilityRegisterUIProcessTokens];
}
-- (void)_setCursor:(NSCursor *)cursor
+- (void)_wk_setCursor:(NSCursor *)cursor
{
if ([NSCursor currentCursor] == cursor)
return;
[cursor set];
}
-- (void)_setUserInterfaceItemState:(NSString *)commandName enabled:(BOOL)isEnabled state:(int)newState
+- (void)_wk_setUserInterfaceItemState:(NSString *)commandName enabled:(BOOL)isEnabled state:(int)newState
{
ValidationVector items = _data->_validationMap.take(commandName);
size_t size = items.size();
@@ -2346,7 +2339,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
}
}
-- (BOOL)_tryPostProcessPluginComplexTextInputKeyDown:(NSEvent *)event
+- (BOOL)_wk_tryPostProcessPluginComplexTextInputKeyDown:(NSEvent *)event
{
if (!_data->_pluginComplexTextInputIdentifier || _data->_pluginComplexTextInputState == PluginComplexTextInputDisabled)
return NO;
@@ -2355,15 +2348,15 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
if (_data->_pluginComplexTextInputState == PluginComplexTextInputEnabledLegacy)
return NO;
- return [self _handlePluginComplexTextInputKeyDown:event];
+ return [self _wk_handlePluginComplexTextInputKeyDown:event];
}
-- (void)_doneWithKeyEvent:(NSEvent *)event eventWasHandled:(BOOL)eventWasHandled
+- (void)_wk_doneWithKeyEvent:(NSEvent *)event eventWasHandled:(BOOL)eventWasHandled
{
if ([event type] != NSKeyDown)
return;
- if ([self _tryPostProcessPluginComplexTextInputKeyDown:event])
+ if ([self _wk_tryPostProcessPluginComplexTextInputKeyDown:event])
return;
if (eventWasHandled) {
@@ -2382,7 +2375,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
_data->_keyDownEventBeingResent = nullptr;
}
-- (BOOL)_interpretKeyEvent:(NSEvent *)event savingCommandsTo:(Vector<WebCore::KeypressCommand>&)commands
+- (BOOL)_wk_interpretKeyEvent:(NSEvent *)event savingCommandsTo:(Vector<WebCore::KeypressCommand>&)commands
{
ASSERT(!_data->_interpretKeyEventsParameters);
ASSERT(commands.isEmpty());
@@ -2417,12 +2410,12 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
return parameters.eventInterpretationHadSideEffects;
}
-- (NSRect)_convertToDeviceSpace:(NSRect)rect
+- (NSRect)_wk_convertToDeviceSpace:(NSRect)rect
{
return toDeviceSpace(rect, [self window]);
}
-- (NSRect)_convertToUserSpace:(NSRect)rect
+- (NSRect)_wk_convertToUserSpace:(NSRect)rect
{
return toUserSpace(rect, [self window]);
}
@@ -2438,7 +2431,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
return TRACKING_RECT_TAG;
}
-- (NSTrackingRectTag)_addTrackingRect:(NSRect)rect owner:(id)owner userData:(void *)data assumeInside:(BOOL)assumeInside useTrackingNum:(int)tag
+- (NSTrackingRectTag)_wk_addTrackingRect:(NSRect)rect owner:(id)owner userData:(void *)data assumeInside:(BOOL)assumeInside useTrackingNum:(int)tag
{
ASSERT(tag == 0 || tag == TRACKING_RECT_TAG);
ASSERT(_data->_trackingRectOwner == nil);
@@ -2447,7 +2440,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
return TRACKING_RECT_TAG;
}
-- (void)_addTrackingRects:(NSRect *)rects owner:(id)owner userDataList:(void **)userDataList assumeInsideList:(BOOL *)assumeInsideList trackingNums:(NSTrackingRectTag *)trackingNums count:(int)count
+- (void)_wk_addTrackingRects:(NSRect *)rects owner:(id)owner userDataList:(void **)userDataList assumeInsideList:(BOOL *)assumeInsideList trackingNums:(NSTrackingRectTag *)trackingNums count:(int)count
{
ASSERT(count == 1);
ASSERT(trackingNums[0] == 0 || trackingNums[0] == TRACKING_RECT_TAG);
@@ -2481,7 +2474,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
ASSERT_NOT_REACHED();
}
-- (void)_removeTrackingRects:(NSTrackingRectTag *)tags count:(int)count
+- (void)_wk_removeTrackingRects:(NSTrackingRectTag *)tags count:(int)count
{
int i;
for (i = 0; i < count; ++i) {
@@ -2495,7 +2488,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
}
}
-- (void)_sendToolTipMouseExited
+- (void)_wk_sendToolTipMouseExited
{
// Nothing matters except window, trackingNumber, and userData.
NSEvent *fakeEvent = [NSEvent enterExitEventWithType:NSMouseExited
@@ -2510,7 +2503,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
[_data->_trackingRectOwner mouseExited:fakeEvent];
}
-- (void)_sendToolTipMouseEntered
+- (void)_wk_sendToolTipMouseEntered
{
// Nothing matters except window, trackingNumber, and userData.
NSEvent *fakeEvent = [NSEvent enterExitEventWithType:NSMouseEntered
@@ -2525,26 +2518,23 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
[_data->_trackingRectOwner mouseEntered:fakeEvent];
}
-- (NSString *)view:(NSView *)view stringForToolTip:(NSToolTipTag)tag point:(NSPoint)point userData:(void *)data
-{
- return nsStringFromWebCoreString(_data->_page->toolTip());
-}
-
-- (void)_toolTipChangedFrom:(NSString *)oldToolTip to:(NSString *)newToolTip
+- (void)_wk_toolTipChangedFrom:(NSString *)oldToolTip to:(NSString *)newToolTip
{
if (oldToolTip)
- [self _sendToolTipMouseExited];
+ [self _wk_sendToolTipMouseExited];
if (newToolTip && [newToolTip length] > 0) {
// See radar 3500217 for why we remove all tooltips rather than just the single one we created.
[self removeAllToolTips];
NSRect wideOpenRect = NSMakeRect(-100000, -100000, 200000, 200000);
- _data->_lastToolTipTag = [self addToolTipRect:wideOpenRect owner:self userData:NULL];
- [self _sendToolTipMouseEntered];
+ if (!_data->_toolTipDelegate)
+ _data->_toolTipDelegate = adoptNS([[WKToolTipDelegate alloc] initWithPage:_data->_page.get()]);
+ _data->_lastToolTipTag = [self addToolTipRect:wideOpenRect owner:_data->_toolTipDelegate.get() userData:NULL];
+ [self _wk_sendToolTipMouseEntered];
}
}
-- (void)_setFindIndicator:(PassRefPtr<FindIndicator>)findIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate
+- (void)_wk_setFindIndicator:(PassRefPtr<FindIndicator>)findIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate
{
if (!findIndicator) {
_data->_findIndicatorWindow = nullptr;
@@ -2557,7 +2547,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
_data->_findIndicatorWindow->setFindIndicator(findIndicator, fadeOut, animate);
}
-- (void)_enterAcceleratedCompositingMode:(const LayerTreeContext&)layerTreeContext
+- (void)_wk_enterAcceleratedCompositingMode:(const LayerTreeContext&)layerTreeContext
{
ASSERT(!_data->_layerHostingView);
ASSERT(!layerTreeContext.isEmpty());
@@ -2586,7 +2576,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
[CATransaction commit];
}
-- (void)_exitAcceleratedCompositingMode
+- (void)_wk_exitAcceleratedCompositingMode
{
ASSERT(_data->_layerHostingView);
@@ -2597,7 +2587,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
_data->_layerHostingView = nullptr;
}
-- (void)_updateAcceleratedCompositingMode:(const WebKit::LayerTreeContext&)layerTreeContext
+- (void)_wk_updateAcceleratedCompositingMode:(const WebKit::LayerTreeContext&)layerTreeContext
{
if (_data->_layerHostingView) {
// Wrap the call to setSublayers: in a CATransaction with actions disabled to
@@ -2610,18 +2600,18 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
[CATransaction commit];
} else {
- [self _exitAcceleratedCompositingMode];
- [self _enterAcceleratedCompositingMode:layerTreeContext];
+ [self _wk_exitAcceleratedCompositingMode];
+ [self _wk_enterAcceleratedCompositingMode:layerTreeContext];
}
}
-- (void)_setAccessibilityWebProcessToken:(NSData *)data
+- (void)_wk_setAccessibilityWebProcessToken:(NSData *)data
{
_data->_remoteAccessibilityChild = WKAXRemoteElementForToken(data);
- [self _updateRemoteAccessibilityRegistration:YES];
+ [self _wk_updateRemoteAccessibilityRegistration:YES];
}
-- (void)_pluginFocusOrWindowFocusChanged:(BOOL)pluginHasFocusAndWindowHasFocus pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier
+- (void)_wk_pluginFocusOrWindowFocusChanged:(BOOL)pluginHasFocusAndWindowHasFocus pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier
{
BOOL inputSourceChanged = _data->_pluginComplexTextInputIdentifier;
@@ -2649,17 +2639,17 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
[NSApp updateWindows];
}
-- (void)_setPluginComplexTextInputState:(PluginComplexTextInputState)pluginComplexTextInputState pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier
+- (void)_wk_setPluginComplexTextInputState:(PluginComplexTextInputState)pluginComplexTextInputState pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier
{
if (pluginComplexTextInputIdentifier != _data->_pluginComplexTextInputIdentifier) {
// We're asked to update the state for a plug-in that doesn't have focus.
return;
}
- [self _setPluginComplexTextInputState:pluginComplexTextInputState];
+ [self _wk_setPluginComplexTextInputState:pluginComplexTextInputState];
}
-- (void)_setPageHasCustomRepresentation:(BOOL)pageHasCustomRepresentation
+- (void)_wk_setPageHasCustomRepresentation:(BOOL)pageHasCustomRepresentation
{
bool hadPDFView = _data->_pdfViewController;
_data->_pdfViewController = nullptr;
@@ -2671,14 +2661,14 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
_data->_page->drawingArea()->pageCustomRepresentationChanged();
}
-- (void)_didFinishLoadingDataForCustomRepresentationWithSuggestedFilename:(const String&)suggestedFilename dataReference:(const CoreIPC::DataReference&)dataReference
+- (void)_wk_didFinishLoadingDataForCustomRepresentationWithSuggestedFilename:(const String&)suggestedFilename dataReference:(const CoreIPC::DataReference&)dataReference
{
ASSERT(_data->_pdfViewController);
_data->_pdfViewController->setPDFDocumentData(_data->_page->mainFrame()->mimeType(), suggestedFilename, dataReference);
}
-- (double)_customRepresentationZoomFactor
+- (double)_wk_customRepresentationZoomFactor
{
if (!_data->_pdfViewController)
return 1;
@@ -2686,7 +2676,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
return _data->_pdfViewController->zoomFactor();
}
-- (void)_setCustomRepresentationZoomFactor:(double)zoomFactor
+- (void)_wk_setCustomRepresentationZoomFactor:(double)zoomFactor
{
if (!_data->_pdfViewController)
return;
@@ -2694,7 +2684,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
_data->_pdfViewController->setZoomFactor(zoomFactor);
}
-- (void)_findStringInCustomRepresentation:(NSString *)string withFindOptions:(WebKit::FindOptions)options maxMatchCount:(NSUInteger)count
+- (void)_wk_findStringInCustomRepresentation:(NSString *)string withFindOptions:(WebKit::FindOptions)options maxMatchCount:(NSUInteger)count
{
if (!_data->_pdfViewController)
return;
@@ -2702,7 +2692,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
_data->_pdfViewController->findString(string, options, count);
}
-- (void)_countStringMatchesInCustomRepresentation:(NSString *)string withFindOptions:(WebKit::FindOptions)options maxMatchCount:(NSUInteger)count
+- (void)_wk_countStringMatchesInCustomRepresentation:(NSString *)string withFindOptions:(WebKit::FindOptions)options maxMatchCount:(NSUInteger)count
{
if (!_data->_pdfViewController)
return;
@@ -2710,7 +2700,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
_data->_pdfViewController->countStringMatches(string, options, count);
}
-- (void)_setDragImage:(NSImage *)image at:(NSPoint)clientPoint linkDrag:(BOOL)linkDrag
+- (void)_wk_setDragImage:(NSImage *)image at:(NSPoint)clientPoint linkDrag:(BOOL)linkDrag
{
IntSize size([image size]);
size.scale(1.0 / _data->_page->deviceScaleFactor());
@@ -2735,7 +2725,7 @@ static bool matchesExtensionOrEquivalent(NSString *filename, NSString *extension
&& hasCaseInsensitiveSuffix(filename, @".jpg"));
}
-- (void)_setPromisedData:(WebCore::Image *)image withFileName:(NSString *)filename withExtension:(NSString *)extension withTitle:(NSString *)title withURL:(NSString *)url withVisibleURL:(NSString *)visibleUrl withArchive:(WebCore::SharedBuffer*) archiveBuffer forPasteboard:(NSString *)pasteboardName
+- (void)_wk_setPromisedData:(WebCore::Image *)image withFileName:(NSString *)filename withExtension:(NSString *)extension withTitle:(NSString *)title withURL:(NSString *)url withVisibleURL:(NSString *)visibleUrl withArchive:(WebCore::SharedBuffer*) archiveBuffer forPasteboard:(NSString *)pasteboardName
{
NSPasteboard *pasteboard = [NSPasteboard pasteboardWithName:pasteboardName];
@@ -2843,9 +2833,9 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
return [NSArray arrayWithObject:[path lastPathComponent]];
}
-- (void)_updateSecureInputState
+- (void)_wk_updateSecureInputState
{
- if (![[self window] isKeyWindow] || ![self _isFocused]) {
+ if (![[self window] isKeyWindow] || ![self _wk_isFocused]) {
if (_data->_inSecureInputState) {
DisableSecureEventInput();
_data->_inSecureInputState = NO;
@@ -2871,13 +2861,13 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
_data->_inSecureInputState = isInPasswordField;
}
-- (void)_updateTextInputStateIncludingSecureInputState:(BOOL)updateSecureInputState
+- (void)_wk_updateTextInputStateIncludingSecureInputState:(BOOL)updateSecureInputState
{
const EditorState& editorState = _data->_page->editorState();
if (updateSecureInputState) {
// This is a temporary state when editing. Flipping secure input state too quickly can expose race conditions.
if (!editorState.selectionIsNone)
- [self _updateSecureInputState];
+ [self _wk_updateSecureInputState];
}
if (!editorState.hasComposition || editorState.shouldIgnoreCompositionSelectionChange)
@@ -2885,12 +2875,12 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
_data->_page->cancelComposition();
- [self _notifyInputContextAboutDiscardedComposition];
+ [self _wk_notifyInputContextAboutDiscardedComposition];
}
-- (void)_resetTextInputState
+- (void)_wk_resetTextInputState
{
- [self _notifyInputContextAboutDiscardedComposition];
+ [self _wk_notifyInputContextAboutDiscardedComposition];
if (_data->_inSecureInputState) {
DisableSecureEventInput();
@@ -2898,7 +2888,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
}
}
-- (void)_didChangeScrollbarsForMainFrame
+- (void)_wk_didChangeScrollbarsForMainFrame
{
#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
[self _updateGrowBoxForWindowFrameChange];
@@ -2906,12 +2896,13 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
}
#if ENABLE(FULLSCREEN_API)
-- (BOOL)hasFullScreenWindowController
+
+- (BOOL)_wk_hasFullScreenWindowController
{
return (bool)_data->_fullScreenWindowController;
}
-- (WKFullScreenWindowController*)fullScreenWindowController
+- (WKFullScreenWindowController*)_wk_fullScreenWindowController
{
if (!_data->_fullScreenWindowController) {
_data->_fullScreenWindowController.adoptNS([[WKFullScreenWindowController alloc] init]);
@@ -2920,16 +2911,17 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
return _data->_fullScreenWindowController.get();
}
-- (void)closeFullScreenWindowController
+- (void)_wk_closeFullScreenWindowController
{
if (!_data->_fullScreenWindowController)
return;
[_data->_fullScreenWindowController.get() close];
_data->_fullScreenWindowController = nullptr;
}
+
#endif
-- (bool)_executeSavedCommandBySelector:(SEL)selector
+- (bool)_wk_executeSavedCommandBySelector:(SEL)selector
{
// The sink does two things: 1) Tells us if the responder went unhandled, and
// 2) prevents any NSBeep; we don't ever want to beep here.
@@ -2939,7 +2931,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
return ![sink.get() didReceiveUnhandledCommand];
}
-- (void)_cacheWindowBottomCornerRect
+- (void)_wk_cacheWindowBottomCornerRect
{
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
// FIXME: We should remove this code when <rdar://problem/9362085> is resolved.
@@ -2953,7 +2945,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
#endif
}
-- (NSInteger)spellCheckerDocumentTag
+- (NSInteger)_wk_spellCheckerDocumentTag
{
if (!_data->_hasSpellCheckerDocumentTag) {
_data->_spellCheckerDocumentTag = [NSSpellChecker uniqueSpellDocumentTag];
@@ -2962,17 +2954,17 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
return _data->_spellCheckerDocumentTag;
}
-- (void)handleAcceptedAlternativeText:(NSString*)text
+- (void)_wk_handleAcceptedAlternativeText:(NSString*)text
{
_data->_page->handleAlternativeTextUIResult(text);
}
-- (void)_setSuppressVisibilityUpdates:(BOOL)suppressVisibilityUpdates
+- (void)_wk_setSuppressVisibilityUpdates:(BOOL)suppressVisibilityUpdates
{
_data->_page->setSuppressVisibilityUpdates(suppressVisibilityUpdates);
}
-- (BOOL)_suppressVisibilityUpdates
+- (BOOL)_wk_suppressVisibilityUpdates
{
return _data->_page->suppressVisibilityUpdates();
}
@@ -2981,7 +2973,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
@implementation WKView (Private)
-- (void)_registerDraggedTypes
+- (void)_wk_registerDraggedTypes
{
NSMutableSet *types = [[NSMutableSet alloc] initWithArray:PasteboardTypes::forEditing()];
[types addObjectsFromArray:PasteboardTypes::forURL()];
@@ -3027,7 +3019,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
_data->_pageClient = PageClientImpl::create(self);
_data->_page = toImpl(contextRef)->createWebPage(_data->_pageClient.get(), toImpl(pageGroupRef), toImpl(relatedPage));
- _data->_page->setIntrinsicDeviceScaleFactor([self _intrinsicDeviceScaleFactor]);
+ _data->_page->setIntrinsicDeviceScaleFactor([self _wk_intrinsicDeviceScaleFactor]);
_data->_page->initializeWebPage();
#if ENABLE(FULLSCREEN_API)
_data->_page->fullScreenManager()->setWebView(self);
@@ -3035,7 +3027,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
_data->_mouseDownEvent = nil;
_data->_ignoringMouseDraggedEvents = NO;
- [self _registerDraggedTypes];
+ [self _wk_registerDraggedTypes];
if ([self _shouldUseTiledDrawingArea]) {
self.wantsLayer = YES;
@@ -3050,6 +3042,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
}
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
+
- (BOOL)wantsUpdateLayer
{
return [self _shouldUseTiledDrawingArea];
@@ -3062,6 +3055,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
if (DrawingAreaProxy* drawingArea = _data->_page->drawingArea())
drawingArea->waitForPossibleGeometryUpdate();
}
+
#endif
- (WKPageRef)pageRef
@@ -3116,7 +3110,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
return;
if (!(--_data->_frameSizeUpdatesDisabledCount))
- [self _setDrawingAreaSize:[self frame].size];
+ [self _wk_setDrawingAreaSize:[self frame].size];
}
- (BOOL)frameSizeUpdatesDisabled
@@ -3140,6 +3134,11 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
#endif
}
+- (BOOL)_shouldUseTiledDrawingArea
+{
+ return NO;
+}
+
@end
@implementation WKResponderChainSink
@@ -3197,3 +3196,21 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
}
@end
+
+@implementation WKToolTipDelegate
+
+- (id)initWithPage:(WebPageProxy *)page
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ _page = page;
+ return self;
+}
+
+- (NSString *)view:(NSView *)view stringForToolTip:(NSToolTipTag)tag point:(NSPoint)point userData:(void *)data
+{
+ return nsStringFromWebCoreString(_page->toolTip());
+}
+
+@end
diff --git a/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h b/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
index 2e99e7976..f2b681649 100644
--- a/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
+++ b/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2011, 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
@@ -50,58 +50,59 @@ namespace WebKit {
@class WKFullScreenWindowController;
@interface WKView (Internal)
-- (PassOwnPtr<WebKit::DrawingAreaProxy>)_createDrawingAreaProxy;
-- (BOOL)_isFocused;
-- (void)_processDidCrash;
-- (void)_pageClosed;
-- (void)_didRelaunchProcess;
-- (void)_toolTipChangedFrom:(NSString *)oldToolTip to:(NSString *)newToolTip;
-- (void)_setCursor:(NSCursor *)cursor;
-- (void)_setUserInterfaceItemState:(NSString *)commandName enabled:(BOOL)isEnabled state:(int)newState;
-- (BOOL)_interpretKeyEvent:(NSEvent *)theEvent savingCommandsTo:(Vector<WebCore::KeypressCommand>&)commands;
-- (void)_doneWithKeyEvent:(NSEvent *)event eventWasHandled:(BOOL)eventWasHandled;
-- (bool)_executeSavedCommandBySelector:(SEL)selector;
-- (NSRect)_convertToDeviceSpace:(NSRect)rect;
-- (NSRect)_convertToUserSpace:(NSRect)rect;
-- (void)_setFindIndicator:(PassRefPtr<WebKit::FindIndicator>)findIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate;
-
-- (void)_enterAcceleratedCompositingMode:(const WebKit::LayerTreeContext&)layerTreeContext;
-- (void)_exitAcceleratedCompositingMode;
-- (void)_updateAcceleratedCompositingMode:(const WebKit::LayerTreeContext&)layerTreeContext;
-
-- (void)_setAccessibilityWebProcessToken:(NSData *)data;
-
-- (void)_pluginFocusOrWindowFocusChanged:(BOOL)pluginHasFocusAndWindowHasFocus pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier;
-- (void)_setPluginComplexTextInputState:(WebKit::PluginComplexTextInputState)pluginComplexTextInputState pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier;
-
-- (void)_setPageHasCustomRepresentation:(BOOL)pageHasCustomRepresentation;
-- (void)_didFinishLoadingDataForCustomRepresentationWithSuggestedFilename:(const String&)suggestedFilename dataReference:(const CoreIPC::DataReference&)dataReference;
-- (double)_customRepresentationZoomFactor;
-- (void)_setCustomRepresentationZoomFactor:(double)zoomFactor;
-- (void)_findStringInCustomRepresentation:(NSString *)string withFindOptions:(WebKit::FindOptions)options maxMatchCount:(NSUInteger)count;
-- (void)_countStringMatchesInCustomRepresentation:(NSString *)string withFindOptions:(WebKit::FindOptions)options maxMatchCount:(NSUInteger)count;
-- (void)_setDragImage:(NSImage *)image at:(NSPoint)clientPoint linkDrag:(BOOL)linkDrag;
-- (void)_setPromisedData:(WebCore::Image *)image withFileName:(NSString *)filename withExtension:(NSString *)extension withTitle:(NSString *)title withURL:(NSString *)url withVisibleURL:(NSString *)visibleUrl withArchive:(WebCore::SharedBuffer*) archiveBuffer forPasteboard:(NSString *)pasteboardName;
-- (void)_updateSecureInputState;
-- (void)_updateTextInputStateIncludingSecureInputState:(BOOL)updateSecureInputState;
-- (void)_resetTextInputState;
-
-- (void)_didChangeScrollbarsForMainFrame;
-
-- (WebKit::ColorSpaceData)_colorSpace;
+
+- (PassOwnPtr<WebKit::DrawingAreaProxy>)_wk_createDrawingAreaProxy;
+- (BOOL)_wk_isFocused;
+- (void)_wk_processDidCrash;
+- (void)_wk_pageClosed;
+- (void)_wk_didRelaunchProcess;
+- (void)_wk_toolTipChangedFrom:(NSString *)oldToolTip to:(NSString *)newToolTip;
+- (void)_wk_setCursor:(NSCursor *)cursor;
+- (void)_wk_setUserInterfaceItemState:(NSString *)commandName enabled:(BOOL)isEnabled state:(int)newState;
+- (BOOL)_wk_interpretKeyEvent:(NSEvent *)theEvent savingCommandsTo:(Vector<WebCore::KeypressCommand>&)commands;
+- (void)_wk_doneWithKeyEvent:(NSEvent *)event eventWasHandled:(BOOL)eventWasHandled;
+- (bool)_wk_executeSavedCommandBySelector:(SEL)selector;
+- (NSRect)_wk_convertToDeviceSpace:(NSRect)rect;
+- (NSRect)_wk_convertToUserSpace:(NSRect)rect;
+- (void)_wk_setFindIndicator:(PassRefPtr<WebKit::FindIndicator>)findIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate;
+
+- (void)_wk_enterAcceleratedCompositingMode:(const WebKit::LayerTreeContext&)layerTreeContext;
+- (void)_wk_exitAcceleratedCompositingMode;
+- (void)_wk_updateAcceleratedCompositingMode:(const WebKit::LayerTreeContext&)layerTreeContext;
+
+- (void)_wk_setAccessibilityWebProcessToken:(NSData *)data;
+
+- (void)_wk_pluginFocusOrWindowFocusChanged:(BOOL)pluginHasFocusAndWindowHasFocus pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier;
+- (void)_wk_setPluginComplexTextInputState:(WebKit::PluginComplexTextInputState)pluginComplexTextInputState pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier;
+
+- (void)_wk_setPageHasCustomRepresentation:(BOOL)pageHasCustomRepresentation;
+- (void)_wk_didFinishLoadingDataForCustomRepresentationWithSuggestedFilename:(const String&)suggestedFilename dataReference:(const CoreIPC::DataReference&)dataReference;
+- (double)_wk_customRepresentationZoomFactor;
+- (void)_wk_setCustomRepresentationZoomFactor:(double)zoomFactor;
+- (void)_wk_findStringInCustomRepresentation:(NSString *)string withFindOptions:(WebKit::FindOptions)options maxMatchCount:(NSUInteger)count;
+- (void)_wk_countStringMatchesInCustomRepresentation:(NSString *)string withFindOptions:(WebKit::FindOptions)options maxMatchCount:(NSUInteger)count;
+- (void)_wk_setDragImage:(NSImage *)image at:(NSPoint)clientPoint linkDrag:(BOOL)linkDrag;
+- (void)_wk_setPromisedData:(WebCore::Image *)image withFileName:(NSString *)filename withExtension:(NSString *)extension withTitle:(NSString *)title withURL:(NSString *)url withVisibleURL:(NSString *)visibleUrl withArchive:(WebCore::SharedBuffer*) archiveBuffer forPasteboard:(NSString *)pasteboardName;
+- (void)_wk_updateSecureInputState;
+- (void)_wk_updateTextInputStateIncludingSecureInputState:(BOOL)updateSecureInputState;
+- (void)_wk_resetTextInputState;
+
+- (void)_wk_didChangeScrollbarsForMainFrame;
+
+- (WebKit::ColorSpaceData)_wk_colorSpace;
#if ENABLE(FULLSCREEN_API)
-- (BOOL)hasFullScreenWindowController;
-- (WKFullScreenWindowController*)fullScreenWindowController;
-- (void)closeFullScreenWindowController;
+- (BOOL)_wk_hasFullScreenWindowController;
+- (WKFullScreenWindowController*)_wk_fullScreenWindowController;
+- (void)_wk_closeFullScreenWindowController;
#endif
-- (void)_cacheWindowBottomCornerRect;
+- (void)_wk_cacheWindowBottomCornerRect;
-- (NSInteger)spellCheckerDocumentTag;
-- (void)handleAcceptedAlternativeText:(NSString*)text;
+- (NSInteger)_wk_spellCheckerDocumentTag;
+- (void)_wk_handleAcceptedAlternativeText:(NSString*)text;
-- (void)_setSuppressVisibilityUpdates:(BOOL)suppressVisibilityUpdates;
-- (BOOL)_suppressVisibilityUpdates;
+- (void)_wk_setSuppressVisibilityUpdates:(BOOL)suppressVisibilityUpdates;
+- (BOOL)_wk_suppressVisibilityUpdates;
@end
diff --git a/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h b/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h
index 51578764f..035b1ea2c 100644
--- a/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h
+++ b/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 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
@@ -50,4 +50,8 @@
- (void)performDictionaryLookupAtCurrentMouseLocation;
+ (void)hideWordDefinitionWindow;
+// FIXME: This method currently overridden by Safari to turn tiled drawing area on.
+// We should come up with a cleaner SPI or API for this.
+- (BOOL)_shouldUseTiledDrawingArea;
+
@end
diff --git a/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp b/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp
index 77fdc0a26..a569b9e78 100644
--- a/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp
+++ b/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp
@@ -104,7 +104,7 @@ static bool shouldShowTileDebugVisuals()
return false;
}
-void CoordinatedBackingStore::paintToTextureMapper(TextureMapper* textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity, BitmapTexture* mask)
+void CoordinatedBackingStore::paintToTextureMapper(TextureMapper* textureMapper, const FloatRect& /* targetRect */, const TransformationMatrix& transform, float opacity, BitmapTexture* mask)
{
Vector<TextureMapperTile*> tilesToPaint;
diff --git a/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp b/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp
index f053a57a6..e84f3236e 100644
--- a/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp
+++ b/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp
@@ -95,7 +95,7 @@ LayerTreeRenderer::~LayerTreeRenderer()
{
}
-PassOwnPtr<GraphicsLayer> LayerTreeRenderer::createLayer(WebLayerID layerID)
+PassOwnPtr<GraphicsLayer> LayerTreeRenderer::createLayer(WebLayerID)
{
GraphicsLayer* newLayer = new GraphicsLayerTextureMapper(this);
TextureMapperLayer* layer = toTextureMapperLayer(newLayer);
diff --git a/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp b/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp
index 79e610e96..2d26f4818 100644
--- a/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp
+++ b/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp
@@ -69,7 +69,7 @@ WebCore::IntRect DrawingAreaProxy::contentsRect() const
return IntRect(IntPoint::zero(), m_webPageProxy->viewSize());
}
-void DrawingAreaProxy::didReceiveLayerTreeCoordinatorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
+void DrawingAreaProxy::didReceiveLayerTreeCoordinatorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*)
{
}
#endif
diff --git a/Source/WebKit2/UIProcess/DrawingAreaProxy.h b/Source/WebKit2/UIProcess/DrawingAreaProxy.h
index 437a2cfb7..a3891badc 100644
--- a/Source/WebKit2/UIProcess/DrawingAreaProxy.h
+++ b/Source/WebKit2/UIProcess/DrawingAreaProxy.h
@@ -96,10 +96,10 @@ public:
virtual WebCore::IntRect contentsRect() const;
virtual bool isBackingStoreReady() const { return true; }
LayerTreeCoordinatorProxy* layerTreeCoordinatorProxy() const { return m_layerTreeCoordinatorProxy.get(); }
- virtual void setVisibleContentsRect(const WebCore::FloatRect& visibleContentsRect, float scale, const WebCore::FloatPoint& trajectoryVector) { }
- virtual void createTileForLayer(int layerID, int tileID, const WebKit::UpdateInfo&) { }
- virtual void updateTileForLayer(int layerID, int tileID, const WebKit::UpdateInfo&) { }
- virtual void removeTileForLayer(int layerID, int tileID) { }
+ virtual void setVisibleContentsRect(const WebCore::FloatRect& /* visibleContentsRect */, float /* scale */, const WebCore::FloatPoint& /* trajectoryVector */) { }
+ virtual void createTileForLayer(int /* layerID */, int /* tileID */, const WebKit::UpdateInfo&) { }
+ virtual void updateTileForLayer(int /* layerID */, int /* tileID */, const WebKit::UpdateInfo&) { }
+ virtual void removeTileForLayer(int /* layerID */, int /* tileID */) { }
virtual void didReceiveLayerTreeCoordinatorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
WebPageProxy* page() { return m_webPageProxy; }
@@ -122,12 +122,12 @@ private:
// CoreIPC message handlers.
// FIXME: These should be pure virtual.
- virtual void update(uint64_t /*backingStoreStateID*/, const UpdateInfo&) { }
- virtual void didUpdateBackingStoreState(uint64_t /*backingStoreStateID*/, const UpdateInfo&, const LayerTreeContext&) { }
+ virtual void update(uint64_t /* backingStoreStateID */, const UpdateInfo&) { }
+ virtual void didUpdateBackingStoreState(uint64_t /* backingStoreStateID */, const UpdateInfo&, const LayerTreeContext&) { }
#if USE(ACCELERATED_COMPOSITING)
- virtual void enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&) { }
- virtual void exitAcceleratedCompositingMode(uint64_t backingStoreStateID, const UpdateInfo&) { }
- virtual void updateAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&) { }
+ virtual void enterAcceleratedCompositingMode(uint64_t /* backingStoreStateID */, const LayerTreeContext&) { }
+ virtual void exitAcceleratedCompositingMode(uint64_t /* backingStoreStateID */, const UpdateInfo&) { }
+ virtual void updateAcceleratedCompositingMode(uint64_t /* backingStoreStateID */, const LayerTreeContext&) { }
#endif
#if PLATFORM(MAC)
virtual void didUpdateGeometry() { }
diff --git a/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp b/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp
index 7796cfe97..10f58b9bb 100644
--- a/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp
+++ b/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp
@@ -67,13 +67,8 @@ PluginProcessProxy::PluginProcessProxy(PluginProcessManager* PluginProcessManage
{
ProcessLauncher::LaunchOptions launchOptions;
launchOptions.processType = ProcessLauncher::PluginProcess;
-#if PLATFORM(MAC)
- launchOptions.architecture = pluginInfo.pluginArchitecture;
- launchOptions.executableHeap = PluginProcessProxy::pluginNeedsExecutableHeap(pluginInfo);
-#if HAVE(XPC)
- launchOptions.useXPC = false;
-#endif
-#endif
+
+ platformInitializeLaunchOptions(launchOptions, pluginInfo);
m_processLauncher = ProcessLauncher::create(this, launchOptions);
}
diff --git a/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h b/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h
index 4b50e6b80..132bb74bf 100644
--- a/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h
+++ b/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h
@@ -127,6 +127,7 @@ private:
void applicationDidBecomeActive();
#endif
+ static void platformInitializeLaunchOptions(ProcessLauncher::LaunchOptions&, const PluginModuleInfo& pluginInfo);
void platformInitializePluginProcess(PluginProcessCreationParameters& parameters);
// The plug-in host process manager.
diff --git a/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm b/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm
index 2150c06f2..207eca2c9 100644
--- a/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm
+++ b/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm
@@ -118,6 +118,15 @@ bool PluginProcessProxy::createPropertyListFile(const PluginModuleInfo& plugin)
return true;
}
+void PluginProcessProxy::platformInitializeLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions, const PluginModuleInfo& pluginInfo)
+{
+ launchOptions.architecture = pluginInfo.pluginArchitecture;
+ launchOptions.executableHeap = PluginProcessProxy::pluginNeedsExecutableHeap(pluginInfo);
+#if HAVE(XPC)
+ launchOptions.useXPC = false;
+#endif
+}
+
void PluginProcessProxy::platformInitializePluginProcess(PluginProcessCreationParameters& parameters)
{
// For know only Flash is known to behave with asynchronous plug-in initialization.
diff --git a/Source/WebKit2/UIProcess/Plugins/qt/PluginProcessProxyQt.cpp b/Source/WebKit2/UIProcess/Plugins/qt/PluginProcessProxyQt.cpp
index b0a5b230d..679c6331d 100644
--- a/Source/WebKit2/UIProcess/Plugins/qt/PluginProcessProxyQt.cpp
+++ b/Source/WebKit2/UIProcess/Plugins/qt/PluginProcessProxyQt.cpp
@@ -51,6 +51,10 @@ namespace WebKit {
class PluginProcessCreationParameters;
+void PluginProcessProxy::platformInitializeLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions, const PluginModuleInfo& pluginInfo)
+{
+}
+
void PluginProcessProxy::platformInitializePluginProcess(PluginProcessCreationParameters&)
{
}
diff --git a/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp b/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
index 3febb069a..c7a8922e1 100644
--- a/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
+++ b/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
@@ -43,6 +43,10 @@ using namespace WebCore;
namespace WebKit {
+void PluginProcessProxy::platformInitializeLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions, const PluginModuleInfo& pluginInfo)
+{
+}
+
void PluginProcessProxy::platformInitializePluginProcess(PluginProcessCreationParameters&)
{
}
diff --git a/Source/WebKit2/UIProcess/WebContext.cpp b/Source/WebKit2/UIProcess/WebContext.cpp
index 040416283..81e7bc477 100644
--- a/Source/WebKit2/UIProcess/WebContext.cpp
+++ b/Source/WebKit2/UIProcess/WebContext.cpp
@@ -406,7 +406,7 @@ PassRefPtr<WebProcessProxy> WebContext::createNewWebProcess()
for (size_t i = 0; i != m_messagesToInjectedBundlePostedToEmptyContext.size(); ++i) {
pair<String, RefPtr<APIObject> >& message = m_messagesToInjectedBundlePostedToEmptyContext[i];
- OwnPtr<CoreIPC::ArgumentEncoder> messageData = CoreIPC::ArgumentEncoder::create(0);
+ OwnPtr<CoreIPC::ArgumentEncoder> messageData = CoreIPC::ArgumentEncoder::create();
messageData->encode(message.first);
messageData->encode(WebContextUserMessageEncoder(message.second.get()));
@@ -630,7 +630,7 @@ void WebContext::postMessageToInjectedBundle(const String& messageName, APIObjec
// FIXME: Return early if the message body contains any references to WKPageRefs/WKFrameRefs etc. since they're local to a process.
- OwnPtr<CoreIPC::ArgumentEncoder> messageData = CoreIPC::ArgumentEncoder::create(0);
+ OwnPtr<CoreIPC::ArgumentEncoder> messageData = CoreIPC::ArgumentEncoder::create();
messageData->encode(messageName);
messageData->encode(WebContextUserMessageEncoder(messageBody));
diff --git a/Source/WebKit2/UIProcess/WebProcessProxy.cpp b/Source/WebKit2/UIProcess/WebProcessProxy.cpp
index e8929f9e9..b88323830 100644
--- a/Source/WebKit2/UIProcess/WebProcessProxy.cpp
+++ b/Source/WebKit2/UIProcess/WebProcessProxy.cpp
@@ -146,12 +146,12 @@ void WebProcessProxy::disconnect()
m_context->disconnectProcess(this);
}
-bool WebProcessProxy::sendMessage(CoreIPC::MessageID messageID, PassOwnPtr<CoreIPC::ArgumentEncoder> arguments, unsigned messageSendFlags)
+bool WebProcessProxy::sendMessage(CoreIPC::MessageID messageID, PassOwnPtr<CoreIPC::MessageEncoder> encoder, unsigned messageSendFlags)
{
// If we're waiting for the web process to launch, we need to stash away the messages so we can send them once we have
// a CoreIPC connection.
if (isLaunching()) {
- m_pendingMessages.append(make_pair(CoreIPC::Connection::OutgoingMessage(messageID, arguments), messageSendFlags));
+ m_pendingMessages.append(make_pair(CoreIPC::Connection::OutgoingMessage(messageID, encoder), messageSendFlags));
return true;
}
@@ -159,7 +159,7 @@ bool WebProcessProxy::sendMessage(CoreIPC::MessageID messageID, PassOwnPtr<CoreI
if (!m_connection)
return false;
- return connection()->sendMessage(messageID, arguments, messageSendFlags);
+ return connection()->sendMessage(messageID, encoder, messageSendFlags);
}
bool WebProcessProxy::isLaunching() const
diff --git a/Source/WebKit2/UIProcess/WebProcessProxy.h b/Source/WebKit2/UIProcess/WebProcessProxy.h
index 57486c7da..7524df2ff 100644
--- a/Source/WebKit2/UIProcess/WebProcessProxy.h
+++ b/Source/WebKit2/UIProcess/WebProcessProxy.h
@@ -132,7 +132,7 @@ private:
// Will potentially cause the WebProcessProxy object to be freed.
void disconnect();
- bool sendMessage(CoreIPC::MessageID, PassOwnPtr<CoreIPC::ArgumentEncoder>, unsigned messageSendFlags);
+ bool sendMessage(CoreIPC::MessageID, PassOwnPtr<CoreIPC::MessageEncoder>, unsigned messageSendFlags);
// CoreIPC message handlers.
void addBackForwardItem(uint64_t itemID, const String& originalURLString, const String& urlString, const String& title, const CoreIPC::DataReference& backForwardData);
@@ -216,19 +216,19 @@ private:
template<typename E, typename T>
bool WebProcessProxy::deprecatedSend(E messageID, uint64_t destinationID, const T& arguments)
{
- OwnPtr<CoreIPC::ArgumentEncoder> argumentEncoder = CoreIPC::ArgumentEncoder::create(destinationID);
- argumentEncoder->encode(arguments);
+ OwnPtr<CoreIPC::MessageEncoder> encoder = CoreIPC::MessageEncoder::create("", "", destinationID);
+ encoder->encode(arguments);
- return sendMessage(CoreIPC::MessageID(messageID), argumentEncoder.release(), 0);
+ return sendMessage(CoreIPC::MessageID(messageID), encoder.release(), 0);
}
template<typename T>
bool WebProcessProxy::send(const T& message, uint64_t destinationID, unsigned messageSendFlags)
{
- OwnPtr<CoreIPC::ArgumentEncoder> argumentEncoder = CoreIPC::ArgumentEncoder::create(destinationID);
- argumentEncoder->encode(message);
+ OwnPtr<CoreIPC::MessageEncoder> encoder = CoreIPC::MessageEncoder::create("", "", destinationID);
+ encoder->encode(message);
- return sendMessage(CoreIPC::MessageID(T::messageID), argumentEncoder.release(), messageSendFlags);
+ return sendMessage(CoreIPC::MessageID(T::messageID), encoder.release(), messageSendFlags);
}
template<typename U>
diff --git a/Source/WebKit2/UIProcess/mac/CorrectionPanel.mm b/Source/WebKit2/UIProcess/mac/CorrectionPanel.mm
index 33f3fe982..79053ed70 100644
--- a/Source/WebKit2/UIProcess/mac/CorrectionPanel.mm
+++ b/Source/WebKit2/UIProcess/mac/CorrectionPanel.mm
@@ -109,7 +109,7 @@ String CorrectionPanel::dismissInternal(ReasonForDismissingAlternativeText reaso
void CorrectionPanel::recordAutocorrectionResponse(WKView* view, NSCorrectionResponse response, const String& replacedString, const String& replacementString)
{
- [[NSSpellChecker sharedSpellChecker] recordResponse:response toCorrection:replacementString forWord:replacedString language:nil inSpellDocumentWithTag:[view spellCheckerDocumentTag]];
+ [[NSSpellChecker sharedSpellChecker] recordResponse:response toCorrection:replacementString forWord:replacedString language:nil inSpellDocumentWithTag:[view _wk_spellCheckerDocumentTag]];
}
void CorrectionPanel::handleAcceptedReplacement(NSString* acceptedReplacement, NSString* replaced, NSString* proposedReplacement, NSCorrectionIndicatorType correctionIndicatorType)
@@ -118,7 +118,7 @@ void CorrectionPanel::handleAcceptedReplacement(NSString* acceptedReplacement, N
return;
NSSpellChecker* spellChecker = [NSSpellChecker sharedSpellChecker];
- NSInteger documentTag = [m_view.get() spellCheckerDocumentTag];
+ NSInteger documentTag = [m_view.get() _wk_spellCheckerDocumentTag];
switch (correctionIndicatorType) {
case NSCorrectionIndicatorTypeDefault:
@@ -141,7 +141,7 @@ void CorrectionPanel::handleAcceptedReplacement(NSString* acceptedReplacement, N
break;
}
- [m_view.get() handleAcceptedAlternativeText:acceptedReplacement];
+ [m_view.get() _wk_handleAcceptedAlternativeText:acceptedReplacement];
m_view.clear();
if (acceptedReplacement)
m_resultForDismissal.adoptNS([acceptedReplacement copy]);
diff --git a/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm b/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm
index 238a67516..eb82134ef 100644
--- a/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm
+++ b/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm
@@ -242,7 +242,7 @@ static RetainPtr<CGImageRef> createImageWithCopiedData(CGImageRef sourceImage)
// unnecessary in the full-screen animation case, and can cause bugs; see
// https://bugs.webkit.org/show_bug.cgi?id=88940 and https://bugs.webkit.org/show_bug.cgi?id=88374
// We will resume the normal behavior in _startEnterFullScreenAnimationWithDuration:
- [_webView _setSuppressVisibilityUpdates:YES];
+ [_webView _wk_setSuppressVisibilityUpdates:YES];
// Swap the webView placeholder into place.
if (!_webViewPlaceholder) {
@@ -334,7 +334,7 @@ static RetainPtr<CGImageRef> createImageWithCopiedData(CGImageRef sourceImage)
// See the related comment in enterFullScreen:
// We will resume the normal behavior in _startExitFullScreenAnimationWithDuration:
- [_webView _setSuppressVisibilityUpdates:YES];
+ [_webView _wk_setSuppressVisibilityUpdates:YES];
[self _manager]->setAnimatingFullScreen(true);
[self _manager]->willExitFullScreen();
@@ -581,7 +581,7 @@ static NSRect windowFrameFromApparentFrames(NSRect screenFrame, NSRect initialFr
[_backgroundWindow.get() orderWindow:NSWindowBelow relativeTo:[[self window] windowNumber]];
- [_webView _setSuppressVisibilityUpdates:NO];
+ [_webView _wk_setSuppressVisibilityUpdates:NO];
[[self window] setAutodisplay:YES];
[[self window] displayIfNeeded];
NSEnableScreenUpdates();
@@ -626,7 +626,7 @@ static NSRect windowFrameFromApparentFrames(NSRect screenFrame, NSRect initialFr
finalBounds.origin = [[self window] convertScreenToBase:finalBounds.origin];
WKWindowSetClipRect([self window], finalBounds);
- [_webView _setSuppressVisibilityUpdates:NO];
+ [_webView _wk_setSuppressVisibilityUpdates:NO];
[[self window] setAutodisplay:YES];
[[self window] displayIfNeeded];
NSEnableScreenUpdates();
diff --git a/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm b/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm
index b8427d56f..581a74d03 100644
--- a/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm
+++ b/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm
@@ -42,7 +42,7 @@ void WebFullScreenManagerProxy::invalidate()
if (!m_webView)
return;
- [m_webView closeFullScreenWindowController];
+ [m_webView _wk_closeFullScreenWindowController];
m_webView = 0;
}
@@ -50,43 +50,43 @@ void WebFullScreenManagerProxy::close()
{
if (!m_webView)
return;
- [[m_webView fullScreenWindowController] close];
+ [[m_webView _wk_fullScreenWindowController] close];
}
bool WebFullScreenManagerProxy::isFullScreen()
{
if (!m_webView)
return false;
- if (![m_webView hasFullScreenWindowController])
+ if (![m_webView _wk_hasFullScreenWindowController])
return false;
- return [[m_webView fullScreenWindowController] isFullScreen];
+ return [[m_webView _wk_fullScreenWindowController] isFullScreen];
}
void WebFullScreenManagerProxy::enterFullScreen()
{
if (!m_webView)
return;
- [[m_webView fullScreenWindowController] enterFullScreen:nil];
+ [[m_webView _wk_fullScreenWindowController] enterFullScreen:nil];
}
void WebFullScreenManagerProxy::exitFullScreen()
{
if (!m_webView)
return;
- [[m_webView fullScreenWindowController] exitFullScreen];
+ [[m_webView _wk_fullScreenWindowController] exitFullScreen];
}
void WebFullScreenManagerProxy::beganEnterFullScreen(const IntRect& initialFrame, const IntRect& finalFrame)
{
if (m_webView)
- [[m_webView fullScreenWindowController] beganEnterFullScreenWithInitialFrame:initialFrame finalFrame:finalFrame];
+ [[m_webView _wk_fullScreenWindowController] beganEnterFullScreenWithInitialFrame:initialFrame finalFrame:finalFrame];
}
void WebFullScreenManagerProxy::beganExitFullScreen(const IntRect& initialFrame, const IntRect& finalFrame)
{
if (m_webView)
- [[m_webView fullScreenWindowController] beganExitFullScreenWithInitialFrame:initialFrame finalFrame:finalFrame];
+ [[m_webView _wk_fullScreenWindowController] beganExitFullScreenWithInitialFrame:initialFrame finalFrame:finalFrame];
}
} // namespace WebKit
diff --git a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj b/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
index f2dae3556..f2d3b4d77 100644
--- a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -81,6 +81,10 @@
1A2161B111F37664008AD0F5 /* NPRuntimeObjectMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2161AF11F37664008AD0F5 /* NPRuntimeObjectMap.cpp */; };
1A2162B011F38971008AD0F5 /* NPRuntimeUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2162AE11F38971008AD0F5 /* NPRuntimeUtilities.cpp */; };
1A2162B111F38971008AD0F5 /* NPRuntimeUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2162AF11F38971008AD0F5 /* NPRuntimeUtilities.h */; };
+ 1A2328FE162C866A00D82F7A /* MessageEncoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2328FC162C866A00D82F7A /* MessageEncoder.cpp */; };
+ 1A2328FF162C866A00D82F7A /* MessageEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2328FD162C866A00D82F7A /* MessageEncoder.h */; };
+ 1A232902162C867300D82F7A /* MessageDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A232900162C867300D82F7A /* MessageDecoder.cpp */; };
+ 1A232903162C867300D82F7A /* MessageDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A232901162C867300D82F7A /* MessageDecoder.h */; };
1A24B5F211F531E800C38269 /* MachUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A24B5F011F531E800C38269 /* MachUtilities.cpp */; };
1A24B5F311F531E800C38269 /* MachUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A24B5F111F531E800C38269 /* MachUtilities.h */; };
1A24BED5120894D100FBB059 /* SharedMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A24BED3120894D100FBB059 /* SharedMemory.h */; };
@@ -1207,6 +1211,10 @@
1A2162AF11F38971008AD0F5 /* NPRuntimeUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NPRuntimeUtilities.h; sourceTree = "<group>"; };
1A22F0FF1289FCD90085E74F /* WKBundlePageOverlay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundlePageOverlay.h; sourceTree = "<group>"; };
1A22F1001289FCD90085E74F /* WKBundlePageOverlay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKBundlePageOverlay.cpp; sourceTree = "<group>"; };
+ 1A2328FC162C866A00D82F7A /* MessageEncoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MessageEncoder.cpp; sourceTree = "<group>"; };
+ 1A2328FD162C866A00D82F7A /* MessageEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageEncoder.h; sourceTree = "<group>"; };
+ 1A232900162C867300D82F7A /* MessageDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MessageDecoder.cpp; sourceTree = "<group>"; };
+ 1A232901162C867300D82F7A /* MessageDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageDecoder.h; sourceTree = "<group>"; };
1A24B5F011F531E800C38269 /* MachUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachUtilities.cpp; sourceTree = "<group>"; };
1A24B5F111F531E800C38269 /* MachUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachUtilities.h; sourceTree = "<group>"; };
1A24BED3120894D100FBB059 /* SharedMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SharedMemory.h; sourceTree = "<group>"; };
@@ -2718,8 +2726,6 @@
C0337DD0127A2980008FF4F4 /* WebWheelEvent.cpp */,
E1EDFDAD1628893B0039ECDA /* SharedWorkerProcessCreationParameters.h */,
E1EDFDAF162889810039ECDA /* SharedWorkerProcessCreationParameters.cpp */,
- 29121705161CE7360057D451 /* UserContentContainer.cpp */,
- 29121706161CE7360057D451 /* UserContentContainer.h */,
);
path = Shared;
sourceTree = "<group>";
@@ -2782,6 +2788,10 @@
1A8EFDFD1253CB6E00F7067F /* DataReference.cpp */,
1A8EFDF91253CAA200F7067F /* DataReference.h */,
C0CE72AC1247E78D00BC0EC4 /* HandleMessage.h */,
+ 1A232900162C867300D82F7A /* MessageDecoder.cpp */,
+ 1A232901162C867300D82F7A /* MessageDecoder.h */,
+ 1A2328FC162C866A00D82F7A /* MessageEncoder.cpp */,
+ 1A2328FD162C866A00D82F7A /* MessageEncoder.h */,
BC032DA410F437D10058C15A /* MessageID.h */,
1A3EED11161A53D600AEB4F5 /* MessageReceiver.h */,
1A3EED0C161A535300AEB4F5 /* MessageReceiverMap.cpp */,
@@ -4679,6 +4689,8 @@
5163199516289A6300E22F00 /* NetworkProcessMessages.h in Headers */,
E1EDFE131628CFBD0039ECDA /* SharedWorkerProcessManager.h in Headers */,
29501724162A4504004A9D71 /* WKWebProcessPlugInBrowserContextControllerPrivate.h in Headers */,
+ 1A2328FF162C866A00D82F7A /* MessageEncoder.h in Headers */,
+ 1A232903162C867300D82F7A /* MessageDecoder.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -5622,6 +5634,8 @@
5163199416289A6000E22F00 /* NetworkProcessMessageReceiver.cpp in Sources */,
E1EDFE121628CFB20039ECDA /* SharedWorkerProcessManager.cpp in Sources */,
E1EDFE151628DD7A0039ECDA /* SharedWorkerProcessProxy.cpp in Sources */,
+ 1A2328FE162C866A00D82F7A /* MessageEncoder.cpp in Sources */,
+ 1A232902162C867300D82F7A /* MessageDecoder.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.h b/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.h
index c0e03937c..40a8f9c90 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.h
+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.h
@@ -35,6 +35,7 @@ WK_EXPORT
- (void)insertNode:(WKDOMNode *)node before:(WKDOMNode *)refNode;
- (void)appendChild:(WKDOMNode *)node;
+- (void)removeChild:(WKDOMNode *)node;
@property(readonly) WKDOMDocument *document;
@property(readonly) WKDOMNode *parentNode;
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.mm b/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.mm
index 4308ff3ab..a3296bfc0 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.mm
+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.mm
@@ -65,6 +65,13 @@
_impl->appendChild(WebKit::toWebCoreNode(node), ec);
}
+- (void)removeChild:(WKDOMNode *)node
+{
+ // FIXME: Do something about the exception.
+ WebCore::ExceptionCode ec;
+ _impl->removeChild(WebKit::toWebCoreNode(node), ec);
+}
+
- (WKDOMDocument *)document
{
return WebKit::toWKDOMDocument(_impl->document());
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMText.h b/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMText.h
index eb8552e3f..7a97b5e2f 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMText.h
+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMText.h
@@ -30,7 +30,7 @@
WK_EXPORT
@interface WKDOMText : WKDOMNode
-@property(readonly) NSString *data;
+@property(nonatomic, copy) NSString *data;
@end
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMText.mm b/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMText.mm
index 4f4f627ab..9bcd7b4c4 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMText.mm
+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMText.mm
@@ -38,6 +38,13 @@
return WebCore::toText(_impl.get())->data();
}
+- (void)setData:(NSString *)data
+{
+ // FIXME: Do something about the exception.
+ WebCore::ExceptionCode ec;
+ WebCore::toText(_impl.get())->setData(data, ec);
+}
+
@end
#endif // defined(__LP64__) && defined(__clang__)
diff --git a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp
index 9798f3f05..79c8eec5c 100644
--- a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp
@@ -621,7 +621,7 @@ void CoordinatedGraphicsLayer::tiledBackingStorePaint(GraphicsContext* context,
paintGraphicsLayerContents(*context, rect);
}
-void CoordinatedGraphicsLayer::tiledBackingStorePaintEnd(const Vector<IntRect>& updatedRects)
+void CoordinatedGraphicsLayer::tiledBackingStorePaintEnd(const Vector<IntRect>& /* updatedRects */)
{
}
diff --git a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.cpp b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.cpp
index 4a6244e2d..668ca5d9e 100644
--- a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.cpp
@@ -106,7 +106,7 @@ bool CoordinatedTile::isReadyToPaint() const
return !!m_ID;
}
-void CoordinatedTile::paint(GraphicsContext* context, const IntRect& rect)
+void CoordinatedTile::paint(GraphicsContext*, const IntRect&)
{
ASSERT_NOT_REACHED();
}
diff --git a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp
index 416cf00e0..a19715e7e 100644
--- a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp
@@ -171,7 +171,7 @@ void LayerTreeCoordinator::setNonCompositedContentsNeedDisplay(const WebCore::In
scheduleLayerFlush();
}
-void LayerTreeCoordinator::scrollNonCompositedContents(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset)
+void LayerTreeCoordinator::scrollNonCompositedContents(const WebCore::IntRect& scrollRect, const WebCore::IntSize& /* scrollOffset */)
{
setNonCompositedContentsNeedDisplay(scrollRect);
}
@@ -512,7 +512,7 @@ void LayerTreeCoordinator::releaseImageBackingStore(int64_t key)
}
-void LayerTreeCoordinator::notifyAnimationStarted(const WebCore::GraphicsLayer*, double time)
+void LayerTreeCoordinator::notifyAnimationStarted(const WebCore::GraphicsLayer*, double /* time */)
{
}
diff --git a/Source/WebKit2/WebProcess/WebPage/DecoderAdapter.cpp b/Source/WebKit2/WebProcess/WebPage/DecoderAdapter.cpp
index 763305cbe..63417720c 100644
--- a/Source/WebKit2/WebProcess/WebPage/DecoderAdapter.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/DecoderAdapter.cpp
@@ -33,14 +33,19 @@
namespace WebKit {
DecoderAdapter::DecoderAdapter(const uint8_t* buffer, size_t bufferSize)
- : m_decoder(buffer, bufferSize)
+ : m_decoder(CoreIPC::ArgumentDecoder::create(buffer, bufferSize))
{
+ // Keep format compatibility by decoding an unused uint64_t value
+ // that used to be encoded by the argument encoder.
+ uint64_t value;
+ m_decoder->decode(value);
+ ASSERT(!value);
}
bool DecoderAdapter::decodeBytes(Vector<uint8_t>& bytes)
{
CoreIPC::DataReference dataReference;
- if (!m_decoder.decodeVariableLengthByteArray(dataReference))
+ if (!m_decoder->decodeVariableLengthByteArray(dataReference))
return false;
bytes = dataReference.vector();
@@ -49,42 +54,42 @@ bool DecoderAdapter::decodeBytes(Vector<uint8_t>& bytes)
bool DecoderAdapter::decodeBool(bool& value)
{
- return m_decoder.decodeBool(value);
+ return m_decoder->decodeBool(value);
}
bool DecoderAdapter::decodeUInt16(uint16_t& value)
{
- return m_decoder.decodeUInt16(value);
+ return m_decoder->decodeUInt16(value);
}
bool DecoderAdapter::decodeUInt32(uint32_t& value)
{
- return m_decoder.decodeUInt32(value);
+ return m_decoder->decodeUInt32(value);
}
bool DecoderAdapter::decodeUInt64(uint64_t& value)
{
- return m_decoder.decodeUInt64(value);
+ return m_decoder->decodeUInt64(value);
}
bool DecoderAdapter::decodeInt32(int32_t& value)
{
- return m_decoder.decodeInt32(value);
+ return m_decoder->decodeInt32(value);
}
bool DecoderAdapter::decodeInt64(int64_t& value)
{
- return m_decoder.decodeInt64(value);
+ return m_decoder->decodeInt64(value);
}
bool DecoderAdapter::decodeFloat(float& value)
{
- return m_decoder.decodeFloat(value);
+ return m_decoder->decodeFloat(value);
}
bool DecoderAdapter::decodeDouble(double& value)
{
- return m_decoder.decodeDouble(value);
+ return m_decoder->decodeDouble(value);
}
bool DecoderAdapter::decodeString(String& value)
@@ -96,7 +101,7 @@ bool DecoderAdapter::decodeString(String& value)
// without breaking encoding/decoding of the history tree.
uint32_t length;
- if (!m_decoder.decode(length))
+ if (!m_decoder->decode(length))
return false;
if (length == std::numeric_limits<uint32_t>::max()) {
@@ -106,22 +111,22 @@ bool DecoderAdapter::decodeString(String& value)
}
uint64_t lengthInBytes;
- if (!m_decoder.decode(lengthInBytes))
+ if (!m_decoder->decode(lengthInBytes))
return false;
if (lengthInBytes % sizeof(UChar) || lengthInBytes / sizeof(UChar) != length) {
- m_decoder.markInvalid();
+ m_decoder->markInvalid();
return false;
}
- if (!m_decoder.bufferIsLargeEnoughToContain<UChar>(length)) {
- m_decoder.markInvalid();
+ if (!m_decoder->bufferIsLargeEnoughToContain<UChar>(length)) {
+ m_decoder->markInvalid();
return false;
}
UChar* buffer;
String string = String::createUninitialized(length, buffer);
- if (!m_decoder.decodeFixedLengthData(reinterpret_cast<uint8_t*>(buffer), length * sizeof(UChar), __alignof(UChar)))
+ if (!m_decoder->decodeFixedLengthData(reinterpret_cast<uint8_t*>(buffer), length * sizeof(UChar), __alignof(UChar)))
return false;
value = string;
diff --git a/Source/WebKit2/WebProcess/WebPage/DecoderAdapter.h b/Source/WebKit2/WebProcess/WebPage/DecoderAdapter.h
index d6b4eb766..671e1896f 100644
--- a/Source/WebKit2/WebProcess/WebPage/DecoderAdapter.h
+++ b/Source/WebKit2/WebProcess/WebPage/DecoderAdapter.h
@@ -48,7 +48,7 @@ private:
virtual bool decodeDouble(double&);
virtual bool decodeString(String&);
- CoreIPC::ArgumentDecoder m_decoder;
+ OwnPtr<CoreIPC::ArgumentDecoder> m_decoder;
};
} // namespace WebKit
diff --git a/Source/WebKit2/WebProcess/WebPage/EncoderAdapter.cpp b/Source/WebKit2/WebProcess/WebPage/EncoderAdapter.cpp
index bda7d9b72..54f9372d1 100644
--- a/Source/WebKit2/WebProcess/WebPage/EncoderAdapter.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/EncoderAdapter.cpp
@@ -33,8 +33,11 @@
namespace WebKit {
EncoderAdapter::EncoderAdapter()
- : m_encoder(CoreIPC::ArgumentEncoder::create(0))
+ : m_encoder(CoreIPC::ArgumentEncoder::create())
{
+ // Keep format compatibility by decoding an unused uint64_t value
+ // that used to be encoded by the argument encoder.
+ m_encoder->encode(static_cast<uint64_t>(0));
}
CoreIPC::DataReference EncoderAdapter::dataReference() const
diff --git a/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h b/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h
index 0e686b66f..95dc8e9ca 100644
--- a/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h
+++ b/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h
@@ -90,8 +90,8 @@ public:
virtual WebCore::GraphicsLayerFactory* graphicsLayerFactory() { return 0; }
#if USE(COORDINATED_GRAPHICS)
- virtual void setVisibleContentsRect(const WebCore::IntRect&, float scale, const WebCore::FloatPoint&) { }
- virtual void setVisibleContentsRectForLayer(int layerID, const WebCore::IntRect&) { }
+ virtual void setVisibleContentsRect(const WebCore::IntRect&, float /* scale */, const WebCore::FloatPoint&) { }
+ virtual void setVisibleContentsRectForLayer(int /* layerID */, const WebCore::IntRect&) { }
virtual void renderNextFrame() { }
virtual void purgeBackingStores() { }
virtual void didReceiveLayerTreeCoordinatorMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*) = 0;
diff --git a/Source/WebKit2/WebProcess/WebProcess.cpp b/Source/WebKit2/WebProcess/WebProcess.cpp
index 6f67ed022..43ed16b1a 100644
--- a/Source/WebKit2/WebProcess/WebProcess.cpp
+++ b/Source/WebKit2/WebProcess/WebProcess.cpp
@@ -1011,14 +1011,14 @@ void WebProcess::postInjectedBundleMessage(const CoreIPC::DataReference& message
if (!injectedBundle)
return;
- CoreIPC::ArgumentDecoder messageDecoder(messageData.data(), messageData.size());
+ OwnPtr<CoreIPC::ArgumentDecoder> decoder = CoreIPC::ArgumentDecoder::create(messageData.data(), messageData.size());
String messageName;
- if (!messageDecoder.decode(messageName))
+ if (!decoder->decode(messageName))
return;
RefPtr<APIObject> messageBody;
- if (!messageDecoder.decode(InjectedBundleUserMessageDecoder(messageBody)))
+ if (!decoder->decode(InjectedBundleUserMessageDecoder(messageBody)))
return;
injectedBundle->didReceiveMessage(messageName, messageBody.get());
diff --git a/Source/WebKit2/win/WebKit2.vcproj b/Source/WebKit2/win/WebKit2.vcproj
index b06682f4c..6397b4412 100755
--- a/Source/WebKit2/win/WebKit2.vcproj
+++ b/Source/WebKit2/win/WebKit2.vcproj
@@ -4094,6 +4094,22 @@
>
</File>
<File
+ RelativePath="..\Platform\CoreIPC\MessageDecoder.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\Platform\CoreIPC\MessageDecoder.h"
+ >
+ </File>
+ <File
+ RelativePath="..\Platform\CoreIPC\MessageEncoder.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\Platform\CoreIPC\MessageEncoder.h"
+ >
+ </File>
+ <File
RelativePath="..\Platform\CoreIPC\MessageID.h"
>
</File>
diff --git a/Source/api.pri b/Source/api.pri
index ff8a4c3d8..bf0aa8558 100644
--- a/Source/api.pri
+++ b/Source/api.pri
@@ -38,6 +38,8 @@ equals(qmakeVersion, 3.0) {
MODULE_BASE_OUTDIR = $$ROOT_BUILD_DIR
}
+QMAKE_DOCS = $$PWD/qtwebkit.qdocconf
+
# We load the relevant modules here, so that the effects of each module
# on the QT variable can be picked up when we later load(qt_module).
load(webkit_modules)
diff --git a/Source/qtwebkit.qdocconf b/Source/qtwebkit.qdocconf
new file mode 100644
index 000000000..82a056e63
--- /dev/null
+++ b/Source/qtwebkit.qdocconf
@@ -0,0 +1,13 @@
+include($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf)
+include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
+
+project = qtwebkit
+description = "Qt WebKit API Documentation"
+version = 5.0.0
+
+headerdirs = WebKit/qt/Api WebKit2/UIProcess/API/qt
+sourcedirs = WebKit/qt/Api WebKit/qt/docs Source/JavaScriptCore/qt/api WebKit2/UIProcess/API/qt
+exampledirs = WebKit/qt/docs
+imagedirs = WebKit/qt/docs
+
+depends += qtcore qtwidgets qtgui qtscript qtdoc qtprintsupport qtxml
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 92bc0975f..b7eb6dc0b 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,194 @@
+2012-10-18 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Reduce memory pressure during link time
+
+ Reviewed by Tor Arne Vestbø.
+
+ If possible always pass -fkeep-memory to the linker on i386. The
+ library has grown so big that we need this not only for i386 debug
+ builds but at least also for release.
+
+ * qmake/mkspecs/features/unix/default_post.prf:
+
+2012-10-17 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
+
+ [Qt] Modularize documentation for QtWebKit
+
+ Running 'make docs' would fail unless 'make qmake_all' was ran first,
+ but qmake_all involved generating all the derived sources, which seems
+ overly complex just for building documentation.
+
+ We solve this by preventing all subdirs except QtWebKit from having a
+ docs target. This would normally work fine on its own, but since we
+ use CONFIG += ordered, there's now a missing doc target for the
+ immediate dependency of the QtWebKit subdir. We solve this by adding
+ a dummy-target ourselves.
+
+ Finally, we clean up the qdocconf file to match the rest of the Qt
+ documentation modularization efforts.
+
+ Reviewed by Simon Hausmann.
+
+ * qmake/mkspecs/features/default_post.prf:
+
+2012-10-17 Zoltan Horvath <zoltan@webkit.org>
+
+ Remove the JSHeap memory measurement of the PageLoad performacetests since it creates bogus JSGlobalDatas
+ https://bugs.webkit.org/show_bug.cgi?id=99609
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove the implementation since it creates bogus JSGlobalDatas in the layout tests.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dump):
+
+2012-10-17 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] stop falling back to platform/mac for LayoutTest results
+ https://bugs.webkit.org/show_bug.cgi?id=99666
+
+ Reviewed by James Robinson.
+
+ Previously the Chromium ports would fall back to results in
+ platform/mac if a result was not found in platform/chromium-*.
+ This allowed us to share a lot of results w/ the Apple Mac port,
+ but often surprised people (especially at Apple ;) when changing
+ something in that directory would break a Chromium build.
+
+ The tests that are deleted in baselineoptimizer were for cases
+ that are no longer relevant or possible in the current fallback
+ graph.
+
+ * Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:
+ (BaselineOptimizerTest.test_move_baselines):
+ (BaselineOptimizerTest.test_chromium_covers_mac_win_linux):
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidPort):
+ * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
+ (ChromiumLinuxPort):
+ * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
+ (ChromiumMacPort):
+ * Scripts/webkitpy/layout_tests/port/chromium_win.py:
+ (ChromiumWinPort):
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+
+2012-10-17 Shashi Shekhar <shashishekhar@google.com>
+
+ Remove redundant sdk_build parameter.
+ https://bugs.webkit.org/show_bug.cgi?id=99648
+
+ Reviewed by Adam Barth.
+
+ sdk_build parameter is no longer needed.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp:
+
+2012-10-17 Joanmarie Diggs <jdiggs@igalia.com>
+
+ [GTK] AccessibilityUIElement::role() should be consistent across platforms wherever possible
+ https://bugs.webkit.org/show_bug.cgi?id=99640
+
+ Reviewed by Chris Fleizach.
+
+ Convert AtkRole instances to the Mac/Safari-style AXRole string.
+
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (roleToString): New method to convert AtkRole instances to the Mac/Safari-style AXRole string
+ (AccessibilityUIElement::role): Output the Mac/Safair-style AXRole string rather than the AtkRole's name
+
+2012-10-17 Anders Carlsson <andersca@apple.com>
+
+ Clean up Vector.h
+ https://bugs.webkit.org/show_bug.cgi?id=99622
+
+ Reviewed by Benjamin Poulain.
+
+ Remove ReversedProxy test.
+
+ * TestWebKitAPI/Tests/WTF/Vector.cpp:
+
+2012-10-17 Scott Graham <scottmg@chromium.org>
+
+ Integer overflows/underflows in all Gamepad controller api calls.
+ https://bugs.webkit.org/show_bug.cgi?id=97262
+
+ Reviewed by Abhishek Arya.
+
+ Range check controller inputs. This code is not exposed to the web,
+ but makes fuzzers try less hard to break uninteresting code.
+
+ * DumpRenderTree/chromium/TestRunner/GamepadController.cpp:
+ (GamepadController::setButtonCount):
+ (GamepadController::setButtonData):
+ (GamepadController::setAxisCount):
+ (GamepadController::setAxisData):
+
+2012-10-17 Joseph Pecoraro <pecoraro@apple.com>
+
+ Unreviewed watchlist email change.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-10-17 Dan Carney <dcarney@google.com>
+
+ Bind isolatedWorldSecurityOrigin to world
+ https://bugs.webkit.org/show_bug.cgi?id=99582
+
+ Reviewed by Adam Barth.
+
+ Added ability to unset isolatedWorldSecurityOrigin.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::setIsolatedWorldSecurityOrigin):
+
+2012-10-17 Joseph Pecoraro <pecoraro@apple.com>
+
+ Unreviewed watchlist addition.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-10-17 Sadrul Habib Chowdhury <sadrul@chromium.org>
+
+ plugins: Allow a plugin to dictate whether it can receive drag events or not.
+ https://bugs.webkit.org/show_bug.cgi?id=99355
+
+ Reviewed by Tony Chang.
+
+ Update the TestWebPlugin to implement the new |canProcessDrag| interface.
+
+ * DumpRenderTree/chromium/TestWebPlugin.h:
+ (TestWebPlugin::canProcessDrag):
+
+2012-10-17 Dominic Mazzoni <dmazzoni@google.com>
+
+ Unreviewed. Create an accessibility watchlist.
+
+ * Scripts/webkitpy/common/config/committers.py:
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-10-17 Jochen Eisinger <jochen@chromium.org>
+
+ [gyp] fix bundle resources for DumpRenderTree on mac
+ https://bugs.webkit.org/show_bug.cgi?id=99558
+
+ Reviewed by Adam Barth.
+
+ mac_bundle_resources doesn't propagate to targets that depend on it,
+ so I'm wrapping it in an all_dependent_settings block.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2012-10-17 Harald Alvestrand <hta@google.com>
+
+ Add myself to the MediaStream watchlist
+ https://bugs.webkit.org/show_bug.cgi?id=99589
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
2012-10-17 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
[WK2][WTR] InjectedBundlePage::decidePolicyForNavigationAction() should print only filename part of local URLs
diff --git a/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp b/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
index 4145b9cc0..a24051584 100644
--- a/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
+++ b/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
@@ -132,20 +132,22 @@
'dependencies': [
'LayoutTestHelper',
],
- 'mac_bundle_resources': [
- '<(ahem_path)',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher100.ttf',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher200.ttf',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher300.ttf',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher400.ttf',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher500.ttf',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher600.ttf',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher700.ttf',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher800.ttf',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher900.ttf',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/missingImage.png',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/textAreaResizeCorner.png',
- ],
+ 'all_dependent_settings': {
+ 'mac_bundle_resources': [
+ '<(ahem_path)',
+ '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher100.ttf',
+ '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher200.ttf',
+ '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher300.ttf',
+ '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher400.ttf',
+ '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher500.ttf',
+ '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher600.ttf',
+ '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher700.ttf',
+ '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher800.ttf',
+ '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher900.ttf',
+ '<(SHARED_INTERMEDIATE_DIR)/webkit/missingImage.png',
+ '<(SHARED_INTERMEDIATE_DIR)/webkit/textAreaResizeCorner.png',
+ ],
+ },
}],
['use_x11 == 1', {
'copies': [{
@@ -541,7 +543,6 @@
'-DPRODUCT_DIR=<(ant_build_out)',
'--ant-args',
'-DCHROMIUM_SRC=<(ant_build_to_chromium_src)',
- '--sdk-build=<(sdk_build)',
'--app_abi',
'<(android_app_abi)',
],
diff --git a/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp b/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp
index 8aee7c5b2..082597a11 100644
--- a/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp
+++ b/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp
@@ -1392,12 +1392,13 @@ void DRTTestRunner::setIsolatedWorldSecurityOrigin(const CppArgumentList& argume
{
result->setNull();
- if (arguments.size() != 2 || !arguments[0].isNumber() || !arguments[1].isString())
+ if (arguments.size() != 2 || !arguments[0].isNumber() || !(arguments[1].isString() || arguments[1].isNull()))
return;
- m_shell->webView()->focusedFrame()->setIsolatedWorldSecurityOrigin(
- arguments[0].toInt32(),
- WebSecurityOrigin::createFromString(cppVariantToWebString(arguments[1])));
+ WebSecurityOrigin origin;
+ if (arguments[1].isString())
+ origin = WebSecurityOrigin::createFromString(cppVariantToWebString(arguments[1]));
+ m_shell->webView()->focusedFrame()->setIsolatedWorldSecurityOrigin(arguments[0].toInt32(), origin);
}
void DRTTestRunner::setAllowUniversalAccessFromFileURLs(const CppArgumentList& arguments, CppVariant* result)
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/GamepadController.cpp b/Tools/DumpRenderTree/chromium/TestRunner/GamepadController.cpp
index 35b7dfa38..cb36bfdfb 100644
--- a/Tools/DumpRenderTree/chromium/TestRunner/GamepadController.cpp
+++ b/Tools/DumpRenderTree/chromium/TestRunner/GamepadController.cpp
@@ -128,6 +128,8 @@ void GamepadController::setButtonCount(const CppArgumentList& args, CppVariant*
if (index < 0 || index >= static_cast<int>(WebKit::WebGamepads::itemsLengthCap))
return;
int buttons = args[1].toInt32();
+ if (buttons < 0 || buttons >= static_cast<int>(WebKit::WebGamepad::buttonsLengthCap))
+ return;
m_gamepads.items[index].buttonsLength = buttons;
m_delegate->setGamepadData(m_gamepads);
result->setNull();
@@ -143,6 +145,8 @@ void GamepadController::setButtonData(const CppArgumentList& args, CppVariant* r
if (index < 0 || index >= static_cast<int>(WebKit::WebGamepads::itemsLengthCap))
return;
int button = args[1].toInt32();
+ if (button < 0 || button >= static_cast<int>(WebKit::WebGamepad::buttonsLengthCap))
+ return;
double data = args[2].toDouble();
m_gamepads.items[index].buttons[button] = data;
m_delegate->setGamepadData(m_gamepads);
@@ -159,6 +163,8 @@ void GamepadController::setAxisCount(const CppArgumentList& args, CppVariant* re
if (index < 0 || index >= static_cast<int>(WebKit::WebGamepads::itemsLengthCap))
return;
int axes = args[1].toInt32();
+ if (axes < 0 || axes >= static_cast<int>(WebKit::WebGamepad::axesLengthCap))
+ return;
m_gamepads.items[index].axesLength = axes;
m_delegate->setGamepadData(m_gamepads);
result->setNull();
@@ -174,6 +180,8 @@ void GamepadController::setAxisData(const CppArgumentList& args, CppVariant* res
if (index < 0 || index >= static_cast<int>(WebKit::WebGamepads::itemsLengthCap))
return;
int axis = args[1].toInt32();
+ if (axis < 0 || axis >= static_cast<int>(WebKit::WebGamepad::axesLengthCap))
+ return;
double data = args[2].toDouble();
m_gamepads.items[index].axes[axis] = data;
m_delegate->setGamepadData(m_gamepads);
diff --git a/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp b/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp
index c54ebedea..7080bef18 100644
--- a/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp
+++ b/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp
@@ -125,6 +125,7 @@ TestWebPlugin::TestWebPlugin(WebKit::WebFrame* frame,
, m_context(0)
, m_acceptsTouchEvent(false)
, m_printEventDetails(false)
+ , m_canProcessDrag(false)
{
static const WebString kAttributePrimitive = WebString::fromUTF8("primitive");
static const WebString kAttributeBackgroundColor = WebString::fromUTF8("background-color");
@@ -132,6 +133,7 @@ TestWebPlugin::TestWebPlugin(WebKit::WebFrame* frame,
static const WebString kAttributeOpacity = WebString::fromUTF8("opacity");
static const WebString kAttributeAcceptsTouch = WebString::fromUTF8("accepts-touch");
static const WebString kAttributePrintEventDetails = WebString::fromUTF8("print-event-details");
+ static const WebString kAttributeCanProcessDrag = WebString::fromUTF8("can-process-drag");
ASSERT(params.attributeNames.size() == params.attributeValues.size());
size_t size = params.attributeNames.size();
@@ -151,6 +153,8 @@ TestWebPlugin::TestWebPlugin(WebKit::WebFrame* frame,
m_acceptsTouchEvent = parseBoolean(attributeValue);
else if (attributeName == kAttributePrintEventDetails)
m_printEventDetails = parseBoolean(attributeValue);
+ else if (attributeName == kAttributeCanProcessDrag)
+ m_canProcessDrag = parseBoolean(attributeValue);
}
}
diff --git a/Tools/DumpRenderTree/chromium/TestWebPlugin.h b/Tools/DumpRenderTree/chromium/TestWebPlugin.h
index aa6533e32..49fde85aa 100644
--- a/Tools/DumpRenderTree/chromium/TestWebPlugin.h
+++ b/Tools/DumpRenderTree/chromium/TestWebPlugin.h
@@ -56,6 +56,7 @@ public:
virtual bool initialize(WebKit::WebPluginContainer*);
virtual void destroy();
virtual NPObject* scriptableObject() { return 0; }
+ virtual bool canProcessDrag() const { return m_canProcessDrag; }
virtual void paint(WebKit::WebCanvas*, const WebKit::WebRect&) { }
virtual void updateGeometry(const WebKit::WebRect& frameRect,
const WebKit::WebRect& clipRect,
@@ -132,6 +133,7 @@ private:
bool m_acceptsTouchEvent;
bool m_printEventDetails;
+ bool m_canProcessDrag;
};
#endif // TestPepperPlugin_h
diff --git a/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp b/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
index 25c49e314..b00c583f0 100644
--- a/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
+++ b/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
@@ -37,6 +37,114 @@
#include <wtf/text/WTFString.h>
#include <wtf/unicode/CharacterNames.h>
+static inline String roleToString(AtkRole role)
+{
+ switch (role) {
+ case ATK_ROLE_ALERT:
+ return "AXRole: AXAlert";
+ case ATK_ROLE_CANVAS:
+ return "AXRole: AXCanvas";
+ case ATK_ROLE_CHECK_BOX:
+ return "AXRole: AXCheckBox";
+ case ATK_ROLE_COLUMN_HEADER:
+ return "AXRole: AXColumnHeader";
+ case ATK_ROLE_COMBO_BOX:
+ return "AXRole: AXComboBox";
+ case ATK_ROLE_DOCUMENT_FRAME:
+ return "AXRole: AXWebArea";
+ case ATK_ROLE_ENTRY:
+ return "AXRole: AXTextField";
+ case ATK_ROLE_FOOTER:
+ return "AXRole: AXFooter";
+ case ATK_ROLE_FORM:
+ return "AXRole: AXForm";
+ case ATK_ROLE_GROUPING:
+ return "AXRole: AXGroup";
+ case ATK_ROLE_HEADING:
+ return "AXRole: AXHeading";
+ case ATK_ROLE_IMAGE:
+ return "AXRole: AXImage";
+ case ATK_ROLE_IMAGE_MAP:
+ return "AXRole: AXImageMap";
+ case ATK_ROLE_LABEL:
+ return "AXRole: AXLabel";
+ case ATK_ROLE_LINK:
+ return "AXRole: AXLink";
+ case ATK_ROLE_LIST:
+ return "AXRole: AXList";
+ case ATK_ROLE_LIST_BOX:
+ return "AXRole: AXListBox";
+ case ATK_ROLE_LIST_ITEM:
+ return "AXRole: AXListItem";
+ case ATK_ROLE_MENU:
+ return "AXRole: AXMenu";
+ case ATK_ROLE_MENU_BAR:
+ return "AXRole: AXMenuBar";
+ case ATK_ROLE_MENU_ITEM:
+ return "AXRole: AXMenuItem";
+ case ATK_ROLE_PAGE_TAB:
+ return "AXRole: AXTab";
+ case ATK_ROLE_PAGE_TAB_LIST:
+ return "AXRole: AXTabGroup";
+ case ATK_ROLE_PANEL:
+ return "AXRole: AXGroup";
+ case ATK_ROLE_PARAGRAPH:
+ return "AXRole: AXParagraph";
+ case ATK_ROLE_PASSWORD_TEXT:
+ return "AXRole: AXPasswordField";
+ case ATK_ROLE_PUSH_BUTTON:
+ return "AXRole: AXButton";
+ case ATK_ROLE_RADIO_BUTTON:
+ return "AXRole: AXRadioButton";
+ case ATK_ROLE_ROW_HEADER:
+ return "AXRole: AXRowHeader";
+ case ATK_ROLE_RULER:
+ return "AXRole: AXRuler";
+ case ATK_ROLE_SCROLL_BAR:
+ return "AXRole: AXScrollBar";
+ case ATK_ROLE_SCROLL_PANE:
+ return "AXRole: AXScrollArea";
+ case ATK_ROLE_SECTION:
+ return "AXRole: AXDiv";
+ case ATK_ROLE_SEPARATOR:
+ return "AXRole: AXHorizontalRule";
+ case ATK_ROLE_SLIDER:
+ return "AXRole: AXSlider";
+ case ATK_ROLE_SPIN_BUTTON:
+ return "AXRole: AXSpinButton";
+ case ATK_ROLE_TABLE:
+ return "AXRole: AXTable";
+ case ATK_ROLE_TABLE_CELL:
+ return "AXRole: AXCell";
+ case ATK_ROLE_TABLE_COLUMN_HEADER:
+ return "AXRole: AXColumnHeader";
+ case ATK_ROLE_TABLE_ROW:
+ return "AXRole: AXRow";
+ case ATK_ROLE_TABLE_ROW_HEADER:
+ return "AXRole: AXRowHeader";
+ case ATK_ROLE_TOGGLE_BUTTON:
+ return "AXRole: AXToggleButton";
+ case ATK_ROLE_TOOL_BAR:
+ return "AXRole: AXToolbar";
+ case ATK_ROLE_TOOL_TIP:
+ return "AXRole: AXUserInterfaceTooltip";
+ case ATK_ROLE_TREE:
+ return "AXRole: AXTree";
+ case ATK_ROLE_TREE_TABLE:
+ return "AXRole: AXTreeGrid";
+ case ATK_ROLE_TREE_ITEM:
+ return "AXRole: AXTreeItem";
+ case ATK_ROLE_WINDOW:
+ return "AXRole: AXWindow";
+ case ATK_ROLE_UNKNOWN:
+ return "AXRole: AXUnknown";
+ default:
+ // We want to distinguish ATK_ROLE_UNKNOWN from a known AtkRole which
+ // our DRT isn't properly handling.
+ return "AXRole: FIXME not identified";
+ }
+}
+
static inline gchar* replaceCharactersForResults(gchar* str)
{
String uString = String::fromUTF8(str);
@@ -246,14 +354,11 @@ JSStringRef AccessibilityUIElement::parameterizedAttributeNames()
JSStringRef AccessibilityUIElement::role()
{
AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
-
if (!role)
return JSStringCreateWithCharacters(0, 0);
- const gchar* roleName = atk_role_get_name(role);
- GOwnPtr<gchar> axRole(g_strdup_printf("AXRole: %s", roleName));
-
- return JSStringCreateWithUTF8CString(axRole.get());
+ String roleString = roleToString(role);
+ return JSStringCreateWithUTF8CString(roleString.utf8().data());
}
JSStringRef AccessibilityUIElement::subrole()
diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm
index f70e26259..029b358a0 100644
--- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm
+++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm
@@ -1186,7 +1186,6 @@ void dump()
WTF::FastMallocStatistics mallocStats = WTF::fastMallocStatistics();
printf("DumpMalloc: %li\n", mallocStats.committedVMBytes);
- printf("DumpJSHeap: %li\n", JSC::HeapStatistics::usedJSHeap());
if (resultData) {
fwrite([resultData bytes], 1, [resultData length], stdout);
diff --git a/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py b/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py
index 082bc6576..d44f71e91 100644
--- a/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py
+++ b/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py
@@ -74,20 +74,6 @@ class BaselineOptimizerTest(unittest.TestCase):
})
self.assertEqual(host.filesystem.read_binary_file('/mock-checkout/LayoutTests/platform/chromium/another/test-expected.txt'), 'result A')
- def test_platform_mac_different(self):
- self._assertOptimization({
- 'LayoutTests': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
- 'LayoutTests/platform/mac': '453e67177a75b2e79905154ece0efba6e5bfb65d',
- 'LayoutTests/platform/mac-lion': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
- 'LayoutTests/platform/chromium-mac': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
- 'LayoutTests/platform/chromium-win': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
- }, {
- 'LayoutTests': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
- 'LayoutTests/platform/mac': '453e67177a75b2e79905154ece0efba6e5bfb65d',
- 'LayoutTests/platform/mac-lion': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
- 'LayoutTests/platform/chromium': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
- })
-
def test_chromium_linux_redundant_with_win(self):
self._assertOptimization({
'LayoutTests/platform/chromium-win': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
@@ -118,14 +104,6 @@ class BaselineOptimizerTest(unittest.TestCase):
'LayoutTests/platform/chromium': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
})
- def test_chromium_mac_redundant_with_apple_mac(self):
- self._assertOptimization({
- 'LayoutTests/platform/chromium-mac': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
- 'LayoutTests/platform/mac': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
- }, {
- 'LayoutTests/platform/mac': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
- })
-
def test_mac_future(self):
self._assertOptimization({
'LayoutTests/platform/mac-lion': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
diff --git a/Tools/Scripts/webkitpy/common/config/committers.py b/Tools/Scripts/webkitpy/common/config/committers.py
index 1c231d37a..73e18b36b 100644
--- a/Tools/Scripts/webkitpy/common/config/committers.py
+++ b/Tools/Scripts/webkitpy/common/config/committers.py
@@ -109,6 +109,7 @@ watchers_who_are_not_contributors = [
contributors_who_are_not_committers = [
Contributor("Aharon Lanin", "aharon@google.com"),
Contributor("Alan Stearns", "stearns@adobe.com", "astearns"),
+ Contributor("Alejandro Pineiro", "apinheiro@igalia.com"),
Contributor("Alexey Marinichev", ["amarinichev@chromium.org", "amarinichev@google.com"], "amarinichev"),
Contributor("Andras Piroska", "pandras@inf.u-szeged.hu", "andris88"),
Contributor("Andrei Bucur", "abucur@adobe.com", "abucur"),
@@ -134,11 +135,13 @@ contributors_who_are_not_committers = [
Contributor("Greg Simon", "gregsimon@chromium.org", "gregsimon"),
Contributor("Gregg Tavares", ["gman@google.com", "gman@chromium.org"], "gman"),
Contributor("Hao Zheng", "zhenghao@chromium.org"),
+ Contributor("Harald Alvestrand", "hta@google.com", "hta"),
Contributor("Ian Hickson", "ian@hixie.ch", "hixie"),
Contributor("Janos Badics", "jbadics@inf.u-szeged.hu", "dicska"),
Contributor("Jonathan Backer", "backer@chromium.org", "backer"),
Contributor("Jeff Timanus", ["twiz@chromium.org", "twiz@google.com"], "twiz"),
Contributor("Jing Zhao", "jingzhao@chromium.org"),
+ Contributor("Joanmarie Diggs", "jdiggs@igalia.com"),
Contributor("John Bates", ["jbates@google.com", "jbates@chromium.org"], "jbates"),
Contributor("John Bauman", ["jbauman@chromium.org", "jbauman@google.com"], "jbauman"),
Contributor("John Mellor", "johnme@chromium.org", "johnme"),
diff --git a/Tools/Scripts/webkitpy/common/config/watchlist b/Tools/Scripts/webkitpy/common/config/watchlist
index 0f3dd65a1..813cee5b4 100755
--- a/Tools/Scripts/webkitpy/common/config/watchlist
+++ b/Tools/Scripts/webkitpy/common/config/watchlist
@@ -265,11 +265,16 @@
r"|Source/WebCore/platform/mediastream"
r"|LayoutTests/fast/mediastream",
},
+ "Accessibility": {
+ "filename": r"Source/WebCore/accessibility"
+ r"|LayoutTests/.*accessibility",
+ },
},
"CC_RULES": {
# Note: All email addresses listed must be registered with bugzilla.
# Specifically, levin@chromium.org and levin+threading@chromium.org are
# two different accounts as far as bugzilla is concerned.
+ "Accessibility": [ "cfleizach@apple.com", "dmazzoni@google.com", "apinheiro@igalia.com", "jdiggs@igalia.com" ],
"AppleMacPublicApi": [ "timothy@apple.com" ],
"Battery": [ "gyuyoung.kim@samsung.com" ],
"BlackBerry": [ "mifenton@rim.com", "rwlbuis@gmail.com", "tonikitoo@webkit.org" ],
@@ -290,7 +295,7 @@
"Loader": [ "japhet@chromium.org" ],
"MathML": [ "dbarton@mathscribe.com" ],
"Media": [ "feature-media-reviews@chromium.org", "eric.carlson@apple.com" ],
- "MediaStream": [ "tommyw@google.com" ],
+ "MediaStream": [ "tommyw@google.com", "hta@google.com" ],
"NetworkInfo": [ "gyuyoung.kim@samsung.com" ],
"OpenGL" : [ "noam.rosenthal@nokia.com", "dino@apple.com" ],
"QtBuildSystem" : [ "vestbo@webkit.org", "abecsi@webkit.org" ],
@@ -314,7 +319,7 @@
"WatchListScript": [ "levin+watchlist@chromium.org", ],
"WebGL": [ "dino@apple.com" ],
"WebIDL": [ "abarth@webkit.org", "ojan@chromium.org" ],
- "WebInspectorProtocol": [ "timothy@apple.com", ],
+ "WebInspectorProtocol": [ "timothy@apple.com", "joepeck@webkit.org" ],
"WebKitGTKTranslations": [ "gns@gnome.org", "mrobinson@webkit.org" ],
"WebSocket": [ "yutak@chromium.org" ],
"XSS": [ "dbates@webkit.org" ],
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
index e246b8870..6389feb63 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
@@ -157,7 +157,6 @@ class ChromiumAndroidPort(chromium.ChromiumPort):
'chromium-linux',
'chromium-win',
'chromium',
- 'mac',
]
def __init__(self, host, port_name, **kwargs):
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py
index a2252c1b3..7c37fd17a 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py
@@ -46,14 +46,12 @@ class ChromiumLinuxPort(chromium.ChromiumPort):
'chromium-linux',
'chromium-win',
'chromium',
- 'mac',
],
'x86': [
'chromium-linux-x86',
'chromium-linux',
'chromium-win',
'chromium',
- 'mac',
],
}
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
index 08c1ede0f..47eb4ea0c 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
@@ -47,22 +47,18 @@ class ChromiumMacPort(chromium.ChromiumPort):
'chromium-mac-snowleopard',
'chromium-mac',
'chromium',
- 'mac',
],
'lion': [
'chromium-mac',
'chromium',
- 'mac',
],
'mountainlion': [ # FIXME: we don't treat ML different from Lion yet.
'chromium-mac',
'chromium',
- 'mac',
],
'future': [
'chromium-mac',
'chromium',
- 'mac',
],
}
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py
index 1168e407c..3266c3914 100755
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py
@@ -44,18 +44,15 @@ class ChromiumWinPort(chromium.ChromiumPort):
# FIXME: Figure out how to unify this with base.TestConfiguration.all_systems()?
SUPPORTED_VERSIONS = ('xp', 'win7')
- # FIXME: Do we need mac-snowleopard here, like the base win port?
FALLBACK_PATHS = {
'xp': [
'chromium-win-xp',
'chromium-win',
'chromium',
- 'mac',
],
'win7': [
'chromium-win',
'chromium',
- 'mac',
],
}
diff --git a/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js b/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js
index 2c14a3a19..41a2d6a51 100644
--- a/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js
+++ b/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js
@@ -2522,12 +2522,12 @@ function hideLegend()
}
var g_fallbacksMap = {};
-g_fallbacksMap['WIN-XP'] = ['chromium-win-xp', 'chromium-win', 'chromium', 'mac'];
-g_fallbacksMap['WIN-7'] = ['chromium-win', 'chromium', 'mac'];
-g_fallbacksMap['MAC-SNOWLEOPARD'] = ['chromium-mac-snowleopard', 'chromium-mac', 'chromium', 'mac'];
-g_fallbacksMap['MAC-LION'] = ['chromium-mac', 'chromium', 'mac'];
-g_fallbacksMap['LINUX-32'] = ['chromium-linux-x86', 'chromium-linux', 'chromium-win', 'chromium', 'mac'];
-g_fallbacksMap['LINUX-64'] = ['chromium-linux', 'chromium-win', 'chromium', 'mac'];
+g_fallbacksMap['WIN-XP'] = ['chromium-win-xp', 'chromium-win', 'chromium'];
+g_fallbacksMap['WIN-7'] = ['chromium-win', 'chromium'];
+g_fallbacksMap['MAC-SNOWLEOPARD'] = ['chromium-mac-snowleopard', 'chromium-mac', 'chromium'];
+g_fallbacksMap['MAC-LION'] = ['chromium-mac', 'chromium'];
+g_fallbacksMap['LINUX-32'] = ['chromium-linux-x86', 'chromium-linux', 'chromium-win', 'chromium'];
+g_fallbacksMap['LINUX-64'] = ['chromium-linux', 'chromium-win', 'chromium'];
function htmlForFallbackHelp(fallbacks)
{
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp b/Tools/TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp
index 28e82ac07..696f40c67 100644
--- a/Tools/TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp
@@ -155,7 +155,6 @@
'-DPRODUCT_DIR=<(ant_build_out)',
'--ant-args',
'-DCHROMIUM_SRC=<(ant_build_to_chromium_src)',
- '--sdk-build=<(sdk_build)',
'--app_abi',
'<(android_app_abi)',
],
diff --git a/Tools/TestWebKitAPI/Tests/WTF/Vector.cpp b/Tools/TestWebKitAPI/Tests/WTF/Vector.cpp
index 46a35922f..9ffb0b2e8 100644
--- a/Tools/TestWebKitAPI/Tests/WTF/Vector.cpp
+++ b/Tools/TestWebKitAPI/Tests/WTF/Vector.cpp
@@ -76,29 +76,4 @@ TEST(WTF_Vector, ReverseIterator)
EXPECT_TRUE(end == it);
}
-TEST(WTF_Vector, ReversedProxy)
-{
- Vector<int> intVector;
- intVector.append(10);
- intVector.append(11);
- intVector.append(12);
- intVector.append(13);
-
- Vector<int>::reverse_iterator it = intVector.reversed().begin();
- Vector<int>::reverse_iterator end = intVector.reversed().end();
-
- EXPECT_TRUE(end != it);
-
- EXPECT_EQ(13, *it);
- ++it;
- EXPECT_EQ(12, *it);
- ++it;
- EXPECT_EQ(11, *it);
- ++it;
- EXPECT_EQ(10, *it);
- ++it;
-
- EXPECT_TRUE(end == it);
-}
-
} // namespace TestWebKitAPI
diff --git a/Tools/qmake/mkspecs/features/default_post.prf b/Tools/qmake/mkspecs/features/default_post.prf
index aa21b5de0..8800e1e44 100644
--- a/Tools/qmake/mkspecs/features/default_post.prf
+++ b/Tools/qmake/mkspecs/features/default_post.prf
@@ -249,6 +249,31 @@ for(subdir, SUBDIRS) {
}
}
+root_project_file {
+ # Tweak documentation rules so that we only get documentation
+ # for the QtWebKit subdir, which means we don't have to run
+ # qmake_all and generate all the derived sources, just to
+ # build documentation.
+ previous_subdir =
+ doc_targets = docs install_docs uninstall_docs
+ for(subdir, SUBDIRS) {
+ equals(subdir, QtWebKit) {
+ for(doc_target, doc_targets) {
+ # Since we use CONFIG += ordered, we need to provide a fake dummy
+ # doc-target for the immediate dependency of the QtWebKit target.
+ dummy_target = sub-$$replace($${previous_subdir}.file, [^a-zA-Z0-9_], -)-$${doc_target}_ordered
+ $${dummy_target}.target = $${dummy_target}
+ QMAKE_EXTRA_TARGETS += $${dummy_target}
+ }
+ } else {
+ previous_subdir = $$subdir # Save for later
+
+ # For all the other subdirs, we disable docs the regular way
+ for(doc_target, doc_targets): $${subdir}.CONFIG += no_$${doc_target}_target
+ }
+ }
+}
+
incremental.target = incremental
incremental.commands = $(MAKE) -f $(MAKEFILE) qmake_all && $(MAKE) -f $(MAKEFILE)
QMAKE_EXTRA_TARGETS += incremental
diff --git a/Tools/qmake/mkspecs/features/unix/default_post.prf b/Tools/qmake/mkspecs/features/unix/default_post.prf
index 5a73f17d4..92c073c53 100644
--- a/Tools/qmake/mkspecs/features/unix/default_post.prf
+++ b/Tools/qmake/mkspecs/features/unix/default_post.prf
@@ -34,7 +34,7 @@ linux-g++* {
contains(TEMPLATE, app): CONFIG += rpath
-isEqual(QT_ARCH,i386):CONFIG(debug, debug|release) {
+isEqual(QT_ARCH,i386) {
# Make ld not cache the symbol tables of input files in memory to avoid memory exhaustion during the linking phase.
config_gnuld: QMAKE_LFLAGS += -Wl,--no-keep-memory
}